summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile385
-rw-r--r--gammu/emb/common/common.pro4
-rw-r--r--gammu/emb/common/device/bluetoth/blue_w32.c4
-rw-r--r--gammu/emb/common/device/bluetoth/blue_w32.h4
-rw-r--r--gammu/emb/common/device/serial/ser_w32.h2
-rw-r--r--gammu/emb/gammu/gammu.pro4
-rw-r--r--kabc/address.h6
-rw-r--r--kabc/addressbook.cpp30
-rw-r--r--kabc/addressbook.h4
-rw-r--r--kabc/addressee.cpp2
-rw-r--r--kabc/addressee.h4
-rw-r--r--kabc/addresseedialog.cpp51
-rw-r--r--kabc/addresseedialog.h18
-rw-r--r--kabc/addresseelist.cpp12
-rw-r--r--kabc/addresseelist.h6
-rw-r--r--kabc/addresseeview.cpp47
-rw-r--r--kabc/addresseeview.h4
-rw-r--r--kabc/distributionlist.cpp6
-rw-r--r--kabc/distributionlist.h7
-rw-r--r--kabc/distributionlistdialog.cpp36
-rw-r--r--kabc/distributionlistdialog.h12
-rw-r--r--kabc/distributionlisteditor.cpp30
-rw-r--r--kabc/distributionlisteditor.h10
-rw-r--r--kabc/field.cpp10
-rw-r--r--kabc/field.h4
-rw-r--r--kabc/formatfactory.cpp2
-rw-r--r--kabc/formatfactory.h4
-rw-r--r--kabc/formats/binary/kabcformat_binaryE.pro2
-rw-r--r--kabc/formats/vcardformatplugin2.cpp20
-rw-r--r--kabc/kabc.pro8
-rw-r--r--kabc/kabcE.pro8
-rw-r--r--kabc/key.h6
-rw-r--r--kabc/phonenumber.h6
-rw-r--r--kabc/picture.cpp2
-rw-r--r--kabc/picture.h2
-rw-r--r--kabc/plugins/dir/dir.pro14
-rw-r--r--kabc/plugins/dir/dirE.pro4
-rw-r--r--kabc/plugins/dir/resourcedir.cpp8
-rw-r--r--kabc/plugins/dir/resourcedirconfig.cpp4
-rw-r--r--kabc/plugins/file/file.pro14
-rw-r--r--kabc/plugins/file/fileE.pro4
-rw-r--r--kabc/plugins/file/resourcefile.cpp10
-rw-r--r--kabc/plugins/file/resourcefileconfig.cpp4
-rw-r--r--kabc/plugins/ldap/ldapE.pro4
-rw-r--r--kabc/plugins/olaccess/olaccess.pro8
-rw-r--r--kabc/plugins/opie/opieE.pro6
-rw-r--r--kabc/plugins/qtopia/qtopia.pro16
-rw-r--r--kabc/plugins/qtopia/qtopiaE.pro6
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.cpp24
-rw-r--r--kabc/plugins/qtopia/qtopiaconverter.h9
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp14
-rw-r--r--kabc/plugins/qtopia/resourceqtopiaconfig.cpp4
-rw-r--r--kabc/plugins/sharpdtm/sharpdtmE.pro8
-rw-r--r--kabc/secrecy.h4
-rw-r--r--kabc/sound.h2
-rw-r--r--kabc/tmpaddressbook.cpp2
-rw-r--r--kabc/vcard/AdrParam.cpp10
-rw-r--r--kabc/vcard/AdrValue.cpp9
-rw-r--r--kabc/vcard/AgentParam.cpp6
-rw-r--r--kabc/vcard/AgentValue.cpp6
-rw-r--r--kabc/vcard/ClassValue.cpp6
-rw-r--r--kabc/vcard/ContentLine.cpp36
-rw-r--r--kabc/vcard/DateParam.cpp6
-rw-r--r--kabc/vcard/DateValue.cpp30
-rw-r--r--kabc/vcard/EmailParam.cpp6
-rw-r--r--kabc/vcard/Entity.cpp12
-rw-r--r--kabc/vcard/Enum.cpp8
-rw-r--r--kabc/vcard/FloatValue.cpp8
-rw-r--r--kabc/vcard/GeoValue.cpp6
-rw-r--r--kabc/vcard/ImageParam.cpp6
-rw-r--r--kabc/vcard/ImageValue.cpp6
-rw-r--r--kabc/vcard/ImgValue.cpp6
-rw-r--r--kabc/vcard/LangValue.cpp24
-rw-r--r--kabc/vcard/NValue.cpp10
-rw-r--r--kabc/vcard/OrgValue.cpp10
-rw-r--r--kabc/vcard/Param.cpp16
-rw-r--r--kabc/vcard/PhoneNumberValue.cpp6
-rw-r--r--kabc/vcard/RToken.cpp6
-rw-r--r--kabc/vcard/SoundValue.cpp6
-rw-r--r--kabc/vcard/SourceParam.cpp6
-rw-r--r--kabc/vcard/TelParam.cpp6
-rw-r--r--kabc/vcard/TelValue.cpp6
-rw-r--r--kabc/vcard/TextBinParam.cpp6
-rw-r--r--kabc/vcard/TextBinValue.cpp6
-rw-r--r--kabc/vcard/TextListValue.cpp10
-rw-r--r--kabc/vcard/TextParam.cpp6
-rw-r--r--kabc/vcard/TextValue.cpp8
-rw-r--r--kabc/vcard/URIValue.cpp16
-rw-r--r--kabc/vcard/UTCValue.cpp6
-rw-r--r--kabc/vcard/VCardEntity.cpp12
-rw-r--r--kabc/vcard/VCardv.cpp33
-rw-r--r--kabc/vcard/Value.cpp6
-rw-r--r--kabc/vcard/include/VCardAdrParam.h16
-rw-r--r--kabc/vcard/include/VCardAdrValue.h46
-rw-r--r--kabc/vcard/include/VCardAgentParam.h4
-rw-r--r--kabc/vcard/include/VCardAgentValue.h2
-rw-r--r--kabc/vcard/include/VCardClassValue.h2
-rw-r--r--kabc/vcard/include/VCardContentLine.h18
-rw-r--r--kabc/vcard/include/VCardDateParam.h2
-rw-r--r--kabc/vcard/include/VCardDateValue.h2
-rw-r--r--kabc/vcard/include/VCardDefines.h6
-rw-r--r--kabc/vcard/include/VCardEmailParam.h8
-rw-r--r--kabc/vcard/include/VCardEntity.h14
-rw-r--r--kabc/vcard/include/VCardEnum.h8
-rw-r--r--kabc/vcard/include/VCardFloatValue.h2
-rw-r--r--kabc/vcard/include/VCardImageParam.h2
-rw-r--r--kabc/vcard/include/VCardImageValue.h2
-rw-r--r--kabc/vcard/include/VCardLangValue.h16
-rw-r--r--kabc/vcard/include/VCardNValue.h26
-rw-r--r--kabc/vcard/include/VCardOrgValue.h8
-rw-r--r--kabc/vcard/include/VCardParam.h22
-rw-r--r--kabc/vcard/include/VCardRToken.h4
-rw-r--r--kabc/vcard/include/VCardSoundValue.h2
-rw-r--r--kabc/vcard/include/VCardSourceParam.h12
-rw-r--r--kabc/vcard/include/VCardTelParam.h6
-rw-r--r--kabc/vcard/include/VCardTelValue.h2
-rw-r--r--kabc/vcard/include/VCardTextBinParam.h2
-rw-r--r--kabc/vcard/include/VCardTextBinValue.h2
-rw-r--r--kabc/vcard/include/VCardTextListValue.h8
-rw-r--r--kabc/vcard/include/VCardTextParam.h2
-rw-r--r--kabc/vcard/include/VCardURIValue.h16
-rw-r--r--kabc/vcard/include/VCardUTCValue.h2
-rw-r--r--kabc/vcard/include/VCardVCard.h18
-rw-r--r--kabc/vcard/include/VCardVCardEntity.h6
-rw-r--r--kabc/vcard/include/VCardValue.h6
-rw-r--r--kabc/vcard/include/generated/AdrParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/AdrValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/AgentParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/AgentValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/ClassValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/ContentLine-generated.h10
-rw-r--r--kabc/vcard/include/generated/DateParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/DateValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/EmailParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/FloatValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/GeoValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/Group-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImageParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImageValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImgParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/ImgValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/LangValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/NValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/Name-generated.h10
-rw-r--r--kabc/vcard/include/generated/OrgValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/Param-generated.h10
-rw-r--r--kabc/vcard/include/generated/ParamName-generated.h10
-rw-r--r--kabc/vcard/include/generated/ParamValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/PhoneNumberValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/SoundValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/SourceParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TelParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TelValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextBinParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextBinValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextListValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextNSParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextParam-generated.h10
-rw-r--r--kabc/vcard/include/generated/TextValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/URIValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/UTCValue-generated.h10
-rw-r--r--kabc/vcard/include/generated/VCard-generated.h10
-rw-r--r--kabc/vcard/include/generated/VCardEntity-generated.h10
-rw-r--r--kabc/vcard/include/generated/Value-generated.h10
-rw-r--r--kabc/vcard/testread.cpp12
-rw-r--r--kabc/vcard/testwrite.cpp4
-rw-r--r--kabc/vcard21parser.cpp40
-rw-r--r--kabc/vcard21parser.h10
-rw-r--r--kabc/vcardformatimpl.cpp25
-rw-r--r--kabc/vcardformatplugin.cpp2
-rw-r--r--kabc/vcardparser/vcard.h4
-rw-r--r--kabc/vcardparser/vcardline.cpp6
-rw-r--r--kabc/vcardparser/vcardline.h8
-rw-r--r--kabc/vcardparser/vcardparser.cpp2
-rw-r--r--kabc/vcardparser/vcardtool.cpp2
-rw-r--r--kaddressbook/addresseditwidget.cpp55
-rw-r--r--kaddressbook/addresseditwidget.h18
-rw-r--r--kaddressbook/addresseeconfig.cpp6
-rw-r--r--kaddressbook/addresseeconfig.h6
-rw-r--r--kaddressbook/addresseeeditordialog.cpp9
-rw-r--r--kaddressbook/addresseeeditorwidget.cpp46
-rw-r--r--kaddressbook/addresseeeditorwidget.h12
-rw-r--r--kaddressbook/addresseeutil.cpp2
-rw-r--r--kaddressbook/addviewdialog.cpp16
-rw-r--r--kaddressbook/addviewdialog.h10
-rw-r--r--kaddressbook/details/detailsviewcontainer.cpp19
-rw-r--r--kaddressbook/details/detailsviewcontainer.h8
-rw-r--r--kaddressbook/details/look_basic.cpp6
-rw-r--r--kaddressbook/details/look_basic.h4
-rw-r--r--kaddressbook/details/look_details.cpp12
-rw-r--r--kaddressbook/details/look_details.h4
-rw-r--r--kaddressbook/details/look_html.cpp6
-rw-r--r--kaddressbook/emaileditwidget.cpp16
-rw-r--r--kaddressbook/emaileditwidget.h10
-rw-r--r--kaddressbook/extensionmanager.cpp14
-rw-r--r--kaddressbook/extensionmanager.h10
-rw-r--r--kaddressbook/extensionwidget.cpp5
-rw-r--r--kaddressbook/extensionwidget.h4
-rw-r--r--kaddressbook/features/distributionlistwidget.cpp39
-rw-r--r--kaddressbook/features/distributionlistwidget.h13
-rw-r--r--kaddressbook/features/mergewidget.cpp14
-rw-r--r--kaddressbook/features/mergewidget.h2
-rw-r--r--kaddressbook/filter.cpp2
-rw-r--r--kaddressbook/filter.h4
-rw-r--r--kaddressbook/filtereditdialog.cpp38
-rw-r--r--kaddressbook/filtereditdialog.h9
-rw-r--r--kaddressbook/geowidget.cpp35
-rw-r--r--kaddressbook/geowidget.h4
-rw-r--r--kaddressbook/imagewidget.cpp32
-rw-r--r--kaddressbook/imagewidget.h3
-rw-r--r--kaddressbook/incsearchwidget.cpp14
-rw-r--r--kaddressbook/jumpbuttonbar.cpp13
-rw-r--r--kaddressbook/jumpbuttonbar.h11
-rw-r--r--kaddressbook/kabcore.cpp146
-rw-r--r--kaddressbook/kabcore.h40
-rw-r--r--kaddressbook/kabprefs.cpp4
-rw-r--r--kaddressbook/kabprefs.h8
-rw-r--r--kaddressbook/kaddressbook.pro46
-rw-r--r--kaddressbook/kaddressbookE.pro6
-rw-r--r--kaddressbook/kaddressbookmain.cpp22
-rw-r--r--kaddressbook/kaddressbookmain.h14
-rw-r--r--kaddressbook/kaddressbookview.cpp8
-rw-r--r--kaddressbook/kaddressbookview.h12
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.cpp36
-rw-r--r--kaddressbook/kcmconfigs/addresseewidget.h8
-rw-r--r--kaddressbook/kcmconfigs/extensionconfigdialog.cpp11
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp59
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.h6
-rw-r--r--kaddressbook/kcmconfigs/kcmkabconfig.cpp8
-rw-r--r--kaddressbook/keywidget.cpp28
-rw-r--r--kaddressbook/mainembedded.cpp5
-rw-r--r--kaddressbook/nameeditdialog.cpp12
-rw-r--r--kaddressbook/old_mainwindow.cpp12
-rw-r--r--kaddressbook/phoneeditwidget.cpp60
-rw-r--r--kaddressbook/phoneeditwidget.h24
-rw-r--r--kaddressbook/secrecywidget.cpp8
-rw-r--r--kaddressbook/undo.cpp4
-rw-r--r--kaddressbook/undo.h4
-rw-r--r--kaddressbook/undocmds.cpp2
-rw-r--r--kaddressbook/viewconfigurefieldspage.cpp54
-rw-r--r--kaddressbook/viewconfigurefieldspage.h8
-rw-r--r--kaddressbook/viewconfigurefilterpage.cpp15
-rw-r--r--kaddressbook/viewconfigurefilterpage.h4
-rw-r--r--kaddressbook/viewconfigurewidget.cpp19
-rw-r--r--kaddressbook/viewconfigurewidget.h4
-rw-r--r--kaddressbook/viewmanager.cpp30
-rw-r--r--kaddressbook/viewmanager.h12
-rw-r--r--kaddressbook/views/cardview.cpp114
-rw-r--r--kaddressbook/views/cardview.h14
-rw-r--r--kaddressbook/views/colorlistbox.cpp25
-rw-r--r--kaddressbook/views/colorlistbox.h15
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp57
-rw-r--r--kaddressbook/views/configurecardviewdialog.h6
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp35
-rw-r--r--kaddressbook/views/configuretableviewdialog.h6
-rw-r--r--kaddressbook/views/contactlistview.cpp32
-rw-r--r--kaddressbook/views/contactlistview.h6
-rw-r--r--kaddressbook/views/kaddressbookcardview.cpp19
-rw-r--r--kaddressbook/views/kaddressbookcardview.h3
-rw-r--r--kaddressbook/views/kaddressbookiconview.cpp60
-rw-r--r--kaddressbook/views/kaddressbookiconview.h29
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp56
-rw-r--r--kaddressbook/views/kaddressbooktableview.h18
-rw-r--r--kaddressbook/xxport/csv_xxport.cpp14
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp66
-rw-r--r--kaddressbook/xxport/csvimportdialog.h12
-rw-r--r--kaddressbook/xxport/kde2_xxport.cpp4
-rw-r--r--kaddressbook/xxport/vcard_xxport.cpp20
-rw-r--r--kaddressbook/xxportmanager.cpp17
-rw-r--r--kaddressbook/xxportmanager.h4
-rw-r--r--kaddressbook/xxportobject.cpp4
-rw-r--r--kaddressbook/xxportselectdialog.cpp59
-rw-r--r--kaddressbook/xxportselectdialog.h12
-rw-r--r--kalarmd/alarmdialog.cpp26
-rw-r--r--kalarmd/alarmdialog.h2
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp16
-rw-r--r--kalarmd/simplealarmdaemonimpl.h3
-rw-r--r--kdepim-desktop.pro4
-rw-r--r--kmicromail/accountitem.cpp128
-rw-r--r--kmicromail/accountitem.h63
-rw-r--r--kmicromail/accountview.cpp30
-rw-r--r--kmicromail/accountview.h22
-rw-r--r--kmicromail/composemail.cpp14
-rw-r--r--kmicromail/composemail.h6
-rw-r--r--kmicromail/editaccounts.cpp40
-rw-r--r--kmicromail/editaccounts.h18
-rw-r--r--kmicromail/kmicromail.pro10
-rw-r--r--kmicromail/kmicromailE.pro2
-rw-r--r--kmicromail/koprefs.cpp2
-rw-r--r--kmicromail/koprefsdialog.cpp149
-rw-r--r--kmicromail/koprefsdialog.h12
-rw-r--r--kmicromail/libetpan/libetpan.pro2
-rw-r--r--kmicromail/libetpan/libetpanE.pro2
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp30
-rw-r--r--kmicromail/libmailwrapper/abstractmail.h12
-rw-r--r--kmicromail/libmailwrapper/generatemail.cpp6
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.cpp14
-rw-r--r--kmicromail/libmailwrapper/genericwrapper.h6
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp28
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.h14
-rw-r--r--kmicromail/libmailwrapper/libmailwrapper.pro8
-rw-r--r--kmicromail/libmailwrapper/logindialog.cpp2
-rw-r--r--kmicromail/libmailwrapper/logindialog.h2
-rw-r--r--kmicromail/libmailwrapper/mailtypes.cpp10
-rw-r--r--kmicromail/libmailwrapper/mailtypes.h14
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.cpp14
-rw-r--r--kmicromail/libmailwrapper/mailwrapper.h6
-rw-r--r--kmicromail/libmailwrapper/mboxwrapper.cpp14
-rw-r--r--kmicromail/libmailwrapper/mboxwrapper.h10
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.cpp12
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.h8
-rw-r--r--kmicromail/libmailwrapper/nntpwrapper.cpp12
-rw-r--r--kmicromail/libmailwrapper/nntpwrapper.h6
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp20
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.h8
-rw-r--r--kmicromail/libmailwrapper/sendmailprogress.cpp2
-rw-r--r--kmicromail/libmailwrapper/settings.cpp10
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp6
-rw-r--r--kmicromail/mailistviewitem.cpp4
-rw-r--r--kmicromail/mailistviewitem.h2
-rw-r--r--kmicromail/main.cpp5
-rw-r--r--kmicromail/mainwindow.cpp74
-rw-r--r--kmicromail/mainwindow.h26
-rw-r--r--kmicromail/nntpgroups.cpp16
-rw-r--r--kmicromail/nntpgroups.h2
-rw-r--r--kmicromail/nntpgroupsdlg.cpp4
-rw-r--r--kmicromail/opiemail.cpp47
-rw-r--r--kmicromail/opiemail.h17
-rw-r--r--kmicromail/qpe/qdialog.h2
-rw-r--r--kmicromail/qpe/qdialog_hacked.cpp6
-rw-r--r--kmicromail/selectsmtp.cpp4
-rw-r--r--kmicromail/selectsmtp.h2
-rw-r--r--kmicromail/selectstore.h2
-rw-r--r--kmicromail/settingsdialog.cpp6
-rw-r--r--kmicromail/settingsdialog.h2
-rw-r--r--kmicromail/statuswidget.cpp4
-rw-r--r--kmicromail/statuswidget.h2
-rw-r--r--kmicromail/viewmail.cpp47
-rw-r--r--kmicromail/viewmail.h26
-rw-r--r--kmicromail/viewmailbase.cpp25
-rw-r--r--kmicromail/viewmailbase.h25
-rw-r--r--korganizer/calendarview.cpp148
-rw-r--r--korganizer/calendarview.h32
-rw-r--r--korganizer/calprintbase.cpp102
-rw-r--r--korganizer/calprinter.cpp23
-rw-r--r--korganizer/calprinter.h18
-rw-r--r--korganizer/calprintplugins.cpp4
-rw-r--r--korganizer/cellitem.cpp14
-rw-r--r--korganizer/cellitem.h4
-rw-r--r--korganizer/datenavigatorcontainer.cpp2
-rw-r--r--korganizer/datenavigatorcontainer.h5
-rw-r--r--korganizer/filteredit_base.cpp40
-rw-r--r--korganizer/filteredit_base.h42
-rw-r--r--korganizer/filtereditdialog.cpp11
-rw-r--r--korganizer/filtereditdialog.h6
-rw-r--r--korganizer/incomingdialog.cpp30
-rw-r--r--korganizer/incomingdialog.h10
-rw-r--r--korganizer/incomingdialog_base.cpp14
-rw-r--r--korganizer/incomingdialog_base.h22
-rw-r--r--korganizer/interfaces/korganizer/baseview.h8
-rw-r--r--korganizer/interfaces/korganizer/calendarviewbase.h4
-rw-r--r--korganizer/journalentry.cpp39
-rw-r--r--korganizer/journalentry.h9
-rw-r--r--korganizer/kdatenavigator.cpp20
-rw-r--r--korganizer/kdatenavigator.h11
-rw-r--r--korganizer/koagenda.cpp169
-rw-r--r--korganizer/koagenda.h43
-rw-r--r--korganizer/koagendaitem.cpp70
-rw-r--r--korganizer/koagendaitem.h17
-rw-r--r--korganizer/koagendaview.cpp78
-rw-r--r--korganizer/koagendaview.h52
-rw-r--r--korganizer/kocounterdialog.h2
-rw-r--r--korganizer/kodaymatrix.cpp47
-rw-r--r--korganizer/kodaymatrix.h14
-rw-r--r--korganizer/kodialogmanager.cpp8
-rw-r--r--korganizer/kodialogmanager.h4
-rw-r--r--korganizer/koeditordetails.cpp38
-rw-r--r--korganizer/koeditordetails.h12
-rw-r--r--korganizer/koeditorgeneral.cpp39
-rw-r--r--korganizer/koeditorgeneral.h21
-rw-r--r--korganizer/koeditorgeneralevent.cpp32
-rw-r--r--korganizer/koeditorgeneralevent.h12
-rw-r--r--korganizer/koeditorgeneraltodo.cpp39
-rw-r--r--korganizer/koeditorgeneraltodo.h16
-rw-r--r--korganizer/koeditorrecurrence.cpp94
-rw-r--r--korganizer/koeditorrecurrence.h30
-rw-r--r--korganizer/koeventeditor.cpp43
-rw-r--r--korganizer/koeventpopupmenu.cpp17
-rw-r--r--korganizer/koeventpopupmenu.h16
-rw-r--r--korganizer/koeventview.cpp4
-rw-r--r--korganizer/koeventview.h4
-rw-r--r--korganizer/koeventviewer.cpp37
-rw-r--r--korganizer/koeventviewer.h17
-rw-r--r--korganizer/koeventviewerdialog.cpp5
-rw-r--r--korganizer/koeventviewerdialog.h5
-rw-r--r--korganizer/kofilterview.cpp48
-rw-r--r--korganizer/kofilterview.h36
-rw-r--r--korganizer/koimportoldialog.cpp30
-rw-r--r--korganizer/koimportoldialog.h4
-rw-r--r--korganizer/koincidenceeditor.cpp10
-rw-r--r--korganizer/kojournalview.cpp36
-rw-r--r--korganizer/kojournalview.h15
-rw-r--r--korganizer/kolistview.cpp193
-rw-r--r--korganizer/kolistview.h42
-rw-r--r--korganizer/komonthview.cpp218
-rw-r--r--korganizer/komonthview.h57
-rw-r--r--korganizer/koprefs.cpp8
-rw-r--r--korganizer/koprefs.h11
-rw-r--r--korganizer/koprefsdialog.cpp138
-rw-r--r--korganizer/koprefsdialog.h12
-rw-r--r--korganizer/korganizer.pro57
-rw-r--r--korganizer/korganizerE.pro6
-rw-r--r--korganizer/kotimespanview.cpp20
-rw-r--r--korganizer/kotimespanview.h6
-rw-r--r--korganizer/kotodoeditor.cpp43
-rw-r--r--korganizer/kotodoview.cpp198
-rw-r--r--korganizer/kotodoview.h58
-rw-r--r--korganizer/kotodoviewitem.cpp42
-rw-r--r--korganizer/kotodoviewitem.h14
-rw-r--r--korganizer/koviewmanager.cpp8
-rw-r--r--korganizer/kowhatsnextview.cpp38
-rw-r--r--korganizer/kowhatsnextview.h20
-rw-r--r--korganizer/ktimeedit.cpp89
-rw-r--r--korganizer/ktimeedit.h7
-rw-r--r--korganizer/lineview.cpp2
-rw-r--r--korganizer/lineview.h8
-rw-r--r--korganizer/main.cpp10
-rw-r--r--korganizer/mainwindow.cpp316
-rw-r--r--korganizer/mainwindow.h68
-rw-r--r--korganizer/navigatorbar.cpp29
-rw-r--r--korganizer/navigatorbar.h7
-rw-r--r--korganizer/outgoingdialog.cpp28
-rw-r--r--korganizer/outgoingdialog.h10
-rw-r--r--korganizer/outgoingdialog_base.cpp18
-rw-r--r--korganizer/outgoingdialog_base.h22
-rw-r--r--korganizer/publishdialog.cpp18
-rw-r--r--korganizer/publishdialog.h4
-rw-r--r--korganizer/publishdialog_base.cpp27
-rw-r--r--korganizer/publishdialog_base.h28
-rw-r--r--korganizer/savetemplatedialog.cpp7
-rw-r--r--korganizer/searchdialog.cpp43
-rw-r--r--korganizer/searchdialog.h16
-rw-r--r--korganizer/statusdialog.cpp9
-rw-r--r--korganizer/timeline.cpp6
-rw-r--r--korganizer/timeline.h4
-rw-r--r--korganizer/timespanview.cpp22
-rw-r--r--korganizer/timespanview.h10
-rw-r--r--libetpan/libetpan.pro5
-rw-r--r--libetpan/libetpanE.pro2
-rw-r--r--libical/src/libical/libical.pro2
-rw-r--r--libical/src/libicalss/libicalss.pro2
-rw-r--r--libkcal/alarm.cpp10
-rw-r--r--libkcal/alarm.h12
-rw-r--r--libkcal/calendar.cpp66
-rw-r--r--libkcal/calendar.h40
-rw-r--r--libkcal/calendarlocal.cpp66
-rw-r--r--libkcal/calendarlocal.h28
-rw-r--r--libkcal/calfilter.cpp6
-rw-r--r--libkcal/calfilter.h10
-rw-r--r--libkcal/customproperties.cpp32
-rw-r--r--libkcal/customproperties.h22
-rw-r--r--libkcal/dndfactory.cpp9
-rw-r--r--libkcal/dndfactory.h2
-rw-r--r--libkcal/dndfactory_dummy.h2
-rw-r--r--libkcal/dummyscheduler.cpp16
-rw-r--r--libkcal/dummyscheduler.h4
-rw-r--r--libkcal/event.cpp2
-rw-r--r--libkcal/event.h4
-rw-r--r--libkcal/filestorage.cpp2
-rw-r--r--libkcal/freebusy.cpp11
-rw-r--r--libkcal/freebusy.h14
-rw-r--r--libkcal/icaldrag.cpp2
-rw-r--r--libkcal/icaldrag.h4
-rw-r--r--libkcal/icalformat.cpp32
-rw-r--r--libkcal/icalformat.h4
-rw-r--r--libkcal/icalformatimpl.cpp35
-rw-r--r--libkcal/icalformatimpl.h6
-rw-r--r--libkcal/imipscheduler.cpp6
-rw-r--r--libkcal/imipscheduler.h4
-rw-r--r--libkcal/incidence.cpp38
-rw-r--r--libkcal/incidence.h20
-rw-r--r--libkcal/incidencebase.cpp14
-rw-r--r--libkcal/incidencebase.h16
-rw-r--r--libkcal/journal.h4
-rw-r--r--libkcal/kincidenceformatter.cpp10
-rw-r--r--libkcal/libkcal.pro6
-rw-r--r--libkcal/libkcalE.pro2
-rw-r--r--libkcal/listbase.h24
-rw-r--r--libkcal/phoneformat.cpp23
-rw-r--r--libkcal/qtopiaformat.cpp8
-rw-r--r--libkcal/recurrence.cpp187
-rw-r--r--libkcal/recurrence.h26
-rw-r--r--libkcal/scheduler.cpp12
-rw-r--r--libkcal/scheduler.h4
-rw-r--r--libkcal/sharpformat.cpp48
-rw-r--r--libkcal/todo.cpp2
-rw-r--r--libkcal/todo.h4
-rw-r--r--libkcal/vcaldrag.cpp2
-rw-r--r--libkcal/vcaldrag.h4
-rw-r--r--libkcal/vcalformat.cpp52
-rw-r--r--libkcal/vcalformat.h13
-rw-r--r--libkdepim/categoryeditdialog.cpp19
-rw-r--r--libkdepim/categoryeditdialog.h18
-rw-r--r--libkdepim/categoryeditdialog_base.cpp20
-rw-r--r--libkdepim/categoryeditdialog_base.h26
-rw-r--r--libkdepim/categoryselectdialog.cpp43
-rw-r--r--libkdepim/categoryselectdialog.h10
-rw-r--r--libkdepim/categoryselectdialog_base.cpp19
-rw-r--r--libkdepim/categoryselectdialog_base.h26
-rw-r--r--libkdepim/externalapphandler.cpp30
-rw-r--r--libkdepim/externalapphandler.h15
-rw-r--r--libkdepim/kcmconfigs/kcmkdepimconfig.cpp4
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp53
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.h6
-rw-r--r--libkdepim/kdateedit.cpp40
-rw-r--r--libkdepim/kdateedit.h11
-rw-r--r--libkdepim/kdatepicker.cpp8
-rw-r--r--libkdepim/kdatepicker.h7
-rw-r--r--libkdepim/kpimglobalprefs.cpp10
-rw-r--r--libkdepim/kpimglobalprefs.h4
-rw-r--r--libkdepim/kprefsdialog.cpp19
-rw-r--r--libkdepim/kprefsdialog.h12
-rw-r--r--libkdepim/kprefswidget.cpp19
-rw-r--r--libkdepim/kprefswidget.h12
-rw-r--r--libkdepim/ksyncmanager.cpp97
-rw-r--r--libkdepim/ksyncmanager.h26
-rw-r--r--libkdepim/ksyncprefsdialog.cpp130
-rw-r--r--libkdepim/ksyncprefsdialog.h30
-rw-r--r--libkdepim/ksyncprofile.h2
-rw-r--r--libkdepim/libkdepim.pro4
-rw-r--r--libkdepim/libkdepimE.pro6
-rwxr-xr-xlibkdepim/ol_access.cpp52
-rwxr-xr-xlibkdepim/ol_access.h4
-rw-r--r--libkdepim/phoneaccess.cpp15
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp194
-rw-r--r--microkde/KDGanttMinimizeSplitter.h35
-rwxr-xr-xmicrokde/fncolordialog.h16
-rw-r--r--microkde/kapplication.cpp33
-rw-r--r--microkde/kcolorbutton.cpp3
-rw-r--r--microkde/kconfig.cpp30
-rw-r--r--microkde/kconfig.h6
-rw-r--r--microkde/kdatepickernew.cpp2
-rw-r--r--microkde/kdatetbl.cpp99
-rw-r--r--microkde/kdatetbl.h20
-rw-r--r--microkde/kdebug.h4
-rw-r--r--microkde/kdecore/kcatalogue.cpp4
-rw-r--r--microkde/kdecore/kconfigbase.h4
-rw-r--r--microkde/kdecore/klibloader.cpp29
-rw-r--r--microkde/kdecore/klibloader.h10
-rw-r--r--microkde/kdecore/klocale.cpp23
-rw-r--r--microkde/kdecore/klocale.h4
-rw-r--r--microkde/kdecore/kmdcodec.cpp139
-rw-r--r--microkde/kdecore/kmdcodec.h38
-rw-r--r--microkde/kdecore/kprefs.cpp16
-rw-r--r--microkde/kdecore/kprefs.h10
-rw-r--r--microkde/kdecore/kshortcut.h8
-rw-r--r--microkde/kdecore/kstandarddirs.cpp24
-rw-r--r--microkde/kdecore/kstandarddirs.h10
-rw-r--r--microkde/kdeui/kaction.cpp75
-rw-r--r--microkde/kdeui/kaction.h26
-rw-r--r--microkde/kdeui/kactionclasses.cpp111
-rw-r--r--microkde/kdeui/kactionclasses.h51
-rw-r--r--microkde/kdeui/kactioncollection.cpp50
-rw-r--r--microkde/kdeui/kactioncollection.h4
-rw-r--r--microkde/kdeui/kbuttonbox.cpp18
-rw-r--r--microkde/kdeui/kbuttonbox.h4
-rw-r--r--microkde/kdeui/kguiitem.cpp14
-rw-r--r--microkde/kdeui/kguiitem.h12
-rw-r--r--microkde/kdeui/kjanuswidget.cpp140
-rw-r--r--microkde/kdeui/kjanuswidget.h56
-rw-r--r--microkde/kdeui/klistbox.cpp56
-rw-r--r--microkde/kdeui/klistbox.h25
-rw-r--r--microkde/kdeui/klistview.cpp337
-rw-r--r--microkde/kdeui/klistview.h121
-rw-r--r--microkde/kdeui/kmainwindow.cpp97
-rw-r--r--microkde/kdeui/kmainwindow.h19
-rw-r--r--microkde/kdeui/knuminput.cpp61
-rw-r--r--microkde/kdeui/knuminput.h15
-rw-r--r--microkde/kdeui/kpopupmenu.cpp5
-rw-r--r--microkde/kdeui/kpopupmenu.h6
-rw-r--r--microkde/kdeui/kseparator.cpp18
-rw-r--r--microkde/kdeui/kseparator.h8
-rw-r--r--microkde/kdeui/ksqueezedtextlabel.cpp3
-rw-r--r--microkde/kdeui/ksqueezedtextlabel.h2
-rw-r--r--microkde/kdeui/kstdaction.cpp2
-rw-r--r--microkde/kdeui/ktoolbar.cpp185
-rw-r--r--microkde/kdeui/ktoolbar.h68
-rw-r--r--microkde/kdeui/ktoolbarbutton.cpp106
-rw-r--r--microkde/kdeui/ktoolbarbutton.h17
-rw-r--r--microkde/kdeui/ktoolbarhandler.cpp26
-rw-r--r--microkde/kdeui/ktoolbarhandler.h10
-rw-r--r--microkde/kdeui/kxmlguiclient.cpp12
-rw-r--r--microkde/kdeui/kxmlguiclient.h6
-rw-r--r--microkde/kdialog.cpp10
-rw-r--r--microkde/kdialog.h6
-rw-r--r--microkde/kdialogbase.cpp20
-rw-r--r--microkde/kdialogbase.h16
-rw-r--r--microkde/keditlistbox.cpp33
-rw-r--r--microkde/keditlistbox.h16
-rw-r--r--microkde/kfiledialog.cpp14
-rw-r--r--microkde/kfontdialog.cpp4
-rw-r--r--microkde/kglobal.cpp5
-rw-r--r--microkde/kglobalsettings.cpp1
-rw-r--r--microkde/kiconloader.cpp12
-rw-r--r--microkde/kiconloader.h4
-rw-r--r--microkde/kio/kfile/kurlrequester.cpp10
-rw-r--r--microkde/kio/kfile/kurlrequester.h4
-rw-r--r--microkde/kio/kio/kdirwatch.cpp12
-rw-r--r--microkde/kio/kio/kdirwatch_p.h10
-rw-r--r--microkde/klineedit.h2
-rw-r--r--microkde/klineeditdlg.h4
-rw-r--r--microkde/kresources/configdialog.cpp17
-rw-r--r--microkde/kresources/configpage.cpp38
-rw-r--r--microkde/kresources/configpage.h10
-rw-r--r--microkde/kresources/factory.cpp6
-rw-r--r--microkde/kresources/factory.h4
-rw-r--r--microkde/kresources/kcmkresources.cpp7
-rw-r--r--microkde/kresources/manager.h8
-rw-r--r--microkde/kresources/managerimpl.cpp10
-rw-r--r--microkde/kresources/managerimpl.h8
-rw-r--r--microkde/kresources/resource.h4
-rw-r--r--microkde/kresources/selectdialog.cpp22
-rw-r--r--microkde/kresources/selectdialog.h10
-rw-r--r--microkde/ksystemtray.cpp3
-rw-r--r--microkde/ksystemtray.h2
-rw-r--r--microkde/ktempfile.cpp4
-rw-r--r--microkde/ktempfile.h4
-rw-r--r--microkde/ktextedit.cpp16
-rw-r--r--microkde/ktextedit.h6
-rw-r--r--microkde/kurl.cpp30
-rw-r--r--microkde/kurl.h14
-rw-r--r--microkde/kutils/kcmultidialog.cpp16
-rw-r--r--microkde/kutils/kcmultidialog.h8
-rw-r--r--microkde/microkde.pro4
-rw-r--r--microkde/microkdeE.pro2
-rw-r--r--microkde/ofileselector_p.cpp2
-rw-r--r--microkde/ofileselector_p.h2
-rw-r--r--microkde/qlayoutengine_p.h8
-rw-r--r--pwmanager/libcrypt/cipher/cipher.pro2
-rw-r--r--pwmanager/libcrypt/error/error.pro4
-rw-r--r--pwmanager/libcrypt/mpi/mpi.pro2
-rw-r--r--pwmanager/libcrypt/zlib/zlib.pro2
-rw-r--r--pwmanager/pwmanager/addentrywnd_emb.cpp19
-rw-r--r--pwmanager/pwmanager/addentrywnd_emb.h17
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.cpp6
-rw-r--r--pwmanager/pwmanager/addentrywndimpl.h10
-rw-r--r--pwmanager/pwmanager/binentrygen.h2
-rw-r--r--pwmanager/pwmanager/commentbox.cpp12
-rw-r--r--pwmanager/pwmanager/commentbox.h8
-rw-r--r--pwmanager/pwmanager/csv.cpp36
-rw-r--r--pwmanager/pwmanager/csv.h6
-rw-r--r--pwmanager/pwmanager/editcategory.cpp8
-rw-r--r--pwmanager/pwmanager/editcategory.h15
-rw-r--r--pwmanager/pwmanager/findwnd_emb.cpp8
-rw-r--r--pwmanager/pwmanager/findwndimpl.cpp4
-rw-r--r--pwmanager/pwmanager/genpasswd.cpp4
-rw-r--r--pwmanager/pwmanager/genpasswd.h4
-rw-r--r--pwmanager/pwmanager/getkeycardwnd.cpp13
-rw-r--r--pwmanager/pwmanager/getkeycardwnd.h12
-rw-r--r--pwmanager/pwmanager/getmasterpwwnd_emb.cpp9
-rw-r--r--pwmanager/pwmanager/getmasterpwwndimpl.cpp4
-rw-r--r--pwmanager/pwmanager/globalstuff.h4
-rw-r--r--pwmanager/pwmanager/htmlgen.cpp2
-rw-r--r--pwmanager/pwmanager/ipc.cpp12
-rw-r--r--pwmanager/pwmanager/ipc.h4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp4
-rw-r--r--pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp27
-rw-r--r--pwmanager/pwmanager/listobjselectwnd.cpp19
-rw-r--r--pwmanager/pwmanager/listobjselectwnd.h18
-rw-r--r--pwmanager/pwmanager/listviewpwm.cpp17
-rw-r--r--pwmanager/pwmanager/listviewpwm.h7
-rw-r--r--pwmanager/pwmanager/main.cpp1
-rw-r--r--pwmanager/pwmanager/printtext.h4
-rw-r--r--pwmanager/pwmanager/pwgenwnd_emb.cpp15
-rw-r--r--pwmanager/pwmanager/pwgenwndimpl.cpp2
-rw-r--r--pwmanager/pwmanager/pwgenwndimpl.h2
-rw-r--r--pwmanager/pwmanager/pwm.cpp68
-rw-r--r--pwmanager/pwmanager/pwm.h11
-rw-r--r--pwmanager/pwmanager/pwmanager.pro6
-rw-r--r--pwmanager/pwmanager/pwmanagerE.pro4
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp26
-rw-r--r--pwmanager/pwmanager/pwmdoc.h4
-rw-r--r--pwmanager/pwmanager/pwmdocui.cpp4
-rw-r--r--pwmanager/pwmanager/pwminit.cpp21
-rw-r--r--pwmanager/pwmanager/pwminit.h11
-rw-r--r--pwmanager/pwmanager/pwmprefs.h6
-rw-r--r--pwmanager/pwmanager/pwmtray.cpp23
-rw-r--r--pwmanager/pwmanager/pwmtray.h36
-rw-r--r--pwmanager/pwmanager/pwmview.cpp48
-rw-r--r--pwmanager/pwmanager/pwmview.h18
-rw-r--r--pwmanager/pwmanager/pwmviewstyle.cpp26
-rw-r--r--pwmanager/pwmanager/pwmviewstyle.h16
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.cpp15
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_0.h12
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.cpp30
-rw-r--r--pwmanager/pwmanager/pwmviewstyle_1.h18
-rw-r--r--pwmanager/pwmanager/randomizer.cpp6
-rw-r--r--pwmanager/pwmanager/rencatwnd.cpp13
-rw-r--r--pwmanager/pwmanager/rencatwnd.h12
-rw-r--r--pwmanager/pwmanager/serializer.cpp18
-rw-r--r--pwmanager/pwmanager/serializer.h8
-rw-r--r--pwmanager/pwmanager/setmasterpwwnd_emb.cpp15
-rw-r--r--pwmanager/pwmanager/setmasterpwwnd_emb.h2
-rw-r--r--pwmanager/pwmanager/setmasterpwwndimpl.cpp4
-rw-r--r--pwmanager/pwmanager/waitwnd.cpp12
-rw-r--r--pwmanager/pwmanager/waitwnd.h9
-rw-r--r--qtcompat/qptrlist.h4
-rw-r--r--qtcompat/qptrstack.h4
708 files changed, 7875 insertions, 6766 deletions
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 594d47d..0000000
--- a/Makefile
+++ b/dev/null
@@ -1,385 +0,0 @@
1export KDEPIMDIR = $(shell pwd)
2
3export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version)
4
5ifeq ($(PLATFORM) , zaurus)
6 BUILD_NO_LDAP_PLUGIN=1
7endif
8
9ifneq ($(PLATFORM) , zaurus)
10 BUILD_NO_SHARP_PLUGIN=1
11endif
12
13#opie plugin is deprecated. The qtopia plugin handles the task from now on.
14BUILD_NO_OPIE_PLUGIN=1
15
16SUBDIRS_MICROKDE = \
17 libical/src/libical \
18 libical/src/libicalss \
19 qtcompat \
20 microkde \
21 libkcal \
22 libkdepim \
23 kabc \
24 kabc/formats/binary \
25 kabc/plugins/file \
26 kabc/plugins/dir \
27 korganizer \
28 kalarmd \
29 kaddressbook
30
31SUBDIRS_QTOPIA_PLUGIN = \
32 kabc/plugins/qtopia
33
34SUBDIRS_OPIE_PLUGIN = \
35 kabc/plugins/opie
36
37SUBDIRS_SHARP_PLUGIN = \
38 kabc/plugins/sharpdtm
39
40SUBDIRS_LDAP_PLUGIN = \
41 kabc/plugins/ldap
42
43SUBDIRS_MICROMAIL = \
44 libetpan \
45 kmicromail/libmailwrapper \
46 kmicromail
47
48SUBDIRS_GAMMU = \
49 gammu/emb/common \
50 gammu/emb/gammu
51
52SUBDIRS_PWMANAGER = \
53 pwmanager/libcrypt/mpi \
54 pwmanager/libcrypt/error \
55 pwmanager/libcrypt/cipher \
56 pwmanager/libcrypt/zlib \
57 pwmanager/pwmanager
58
59SUBDIRS = \
60 $(SUBDIRS_MICROKDE) \
61 $(SUBDIRS_QTOPIA_PLUGIN) \
62 $(SUBDIRS_OPIE_PLUGIN) \
63 $(SUBDIRS_SHARP_PLUGIN) \
64 $(SUBDIRS_LDAP_PLUGIN) \
65 $(SUBDIRS_MICROMAIL) \
66 $(SUBDIRS_GAMMU) \
67 $(SUBDIRS_PWMANAGER)
68
69
70all: build_microkde \
71 build_qtopia_plugin \
72 build_opie_plugin \
73 build_sharp_plugin \
74 build_ldap_plugin \
75 build_micromail \
76 build_gammu \
77 build_pwmanager
78
79
80build_microkde: variable_test tmake
81 for i in $(SUBDIRS_MICROKDE); do pushd $$i; \
82 make -f Makefile$(PLATFORM) || exit 1; popd; \
83 done
84
85build_qtopia_plugin: build_microkde
86 ifdef BUILD_NO_QTOPIA_PLUGIN
87 @echo == qtopia plugin not build.
88 else
89 for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \
90 make -f Makefile$(PLATFORM) || exit 1; popd; \
91 done
92 endif
93
94build_opie_plugin: build_microkde
95 ifdef BUILD_NO_OPIE_PLUGIN
96 @echo == opie plugin not build.
97 else
98 for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \
99 make -f Makefile$(PLATFORM) || exit 1; popd; \
100 done
101 endif
102
103build_sharp_plugin: build_microkde
104 ifdef BUILD_NO_SHARP_PLUGIN
105 @echo == ldap plugin not build.
106 else
107 for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \
108 make -f Makefile$(PLATFORM) || exit 1; popd; \
109 done
110 endif
111
112build_ldap_plugin: build_microkde
113 ifdef BUILD_NO_LDAP_PLUGIN
114 @echo == ldap plugin not build.
115 else
116 for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \
117 make -f Makefile$(PLATFORM) || exit 1; popd; \
118 done
119 endif
120
121
122build_micromail: build_microkde
123 ifdef BUILD_NO_MICROMAIL
124 @echo == kmicromail not build.
125 else
126 for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \
127 make -f Makefile$(PLATFORM) || exit 1; popd; \
128 done
129 endif
130
131build_gammu: variable_test tmake
132 ifdef BUILD_NO_GAMMU
133 @echo == gammu not build.
134 else
135 for i in $(SUBDIRS_GAMMU); do pushd $$i; \
136 make -f Makefile$(PLATFORM) || exit 1; popd; \
137 done
138 endif
139
140build_pwmanager: build_microkde
141 ifdef BUILD_NO_PWMANAGER
142 @echo == pwmanager not build.
143 else
144 for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \
145 make -f Makefile$(PLATFORM) || exit 1; popd; \
146 done
147 endif
148
149
150variable_info:
151 @echo --------------------------------------
152 @echo KDEPIM buildsystem, variableinfo...
153 @echo KDEPIMDIR=$(KDEPIMDIR)
154 @echo QTDIR=$(QTDIR)
155 @echo QPEDIR=$(QPEDIR)
156 @echo OPIEDIR=$(OPIEDIR)
157 @echo PLATFORM=$(PLATFORM)
158 @echo RELEASE_DEBUG=$(RELEASE_DEBUG)
159 @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL)
160 @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN)
161 @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN)
162 @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN)
163 @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN)
164 ifndef BUILD_NO_SHARP_PLUGIN
165 @echo SHARPDTMSDK=$(SHARPDTMSDK)
166 endif
167 @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU)
168 @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER)
169 @echo --------------------------------------
170
171variable_test: variable_info
172 @echo KDEPIM buildsystem, variablecheck...
173 ifndef KDEPIMDIR
174 @echo KDEPIMDIR is not defined.
175 $(error KDEPIMDIR is not defined)
176 endif
177 ifndef PLATFORM
178 @echo PLATFORM is not defined.
179 $(error PLATFORM is not defined)
180 endif
181 ifdef BUILD_NO_LDAP_PLUGIN
182 @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN)
183 endif
184 ifdef BUILD_NO_OPIE_PLUGIN
185 @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN)
186 endif
187 ifdef BUILD_NO_QTOPIA_PLUGIN
188 @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN)
189 endif
190 ifdef BUILD_NO_MICROMAIL
191 @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL)
192 endif
193 ifdef BUILD_NO_SHARP_PLUGIN
194 @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN)
195 else
196 ifndef SHARPDTMSDK
197 @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK)
198 $(error SHARPDTMSDK is not defined)
199 endif
200 endif
201 ifdef BUILD_NO_GAMMU
202 @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU)
203 endif
204 ifdef BUILD_NO_PWMANAGER
205 @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER)
206 endif
207 @echo --------------------------------------
208
209
210objects:
211 for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done
212 for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done
213 mkdir -p libical/lib/$(PLATFORM)
214 mkdir -p dest
215 mkdir -p dest$(LIBICAL_PATH)
216 mkdir -p pwmanager/libcrypt/$(PLATFORM)
217
218clean:
219 rm -rf libical/lib/$(PLATFORM)/*;
220 rm -rf pwmanager/libcrypt/$(PLATFORM)/*;
221 for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\
222 rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \
223 done
224
225pac:
226 rm -f $(QPEDIR)/lib/libmicro*
227 rm -f $(QPEDIR)/plugins/applets/libkopi*
228 make
229 make install
230 make dist
231install:
232
233 cd bin/kdepim; make install
234 cp -r Pim $(QPEDIR)/apps
235 cp db2file/db2file $(QPEDIR)/bin/db2file
236 chmod ugo+x $(QPEDIR)/bin/db2file
237 cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop
238 cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop
239 cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop
240 cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop
241
242dist:
243 @echo Dont forget to do "make install" before "make dist"
244 rm -f *arm.ipk
245 rm -f *ipk.zip
246 rm -rf ../kdepimpi_$(KDEPIM_VERSION)/*
247 rm -f *~
248 cd ..;mkdir -p kdepimpi_$(KDEPIM_VERSION)
249 cd ../kdepimpi_$(KDEPIM_VERSION);mkdir -p ipk
250 cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim
251 mkipks kmicrokdelibs.control
252 mkipks korganizer.control
253 mkipks kaddressbook.control
254 ifndef BUILD_NO_MICROMAIL
255 mkipks kopiemail.control
256 endif
257 ifndef BUILD_NO_SHARP_PLUGIN
258 mkipks ksharpPIM-DTMaccess.control
259 endif
260 mkipks korganizer-alarm.control
261 ifndef BUILD_NO_GAMMU
262 mkipks kmobilephoneaccess.control
263 endif
264 ifndef BUILD_NO_PWMANAGER
265 mkipks pwmanager.control
266 endif
267 mkipks pimTABicon.control
268 zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt
269 mv *.ipk ../kdepimpi_$(KDEPIM_VERSION)/ipk/
270 mv *for_SharpRom.ipk.zip ../kdepimpi_$(KDEPIM_VERSION)/
271 mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../kdepimpi_$(KDEPIM_VERSION)/
272
273tmake: objects \
274 qtcompat/Makefile$(PLATFORM) \
275 microkde/Makefile$(PLATFORM) \
276 libkcal/Makefile$(PLATFORM) \
277 libkdepim/Makefile$(PLATFORM) \
278 korganizer/Makefile$(PLATFORM) \
279 kalarmd/Makefile$(PLATFORM) \
280 libical/src/libical/Makefile$(PLATFORM) \
281 libical/src/libicalss/Makefile$(PLATFORM) \
282 kabc/Makefile$(PLATFORM) \
283 kabc/formats/binary/Makefile$(PLATFORM) \
284 kabc/plugins/file/Makefile$(PLATFORM) \
285 kabc/plugins/dir/Makefile$(PLATFORM) \
286 kabc/plugins/ldap/Makefile$(PLATFORM) \
287 kabc/plugins/opie/Makefile$(PLATFORM) \
288 kabc/plugins/qtopia/Makefile$(PLATFORM) \
289 kabc/plugins/sharpdtm/Makefile$(PLATFORM) \
290 kaddressbook/Makefile$(PLATFORM) \
291 kmicromail/Makefile$(PLATFORM) \
292 libetpan/Makefile$(PLATFORM) \
293 kmicromail/libmailwrapper/Makefile$(PLATFORM) \
294 gammu/emb/common/Makefile$(PLATFORM) \
295 gammu/emb/gammu/Makefile$(PLATFORM) \
296 pwmanager/pwmanager/Makefile$(PLATFORM) \
297 pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \
298 pwmanager/libcrypt/error/Makefile$(PLATFORM) \
299 pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \
300 pwmanager/libcrypt/zlib/Makefile$(PLATFORM)
301
302qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
303 cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM)
304
305microkde/Makefile$(PLATFORM): microkde/microkdeE.pro
306 cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM)
307
308libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro
309 cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM)
310
311
312libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro
313 cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM)
314
315kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro
316 cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM)
317
318korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro
319 cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM)
320
321libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro
322 cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM)
323
324libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro
325 cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM)
326
327kabc/Makefile$(PLATFORM): kabc/kabcE.pro
328 cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM)
329
330kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro
331 cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM)
332
333kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro
334 cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM)
335
336kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro
337 cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM)
338
339kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro
340 cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM)
341
342kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro
343 cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM)
344
345kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
346 cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM)
347
348kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro
349 cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM)
350
351kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
352 cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM)
353
354kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro
355 cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM)
356
357libetpan/Makefile$(PLATFORM): libetpan/libetpanE.pro
358 cd libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM)
359
360kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro
361 cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM)
362
363gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro
364 cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM)
365
366gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro
367 cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM)
368
369pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro
370 cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM)
371
372
373pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro
374 cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM)
375
376pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro
377 cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM)
378
379pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro
380 cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM)
381
382pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro
383 cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM)
384
385
diff --git a/gammu/emb/common/common.pro b/gammu/emb/common/common.pro
index af45382..65fd303 100644
--- a/gammu/emb/common/common.pro
+++ b/gammu/emb/common/common.pro
@@ -170,7 +170,7 @@ phone/obex/obexgen.c \
170phone/symbian/mroutgen.c 170phone/symbian/mroutgen.c
171 171
172DEFINES += DESKTOP_VERSION 172DEFINES += DESKTOP_VERSION
173TARGET = microgammu 173TARGET = xmicrogammu
174CONFIG = warn_off release console 174CONFIG = warn_off release console
175DESTDIR = ../../../bin 175DESTDIR = ../../../bin
176OBJECTS_DIR = obj/unix 176OBJECTS_DIR = obj/unix
@@ -192,3 +192,5 @@ HEADERS += device/serial/ser_w32.h \
192SOURCES += device/serial/ser_w32.c \ 192SOURCES += device/serial/ser_w32.c \
193 device/bluetoth/blue_w32.c 193 device/bluetoth/blue_w32.c
194} 194}
195#The following line was inserted by qt3to4
196QT += xml qt3support
diff --git a/gammu/emb/common/device/bluetoth/blue_w32.c b/gammu/emb/common/device/bluetoth/blue_w32.c
index a631c9f..8a367f4 100644
--- a/gammu/emb/common/device/bluetoth/blue_w32.c
+++ b/gammu/emb/common/device/bluetoth/blue_w32.c
@@ -88,7 +88,7 @@ static GSM_Error bluetooth_checkdevice(GSM_StateMachine *s, char *address, WSAPR
88 char addressAsString[1000]; 88 char addressAsString[1000];
89 DWORD bufferLength, addressSize; 89 DWORD bufferLength, addressSize;
90 WSAQUERYSET *pResults = (WSAQUERYSET*)&buffer; 90 WSAQUERYSET *pResults = (WSAQUERYSET*)&buffer;
91 HANDLE handle; 91 Qt::HANDLE handle;
92 GSM_Error error; 92 GSM_Error error;
93 93
94 memset(&querySet, 0, sizeof(querySet)); 94 memset(&querySet, 0, sizeof(querySet));
@@ -138,7 +138,7 @@ GSM_Error bluetooth_findchannel(GSM_StateMachine *s)
138 WSADATA wsaData; 138 WSADATA wsaData;
139 int i, protocolInfoSize, result; 139 int i, protocolInfoSize, result;
140 WSAPROTOCOL_INFO protocolInfo; 140 WSAPROTOCOL_INFO protocolInfo;
141 HANDLE handle; 141 Qt::HANDLE handle;
142 DWORD flags; 142 DWORD flags;
143 WSAQUERYSET querySet; 143 WSAQUERYSET querySet;
144 BYTE buffer[2000]; 144 BYTE buffer[2000];
diff --git a/gammu/emb/common/device/bluetoth/blue_w32.h b/gammu/emb/common/device/bluetoth/blue_w32.h
index e457c92..409f4b1 100644
--- a/gammu/emb/common/device/bluetoth/blue_w32.h
+++ b/gammu/emb/common/device/bluetoth/blue_w32.h
@@ -119,7 +119,7 @@ WSALookupServiceBeginA(
119 119
120WINSOCK_API_LINKAGE INT WSAAPI 120WINSOCK_API_LINKAGE INT WSAAPI
121WSALookupServiceNextA( 121WSALookupServiceNextA(
122 IN HANDLE hLookup, 122 IN Qt::HANDLE hLookup,
123 IN DWORD dwControlFlags, 123 IN DWORD dwControlFlags,
124 IN OUT LPDWORD lpdwBufferLength, 124 IN OUT LPDWORD lpdwBufferLength,
125 OUT LPWSAQUERYSETA lpqsResults 125 OUT LPWSAQUERYSETA lpqsResults
@@ -127,7 +127,7 @@ WSALookupServiceNextA(
127 127
128#define WSALookupServiceNext WSALookupServiceNextA 128#define WSALookupServiceNext WSALookupServiceNextA
129 129
130WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(IN HANDLE hLookup); 130WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(IN Qt::HANDLE hLookup);
131 131
132#define MAX_PROTOCOL_CHAIN 7 132#define MAX_PROTOCOL_CHAIN 7
133 133
diff --git a/gammu/emb/common/device/serial/ser_w32.h b/gammu/emb/common/device/serial/ser_w32.h
index d226f32..d1aa37a 100644
--- a/gammu/emb/common/device/serial/ser_w32.h
+++ b/gammu/emb/common/device/serial/ser_w32.h
@@ -6,7 +6,7 @@
6#include <windows.h> 6#include <windows.h>
7 7
8typedef struct { 8typedef struct {
9 HANDLE hPhone; 9 Qt::HANDLE hPhone;
10 DCB old_settings; 10 DCB old_settings;
11 OVERLAPPED osWrite,osRead; 11 OVERLAPPED osWrite,osRead;
12} GSM_Device_SerialData; 12} GSM_Device_SerialData;
diff --git a/gammu/emb/gammu/gammu.pro b/gammu/emb/gammu/gammu.pro
index c8aa3f0..e8ccac3 100644
--- a/gammu/emb/gammu/gammu.pro
+++ b/gammu/emb/gammu/gammu.pro
@@ -47,7 +47,7 @@ SOURCES += gammu.c \
47 depend/nokia/dct3trac/wmx-util.c \ 47 depend/nokia/dct3trac/wmx-util.c \
48 depend/nokia/dct3trac/wmx.c 48 depend/nokia/dct3trac/wmx.c
49unix : { 49unix : {
50LIBS += ../../../bin/libmicrogammu.so /usr/lib/libpthread.so 50LIBS += ../../../bin/libxmicrogammu.so -lpthread
51# bluetooth disabled for now 51# bluetooth disabled for now
52#/usr/lib/libbluetooth.so /usr/lib/libsdp.so 52#/usr/lib/libbluetooth.so /usr/lib/libsdp.so
53OBJECTS_DIR = obj/unix 53OBJECTS_DIR = obj/unix
@@ -63,3 +63,5 @@ OBJECTS_DIR = obj/win
63} 63}
64DESTDIR = ../../../bin 64DESTDIR = ../../../bin
65TARGET = kammu 65TARGET = kammu
66#The following line was inserted by qt3to4
67QT += xml qt3support
diff --git a/kabc/address.h b/kabc/address.h
index 38ad20b..41794fe 100644
--- a/kabc/address.h
+++ b/kabc/address.h
@@ -32,7 +32,7 @@ $Id$
32#include <qstring.h> 32#include <qstring.h>
33#include <qregexp.h> 33#include <qregexp.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qvaluelist.h> 35#include <q3valuelist.h>
36 36
37// template tags for address formatting localization 37// template tags for address formatting localization
38#define KABC_FMTTAG_realname QString("%n") 38#define KABC_FMTTAG_realname QString("%n")
@@ -68,8 +68,8 @@ class Address
68 /** 68 /**
69 List of addresses. 69 List of addresses.
70 */ 70 */
71 typedef QValueList<Address> List; 71 typedef Q3ValueList<Address> List;
72 typedef QValueList<int> TypeList; 72 typedef Q3ValueList<int> TypeList;
73 73
74 /** 74 /**
75 Address types: 75 Address types:
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index fe59fcb..c700897 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -37,8 +37,8 @@ $Id$
37 37
38#include "errorhandler.h" 38#include "errorhandler.h"
39*/ 39*/
40#include <qptrlist.h> 40#include <q3ptrlist.h>
41#include <qtextstream.h> 41#include <q3textstream.h>
42#include <qfile.h> 42#include <qfile.h>
43#include <qregexp.h> 43#include <qregexp.h>
44 44
@@ -244,7 +244,7 @@ void AddressBook::init(const QString &config, const QString &family )
244 blockLSEchange = false; 244 blockLSEchange = false;
245 d = new AddressBookData; 245 d = new AddressBookData;
246 QString fami = family; 246 QString fami = family;
247 if (config != 0) { 247 if (!config.isEmpty()) {
248 if ( family == "syncContact" ) { 248 if ( family == "syncContact" ) {
249 qDebug("creating sync config "); 249 qDebug("creating sync config ");
250 fami = "contact"; 250 fami = "contact";
@@ -381,13 +381,13 @@ void AddressBook::export2File( QString fileName, QString resourceName )
381{ 381{
382 382
383 QFile outFile( fileName ); 383 QFile outFile( fileName );
384 if ( !outFile.open( IO_WriteOnly ) ) { 384 if ( !outFile.open( QIODevice::WriteOnly ) ) {
385 QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); 385 QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" );
386 KMessageBox::error( 0, text.arg( fileName ) ); 386 KMessageBox::error( 0, text.arg( fileName ) );
387 return ; 387 return ;
388 } 388 }
389 QTextStream t( &outFile ); 389 Q3TextStream t( &outFile );
390 t.setEncoding( QTextStream::UnicodeUTF8 ); 390 t.setEncoding( Q3TextStream::UnicodeUTF8 );
391 Iterator it; 391 Iterator it;
392 KABC::VCardConverter::Version version; 392 KABC::VCardConverter::Version version;
393 version = KABC::VCardConverter::v3_0; 393 version = KABC::VCardConverter::v3_0;
@@ -468,10 +468,10 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName )
468 } 468 }
469 469
470 QFile outFile(fileName); 470 QFile outFile(fileName);
471 if ( outFile.open(IO_WriteOnly) ) { 471 if ( outFile.open(QIODevice::WriteOnly) ) {
472 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 472 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
473 QTextStream t( &outFile ); // use a text stream 473 Q3TextStream t( &outFile ); // use a text stream
474 t.setEncoding( QTextStream::UnicodeUTF8 ); 474 t.setEncoding( Q3TextStream::UnicodeUTF8 );
475 t <<datastream; 475 t <<datastream;
476 t << "\r\n\r\n"; 476 t << "\r\n\r\n";
477 outFile.close(); 477 outFile.close();
@@ -490,7 +490,7 @@ int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool remo
490 setUntagged( true, resource ); 490 setUntagged( true, resource );
491 KABC::Addressee::List list; 491 KABC::Addressee::List list;
492 QFile file( fileName ); 492 QFile file( fileName );
493 file.open( IO_ReadOnly ); 493 file.open( QIODevice::ReadOnly );
494 QByteArray rawData = file.readAll(); 494 QByteArray rawData = file.readAll();
495 file.close(); 495 file.close();
496 QString data; 496 QString data;
@@ -634,7 +634,7 @@ void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice )
634 setUntagged(); 634 setUntagged();
635 KABC::Addressee::List list; 635 KABC::Addressee::List list;
636 QFile file( fileName ); 636 QFile file( fileName );
637 file.open( IO_ReadOnly ); 637 file.open( QIODevice::ReadOnly );
638 QByteArray rawData = file.readAll(); 638 QByteArray rawData = file.readAll();
639 file.close(); 639 file.close();
640 QString data; 640 QString data;
@@ -1218,9 +1218,9 @@ bool AddressBook::addResource( Resource *resource )
1218void AddressBook::removeResources() 1218void AddressBook::removeResources()
1219{ 1219{
1220 //remove all possible resources. This should cleanup the configfile. 1220 //remove all possible resources. This should cleanup the configfile.
1221 QPtrList<KABC::Resource> mResources = resources(); 1221 Q3PtrList<KABC::Resource> mResources = resources();
1222 1222
1223 QPtrListIterator<KABC::Resource> it(mResources); 1223 Q3PtrListIterator<KABC::Resource> it(mResources);
1224 for ( ; it.current(); ++it ) { 1224 for ( ; it.current(); ++it ) {
1225 KABC::Resource *res = it.current(); 1225 KABC::Resource *res = it.current();
1226 removeResource(res); 1226 removeResource(res);
@@ -1240,9 +1240,9 @@ bool AddressBook::removeResource( Resource *resource )
1240 return true; 1240 return true;
1241} 1241}
1242 1242
1243QPtrList<Resource> AddressBook::resources() 1243Q3PtrList<Resource> AddressBook::resources()
1244{ 1244{
1245 QPtrList<Resource> list; 1245 Q3PtrList<Resource> list;
1246 1246
1247// qDebug("AddressBook::resources() 1"); 1247// qDebug("AddressBook::resources() 1");
1248 1248
diff --git a/kabc/addressbook.h b/kabc/addressbook.h
index a8a9fc1..56fce4d 100644
--- a/kabc/addressbook.h
+++ b/kabc/addressbook.h
@@ -31,7 +31,7 @@ $Id$
31#include <qobject.h> 31#include <qobject.h>
32 32
33#include <kresources/manager.h> 33#include <kresources/manager.h>
34#include <qptrlist.h> 34#include <q3ptrlist.h>
35 35
36#include "addressee.h" 36#include "addressee.h"
37#include "field.h" 37#include "field.h"
@@ -280,7 +280,7 @@ class AddressBook : public QObject
280 /** 280 /**
281 Return pointer list of all resources. 281 Return pointer list of all resources.
282 */ 282 */
283 QPtrList<Resource> resources(); 283 Q3PtrList<Resource> resources();
284 284
285 /** 285 /**
286 Set the @p ErrorHandler, that is used by @ref error() to 286 Set the @p ErrorHandler, that is used by @ref error() to
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index e8e440c..9994e29 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -391,7 +391,7 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false)
391 if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName; 391 if ( mData->formattedName.isEmpty() ) mData->formattedName = ad.mData->formattedName;
392 if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; 392 if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName;
393 if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; 393 if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ;
394 if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; 394 if ( mData->additionalName.isEmpty() ) mData->additionalName = ad.mData->additionalName;
395 if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; 395 if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix;
396 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; 396 if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix;
397 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ; 397 if ( mData->title .isEmpty() ) mData->title = ad.mData->title ;
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 0ea1803..30dcd5d 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -33,7 +33,7 @@ $Id$
33#include <qstring.h> 33#include <qstring.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <qvaluelist.h> 36#include <q3valuelist.h>
37 37
38#include <ksharedptr.h> 38#include <ksharedptr.h>
39#include <kurl.h> 39#include <kurl.h>
@@ -84,7 +84,7 @@ class Addressee
84 friend QDataStream &operator>>( QDataStream &, Addressee & ); 84 friend QDataStream &operator>>( QDataStream &, Addressee & );
85 85
86 public: 86 public:
87 typedef QValueList<Addressee> List; 87 typedef Q3ValueList<Addressee> List;
88 88
89 /** 89 /**
90 Construct an empty address book entry. 90 Construct an empty address book entry.
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index 671787e..bda1b9e 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -20,11 +20,14 @@
20 20
21#include <qlayout.h> 21#include <qlayout.h>
22#include <qpushbutton.h> 22#include <qpushbutton.h>
23#include <qgroupbox.h> 23#include <q3groupbox.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qregexp.h> 25#include <qregexp.h>
26#include <qvbox.h> 26#include <q3vbox.h>
27#include <qlabel.h> 27#include <qlabel.h>
28//Added by qt3to4:
29#include <Q3ValueList>
30#include <Q3VBoxLayout>
28 31
29#include <klocale.h> 32#include <klocale.h>
30#include <kdebug.h> 33#include <kdebug.h>
@@ -38,8 +41,8 @@
38 41
39using namespace KABC; 42using namespace KABC;
40 43
41AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : 44AddresseeItem::AddresseeItem( Q3ListView *parent, const Addressee &addressee ) :
42 QListViewItem( parent ), 45 Q3ListViewItem( parent ),
43 mAddressee( addressee ) 46 mAddressee( addressee )
44{ 47{
45 setText( Name,addressee.realName()); 48 setText( Name,addressee.realName());
@@ -71,7 +74,7 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
71 74
72 QWidget *listWidget = new QWidget( mMiniSplitter ); 75 QWidget *listWidget = new QWidget( mMiniSplitter );
73 76
74 QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ; 77 Q3VBoxLayout *listLayout = new Q3VBoxLayout (listWidget) ;
75 //topLayout->addLayout( listLayout ); 78 //topLayout->addLayout( listLayout );
76 79
77 mAddresseeList = new KListView( listWidget ); 80 mAddresseeList = new KListView( listWidget );
@@ -81,10 +84,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
81 mAddresseeList->setAllColumnsShowFocus( true ); 84 mAddresseeList->setAllColumnsShowFocus( true );
82 mAddresseeList->setFullWidth( true ); 85 mAddresseeList->setFullWidth( true );
83 listLayout->addWidget( mAddresseeList ); 86 listLayout->addWidget( mAddresseeList );
84 connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), 87 connect( mAddresseeList, SIGNAL( doubleClicked( Q3ListViewItem * ) ),
85 SLOT( slotOk() ) ); 88 SLOT( slotOk() ) );
86 //QHBox* searchBox = new QHBox ( listWidget ); 89 //QHBox* searchBox = new QHBox ( listWidget );
87 QHBox * hb = new QHBox ( listWidget ); 90 Q3HBox * hb = new Q3HBox ( listWidget );
88 listLayout->addWidget ( hb ); 91 listLayout->addWidget ( hb );
89 mAddresseeEdit = new QLineEdit( hb ); 92 mAddresseeEdit = new QLineEdit( hb );
90 connect( mAddresseeEdit, SIGNAL( returnPressed() ), 93 connect( mAddresseeEdit, SIGNAL( returnPressed() ),
@@ -101,9 +104,9 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
101 mSelectedList->setFullWidth( true ); 104 mSelectedList->setFullWidth( true );
102 //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), 105 //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
103 // SLOT( removeSelected() ) ); 106 // SLOT( removeSelected() ) );
104 connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ), 107 connect( mSelectedList, SIGNAL( clicked( Q3ListViewItem * ) ),
105 SLOT( removeSelected() ) ); 108 SLOT( removeSelected() ) );
106 connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ), 109 connect( mSelectedList, SIGNAL( returnPressed( Q3ListViewItem *) ),
107 SLOT( removeSelected() ) ); 110 SLOT( removeSelected() ) );
108 111
109#if 0 112#if 0
@@ -111,10 +114,10 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
111 connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) ); 114 connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) );
112 115
113#endif 116#endif
114 connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), 117 connect( mAddresseeList, SIGNAL( clicked( Q3ListViewItem * ) ),
115 SLOT( addSelected( QListViewItem * ) ) ); 118 SLOT( addSelected( Q3ListViewItem * ) ) );
116 connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ), 119 connect( mAddresseeList, SIGNAL( returnPressed( Q3ListViewItem * ) ),
117 SLOT( selectNextItem( QListViewItem * ) ) ); 120 SLOT( selectNextItem( Q3ListViewItem * ) ) );
118 121
119 } 122 }
120 123
@@ -126,7 +129,7 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
126 SLOT( addressBookChanged() ) ); 129 SLOT( addressBookChanged() ) );
127#endif 130#endif
128 loadAddressBook(); 131 loadAddressBook();
129 QValueList<int> splitterSize; 132 Q3ValueList<int> splitterSize;
130 splitterSize.append( ( width() / 5 ) * 3 ); 133 splitterSize.append( ( width() / 5 ) * 3 );
131 splitterSize.append( ( width() / 5 ) *2 ); 134 splitterSize.append( ( width() / 5 ) *2 );
132 mMiniSplitter->setSizes( splitterSize ); 135 mMiniSplitter->setSizes( splitterSize );
@@ -172,7 +175,7 @@ void AddresseeDialog::loadAddressBook()
172 } 175 }
173} 176}
174 177
175void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) 178void AddresseeDialog::addCompletionItem( const QString &str, Q3ListViewItem *item )
176{ 179{
177 if ( str.isEmpty() ) return; 180 if ( str.isEmpty() ) return;
178 181
@@ -184,7 +187,7 @@ void AddresseeDialog::selectItem( const QString &str )
184{ 187{
185 if ( str.isEmpty() ) return; 188 if ( str.isEmpty() ) return;
186 189
187 QListViewItem *item = mItemDict.find( str ); 190 Q3ListViewItem *item = mItemDict.find( str );
188 if ( item ) { 191 if ( item ) {
189 mAddresseeList->blockSignals( true ); 192 mAddresseeList->blockSignals( true );
190 mAddresseeList->setSelected( item, true ); 193 mAddresseeList->setSelected( item, true );
@@ -193,30 +196,30 @@ void AddresseeDialog::selectItem( const QString &str )
193 } 196 }
194} 197}
195 198
196void AddresseeDialog::updateEdit( QListViewItem *item ) 199void AddresseeDialog::updateEdit( Q3ListViewItem *item )
197{ 200{
198 mAddresseeEdit->setText( item->text( 0 ) ); 201 mAddresseeEdit->setText( item->text( 0 ) );
199 mAddresseeEdit->setSelection( 0, item->text( 0 ).length() ); 202 mAddresseeEdit->setSelection( 0, item->text( 0 ).length() );
200} 203}
201 204
202void AddresseeDialog::selectNextItem( QListViewItem *item ) 205void AddresseeDialog::selectNextItem( Q3ListViewItem *item )
203{ 206{
204 addSelected( item ); 207 addSelected( item );
205 QListViewItem *next = item->nextSibling(); 208 Q3ListViewItem *next = item->nextSibling();
206 if ( next ) { 209 if ( next ) {
207 next->setSelected( true ); 210 next->setSelected( true );
208 item->setSelected( false ); 211 item->setSelected( false );
209 mAddresseeList->setCurrentItem( next ); 212 mAddresseeList->setCurrentItem( next );
210 } 213 }
211} 214}
212void AddresseeDialog::addSelected( QListViewItem *item ) 215void AddresseeDialog::addSelected( Q3ListViewItem *item )
213{ 216{
214 AddresseeItem *addrItem = (AddresseeItem *)( item ); 217 AddresseeItem *addrItem = (AddresseeItem *)( item );
215 if ( !addrItem ) return; 218 if ( !addrItem ) return;
216 219
217 Addressee a = addrItem->addressee(); 220 Addressee a = addrItem->addressee();
218 221
219 QListViewItem *selectedItem = mSelectedDict.find( a.uid() ); 222 Q3ListViewItem *selectedItem = mSelectedDict.find( a.uid() );
220 if ( !selectedItem ) { 223 if ( !selectedItem ) {
221 selectedItem = new AddresseeItem( mSelectedList, a ); 224 selectedItem = new AddresseeItem( mSelectedList, a );
222 mSelectedDict.insert( a.uid(), selectedItem ); 225 mSelectedDict.insert( a.uid(), selectedItem );
@@ -226,10 +229,10 @@ void AddresseeDialog::addSelected( QListViewItem *item )
226 229
227void AddresseeDialog::removeSelected() 230void AddresseeDialog::removeSelected()
228{ 231{
229 QListViewItem *item = mSelectedList->selectedItem(); 232 Q3ListViewItem *item = mSelectedList->selectedItem();
230 AddresseeItem *addrItem = (AddresseeItem *)( item ); 233 AddresseeItem *addrItem = (AddresseeItem *)( item );
231 if ( !addrItem ) return; 234 if ( !addrItem ) return;
232 QListViewItem *next = item->nextSibling(); 235 Q3ListViewItem *next = item->nextSibling();
233 mSelectedDict.remove( addrItem->addressee().uid() ); 236 mSelectedDict.remove( addrItem->addressee().uid() );
234 delete addrItem; 237 delete addrItem;
235 if ( next ) 238 if ( next )
@@ -255,7 +258,7 @@ Addressee::List AddresseeDialog::addressees()
255 AddresseeItem *aItem = 0; 258 AddresseeItem *aItem = 0;
256 259
257 if ( mMultiple ) { 260 if ( mMultiple ) {
258 QListViewItem *item = mSelectedList->firstChild(); 261 Q3ListViewItem *item = mSelectedList->firstChild();
259 while( item ) { 262 while( item ) {
260 aItem = (AddresseeItem *)( item ); 263 aItem = (AddresseeItem *)( item );
261 if ( aItem ) al.append( aItem->addressee() ); 264 if ( aItem ) al.append( aItem->addressee() );
diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h
index 6fab62d..be7bbb4 100644
--- a/kabc/addresseedialog.h
+++ b/kabc/addresseedialog.h
@@ -21,7 +21,7 @@
21#ifndef KABC_ADDRESSEEDIALOG_H 21#ifndef KABC_ADDRESSEEDIALOG_H
22#define KABC_ADDRESSEEDIALOG_H 22#define KABC_ADDRESSEEDIALOG_H
23 23
24#include <qdict.h> 24#include <q3dict.h>
25 25
26#include <kdialogbase.h> 26#include <kdialogbase.h>
27#include <klineedit.h> 27#include <klineedit.h>
@@ -34,7 +34,7 @@ namespace KABC {
34/** 34/**
35 @short Special ListViewItem, that is used by the AddresseeDialog. 35 @short Special ListViewItem, that is used by the AddresseeDialog.
36*/ 36*/
37class AddresseeItem : public QListViewItem 37class AddresseeItem : public Q3ListViewItem
38{ 38{
39 public: 39 public:
40 40
@@ -51,7 +51,7 @@ class AddresseeItem : public QListViewItem
51 @param parent The parent listview. 51 @param parent The parent listview.
52 @param addressee The associated addressee. 52 @param addressee The associated addressee.
53 */ 53 */
54 AddresseeItem( QListView *parent, const Addressee &addressee ); 54 AddresseeItem( Q3ListView *parent, const Addressee &addressee );
55 55
56 /** 56 /**
57 Returns the addressee. 57 Returns the addressee.
@@ -129,9 +129,9 @@ class AddresseeDialog : public KDialogBase
129 129
130 private slots: 130 private slots:
131 void selectItem( const QString & ); 131 void selectItem( const QString & );
132 void selectNextItem( QListViewItem *item ); 132 void selectNextItem( Q3ListViewItem *item );
133 void updateEdit( QListViewItem *item ); 133 void updateEdit( Q3ListViewItem *item );
134 void addSelected( QListViewItem *item ); 134 void addSelected( Q3ListViewItem *item );
135 void removeSelected(); 135 void removeSelected();
136 void loadAddressBook(); 136 void loadAddressBook();
137 137
@@ -139,7 +139,7 @@ class AddresseeDialog : public KDialogBase
139 void addressBookChanged(); 139 void addressBookChanged();
140 140
141 private: 141 private:
142 void addCompletionItem( const QString &str, QListViewItem *item ); 142 void addCompletionItem( const QString &str, Q3ListViewItem *item );
143 143
144 bool mMultiple; 144 bool mMultiple;
145 145
@@ -150,8 +150,8 @@ class AddresseeDialog : public KDialogBase
150 150
151 AddressBook *mAddressBook; 151 AddressBook *mAddressBook;
152 152
153 QDict<QListViewItem> mItemDict; 153 Q3Dict<Q3ListViewItem> mItemDict;
154 QDict<QListViewItem> mSelectedDict; 154 Q3Dict<Q3ListViewItem> mSelectedDict;
155 155
156 class AddresseeDialogPrivate; 156 class AddresseeDialogPrivate;
157 AddresseeDialogPrivate *d; 157 AddresseeDialogPrivate *d;
diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp
index 097e162..e1ba1ce 100644
--- a/kabc/addresseelist.cpp
+++ b/kabc/addresseelist.cpp
@@ -28,7 +28,9 @@ $Id$
28 28
29#include <kdebug.h> 29#include <kdebug.h>
30//US 30//US
31#include <qtl.h> 31#include <q3tl.h>
32//Added by qt3to4:
33#include <Q3ValueList>
32 34
33 35
34#include "addresseelist.h" 36#include "addresseelist.h"
@@ -121,7 +123,7 @@ bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 )
121// 123//
122 124
123AddresseeList::AddresseeList() 125AddresseeList::AddresseeList()
124 : QValueList<Addressee>() 126 : Q3ValueList<Addressee>()
125{ 127{
126 mReverseSorting = false; 128 mReverseSorting = false;
127 mActiveSortingCriterion = FormattedName; 129 mActiveSortingCriterion = FormattedName;
@@ -133,14 +135,14 @@ AddresseeList::~AddresseeList()
133} 135}
134 136
135AddresseeList::AddresseeList( const AddresseeList &l ) 137AddresseeList::AddresseeList( const AddresseeList &l )
136 : QValueList<Addressee>( l ) 138 : Q3ValueList<Addressee>( l )
137{ 139{
138 mReverseSorting = l.reverseSorting(); 140 mReverseSorting = l.reverseSorting();
139 mActiveSortingCriterion = l.sortingCriterion(); 141 mActiveSortingCriterion = l.sortingCriterion();
140} 142}
141 143
142AddresseeList::AddresseeList( const QValueList<Addressee> &l ) 144AddresseeList::AddresseeList( const Q3ValueList<Addressee> &l )
143 : QValueList<Addressee>( l ) 145 : Q3ValueList<Addressee>( l )
144{ 146{
145 mReverseSorting = false; 147 mReverseSorting = false;
146} 148}
diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h
index 2df252c..6106804 100644
--- a/kabc/addresseelist.h
+++ b/kabc/addresseelist.h
@@ -29,7 +29,7 @@ $Id$
29#ifndef KABC_ADDRESSEELIST_H 29#ifndef KABC_ADDRESSEELIST_H
30#define KABC_ADDRESSEELIST_H 30#define KABC_ADDRESSEELIST_H
31 31
32#include <qvaluelist.h> 32#include <q3valuelist.h>
33 33
34#include "addressee.h" 34#include "addressee.h"
35 35
@@ -114,13 +114,13 @@ typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterio
114 * 114 *
115 * @author Jost Schenck jost@schenck.de 115 * @author Jost Schenck jost@schenck.de
116 */ 116 */
117class AddresseeList : public QValueList<Addressee> 117class AddresseeList : public Q3ValueList<Addressee>
118{ 118{
119 public: 119 public:
120 AddresseeList(); 120 AddresseeList();
121 ~AddresseeList(); 121 ~AddresseeList();
122 AddresseeList( const AddresseeList & ); 122 AddresseeList( const AddresseeList & );
123 AddresseeList( const QValueList<Addressee> & ); 123 AddresseeList( const Q3ValueList<Addressee> & );
124 124
125 /** 125 /**
126 * Debug output. 126 * Debug output.
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index cde19a1..425e67c 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -27,23 +27,28 @@
27#include <kiconloader.h> 27#include <kiconloader.h>
28#include <klocale.h> 28#include <klocale.h>
29//US #include <kstringhandler.h> 29//US #include <kstringhandler.h>
30#include <qscrollview.h> 30#include <q3scrollview.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qvbox.h> 33#include <q3vbox.h>
34#include <qlabel.h> 34#include <qlabel.h>
35#include <qwidget.h> 35#include <qwidget.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qapplication.h> 37#include <qapplication.h>
38#include <qpushbutton.h> 38#include <qpushbutton.h>
39#ifdef DESKTOP_VERSION 39#ifdef DESKTOP_VERSION
40#include <qpaintdevicemetrics.h> 40#include <q3paintdevicemetrics.h>
41#include <qprinter.h> 41#include <qprinter.h>
42#include <qpainter.h> 42#include <qpainter.h>
43#endif 43#endif
44#include <QDesktopWidget>
44 45
45 46
46#include <qstylesheet.h> 47#include <q3stylesheet.h>
48//Added by qt3to4:
49#include <Q3HBoxLayout>
50#include <QPixmap>
51#include <Q3VBoxLayout>
47#include "externalapphandler.h" 52#include "externalapphandler.h"
48#include <kabc/addresseeview.h> 53#include <kabc/addresseeview.h>
49 54
@@ -59,7 +64,7 @@ using namespace KABC;
59bool AddresseeView::sFullDetailsMode = false; 64bool AddresseeView::sFullDetailsMode = false;
60 65
61AddresseeView::AddresseeView( QWidget *parent, const char *name ) 66AddresseeView::AddresseeView( QWidget *parent, const char *name )
62 : QTextBrowser( parent, name ) 67 : Q3TextBrowser( parent, name )
63 68
64 69
65{ 70{
@@ -82,7 +87,7 @@ void AddresseeView::printMe()
82 return; 87 return;
83 QPainter p; 88 QPainter p;
84 p.begin ( &printer ); 89 p.begin ( &printer );
85 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 90 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
86 float dx, dy; 91 float dx, dy;
87 int wid = (m.width() * 9)/10; 92 int wid = (m.width() * 9)/10;
88 dx = (float) wid/(float)contentsWidth (); 93 dx = (float) wid/(float)contentsWidth ();
@@ -402,7 +407,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
402 if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) { 407 if ( picAvailUrl || picAvailintern || QApplication::desktop()->width() > 320 ) {
403 picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; 408 picString = "<img src=\"myimage\" width=\"50\" height=\"70\">";
404 if ( picAvailintern ) { 409 if ( picAvailintern ) {
405 QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); 410 Q3MimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() );
406 int wid = picture.data().width(); 411 int wid = picture.data().width();
407 int hei = picture.data().height(); 412 int hei = picture.data().height();
408 if ( wid > 128 || hei > 128 ) { 413 if ( wid > 128 || hei > 128 ) {
@@ -418,7 +423,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
418 } else { 423 } else {
419 if ( picAvailUrl ) { 424 if ( picAvailUrl ) {
420 QPixmap picPix( picture.url() ); 425 QPixmap picPix( picture.url() );
421 QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); 426 Q3MimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix );
422 int wid = picPix.width(); 427 int wid = picPix.width();
423 int hei = picPix.height(); 428 int hei = picPix.height();
424 if ( wid > 128 || hei > 128 ) { 429 if ( wid > 128 || hei > 128 ) {
@@ -435,7 +440,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
435 if ( !mAddressee.custom( "KADDRESSBOOK", "X-Children" ).isEmpty() ) { 440 if ( !mAddressee.custom( "KADDRESSBOOK", "X-Children" ).isEmpty() ) {
436 static bool setDefaultImageChildren = false; 441 static bool setDefaultImageChildren = false;
437 if ( !setDefaultImageChildren ) { 442 if ( !setDefaultImageChildren ) {
438 QMimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) ); 443 Q3MimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) );
439 setDefaultImageChildren = true; 444 setDefaultImageChildren = true;
440 } 445 }
441 picString = "<img src=\"familyIcon\" width=\"64\" height=\"64\">"; 446 picString = "<img src=\"familyIcon\" width=\"64\" height=\"64\">";
@@ -443,7 +448,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
443 } else if ( !mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ).isEmpty() ) { 448 } else if ( !mAddressee.custom( "KADDRESSBOOK", "X-SpousesName" ).isEmpty() ) {
444 static bool setDefaultImagepouses = false; 449 static bool setDefaultImagepouses = false;
445 if ( !setDefaultImagepouses ) { 450 if ( !setDefaultImagepouses ) {
446 QMimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) ); 451 Q3MimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) );
447 setDefaultImagepouses = true; 452 setDefaultImagepouses = true;
448 } 453 }
449 picString = "<img src=\"SpousesIcon\" width=\"64\" height=\"64\">"; 454 picString = "<img src=\"SpousesIcon\" width=\"64\" height=\"64\">";
@@ -452,7 +457,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
452 if ( gen == "male" ) { 457 if ( gen == "male" ) {
453 static bool setDefaultImageMale = false; 458 static bool setDefaultImageMale = false;
454 if ( !setDefaultImageMale ) { 459 if ( !setDefaultImageMale ) {
455 QMimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) ); 460 Q3MimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) );
456 setDefaultImageMale = true; 461 setDefaultImageMale = true;
457 } 462 }
458 picString = "<img src=\"MaleIcon\" width=\"64\" height=\"64\">"; 463 picString = "<img src=\"MaleIcon\" width=\"64\" height=\"64\">";
@@ -460,7 +465,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
460 } else if ( gen == "female" ) { 465 } else if ( gen == "female" ) {
461 static bool setDefaultImageFemale = false; 466 static bool setDefaultImageFemale = false;
462 if ( !setDefaultImageFemale ) { 467 if ( !setDefaultImageFemale ) {
463 QMimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) ); 468 Q3MimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) );
464 setDefaultImageFemale = true; 469 setDefaultImageFemale = true;
465 } 470 }
466 picString = "<img src=\"FemaleIcon\" width=\"64\" height=\"64\">"; 471 picString = "<img src=\"FemaleIcon\" width=\"64\" height=\"64\">";
@@ -469,7 +474,7 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
469 static bool setDefaultImage = false; 474 static bool setDefaultImage = false;
470 if ( !setDefaultImage ) { 475 if ( !setDefaultImage ) {
471 //qDebug("Setting default pixmap "); 476 //qDebug("Setting default pixmap ");
472 QMimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) ); 477 Q3MimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) );
473 setDefaultImage = true; 478 setDefaultImage = true;
474 } 479 }
475 picString = "<img src=\"defaultIcon\" width=\"64\" height=\"64\">"; 480 picString = "<img src=\"defaultIcon\" width=\"64\" height=\"64\">";
@@ -653,7 +658,7 @@ void AddresseeView::addTag(const QString & tag,const QString & text)
653{ 658{
654 if ( text.isEmpty() ) 659 if ( text.isEmpty() )
655 return; 660 return;
656 int number=text.contains("\n"); 661 int number=text.count("\n");
657 QString str = "<" + tag + ">"; 662 QString str = "<" + tag + ">";
658 QString tmpText=text; 663 QString tmpText=text;
659 QString tmpStr=str; 664 QString tmpStr=str;
@@ -688,24 +693,24 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo
688 findButton( User1 )->setText( i18n("Local")); 693 findButton( User1 )->setText( i18n("Local"));
689 QWidget* topframe = new QWidget( this ); 694 QWidget* topframe = new QWidget( this );
690 setMainWidget( topframe ); 695 setMainWidget( topframe );
691 QBoxLayout* bl; 696 Q3BoxLayout* bl;
692 if ( QApplication::desktop()->width() < 640 ) { 697 if ( QApplication::desktop()->width() < 640 ) {
693 bl = new QVBoxLayout( topframe ); 698 bl = new Q3VBoxLayout( topframe );
694 } else { 699 } else {
695 bl = new QHBoxLayout( topframe ); 700 bl = new Q3HBoxLayout( topframe );
696 } 701 }
697 QVBox* subframe = new QVBox( topframe ); 702 Q3VBox* subframe = new Q3VBox( topframe );
698 bl->addWidget(subframe ); 703 bl->addWidget(subframe );
699 QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); 704 QLabel* lab = new QLabel( i18n("Local Addressee"), subframe );
700 if ( takeloc ) 705 if ( takeloc )
701 lab->setBackgroundColor(Qt::green.light() ); 706 lab->setBackgroundColor(QColor(Qt::green).light() );
702 AddresseeView * av = new AddresseeView( subframe ); 707 AddresseeView * av = new AddresseeView( subframe );
703 av->setAddressee( loc ); 708 av->setAddressee( loc );
704 subframe = new QVBox( topframe ); 709 subframe = new Q3VBox( topframe );
705 bl->addWidget(subframe ); 710 bl->addWidget(subframe );
706 lab = new QLabel( i18n("Remote Addressee"), subframe ); 711 lab = new QLabel( i18n("Remote Addressee"), subframe );
707 if ( !takeloc ) 712 if ( !takeloc )
708 lab->setBackgroundColor(Qt::green.light() ); 713 lab->setBackgroundColor(QColor(Qt::green).light() );
709 av = new AddresseeView( subframe ); 714 av = new AddresseeView( subframe );
710 av->setAddressee( rem ); 715 av->setAddressee( rem );
711 QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote())); 716 QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote()));
diff --git a/kabc/addresseeview.h b/kabc/addresseeview.h
index a4de085..f7ce2e0 100644
--- a/kabc/addresseeview.h
+++ b/kabc/addresseeview.h
@@ -26,12 +26,12 @@
26#include <kdialogbase.h> 26#include <kdialogbase.h>
27 27
28//US #include <ktextbrowser.h> 28//US #include <ktextbrowser.h>
29#include <qtextbrowser.h> 29#include <q3textbrowser.h>
30 30
31namespace KABC { 31namespace KABC {
32 32
33//US class AddresseeView : public KTextBrowser 33//US class AddresseeView : public KTextBrowser
34class AddresseeView : public QTextBrowser 34class AddresseeView : public Q3TextBrowser
35{ 35{
36 36
37 public: 37 public:
diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp
index d34ba0b..cf5afa6 100644
--- a/kabc/distributionlist.cpp
+++ b/kabc/distributionlist.cpp
@@ -23,6 +23,8 @@
23#include <kdebug.h> 23#include <kdebug.h>
24 24
25#include "distributionlist.h" 25#include "distributionlist.h"
26//Added by qt3to4:
27#include <Q3ValueList>
26 28
27using namespace KABC; 29using namespace KABC;
28 30
@@ -54,7 +56,7 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email )
54 if (em.isNull() ) 56 if (em.isNull() )
55 em = a.preferredEmail(); 57 em = a.preferredEmail();
56 Entry e( a, em ); 58 Entry e( a, em );
57 QValueList<Entry>::Iterator it; 59 Q3ValueList<Entry>::Iterator it;
58 for( it = mEntries.begin(); it != mEntries.end(); ++it ) { 60 for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
59 if ( (*it).addressee.uid() == a.uid() ) { 61 if ( (*it).addressee.uid() == a.uid() ) {
60 /** 62 /**
@@ -74,7 +76,7 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email )
74 76
75void DistributionList::removeEntry( const Addressee &a, const QString &email ) 77void DistributionList::removeEntry( const Addressee &a, const QString &email )
76{ 78{
77 QValueList<Entry>::Iterator it; 79 Q3ValueList<Entry>::Iterator it;
78 for( it = mEntries.begin(); it != mEntries.end(); ++it ) { 80 for( it = mEntries.begin(); it != mEntries.end(); ++it ) {
79 if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { 81 if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) {
80 mEntries.remove( it ); 82 mEntries.remove( it );
diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h
index c81e543..8d21a17 100644
--- a/kabc/distributionlist.h
+++ b/kabc/distributionlist.h
@@ -24,6 +24,9 @@
24//#include <kdirwatch.h> 24//#include <kdirwatch.h>
25 25
26#include "addressbook.h" 26#include "addressbook.h"
27//Added by qt3to4:
28#include <Q3ValueList>
29#include <Q3PtrList>
27 30
28namespace KABC { 31namespace KABC {
29 32
@@ -48,7 +51,7 @@ class DistributionList
48 */ 51 */
49 struct Entry 52 struct Entry
50 { 53 {
51 typedef QValueList<Entry> List; 54 typedef Q3ValueList<Entry> List;
52 55
53 Entry() {} 56 Entry() {}
54 Entry( const Addressee &_addressee, const QString &_email ) : 57 Entry( const Addressee &_addressee, const QString &_email ) :
@@ -167,7 +170,7 @@ class DistributionListManager
167 private: 170 private:
168 AddressBook *mAddressBook; 171 AddressBook *mAddressBook;
169 172
170 QPtrList<DistributionList> mLists; 173 Q3PtrList<DistributionList> mLists;
171}; 174};
172 175
173/** 176/**
diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp
index d2e1144..82883e6 100644
--- a/kabc/distributionlistdialog.cpp
+++ b/kabc/distributionlistdialog.cpp
@@ -18,13 +18,19 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qlistview.h> 21#include <q3listview.h>
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26//Added by qt3to4:
27#include <Q3HBoxLayout>
28#include <Q3GridLayout>
29#include <Q3Frame>
30#include <Q3VBoxLayout>
26#include <klineeditdlg.h> 31#include <klineeditdlg.h>
27#include <qbuttongroup.h> 32#include <q3buttongroup.h>
33#include <Q3Button>
28#include <qradiobutton.h> 34#include <qradiobutton.h>
29 35
30#include <klocale.h> 36#include <klocale.h>
@@ -60,10 +66,10 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString &current,
60 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, 66 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
61 parent ) 67 parent )
62{ 68{
63 QFrame *topFrame = plainPage(); 69 Q3Frame *topFrame = plainPage();
64 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 70 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
65 71
66 mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), 72 mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
67 topFrame ); 73 topFrame );
68 topLayout->addWidget( mButtonGroup ); 74 topLayout->addWidget( mButtonGroup );
69 75
@@ -78,7 +84,7 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString &current,
78 84
79QString EmailSelector::selected() 85QString EmailSelector::selected()
80{ 86{
81 QButton *button = mButtonGroup->selected(); 87 QAbstractButton *button = mButtonGroup->selected();
82 if ( button ) return button->text(); 88 if ( button ) return button->text();
83 return QString::null; 89 return QString::null;
84} 90}
@@ -96,12 +102,12 @@ QString EmailSelector::getEmail( const QStringList &emails, const QString &curre
96 return result; 102 return result;
97} 103}
98 104
99class EntryItem : public QListViewItem 105class EntryItem : public Q3ListViewItem
100{ 106{
101 public: 107 public:
102 EntryItem( QListView *parent, const Addressee &addressee, 108 EntryItem( Q3ListView *parent, const Addressee &addressee,
103 const QString &email=QString::null ) : 109 const QString &email=QString::null ) :
104 QListViewItem( parent ), 110 Q3ListViewItem( parent ),
105 mAddressee( addressee ), 111 mAddressee( addressee ),
106 mEmail( email ) 112 mEmail( email )
107 { 113 {
@@ -136,10 +142,10 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address
136{ 142{
137 kdDebug(5700) << "DistributionListEditor()" << endl; 143 kdDebug(5700) << "DistributionListEditor()" << endl;
138 144
139 QBoxLayout *topLayout = new QVBoxLayout( this ); 145 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
140 topLayout->setSpacing( KDialog::spacingHint() ); 146 topLayout->setSpacing( KDialog::spacingHint() );
141 147
142 QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; 148 Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
143 149
144 mNameCombo = new QComboBox( this ); 150 mNameCombo = new QComboBox( this );
145 nameLayout->addWidget( mNameCombo ); 151 nameLayout->addWidget( mNameCombo );
@@ -157,7 +163,7 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address
157 nameLayout->addWidget( mRemoveButton ); 163 nameLayout->addWidget( mRemoveButton );
158 connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) ); 164 connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) );
159 165
160 QGridLayout *gridLayout = new QGridLayout( topLayout, 3, 3 ); 166 Q3GridLayout *gridLayout = new Q3GridLayout( topLayout, 3, 3 );
161 gridLayout->setColStretch(1, 1); 167 gridLayout->setColStretch(1, 1);
162 168
163 QLabel *listLabel = new QLabel( i18n("Available addresses:"), this ); 169 QLabel *listLabel = new QLabel( i18n("Available addresses:"), this );
@@ -166,14 +172,14 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address
166 mListLabel = new QLabel( this ); 172 mListLabel = new QLabel( this );
167 gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); 173 gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 );
168 174
169 mAddresseeView = new QListView( this ); 175 mAddresseeView = new Q3ListView( this );
170 mAddresseeView->addColumn( i18n("Name") ); 176 mAddresseeView->addColumn( i18n("Name") );
171 mAddresseeView->addColumn( i18n("Preferred Email") ); 177 mAddresseeView->addColumn( i18n("Preferred Email") );
172 mAddresseeView->setAllColumnsShowFocus( true ); 178 mAddresseeView->setAllColumnsShowFocus( true );
173 gridLayout->addWidget( mAddresseeView, 1, 0 ); 179 gridLayout->addWidget( mAddresseeView, 1, 0 );
174 connect( mAddresseeView, SIGNAL( selectionChanged() ), 180 connect( mAddresseeView, SIGNAL( selectionChanged() ),
175 SLOT( slotSelectionAddresseeViewChanged() ) ); 181 SLOT( slotSelectionAddresseeViewChanged() ) );
176 connect( mAddresseeView, SIGNAL( doubleClicked( QListViewItem * ) ), 182 connect( mAddresseeView, SIGNAL( doubleClicked( Q3ListViewItem * ) ),
177 SLOT( addEntry() ) ); 183 SLOT( addEntry() ) );
178 184
179 mAddEntryButton = new QPushButton( i18n("Add Entry"), this ); 185 mAddEntryButton = new QPushButton( i18n("Add Entry"), this );
@@ -181,7 +187,7 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address
181 gridLayout->addWidget( mAddEntryButton, 2, 0 ); 187 gridLayout->addWidget( mAddEntryButton, 2, 0 );
182 connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); 188 connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
183 189
184 mEntryView = new QListView( this ); 190 mEntryView = new Q3ListView( this );
185 mEntryView->addColumn( i18n("Name") ); 191 mEntryView->addColumn( i18n("Name") );
186 mEntryView->addColumn( i18n("Email") ); 192 mEntryView->addColumn( i18n("Email") );
187 mEntryView->addColumn( i18n("Use Preferred") ); 193 mEntryView->addColumn( i18n("Use Preferred") );
diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h
index b6d3c80..3627431 100644
--- a/kabc/distributionlistdialog.h
+++ b/kabc/distributionlistdialog.h
@@ -22,13 +22,15 @@
22#define KABC_DISTRIBUTIONLISTDIALOG_H 22#define KABC_DISTRIBUTIONLISTDIALOG_H
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25//Added by qt3to4:
26#include <QLabel>
25 27
26#include <kdialogbase.h> 28#include <kdialogbase.h>
27 29
28class QListView; 30class Q3ListView;
29class QLabel; 31class QLabel;
30class QComboBox; 32class QComboBox;
31class QButtonGroup; 33class Q3ButtonGroup;
32 34
33namespace KABC { 35namespace KABC {
34 36
@@ -93,7 +95,7 @@ class EmailSelector : public KDialogBase
93 QWidget *parent ); 95 QWidget *parent );
94 96
95 private: 97 private:
96 QButtonGroup *mButtonGroup; 98 Q3ButtonGroup *mButtonGroup;
97}; 99};
98 100
99/** 101/**
@@ -124,8 +126,8 @@ class DistributionListEditorWidget : public QWidget
124 private: 126 private:
125 QComboBox *mNameCombo; 127 QComboBox *mNameCombo;
126 QLabel *mListLabel; 128 QLabel *mListLabel;
127 QListView *mEntryView; 129 Q3ListView *mEntryView;
128 QListView *mAddresseeView; 130 Q3ListView *mAddresseeView;
129 131
130 AddressBook *mAddressBook; 132 AddressBook *mAddressBook;
131 DistributionListManager *mManager; 133 DistributionListManager *mManager;
diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp
index 9f5840b..ca5ecb7 100644
--- a/kabc/distributionlisteditor.cpp
+++ b/kabc/distributionlisteditor.cpp
@@ -18,7 +18,7 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qlistview.h> 21#include <q3listview.h>
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
@@ -27,8 +27,12 @@
27#else 27#else
28#include <qtcompat/qinputdialog.h> 28#include <qtcompat/qinputdialog.h>
29#endif 29#endif
30#include <qbuttongroup.h> 30#include <q3buttongroup.h>
31#include <qradiobutton.h> 31#include <qradiobutton.h>
32//Added by qt3to4:
33#include <Q3HBoxLayout>
34#include <Q3Frame>
35#include <Q3VBoxLayout>
32 36
33#include <klocale.h> 37#include <klocale.h>
34#include <kdebug.h> 38#include <kdebug.h>
@@ -48,10 +52,10 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
48 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, 52 KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
49 parent ) 53 parent )
50{ 54{
51 QFrame *topFrame = plainPage(); 55 Q3Frame *topFrame = plainPage();
52 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 56 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
53 57
54 mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), 58 mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
55 topFrame ); 59 topFrame );
56 topLayout->addWidget( mButtonGroup ); 60 topLayout->addWidget( mButtonGroup );
57 61
@@ -66,7 +70,7 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString &
66 70
67QString EmailSelectDialog::selected() 71QString EmailSelectDialog::selected()
68{ 72{
69 QButton *button = mButtonGroup->selected(); 73 QAbstractButton *button = mButtonGroup->selected();
70 if ( button ) return button->text(); 74 if ( button ) return button->text();
71 return QString::null; 75 return QString::null;
72} 76}
@@ -85,12 +89,12 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c
85 return result; 89 return result;
86} 90}
87 91
88class EditEntryItem : public QListViewItem 92class EditEntryItem : public Q3ListViewItem
89{ 93{
90 public: 94 public:
91 EditEntryItem( QListView *parent, const Addressee &addressee, 95 EditEntryItem( Q3ListView *parent, const Addressee &addressee,
92 const QString &email=QString::null ) : 96 const QString &email=QString::null ) :
93 QListViewItem( parent ), 97 Q3ListViewItem( parent ),
94 mAddressee( addressee ), 98 mAddressee( addressee ),
95 mEmail( email ) 99 mEmail( email )
96 { 100 {
@@ -125,11 +129,11 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
125{ 129{
126 kdDebug(5700) << "DistributionListEditor()" << endl; 130 kdDebug(5700) << "DistributionListEditor()" << endl;
127 131
128 QBoxLayout *topLayout = new QVBoxLayout( this ); 132 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
129 topLayout->setMargin( KDialog::marginHint() ); 133 topLayout->setMargin( KDialog::marginHint() );
130 topLayout->setSpacing( KDialog::spacingHint() ); 134 topLayout->setSpacing( KDialog::spacingHint() );
131 135
132 QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; 136 Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ;
133 137
134 mNameCombo = new QComboBox( this ); 138 mNameCombo = new QComboBox( this );
135 nameLayout->addWidget( mNameCombo ); 139 nameLayout->addWidget( mNameCombo );
@@ -143,7 +147,7 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
143 nameLayout->addWidget( removeButton ); 147 nameLayout->addWidget( removeButton );
144 connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) ); 148 connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) );
145 149
146 mEntryView = new QListView( this ); 150 mEntryView = new Q3ListView( this );
147 mEntryView->addColumn( i18n("Name") ); 151 mEntryView->addColumn( i18n("Name") );
148 mEntryView->addColumn( i18n("Email") ); 152 mEntryView->addColumn( i18n("Email") );
149 mEntryView->addColumn( i18n("Use Preferred") ); 153 mEntryView->addColumn( i18n("Use Preferred") );
@@ -162,7 +166,7 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge
162 topLayout->addWidget( addEntryButton ); 166 topLayout->addWidget( addEntryButton );
163 connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); 167 connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) );
164 168
165 mAddresseeView = new QListView( this ); 169 mAddresseeView = new Q3ListView( this );
166 mAddresseeView->addColumn( i18n("Name") ); 170 mAddresseeView->addColumn( i18n("Name") );
167 mAddresseeView->addColumn( i18n("Preferred Email") ); 171 mAddresseeView->addColumn( i18n("Preferred Email") );
168 topLayout->addWidget( mAddresseeView ); 172 topLayout->addWidget( mAddresseeView );
diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h
index e0b4221..e672a14 100644
--- a/kabc/distributionlisteditor.h
+++ b/kabc/distributionlisteditor.h
@@ -24,9 +24,9 @@
24 24
25#include <kdialogbase.h> 25#include <kdialogbase.h>
26 26
27class QListView; 27class Q3ListView;
28class QComboBox; 28class QComboBox;
29class QButtonGroup; 29class Q3ButtonGroup;
30 30
31namespace KABC { 31namespace KABC {
32 32
@@ -45,7 +45,7 @@ class EmailSelectDialog : public KDialogBase
45 QWidget *parent ); 45 QWidget *parent );
46 46
47 private: 47 private:
48 QButtonGroup *mButtonGroup; 48 Q3ButtonGroup *mButtonGroup;
49}; 49};
50 50
51/** 51/**
@@ -72,8 +72,8 @@ class DistributionListEditor : public QWidget
72 72
73 private: 73 private:
74 QComboBox *mNameCombo; 74 QComboBox *mNameCombo;
75 QListView *mEntryView; 75 Q3ListView *mEntryView;
76 QListView *mAddresseeView; 76 Q3ListView *mAddresseeView;
77 77
78 AddressBook *mAddressBook; 78 AddressBook *mAddressBook;
79 DistributionListManager *mManager; 79 DistributionListManager *mManager;
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 7c6d7a9..203f696 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -33,6 +33,8 @@ $Id$
33 33
34#include "field.h" 34#include "field.h"
35#include "resource.h" 35#include "resource.h"
36//Added by qt3to4:
37#include <Q3ValueList>
36 38
37using namespace KABC; 39using namespace KABC;
38 40
@@ -377,7 +379,7 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
377// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? 379// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
378 { 380 {
379 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate 381 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
380 a.setBirthday(dt); 382 a.setBirthday((QDateTime)dt);
381 } 383 }
382 return true; 384 return true;
383 case FieldImpl::CustomField: 385 case FieldImpl::CustomField:
@@ -493,7 +495,7 @@ void Field::saveFields( const QString &identifier,
493void Field::saveFields( KConfig *cfg, const QString &identifier, 495void Field::saveFields( KConfig *cfg, const QString &identifier,
494 const Field::List &fields ) 496 const Field::List &fields )
495{ 497{
496 QValueList<int> fieldIds; 498 Q3ValueList<int> fieldIds;
497 499
498//US 500//US
499// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1()); 501// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1());
@@ -533,14 +535,14 @@ Field::List Field::restoreFields( const QString &identifier )
533 535
534Field::List Field::restoreFields( KConfig *cfg, const QString &identifier ) 536Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
535{ 537{
536 QValueList<int> fieldIds = cfg->readIntListEntry( identifier); 538 Q3ValueList<int> fieldIds = cfg->readIntListEntry( identifier);
537//US 539//US
538// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1()); 540// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1());
539 541
540 Field::List fields; 542 Field::List fields;
541 543
542 int custom = 0; 544 int custom = 0;
543 QValueList<int>::ConstIterator it; 545 Q3ValueList<int>::ConstIterator it;
544 for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { 546 for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
545 FieldImpl *f = 0; 547 FieldImpl *f = 0;
546 if ( (*it) == FieldImpl::CustomField ) { 548 if ( (*it) == FieldImpl::CustomField ) {
diff --git a/kabc/field.h b/kabc/field.h
index 9e06597..55cc705 100644
--- a/kabc/field.h
+++ b/kabc/field.h
@@ -29,7 +29,7 @@ $Id$
29#define KABC_FIELD_H 29#define KABC_FIELD_H
30 30
31#include <qstring.h> 31#include <qstring.h>
32#include <qvaluelist.h> 32#include <q3valuelist.h>
33 33
34#include "addressee.h" 34#include "addressee.h"
35 35
@@ -43,7 +43,7 @@ class Field
43 friend class FieldImpl; 43 friend class FieldImpl;
44 44
45public: 45public:
46 typedef QValueList<Field *> List; 46 typedef Q3ValueList<Field *> List;
47 47
48 /** 48 /**
49 * @li @p All - 49 * @li @p All -
diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp
index 3ae1c27..cbb97a2 100644
--- a/kabc/formatfactory.cpp
+++ b/kabc/formatfactory.cpp
@@ -102,7 +102,7 @@ QStringList FormatFactory::formats()
102 // make sure 'vcard' is the first entry 102 // make sure 'vcard' is the first entry
103 retval << "vcard"; 103 retval << "vcard";
104 104
105 QDictIterator<FormatInfo> it( mFormatList ); 105 Q3DictIterator<FormatInfo> it( mFormatList );
106 for ( ; it.current(); ++it ) 106 for ( ; it.current(); ++it )
107 if ( it.currentKey() != "vcard" ) 107 if ( it.currentKey() != "vcard" )
108 retval << it.currentKey(); 108 retval << it.currentKey();
diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h
index 9612374..de15b17 100644
--- a/kabc/formatfactory.h
+++ b/kabc/formatfactory.h
@@ -21,7 +21,7 @@
21#ifndef KABC_FORMATFACTORY_H 21#ifndef KABC_FORMATFACTORY_H
22#define KABC_FORMATFACTORY_H 22#define KABC_FORMATFACTORY_H
23 23
24#include <qdict.h> 24#include <q3dict.h>
25#include <qstring.h> 25#include <qstring.h>
26 26
27#include <kconfig.h> 27#include <kconfig.h>
@@ -97,7 +97,7 @@ class FormatFactory
97#endif 97#endif
98 static FormatFactory *mSelf; 98 static FormatFactory *mSelf;
99 99
100 QDict<FormatInfo> mFormatList; 100 Q3Dict<FormatInfo> mFormatList;
101}; 101};
102 102
103} 103}
diff --git a/kabc/formats/binary/kabcformat_binaryE.pro b/kabc/formats/binary/kabcformat_binaryE.pro
index 2d9594d..c71197e 100644
--- a/kabc/formats/binary/kabcformat_binaryE.pro
+++ b/kabc/formats/binary/kabcformat_binaryE.pro
@@ -8,7 +8,7 @@ INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../qtcomp
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc 9MOC_DIR = moc
10DESTDIR = $(QPEDIR)/lib 10DESTDIR = $(QPEDIR)/lib
11LIBS += -lmicrokde -lmicrokabc 11LIBS += -lxmicrokde -lxmicrokabc
12LIBS += -L$(QPEDIR)/lib 12LIBS += -L$(QPEDIR)/lib
13DEFINES += KAB_EMBEDDED 13DEFINES += KAB_EMBEDDED
14 14
diff --git a/kabc/formats/vcardformatplugin2.cpp b/kabc/formats/vcardformatplugin2.cpp
index 41b0c9a..fbebe92 100644
--- a/kabc/formats/vcardformatplugin2.cpp
+++ b/kabc/formats/vcardformatplugin2.cpp
@@ -11,7 +11,7 @@ $Id$
11#include "addressee.h" 11#include "addressee.h"
12#include "vcardparser/vcardtool.h" 12#include "vcardparser/vcardtool.h"
13 13
14#include <qtextstream.h> 14#include <q3textstream.h>
15#include <qfile.h> 15#include <qfile.h>
16 16
17using namespace KABC; 17using namespace KABC;
@@ -37,8 +37,8 @@ bool VCardFormatPlugin2::load( Addressee &addressee, QFile *file )
37 qDebug("VCardFormatPlugin2::load"); 37 qDebug("VCardFormatPlugin2::load");
38 QString data; 38 QString data;
39 39
40 QTextStream t( file ); 40 Q3TextStream t( file );
41 t.setEncoding( QTextStream::UnicodeUTF8 ); 41 t.setEncoding( Q3TextStream::UnicodeUTF8 );
42 data = t.read(); 42 data = t.read();
43 43
44 VCardTool tool; 44 VCardTool tool;
@@ -58,8 +58,8 @@ bool VCardFormatPlugin2::loadAll( AddressBook *addressBook, Resource *resource,
58 qDebug("VCardFormatPlugin2::loadAll"); 58 qDebug("VCardFormatPlugin2::loadAll");
59 QString data; 59 QString data;
60 60
61 QTextStream t( file ); 61 Q3TextStream t( file );
62 t.setEncoding( QTextStream::UnicodeUTF8 ); 62 t.setEncoding( Q3TextStream::UnicodeUTF8 );
63 data = t.read(); 63 data = t.read();
64 64
65 VCardTool tool; 65 VCardTool tool;
@@ -86,8 +86,8 @@ void VCardFormatPlugin2::save( const Addressee &addressee, QFile *file )
86 86
87 vcardlist.append( addressee ); 87 vcardlist.append( addressee );
88 88
89 QTextStream t( file ); 89 Q3TextStream t( file );
90 t.setEncoding( QTextStream::UnicodeUTF8 ); 90 t.setEncoding( Q3TextStream::UnicodeUTF8 );
91 t << tool.createVCards( vcardlist ); 91 t << tool.createVCards( vcardlist );
92} 92}
93 93
@@ -105,8 +105,8 @@ void VCardFormatPlugin2::saveAll( AddressBook *ab, Resource *resource, QFile *fi
105 } 105 }
106 } 106 }
107 107
108 QTextStream t( file ); 108 Q3TextStream t( file );
109 t.setEncoding( QTextStream::UnicodeUTF8 ); 109 t.setEncoding( Q3TextStream::UnicodeUTF8 );
110 t << tool.createVCards( vcardlist ); 110 t << tool.createVCards( vcardlist );
111} 111}
112 112
@@ -114,7 +114,7 @@ bool VCardFormatPlugin2::checkFormat( QFile *file ) const
114{ 114{
115 QString line; 115 QString line;
116 116
117 file->readLine( line, 1024 ); 117 char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp;
118 line = line.stripWhiteSpace(); 118 line = line.stripWhiteSpace();
119 if ( line == "BEGIN:VCARD" ) 119 if ( line == "BEGIN:VCARD" )
120 return true; 120 return true;
diff --git a/kabc/kabc.pro b/kabc/kabc.pro
index 17ebff8..846ed8a 100644
--- a/kabc/kabc.pro
+++ b/kabc/kabc.pro
@@ -3,13 +3,13 @@ CONFIG += qt warn_on
3#release debug 3#release debug
4DESTDIR=../bin 4DESTDIR=../bin
5 5
6TARGET = microkabc 6TARGET = xmicrokabc
7 7
8include( ../variables.pri ) 8include( ../variables.pri )
9 9
10INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui .. 10INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui ..
11 11
12#LIBS += -lmicrokde -lldap 12#LIBS += -lxmicrokde -lldap
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14DEFINES += KAB_EMBEDDED DESKTOP_VERSION 14DEFINES += KAB_EMBEDDED DESKTOP_VERSION
15unix : { 15unix : {
@@ -216,3 +216,7 @@ vcard/TextListValue.cpp
216# plugins/ldap/resourceldapconfig.cpp \ 216# plugins/ldap/resourceldapconfig.cpp \
217 217
218#formats/binary/binaryformat.cpp \ 218#formats/binary/binaryformat.cpp \
219#The following line was inserted by qt3to4
220QT += xml qt3support
221#The following line was inserted by qt3to4
222QT +=
diff --git a/kabc/kabcE.pro b/kabc/kabcE.pro
index 1d28a4d..6045b68 100644
--- a/kabc/kabcE.pro
+++ b/kabc/kabcE.pro
@@ -1,14 +1,14 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc 3TARGET = xmicrokabc
4 4
5 5
6INCLUDEPATH += . $(KDEPIMDIR) vcard/include vcard/include/generated $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 6INCLUDEPATH += . $(KDEPIMDIR) vcard/include vcard/include/generated $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde 10LIBS += -lxmicrokde
11LIBS += -lmicrokdepim 11LIBS += -lxmicrokdepim
12#LIBS += -lldap 12#LIBS += -lldap
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14DEFINES += KAB_EMBEDDED 14DEFINES += KAB_EMBEDDED
@@ -194,3 +194,5 @@ vcard/TextListValue.cpp
194 194
195# plugins/ldap/resourceldap.cpp \ 195# plugins/ldap/resourceldap.cpp \
196# plugins/ldap/resourceldapconfig.cpp \ 196# plugins/ldap/resourceldapconfig.cpp \
197#The following line was inserted by qt3to4
198QT += qt3support
diff --git a/kabc/key.h b/kabc/key.h
index 6ea5b47..313eb7d 100644
--- a/kabc/key.h
+++ b/kabc/key.h
@@ -28,7 +28,7 @@ $Id$
28#ifndef KABC_KEY_H 28#ifndef KABC_KEY_H
29#define KABC_KEY_H 29#define KABC_KEY_H
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32 32
33namespace KABC { 33namespace KABC {
34 34
@@ -41,8 +41,8 @@ class Key
41 friend QDataStream &operator>>( QDataStream &, Key & ); 41 friend QDataStream &operator>>( QDataStream &, Key & );
42 42
43public: 43public:
44 typedef QValueList<Key> List; 44 typedef Q3ValueList<Key> List;
45 typedef QValueList<int> TypeList; 45 typedef Q3ValueList<int> TypeList;
46 46
47 /** 47 /**
48 * Key types 48 * Key types
diff --git a/kabc/phonenumber.h b/kabc/phonenumber.h
index feeba6c..6bc89d3 100644
--- a/kabc/phonenumber.h
+++ b/kabc/phonenumber.h
@@ -28,7 +28,7 @@ $Id$
28#ifndef KABC_PHONENUMBER_H 28#ifndef KABC_PHONENUMBER_H
29#define KABC_PHONENUMBER_H 29#define KABC_PHONENUMBER_H
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32#include <qstring.h> 32#include <qstring.h>
33 33
34namespace KABC { 34namespace KABC {
@@ -46,8 +46,8 @@ class PhoneNumber
46 friend QDataStream &operator>>( QDataStream &, PhoneNumber & ); 46 friend QDataStream &operator>>( QDataStream &, PhoneNumber & );
47 47
48 public: 48 public:
49 typedef QValueList<PhoneNumber> List; 49 typedef Q3ValueList<PhoneNumber> List;
50 typedef QValueList<int> TypeList; 50 typedef Q3ValueList<int> TypeList;
51 51
52 /** 52 /**
53 @li @p Home - Home number 53 @li @p Home - Home number
diff --git a/kabc/picture.cpp b/kabc/picture.cpp
index 57aa297..0c59937 100644
--- a/kabc/picture.cpp
+++ b/kabc/picture.cpp
@@ -26,6 +26,8 @@ $Id$
26*/ 26*/
27 27
28#include "picture.h" 28#include "picture.h"
29//Added by qt3to4:
30#include <QPixmap>
29 31
30using namespace KABC; 32using namespace KABC;
31 33
diff --git a/kabc/picture.h b/kabc/picture.h
index 714d1e2..1b63610 100644
--- a/kabc/picture.h
+++ b/kabc/picture.h
@@ -29,6 +29,8 @@ $Id$
29#define KABC_PICTURE_H 29#define KABC_PICTURE_H
30 30
31#include <qimage.h> 31#include <qimage.h>
32//Added by qt3to4:
33#include <QPixmap>
32 34
33namespace KABC { 35namespace KABC {
34 36
diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro
index 3e18594..9b3b894 100644
--- a/kabc/plugins/dir/dir.pro
+++ b/kabc/plugins/dir/dir.pro
@@ -4,10 +4,10 @@ CONFIG += qt warn_on release
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
7TARGET = microkabc_dir 7TARGET = xmicrokabc_dir
8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat 8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
9DESTDIR = ../../../bin 9DESTDIR = ../../../bin
10#LIBS += -lmicrokde -lmicrokabc 10#LIBS += -lxmicrokde -lxmicrokabc
11#LIBS += -L$(QPEDIR)/lib 11#LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
@@ -29,8 +29,12 @@ CONFIG += dll
29DEFINES += _WIN32_ 29DEFINES += _WIN32_
30OBJECTS_DIR = obj/win 30OBJECTS_DIR = obj/win
31MOC_DIR = moc/win 31MOC_DIR = moc/win
32LIBS += ../../../bin/microkdepim.lib 32LIBS += ../../../bin/xmicrokdepim.lib
33LIBS += ../../../bin/microkcal.lib 33LIBS += ../../../bin/xmicrokcal.lib
34LIBS += ../../../bin/microkde.lib 34LIBS += ../../../bin/xmicrokde.lib
35LIBS += ../../../bin/microkabc.lib 35LIBS += ../../../bin/microkabc.lib
36} 36}
37#The following line was inserted by qt3to4
38QT += qt3support
39#The following line was inserted by qt3to4
40QT += xml
diff --git a/kabc/plugins/dir/dirE.pro b/kabc/plugins/dir/dirE.pro
index cda4e2f..75332a0 100644
--- a/kabc/plugins/dir/dirE.pro
+++ b/kabc/plugins/dir/dirE.pro
@@ -2,12 +2,12 @@ TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabc_dir 5TARGET = xmicrokabc_dir
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde -lmicrokabc 10LIBS += -lxmicrokde -lxmicrokabc
11LIBS += -L$(QPEDIR)/lib 11LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index c61664b..cc4afee 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -170,7 +170,7 @@ bool ResourceDir::doOpen()
170 return true; 170 return true;
171 171
172 QFile file( mPath + "/" + testName ); 172 QFile file( mPath + "/" + testName );
173 if ( file.open( IO_ReadOnly ) ) 173 if ( file.open( QIODevice::ReadOnly ) )
174 return true; 174 return true;
175 175
176 if ( file.size() == 0 ) 176 if ( file.size() == 0 )
@@ -196,7 +196,7 @@ bool ResourceDir::load()
196 for ( it = files.begin(); it != files.end(); ++it ) { 196 for ( it = files.begin(); it != files.end(); ++it ) {
197 QFile file( mPath + "/" + (*it) ); 197 QFile file( mPath + "/" + (*it) );
198 198
199 if ( !file.open( IO_ReadOnly ) ) { 199 if ( !file.open( QIODevice::ReadOnly ) ) {
200 addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); 200 addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) );
201 ok = false; 201 ok = false;
202 continue; 202 continue;
@@ -223,7 +223,7 @@ bool ResourceDir::save( Ticket *ticket )
223 continue; 223 continue;
224 224
225 QFile file( mPath + "/" + (*it).uid() ); 225 QFile file( mPath + "/" + (*it).uid() );
226 if ( !file.open( IO_WriteOnly ) ) { 226 if ( !file.open( QIODevice::WriteOnly ) ) {
227 addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); 227 addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) );
228 continue; 228 continue;
229 } 229 }
@@ -267,7 +267,7 @@ bool ResourceDir::lock( const QString &path )
267 267
268 // Create unique file 268 // Create unique file
269 QFile file( mLockUniqueName ); 269 QFile file( mLockUniqueName );
270 file.open( IO_WriteOnly ); 270 file.open( QIODevice::WriteOnly );
271 file.close(); 271 file.close();
272 272
273 // Create lock file 273 // Create lock file
diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp
index 98d18fe..8fa48d0 100644
--- a/kabc/plugins/dir/resourcedirconfig.cpp
+++ b/kabc/plugins/dir/resourcedirconfig.cpp
@@ -27,6 +27,8 @@ $Id$
27 27
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30//Added by qt3to4:
31#include <Q3GridLayout>
30 32
31#include <kdebug.h> 33#include <kdebug.h>
32#include <klocale.h> 34#include <klocale.h>
@@ -44,7 +46,7 @@ using namespace KABC;
44ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name ) 46ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name )
45 : KRES::ConfigWidget( parent, name ) 47 : KRES::ConfigWidget( parent, name )
46{ 48{
47 QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, 49 Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0,
48 KDialog::spacingHint() ); 50 KDialog::spacingHint() );
49 51
50 QLabel *label = new QLabel( i18n( "Format:" ), this ); 52 QLabel *label = new QLabel( i18n( "Format:" ), this );
diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro
index 2d17313..e4f1270 100644
--- a/kabc/plugins/file/file.pro
+++ b/kabc/plugins/file/file.pro
@@ -4,11 +4,11 @@ CONFIG += qt warn_on release
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
7TARGET = microkabc_file 7TARGET = xmicrokabc_file
8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat 8INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
9 9
10DESTDIR = ../../../bin 10DESTDIR = ../../../bin
11#LIBS += -lmicrokde -lmicrokabc 11#LIBS += -lxmicrokde -lxmicrokabc
12#LIBS += -L$(QPEDIR)/lib 12#LIBS += -L$(QPEDIR)/lib
13 13
14INTERFACES = \ 14INTERFACES = \
@@ -30,8 +30,12 @@ CONFIG += dll
30DEFINES += _WIN32_ 30DEFINES += _WIN32_
31OBJECTS_DIR = obj/win 31OBJECTS_DIR = obj/win
32MOC_DIR = moc/win 32MOC_DIR = moc/win
33LIBS += ../../../bin/microkdepim.lib 33LIBS += ../../../bin/xmicrokdepim.lib
34LIBS += ../../../bin/microkcal.lib 34LIBS += ../../../bin/xmicrokcal.lib
35LIBS += ../../../bin/microkde.lib 35LIBS += ../../../bin/xmicrokde.lib
36LIBS += ../../../bin/microkabc.lib 36LIBS += ../../../bin/microkabc.lib
37} 37}
38#The following line was inserted by qt3to4
39QT += qt3support
40#The following line was inserted by qt3to4
41QT += xml
diff --git a/kabc/plugins/file/fileE.pro b/kabc/plugins/file/fileE.pro
index 16707e5..5044cd9 100644
--- a/kabc/plugins/file/fileE.pro
+++ b/kabc/plugins/file/fileE.pro
@@ -2,12 +2,12 @@ TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabc_file 5TARGET = xmicrokabc_file
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde -lmicrokabc 10LIBS += -lxmicrokde -lxmicrokabc
11LIBS += -L$(QPEDIR)/lib 11LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index dad4571..3ed850c 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -201,13 +201,13 @@ bool ResourceFile::doOpen()
201 201
202 if ( !file.exists() ) { 202 if ( !file.exists() ) {
203 // try to create the file 203 // try to create the file
204 bool ok = file.open( IO_WriteOnly ); 204 bool ok = file.open( QIODevice::WriteOnly );
205 if ( ok ) 205 if ( ok )
206 file.close(); 206 file.close();
207 207
208 return ok; 208 return ok;
209 } else { 209 } else {
210 if ( !file.open( IO_ReadWrite ) ) 210 if ( !file.open( QIODevice::ReadWrite ) )
211 return false; 211 return false;
212 212
213 if ( file.size() < 10 ) { 213 if ( file.size() < 10 ) {
@@ -230,7 +230,7 @@ bool ResourceFile::load()
230{ 230{
231 231
232 QFile file( fileName() ); 232 QFile file( fileName() );
233 if ( !file.open( IO_ReadOnly ) ) { 233 if ( !file.open( QIODevice::ReadOnly ) ) {
234 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); 234 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) );
235 return false; 235 return false;
236 } 236 }
@@ -311,7 +311,7 @@ bool ResourceFile::save( Ticket *ticket )
311 } 311 }
312 QFile info; 312 QFile info;
313 info.setName( fileName() ); 313 info.setName( fileName() );
314 bool ok = info.open( IO_WriteOnly ); 314 bool ok = info.open( QIODevice::WriteOnly );
315 if ( ok ) { 315 if ( ok ) {
316 mFormat->saveAll( addressBook(), this, &info ); 316 mFormat->saveAll( addressBook(), this, &info );
317 317
@@ -363,7 +363,7 @@ bool ResourceFile::lock( const QString &fileName )
363 363
364 // Create unique file 364 // Create unique file
365 QFile file( mLockUniqueName ); 365 QFile file( mLockUniqueName );
366 file.open( IO_WriteOnly ); 366 file.open( QIODevice::WriteOnly );
367 file.close(); 367 file.close();
368 368
369 // Create lock file 369 // Create lock file
diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp
index b63775d..70b0bac 100644
--- a/kabc/plugins/file/resourcefileconfig.cpp
+++ b/kabc/plugins/file/resourcefileconfig.cpp
@@ -28,6 +28,8 @@ $Id$
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qfileinfo.h> 30#include <qfileinfo.h>
31//Added by qt3to4:
32#include <Q3GridLayout>
31 33
32#include <kdebug.h> 34#include <kdebug.h>
33#include <klocale.h> 35#include <klocale.h>
@@ -50,7 +52,7 @@ ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name )
50{ 52{
51//qDebug("ResourceFileConfig::ResourceFileConfig"); 53//qDebug("ResourceFileConfig::ResourceFileConfig");
52 54
53 QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, 55 Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0,
54 KDialog::spacingHint() ); 56 KDialog::spacingHint() );
55 57
56 QLabel *label = new QLabel( i18n( "Format:" ), this ); 58 QLabel *label = new QLabel( i18n( "Format:" ), this );
diff --git a/kabc/plugins/ldap/ldapE.pro b/kabc/plugins/ldap/ldapE.pro
index 57b6f84..c56d24d 100644
--- a/kabc/plugins/ldap/ldapE.pro
+++ b/kabc/plugins/ldap/ldapE.pro
@@ -2,12 +2,12 @@ TEMPLATE = lib
2CONFIG += qt warn_on release 2CONFIG += qt warn_on release
3#release debug 3#release debug
4 4
5TARGET = microkabc_ldap 5TARGET = xmicrokabc_ldap
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR = $(QPEDIR)/lib 9DESTDIR = $(QPEDIR)/lib
10LIBS += -lmicrokde -lmicrokabc 10LIBS += -lxmicrokde -lxmicrokabc
11LIBS += -L$(QPEDIR)/lib 11LIBS += -L$(QPEDIR)/lib
12 12
13INTERFACES = \ 13INTERFACES = \
diff --git a/kabc/plugins/olaccess/olaccess.pro b/kabc/plugins/olaccess/olaccess.pro
index 9b95015..ad7e1ef 100644
--- a/kabc/plugins/olaccess/olaccess.pro
+++ b/kabc/plugins/olaccess/olaccess.pro
@@ -1,6 +1,6 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc_olaccess 3TARGET = xmicrokabc_olaccess
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
@@ -28,8 +28,8 @@ CONFIG += dll
28DEFINES += _WIN32_ 28DEFINES += _WIN32_
29OBJECTS_DIR = obj/win 29OBJECTS_DIR = obj/win
30MOC_DIR = moc/win 30MOC_DIR = moc/win
31LIBS += ../../../bin/microkdepim.lib 31LIBS += ../../../bin/xmicrokdepim.lib
32LIBS += ../../../bin/microkcal.lib 32LIBS += ../../../bin/xmicrokcal.lib
33LIBS += ../../../bin/microkde.lib 33LIBS += ../../../bin/xmicrokde.lib
34LIBS += ../../../bin/microkabc.lib 34LIBS += ../../../bin/microkabc.lib
35} 35}
diff --git a/kabc/plugins/opie/opieE.pro b/kabc/plugins/opie/opieE.pro
index b7ecbc0..aa6b8ea 100644
--- a/kabc/plugins/opie/opieE.pro
+++ b/kabc/plugins/opie/opieE.pro
@@ -1,7 +1,7 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3#release debug 3#release debug
4TARGET = microkabc_opie 4TARGET = xmicrokabc_opie
5 5
6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include $(OPIEDIR)/include 6INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include $(OPIEDIR)/include
7 7
@@ -9,8 +9,8 @@ INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kde
9OBJECTS_DIR = obj/$(PLATFORM) 9OBJECTS_DIR = obj/$(PLATFORM)
10MOC_DIR = moc/$(PLATFORM) 10MOC_DIR = moc/$(PLATFORM)
11DESTDIR = $(QPEDIR)/lib 11DESTDIR = $(QPEDIR)/lib
12LIBS += -lmicrokde 12LIBS += -lxmicrokde
13LIBS += -lmicrokabc 13LIBS += -lxmicrokabc
14LIBS += -L$(QPEDIR)/lib 14LIBS += -L$(QPEDIR)/lib
15LIBS += -L$(OPIEDIR)/lib 15LIBS += -L$(OPIEDIR)/lib
16LIBS += -lopie 16LIBS += -lopie
diff --git a/kabc/plugins/qtopia/qtopia.pro b/kabc/plugins/qtopia/qtopia.pro
index 64d1abc..d91a2e3 100644
--- a/kabc/plugins/qtopia/qtopia.pro
+++ b/kabc/plugins/qtopia/qtopia.pro
@@ -3,13 +3,13 @@ CONFIG += qt warn_on release
3 3
4include( ../../../variables.pri ) 4include( ../../../variables.pri )
5 5
6TARGET = microkabc_qtopia 6TARGET = xmicrokabc_qtopia
7 7
8INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources 8INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources
9 9
10DESTDIR = ../../../bin 10DESTDIR = ../../../bin
11#LIBS += -lmicrokde 11#LIBS += -lxmicrokde
12#LIBS += -lkamicrokabc 12#LIBS += -lxkamicrokabc
13 13
14DEFINES += KAB_EMBEDDED DESKTOP_VERSION 14DEFINES += KAB_EMBEDDED DESKTOP_VERSION
15 15
@@ -36,8 +36,12 @@ CONFIG += dll
36DEFINES += _WIN32_ 36DEFINES += _WIN32_
37OBJECTS_DIR = obj/win 37OBJECTS_DIR = obj/win
38MOC_DIR = moc/win 38MOC_DIR = moc/win
39LIBS += ../../../bin/microkdepim.lib 39LIBS += ../../../bin/xmicrokdepim.lib
40LIBS += ../../../bin/microkcal.lib 40LIBS += ../../../bin/xmicrokcal.lib
41LIBS += ../../../bin/microkde.lib 41LIBS += ../../../bin/xmicrokde.lib
42LIBS += ../../../bin/microkabc.lib 42LIBS += ../../../bin/microkabc.lib
43} 43}
44#The following line was inserted by qt3to4
45QT += xml qt3support
46#The following line was inserted by qt3to4
47QT +=
diff --git a/kabc/plugins/qtopia/qtopiaE.pro b/kabc/plugins/qtopia/qtopiaE.pro
index 700057b..4b174b2 100644
--- a/kabc/plugins/qtopia/qtopiaE.pro
+++ b/kabc/plugins/qtopia/qtopiaE.pro
@@ -1,15 +1,15 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3 3
4TARGET = microkabc_qtopia 4TARGET = xmicrokabc_qtopia
5 5
6INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 6INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
7 7
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
10DESTDIR = $(QPEDIR)/lib 10DESTDIR = $(QPEDIR)/lib
11LIBS += -lmicrokde 11LIBS += -lxmicrokde
12LIBS += -lmicrokabc 12LIBS += -lxmicrokabc
13LIBS += -L$(QPEDIR)/lib 13LIBS += -L$(QPEDIR)/lib
14LIBS += -lqpe 14LIBS += -lqpe
15 15
diff --git a/kabc/plugins/qtopia/qtopiaconverter.cpp b/kabc/plugins/qtopia/qtopiaconverter.cpp
index 9693a68..9b3903b 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.cpp
+++ b/kabc/plugins/qtopia/qtopiaconverter.cpp
@@ -34,7 +34,9 @@ $Id$
34 34
35#include <qfile.h> 35#include <qfile.h>
36#include <qdir.h> 36#include <qdir.h>
37#include <qtextstream.h> 37#include <q3textstream.h>
38//Added by qt3to4:
39#include <Q3ValueList>
38//#include <.h> 40//#include <.h>
39 41
40#include <libkdepim/ksyncprofile.h> 42#include <libkdepim/ksyncprofile.h>
@@ -71,8 +73,8 @@ QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QStr
71{ 73{
72 startover: 74 startover:
73 QStringList dummy; 75 QStringList dummy;
74 QValueList<OpieCategories>::ConstIterator catIt; 76 Q3ValueList<OpieCategories>::ConstIterator catIt;
75 QValueList<OpieCategories> categories = m_edit->categories(); 77 Q3ValueList<OpieCategories> categories = m_edit->categories();
76 bool found = false; 78 bool found = false;
77 for ( QStringList::ConstIterator listIt = list.begin(); listIt != list.end(); ++listIt ) { 79 for ( QStringList::ConstIterator listIt = list.begin(); listIt != list.end(); ++listIt ) {
78 /* skip empty category name */ 80 /* skip empty category name */
@@ -192,7 +194,7 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr )
192 194
193 QDate date = dateFromString( el.attribute( "Birthday" ) ); 195 QDate date = dateFromString( el.attribute( "Birthday" ) );
194 if ( date.isValid() ) 196 if ( date.isValid() )
195 adr.setBirthday( date ); 197 adr.setBirthday( (QDateTime)date );
196 198
197 adr.setRole( el.attribute( "JobTitle" ) ); 199 adr.setRole( el.attribute( "JobTitle" ) );
198 if ( !el.attribute( "FileAs" ).isEmpty() ) 200 if ( !el.attribute( "FileAs" ).isEmpty() )
@@ -317,7 +319,7 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr )
317 return true; 319 return true;
318} 320}
319 321
320bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, QTextStream *stream ) 322bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, Q3TextStream *stream )
321{ 323{
322 *stream << "<Contact "; 324 *stream << "<Contact ";
323 *stream << "FirstName=\"" << escape(ab.givenName()) << "\" "; 325 *stream << "FirstName=\"" << escape(ab.givenName()) << "\" ";
@@ -484,13 +486,13 @@ CategoryEdit::~CategoryEdit(){
484void CategoryEdit::save(const QString& fileName)const{ 486void CategoryEdit::save(const QString& fileName)const{
485 QFile file( fileName ); 487 QFile file( fileName );
486 QString endl = "\n"; 488 QString endl = "\n";
487 if ( file.open( IO_WriteOnly ) ) { 489 if ( file.open( QIODevice::WriteOnly ) ) {
488 QTextStream stream( &file ); 490 Q3TextStream stream( &file );
489 stream.setEncoding( QTextStream::UnicodeUTF8 ); 491 stream.setEncoding( Q3TextStream::UnicodeUTF8 );
490 stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; 492 stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
491 stream << "<!DOCTYPE CategoryList>" << endl; 493 stream << "<!DOCTYPE CategoryList>" << endl;
492 stream << "<Categories>" << endl; 494 stream << "<Categories>" << endl;
493 for ( QValueList<OpieCategories>::ConstIterator it = m_categories.begin(); 495 for ( Q3ValueList<OpieCategories>::ConstIterator it = m_categories.begin();
494 it != m_categories.end(); ++it ) 496 it != m_categories.end(); ++it )
495 { 497 {
496 stream << "<Category id=\""<< ( (*it).id() ) << "\" "; 498 stream << "<Category id=\""<< ( (*it).id() ) << "\" ";
@@ -537,7 +539,7 @@ void CategoryEdit::parse( const QString &tempFile ){
537 539
538 QDomDocument doc( "mydocument" ); 540 QDomDocument doc( "mydocument" );
539 QFile f( tempFile ); 541 QFile f( tempFile );
540 if ( !f.open( IO_ReadOnly ) ) 542 if ( !f.open( QIODevice::ReadOnly ) )
541 return; 543 return;
542 544
543 if ( !doc.setContent( &f ) ) { 545 if ( !doc.setContent( &f ) ) {
@@ -587,7 +589,7 @@ void CategoryEdit::clear()
587} 589}
588QString CategoryEdit::categoryById( const QString &id, const QString &app )const 590QString CategoryEdit::categoryById( const QString &id, const QString &app )const
589{ 591{
590 QValueList<OpieCategories>::ConstIterator it; 592 Q3ValueList<OpieCategories>::ConstIterator it;
591 QString category; 593 QString category;
592 QString fallback; 594 QString fallback;
593 for( it = m_categories.begin(); it != m_categories.end(); ++it ){ 595 for( it = m_categories.begin(); it != m_categories.end(); ++it ){
diff --git a/kabc/plugins/qtopia/qtopiaconverter.h b/kabc/plugins/qtopia/qtopiaconverter.h
index 744dd41..389926c 100644
--- a/kabc/plugins/qtopia/qtopiaconverter.h
+++ b/kabc/plugins/qtopia/qtopiaconverter.h
@@ -28,6 +28,9 @@ $Id$
28#define KABC_QTOPIACONVERTER_H 28#define KABC_QTOPIACONVERTER_H
29 29
30#include <qstring.h> 30#include <qstring.h>
31//Added by qt3to4:
32#include <Q3ValueList>
33#include <Q3TextStream>
31 34
32#include "addressee.h" 35#include "addressee.h"
33#ifdef DESKTOP_VERSION 36#ifdef DESKTOP_VERSION
@@ -76,14 +79,14 @@ class OpieCategories {
76 QStringList categoriesByIds( const QStringList& ids, const QString& app ); 79 QStringList categoriesByIds( const QStringList& ids, const QString& app );
77 80
78 void clear(); 81 void clear();
79 QValueList<OpieCategories> categories()const { return m_categories; }; 82 Q3ValueList<OpieCategories> categories()const { return m_categories; };
80 private: 83 private:
81 /** 84 /**
82 * this function will be used internally to update the kde categories... 85 * this function will be used internally to update the kde categories...
83 */ 86 */
84 void updateKDE( const QString& app, const QStringList& categories ); 87 void updateKDE( const QString& app, const QStringList& categories );
85 QMap<int, bool> ids; // from tt Qtopia::UidGen 88 QMap<int, bool> ids; // from tt Qtopia::UidGen
86 QValueList<OpieCategories> m_categories; 89 Q3ValueList<OpieCategories> m_categories;
87 }; 90 };
88 91
89 92
@@ -117,7 +120,7 @@ public:
117 * @param addr The addressee. 120 * @param addr The addressee.
118 * @param contact The qtopia contact. 121 * @param contact The qtopia contact.
119 */ 122 */
120 bool addresseeToQtopia( const Addressee &ab, QTextStream *stream ); 123 bool addresseeToQtopia( const Addressee &ab, Q3TextStream *stream );
121 124
122 private: 125 private:
123 QString categoriesToNumber( const QStringList &list, const QString &app ); 126 QString categoriesToNumber( const QStringList &list, const QString &app );
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 79ddaea..a36eb8f 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -31,7 +31,7 @@ $Id$
31#endif 31#endif
32#include <qdir.h> 32#include <qdir.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qfileinfo.h> 35#include <qfileinfo.h>
36#include <qregexp.h> 36#include <qregexp.h>
37//US #include <qtimer.h> 37//US #include <qtimer.h>
@@ -156,7 +156,7 @@ bool ResourceQtopia::load()
156{ 156{
157 157
158 QFile file( fileName() ); 158 QFile file( fileName() );
159 if ( !file.open(IO_ReadOnly ) ) { 159 if ( !file.open(QIODevice::ReadOnly ) ) {
160 return false; 160 return false;
161 } 161 }
162 162
@@ -203,12 +203,12 @@ bool ResourceQtopia::save( Ticket *ticket )
203 KABC::AddressBook::Iterator it; 203 KABC::AddressBook::Iterator it;
204 bool res; 204 bool res;
205 QFile file( fileName() ); 205 QFile file( fileName() );
206 if (!file.open( IO_WriteOnly ) ) { 206 if (!file.open( QIODevice::WriteOnly ) ) {
207 return false; 207 return false;
208 } 208 }
209 QTextStream ts( &file ); 209 Q3TextStream ts( &file );
210 QTextStream *stream = &ts; 210 Q3TextStream *stream = &ts;
211 stream->setEncoding( QTextStream::UnicodeUTF8 ); 211 stream->setEncoding( Q3TextStream::UnicodeUTF8 );
212 *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE Addressbook ><AddressBook>" << endl; 212 *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE Addressbook ><AddressBook>" << endl;
213 *stream << " <Groups>" << endl; 213 *stream << " <Groups>" << endl;
214 *stream << " </Groups>" << endl; 214 *stream << " </Groups>" << endl;
@@ -260,7 +260,7 @@ bool ResourceQtopia::lock( const QString &lockfileName )
260 260
261 // Create unique file 261 // Create unique file
262 QFile file( mLockUniqueName ); 262 QFile file( mLockUniqueName );
263 file.open( IO_WriteOnly ); 263 file.open( QIODevice::WriteOnly );
264 file.close(); 264 file.close();
265 265
266 // Create lock file 266 // Create lock file
diff --git a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp
index d5d6141..42fd428 100644
--- a/kabc/plugins/qtopia/resourceqtopiaconfig.cpp
+++ b/kabc/plugins/qtopia/resourceqtopiaconfig.cpp
@@ -27,6 +27,8 @@ $Id$
27 27
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30//Added by qt3to4:
31#include <Q3GridLayout>
30 32
31#include <kdebug.h> 33#include <kdebug.h>
32#include <klocale.h> 34#include <klocale.h>
@@ -46,7 +48,7 @@ using namespace KABC;
46ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) 48ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name )
47 : ConfigWidget( parent, name ) 49 : ConfigWidget( parent, name )
48{ 50{
49 QGridLayout *mainLayout = new QGridLayout( this, 1, 2, 0, 51 Q3GridLayout *mainLayout = new Q3GridLayout( this, 1, 2, 0,
50 KDialog::spacingHint() ); 52 KDialog::spacingHint() );
51 53
52 QLabel *label = new QLabel( i18n( "Location:" ), this ); 54 QLabel *label = new QLabel( i18n( "Location:" ), this );
diff --git a/kabc/plugins/sharpdtm/sharpdtmE.pro b/kabc/plugins/sharpdtm/sharpdtmE.pro
index 23b0b76..7fc8ba8 100644
--- a/kabc/plugins/sharpdtm/sharpdtmE.pro
+++ b/kabc/plugins/sharpdtm/sharpdtmE.pro
@@ -1,6 +1,6 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc_sharpdtm 3TARGET = xmicrokabc_sharpdtm
4 4
5INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include 5INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include
6 6
@@ -8,9 +8,9 @@ INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
10DESTDIR = $(QPEDIR)/lib 10DESTDIR = $(QPEDIR)/lib
11LIBS += -lmicrokde 11LIBS += -lxmicrokde
12LIBS += -lmicrokabc 12LIBS += -lxmicrokabc
13LIBS += -lmicrokdepim 13LIBS += -lxmicrokdepim
14LIBS += -lmicroqtcompat 14LIBS += -lmicroqtcompat
15LIBS += -L$(QPEDIR)/lib 15LIBS += -L$(QPEDIR)/lib
16LIBS += -ljpeg 16LIBS += -ljpeg
diff --git a/kabc/secrecy.h b/kabc/secrecy.h
index b2ff565..0fe956e 100644
--- a/kabc/secrecy.h
+++ b/kabc/secrecy.h
@@ -28,7 +28,7 @@ $Id$
28#ifndef KABC_SECRECY_H 28#ifndef KABC_SECRECY_H
29#define KABC_SECRECY_H 29#define KABC_SECRECY_H
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32 32
33namespace KABC { 33namespace KABC {
34 34
@@ -38,7 +38,7 @@ class Secrecy
38 friend QDataStream &operator>>( QDataStream &, Secrecy & ); 38 friend QDataStream &operator>>( QDataStream &, Secrecy & );
39 39
40public: 40public:
41 typedef QValueList<int> TypeList; 41 typedef Q3ValueList<int> TypeList;
42 42
43 /** 43 /**
44 * Secrecy types 44 * Secrecy types
diff --git a/kabc/sound.h b/kabc/sound.h
index 0ec5ec8..9777054 100644
--- a/kabc/sound.h
+++ b/kabc/sound.h
@@ -28,7 +28,7 @@ $Id$
28#ifndef KABC_SOUND_H 28#ifndef KABC_SOUND_H
29#define KABC_SOUND_H 29#define KABC_SOUND_H
30 30
31#include <qcstring.h> 31#include <q3cstring.h>
32#include <qstring.h> 32#include <qstring.h>
33 33
34namespace KABC { 34namespace KABC {
diff --git a/kabc/tmpaddressbook.cpp b/kabc/tmpaddressbook.cpp
index cfa57e3..5152e00 100644
--- a/kabc/tmpaddressbook.cpp
+++ b/kabc/tmpaddressbook.cpp
@@ -24,7 +24,7 @@ Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28 28
29#include "tmpaddressbook.h" 29#include "tmpaddressbook.h"
30 30
diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp
index fa46499..33d358c 100644
--- a/kabc/vcard/AdrParam.cpp
+++ b/kabc/vcard/AdrParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardRToken.h> 24#include <VCardRToken.h>
25#include <VCardAdrParam.h> 25#include <VCardAdrParam.h>
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -38,7 +40,7 @@ AdrParam::AdrParam(const AdrParam & x)
38{ 40{
39} 41}
40 42
41AdrParam::AdrParam(const QCString & s) 43AdrParam::AdrParam(const Q3CString & s)
42 :Param(s) 44 :Param(s)
43{ 45{
44} 46}
@@ -56,7 +58,7 @@ AdrParam::operator = (AdrParam & x)
56} 58}
57 59
58 AdrParam & 60 AdrParam &
59AdrParam::operator = (const QCString & s) 61AdrParam::operator = (const Q3CString & s)
60{ 62{
61 Param::operator = (s); 63 Param::operator = (s);
62 64
@@ -77,7 +79,7 @@ AdrParam::operator == (AdrParam & x)
77 if (x.adrTypeList().count() != adrTypeList_.count()) 79 if (x.adrTypeList().count() != adrTypeList_.count())
78 return false; 80 return false;
79 81
80 QStrListIterator it(x.adrTypeList_); 82 Q3StrListIterator it(x.adrTypeList_);
81 83
82 for (; it.current(); ++it) 84 for (; it.current(); ++it)
83 if (!adrTypeList_.find(it.current())) 85 if (!adrTypeList_.find(it.current()))
@@ -114,7 +116,7 @@ AdrParam::_assemble()
114 return; 116 return;
115 } 117 }
116 118
117 QStrListIterator it(adrTypeList_); 119 Q3StrListIterator it(adrTypeList_);
118 120
119 for (; it.current(); ++it) { 121 for (; it.current(); ++it) {
120 122
diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp
index 7ecef33..51ca12a 100644
--- a/kabc/vcard/AdrValue.cpp
+++ b/kabc/vcard/AdrValue.cpp
@@ -25,6 +25,9 @@
25#include <VCardAdrValue.h> 25#include <VCardAdrValue.h>
26#include <VCardValue.h> 26#include <VCardValue.h>
27#include <VCardDefines.h> 27#include <VCardDefines.h>
28//Added by qt3to4:
29#include <Q3StrList>
30#include <Q3CString>
28 31
29using namespace VCARD; 32using namespace VCARD;
30 33
@@ -45,7 +48,7 @@ AdrValue::AdrValue(const AdrValue & x)
45{ 48{
46} 49}
47 50
48AdrValue::AdrValue(const QCString & s) 51AdrValue::AdrValue(const Q3CString & s)
49 :Value(s) 52 :Value(s)
50{ 53{
51} 54}
@@ -68,7 +71,7 @@ AdrValue::operator = (AdrValue & x)
68} 71}
69 72
70 AdrValue & 73 AdrValue &
71AdrValue::operator = (const QCString & s) 74AdrValue::operator = (const Q3CString & s)
72{ 75{
73 Value::operator = (s); 76 Value::operator = (s);
74 return *this; 77 return *this;
@@ -105,7 +108,7 @@ AdrValue::_parse()
105{ 108{
106 vDebug("AdrValue::_parse()"); 109 vDebug("AdrValue::_parse()");
107 110
108 QStrList l; 111 Q3StrList l;
109 RTokenise(strRep_, ";", l); 112 RTokenise(strRep_, ";", l);
110 113
111 for (unsigned int i = 0; i < l.count(); i++) { 114 for (unsigned int i = 0; i < l.count(); i++) {
diff --git a/kabc/vcard/AgentParam.cpp b/kabc/vcard/AgentParam.cpp
index 5625e00..aae35ac 100644
--- a/kabc/vcard/AgentParam.cpp
+++ b/kabc/vcard/AgentParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardAgentParam.h> 24#include <VCardAgentParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -39,7 +41,7 @@ AgentParam::AgentParam(const AgentParam & x)
39{ 41{
40} 42}
41 43
42AgentParam::AgentParam(const QCString & s) 44AgentParam::AgentParam(const Q3CString & s)
43 :Param(s) 45 :Param(s)
44{ 46{
45} 47}
@@ -57,7 +59,7 @@ AgentParam::operator = (AgentParam & x)
57} 59}
58 60
59 AgentParam & 61 AgentParam &
60AgentParam::operator = (const QCString & s) 62AgentParam::operator = (const Q3CString & s)
61{ 63{
62 Param::operator = (s); 64 Param::operator = (s);
63 return *this; 65 return *this;
diff --git a/kabc/vcard/AgentValue.cpp b/kabc/vcard/AgentValue.cpp
index bccde80..14e73b1 100644
--- a/kabc/vcard/AgentValue.cpp
+++ b/kabc/vcard/AgentValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardAgentValue.h> 24#include <VCardAgentValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ AgentValue::AgentValue(const AgentValue & x)
37{ 39{
38} 40}
39 41
40AgentValue::AgentValue(const QCString & s) 42AgentValue::AgentValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ AgentValue::operator = (AgentValue & x)
52} 54}
53 55
54 AgentValue & 56 AgentValue &
55AgentValue::operator = (const QCString & s) 57AgentValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/ClassValue.cpp b/kabc/vcard/ClassValue.cpp
index f01e5a6..c088d7c 100644
--- a/kabc/vcard/ClassValue.cpp
+++ b/kabc/vcard/ClassValue.cpp
@@ -26,6 +26,8 @@
26#include <VCardValue.h> 26#include <VCardValue.h>
27 27
28#include <kdebug.h> 28#include <kdebug.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
@@ -40,7 +42,7 @@ ClassValue::ClassValue(const ClassValue & x)
40{ 42{
41} 43}
42 44
43ClassValue::ClassValue(const QCString & s) 45ClassValue::ClassValue(const Q3CString & s)
44 :Value(s) 46 :Value(s)
45{ 47{
46} 48}
@@ -58,7 +60,7 @@ ClassValue::operator = (ClassValue & x)
58} 60}
59 61
60 ClassValue & 62 ClassValue &
61ClassValue::operator = (const QCString & s) 63ClassValue::operator = (const Q3CString & s)
62{ 64{
63 Value::operator = (s); 65 Value::operator = (s);
64 return *this; 66 return *this;
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 0a2f97d..1d4886c 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -21,8 +21,8 @@
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <qstrlist.h> 25#include <q3strlist.h>
26#include <qregexp.h> 26#include <qregexp.h>
27 27
28#include <kdebug.h> 28#include <kdebug.h>
@@ -98,7 +98,7 @@ ContentLine::ContentLine(const ContentLine & x)
98 98
99} 99}
100 100
101ContentLine::ContentLine(const QCString & s) 101ContentLine::ContentLine(const Q3CString & s)
102 :Entity(s), 102 :Entity(s),
103 value_(0), 103 value_(0),
104 paramType_( ParamUnknown ), 104 paramType_( ParamUnknown ),
@@ -129,7 +129,7 @@ ContentLine::operator = (ContentLine & x)
129} 129}
130 130
131 ContentLine & 131 ContentLine &
132ContentLine::operator = (const QCString & s) 132ContentLine::operator = (const Q3CString & s)
133{ 133{
134 Entity::operator = (s); 134 Entity::operator = (s);
135 delete value_; 135 delete value_;
@@ -142,7 +142,7 @@ ContentLine::operator == (ContentLine & x)
142{ 142{
143 x.parse(); 143 x.parse();
144 144
145 QPtrListIterator<Param> it(x.paramList()); 145 Q3PtrListIterator<Param> it(x.paramList());
146 146
147 if (!paramList_.find(it.current())) 147 if (!paramList_.find(it.current()))
148 return false; 148 return false;
@@ -163,11 +163,11 @@ ContentLine::_parse()
163 163
164 // Unfold folded lines 164 // Unfold folded lines
165 // NLR 165 // NLR
166 strRep_ = strRep_.replace( QRegExp( "\\r" ), "" ); 166 strRep_ = strRep_.replace( "\\r" , "" );
167 // Unqote newlines 167 // Unqote newlines
168 strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" ); 168 strRep_ = strRep_.replace( "\\\\n", "\n" );
169 //NLR 169 //NLR
170 strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" ); 170 strRep_ = strRep_.replace( "\\\\r" , "\r" );
171 171
172 int split = strRep_.find(':'); 172 int split = strRep_.find(':');
173 173
@@ -176,8 +176,8 @@ ContentLine::_parse()
176 return; 176 return;
177 } 177 }
178 178
179 QCString firstPart(strRep_.left(split)); 179 Q3CString firstPart(strRep_.left(split));
180 QCString valuePart(strRep_.mid(split + 1)); 180 Q3CString valuePart(strRep_.mid(split + 1));
181 181
182 split = firstPart.find('.'); 182 split = firstPart.find('.');
183 183
@@ -192,7 +192,7 @@ ContentLine::_parse()
192 192
193 // Now we have the group, the name and param list together and the value. 193 // Now we have the group, the name and param list together and the value.
194 194
195 QStrList l; 195 Q3StrList l;
196 196
197 RTokenise(firstPart, ";", l); 197 RTokenise(firstPart, ";", l);
198 198
@@ -214,11 +214,11 @@ ContentLine::_parse()
214 214
215 // For each parameter, create a new parameter of the correct type. 215 // For each parameter, create a new parameter of the correct type.
216 216
217 QStrListIterator it(l); 217 Q3StrListIterator it(l);
218 218
219 for (; it.current(); ++it, i++) { 219 for (; it.current(); ++it, i++) {
220 220
221 QCString str = *it; 221 Q3CString str = *it;
222 222
223 split = str.find("="); 223 split = str.find("=");
224 if (split < 0 ) { 224 if (split < 0 ) {
@@ -226,13 +226,13 @@ ContentLine::_parse()
226 continue; 226 continue;
227 } 227 }
228 228
229 QCString paraName = str.left(split); 229 Q3CString paraName = str.left(split);
230 QCString paraValue = str.mid(split + 1); 230 Q3CString paraValue = str.mid(split + 1);
231 231
232 QStrList paraValues; 232 Q3StrList paraValues;
233 RTokenise(paraValue, ",", paraValues); 233 RTokenise(paraValue, ",", paraValues);
234 234
235 QStrListIterator it2( paraValues ); 235 Q3StrListIterator it2( paraValues );
236 236
237 for(; it2.current(); ++it2) { 237 for(; it2.current(); ++it2) {
238 238
@@ -309,7 +309,7 @@ ContentLine::_assemble()
309 vDebug("Assemble (argl) - my name is \"" + name_ + "\""); 309 vDebug("Assemble (argl) - my name is \"" + name_ + "\"");
310 strRep_.truncate(0); 310 strRep_.truncate(0);
311 311
312 QCString line; 312 Q3CString line;
313 313
314 if (!group_.isEmpty()) 314 if (!group_.isEmpty())
315 line += group_ + '.'; 315 line += group_ + '.';
diff --git a/kabc/vcard/DateParam.cpp b/kabc/vcard/DateParam.cpp
index 52af089..52fb828 100644
--- a/kabc/vcard/DateParam.cpp
+++ b/kabc/vcard/DateParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardDateParam.h> 24#include <VCardDateParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ DateParam::DateParam(const DateParam & x)
37{ 39{
38} 40}
39 41
40DateParam::DateParam(const QCString & s) 42DateParam::DateParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ DateParam::operator = (DateParam & x)
52} 54}
53 55
54 DateParam & 56 DateParam &
55DateParam::operator = (const QCString & s) 57DateParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp
index c5c5c85..87c7007 100644
--- a/kabc/vcard/DateValue.cpp
+++ b/kabc/vcard/DateValue.cpp
@@ -22,6 +22,8 @@
22*/ 22*/
23 23
24#include <qregexp.h> 24#include <qregexp.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26#include <kdebug.h> 28#include <kdebug.h>
27 29
@@ -105,7 +107,7 @@ DateValue::DateValue(const DateValue & x)
105 hasTime_ = x.hasTime_; 107 hasTime_ = x.hasTime_;
106} 108}
107 109
108DateValue::DateValue(const QCString & s) 110DateValue::DateValue(const Q3CString & s)
109 :Value(s) 111 :Value(s)
110{ 112{
111} 113}
@@ -120,7 +122,7 @@ DateValue::operator = (DateValue & x)
120} 122}
121 123
122 DateValue & 124 DateValue &
123DateValue::operator = (const QCString & s) 125DateValue::operator = (const Q3CString & s)
124{ 126{
125 Value::operator = (s); 127 Value::operator = (s);
126 return *this; 128 return *this;
@@ -154,8 +156,8 @@ DateValue::_parse()
154 156
155 int timeSep = strRep_.find('T'); 157 int timeSep = strRep_.find('T');
156 158
157 QCString dateStr; 159 Q3CString dateStr;
158 QCString timeStr; 160 Q3CString timeStr;
159 161
160 if (timeSep == -1) { 162 if (timeSep == -1) {
161 163
@@ -173,7 +175,7 @@ DateValue::_parse()
173 175
174 /////////////////////////////////////////////////////////////// DATE 176 /////////////////////////////////////////////////////////////// DATE
175 177
176 dateStr.replace(QRegExp("-"), ""); 178 dateStr.replace("-", "");
177 179
178 kdDebug(5710) << "dateStr: " << dateStr << endl; 180 kdDebug(5710) << "dateStr: " << dateStr << endl;
179 181
@@ -196,7 +198,7 @@ DateValue::_parse()
196 198
197 if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { 199 if (zoneSep != -1 && timeStr.length() - zoneSep > 3) {
198 200
199 QCString zoneStr(timeStr.mid(zoneSep + 1)); 201 Q3CString zoneStr(timeStr.mid(zoneSep + 1));
200 vDebug("zoneStr == " + zoneStr); 202 vDebug("zoneStr == " + zoneStr);
201 203
202 zonePositive_= (zoneStr[0] == '+'); 204 zonePositive_= (zoneStr[0] == '+');
@@ -211,13 +213,13 @@ DateValue::_parse()
211 int secFracSep = timeStr.findRev(','); 213 int secFracSep = timeStr.findRev(',');
212 214
213 if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. 215 if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors.
214 QCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); 216 Q3CString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep);
215 secFrac_ = quirkafleeg.toDouble(); 217 secFrac_ = quirkafleeg.toDouble();
216 } 218 }
217 219
218 /////////////////////////////////////////////////////////////// HMS 220 /////////////////////////////////////////////////////////////// HMS
219 221
220 timeStr.replace(QRegExp(":"), ""); 222 timeStr.replace(":", "");
221 223
222 hour_= timeStr.left(2).toInt(); 224 hour_= timeStr.left(2).toInt();
223 minute_= timeStr.mid(2, 2).toInt(); 225 minute_= timeStr.mid(2, 2).toInt();
@@ -229,9 +231,9 @@ DateValue::_assemble()
229{ 231{
230 vDebug("DateValue::_assemble"); 232 vDebug("DateValue::_assemble");
231 233
232 QCString year; 234 Q3CString year;
233 QCString month; 235 Q3CString month;
234 QCString day; 236 Q3CString day;
235 237
236 year.setNum( year_ ); 238 year.setNum( year_ );
237 month.setNum( month_ ); 239 month.setNum( month_ );
@@ -243,9 +245,9 @@ DateValue::_assemble()
243 strRep_ = year + '-' + month + '-' + day; 245 strRep_ = year + '-' + month + '-' + day;
244 246
245 if ( hasTime_ ) { 247 if ( hasTime_ ) {
246 QCString hour; 248 Q3CString hour;
247 QCString minute; 249 Q3CString minute;
248 QCString second; 250 Q3CString second;
249 251
250 hour.setNum( hour_ ); 252 hour.setNum( hour_ );
251 minute.setNum( minute_ ); 253 minute.setNum( minute_ );
diff --git a/kabc/vcard/EmailParam.cpp b/kabc/vcard/EmailParam.cpp
index 8c87477..877af60 100644
--- a/kabc/vcard/EmailParam.cpp
+++ b/kabc/vcard/EmailParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardEmailParam.h> 24#include <VCardEmailParam.h>
25#include <VCardParam.h> 25#include <VCardParam.h>
26#include <VCardDefines.h> 26#include <VCardDefines.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -40,7 +42,7 @@ EmailParam::EmailParam(const EmailParam & x)
40{ 42{
41} 43}
42 44
43EmailParam::EmailParam(const QCString & s) 45EmailParam::EmailParam(const Q3CString & s)
44 :Param(s) 46 :Param(s)
45{ 47{
46} 48}
@@ -58,7 +60,7 @@ EmailParam::operator = (EmailParam & x)
58} 60}
59 61
60 EmailParam & 62 EmailParam &
61EmailParam::operator = (const QCString & s) 63EmailParam::operator = (const Q3CString & s)
62{ 64{
63 Param::operator = (s); 65 Param::operator = (s);
64 return *this; 66 return *this;
diff --git a/kabc/vcard/Entity.cpp b/kabc/vcard/Entity.cpp
index b7d09e0..e38fa11 100644
--- a/kabc/vcard/Entity.cpp
+++ b/kabc/vcard/Entity.cpp
@@ -22,6 +22,8 @@
22*/ 22*/
23 23
24#include <VCardEntity.h> 24#include <VCardEntity.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26using namespace VCARD; 28using namespace VCARD;
27 29
@@ -40,7 +42,7 @@ Entity::Entity(const Entity & e)
40 // empty 42 // empty
41} 43}
42 44
43Entity::Entity(const QCString & s) 45Entity::Entity(const Q3CString & s)
44 : strRep_ (s), 46 : strRep_ (s),
45 parsed_ (false), 47 parsed_ (false),
46 assembled_(true) 48 assembled_(true)
@@ -61,7 +63,7 @@ Entity::operator = (const Entity & e)
61} 63}
62 64
63 Entity & 65 Entity &
64Entity::operator = (const QCString & s) 66Entity::operator = (const Q3CString & s)
65{ 67{
66 strRep_ = s; 68 strRep_ = s;
67 parsed_ = false; 69 parsed_ = false;
@@ -83,13 +85,13 @@ Entity::operator != (Entity & e)
83} 85}
84 86
85 bool 87 bool
86Entity::operator == (const QCString & s) 88Entity::operator == (const Q3CString & s)
87{ 89{
88 return asString() == s; 90 return asString() == s;
89} 91}
90 92
91 bool 93 bool
92Entity::operator != (const QCString & s) 94Entity::operator != (const Q3CString & s)
93{ 95{
94 return !(*this == s); 96 return !(*this == s);
95} 97}
@@ -99,7 +101,7 @@ Entity::~Entity()
99 // empty 101 // empty
100} 102}
101 103
102 QCString 104 Q3CString
103Entity::asString() 105Entity::asString()
104{ 106{
105 //vDebug("Entity::asString()"); 107 //vDebug("Entity::asString()");
diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp
index cc48b5a..036324c 100644
--- a/kabc/vcard/Enum.cpp
+++ b/kabc/vcard/Enum.cpp
@@ -21,7 +21,7 @@
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <ctype.h> 25#include <ctype.h>
26 26
27#include <VCardEnum.h> 27#include <VCardEnum.h>
@@ -29,7 +29,7 @@
29using namespace VCARD; 29using namespace VCARD;
30 30
31// There are 31 possible types, not including extensions. 31// There are 31 possible types, not including extensions.
32 const QCString 32 const Q3CString
33VCARD::paramNames [] = 33VCARD::paramNames [] =
34{ 34{
35 "NAME", 35 "NAME",
@@ -222,7 +222,7 @@ VCARD::EntityTypeToValueType(EntityType e)
222 return t; 222 return t;
223} 223}
224 224
225 QCString 225 Q3CString
226VCARD::EntityTypeToParamName(EntityType e) 226VCARD::EntityTypeToParamName(EntityType e)
227{ 227{
228 if ( e > EntityUnknown ) e = EntityUnknown; 228 if ( e > EntityUnknown ) e = EntityUnknown;
@@ -230,7 +230,7 @@ VCARD::EntityTypeToParamName(EntityType e)
230} 230}
231 231
232 EntityType 232 EntityType
233VCARD::EntityNameToEntityType(const QCString & s) 233VCARD::EntityNameToEntityType(const Q3CString & s)
234{ 234{
235 if (s.isEmpty()) return EntityUnknown; 235 if (s.isEmpty()) return EntityUnknown;
236 236
diff --git a/kabc/vcard/FloatValue.cpp b/kabc/vcard/FloatValue.cpp
index 15bb664..7065081 100644
--- a/kabc/vcard/FloatValue.cpp
+++ b/kabc/vcard/FloatValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardFloatValue.h> 24#include <VCardFloatValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -45,7 +47,7 @@ FloatValue::FloatValue(const FloatValue & x)
45 value_ = x.value_; 47 value_ = x.value_;
46} 48}
47 49
48FloatValue::FloatValue(const QCString & s) 50FloatValue::FloatValue(const Q3CString & s)
49 :Value(s) 51 :Value(s)
50{ 52{
51} 53}
@@ -63,7 +65,7 @@ FloatValue::operator = (FloatValue & x)
63} 65}
64 66
65 FloatValue & 67 FloatValue &
66FloatValue::operator = (const QCString & s) 68FloatValue::operator = (const Q3CString & s)
67{ 69{
68 Value::operator = (s); 70 Value::operator = (s);
69 return *this; 71 return *this;
@@ -101,7 +103,7 @@ FloatValue::_parse()
101 void 103 void
102FloatValue::_assemble() 104FloatValue::_assemble()
103{ 105{
104 strRep_ = QCString().setNum(value_); 106 strRep_ = Q3CString().setNum(value_);
105} 107}
106 108
107 float 109 float
diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp
index e02b402..ba57a6b 100644
--- a/kabc/vcard/GeoValue.cpp
+++ b/kabc/vcard/GeoValue.cpp
@@ -23,6 +23,8 @@
23#include <VCardValue.h> 23#include <VCardValue.h>
24 24
25#include <kdebug.h> 25#include <kdebug.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27using namespace VCARD; 29using namespace VCARD;
28 30
@@ -36,7 +38,7 @@ GeoValue::GeoValue(const GeoValue & x)
36{ 38{
37} 39}
38 40
39GeoValue::GeoValue(const QCString & s) 41GeoValue::GeoValue(const Q3CString & s)
40 :Value(s) 42 :Value(s)
41{ 43{
42} 44}
@@ -54,7 +56,7 @@ GeoValue::operator = (GeoValue & x)
54} 56}
55 57
56 GeoValue & 58 GeoValue &
57GeoValue::operator = (const QCString & s) 59GeoValue::operator = (const Q3CString & s)
58{ 60{
59 Value::operator = (s); 61 Value::operator = (s);
60 return *this; 62 return *this;
diff --git a/kabc/vcard/ImageParam.cpp b/kabc/vcard/ImageParam.cpp
index c9cf6fd..6da317d 100644
--- a/kabc/vcard/ImageParam.cpp
+++ b/kabc/vcard/ImageParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardImageParam.h> 24#include <VCardImageParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ ImageParam::ImageParam(const ImageParam & x)
37{ 39{
38} 40}
39 41
40ImageParam::ImageParam(const QCString & s) 42ImageParam::ImageParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ ImageParam::operator = (ImageParam & x)
52} 54}
53 55
54 ImageParam & 56 ImageParam &
55ImageParam::operator = (const QCString & s) 57ImageParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/ImageValue.cpp b/kabc/vcard/ImageValue.cpp
index 4630fac..678a81c 100644
--- a/kabc/vcard/ImageValue.cpp
+++ b/kabc/vcard/ImageValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardImageValue.h> 24#include <VCardImageValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ ImageValue::ImageValue(const ImageValue & x)
37{ 39{
38} 40}
39 41
40ImageValue::ImageValue(const QCString & s) 42ImageValue::ImageValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ ImageValue::operator = (ImageValue & x)
52} 54}
53 55
54 ImageValue & 56 ImageValue &
55ImageValue::operator = (const QCString & s) 57ImageValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/ImgValue.cpp b/kabc/vcard/ImgValue.cpp
index 7b961f8..1b289df 100644
--- a/kabc/vcard/ImgValue.cpp
+++ b/kabc/vcard/ImgValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardImgValue.h> 24#include <VCardImgValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ ImgValue::ImgValue(const ImgValue & x)
37{ 39{
38} 40}
39 41
40ImgValue::ImgValue(const QCString & s) 42ImgValue::ImgValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ ImgValue::operator = (ImgValue & x)
52} 54}
53 55
54 ImgValue & 56 ImgValue &
55ImgValue::operator = (const QCString & s) 57ImgValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp
index edf1804..52a0204 100644
--- a/kabc/vcard/LangValue.cpp
+++ b/kabc/vcard/LangValue.cpp
@@ -26,6 +26,9 @@
26#include <VCardLangValue.h> 26#include <VCardLangValue.h>
27 27
28#include <VCardValue.h> 28#include <VCardValue.h>
29//Added by qt3to4:
30#include <Q3CString>
31#include <Q3StrList>
29 32
30using namespace VCARD; 33using namespace VCARD;
31 34
@@ -39,7 +42,7 @@ LangValue::LangValue(const LangValue & x)
39{ 42{
40} 43}
41 44
42LangValue::LangValue(const QCString & s) 45LangValue::LangValue(const Q3CString & s)
43 :Value(s) 46 :Value(s)
44{ 47{
45} 48}
@@ -54,7 +57,7 @@ LangValue::operator = (LangValue & x)
54} 57}
55 58
56 LangValue & 59 LangValue &
57LangValue::operator = (const QCString & s) 60LangValue::operator = (const Q3CString & s)
58{ 61{
59 Value::operator = (s); 62 Value::operator = (s);
60 return *this; 63 return *this;
@@ -74,7 +77,7 @@ LangValue::~LangValue()
74 void 77 void
75LangValue::_parse() 78LangValue::_parse()
76{ 79{
77 QStrList l; 80 Q3StrList l;
78 RTokenise(strRep_, "-", l); 81 RTokenise(strRep_, "-", l);
79 82
80 if (l.count() == 0) return; 83 if (l.count() == 0) return;
@@ -91,20 +94,21 @@ LangValue::_assemble()
91{ 94{
92 strRep_ = primary_; 95 strRep_ = primary_;
93 96
94 QStrListIterator it(subtags_); 97 Q3StrListIterator it(subtags_);
95 98
96 for (; it.current(); ++it) 99 for (; it.current(); ++it) {
97 strRep_ += QCString('-') + it.current(); 100 strRep_ += Q3CString('-'); strRep_ += it.current();
101 }
98} 102}
99 103
100 QCString 104 Q3CString
101LangValue::primary() 105LangValue::primary()
102{ 106{
103 parse(); 107 parse();
104 return primary_; 108 return primary_;
105} 109}
106 110
107 QStrList 111 Q3StrList
108LangValue::subtags() 112LangValue::subtags()
109{ 113{
110 parse(); 114 parse();
@@ -112,14 +116,14 @@ LangValue::subtags()
112} 116}
113 117
114 void 118 void
115LangValue::setPrimary(const QCString & s) 119LangValue::setPrimary(const Q3CString & s)
116{ 120{
117 parse(); 121 parse();
118 primary_ = s; 122 primary_ = s;
119} 123}
120 124
121 void 125 void
122LangValue::setSubTags(const QStrList & l) 126LangValue::setSubTags(const Q3StrList & l)
123{ 127{
124 parse(); 128 parse();
125 subtags_ = l; 129 subtags_ = l;
diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp
index cdec621..6c0f365 100644
--- a/kabc/vcard/NValue.cpp
+++ b/kabc/vcard/NValue.cpp
@@ -21,7 +21,9 @@
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qstrlist.h> 24#include <q3strlist.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26#include <VCardRToken.h> 28#include <VCardRToken.h>
27#include <VCardNValue.h> 29#include <VCardNValue.h>
@@ -46,7 +48,7 @@ NValue::NValue(const NValue & x)
46{ 48{
47} 49}
48 50
49NValue::NValue(const QCString & s) 51NValue::NValue(const Q3CString & s)
50 :Value(s) 52 :Value(s)
51{ 53{
52 vDebug("ctor"); 54 vDebug("ctor");
@@ -68,7 +70,7 @@ NValue::operator = (NValue & x)
68} 70}
69 71
70 NValue & 72 NValue &
71NValue::operator = (const QCString & s) 73NValue::operator = (const Q3CString & s)
72{ 74{
73 Value::operator = (s); 75 Value::operator = (s);
74 return *this; 76 return *this;
@@ -100,7 +102,7 @@ NValue::clone()
100 void 102 void
101NValue::_parse() 103NValue::_parse()
102{ 104{
103 QStrList l; 105 Q3StrList l;
104 RTokenise(strRep_, ";", l); 106 RTokenise(strRep_, ";", l);
105 107
106 for (unsigned int i = 0; i < l.count(); i++) { 108 for (unsigned int i = 0; i < l.count(); i++) {
diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp
index c3134c8..a6a32dd 100644
--- a/kabc/vcard/OrgValue.cpp
+++ b/kabc/vcard/OrgValue.cpp
@@ -26,6 +26,8 @@
26#include <VCardOrgValue.h> 26#include <VCardOrgValue.h>
27 27
28#include <VCardValue.h> 28#include <VCardValue.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
@@ -39,7 +41,7 @@ OrgValue::OrgValue(const OrgValue & x)
39{ 41{
40} 42}
41 43
42OrgValue::OrgValue(const QCString & s) 44OrgValue::OrgValue(const Q3CString & s)
43 :Value(s) 45 :Value(s)
44{ 46{
45} 47}
@@ -54,7 +56,7 @@ OrgValue::operator = (OrgValue & x)
54} 56}
55 57
56 OrgValue & 58 OrgValue &
57OrgValue::operator = (const QCString & s) 59OrgValue::operator = (const Q3CString & s)
58{ 60{
59 Value::operator = (s); 61 Value::operator = (s);
60 return *this; 62 return *this;
@@ -82,7 +84,7 @@ OrgValue::_assemble()
82{ 84{
83 bool first(true); 85 bool first(true);
84 86
85 QStrListIterator it(valueList_); 87 Q3StrListIterator it(valueList_);
86 88
87 for (; it.current(); ++it) { 89 for (; it.current(); ++it) {
88 if (!first) strRep_ += ';'; 90 if (!first) strRep_ += ';';
@@ -98,7 +100,7 @@ OrgValue::numValues()
98 return valueList_.count(); 100 return valueList_.count();
99} 101}
100 102
101 QCString 103 Q3CString
102OrgValue::value(unsigned int i) 104OrgValue::value(unsigned int i)
103{ 105{
104 parse(); 106 parse();
diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp
index c513613..bd6b299 100644
--- a/kabc/vcard/Param.cpp
+++ b/kabc/vcard/Param.cpp
@@ -26,6 +26,8 @@
26#include <VCardEntity.h> 26#include <VCardEntity.h>
27 27
28#include <VCardRToken.h> 28#include <VCardRToken.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
@@ -43,7 +45,7 @@ Param::Param(const Param & x)
43{ 45{
44} 46}
45 47
46Param::Param(const QCString & s) 48Param::Param(const Q3CString & s)
47 :Entity(s), 49 :Entity(s),
48 name_(""), 50 name_(""),
49 value_("") 51 value_("")
@@ -63,7 +65,7 @@ Param::operator = (Param & x)
63} 65}
64 66
65 Param & 67 Param &
66Param::operator = (const QCString & s) 68Param::operator = (const Q3CString & s)
67{ 69{
68 Entity::operator = (s); 70 Entity::operator = (s);
69 return *this; 71 return *this;
@@ -91,7 +93,7 @@ Param::_assemble()
91 strRep_ = name_ + "=" + value_; 93 strRep_ = name_ + "=" + value_;
92} 94}
93 95
94Param::Param(const QCString &name, const QCString &value) 96Param::Param(const Q3CString &name, const Q3CString &value)
95 :Entity(), 97 :Entity(),
96 name_(name), 98 name_(name),
97 value_(value) 99 value_(value)
@@ -101,7 +103,7 @@ Param::Param(const QCString &name, const QCString &value)
101} 103}
102 104
103 void 105 void
104Param::setName(const QCString & name) 106Param::setName(const Q3CString & name)
105{ 107{
106 name_ = name; 108 name_ = name;
107 109
@@ -109,20 +111,20 @@ Param::setName(const QCString & name)
109} 111}
110 112
111 void 113 void
112Param::setValue(const QCString & value) 114Param::setValue(const Q3CString & value)
113{ 115{
114 value_ = value; 116 value_ = value;
115 117
116 assembled_ = false; 118 assembled_ = false;
117} 119}
118 120
119 QCString 121 Q3CString
120Param::name() 122Param::name()
121{ 123{
122 return name_; 124 return name_;
123} 125}
124 126
125 QCString 127 Q3CString
126Param::value() 128Param::value()
127{ 129{
128 return value_; 130 return value_;
diff --git a/kabc/vcard/PhoneNumberValue.cpp b/kabc/vcard/PhoneNumberValue.cpp
index 17b1400..57aa336 100644
--- a/kabc/vcard/PhoneNumberValue.cpp
+++ b/kabc/vcard/PhoneNumberValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardPhoneNumberValue.h> 24#include <VCardPhoneNumberValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x)
37{ 39{
38} 40}
39 41
40PhoneNumberValue::PhoneNumberValue(const QCString & s) 42PhoneNumberValue::PhoneNumberValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ PhoneNumberValue::operator = (PhoneNumberValue & x)
52} 54}
53 55
54 PhoneNumberValue & 56 PhoneNumberValue &
55PhoneNumberValue::operator = (const QCString & s) 57PhoneNumberValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/RToken.cpp b/kabc/vcard/RToken.cpp
index 2a85820..8fc0558 100644
--- a/kabc/vcard/RToken.cpp
+++ b/kabc/vcard/RToken.cpp
@@ -24,14 +24,14 @@
24 24
25#include <string.h> 25#include <string.h>
26#include <stddef.h> 26#include <stddef.h>
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30namespace VCARD 30namespace VCARD
31{ 31{
32 32
33 Q_UINT32 33 Q_UINT32
34RTokenise(const char * str, const char * delim, QStrList & l) 34RTokenise(const char * str, const char * delim, Q3StrList & l)
35{ 35{
36 // FIXME no stderr ! 36 // FIXME no stderr !
37 l.clear(); 37 l.clear();
diff --git a/kabc/vcard/SoundValue.cpp b/kabc/vcard/SoundValue.cpp
index 81040d1..4d098d2 100644
--- a/kabc/vcard/SoundValue.cpp
+++ b/kabc/vcard/SoundValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardSoundValue.h> 24#include <VCardSoundValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ SoundValue::SoundValue(const SoundValue & x)
37{ 39{
38} 40}
39 41
40SoundValue::SoundValue(const QCString & s) 42SoundValue::SoundValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ SoundValue::operator = (SoundValue & x)
52} 54}
53 55
54 SoundValue & 56 SoundValue &
55SoundValue::operator = (const QCString & s) 57SoundValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp
index cd51cbd..8f02113 100644
--- a/kabc/vcard/SourceParam.cpp
+++ b/kabc/vcard/SourceParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardSourceParam.h> 24#include <VCardSourceParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -41,7 +43,7 @@ SourceParam::SourceParam(const SourceParam & x)
41{ 43{
42} 44}
43 45
44SourceParam::SourceParam(const QCString & s) 46SourceParam::SourceParam(const Q3CString & s)
45 :Param(s), 47 :Param(s),
46 type_(SourceParam::TypeUnknown) 48 type_(SourceParam::TypeUnknown)
47{ 49{
@@ -60,7 +62,7 @@ SourceParam::operator = (SourceParam & x)
60} 62}
61 63
62 SourceParam & 64 SourceParam &
63SourceParam::operator = (const QCString & s) 65SourceParam::operator = (const Q3CString & s)
64{ 66{
65 Param::operator = (s); 67 Param::operator = (s);
66 return *this; 68 return *this;
diff --git a/kabc/vcard/TelParam.cpp b/kabc/vcard/TelParam.cpp
index 9d9fe4d..4bc8b6a 100644
--- a/kabc/vcard/TelParam.cpp
+++ b/kabc/vcard/TelParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardTelParam.h> 24#include <VCardTelParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ TelParam::TelParam(const TelParam & x)
37{ 39{
38} 40}
39 41
40TelParam::TelParam(const QCString & s) 42TelParam::TelParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ TelParam::operator = (TelParam & x)
52} 54}
53 55
54 TelParam & 56 TelParam &
55TelParam::operator = (const QCString & s) 57TelParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/TelValue.cpp b/kabc/vcard/TelValue.cpp
index 349f99a..d9cbf3e 100644
--- a/kabc/vcard/TelValue.cpp
+++ b/kabc/vcard/TelValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardTelValue.h> 24#include <VCardTelValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ TelValue::TelValue(const TelValue & x)
37{ 39{
38} 40}
39 41
40TelValue::TelValue(const QCString & s) 42TelValue::TelValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ TelValue::operator = (TelValue & x)
52} 54}
53 55
54 TelValue & 56 TelValue &
55TelValue::operator = (const QCString & s) 57TelValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/TextBinParam.cpp b/kabc/vcard/TextBinParam.cpp
index 66f2946..2866c12 100644
--- a/kabc/vcard/TextBinParam.cpp
+++ b/kabc/vcard/TextBinParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardTextBinParam.h> 24#include <VCardTextBinParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ TextBinParam::TextBinParam(const TextBinParam & x)
37{ 39{
38} 40}
39 41
40TextBinParam::TextBinParam(const QCString & s) 42TextBinParam::TextBinParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ TextBinParam::operator = (TextBinParam & x)
52} 54}
53 55
54 TextBinParam & 56 TextBinParam &
55TextBinParam::operator = (const QCString & s) 57TextBinParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/TextBinValue.cpp b/kabc/vcard/TextBinValue.cpp
index c584009..a3a96ae 100644
--- a/kabc/vcard/TextBinValue.cpp
+++ b/kabc/vcard/TextBinValue.cpp
@@ -25,6 +25,8 @@
25 25
26#include <VCardTextBinValue.h> 26#include <VCardTextBinValue.h>
27#include <VCardValue.h> 27#include <VCardValue.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29using namespace VCARD; 31using namespace VCARD;
30 32
@@ -41,7 +43,7 @@ TextBinValue::TextBinValue(const TextBinValue & x)
41 mUrl_ = x.mUrl_; 43 mUrl_ = x.mUrl_;
42} 44}
43 45
44TextBinValue::TextBinValue(const QCString & s) 46TextBinValue::TextBinValue(const Q3CString & s)
45 :Value(s) 47 :Value(s)
46{ 48{
47} 49}
@@ -60,7 +62,7 @@ TextBinValue::operator = (TextBinValue & x)
60} 62}
61 63
62 TextBinValue & 64 TextBinValue &
63TextBinValue::operator = (const QCString & s) 65TextBinValue::operator = (const Q3CString & s)
64{ 66{
65 Value::operator = (s); 67 Value::operator = (s);
66 return *this; 68 return *this;
diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp
index c4ac1e3..919f4f7 100644
--- a/kabc/vcard/TextListValue.cpp
+++ b/kabc/vcard/TextListValue.cpp
@@ -26,6 +26,8 @@
26#include <VCardTextListValue.h> 26#include <VCardTextListValue.h>
27 27
28#include <VCardValue.h> 28#include <VCardValue.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30using namespace VCARD; 32using namespace VCARD;
31 33
@@ -39,7 +41,7 @@ TextListValue::TextListValue(const TextListValue & x)
39{ 41{
40} 42}
41 43
42TextListValue::TextListValue(const QCString & s) 44TextListValue::TextListValue(const Q3CString & s)
43 :Value(s) 45 :Value(s)
44{ 46{
45} 47}
@@ -54,7 +56,7 @@ TextListValue::operator = (TextListValue & x)
54} 56}
55 57
56 TextListValue & 58 TextListValue &
57TextListValue::operator = (const QCString & s) 59TextListValue::operator = (const Q3CString & s)
58{ 60{
59 Value::operator = (s); 61 Value::operator = (s);
60 return *this; 62 return *this;
@@ -82,7 +84,7 @@ TextListValue::_assemble()
82{ 84{
83 bool first(true); 85 bool first(true);
84 86
85 QStrListIterator it(valueList_); 87 Q3StrListIterator it(valueList_);
86 88
87 for (; it.current(); ++it) { 89 for (; it.current(); ++it) {
88 if (!first) strRep_ += ';'; 90 if (!first) strRep_ += ';';
@@ -98,7 +100,7 @@ TextListValue::numValues()
98 return valueList_.count(); 100 return valueList_.count();
99} 101}
100 102
101 QCString 103 Q3CString
102TextListValue::value(unsigned int i) 104TextListValue::value(unsigned int i)
103{ 105{
104 parse(); 106 parse();
diff --git a/kabc/vcard/TextParam.cpp b/kabc/vcard/TextParam.cpp
index 7c68700..ce6661f 100644
--- a/kabc/vcard/TextParam.cpp
+++ b/kabc/vcard/TextParam.cpp
@@ -24,6 +24,8 @@
24#include <VCardTextParam.h> 24#include <VCardTextParam.h>
25 25
26#include <VCardParam.h> 26#include <VCardParam.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ TextParam::TextParam(const TextParam & x)
37{ 39{
38} 40}
39 41
40TextParam::TextParam(const QCString & s) 42TextParam::TextParam(const Q3CString & s)
41 :Param(s) 43 :Param(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ TextParam::operator = (TextParam & x)
52} 54}
53 55
54 TextParam & 56 TextParam &
55TextParam::operator = (const QCString & s) 57TextParam::operator = (const Q3CString & s)
56{ 58{
57 Param::operator = (s); 59 Param::operator = (s);
58 return *this; 60 return *this;
diff --git a/kabc/vcard/TextValue.cpp b/kabc/vcard/TextValue.cpp
index 09934fa..d0d2996 100644
--- a/kabc/vcard/TextValue.cpp
+++ b/kabc/vcard/TextValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardTextValue.h> 24#include <VCardTextValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -37,7 +39,7 @@ TextValue::TextValue(const TextValue & x)
37{ 39{
38} 40}
39 41
40TextValue::TextValue(const QCString & s) 42TextValue::TextValue(const Q3CString & s)
41 :Value(s) 43 :Value(s)
42{ 44{
43} 45}
@@ -52,7 +54,7 @@ TextValue::operator = (TextValue & x)
52} 54}
53 55
54 TextValue & 56 TextValue &
55TextValue::operator = (const QCString & s) 57TextValue::operator = (const Q3CString & s)
56{ 58{
57 Value::operator = (s); 59 Value::operator = (s);
58 return *this; 60 return *this;
@@ -61,7 +63,7 @@ TextValue::operator = (const QCString & s)
61 bool 63 bool
62TextValue::operator == (TextValue & x) 64TextValue::operator == (TextValue & x)
63{ 65{
64 return strRep_ = x.strRep_; 66 return strRep_ == x.strRep_;
65} 67}
66 68
67TextValue::~TextValue() 69TextValue::~TextValue()
diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp
index c1d1022..26da7f4 100644
--- a/kabc/vcard/URIValue.cpp
+++ b/kabc/vcard/URIValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardURIValue.h> 24#include <VCardURIValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -32,7 +34,7 @@ URIValue::URIValue()
32{ 34{
33} 35}
34 36
35URIValue::URIValue(const QCString & scheme, const QCString & schemeSpecificPart) 37URIValue::URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart)
36 :Value(), 38 :Value(),
37 scheme_ (scheme), 39 scheme_ (scheme),
38 schemeSpecificPart_(schemeSpecificPart) 40 schemeSpecificPart_(schemeSpecificPart)
@@ -47,7 +49,7 @@ URIValue::URIValue(const URIValue & x)
47{ 49{
48} 50}
49 51
50URIValue::URIValue(const QCString & s) 52URIValue::URIValue(const Q3CString & s)
51 :Value(s) 53 :Value(s)
52{ 54{
53} 55}
@@ -65,7 +67,7 @@ URIValue::operator = (URIValue & x)
65} 67}
66 68
67 URIValue & 69 URIValue &
68URIValue::operator = (const QCString & s) 70URIValue::operator = (const Q3CString & s)
69{ 71{
70 Value::operator = (s); 72 Value::operator = (s);
71 return *this; 73 return *this;
@@ -103,14 +105,14 @@ URIValue::_assemble()
103 strRep_ = scheme_ + ':' + schemeSpecificPart_; 105 strRep_ = scheme_ + ':' + schemeSpecificPart_;
104} 106}
105 107
106 QCString 108 Q3CString
107URIValue::scheme() 109URIValue::scheme()
108{ 110{
109 parse(); 111 parse();
110 return scheme_; 112 return scheme_;
111} 113}
112 114
113 QCString 115 Q3CString
114URIValue::schemeSpecificPart() 116URIValue::schemeSpecificPart()
115{ 117{
116 parse(); 118 parse();
@@ -118,14 +120,14 @@ URIValue::schemeSpecificPart()
118} 120}
119 121
120 void 122 void
121URIValue::setScheme(const QCString & s) 123URIValue::setScheme(const Q3CString & s)
122{ 124{
123 parse(); 125 parse();
124 scheme_ = s; 126 scheme_ = s;
125} 127}
126 128
127 void 129 void
128URIValue::setSchemeSpecificPart(const QCString & s) 130URIValue::setSchemeSpecificPart(const Q3CString & s)
129{ 131{
130 parse(); 132 parse();
131 schemeSpecificPart_ = s; 133 schemeSpecificPart_ = s;
diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp
index 374306c..f35d986 100644
--- a/kabc/vcard/UTCValue.cpp
+++ b/kabc/vcard/UTCValue.cpp
@@ -24,6 +24,8 @@
24#include <VCardUTCValue.h> 24#include <VCardUTCValue.h>
25 25
26#include <VCardValue.h> 26#include <VCardValue.h>
27//Added by qt3to4:
28#include <Q3CString>
27 29
28using namespace VCARD; 30using namespace VCARD;
29 31
@@ -38,7 +40,7 @@ UTCValue::UTCValue(const UTCValue & x)
38{ 40{
39} 41}
40 42
41UTCValue::UTCValue(const QCString & s) 43UTCValue::UTCValue(const Q3CString & s)
42 :Value(s) 44 :Value(s)
43{ 45{
44} 46}
@@ -57,7 +59,7 @@ UTCValue::operator = (UTCValue & x)
57} 59}
58 60
59 UTCValue & 61 UTCValue &
60UTCValue::operator = (const QCString & s) 62UTCValue::operator = (const Q3CString & s)
61{ 63{
62 Value::operator = (s); 64 Value::operator = (s);
63 return *this; 65 return *this;
diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp
index a2ff327..bae5385 100644
--- a/kabc/vcard/VCardEntity.cpp
+++ b/kabc/vcard/VCardEntity.cpp
@@ -23,6 +23,8 @@
23 23
24#include <qregexp.h> 24#include <qregexp.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27#include <VCardDefines.h> 29#include <VCardDefines.h>
28#include <VCardVCardEntity.h> 30#include <VCardVCardEntity.h>
@@ -41,7 +43,7 @@ VCardEntity::VCardEntity(const VCardEntity & x)
41 cardList_.setAutoDelete( TRUE ); 43 cardList_.setAutoDelete( TRUE );
42} 44}
43 45
44VCardEntity::VCardEntity(const QCString & s) 46VCardEntity::VCardEntity(const Q3CString & s)
45 :Entity(s) 47 :Entity(s)
46{ 48{
47 cardList_.setAutoDelete( TRUE ); 49 cardList_.setAutoDelete( TRUE );
@@ -57,7 +59,7 @@ VCardEntity::operator = (VCardEntity & x)
57} 59}
58 60
59 VCardEntity & 61 VCardEntity &
60VCardEntity::operator = (const QCString & s) 62VCardEntity::operator = (const Q3CString & s)
61{ 63{
62 Entity::operator = (s); 64 Entity::operator = (s);
63 return *this; 65 return *this;
@@ -83,7 +85,7 @@ VCardEntity::_parse()
83 int num = 0; 85 int num = 0;
84 // old code 86 // old code
85 vDebug("parse"); 87 vDebug("parse");
86 QCString s(strRep_); 88 Q3CString s(strRep_);
87 89
88 int i = s.find(QRegExp("BEGIN:VCARD", false)); 90 int i = s.find(QRegExp("BEGIN:VCARD", false));
89 91
@@ -91,7 +93,7 @@ VCardEntity::_parse()
91 93
92 i = s.find(QRegExp("BEGIN:VCARD", false), 11); 94 i = s.find(QRegExp("BEGIN:VCARD", false), 11);
93 95
94 QCString cardStr(s.left(i)); 96 Q3CString cardStr(s.left(i));
95 97
96 VCard * v = new VCard(cardStr); 98 VCard * v = new VCard(cardStr);
97 99
@@ -132,7 +134,7 @@ VCardEntity::_parse()
132 if ( i <= len ) { 134 if ( i <= len ) {
133 ++num; 135 ++num;
134 char* dat = strRep_.data()+start; 136 char* dat = strRep_.data()+start;
135 VCard * v = new VCard( QCString ( dat,i-start ) ); 137 VCard * v = new VCard( Q3CString ( dat,i-start ) );
136 start = i; 138 start = i;
137 cardList_.append(v); 139 cardList_.append(v);
138 v->parse(); 140 v->parse();
diff --git a/kabc/vcard/VCardv.cpp b/kabc/vcard/VCardv.cpp
index bad2ef1..5dd675d 100644
--- a/kabc/vcard/VCardv.cpp
+++ b/kabc/vcard/VCardv.cpp
@@ -21,11 +21,11 @@
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22*/ 22*/
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <qstrlist.h> 25#include <q3strlist.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27#include <qstring.h> 27#include <qstring.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29 29
30#include <VCardEntity.h> 30#include <VCardEntity.h>
31#include <VCardVCard.h> 31#include <VCardVCard.h>
@@ -48,7 +48,7 @@ VCard::VCard(const VCard & x)
48{ 48{
49 contentLineList_.setAutoDelete( TRUE ); 49 contentLineList_.setAutoDelete( TRUE );
50 50
51 QPtrListIterator<ContentLine> it(x.contentLineList_); 51 Q3PtrListIterator<ContentLine> it(x.contentLineList_);
52 for (; it.current(); ++it) { 52 for (; it.current(); ++it) {
53 ContentLine * c = new ContentLine(*it.current()); 53 ContentLine * c = new ContentLine(*it.current());
54 contentLineList_.append(c); 54 contentLineList_.append(c);
@@ -56,7 +56,7 @@ VCard::VCard(const VCard & x)
56 56
57} 57}
58 58
59VCard::VCard(const QCString & s) 59VCard::VCard(const Q3CString & s)
60 :Entity(s) 60 :Entity(s)
61{ 61{
62 contentLineList_.setAutoDelete( TRUE ); 62 contentLineList_.setAutoDelete( TRUE );
@@ -68,7 +68,7 @@ VCard::operator = (VCard & x)
68 if (*this == x) return *this; 68 if (*this == x) return *this;
69 69
70 group_ = x.group(); 70 group_ = x.group();
71 QPtrListIterator<ContentLine> it(x.contentLineList_); 71 Q3PtrListIterator<ContentLine> it(x.contentLineList_);
72 for (; it.current(); ++it) { 72 for (; it.current(); ++it) {
73 ContentLine * c = new ContentLine(*it.current()); 73 ContentLine * c = new ContentLine(*it.current());
74 contentLineList_.append(c); 74 contentLineList_.append(c);
@@ -79,7 +79,7 @@ VCard::operator = (VCard & x)
79} 79}
80 80
81 VCard & 81 VCard &
82VCard::operator = (const QCString & s) 82VCard::operator = (const Q3CString & s)
83{ 83{
84 Entity::operator = (s); 84 Entity::operator = (s);
85 return *this; 85 return *this;
@@ -101,7 +101,7 @@ VCard::_parse()
101{ 101{
102 102
103 QStringList l; 103 QStringList l;
104 QStrList sl; 104 Q3StrList sl;
105 105
106 RTokenise(strRep_, "\r\n", sl); 106 RTokenise(strRep_, "\r\n", sl);
107 107
@@ -109,7 +109,8 @@ VCard::_parse()
109 //qDebug("invalid vcard "); 109 //qDebug("invalid vcard ");
110 return; 110 return;
111 } 111 }
112 l = QStringList::fromStrList( sl ); 112 for(Q3StrList::iterator i=sl.begin();i!=sl.end();++i)
113 l.push_back(*i);
113 // Get the first line 114 // Get the first line
114 QString beginLine = l[0].stripWhiteSpace(); 115 QString beginLine = l[0].stripWhiteSpace();
115 116
@@ -180,7 +181,7 @@ VCard::_parse()
180 } 181 }
181 QStringList::Iterator it2 = refolded.begin(); 182 QStringList::Iterator it2 = refolded.begin();
182 for (; it2 != refolded.end(); ++it2) { 183 for (; it2 != refolded.end(); ++it2) {
183 ContentLine * cl = new ContentLine(QCString((*it2).latin1())); 184 ContentLine * cl = new ContentLine(Q3CString((*it2).latin1()));
184 cl->parse(); 185 cl->parse();
185 if (cl->value() == 0) 186 if (cl->value() == 0)
186 { 187 {
@@ -228,7 +229,7 @@ VCard::_assemble()
228 strRep_ = "BEGIN:VCARD\r\n"; 229 strRep_ = "BEGIN:VCARD\r\n";
229 strRep_ += "VERSION:3.0\r\n"; 230 strRep_ += "VERSION:3.0\r\n";
230 231
231 QPtrListIterator<ContentLine> it(contentLineList_); 232 Q3PtrListIterator<ContentLine> it(contentLineList_);
232 233
233 for (; it.current(); ++it) 234 for (; it.current(); ++it)
234 strRep_ += it.current()->asString() + "\r\n"; 235 strRep_ += it.current()->asString() + "\r\n";
@@ -244,7 +245,7 @@ VCard::has(EntityType t)
244} 245}
245 246
246 bool 247 bool
247VCard::has(const QCString & s) 248VCard::has(const Q3CString & s)
248{ 249{
249 parse(); 250 parse();
250 return contentLine(s) == 0 ? false : true; 251 return contentLine(s) == 0 ? false : true;
@@ -259,7 +260,7 @@ VCard::add(const ContentLine & cl)
259} 260}
260 261
261 void 262 void
262VCard::add(const QCString & s) 263VCard::add(const Q3CString & s)
263{ 264{
264 parse(); 265 parse();
265 ContentLine * c = new ContentLine(s); 266 ContentLine * c = new ContentLine(s);
@@ -270,7 +271,7 @@ VCard::add(const QCString & s)
270VCard::contentLine(EntityType t) 271VCard::contentLine(EntityType t)
271{ 272{
272 parse(); 273 parse();
273 QPtrListIterator<ContentLine> it(contentLineList_); 274 Q3PtrListIterator<ContentLine> it(contentLineList_);
274 275
275 for (; it.current(); ++it) 276 for (; it.current(); ++it)
276 if (it.current()->entityType() == t) 277 if (it.current()->entityType() == t)
@@ -280,10 +281,10 @@ VCard::contentLine(EntityType t)
280} 281}
281 282
282 ContentLine * 283 ContentLine *
283VCard::contentLine(const QCString & s) 284VCard::contentLine(const Q3CString & s)
284{ 285{
285 parse(); 286 parse();
286 QPtrListIterator<ContentLine> it(contentLineList_); 287 Q3PtrListIterator<ContentLine> it(contentLineList_);
287 288
288 for (; it.current(); ++it) 289 for (; it.current(); ++it)
289 if (it.current()->entityType() == EntityNameToEntityType(s)) 290 if (it.current()->entityType() == EntityNameToEntityType(s))
diff --git a/kabc/vcard/Value.cpp b/kabc/vcard/Value.cpp
index 1978af2..3a4d406 100644
--- a/kabc/vcard/Value.cpp
+++ b/kabc/vcard/Value.cpp
@@ -23,6 +23,8 @@
23 23
24#include <VCardEntity.h> 24#include <VCardEntity.h>
25#include <VCardValue.h> 25#include <VCardValue.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27using namespace VCARD; 29using namespace VCARD;
28 30
@@ -36,7 +38,7 @@ Value::Value(const Value & x)
36{ 38{
37} 39}
38 40
39Value::Value(const QCString & s) 41Value::Value(const Q3CString & s)
40 :Entity(s) 42 :Entity(s)
41{ 43{
42} 44}
@@ -51,7 +53,7 @@ Value::operator = (Value & x)
51} 53}
52 54
53 Value & 55 Value &
54Value::operator = (const QCString & s) 56Value::operator = (const Q3CString & s)
55{ 57{
56 Entity::operator = (s); 58 Entity::operator = (s);
57 return *this; 59 return *this;
diff --git a/kabc/vcard/include/VCardAdrParam.h b/kabc/vcard/include/VCardAdrParam.h
index 89dcb64..6456624 100644
--- a/kabc/vcard/include/VCardAdrParam.h
+++ b/kabc/vcard/include/VCardAdrParam.h
@@ -24,8 +24,8 @@
24#ifndef ADRPARAM_H 24#ifndef ADRPARAM_H
25#define ADRPARAM_H 25#define ADRPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30#include <VCardParam.h> 30#include <VCardParam.h>
31 31
@@ -37,16 +37,16 @@ class AdrParam : public Param
37 37
38#include "AdrParam-generated.h" 38#include "AdrParam-generated.h"
39 39
40 QStrList adrTypeList() 40 Q3StrList adrTypeList()
41 { parse(); return adrTypeList_; } 41 { parse(); return adrTypeList_; }
42 42
43 QCString textParam() 43 Q3CString textParam()
44 { parse(); return textParam_; } 44 { parse(); return textParam_; }
45 45
46 void setAdrTypeList(const QStrList & l) 46 void setAdrTypeList(const Q3StrList & l)
47 { adrTypeList_ = l; assembled_ = false; } 47 { adrTypeList_ = l; assembled_ = false; }
48 48
49 void setTextParam(const QCString & s) 49 void setTextParam(const Q3CString & s)
50 { textParam_ = s; assembled_ = false; } 50 { textParam_ = s; assembled_ = false; }
51 51
52 enum AdrType { 52 enum AdrType {
@@ -56,8 +56,8 @@ class AdrParam : public Param
56 56
57 private: 57 private:
58 58
59 QStrListadrTypeList_; 59 Q3StrListadrTypeList_;
60 QCStringtextParam_; 60 Q3CStringtextParam_;
61}; 61};
62} 62}
63 63
diff --git a/kabc/vcard/include/VCardAdrValue.h b/kabc/vcard/include/VCardAdrValue.h
index 0731924..14ddb02 100644
--- a/kabc/vcard/include/VCardAdrValue.h
+++ b/kabc/vcard/include/VCardAdrValue.h
@@ -24,7 +24,9 @@
24#ifndef ADRVALUE_H 24#ifndef ADRVALUE_H
25#define ADRVALUE_H 25#define ADRVALUE_H
26 26
27#include <qstrlist.h> 27#include <q3strlist.h>
28//Added by qt3to4:
29#include <Q3CString>
28#include <VCardValue.h> 30#include <VCardValue.h>
29 31
30namespace VCARD 32namespace VCARD
@@ -37,44 +39,44 @@ class AdrValue : public Value
37 39
38 AdrValue *clone(); 40 AdrValue *clone();
39 41
40 void setPOBox(const QCString & s) 42 void setPOBox(const Q3CString & s)
41 { poBox_ = s; assembled_ = false; } 43 { poBox_ = s; assembled_ = false; }
42 44
43 void setExtAddress(const QCString & s) 45 void setExtAddress(const Q3CString & s)
44 { extAddress_ = s; assembled_ = false; } 46 { extAddress_ = s; assembled_ = false; }
45 47
46 void setStreet(const QCString & s) 48 void setStreet(const Q3CString & s)
47 { street_ = s; assembled_ = false; } 49 { street_ = s; assembled_ = false; }
48 50
49 void setLocality(const QCString & s) 51 void setLocality(const Q3CString & s)
50 { locality_ = s; assembled_ = false; } 52 { locality_ = s; assembled_ = false; }
51 53
52 void setRegion(const QCString & s) 54 void setRegion(const Q3CString & s)
53 { region_ = s; assembled_ = false; } 55 { region_ = s; assembled_ = false; }
54 56
55 void setPostCode(const QCString & s) 57 void setPostCode(const Q3CString & s)
56 { postCode_ = s; assembled_ = false; } 58 { postCode_ = s; assembled_ = false; }
57 59
58 void setCountryName(const QCString & s) 60 void setCountryName(const Q3CString & s)
59 { countryName_ = s; assembled_ = false; } 61 { countryName_ = s; assembled_ = false; }
60 62
61 QCString poBox() { parse(); return poBox_;} 63 Q3CString poBox() { parse(); return poBox_;}
62 QCString extAddress() { parse(); return extAddress_;} 64 Q3CString extAddress() { parse(); return extAddress_;}
63 QCString street() { parse(); return street_;} 65 Q3CString street() { parse(); return street_;}
64 QCString locality() { parse(); return locality_;} 66 Q3CString locality() { parse(); return locality_;}
65 QCString region() { parse(); return region_;} 67 Q3CString region() { parse(); return region_;}
66 QCString postCode() { parse(); return postCode_;} 68 Q3CString postCode() { parse(); return postCode_;}
67 QCString countryName() { parse(); return countryName_;} 69 Q3CString countryName() { parse(); return countryName_;}
68 70
69 private: 71 private:
70 72
71 QCString poBox_; 73 Q3CString poBox_;
72 QCString extAddress_; 74 Q3CString extAddress_;
73 QCString street_; 75 Q3CString street_;
74 QCString locality_; 76 Q3CString locality_;
75 QCString region_; 77 Q3CString region_;
76 QCString postCode_; 78 Q3CString postCode_;
77 QCString countryName_; 79 Q3CString countryName_;
78}; 80};
79 81
80} 82}
diff --git a/kabc/vcard/include/VCardAgentParam.h b/kabc/vcard/include/VCardAgentParam.h
index 72a05db..5733540 100644
--- a/kabc/vcard/include/VCardAgentParam.h
+++ b/kabc/vcard/include/VCardAgentParam.h
@@ -24,7 +24,7 @@
24#ifndef AGENTPARAM_H 24#ifndef AGENTPARAM_H
25#define AGENTPARAM_H 25#define AGENTPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30#include <VCardURIValue.h> 30#include <VCardURIValue.h>
@@ -46,7 +46,7 @@ class AgentParam : public Param
46 void setRefer(bool b) 46 void setRefer(bool b)
47 { refer_ = b; assembled_ = false; } 47 { refer_ = b; assembled_ = false; }
48 48
49 void setURI(const QCString & s) 49 void setURI(const Q3CString & s)
50 { uri_ = s; assembled_ = false; } 50 { uri_ = s; assembled_ = false; }
51 51
52 private: 52 private:
diff --git a/kabc/vcard/include/VCardAgentValue.h b/kabc/vcard/include/VCardAgentValue.h
index f655836..b0d883b 100644
--- a/kabc/vcard/include/VCardAgentValue.h
+++ b/kabc/vcard/include/VCardAgentValue.h
@@ -24,7 +24,7 @@
24#ifndef AGENTVALUE_H 24#ifndef AGENTVALUE_H
25#define AGENTVALUE_H 25#define AGENTVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardClassValue.h b/kabc/vcard/include/VCardClassValue.h
index ff133c2..c450169 100644
--- a/kabc/vcard/include/VCardClassValue.h
+++ b/kabc/vcard/include/VCardClassValue.h
@@ -24,7 +24,7 @@
24#ifndef CLASSVALUE_H 24#ifndef CLASSVALUE_H
25#define CLASSVALUE_H 25#define CLASSVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardContentLine.h b/kabc/vcard/include/VCardContentLine.h
index 1c5f5be..c3c5253 100644
--- a/kabc/vcard/include/VCardContentLine.h
+++ b/kabc/vcard/include/VCardContentLine.h
@@ -24,7 +24,9 @@
24#ifndef CONTENTLINE_H 24#ifndef CONTENTLINE_H
25#define CONTENTLINE_H 25#define CONTENTLINE_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29#include "VCardEnum.h" 31#include "VCardEnum.h"
30#include "VCardEntity.h" 32#include "VCardEntity.h"
@@ -39,18 +41,18 @@ class ContentLine : public Entity
39 41
40#include "ContentLine-generated.h" 42#include "ContentLine-generated.h"
41 43
42 QCString group() { parse(); return group_;} 44 Q3CString group() { parse(); return group_;}
43 QCString name() { parse(); return name_;} 45 Q3CString name() { parse(); return name_;}
44 Value * value() { parse(); return value_;} 46 Value * value() { parse(); return value_;}
45 ParamList paramList() { parse(); return paramList_;} 47 ParamList paramList() { parse(); return paramList_;}
46 ParamType paramType() { parse(); return paramType_;} 48 ParamType paramType() { parse(); return paramType_;}
47 ValueType valueType() { parse(); return valueType_;} 49 ValueType valueType() { parse(); return valueType_;}
48 EntityType entityType() { parse(); return entityType_;} 50 EntityType entityType() { parse(); return entityType_;}
49 51
50 void setGroup (const QCString & s) 52 void setGroup (const Q3CString & s)
51 { group_ = s; assembled_ = false; } 53 { group_ = s; assembled_ = false; }
52 54
53 void setName (const QCString & s) 55 void setName (const Q3CString & s)
54 { name_ = s; assembled_ = false; } 56 { name_ = s; assembled_ = false; }
55 57
56 void setValue (Value *s) 58 void setValue (Value *s)
@@ -63,9 +65,9 @@ class ContentLine : public Entity
63 65
64 private: 66 private:
65 67
66 QCString group_; 68 Q3CString group_;
67 QCString name_; 69 Q3CString name_;
68 QPtrList<Param> paramList_; 70 Q3PtrList<Param> paramList_;
69 Value * value_; 71 Value * value_;
70 72
71 ParamType paramType_; 73 ParamType paramType_;
diff --git a/kabc/vcard/include/VCardDateParam.h b/kabc/vcard/include/VCardDateParam.h
index 21ac1f1..959b75b 100644
--- a/kabc/vcard/include/VCardDateParam.h
+++ b/kabc/vcard/include/VCardDateParam.h
@@ -24,7 +24,7 @@
24#ifndef DATEPARAM_H 24#ifndef DATEPARAM_H
25#define DATEPARAM_H 25#define DATEPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
diff --git a/kabc/vcard/include/VCardDateValue.h b/kabc/vcard/include/VCardDateValue.h
index c248966..fc216c0 100644
--- a/kabc/vcard/include/VCardDateValue.h
+++ b/kabc/vcard/include/VCardDateValue.h
@@ -24,7 +24,7 @@
24#ifndef DATEVALUE_H 24#ifndef DATEVALUE_H
25#define DATEVALUE_H 25#define DATEVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qdatetime.h> 28#include <qdatetime.h>
29 29
30#include <VCardValue.h> 30#include <VCardValue.h>
diff --git a/kabc/vcard/include/VCardDefines.h b/kabc/vcard/include/VCardDefines.h
index 557410f..5d4f2f4 100644
--- a/kabc/vcard/include/VCardDefines.h
+++ b/kabc/vcard/include/VCardDefines.h
@@ -35,14 +35,14 @@
35 35
36#if 0 36#if 0
37#ifndef NDEBUG 37#ifndef NDEBUG
38 #include <qcstring.h> 38 #include <q3cstring.h>
39 #include <iostream> 39 #include <iostream>
40 #ifdef __GNUG__ 40 #ifdef __GNUG__
41 # define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ 41 # define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \
42 << __LINE__ << "): " << QCString((a)).data() << endl; 42 << __LINE__ << "): " << Q3CString((a)).data() << endl;
43 #else 43 #else
44 # define vDebug(a) cerr << className() << ": " \ 44 # define vDebug(a) cerr << className() << ": " \
45 << QCString((a)).data() << endl; 45 << Q3CString((a)).data() << endl;
46 #endif 46 #endif
47#else 47#else
48 #define vDebug(a) 48 #define vDebug(a)
diff --git a/kabc/vcard/include/VCardEmailParam.h b/kabc/vcard/include/VCardEmailParam.h
index 98d1b30..ff07324 100644
--- a/kabc/vcard/include/VCardEmailParam.h
+++ b/kabc/vcard/include/VCardEmailParam.h
@@ -24,7 +24,7 @@
24#ifndef EMAILPARAM_H 24#ifndef EMAILPARAM_H
25#define EMAILPARAM_H 25#define EMAILPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
@@ -36,10 +36,10 @@ class EmailParam : public Param
36 36
37#include "EmailParam-generated.h" 37#include "EmailParam-generated.h"
38 38
39 QCString emailType() { parse(); return emailType_;} 39 Q3CString emailType() { parse(); return emailType_;}
40 bool pref() { parse(); return pref_; } 40 bool pref() { parse(); return pref_; }
41 41
42 void setEmailType(const QCString & s) 42 void setEmailType(const Q3CString & s)
43 { emailType_ = s; assembled_ = false; } 43 { emailType_ = s; assembled_ = false; }
44 44
45 void setPref(bool b) 45 void setPref(bool b)
@@ -47,7 +47,7 @@ class EmailParam : public Param
47 47
48 private: 48 private:
49 49
50 QCStringemailType_; 50 Q3CStringemailType_;
51 bool pref_; 51 bool pref_;
52}; 52};
53 53
diff --git a/kabc/vcard/include/VCardEntity.h b/kabc/vcard/include/VCardEntity.h
index 3c945b5..1a3d20f 100644
--- a/kabc/vcard/include/VCardEntity.h
+++ b/kabc/vcard/include/VCardEntity.h
@@ -24,7 +24,7 @@
24#ifndef ENTITY_H 24#ifndef ENTITY_H
25#define ENTITY_H 25#define ENTITY_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29namespace VCARD 29namespace VCARD
30{ 30{
@@ -35,19 +35,19 @@ class Entity
35 35
36 Entity(); 36 Entity();
37 Entity(const Entity & e); 37 Entity(const Entity & e);
38 Entity(const QCString & s); 38 Entity(const Q3CString & s);
39 39
40 virtual Entity & operator = (const Entity & e); 40 virtual Entity & operator = (const Entity & e);
41 virtual Entity & operator = (const QCString & s); 41 virtual Entity & operator = (const Q3CString & s);
42 42
43 virtual bool operator == (Entity & e); 43 virtual bool operator == (Entity & e);
44 virtual bool operator != (Entity & e); 44 virtual bool operator != (Entity & e);
45 virtual bool operator == (const QCString & s); 45 virtual bool operator == (const Q3CString & s);
46 virtual bool operator != (const QCString & s); 46 virtual bool operator != (const Q3CString & s);
47 47
48 virtual ~Entity(); 48 virtual ~Entity();
49 49
50 QCString asString(); 50 Q3CString asString();
51 51
52 virtual void parse(); 52 virtual void parse();
53 virtual void assemble(); 53 virtual void assemble();
@@ -57,7 +57,7 @@ class Entity
57 57
58 protected: 58 protected:
59 59
60 QCString strRep_; 60 Q3CString strRep_;
61 bool parsed_; 61 bool parsed_;
62 bool assembled_; 62 bool assembled_;
63}; 63};
diff --git a/kabc/vcard/include/VCardEnum.h b/kabc/vcard/include/VCardEnum.h
index b4e4094..0c35e5e 100644
--- a/kabc/vcard/include/VCardEnum.h
+++ b/kabc/vcard/include/VCardEnum.h
@@ -24,12 +24,12 @@
24#ifndef ENUM_H 24#ifndef ENUM_H
25#define ENUM_H 25#define ENUM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29namespace VCARD 29namespace VCARD
30{ 30{
31 31
32extern const QCString paramNames []; 32extern const Q3CString paramNames [];
33 33
34enum EntityType { 34enum EntityType {
35 EntityName, 35 EntityName,
@@ -108,8 +108,8 @@ extern const ParamType paramTypesTable[];
108 108
109ParamType EntityTypeToParamType(EntityType); 109ParamType EntityTypeToParamType(EntityType);
110ValueType EntityTypeToValueType(EntityType); 110ValueType EntityTypeToValueType(EntityType);
111QCString EntityTypeToParamName(EntityType); 111Q3CString EntityTypeToParamName(EntityType);
112EntityType EntityNameToEntityType(const QCString &); 112EntityType EntityNameToEntityType(const Q3CString &);
113 113
114char * encodeBase64(const char *, unsigned long, unsigned long &); 114char * encodeBase64(const char *, unsigned long, unsigned long &);
115char * decodeBase64(const char *, unsigned long, unsigned long &); 115char * decodeBase64(const char *, unsigned long, unsigned long &);
diff --git a/kabc/vcard/include/VCardFloatValue.h b/kabc/vcard/include/VCardFloatValue.h
index 69fdc22..cac7a91 100644
--- a/kabc/vcard/include/VCardFloatValue.h
+++ b/kabc/vcard/include/VCardFloatValue.h
@@ -24,7 +24,7 @@
24#ifndef FLOATVALUE_H 24#ifndef FLOATVALUE_H
25#define FLOATVALUE_H 25#define FLOATVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardImageParam.h b/kabc/vcard/include/VCardImageParam.h
index ce99ccc..2785331 100644
--- a/kabc/vcard/include/VCardImageParam.h
+++ b/kabc/vcard/include/VCardImageParam.h
@@ -24,7 +24,7 @@
24#ifndef IMGPARAM_H 24#ifndef IMGPARAM_H
25#define IMGPARAM_H 25#define IMGPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
diff --git a/kabc/vcard/include/VCardImageValue.h b/kabc/vcard/include/VCardImageValue.h
index 6ce0371..3b64731 100644
--- a/kabc/vcard/include/VCardImageValue.h
+++ b/kabc/vcard/include/VCardImageValue.h
@@ -24,7 +24,7 @@
24#ifndef IMAGEVALUE_H 24#ifndef IMAGEVALUE_H
25#define IMAGEVALUE_H 25#define IMAGEVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardLangValue.h b/kabc/vcard/include/VCardLangValue.h
index 991ceed..319de76 100644
--- a/kabc/vcard/include/VCardLangValue.h
+++ b/kabc/vcard/include/VCardLangValue.h
@@ -24,8 +24,8 @@
24#ifndef LANGVALUE_H 24#ifndef LANGVALUE_H
25#define LANGVALUE_H 25#define LANGVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30#include <VCardValue.h> 30#include <VCardValue.h>
31 31
@@ -36,14 +36,14 @@ class LangValue : public Value
36{ 36{
37#include "LangValue-generated.h" 37#include "LangValue-generated.h"
38 38
39 QCString primary(); 39 Q3CString primary();
40 QStrList subtags(); 40 Q3StrList subtags();
41 41
42 void setPrimary(const QCString &); 42 void setPrimary(const Q3CString &);
43 void setSubTags(const QStrList &); 43 void setSubTags(const Q3StrList &);
44 44
45 QCString primary_; 45 Q3CString primary_;
46 QStrList subtags_; 46 Q3StrList subtags_;
47}; 47};
48 48
49} 49}
diff --git a/kabc/vcard/include/VCardNValue.h b/kabc/vcard/include/VCardNValue.h
index 306821b..ffc5355 100644
--- a/kabc/vcard/include/VCardNValue.h
+++ b/kabc/vcard/include/VCardNValue.h
@@ -25,6 +25,8 @@
25#define NVALUE_H 25#define NVALUE_H
26 26
27#include <VCardValue.h> 27#include <VCardValue.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29namespace VCARD 31namespace VCARD
30{ 32{
@@ -34,21 +36,21 @@ class NValue : public Value
34#include "NValue-generated.h" 36#include "NValue-generated.h"
35 NValue *clone(); 37 NValue *clone();
36 38
37 QCString family() { parse(); return family_;} 39 Q3CString family() { parse(); return family_;}
38 QCString given() { parse(); return given_;} 40 Q3CString given() { parse(); return given_;}
39 QCString middle() { parse(); return middle_;} 41 Q3CString middle() { parse(); return middle_;}
40 QCString prefix() { parse(); return prefix_;} 42 Q3CString prefix() { parse(); return prefix_;}
41 QCString suffix() { parse(); return suffix_;} 43 Q3CString suffix() { parse(); return suffix_;}
42 44
43 void setFamily (const QCString & s) { family_= s; assembled_ = false; } 45 void setFamily (const Q3CString & s) { family_= s; assembled_ = false; }
44 void setGiven (const QCString & s) { given_= s; assembled_ = false; } 46 void setGiven (const Q3CString & s) { given_= s; assembled_ = false; }
45 void setMiddle (const QCString & s) { middle_= s; assembled_ = false; } 47 void setMiddle (const Q3CString & s) { middle_= s; assembled_ = false; }
46 void setPrefix (const QCString & s) { prefix_= s; assembled_ = false; } 48 void setPrefix (const Q3CString & s) { prefix_= s; assembled_ = false; }
47 void setSuffix (const QCString & s) { suffix_= s; assembled_ = false; } 49 void setSuffix (const Q3CString & s) { suffix_= s; assembled_ = false; }
48 50
49 private: 51 private:
50 52
51 QCString family_, given_, middle_, prefix_, suffix_; 53 Q3CString family_, given_, middle_, prefix_, suffix_;
52}; 54};
53 55
54} 56}
diff --git a/kabc/vcard/include/VCardOrgValue.h b/kabc/vcard/include/VCardOrgValue.h
index c4f3f25..2e5d32f 100644
--- a/kabc/vcard/include/VCardOrgValue.h
+++ b/kabc/vcard/include/VCardOrgValue.h
@@ -24,8 +24,8 @@
24#ifndef ORGVALUE_H 24#ifndef ORGVALUE_H
25#define ORGVALUE_H 25#define ORGVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30#include <VCardValue.h> 30#include <VCardValue.h>
31 31
@@ -38,11 +38,11 @@ class OrgValue : public Value
38#include "OrgValue-generated.h" 38#include "OrgValue-generated.h"
39 39
40 unsigned int numValues(); 40 unsigned int numValues();
41 QCString value(unsigned int); 41 Q3CString value(unsigned int);
42 42
43 private: 43 private:
44 44
45 QStrList valueList_; 45 Q3StrList valueList_;
46}; 46};
47 47
48} 48}
diff --git a/kabc/vcard/include/VCardParam.h b/kabc/vcard/include/VCardParam.h
index b61ce5c..b83fde1 100644
--- a/kabc/vcard/include/VCardParam.h
+++ b/kabc/vcard/include/VCardParam.h
@@ -24,8 +24,8 @@
24#ifndef PARAM_H 24#ifndef PARAM_H
25#define PARAM_H 25#define PARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30#include <VCardEntity.h> 30#include <VCardEntity.h>
31 31
@@ -37,22 +37,22 @@ class Param : public Entity
37 37
38#include "Param-generated.h" 38#include "Param-generated.h"
39 39
40 Param(const QCString &name, const QCString &value); 40 Param(const Q3CString &name, const Q3CString &value);
41 41
42 void setName(const QCString &); 42 void setName(const Q3CString &);
43 void setValue(const QCString &); 43 void setValue(const Q3CString &);
44 44
45 QCString name(); 45 Q3CString name();
46 QCString value(); 46 Q3CString value();
47 47
48 private: 48 private:
49 49
50 QCString name_; 50 Q3CString name_;
51 QCString value_; 51 Q3CString value_;
52}; 52};
53 53
54typedef QPtrList<Param> ParamList; 54typedef Q3PtrList<Param> ParamList;
55typedef QPtrListIterator<Param> ParamListIterator; 55typedef Q3PtrListIterator<Param> ParamListIterator;
56 56
57} 57}
58 58
diff --git a/kabc/vcard/include/VCardRToken.h b/kabc/vcard/include/VCardRToken.h
index 2f95f1b..4a5adb2 100644
--- a/kabc/vcard/include/VCardRToken.h
+++ b/kabc/vcard/include/VCardRToken.h
@@ -25,12 +25,12 @@
25#ifndef RTOKEN_H 25#ifndef RTOKEN_H
26#define RTOKEN_H 26#define RTOKEN_H
27 27
28#include <qstrlist.h> 28#include <q3strlist.h>
29 29
30namespace VCARD 30namespace VCARD
31{ 31{
32 32
33Q_UINT32 RTokenise(const char * str, const char * delim, QStrList & l); 33Q_UINT32 RTokenise(const char * str, const char * delim, Q3StrList & l);
34 34
35} 35}
36 36
diff --git a/kabc/vcard/include/VCardSoundValue.h b/kabc/vcard/include/VCardSoundValue.h
index 994f55e..26f750b 100644
--- a/kabc/vcard/include/VCardSoundValue.h
+++ b/kabc/vcard/include/VCardSoundValue.h
@@ -24,7 +24,7 @@
24#ifndef SOUNDVALUE_H 24#ifndef SOUNDVALUE_H
25#define SOUNDVALUE_H 25#define SOUNDVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardSourceParam.h b/kabc/vcard/include/VCardSourceParam.h
index 887ea20..5218864 100644
--- a/kabc/vcard/include/VCardSourceParam.h
+++ b/kabc/vcard/include/VCardSourceParam.h
@@ -24,7 +24,7 @@
24#ifndef SOURCEPARAM_H 24#ifndef SOURCEPARAM_H
25#define SOURCEPARAM_H 25#define SOURCEPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
@@ -39,18 +39,18 @@ class SourceParam : public Param
39 enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX }; 39 enum SourceParamType { TypeUnknown, TypeValue, TypeContext, TypeX };
40 40
41 SourceParamType type(){ parse(); return type_;} 41 SourceParamType type(){ parse(); return type_;}
42 QCString par() { parse(); return par_; } 42 Q3CString par() { parse(); return par_; }
43 QCString val() { parse(); return val_; } 43 Q3CString val() { parse(); return val_; }
44 44
45 void setType(SourceParamType t) { type_= t; assembled_ = false; } 45 void setType(SourceParamType t) { type_= t; assembled_ = false; }
46 void setPar(const QCString & s) { par_= s; assembled_ = false; } 46 void setPar(const Q3CString & s) { par_= s; assembled_ = false; }
47 void setVal(const QCString & s) { val_= s; assembled_ = false; } 47 void setVal(const Q3CString & s) { val_= s; assembled_ = false; }
48 48
49 private: 49 private:
50 50
51 SourceParamType type_; 51 SourceParamType type_;
52 // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" 52 // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR"
53 QCString par_, val_; // Sub-parameter, value 53 Q3CString par_, val_; // Sub-parameter, value
54}; 54};
55 55
56} 56}
diff --git a/kabc/vcard/include/VCardTelParam.h b/kabc/vcard/include/VCardTelParam.h
index 27d7dcc..0c45a3a 100644
--- a/kabc/vcard/include/VCardTelParam.h
+++ b/kabc/vcard/include/VCardTelParam.h
@@ -24,7 +24,9 @@
24#ifndef TELPARAM_H 24#ifndef TELPARAM_H
25#define TELPARAM_H 25#define TELPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28//Added by qt3to4:
29#include <Q3PtrList>
28 30
29#include <VCardParam.h> 31#include <VCardParam.h>
30 32
@@ -43,7 +45,7 @@ class TelParam : public Param
43 45
44 private: 46 private:
45 47
46 QPtrList<TelType> types_; 48 Q3PtrList<TelType> types_;
47}; 49};
48 50
49} 51}
diff --git a/kabc/vcard/include/VCardTelValue.h b/kabc/vcard/include/VCardTelValue.h
index 9cf5a98..a119e4a 100644
--- a/kabc/vcard/include/VCardTelValue.h
+++ b/kabc/vcard/include/VCardTelValue.h
@@ -24,7 +24,7 @@
24#ifndef TELVALUE_H 24#ifndef TELVALUE_H
25#define TELVALUE_H 25#define TELVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardTextBinParam.h b/kabc/vcard/include/VCardTextBinParam.h
index 31dec86..d186995 100644
--- a/kabc/vcard/include/VCardTextBinParam.h
+++ b/kabc/vcard/include/VCardTextBinParam.h
@@ -24,7 +24,7 @@
24#ifndef TEXTBINPARAM_H 24#ifndef TEXTBINPARAM_H
25#define TEXTBINPARAM_H 25#define TEXTBINPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
diff --git a/kabc/vcard/include/VCardTextBinValue.h b/kabc/vcard/include/VCardTextBinValue.h
index 8d44fdf..3924f2a 100644
--- a/kabc/vcard/include/VCardTextBinValue.h
+++ b/kabc/vcard/include/VCardTextBinValue.h
@@ -24,7 +24,7 @@
24#ifndef TEXTBINVALUE_H 24#ifndef TEXTBINVALUE_H
25#define TEXTBINVALUE_H 25#define TEXTBINVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardTextListValue.h b/kabc/vcard/include/VCardTextListValue.h
index 8e47af5..ac42a29 100644
--- a/kabc/vcard/include/VCardTextListValue.h
+++ b/kabc/vcard/include/VCardTextListValue.h
@@ -24,9 +24,9 @@
24#ifndef TEXTLISTVALUE_H 24#ifndef TEXTLISTVALUE_H
25#define TEXTLISTVALUE_H 25#define TEXTLISTVALUE_H
26 26
27#include <qstrlist.h> 27#include <q3strlist.h>
28 28
29#include <qcstring.h> 29#include <q3cstring.h>
30 30
31#include <VCardValue.h> 31#include <VCardValue.h>
32 32
@@ -39,11 +39,11 @@ class TextListValue : public Value
39#include "TextListValue-generated.h" 39#include "TextListValue-generated.h"
40 40
41 unsigned int numValues(); 41 unsigned int numValues();
42 QCString value(unsigned int); 42 Q3CString value(unsigned int);
43 43
44 private: 44 private:
45 45
46 QStrList valueList_; 46 Q3StrList valueList_;
47}; 47};
48 48
49} 49}
diff --git a/kabc/vcard/include/VCardTextParam.h b/kabc/vcard/include/VCardTextParam.h
index 08b5f57..2503337 100644
--- a/kabc/vcard/include/VCardTextParam.h
+++ b/kabc/vcard/include/VCardTextParam.h
@@ -24,7 +24,7 @@
24#ifndef TEXTPARAM_H 24#ifndef TEXTPARAM_H
25#define TEXTPARAM_H 25#define TEXTPARAM_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardParam.h> 29#include <VCardParam.h>
30 30
diff --git a/kabc/vcard/include/VCardURIValue.h b/kabc/vcard/include/VCardURIValue.h
index 5fd7184..116e4c8 100644
--- a/kabc/vcard/include/VCardURIValue.h
+++ b/kabc/vcard/include/VCardURIValue.h
@@ -25,6 +25,8 @@
25#define URIVALUE_H 25#define URIVALUE_H
26 26
27#include <VCardValue.h> 27#include <VCardValue.h>
28//Added by qt3to4:
29#include <Q3CString>
28 30
29namespace VCARD 31namespace VCARD
30{ 32{
@@ -33,18 +35,18 @@ class URIValue : public Value
33{ 35{
34#include "URIValue-generated.h" 36#include "URIValue-generated.h"
35 37
36 URIValue(const QCString & scheme, const QCString & schemeSpecificPart); 38 URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart);
37 39
38 QCString scheme(); 40 Q3CString scheme();
39 QCString schemeSpecificPart(); 41 Q3CString schemeSpecificPart();
40 42
41 void setScheme (const QCString &); 43 void setScheme (const Q3CString &);
42 void setSchemeSpecificPart(const QCString &); 44 void setSchemeSpecificPart(const Q3CString &);
43 45
44 private: 46 private:
45 47
46 QCString scheme_; 48 Q3CString scheme_;
47 QCString schemeSpecificPart_; 49 Q3CString schemeSpecificPart_;
48}; 50};
49 51
50} 52}
diff --git a/kabc/vcard/include/VCardUTCValue.h b/kabc/vcard/include/VCardUTCValue.h
index ff695e0..eb69829 100644
--- a/kabc/vcard/include/VCardUTCValue.h
+++ b/kabc/vcard/include/VCardUTCValue.h
@@ -24,7 +24,7 @@
24#ifndef UTCVALUE_H 24#ifndef UTCVALUE_H
25#define UTCVALUE_H 25#define UTCVALUE_H
26 26
27#include <qcstring.h> 27#include <q3cstring.h>
28 28
29#include <VCardValue.h> 29#include <VCardValue.h>
30 30
diff --git a/kabc/vcard/include/VCardVCard.h b/kabc/vcard/include/VCardVCard.h
index 5dec166..5b66074 100644
--- a/kabc/vcard/include/VCardVCard.h
+++ b/kabc/vcard/include/VCardVCard.h
@@ -25,7 +25,9 @@
25#define VCARD_VCARD_H 25#define VCARD_VCARD_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30#include <VCardEnum.h> 32#include <VCardEnum.h>
31#include <VCardEntity.h> 33#include <VCardEntity.h>
@@ -40,22 +42,22 @@ class VCard : public Entity
40#include "VCard-generated.h" 42#include "VCard-generated.h"
41 43
42 bool has(EntityType); 44 bool has(EntityType);
43 bool has(const QCString &); 45 bool has(const Q3CString &);
44 46
45 void add(const ContentLine &); 47 void add(const ContentLine &);
46 void add(const QCString &); 48 void add(const Q3CString &);
47 49
48 ContentLine * contentLine(EntityType); 50 ContentLine * contentLine(EntityType);
49 ContentLine * contentLine(const QCString &); 51 ContentLine * contentLine(const Q3CString &);
50 52
51 QCString group() { parse(); return group_; } 53 Q3CString group() { parse(); return group_; }
52 54
53 QPtrList<ContentLine>contentLineList() { parse(); return contentLineList_; } 55 Q3PtrList<ContentLine>contentLineList() { parse(); return contentLineList_; }
54 56
55 private: 57 private:
56 58
57 QCString group_; 59 Q3CString group_;
58 QPtrList<ContentLine>contentLineList_; 60 Q3PtrList<ContentLine>contentLineList_;
59}; 61};
60 62
61} 63}
diff --git a/kabc/vcard/include/VCardVCardEntity.h b/kabc/vcard/include/VCardVCardEntity.h
index 47ba370..8c824e7 100644
--- a/kabc/vcard/include/VCardVCardEntity.h
+++ b/kabc/vcard/include/VCardVCardEntity.h
@@ -25,7 +25,7 @@
25#define VCARD_ENTITY_H 25#define VCARD_ENTITY_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30#include <VCardEnum.h> 30#include <VCardEnum.h>
31#include <VCardVCard.h> 31#include <VCardVCard.h>
@@ -34,8 +34,8 @@
34namespace VCARD 34namespace VCARD
35{ 35{
36 36
37typedef QPtrList<VCard> VCardList; 37typedef Q3PtrList<VCard> VCardList;
38typedef QPtrListIterator<VCard> VCardListIterator; 38typedef Q3PtrListIterator<VCard> VCardListIterator;
39 39
40class VCardEntity : public Entity 40class VCardEntity : public Entity
41{ 41{
diff --git a/kabc/vcard/include/VCardValue.h b/kabc/vcard/include/VCardValue.h
index 7cfe4a0..024397c 100644
--- a/kabc/vcard/include/VCardValue.h
+++ b/kabc/vcard/include/VCardValue.h
@@ -24,7 +24,7 @@
24#ifndef VALUE_H 24#ifndef VALUE_H
25#define VALUE_H 25#define VALUE_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28 28
29#include <VCardEntity.h> 29#include <VCardEntity.h>
30 30
@@ -38,8 +38,8 @@ class Value : public Entity
38 virtual Value *clone() { return new Value( *this ); } 38 virtual Value *clone() { return new Value( *this ); }
39}; 39};
40 40
41typedef QPtrList<Value> ValueList; 41typedef Q3PtrList<Value> ValueList;
42typedef QPtrListIterator<Value> ValueListIterator; 42typedef Q3PtrListIterator<Value> ValueListIterator;
43 43
44} 44}
45 45
diff --git a/kabc/vcard/include/generated/AdrParam-generated.h b/kabc/vcard/include/generated/AdrParam-generated.h
index 3e265d8..a11d142 100644
--- a/kabc/vcard/include/generated/AdrParam-generated.h
+++ b/kabc/vcard/include/generated/AdrParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AdrParam(); 6AdrParam();
5AdrParam(const AdrParam&); 7AdrParam(const AdrParam&);
6AdrParam(const QCString&); 8AdrParam(const Q3CString&);
7AdrParam & operator = (AdrParam&); 9AdrParam & operator = (AdrParam&);
8AdrParam & operator = (const QCString&); 10AdrParam & operator = (const Q3CString&);
9bool operator ==(AdrParam&); 11bool operator ==(AdrParam&);
10bool operator !=(AdrParam& x) {return !(*this==x);} 12bool operator !=(AdrParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AdrParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AdrParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AdrParam(); 16virtual ~AdrParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/AdrValue-generated.h b/kabc/vcard/include/generated/AdrValue-generated.h
index e1d93e4..c0a33a3 100644
--- a/kabc/vcard/include/generated/AdrValue-generated.h
+++ b/kabc/vcard/include/generated/AdrValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AdrValue(); 6AdrValue();
5AdrValue(const AdrValue&); 7AdrValue(const AdrValue&);
6AdrValue(const QCString&); 8AdrValue(const Q3CString&);
7AdrValue & operator = (AdrValue&); 9AdrValue & operator = (AdrValue&);
8AdrValue & operator = (const QCString&); 10AdrValue & operator = (const Q3CString&);
9bool operator ==(AdrValue&); 11bool operator ==(AdrValue&);
10bool operator !=(AdrValue& x) {return !(*this==x);} 12bool operator !=(AdrValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AdrValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AdrValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AdrValue(); 16virtual ~AdrValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/AgentParam-generated.h b/kabc/vcard/include/generated/AgentParam-generated.h
index 6423867..d5ed988 100644
--- a/kabc/vcard/include/generated/AgentParam-generated.h
+++ b/kabc/vcard/include/generated/AgentParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AgentParam(); 6AgentParam();
5AgentParam(const AgentParam&); 7AgentParam(const AgentParam&);
6AgentParam(const QCString&); 8AgentParam(const Q3CString&);
7AgentParam & operator = (AgentParam&); 9AgentParam & operator = (AgentParam&);
8AgentParam & operator = (const QCString&); 10AgentParam & operator = (const Q3CString&);
9bool operator ==(AgentParam&); 11bool operator ==(AgentParam&);
10bool operator !=(AgentParam& x) {return !(*this==x);} 12bool operator !=(AgentParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AgentParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AgentParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AgentParam(); 16virtual ~AgentParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/AgentValue-generated.h b/kabc/vcard/include/generated/AgentValue-generated.h
index 76bb81c..eef5277 100644
--- a/kabc/vcard/include/generated/AgentValue-generated.h
+++ b/kabc/vcard/include/generated/AgentValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4AgentValue(); 6AgentValue();
5AgentValue(const AgentValue&); 7AgentValue(const AgentValue&);
6AgentValue(const QCString&); 8AgentValue(const Q3CString&);
7AgentValue & operator = (AgentValue&); 9AgentValue & operator = (AgentValue&);
8AgentValue & operator = (const QCString&); 10AgentValue & operator = (const Q3CString&);
9bool operator ==(AgentValue&); 11bool operator ==(AgentValue&);
10bool operator !=(AgentValue& x) {return !(*this==x);} 12bool operator !=(AgentValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {AgentValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {AgentValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~AgentValue(); 16virtual ~AgentValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ClassValue-generated.h b/kabc/vcard/include/generated/ClassValue-generated.h
index df4ed5f..b84c98f 100644
--- a/kabc/vcard/include/generated/ClassValue-generated.h
+++ b/kabc/vcard/include/generated/ClassValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ClassValue(); 6ClassValue();
5ClassValue(const ClassValue&); 7ClassValue(const ClassValue&);
6ClassValue(const QCString&); 8ClassValue(const Q3CString&);
7ClassValue & operator = (ClassValue&); 9ClassValue & operator = (ClassValue&);
8ClassValue & operator = (const QCString&); 10ClassValue & operator = (const Q3CString&);
9bool operator ==(ClassValue&); 11bool operator ==(ClassValue&);
10bool operator !=(ClassValue& x) {return !(*this==x);} 12bool operator !=(ClassValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ClassValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ClassValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ClassValue(); 16virtual ~ClassValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ContentLine-generated.h b/kabc/vcard/include/generated/ContentLine-generated.h
index 9efe273..84d0822 100644
--- a/kabc/vcard/include/generated/ContentLine-generated.h
+++ b/kabc/vcard/include/generated/ContentLine-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ContentLine(); 6ContentLine();
5ContentLine(const ContentLine&); 7ContentLine(const ContentLine&);
6ContentLine(const QCString&); 8ContentLine(const Q3CString&);
7ContentLine & operator = (ContentLine&); 9ContentLine & operator = (ContentLine&);
8ContentLine & operator = (const QCString&); 10ContentLine & operator = (const Q3CString&);
9bool operator ==(ContentLine&); 11bool operator ==(ContentLine&);
10bool operator !=(ContentLine& x) {return !(*this==x);} 12bool operator !=(ContentLine& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ContentLine a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ContentLine a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ContentLine(); 16virtual ~ContentLine();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/DateParam-generated.h b/kabc/vcard/include/generated/DateParam-generated.h
index ff1da58..029c1da 100644
--- a/kabc/vcard/include/generated/DateParam-generated.h
+++ b/kabc/vcard/include/generated/DateParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4DateParam(); 6DateParam();
5DateParam(const DateParam&); 7DateParam(const DateParam&);
6DateParam(const QCString&); 8DateParam(const Q3CString&);
7DateParam & operator = (DateParam&); 9DateParam & operator = (DateParam&);
8DateParam & operator = (const QCString&); 10DateParam & operator = (const Q3CString&);
9bool operator ==(DateParam&); 11bool operator ==(DateParam&);
10bool operator !=(DateParam& x) {return !(*this==x);} 12bool operator !=(DateParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {DateParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {DateParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~DateParam(); 16virtual ~DateParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/DateValue-generated.h b/kabc/vcard/include/generated/DateValue-generated.h
index a382823..70eecce 100644
--- a/kabc/vcard/include/generated/DateValue-generated.h
+++ b/kabc/vcard/include/generated/DateValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4DateValue(); 6DateValue();
5DateValue(const DateValue&); 7DateValue(const DateValue&);
6DateValue(const QCString&); 8DateValue(const Q3CString&);
7DateValue & operator = (DateValue&); 9DateValue & operator = (DateValue&);
8DateValue & operator = (const QCString&); 10DateValue & operator = (const Q3CString&);
9bool operator ==(DateValue&); 11bool operator ==(DateValue&);
10bool operator !=(DateValue& x) {return !(*this==x);} 12bool operator !=(DateValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {DateValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {DateValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~DateValue(); 16virtual ~DateValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/EmailParam-generated.h b/kabc/vcard/include/generated/EmailParam-generated.h
index 428a6fc..f498931 100644
--- a/kabc/vcard/include/generated/EmailParam-generated.h
+++ b/kabc/vcard/include/generated/EmailParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4EmailParam(); 6EmailParam();
5EmailParam(const EmailParam&); 7EmailParam(const EmailParam&);
6EmailParam(const QCString&); 8EmailParam(const Q3CString&);
7EmailParam & operator = (EmailParam&); 9EmailParam & operator = (EmailParam&);
8EmailParam & operator = (const QCString&); 10EmailParam & operator = (const Q3CString&);
9bool operator ==(EmailParam&); 11bool operator ==(EmailParam&);
10bool operator !=(EmailParam& x) {return !(*this==x);} 12bool operator !=(EmailParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {EmailParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {EmailParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~EmailParam(); 16virtual ~EmailParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/FloatValue-generated.h b/kabc/vcard/include/generated/FloatValue-generated.h
index cac55cf..c04b85f 100644
--- a/kabc/vcard/include/generated/FloatValue-generated.h
+++ b/kabc/vcard/include/generated/FloatValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4FloatValue(); 6FloatValue();
5FloatValue(const FloatValue&); 7FloatValue(const FloatValue&);
6FloatValue(const QCString&); 8FloatValue(const Q3CString&);
7FloatValue & operator = (FloatValue&); 9FloatValue & operator = (FloatValue&);
8FloatValue & operator = (const QCString&); 10FloatValue & operator = (const Q3CString&);
9bool operator ==(FloatValue&); 11bool operator ==(FloatValue&);
10bool operator !=(FloatValue& x) {return !(*this==x);} 12bool operator !=(FloatValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {FloatValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {FloatValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~FloatValue(); 16virtual ~FloatValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/GeoValue-generated.h b/kabc/vcard/include/generated/GeoValue-generated.h
index 594f3ad..ab659bf 100644
--- a/kabc/vcard/include/generated/GeoValue-generated.h
+++ b/kabc/vcard/include/generated/GeoValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4GeoValue(); 6GeoValue();
5GeoValue(const GeoValue&); 7GeoValue(const GeoValue&);
6GeoValue(const QCString&); 8GeoValue(const Q3CString&);
7GeoValue & operator = (GeoValue&); 9GeoValue & operator = (GeoValue&);
8GeoValue & operator = (const QCString&); 10GeoValue & operator = (const Q3CString&);
9bool operator ==(GeoValue&); 11bool operator ==(GeoValue&);
10bool operator !=(GeoValue& x) {return !(*this==x);} 12bool operator !=(GeoValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {GeoValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {GeoValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~GeoValue(); 16virtual ~GeoValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Group-generated.h b/kabc/vcard/include/generated/Group-generated.h
index f39302d..ae16e3d 100644
--- a/kabc/vcard/include/generated/Group-generated.h
+++ b/kabc/vcard/include/generated/Group-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4Group(); 6Group();
5Group(const Group&); 7Group(const Group&);
6Group(const QCString&); 8Group(const Q3CString&);
7Group & operator = (Group&); 9Group & operator = (Group&);
8Group & operator = (const QCString&); 10Group & operator = (const Q3CString&);
9bool operator ==(Group&); 11bool operator ==(Group&);
10bool operator !=(Group& x) {return !(*this==x);} 12bool operator !=(Group& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {Group a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {Group a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~Group(); 16virtual ~Group();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImageParam-generated.h b/kabc/vcard/include/generated/ImageParam-generated.h
index 81edfd2..91b09a4 100644
--- a/kabc/vcard/include/generated/ImageParam-generated.h
+++ b/kabc/vcard/include/generated/ImageParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImageParam(); 6ImageParam();
5ImageParam(const ImageParam&); 7ImageParam(const ImageParam&);
6ImageParam(const QCString&); 8ImageParam(const Q3CString&);
7ImageParam & operator = (ImageParam&); 9ImageParam & operator = (ImageParam&);
8ImageParam & operator = (const QCString&); 10ImageParam & operator = (const Q3CString&);
9bool operator ==(ImageParam&); 11bool operator ==(ImageParam&);
10bool operator !=(ImageParam& x) {return !(*this==x);} 12bool operator !=(ImageParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImageParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImageParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImageParam(); 16virtual ~ImageParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImageValue-generated.h b/kabc/vcard/include/generated/ImageValue-generated.h
index 5a2c493..d71282e 100644
--- a/kabc/vcard/include/generated/ImageValue-generated.h
+++ b/kabc/vcard/include/generated/ImageValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImageValue(); 6ImageValue();
5ImageValue(const ImageValue&); 7ImageValue(const ImageValue&);
6ImageValue(const QCString&); 8ImageValue(const Q3CString&);
7ImageValue & operator = (ImageValue&); 9ImageValue & operator = (ImageValue&);
8ImageValue & operator = (const QCString&); 10ImageValue & operator = (const Q3CString&);
9bool operator ==(ImageValue&); 11bool operator ==(ImageValue&);
10bool operator !=(ImageValue& x) {return !(*this==x);} 12bool operator !=(ImageValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImageValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImageValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImageValue(); 16virtual ~ImageValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImgParam-generated.h b/kabc/vcard/include/generated/ImgParam-generated.h
index 46a6ca0..461ca6d 100644
--- a/kabc/vcard/include/generated/ImgParam-generated.h
+++ b/kabc/vcard/include/generated/ImgParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImgParam(); 6ImgParam();
5ImgParam(const ImgParam&); 7ImgParam(const ImgParam&);
6ImgParam(const QCString&); 8ImgParam(const Q3CString&);
7ImgParam & operator = (ImgParam&); 9ImgParam & operator = (ImgParam&);
8ImgParam & operator = (const QCString&); 10ImgParam & operator = (const Q3CString&);
9bool operator ==(ImgParam&); 11bool operator ==(ImgParam&);
10bool operator !=(ImgParam& x) {return !(*this==x);} 12bool operator !=(ImgParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImgParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImgParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImgParam(); 16virtual ~ImgParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ImgValue-generated.h b/kabc/vcard/include/generated/ImgValue-generated.h
index d75d545..80ee646 100644
--- a/kabc/vcard/include/generated/ImgValue-generated.h
+++ b/kabc/vcard/include/generated/ImgValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4ImgValue(); 6ImgValue();
5ImgValue(const ImgValue&); 7ImgValue(const ImgValue&);
6ImgValue(const QCString&); 8ImgValue(const Q3CString&);
7ImgValue & operator = (ImgValue&); 9ImgValue & operator = (ImgValue&);
8ImgValue & operator = (const QCString&); 10ImgValue & operator = (const Q3CString&);
9bool operator ==(ImgValue&); 11bool operator ==(ImgValue&);
10bool operator !=(ImgValue& x) {return !(*this==x);} 12bool operator !=(ImgValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {ImgValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {ImgValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~ImgValue(); 16virtual ~ImgValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/LangValue-generated.h b/kabc/vcard/include/generated/LangValue-generated.h
index 23e138b..434f762 100644
--- a/kabc/vcard/include/generated/LangValue-generated.h
+++ b/kabc/vcard/include/generated/LangValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4LangValue(); 6LangValue();
5LangValue(const LangValue&); 7LangValue(const LangValue&);
6LangValue(const QCString&); 8LangValue(const Q3CString&);
7LangValue & operator = (LangValue&); 9LangValue & operator = (LangValue&);
8LangValue & operator = (const QCString&); 10LangValue & operator = (const Q3CString&);
9bool operator ==(LangValue&); 11bool operator ==(LangValue&);
10bool operator !=(LangValue& x) {return !(*this==x);} 12bool operator !=(LangValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {LangValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {LangValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~LangValue(); 16virtual ~LangValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/NValue-generated.h b/kabc/vcard/include/generated/NValue-generated.h
index 082c253..086810f 100644
--- a/kabc/vcard/include/generated/NValue-generated.h
+++ b/kabc/vcard/include/generated/NValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4NValue(); 6NValue();
5NValue(const NValue&); 7NValue(const NValue&);
6NValue(const QCString&); 8NValue(const Q3CString&);
7NValue & operator = (NValue&); 9NValue & operator = (NValue&);
8NValue & operator = (const QCString&); 10NValue & operator = (const Q3CString&);
9bool operator ==(NValue&); 11bool operator ==(NValue&);
10bool operator !=(NValue& x) {return !(*this==x);} 12bool operator !=(NValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {NValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {NValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~NValue(); 16virtual ~NValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Name-generated.h b/kabc/vcard/include/generated/Name-generated.h
index 0e69abd..a3bcb25 100644
--- a/kabc/vcard/include/generated/Name-generated.h
+++ b/kabc/vcard/include/generated/Name-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4V_Name(); 6V_Name();
5V_Name(const V_Name&); 7V_Name(const V_Name&);
6V_Name(const QCString&); 8V_Name(const Q3CString&);
7V_Name & operator = (V_Name&); 9V_Name & operator = (V_Name&);
8V_Name & operator = (const QCString&); 10V_Name & operator = (const Q3CString&);
9bool operator ==(V_Name&); 11bool operator ==(V_Name&);
10bool operator !=(V_Name& x) {return !(*this==x);} 12bool operator !=(V_Name& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {V_Name a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {V_Name a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~V_Name(); 16virtual ~V_Name();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/OrgValue-generated.h b/kabc/vcard/include/generated/OrgValue-generated.h
index 51eb1b7..275f56f 100644
--- a/kabc/vcard/include/generated/OrgValue-generated.h
+++ b/kabc/vcard/include/generated/OrgValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4OrgValue(); 6OrgValue();
5OrgValue(const OrgValue&); 7OrgValue(const OrgValue&);
6OrgValue(const QCString&); 8OrgValue(const Q3CString&);
7OrgValue & operator = (OrgValue&); 9OrgValue & operator = (OrgValue&);
8OrgValue & operator = (const QCString&); 10OrgValue & operator = (const Q3CString&);
9bool operator ==(OrgValue&); 11bool operator ==(OrgValue&);
10bool operator !=(OrgValue& x) {return !(*this==x);} 12bool operator !=(OrgValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {OrgValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {OrgValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~OrgValue(); 16virtual ~OrgValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Param-generated.h b/kabc/vcard/include/generated/Param-generated.h
index cf4666a..1a35166 100644
--- a/kabc/vcard/include/generated/Param-generated.h
+++ b/kabc/vcard/include/generated/Param-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4Param(); 6Param();
5Param(const Param&); 7Param(const Param&);
6Param(const QCString&); 8Param(const Q3CString&);
7Param & operator = (Param&); 9Param & operator = (Param&);
8Param & operator = (const QCString&); 10Param & operator = (const Q3CString&);
9bool operator ==(Param&); 11bool operator ==(Param&);
10bool operator !=(Param& x) {return !(*this==x);} 12bool operator !=(Param& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {Param a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {Param a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~Param(); 16virtual ~Param();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ParamName-generated.h b/kabc/vcard/include/generated/ParamName-generated.h
index ef673c3..b45022e 100644
--- a/kabc/vcard/include/generated/ParamName-generated.h
+++ b/kabc/vcard/include/generated/ParamName-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4V_ParamName(); 6V_ParamName();
5V_ParamName(const V_ParamName&); 7V_ParamName(const V_ParamName&);
6V_ParamName(const QCString&); 8V_ParamName(const Q3CString&);
7V_ParamName & operator = (V_ParamName&); 9V_ParamName & operator = (V_ParamName&);
8V_ParamName & operator = (const QCString&); 10V_ParamName & operator = (const Q3CString&);
9bool operator ==(V_ParamName&); 11bool operator ==(V_ParamName&);
10bool operator !=(V_ParamName& x) {return !(*this==x);} 12bool operator !=(V_ParamName& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {V_ParamName a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {V_ParamName a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~V_ParamName(); 16virtual ~V_ParamName();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/ParamValue-generated.h b/kabc/vcard/include/generated/ParamValue-generated.h
index e73500f..956c8da 100644
--- a/kabc/vcard/include/generated/ParamValue-generated.h
+++ b/kabc/vcard/include/generated/ParamValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4V_ParamValue(); 6V_ParamValue();
5V_ParamValue(const V_ParamValue&); 7V_ParamValue(const V_ParamValue&);
6V_ParamValue(const QCString&); 8V_ParamValue(const Q3CString&);
7V_ParamValue & operator = (V_ParamValue&); 9V_ParamValue & operator = (V_ParamValue&);
8V_ParamValue & operator = (const QCString&); 10V_ParamValue & operator = (const Q3CString&);
9bool operator ==(V_ParamValue&); 11bool operator ==(V_ParamValue&);
10bool operator !=(V_ParamValue& x) {return !(*this==x);} 12bool operator !=(V_ParamValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {V_ParamValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {V_ParamValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~V_ParamValue(); 16virtual ~V_ParamValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/PhoneNumberValue-generated.h b/kabc/vcard/include/generated/PhoneNumberValue-generated.h
index 1320f18..0d206f4 100644
--- a/kabc/vcard/include/generated/PhoneNumberValue-generated.h
+++ b/kabc/vcard/include/generated/PhoneNumberValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4PhoneNumberValue(); 6PhoneNumberValue();
5PhoneNumberValue(const PhoneNumberValue&); 7PhoneNumberValue(const PhoneNumberValue&);
6PhoneNumberValue(const QCString&); 8PhoneNumberValue(const Q3CString&);
7PhoneNumberValue & operator = (PhoneNumberValue&); 9PhoneNumberValue & operator = (PhoneNumberValue&);
8PhoneNumberValue & operator = (const QCString&); 10PhoneNumberValue & operator = (const Q3CString&);
9bool operator ==(PhoneNumberValue&); 11bool operator ==(PhoneNumberValue&);
10bool operator !=(PhoneNumberValue& x) {return !(*this==x);} 12bool operator !=(PhoneNumberValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {PhoneNumberValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {PhoneNumberValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~PhoneNumberValue(); 16virtual ~PhoneNumberValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/SoundValue-generated.h b/kabc/vcard/include/generated/SoundValue-generated.h
index a9ab2e8..2cc9c0d 100644
--- a/kabc/vcard/include/generated/SoundValue-generated.h
+++ b/kabc/vcard/include/generated/SoundValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4SoundValue(); 6SoundValue();
5SoundValue(const SoundValue&); 7SoundValue(const SoundValue&);
6SoundValue(const QCString&); 8SoundValue(const Q3CString&);
7SoundValue & operator = (SoundValue&); 9SoundValue & operator = (SoundValue&);
8SoundValue & operator = (const QCString&); 10SoundValue & operator = (const Q3CString&);
9bool operator ==(SoundValue&); 11bool operator ==(SoundValue&);
10bool operator !=(SoundValue& x) {return !(*this==x);} 12bool operator !=(SoundValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {SoundValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {SoundValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~SoundValue(); 16virtual ~SoundValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/SourceParam-generated.h b/kabc/vcard/include/generated/SourceParam-generated.h
index 75fefb8..537e093 100644
--- a/kabc/vcard/include/generated/SourceParam-generated.h
+++ b/kabc/vcard/include/generated/SourceParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4SourceParam(); 6SourceParam();
5SourceParam(const SourceParam&); 7SourceParam(const SourceParam&);
6SourceParam(const QCString&); 8SourceParam(const Q3CString&);
7SourceParam & operator = (SourceParam&); 9SourceParam & operator = (SourceParam&);
8SourceParam & operator = (const QCString&); 10SourceParam & operator = (const Q3CString&);
9bool operator ==(SourceParam&); 11bool operator ==(SourceParam&);
10bool operator !=(SourceParam& x) {return !(*this==x);} 12bool operator !=(SourceParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {SourceParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {SourceParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~SourceParam(); 16virtual ~SourceParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TelParam-generated.h b/kabc/vcard/include/generated/TelParam-generated.h
index 3ee77cc..8d9ba0f 100644
--- a/kabc/vcard/include/generated/TelParam-generated.h
+++ b/kabc/vcard/include/generated/TelParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TelParam(); 6TelParam();
5TelParam(const TelParam&); 7TelParam(const TelParam&);
6TelParam(const QCString&); 8TelParam(const Q3CString&);
7TelParam & operator = (TelParam&); 9TelParam & operator = (TelParam&);
8TelParam & operator = (const QCString&); 10TelParam & operator = (const Q3CString&);
9bool operator ==(TelParam&); 11bool operator ==(TelParam&);
10bool operator !=(TelParam& x) {return !(*this==x);} 12bool operator !=(TelParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TelParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TelParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TelParam(); 16virtual ~TelParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TelValue-generated.h b/kabc/vcard/include/generated/TelValue-generated.h
index 3213e1c..b72fa7d 100644
--- a/kabc/vcard/include/generated/TelValue-generated.h
+++ b/kabc/vcard/include/generated/TelValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TelValue(); 6TelValue();
5TelValue(const TelValue&); 7TelValue(const TelValue&);
6TelValue(const QCString&); 8TelValue(const Q3CString&);
7TelValue & operator = (TelValue&); 9TelValue & operator = (TelValue&);
8TelValue & operator = (const QCString&); 10TelValue & operator = (const Q3CString&);
9bool operator ==(TelValue&); 11bool operator ==(TelValue&);
10bool operator !=(TelValue& x) {return !(*this==x);} 12bool operator !=(TelValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TelValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TelValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TelValue(); 16virtual ~TelValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextBinParam-generated.h b/kabc/vcard/include/generated/TextBinParam-generated.h
index d075c10..2e433b0 100644
--- a/kabc/vcard/include/generated/TextBinParam-generated.h
+++ b/kabc/vcard/include/generated/TextBinParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextBinParam(); 6TextBinParam();
5TextBinParam(const TextBinParam&); 7TextBinParam(const TextBinParam&);
6TextBinParam(const QCString&); 8TextBinParam(const Q3CString&);
7TextBinParam & operator = (TextBinParam&); 9TextBinParam & operator = (TextBinParam&);
8TextBinParam & operator = (const QCString&); 10TextBinParam & operator = (const Q3CString&);
9bool operator ==(TextBinParam&); 11bool operator ==(TextBinParam&);
10bool operator !=(TextBinParam& x) {return !(*this==x);} 12bool operator !=(TextBinParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextBinParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextBinParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextBinParam(); 16virtual ~TextBinParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextBinValue-generated.h b/kabc/vcard/include/generated/TextBinValue-generated.h
index e9553ac..bc3ad61 100644
--- a/kabc/vcard/include/generated/TextBinValue-generated.h
+++ b/kabc/vcard/include/generated/TextBinValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextBinValue(); 6TextBinValue();
5TextBinValue(const TextBinValue&); 7TextBinValue(const TextBinValue&);
6TextBinValue(const QCString&); 8TextBinValue(const Q3CString&);
7TextBinValue & operator = (TextBinValue&); 9TextBinValue & operator = (TextBinValue&);
8TextBinValue & operator = (const QCString&); 10TextBinValue & operator = (const Q3CString&);
9bool operator ==(TextBinValue&); 11bool operator ==(TextBinValue&);
10bool operator !=(TextBinValue& x) {return !(*this==x);} 12bool operator !=(TextBinValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextBinValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextBinValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextBinValue(); 16virtual ~TextBinValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextListValue-generated.h b/kabc/vcard/include/generated/TextListValue-generated.h
index 9f46124..9df8a46 100644
--- a/kabc/vcard/include/generated/TextListValue-generated.h
+++ b/kabc/vcard/include/generated/TextListValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextListValue(); 6TextListValue();
5TextListValue(const TextListValue&); 7TextListValue(const TextListValue&);
6TextListValue(const QCString&); 8TextListValue(const Q3CString&);
7TextListValue & operator = (TextListValue&); 9TextListValue & operator = (TextListValue&);
8TextListValue & operator = (const QCString&); 10TextListValue & operator = (const Q3CString&);
9bool operator ==(TextListValue&); 11bool operator ==(TextListValue&);
10bool operator !=(TextListValue& x) {return !(*this==x);} 12bool operator !=(TextListValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextListValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextListValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextListValue(); 16virtual ~TextListValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextNSParam-generated.h b/kabc/vcard/include/generated/TextNSParam-generated.h
index d7f58ca..8842bd6 100644
--- a/kabc/vcard/include/generated/TextNSParam-generated.h
+++ b/kabc/vcard/include/generated/TextNSParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextNSParam(); 6TextNSParam();
5TextNSParam(const TextNSParam&); 7TextNSParam(const TextNSParam&);
6TextNSParam(const QCString&); 8TextNSParam(const Q3CString&);
7TextNSParam & operator = (TextNSParam&); 9TextNSParam & operator = (TextNSParam&);
8TextNSParam & operator = (const QCString&); 10TextNSParam & operator = (const Q3CString&);
9bool operator ==(TextNSParam&); 11bool operator ==(TextNSParam&);
10bool operator !=(TextNSParam& x) {return !(*this==x);} 12bool operator !=(TextNSParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextNSParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextNSParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextNSParam(); 16virtual ~TextNSParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextParam-generated.h b/kabc/vcard/include/generated/TextParam-generated.h
index 154e1bf..e56a8a5 100644
--- a/kabc/vcard/include/generated/TextParam-generated.h
+++ b/kabc/vcard/include/generated/TextParam-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextParam(); 6TextParam();
5TextParam(const TextParam&); 7TextParam(const TextParam&);
6TextParam(const QCString&); 8TextParam(const Q3CString&);
7TextParam & operator = (TextParam&); 9TextParam & operator = (TextParam&);
8TextParam & operator = (const QCString&); 10TextParam & operator = (const Q3CString&);
9bool operator ==(TextParam&); 11bool operator ==(TextParam&);
10bool operator !=(TextParam& x) {return !(*this==x);} 12bool operator !=(TextParam& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextParam a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextParam a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextParam(); 16virtual ~TextParam();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/TextValue-generated.h b/kabc/vcard/include/generated/TextValue-generated.h
index e1c4dcc..3f205e0 100644
--- a/kabc/vcard/include/generated/TextValue-generated.h
+++ b/kabc/vcard/include/generated/TextValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4TextValue(); 6TextValue();
5TextValue(const TextValue&); 7TextValue(const TextValue&);
6TextValue(const QCString&); 8TextValue(const Q3CString&);
7TextValue & operator = (TextValue&); 9TextValue & operator = (TextValue&);
8TextValue & operator = (const QCString&); 10TextValue & operator = (const Q3CString&);
9bool operator ==(TextValue&); 11bool operator ==(TextValue&);
10bool operator !=(TextValue& x) {return !(*this==x);} 12bool operator !=(TextValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {TextValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {TextValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~TextValue(); 16virtual ~TextValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/URIValue-generated.h b/kabc/vcard/include/generated/URIValue-generated.h
index dbcb5c1..464178f 100644
--- a/kabc/vcard/include/generated/URIValue-generated.h
+++ b/kabc/vcard/include/generated/URIValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4URIValue(); 6URIValue();
5URIValue(const URIValue&); 7URIValue(const URIValue&);
6URIValue(const QCString&); 8URIValue(const Q3CString&);
7URIValue & operator = (URIValue&); 9URIValue & operator = (URIValue&);
8URIValue & operator = (const QCString&); 10URIValue & operator = (const Q3CString&);
9bool operator ==(URIValue&); 11bool operator ==(URIValue&);
10bool operator !=(URIValue& x) {return !(*this==x);} 12bool operator !=(URIValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {URIValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {URIValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~URIValue(); 16virtual ~URIValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/UTCValue-generated.h b/kabc/vcard/include/generated/UTCValue-generated.h
index 46e447b..1a34b5c 100644
--- a/kabc/vcard/include/generated/UTCValue-generated.h
+++ b/kabc/vcard/include/generated/UTCValue-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4UTCValue(); 6UTCValue();
5UTCValue(const UTCValue&); 7UTCValue(const UTCValue&);
6UTCValue(const QCString&); 8UTCValue(const Q3CString&);
7UTCValue & operator = (UTCValue&); 9UTCValue & operator = (UTCValue&);
8UTCValue & operator = (const QCString&); 10UTCValue & operator = (const Q3CString&);
9bool operator ==(UTCValue&); 11bool operator ==(UTCValue&);
10bool operator !=(UTCValue& x) {return !(*this==x);} 12bool operator !=(UTCValue& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {UTCValue a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {UTCValue a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~UTCValue(); 16virtual ~UTCValue();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/VCard-generated.h b/kabc/vcard/include/generated/VCard-generated.h
index 4d7d96d..d09c789 100644
--- a/kabc/vcard/include/generated/VCard-generated.h
+++ b/kabc/vcard/include/generated/VCard-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4VCard(); 6VCard();
5VCard(const VCard&); 7VCard(const VCard&);
6VCard(const QCString&); 8VCard(const Q3CString&);
7VCard & operator = (VCard&); 9VCard & operator = (VCard&);
8VCard & operator = (const QCString&); 10VCard & operator = (const Q3CString&);
9bool operator ==(VCard&); 11bool operator ==(VCard&);
10bool operator !=(VCard& x) {return !(*this==x);} 12bool operator !=(VCard& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {VCard a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {VCard a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~VCard(); 16virtual ~VCard();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/VCardEntity-generated.h b/kabc/vcard/include/generated/VCardEntity-generated.h
index 9f2dfbc..cbbe8e1 100644
--- a/kabc/vcard/include/generated/VCardEntity-generated.h
+++ b/kabc/vcard/include/generated/VCardEntity-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4VCardEntity(); 6VCardEntity();
5VCardEntity(const VCardEntity&); 7VCardEntity(const VCardEntity&);
6VCardEntity(const QCString&); 8VCardEntity(const Q3CString&);
7VCardEntity & operator = (VCardEntity&); 9VCardEntity & operator = (VCardEntity&);
8VCardEntity & operator = (const QCString&); 10VCardEntity & operator = (const Q3CString&);
9bool operator ==(VCardEntity&); 11bool operator ==(VCardEntity&);
10bool operator !=(VCardEntity& x) {return !(*this==x);} 12bool operator !=(VCardEntity& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {VCardEntity a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {VCardEntity a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~VCardEntity(); 16virtual ~VCardEntity();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/include/generated/Value-generated.h b/kabc/vcard/include/generated/Value-generated.h
index 7afac34..142e720 100644
--- a/kabc/vcard/include/generated/Value-generated.h
+++ b/kabc/vcard/include/generated/Value-generated.h
@@ -1,15 +1,17 @@
1//Added by qt3to4:
2#include <Q3CString>
1// XXX Automatically generated. DO NOT EDIT! XXX // 3// XXX Automatically generated. DO NOT EDIT! XXX //
2 4
3public: 5public:
4Value(); 6Value();
5Value(const Value&); 7Value(const Value&);
6Value(const QCString&); 8Value(const Q3CString&);
7Value & operator = (Value&); 9Value & operator = (Value&);
8Value & operator = (const QCString&); 10Value & operator = (const Q3CString&);
9bool operator ==(Value&); 11bool operator ==(Value&);
10bool operator !=(Value& x) {return !(*this==x);} 12bool operator !=(Value& x) {return !(*this==x);}
11bool operator ==(const QCString& s) {Value a(s);return(*this==a);} 13bool operator ==(const Q3CString& s) {Value a(s);return(*this==a);}
12bool operator != (const QCString& s) {return !(*this == s);} 14bool operator != (const Q3CString& s) {return !(*this == s);}
13 15
14virtual ~Value(); 16virtual ~Value();
15void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;} 17void parse() {if(!parsed_) _parse();parsed_=true;assembled_=false;}
diff --git a/kabc/vcard/testread.cpp b/kabc/vcard/testread.cpp
index 919c661..4d66aaf 100644
--- a/kabc/vcard/testread.cpp
+++ b/kabc/vcard/testread.cpp
@@ -3,7 +3,9 @@
3#include <assert.h> 3#include <assert.h>
4 4
5#include <qfile.h> 5#include <qfile.h>
6#include <qtextstream.h> 6#include <q3textstream.h>
7//Added by qt3to4:
8#include <Q3CString>
7 9
8#include <VCard.h> 10#include <VCard.h>
9 11
@@ -18,14 +20,14 @@ int main(int argc, char * argv[])
18 20
19 QFile f(argv[1]); 21 QFile f(argv[1]);
20 22
21 QCString str; 23 Q3CString str;
22 24
23 if (!f.open(IO_ReadOnly)) { 25 if (!f.open(QIODevice::ReadOnly)) {
24 cerr << "Couldn't open file \"" << argv[1] << endl; 26 cerr << "Couldn't open file \"" << argv[1] << endl;
25 exit(1); 27 exit(1);
26 } 28 }
27 29
28 QTextStream t(&f); 30 Q3TextStream t(&f);
29 31
30 while (!t.eof()) 32 while (!t.eof())
31 str += t.readLine().utf8() + '\n'; 33 str += t.readLine().utf8() + '\n';
@@ -52,7 +54,7 @@ int main(int argc, char * argv[])
52 if (v.has(EntityEmail)) { 54 if (v.has(EntityEmail)) {
53 cerr << "Email parameter found" << endl; 55 cerr << "Email parameter found" << endl;
54 56
55 QCString s = v.contentLine(EntityEmail)->value()->asString(); 57 Q3CString s = v.contentLine(EntityEmail)->value()->asString();
56 58
57 cerr << "Email value == " << s << endl; 59 cerr << "Email value == " << s << endl;
58 } 60 }
diff --git a/kabc/vcard/testwrite.cpp b/kabc/vcard/testwrite.cpp
index e4bbe7b..846e51a 100644
--- a/kabc/vcard/testwrite.cpp
+++ b/kabc/vcard/testwrite.cpp
@@ -5,6 +5,8 @@
5#include <kcmdlineargs.h> 5#include <kcmdlineargs.h>
6 6
7#include <VCard.h> 7#include <VCard.h>
8//Added by qt3to4:
9#include <Q3CString>
8 10
9int main(int argc,char **argv) 11int main(int argc,char **argv)
10{ 12{
@@ -33,7 +35,7 @@ int main(int argc,char **argv)
33 cl2.setParamList( p ); 35 cl2.setParamList( p );
34 v.add(cl2); 36 v.add(cl2);
35 37
36 QCString str = v.asString(); 38 Q3CString str = v.asString();
37 39
38 kdDebug() << "--- VCard begin ---" << endl 40 kdDebug() << "--- VCard begin ---" << endl
39 << str 41 << str
diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp
index 60d02b8..e24a9dc 100644
--- a/kabc/vcard21parser.cpp
+++ b/kabc/vcard21parser.cpp
@@ -27,6 +27,8 @@ $Id$
27 27
28#include <qmap.h> 28#include <qmap.h>
29#include <qregexp.h> 29#include <qregexp.h>
30//Added by qt3to4:
31#include <Q3ValueList>
30#include <kmdcodec.h> 32#include <kmdcodec.h>
31 33
32#include "vcard21parser.h" 34#include "vcard21parser.h"
@@ -45,7 +47,7 @@ bool VCardLineX::isValid() const
45 47
46 // This is long but it makes it a bit faster (and saves me from using 48 // This is long but it makes it a bit faster (and saves me from using
47 // a tree which is probably the ideal situation, but a bit memory heavy) 49 // a tree which is probably the ideal situation, but a bit memory heavy)
48 switch( name[0] ) { 50 switch( name[0].unicode() ) {
49 case 'a': 51 case 'a':
50 if ( name == VCARD_ADR && qualified && 52 if ( name == VCARD_ADR && qualified &&
51 (qualifiers.contains(VCARD_ADR_DOM) || 53 (qualifiers.contains(VCARD_ADR_DOM) ||
@@ -269,7 +271,7 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
269 addressee.setBirthday(VCardStringToDate(tmpStr)); 271 addressee.setBirthday(VCardStringToDate(tmpStr));
270 272
271 //set the addressee's phone numbers 273 //set the addressee's phone numbers
272 for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { 274 for ( Q3ValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) {
273 if ( (*i).name == VCARD_TEL ) { 275 if ( (*i).name == VCARD_TEL ) {
274 int type = 0; 276 int type = 0;
275 if ( (*i).qualified ) { 277 if ( (*i).qualified ) {
@@ -308,7 +310,7 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
308 } 310 }
309 addressee.makePhoneNumbersOLcompatible(); 311 addressee.makePhoneNumbersOLcompatible();
310 //set the addressee's addresses 312 //set the addressee's addresses
311 for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { 313 for ( Q3ValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) {
312 if ( (*i).name == VCARD_ADR ) { 314 if ( (*i).name == VCARD_ADR ) {
313 int type = 0; 315 int type = 0;
314 if ( (*i).qualified ) { 316 if ( (*i).qualified ) {
@@ -327,7 +329,10 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data)
327 if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) 329 if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) )
328 type |= Address::Pref; 330 type |= Address::Pref;
329 } 331 }
330 addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); 332 QStringList tmp;
333 for(Q3ValueList<QString>::const_iterator ii=(*i).parameters.begin();ii!=(*i).parameters.end();++ii)
334 tmp.push_back(*ii);
335 addressee.insertAddress( readAddressFromQStringList( tmp, type ) );
331 } 336 }
332 } 337 }
333 338
@@ -408,10 +413,10 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
408 int _err = 0; 413 int _err = 0;
409 int _state = VC_STATE_BEGIN; 414 int _state = VC_STATE_BEGIN;
410 415
411 QValueList<VCardLineX> *_vcdata; 416 Q3ValueList<VCardLineX> *_vcdata;
412 QValueList<QString> lines; 417 QStringList lines;
413 418
414 _vcdata = new QValueList<VCardLineX>; 419 _vcdata = new Q3ValueList<VCardLineX>;
415 420
416 lines = QStringList::split( QRegExp( "[\x0d\x0a]" ), vc ); 421 lines = QStringList::split( QRegExp( "[\x0d\x0a]" ), vc );
417 422
@@ -501,8 +506,8 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
501 } 506 }
502 _vcl.parameters = QStringList::split( ';', value, true ); 507 _vcl.parameters = QStringList::split( ';', value, true );
503 if ( qp ) { // decode the quoted printable 508 if ( qp ) { // decode the quoted printable
504 for ( QStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) 509 for ( QLinkedList<QString>::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z )
505 *z = KCodecs::quotedPrintableDecode( (*z).latin1() ); 510 *z = KCodecs::quotedPrintableDecode( (Q3CString)(*z).latin1() );
506 } 511 }
507 } 512 }
508 } else { 513 } else {
@@ -543,7 +548,7 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err )
543 return new VCard21ParserImpl( _vcdata ); 548 return new VCard21ParserImpl( _vcdata );
544} 549}
545 550
546VCard21ParserImpl::VCard21ParserImpl(QValueList<VCardLineX> *_vcd) : _vcdata(_vcd) 551VCard21ParserImpl::VCard21ParserImpl(Q3ValueList<VCardLineX> *_vcd) : _vcdata(_vcd)
547{ 552{
548} 553}
549 554
@@ -554,7 +559,7 @@ QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifie
554 const QString lowname = name.lower(); 559 const QString lowname = name.lower();
555 const QString lowqualifier = qualifier.lower(); 560 const QString lowqualifier = qualifier.lower();
556 561
557 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 562 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
558 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { 563 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) {
559 if ((*i).parameters.count() > 0) 564 if ((*i).parameters.count() > 0)
560 return (*i).parameters[0]; 565 return (*i).parameters[0];
@@ -570,7 +575,7 @@ QString VCard21ParserImpl::getValue(const QString& name)
570 QString failed; 575 QString failed;
571 const QString lowname = name.lower(); 576 const QString lowname = name.lower();
572 577
573 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 578 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
574 if ((*i).name == lowname && !(*i).qualified) { 579 if ((*i).name == lowname && !(*i).qualified) {
575 if ((*i).parameters.count() > 0) 580 if ((*i).parameters.count() > 0)
576 return (*i).parameters[0]; 581 return (*i).parameters[0];
@@ -584,9 +589,10 @@ QString VCard21ParserImpl::getValue(const QString& name)
584QStringList VCard21ParserImpl::getValues(const QString& name) 589QStringList VCard21ParserImpl::getValues(const QString& name)
585{ 590{
586 const QString lowname = name.lower(); 591 const QString lowname = name.lower();
587 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 592 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
588 if ((*i).name == lowname && !(*i).qualified) 593 if ((*i).name == lowname && !(*i).qualified) {
589 return (*i).parameters; 594 return QStringList( (*i).parameters );
595 }
590 } 596 }
591 // failed. 597 // failed.
592 return QStringList(); 598 return QStringList();
@@ -596,9 +602,9 @@ QStringList VCard21ParserImpl::getValues(const QString& name, const QString& qua
596{ 602{
597 const QString lowname = name.lower(); 603 const QString lowname = name.lower();
598 const QString lowqualifier = qualifier.lower(); 604 const QString lowqualifier = qualifier.lower();
599 for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { 605 for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) {
600 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) 606 if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier))
601 return (*i).parameters; 607 return QStringList( (*i).parameters );
602 } 608 }
603 // failed. 609 // failed.
604 return QStringList(); 610 return QStringList();
diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h
index 77e69b6..80ba6ef 100644
--- a/kabc/vcard21parser.h
+++ b/kabc/vcard21parser.h
@@ -34,7 +34,7 @@ $Id$
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qstring.h> 35#include <qstring.h>
36#include <kurl.h> 36#include <kurl.h>
37#include <qvaluelist.h> 37#include <q3valuelist.h>
38 38
39#include "addressee.h" 39#include "addressee.h"
40#include "addressbook.h" 40#include "addressbook.h"
@@ -196,8 +196,8 @@ class VCardLineX
196public: 196public:
197 QString name; 197 QString name;
198 bool qualified; 198 bool qualified;
199 QValueList<QString> qualifiers; 199 Q3ValueList<QString> qualifiers;
200 QValueList<QString> parameters; 200 Q3ValueList<QString> parameters;
201 bool isValid() const; 201 bool isValid() const;
202}; 202};
203 203
@@ -217,10 +217,10 @@ public:
217 QStringList getValues(const QString& name, const QString& qualifier); 217 QStringList getValues(const QString& name, const QString& qualifier);
218 QStringList getValues(const QString& name); 218 QStringList getValues(const QString& name);
219 219
220 QValueList<VCardLineX> *_vcdata; 220 Q3ValueList<VCardLineX> *_vcdata;
221 221
222private: 222private:
223 VCard21ParserImpl (QValueList<VCardLineX> *_vcd); 223 VCard21ParserImpl (Q3ValueList<VCardLineX> *_vcd);
224}; 224};
225 225
226#endif 226#endif
diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp
index 580c28b..2417874 100644
--- a/kabc/vcardformatimpl.cpp
+++ b/kabc/vcardformatimpl.cpp
@@ -28,6 +28,9 @@ $Id$
28#include <qfile.h> 28#include <qfile.h>
29#include <qregexp.h> 29#include <qregexp.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <Q3CString>
33#include <Q3PtrList>
31 34
32#include <kdebug.h> 35#include <kdebug.h>
33#include <kmdcodec.h> 36#include <kmdcodec.h>
@@ -54,7 +57,7 @@ bool VCardFormatImpl::load( Addressee &addressee, QFile *file )
54 kdDebug(5700) << "VCardFormat::load()" << endl; 57 kdDebug(5700) << "VCardFormat::load()" << endl;
55 58
56 QByteArray fdata = file->readAll(); 59 QByteArray fdata = file->readAll();
57 QCString data(fdata.data(), fdata.size()+1); 60 Q3CString data(fdata.data(), fdata.size()+1);
58 61
59 VCardEntity e( data ); 62 VCardEntity e( data );
60 63
@@ -75,7 +78,7 @@ bool VCardFormatImpl::load( Addressee &addressee, QFile *file )
75bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFile *file ) 78bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
76{ 79{
77 80
78 QCString data(file->readAll().data(), file->size()+1); 81 Q3CString data(file->readAll().data(), file->size()+1);
79 VCardEntity e( data ); 82 VCardEntity e( data );
80 83
81 VCardListIterator it( e.cardList() ); 84 VCardListIterator it( e.cardList() );
@@ -108,7 +111,7 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file )
108 vcardlist.append( v ); 111 vcardlist.append( v );
109 vcards.setCardList( vcardlist ); 112 vcards.setCardList( vcardlist );
110 113
111 QCString vcardData = vcards.asString(); 114 Q3CString vcardData = vcards.asString();
112 file->writeBlock( (const char*)vcardData, vcardData.length() ); 115 file->writeBlock( (const char*)vcardData, vcardData.length() );
113} 116}
114 117
@@ -129,11 +132,11 @@ void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file
129 132
130bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) 133bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v )
131{ 134{
132 QPtrList<ContentLine> contentLines = v->contentLineList(); 135 Q3PtrList<ContentLine> contentLines = v->contentLineList();
133 ContentLine *cl; 136 ContentLine *cl;
134 137
135 for( cl = contentLines.first(); cl; cl = contentLines.next() ) { 138 for( cl = contentLines.first(); cl; cl = contentLines.next() ) {
136 QCString n = cl->name(); 139 Q3CString n = cl->name();
137 if ( n.left( 2 ) == "X-" ) { 140 if ( n.left( 2 ) == "X-" ) {
138 n = n.mid( 2 ); 141 n = n.mid( 2 );
139 int posDash = n.find( "-" ); 142 int posDash = n.find( "-" );
@@ -219,7 +222,7 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v )
219 break; 222 break;
220 223
221 case EntityBirthday: 224 case EntityBirthday:
222 addressee.setBirthday( readDateValue( cl ) ); 225 addressee.setBirthday( (QDateTime) readDateValue( cl ) );
223 break; 226 break;
224 227
225 case EntityRevision: 228 case EntityRevision:
@@ -530,7 +533,7 @@ int VCardFormatImpl::readAddressParam( ContentLine *cl )
530 int type = 0; 533 int type = 0;
531 ParamList params = cl->paramList(); 534 ParamList params = cl->paramList();
532 ParamListIterator it( params ); 535 ParamListIterator it( params );
533 QCString tmpStr; 536 Q3CString tmpStr;
534 for( ; it.current(); ++it ) { 537 for( ; it.current(); ++it ) {
535 if ( (*it)->name().upper() == "TYPE" ) { 538 if ( (*it)->name().upper() == "TYPE" ) {
536 tmpStr = (*it)->value().lower(); 539 tmpStr = (*it)->value().lower();
@@ -609,7 +612,7 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl )
609 int type = 0; 612 int type = 0;
610 ParamList params = cl->paramList(); 613 ParamList params = cl->paramList();
611 ParamListIterator it( params ); 614 ParamListIterator it( params );
612 QCString tmpStr; 615 Q3CString tmpStr;
613 for( ; it.current(); ++it ) { 616 for( ; it.current(); ++it ) {
614 if ( (*it)->name() == "TYPE" ) { 617 if ( (*it)->name() == "TYPE" ) {
615 tmpStr = (*it)->value().lower(); 618 tmpStr = (*it)->value().lower();
@@ -870,7 +873,7 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty
870 QImage img = pic.data(); 873 QImage img = pic.data();
871 if ( intern ) { // only for vCard export we really write the data inline 874 if ( intern ) { // only for vCard export we really write the data inline
872 QByteArray data; 875 QByteArray data;
873 QDataStream s( data, IO_WriteOnly ); 876 QDataStream s( &data, QIODevice::WriteOnly );
874 s.setVersion( 4 ); // to produce valid png files 877 s.setVersion( 4 ); // to produce valid png files
875 s << img; 878 s << img;
876 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); 879 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
@@ -959,7 +962,7 @@ void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, co
959 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) ); 962 cl.setValue( new TextValue( KCodecs::base64Encode( data ) ) );
960 } else { // save sound in cache 963 } else { // save sound in cache
961 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); 964 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
962 if ( file.open( IO_WriteOnly ) ) { 965 if ( file.open( QIODevice::WriteOnly ) ) {
963 file.writeBlock( data ); 966 file.writeBlock( data );
964 } 967 }
965 cl.setValue( new TextValue( "<dummy>" ) ); 968 cl.setValue( new TextValue( "<dummy>" ) );
@@ -991,7 +994,7 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee &
991 QByteArray data; 994 QByteArray data;
992 if ( v->asString() == "<dummy>" ) { // no sound inline stored => sound is in cache 995 if ( v->asString() == "<dummy>" ) { // no sound inline stored => sound is in cache
993 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); 996 QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) );
994 if ( file.open( IO_ReadOnly ) ) { 997 if ( file.open( QIODevice::ReadOnly ) ) {
995 data = file.readAll(); 998 data = file.readAll();
996 file.close(); 999 file.close();
997 } 1000 }
diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp
index 8db8c11..0b97a08 100644
--- a/kabc/vcardformatplugin.cpp
+++ b/kabc/vcardformatplugin.cpp
@@ -61,7 +61,7 @@ bool VCardFormatPlugin::checkFormat( QFile *file ) const
61{ 61{
62 QString line; 62 QString line;
63 63
64 file->readLine( line, 1024 ); 64 char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp;
65 line = line.stripWhiteSpace(); 65 line = line.stripWhiteSpace();
66 if ( line == "BEGIN:VCARD" ) 66 if ( line == "BEGIN:VCARD" )
67 return true; 67 return true;
diff --git a/kabc/vcardparser/vcard.h b/kabc/vcardparser/vcard.h
index 0bee441..85b50e4 100644
--- a/kabc/vcardparser/vcard.h
+++ b/kabc/vcardparser/vcard.h
@@ -24,14 +24,14 @@
24#include "vcardline.h" 24#include "vcardline.h"
25#include <qmap.h> 25#include <qmap.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27#include <qvaluelist.h> 27#include <q3valuelist.h>
28 28
29namespace KABC { 29namespace KABC {
30 30
31class VCard 31class VCard
32{ 32{
33 public: 33 public:
34 typedef QValueList<VCard> List; 34 typedef Q3ValueList<VCard> List;
35 typedef QMap< QString, VCardLine::List > LineMap; 35 typedef QMap< QString, VCardLine::List > LineMap;
36 36
37 enum Version { v2_1, v3_0 }; 37 enum Version { v2_1, v3_0 };
diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp
index 8df2d32..c7254a0 100644
--- a/kabc/vcardparser/vcardline.cpp
+++ b/kabc/vcardparser/vcardline.cpp
@@ -19,6 +19,8 @@
19*/ 19*/
20 20
21#include "vcardline.h" 21#include "vcardline.h"
22//Added by qt3to4:
23#include <Q3CString>
22 24
23using namespace KABC; 25using namespace KABC;
24 26
@@ -43,7 +45,7 @@ VCardLine::VCardLine( const QString &identifier, const QString &value )
43 : d( 0 ) 45 : d( 0 )
44{ 46{
45 mIdentifier = identifier; 47 mIdentifier = identifier;
46 mValue.assign( value.data(), value.length() ); 48 mValue = value;
47} 49}
48 50
49VCardLine::VCardLine( const VCardLine& line ) 51VCardLine::VCardLine( const VCardLine& line )
@@ -86,7 +88,7 @@ void VCardLine::setValueString( const QString& value )
86{ 88{
87 setValueCString( value.utf8() ); 89 setValueCString( value.utf8() );
88} 90}
89void VCardLine::setValueCString( const QCString& value ) 91void VCardLine::setValueCString( const Q3CString& value )
90{ 92{
91 mValue.duplicate( value.data(), value.length() ); 93 mValue.duplicate( value.data(), value.length() );
92} 94}
diff --git a/kabc/vcardparser/vcardline.h b/kabc/vcardparser/vcardline.h
index 8dc9322..dc4bdec 100644
--- a/kabc/vcardparser/vcardline.h
+++ b/kabc/vcardparser/vcardline.h
@@ -22,8 +22,8 @@
22#define VCARDLINE_H 22#define VCARDLINE_H
23 23
24#include <qstringlist.h> 24#include <qstringlist.h>
25#include <qvaluelist.h> 25#include <q3valuelist.h>
26#include <qcstring.h> 26#include <q3cstring.h>
27#include <qvariant.h> 27#include <qvariant.h>
28#include <qmap.h> 28#include <qmap.h>
29#include <qstring.h> 29#include <qstring.h>
@@ -33,7 +33,7 @@ namespace KABC {
33class VCardLine 33class VCardLine
34{ 34{
35 public: 35 public:
36 typedef QValueList<VCardLine> List; 36 typedef Q3ValueList<VCardLine> List;
37 typedef QMap<QString, QStringList> ParamMap; 37 typedef QMap<QString, QStringList> ParamMap;
38 38
39 VCardLine(); 39 VCardLine();
@@ -59,7 +59,7 @@ class VCardLine
59 * Sets the value of of this line. 59 * Sets the value of of this line.
60 */ 60 */
61 void setValueString( const QString& value ); 61 void setValueString( const QString& value );
62 void setValueCString( const QCString& value ); 62 void setValueCString( const Q3CString& value );
63 void setValueBytes( const QByteArray& value ); 63 void setValueBytes( const QByteArray& value );
64 64
65 /** 65 /**
diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp
index 11622a0..a319531 100644
--- a/kabc/vcardparser/vcardparser.cpp
+++ b/kabc/vcardparser/vcardparser.cpp
@@ -218,7 +218,7 @@ QString VCardParser::createVCards( const VCard::List& list )
218 if ( encodingType == "b" ) 218 if ( encodingType == "b" )
219 KCodecs::base64Encode( input, output ); 219 KCodecs::base64Encode( input, output );
220 else if ( encodingType == "quoted-printable" ) 220 else if ( encodingType == "quoted-printable" )
221 KCodecs::quotedPrintableEncode( input, output ); 221 KCodecs::quotedPrintableEncode( input, output, true );
222 textLine.append( ":" + QString( output ) ); 222 textLine.append( ":" + QString( output ) );
223 } else 223 } else
224 textLine.append( ":" + (*lineIt).valueString().replace( QRegExp("\n"), "\\n" ) ); 224 textLine.append( ":" + (*lineIt).valueString().replace( QRegExp("\n"), "\\n" ) );
diff --git a/kabc/vcardparser/vcardtool.cpp b/kabc/vcardparser/vcardtool.cpp
index 204326e..435c3b0 100644
--- a/kabc/vcardparser/vcardtool.cpp
+++ b/kabc/vcardparser/vcardtool.cpp
@@ -652,7 +652,7 @@ VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pi
652 if ( pic.isIntern() ) { 652 if ( pic.isIntern() ) {
653 if ( !pic.data().isNull() ) { 653 if ( !pic.data().isNull() ) {
654 QByteArray input; 654 QByteArray input;
655 QDataStream s( input, IO_WriteOnly ); 655 QDataStream s( &input, QIODevice::WriteOnly );
656 s.setVersion( 4 ); 656 s.setVersion( 4 );
657 s << pic.data(); 657 s << pic.data();
658 line.setValueBytes( input ); 658 line.setValueBytes( input );
diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp
index 3dcd592..83908d0 100644
--- a/kaddressbook/addresseditwidget.cpp
+++ b/kaddressbook/addresseditwidget.cpp
@@ -22,24 +22,31 @@
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qbuttongroup.h> 25#include <q3buttongroup.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlistbox.h> 30#include <q3listbox.h>
31#include <qlistview.h> 31#include <q3listview.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33#include <qsignal.h> 33#include <q3signal.h>
34#include <qstring.h> 34#include <qstring.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <QDesktopWidget>
37
38#include <Q3VBoxLayout>
39#include <Q3GridLayout>
36 40
37#ifndef KAB_EMBEDDED 41#ifndef KAB_EMBEDDED
38#include <qtextedit.h> 42#include <q3textedit.h>
43//Added by qt3to4:
44#include <Q3ValueList>
45#include <Q3VBoxLayout>
39#include <kaccelmanager.h> 46#include <kaccelmanager.h>
40#include <kbuttonbox.h> 47#include <kbuttonbox.h>
41#else //KAB_EMBEDDED 48#else //KAB_EMBEDDED
42#include <qmultilineedit.h> 49#include <q3multilineedit.h>
43#endif //KAB_EMBEDDED 50#endif //KAB_EMBEDDED
44 51
45#include <qtoolbutton.h> 52#include <qtoolbutton.h>
@@ -67,9 +74,9 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
67{ 74{
68 75
69 mConfig = AddresseeConfig::instance(); 76 mConfig = AddresseeConfig::instance();
70 QVBoxLayout *layout = new QVBoxLayout( this ); 77 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
71 layout->setSpacing( KDialog::spacingHintSmall() ); 78 layout->setSpacing( KDialog::spacingHintSmall() );
72 QHBox *b1 = new QHBox( this); 79 Q3HBox *b1 = new Q3HBox( this);
73 //QLabel * label = new QLabel( b1 ); 80 //QLabel * label = new QLabel( b1 );
74 //label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); 81 //label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) );
75 82
@@ -84,11 +91,11 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name )
84 // layout->addWidget( mTypeCombo ); 91 // layout->addWidget( mTypeCombo );
85 92
86#ifndef KAB_EMBEDDED 93#ifndef KAB_EMBEDDED
87 mAddressTextEdit = new QTextEdit( this ); 94 mAddressTextEdit = new Q3TextEdit( this );
88 mAddressTextEdit->setReadOnly( true ); 95 mAddressTextEdit->setReadOnly( true );
89 mAddressTextEdit->setMinimumHeight( 20 ); 96 mAddressTextEdit->setMinimumHeight( 20 );
90#else //KAB_EMBEDDED 97#else //KAB_EMBEDDED
91 mAddressTextEdit = new QMultiLineEdit( this ); 98 mAddressTextEdit = new Q3MultiLineEdit( this );
92 mAddressTextEdit->setReadOnly( true ); 99 mAddressTextEdit->setReadOnly( true );
93 mAddressTextEdit->setMinimumHeight( 20 ); 100 mAddressTextEdit->setMinimumHeight( 20 );
94#endif //KAB_EMBEDDED 101#endif //KAB_EMBEDDED
@@ -126,13 +133,13 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr,
126 // Insert types for existing numbers. 133 // Insert types for existing numbers.
127 mTypeCombo->insertTypeList( list ); 134 mTypeCombo->insertTypeList( list );
128 135
129 QValueList<int> defaultTypes; 136 Q3ValueList<int> defaultTypes;
130 defaultTypes << KABC::Address::Home; 137 defaultTypes << KABC::Address::Home;
131 defaultTypes << KABC::Address::Work; 138 defaultTypes << KABC::Address::Work;
132 139
133 mConfig->setUid( mAddressee.uid() ); 140 mConfig->setUid( mAddressee.uid() );
134 QValueList<int> configList = mConfig->noDefaultAddrTypes(); 141 Q3ValueList<int> configList = mConfig->noDefaultAddrTypes();
135 QValueList<int>::ConstIterator it; 142 Q3ValueList<int>::ConstIterator it;
136 for ( it = configList.begin(); it != configList.end(); ++it ) 143 for ( it = configList.begin(); it != configList.end(); ++it )
137 defaultTypes.remove( *it ); 144 defaultTypes.remove( *it );
138 145
@@ -181,7 +188,7 @@ void AddressEditWidget::edit()
181 } 188 }
182 189
183 mConfig->setUid( mAddressee.uid() ); 190 mConfig->setUid( mAddressee.uid() );
184 QValueList<int> configList; 191 Q3ValueList<int> configList;
185 if ( !hasHome ) { 192 if ( !hasHome ) {
186 configList << KABC::Address::Home; 193 configList << KABC::Address::Home;
187 } 194 }
@@ -255,7 +262,7 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
255 262
256 QWidget *page = plainPage(); 263 QWidget *page = plainPage();
257 264
258 QGridLayout *topLayout = new QGridLayout( page, 8, 2 ); 265 Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 );
259 topLayout->setSpacing( spacingHintSmall() ); 266 topLayout->setSpacing( spacingHintSmall() );
260 267
261 mTypeCombo = new AddressTypeCombo( mAddressList, page ); 268 mTypeCombo = new AddressTypeCombo( mAddressList, page );
@@ -266,9 +273,9 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
266 topLayout->addWidget( label, 1, 0 ); 273 topLayout->addWidget( label, 1, 0 );
267 274
268#ifndef KAB_EMBEDDED 275#ifndef KAB_EMBEDDED
269 mStreetTextEdit = new QTextEdit( page ); 276 mStreetTextEdit = new Q3TextEdit( page );
270#else //KAB_EMBEDDED 277#else //KAB_EMBEDDED
271 mStreetTextEdit = new QMultiLineEdit( page ); 278 mStreetTextEdit = new Q3MultiLineEdit( page );
272//US qDebug("AddressEditDialog::AddressEditDialog has to be changed"); 279//US qDebug("AddressEditDialog::AddressEditDialog has to be changed");
273#endif //KAB_EMBEDDED 280#endif //KAB_EMBEDDED
274 281
@@ -311,14 +318,14 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list,
311 fillCountryCombo(); 318 fillCountryCombo();
312 label->setBuddy( mCountryCombo ); 319 label->setBuddy( mCountryCombo );
313 topLayout->addWidget( mCountryCombo, 6, 1 ); 320 topLayout->addWidget( mCountryCombo, 6, 1 );
314 mCountryCombo->setSizeLimit( 8); 321 mCountryCombo->setMaxVisibleItems( 8);
315 mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page ); 322 mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page );
316 topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 ); 323 topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 );
317 /* 324 /*
318 KSeparator *sep = new KSeparator( KSeparator::HLine, page ); 325 KSeparator *sep = new KSeparator( KSeparator::HLine, page );
319 topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 ); 326 topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 );
320 */ 327 */
321 QHBox *buttonBox = new QHBox( page ); 328 Q3HBox *buttonBox = new Q3HBox( page );
322 buttonBox->setSpacing( spacingHint() ); 329 buttonBox->setSpacing( spacingHint() );
323 topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 ); 330 topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 );
324 331
@@ -583,9 +590,9 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent )
583 parent, "AddressTypeDialog" ) 590 parent, "AddressTypeDialog" )
584{ 591{
585 QWidget *page = plainPage(); 592 QWidget *page = plainPage();
586 QVBoxLayout *layout = new QVBoxLayout( page ); 593 Q3VBoxLayout *layout = new Q3VBoxLayout( page );
587 594
588 mGroup = new QButtonGroup( 2, Horizontal, i18n( "Address Types" ), page ); 595 mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Address Types" ), page );
589 layout->addWidget( mGroup ); 596 layout->addWidget( mGroup );
590 597
591 mTypeList = KABC::Address::typeList(); 598 mTypeList = KABC::Address::typeList();
@@ -617,6 +624,6 @@ int AddressTypeDialog::type() const
617 return type; 624 return type;
618} 625}
619 626
620#ifndef KAB_EMBEDDED 627#ifndef KAB_EMBEDDED_
621#include "addresseditwidget.moc" 628#include "moc_addresseditwidget.cpp"
622#endif //KAB_EMBEDDED 629#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseditwidget.h b/kaddressbook/addresseditwidget.h
index bc96d74..1d4e138 100644
--- a/kaddressbook/addresseditwidget.h
+++ b/kaddressbook/addresseditwidget.h
@@ -33,13 +33,13 @@
33#include "addresseeconfig.h" 33#include "addresseeconfig.h"
34#include "typecombo.h" 34#include "typecombo.h"
35 35
36class QButtonGroup; 36class Q3ButtonGroup;
37class QCheckBox; 37class QCheckBox;
38class QListView; 38class Q3ListView;
39#ifndef KAB_EMBEDDED 39#ifndef KAB_EMBEDDED
40class QTextEdit; 40class Q3TextEdit;
41#else //KAB_EMBEDDED 41#else //KAB_EMBEDDED
42class QMultiLineEdit; 42class Q3MultiLineEdit;
43#endif //KAB_EMBEDDED 43#endif //KAB_EMBEDDED
44class QToolButton; 44class QToolButton;
45 45
@@ -81,9 +81,9 @@ class AddressEditWidget : public QWidget
81 81
82 QPushButton *mEditButton; 82 QPushButton *mEditButton;
83#ifndef KAB_EMBEDDED 83#ifndef KAB_EMBEDDED
84 QTextEdit *mAddressTextEdit; 84 Q3TextEdit *mAddressTextEdit;
85#else //KAB_EMBEDDED 85#else //KAB_EMBEDDED
86 QMultiLineEdit *mAddressTextEdit; 86 Q3MultiLineEdit *mAddressTextEdit;
87#endif //KAB_EMBEDDED 87#endif //KAB_EMBEDDED
88 88
89 KABC::Address::List mAddressList; 89 KABC::Address::List mAddressList;
@@ -120,9 +120,9 @@ class AddressEditDialog : public KDialogBase
120 120
121 AddressTypeCombo *mTypeCombo; 121 AddressTypeCombo *mTypeCombo;
122#ifndef KAB_EMBEDDED 122#ifndef KAB_EMBEDDED
123 QTextEdit *mStreetTextEdit; 123 Q3TextEdit *mStreetTextEdit;
124#else //KAB_EMBEDDED 124#else //KAB_EMBEDDED
125 QMultiLineEdit *mStreetTextEdit; 125 Q3MultiLineEdit *mStreetTextEdit;
126#endif //KAB_EMBEDDED 126#endif //KAB_EMBEDDED
127 KComboBox *mCountryCombo; 127 KComboBox *mCountryCombo;
128 KLineEdit *mRegionEdit; 128 KLineEdit *mRegionEdit;
@@ -151,7 +151,7 @@ class AddressTypeDialog : public KDialogBase
151 int type() const; 151 int type() const;
152 152
153 private: 153 private:
154 QButtonGroup *mGroup; 154 Q3ButtonGroup *mGroup;
155 155
156 KABC::Address::TypeList mTypeList; 156 KABC::Address::TypeList mTypeList;
157}; 157};
diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp
index ea0436f..81b1bf4 100644
--- a/kaddressbook/addresseeconfig.cpp
+++ b/kaddressbook/addresseeconfig.cpp
@@ -26,6 +26,8 @@
26//US 26//US
27#include <kstandarddirs.h> 27#include <kstandarddirs.h>
28#include <qfileinfo.h> 28#include <qfileinfo.h>
29//Added by qt3to4:
30#include <Q3ValueList>
29 31
30using namespace KABC; 32using namespace KABC;
31 33
@@ -77,13 +79,13 @@ void AddresseeConfig::setAutomaticNameParsing( bool value )
77 KABPrefs::instance()->mAutomaticNameParsing ); 79 KABPrefs::instance()->mAutomaticNameParsing );
78} 80}
79 81
80void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) 82void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types )
81{ 83{
82 AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types ); 84 AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types );
83 AddresseeConfig::config()->sync(); 85 AddresseeConfig::config()->sync();
84} 86}
85 87
86 QValueList<int> AddresseeConfig::noDefaultAddrTypes() const 88 Q3ValueList<int> AddresseeConfig::noDefaultAddrTypes() const
87{ 89{
88 return AddresseeConfig::config()->readIntListEntry( "NoDefaultAddrTypes" ); 90 return AddresseeConfig::config()->readIntListEntry( "NoDefaultAddrTypes" );
89} 91}
diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h
index 47fbdd6..f6bb3e9 100644
--- a/kaddressbook/addresseeconfig.h
+++ b/kaddressbook/addresseeconfig.h
@@ -26,6 +26,8 @@
26 26
27#include <kabc/addressee.h> 27#include <kabc/addressee.h>
28#include <kconfig.h> 28#include <kconfig.h>
29//Added by qt3to4:
30#include <Q3ValueList>
29 31
30using namespace KABC; 32using namespace KABC;
31 33
@@ -43,8 +45,8 @@ class AddresseeConfig
43 void setAutomaticNameParsing( bool value ); 45 void setAutomaticNameParsing( bool value );
44 bool automaticNameParsing(); 46 bool automaticNameParsing();
45 47
46 void setNoDefaultAddrTypes( const QValueList<int> &types ); 48 void setNoDefaultAddrTypes( const Q3ValueList<int> &types );
47 QValueList<int> noDefaultAddrTypes() const; 49 Q3ValueList<int> noDefaultAddrTypes() const;
48 50
49 void remove( const QString & uid); 51 void remove( const QString & uid);
50 52
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp
index b5a60f2..b925a07 100644
--- a/kaddressbook/addresseeeditordialog.cpp
+++ b/kaddressbook/addresseeeditordialog.cpp
@@ -23,6 +23,9 @@
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qapplication.h> 25#include <qapplication.h>
26#include <QDesktopWidget>
27//Added by qt3to4:
28#include <Q3VBoxLayout>
26 29
27#include <kdebug.h> 30#include <kdebug.h>
28#include <klocale.h> 31#include <klocale.h>
@@ -43,7 +46,7 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent,
43 46
44 QWidget *page = plainPage(); 47 QWidget *page = plainPage();
45 48
46 QVBoxLayout *layout = new QVBoxLayout( page ); 49 Q3VBoxLayout *layout = new Q3VBoxLayout( page );
47 50
48 mEditorWidget = new AddresseeEditorWidget( core, false, page ); 51 mEditorWidget = new AddresseeEditorWidget( core, false, page );
49 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), 52 connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ),
@@ -118,6 +121,6 @@ void AddresseeEditorDialog::slotCancel()
118 121
119} 122}
120 123
121#ifndef KAB_EMBEDDED 124#ifndef KAB_EMBEDDED_
122#include "addresseeeditordialog.moc" 125#include "moc_addresseeeditordialog.cpp"
123#endif //KAB_EMBEDDED 126#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp
index 4313998..a95db03 100644
--- a/kaddressbook/addresseeeditorwidget.cpp
+++ b/kaddressbook/addresseeeditorwidget.cpp
@@ -22,23 +22,27 @@
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qhbox.h> 25#include <q3hbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlistbox.h> 28#include <q3listbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qtabwidget.h> 30#include <qtabwidget.h>
31#include <qapplication.h> 31#include <qapplication.h>
32 32
33#ifndef KAB_EMBEDDED 33#ifndef KAB_EMBEDDED
34#include <qtextedit.h> 34#include <q3textedit.h>
35//Added by qt3to4:
36#include <Q3GridLayout>
37#include <Q3PopupMenu>
38#include <Q3VBoxLayout>
35 39
36#include <kaccelmanager.h> 40#include <kaccelmanager.h>
37#include "keywidget.h" 41#include "keywidget.h"
38#include "soundwidget.h" 42#include "soundwidget.h"
39 43
40#else //KAB_EMBEDDED 44#else //KAB_EMBEDDED
41#include <qmultilineedit.h> 45#include <q3multilineedit.h>
42#endif //KAB_EMBEDDED 46#endif //KAB_EMBEDDED
43 47
44 48
@@ -130,7 +134,7 @@ void AddresseeEditorWidget::textChanged( const QString& )
130 134
131void AddresseeEditorWidget::initGUI() 135void AddresseeEditorWidget::initGUI()
132{ 136{
133 QVBoxLayout *layout = new QVBoxLayout( this ); 137 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
134 138
135 mTabWidget = new QTabWidget( this ); 139 mTabWidget = new QTabWidget( this );
136 layout->addWidget( mTabWidget ); 140 layout->addWidget( mTabWidget );
@@ -160,7 +164,7 @@ void AddresseeEditorWidget::setupTab1()
160 horLayout = true; 164 horLayout = true;
161 maxCol = 3; 165 maxCol = 3;
162 } 166 }
163 QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); 167 Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol );
164 168
165 layout->setMargin( KDialogBase::marginHintSmall() ); 169 layout->setMargin( KDialogBase::marginHintSmall() );
166 layout->setSpacing( KDialogBase::spacingHintSmall() ); 170 layout->setSpacing( KDialogBase::spacingHintSmall() );
@@ -327,7 +331,7 @@ void AddresseeEditorWidget::setupTab1()
327 layout->addMultiCellWidget( bar, 10, 10, 0, 6 ); 331 layout->addMultiCellWidget( bar, 10, 10, 0, 6 );
328*/ 332*/
329 /////////////////////////////////////// 333 ///////////////////////////////////////
330 QHBox *categoryBox = new QHBox( tab1 ,"cato"); 334 Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato");
331 categoryBox->setSpacing( KDialogBase::spacingHint() ); 335 categoryBox->setSpacing( KDialogBase::spacingHint() );
332 categoryBox->setMargin( KDialogBase::marginHintSmall() ); 336 categoryBox->setMargin( KDialogBase::marginHintSmall() );
333 337
@@ -337,7 +341,7 @@ void AddresseeEditorWidget::setupTab1()
337 341
338 mCategoryEdit = new QPushButton ( categoryBox ); 342 mCategoryEdit = new QPushButton ( categoryBox );
339 mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); 343 mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) );
340 mCatPopup = new QPopupMenu ( categoryBox ); 344 mCatPopup = new Q3PopupMenu ( categoryBox );
341 mCategoryEdit->setPopup( mCatPopup ); 345 mCategoryEdit->setPopup( mCatPopup );
342 connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); 346 connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
343 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); 347 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
@@ -411,7 +415,7 @@ void AddresseeEditorWidget::setupTab1_1()
411 QWidget *tab1_1 = new QWidget( mTabWidget ); 415 QWidget *tab1_1 = new QWidget( mTabWidget );
412 416
413//US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 ); 417//US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 );
414 QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 ); 418 Q3GridLayout *layout = new Q3GridLayout( tab1_1, 7, 2 );
415 layout->setMargin( KDialogBase::marginHintSmall() ); 419 layout->setMargin( KDialogBase::marginHintSmall() );
416 layout->setSpacing( KDialogBase::spacingHintSmall() ); 420 layout->setSpacing( KDialogBase::spacingHintSmall() );
417 421
@@ -612,7 +616,7 @@ void AddresseeEditorWidget::setupTab2()
612 // This is the Details tab 616 // This is the Details tab
613 QWidget *tab2 = new QWidget( mTabWidget ); 617 QWidget *tab2 = new QWidget( mTabWidget );
614 618
615 QGridLayout *layout = new QGridLayout( tab2, 8, 3 ); 619 Q3GridLayout *layout = new Q3GridLayout( tab2, 8, 3 );
616 layout->setMargin( KDialogBase::marginHintSmall() ); 620 layout->setMargin( KDialogBase::marginHintSmall() );
617 layout->setSpacing( KDialogBase::spacingHintSmall() ); 621 layout->setSpacing( KDialogBase::spacingHintSmall() );
618 622
@@ -691,7 +695,7 @@ void AddresseeEditorWidget::setupTab2()
691 int iii = 6; 695 int iii = 6;
692 696
693 if ( QApplication::desktop()->width() == 640 ) { 697 if ( QApplication::desktop()->width() == 640 ) {
694 QHBox * nbox = new QHBox ( tab2 ); 698 Q3HBox * nbox = new Q3HBox ( tab2 );
695 label = new QLabel( i18n( "Nick name:" )+" ", nbox ); 699 label = new QLabel( i18n( "Nick name:" )+" ", nbox );
696 mNicknameEdit = new KLineEdit( nbox ); 700 mNicknameEdit = new KLineEdit( nbox );
697 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), 701 connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ),
@@ -735,7 +739,7 @@ void AddresseeEditorWidget::setupTab2()
735 layout->addWidget( mChildEdit, iii, 2 ); 739 layout->addWidget( mChildEdit, iii, 2 );
736 ++iii; 740 ++iii;
737 if ( QApplication::desktop()->width() == 640 ) { 741 if ( QApplication::desktop()->width() == 640 ) {
738 QHBox * nbox = new QHBox ( tab2 ); 742 Q3HBox * nbox = new Q3HBox ( tab2 );
739 label = new QLabel( i18n( "Birthday:" )+" ", nbox ); 743 label = new QLabel( i18n( "Birthday:" )+" ", nbox );
740 mBirthdayPicker = new KDateEdit( nbox ); 744 mBirthdayPicker = new KDateEdit( nbox );
741 //mBirthdayPicker->toggleDateFormat(); 745 //mBirthdayPicker->toggleDateFormat();
@@ -804,7 +808,7 @@ void AddresseeEditorWidget::setupTab2_1()
804 // This is the Details tab 808 // This is the Details tab
805 QWidget *tab2_2 = new QWidget( mTabWidget ); 809 QWidget *tab2_2 = new QWidget( mTabWidget );
806 810
807 QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 ); 811 Q3GridLayout *layout = new Q3GridLayout( tab2_2, 1, 2 );
808 layout->setMargin( KDialogBase::marginHintSmall() ); 812 layout->setMargin( KDialogBase::marginHintSmall() );
809 layout->setSpacing( KDialogBase::spacingHintSmall() ); 813 layout->setSpacing( KDialogBase::spacingHintSmall() );
810 814
@@ -926,12 +930,12 @@ void AddresseeEditorWidget::setupTab2_1()
926//US layout->addWidget( label, 7, 0 ); 930//US layout->addWidget( label, 7, 0 );
927 layout->addWidget( label, 0, 0 ); 931 layout->addWidget( label, 0, 0 );
928#ifndef KAB_EMBEDDED 932#ifndef KAB_EMBEDDED
929 mNoteEdit = new QTextEdit( tab2_2 ); 933 mNoteEdit = new Q3TextEdit( tab2_2 );
930 mNoteEdit->setWordWrap( QTextEdit::WidgetWidth ); 934 mNoteEdit->setWordWrap( Q3TextEdit::WidgetWidth );
931 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); 935 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
932#else //KAB_EMBEDDED 936#else //KAB_EMBEDDED
933 mNoteEdit = new QMultiLineEdit( tab2_2 ); 937 mNoteEdit = new Q3MultiLineEdit( tab2_2 );
934 mNoteEdit->setWordWrap( QMultiLineEdit::WidgetWidth ); 938 mNoteEdit->setWordWrap( Q3MultiLineEdit::WidgetWidth );
935 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); 939 mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() );
936#endif //KAB_EMBEDDED 940#endif //KAB_EMBEDDED
937 941
@@ -953,7 +957,7 @@ void AddresseeEditorWidget::setupTab3()
953 // This is the Misc tab 957 // This is the Misc tab
954 QWidget *tab3 = new QWidget( mTabWidget ); 958 QWidget *tab3 = new QWidget( mTabWidget );
955 959
956 QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); 960 Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 );
957 layout->setMargin( KDialogBase::marginHintSmall() ); 961 layout->setMargin( KDialogBase::marginHintSmall() );
958 layout->setSpacing( KDialogBase::spacingHintSmall() ); 962 layout->setSpacing( KDialogBase::spacingHintSmall() );
959//US layout->setColStretch( 2, 1 ); 963//US layout->setColStretch( 2, 1 );
@@ -1005,7 +1009,7 @@ void AddresseeEditorWidget::setupTab3_1()
1005 QWidget *tab3 = new QWidget( mTabWidget ); 1009 QWidget *tab3 = new QWidget( mTabWidget );
1006 1010
1007//US QGridLayout *layout = new QGridLayout( tab3, 2, 3 ); 1011//US QGridLayout *layout = new QGridLayout( tab3, 2, 3 );
1008 QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); 1012 Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 );
1009 layout->setMargin( KDialogBase::marginHint() ); 1013 layout->setMargin( KDialogBase::marginHint() );
1010 layout->setSpacing( KDialogBase::spacingHint() ); 1014 layout->setSpacing( KDialogBase::spacingHint() );
1011//US layout->setColStretch( 2, 1 ); 1015//US layout->setColStretch( 2, 1 );
@@ -1430,6 +1434,6 @@ QString AddresseeEditorWidget::identifier() const
1430 return i18n( "contact_editor" ); 1434 return i18n( "contact_editor" );
1431} 1435}
1432 1436
1433#ifndef KAB_EMBEDDED 1437#ifndef KAB_EMBEDDED_
1434#include "addresseeeditorwidget.moc" 1438#include "moc_addresseeeditorwidget.cpp"
1435#endif //KAB_EMBEDDED 1439#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h
index 816bbb5..aa1207e 100644
--- a/kaddressbook/addresseeeditorwidget.h
+++ b/kaddressbook/addresseeeditorwidget.h
@@ -25,7 +25,7 @@
25#define ADDRESSEEEDITORWIDGET_H 25#define ADDRESSEEEDITORWIDGET_H
26 26
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qpopupmenu.h> 28#include <q3popupmenu.h>
29#include <qcombobox.h> 29#include <qcombobox.h>
30 30
31#include <kabc/addressee.h> 31#include <kabc/addressee.h>
@@ -40,9 +40,9 @@ class QSpinBox;
40class QTabWidget; 40class QTabWidget;
41 41
42#ifndef KAB_EMBEDDED 42#ifndef KAB_EMBEDDED
43class QTextEdit; 43class Q3TextEdit;
44#else //KAB_EMBEDDED 44#else //KAB_EMBEDDED
45class QMultiLineEdit; 45class Q3MultiLineEdit;
46#endif //KAB_EMBEDDED 46#endif //KAB_EMBEDDED
47 47
48class KComboBox; 48class KComboBox;
@@ -155,7 +155,7 @@ class AddresseeEditorWidget : public ExtensionWidget
155 KLineEdit *mURLEdit; 155 KLineEdit *mURLEdit;
156 KLineEdit *mIMAddressEdit; 156 KLineEdit *mIMAddressEdit;
157 QPushButton *mCategoryEdit; 157 QPushButton *mCategoryEdit;
158 QPopupMenu *mCatPopup; 158 Q3PopupMenu *mCatPopup;
159 SecrecyWidget *mSecrecyWidget; 159 SecrecyWidget *mSecrecyWidget;
160 KSqueezedTextLabel *mNameLabel; 160 KSqueezedTextLabel *mNameLabel;
161 161
@@ -172,9 +172,9 @@ class AddresseeEditorWidget : public ExtensionWidget
172 KDateEdit *mBirthdayPicker; 172 KDateEdit *mBirthdayPicker;
173 KDateEdit *mAnniversaryPicker; 173 KDateEdit *mAnniversaryPicker;
174#ifndef KAB_EMBEDDED 174#ifndef KAB_EMBEDDED
175 QTextEdit *mNoteEdit; 175 Q3TextEdit *mNoteEdit;
176#else //KAB_EMBEDDED 176#else //KAB_EMBEDDED
177 QMultiLineEdit *mNoteEdit; 177 Q3MultiLineEdit *mNoteEdit;
178#endif //KAB_EMBEDDED 178#endif //KAB_EMBEDDED
179 179
180 QSpinBox *mTimeZoneSpin; 180 QSpinBox *mTimeZoneSpin;
diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp
index 366384a..a860f6d 100644
--- a/kaddressbook/addresseeutil.cpp
+++ b/kaddressbook/addresseeutil.cpp
@@ -46,7 +46,7 @@ QString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list
46 46
47KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data ) 47KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data )
48{ 48{
49 uint numVCards = data.contains( "BEGIN:VCARD", false ); 49 uint numVCards = data.count( "BEGIN:VCARD", Qt::CaseInsensitive );
50 QStringList dataList = QStringList::split( "\r\n\r\n", data ); 50 QStringList dataList = QStringList::split( "\r\n\r\n", data );
51 51
52 KABC::Addressee::List addrList; 52 KABC::Addressee::List addrList;
diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp
index 6def26b..b52a83c 100644
--- a/kaddressbook/addviewdialog.cpp
+++ b/kaddressbook/addviewdialog.cpp
@@ -25,17 +25,19 @@
25#endif //KAB_EMBEDDED 25#endif //KAB_EMBEDDED
26 26
27#include <qradiobutton.h> 27#include <qradiobutton.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qlayout.h> 31#include <qlayout.h>
32//Added by qt3to4:
33#include <Q3GridLayout>
32 34
33#include <klocale.h> 35#include <klocale.h>
34#include <kglobal.h> 36#include <kglobal.h>
35#include "kaddressbookview.h" 37#include "kaddressbookview.h"
36#include "addviewdialog.h" 38#include "addviewdialog.h"
37 39
38AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, 40AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict,
39 QWidget *parent, const char *name ) 41 QWidget *parent, const char *name )
40 : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), 42 : KDialogBase( KDialogBase::Plain, i18n( "Add View" ),
41 KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, 43 KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
@@ -48,7 +50,7 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
48 50
49 QWidget *page = plainPage(); 51 QWidget *page = plainPage();
50 52
51 QGridLayout *layout = new QGridLayout( page, 2, 2 ); 53 Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 );
52 layout->setSpacing( spacingHint() ); 54 layout->setSpacing( spacingHint() );
53 layout->setRowStretch( 1, 1 ); 55 layout->setRowStretch( 1, 1 );
54 layout->setColStretch( 1, 1 ); 56 layout->setColStretch( 1, 1 );
@@ -61,12 +63,12 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict,
61 SLOT( textChanged( const QString& ) ) ); 63 SLOT( textChanged( const QString& ) ) );
62 layout->addWidget( mViewNameEdit, 0, 1 ); 64 layout->addWidget( mViewNameEdit, 0, 1 );
63 65
64 mTypeGroup = new QButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); 66 mTypeGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page );
65 connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); 67 connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) );
66 layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); 68 layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 );
67 69
68 // Now create the radio buttons. This needs some layout work. 70 // Now create the radio buttons. This needs some layout work.
69 QDictIterator<ViewFactory> iter( *mViewFactoryDict ); 71 Q3DictIterator<ViewFactory> iter( *mViewFactoryDict );
70 for ( iter.toFirst(); iter.current(); ++iter ) { 72 for ( iter.toFirst(); iter.current(); ++iter ) {
71//US i am not quit sure, why I can nopt use (*iter)-> here 73//US i am not quit sure, why I can nopt use (*iter)-> here
72//US new QRadioButton( (*iter)->type(), mTypeGroup ); 74//US new QRadioButton( (*iter)->type(), mTypeGroup );
@@ -113,6 +115,6 @@ void AddViewDialog::textChanged( const QString &text )
113 enableButton( KDialogBase::Ok, !text.isEmpty() ); 115 enableButton( KDialogBase::Ok, !text.isEmpty() );
114} 116}
115 117
116#ifndef KAB_EMBEDDED 118#ifndef KAB_EMBEDDED_
117#include "addviewdialog.moc" 119#include "moc_addviewdialog.cpp"
118#endif //KAB_EMBEDDED 120#endif //KAB_EMBEDDED
diff --git a/kaddressbook/addviewdialog.h b/kaddressbook/addviewdialog.h
index 8cc12f5..c3e8efd 100644
--- a/kaddressbook/addviewdialog.h
+++ b/kaddressbook/addviewdialog.h
@@ -25,11 +25,11 @@
25#define ADDVIEWDIALOG_H 25#define ADDVIEWDIALOG_H
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28#include <qdict.h> 28#include <q3dict.h>
29#include <qstring.h> 29#include <qstring.h>
30 30
31class ViewFactory; 31class ViewFactory;
32class QButtonGroup; 32class Q3ButtonGroup;
33class QLineEdit; 33class QLineEdit;
34 34
35 35
@@ -43,7 +43,7 @@ class AddViewDialog : public KDialogBase
43 Q_OBJECT 43 Q_OBJECT
44 44
45 public: 45 public:
46 AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent, 46 AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent,
47 const char *name = 0 ); 47 const char *name = 0 );
48 ~AddViewDialog(); 48 ~AddViewDialog();
49 49
@@ -63,9 +63,9 @@ class AddViewDialog : public KDialogBase
63 void textChanged( const QString &text ); 63 void textChanged( const QString &text );
64 64
65 private: 65 private:
66 QDict<ViewFactory> *mViewFactoryDict; 66 Q3Dict<ViewFactory> *mViewFactoryDict;
67 QLineEdit *mViewNameEdit; 67 QLineEdit *mViewNameEdit;
68 QButtonGroup *mTypeGroup; 68 Q3ButtonGroup *mTypeGroup;
69 69
70 int mTypeId; 70 int mTypeId;
71}; 71};
diff --git a/kaddressbook/details/detailsviewcontainer.cpp b/kaddressbook/details/detailsviewcontainer.cpp
index cee5886..4a86aca 100644
--- a/kaddressbook/details/detailsviewcontainer.cpp
+++ b/kaddressbook/details/detailsviewcontainer.cpp
@@ -22,10 +22,13 @@
22*/ 22*/
23 23
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29//Added by qt3to4:
30#include <Q3HBoxLayout>
31#include <Q3VBoxLayout>
29 32
30#include <kapplication.h> 33#include <kapplication.h>
31#include <kdebug.h> 34#include <kdebug.h>
@@ -45,13 +48,13 @@
45ViewContainer::ViewContainer( QWidget *parent, const char* name ) 48ViewContainer::ViewContainer( QWidget *parent, const char* name )
46 : QWidget( parent, name ), mCurrentLook( 0 ) 49 : QWidget( parent, name ), mCurrentLook( 0 )
47{ 50{
48 QBoxLayout *topLayout = new QVBoxLayout( this ); 51 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
49 //topLayout->setMargin( KDialog::marginHint() ); 52 //topLayout->setMargin( KDialog::marginHint() );
50 //topLayout->setSpacing( KDialog::spacingHint() ); 53 //topLayout->setSpacing( KDialog::spacingHint() );
51 topLayout->setMargin( 0 ); 54 topLayout->setMargin( 0 );
52 topLayout->setSpacing( 0 ); 55 topLayout->setSpacing( 0 );
53 56
54 QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); 57 Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout );
55 58
56 QLabel *label = new QLabel( i18n("Style:"), this ); 59 QLabel *label = new QLabel( i18n("Style:"), this );
57 styleLayout->addWidget( label ); 60 styleLayout->addWidget( label );
@@ -59,12 +62,12 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name )
59 mStyleCombo = new QComboBox( this ); 62 mStyleCombo = new QComboBox( this );
60 styleLayout->addWidget( mStyleCombo ); 63 styleLayout->addWidget( mStyleCombo );
61 64
62 QFrame *frameRuler = new QFrame( this ); 65 Q3Frame *frameRuler = new Q3Frame( this );
63//US frameRuler->setFrameShape( QFrame::HLine ); 66//US frameRuler->setFrameShape( QFrame::HLine );
64//US frameRuler->setFrameShadow( QFrame::Sunken ); 67//US frameRuler->setFrameShadow( QFrame::Sunken );
65//US topLayout->addWidget( frameRuler ); 68//US topLayout->addWidget( frameRuler );
66 69
67 mDetailsStack = new QWidgetStack( this ); 70 mDetailsStack = new Q3WidgetStack( this );
68 topLayout->addWidget( mDetailsStack, 1 ); 71 topLayout->addWidget( mDetailsStack, 1 );
69 72
70 registerLooks(); 73 registerLooks();
@@ -159,6 +162,6 @@ void ViewContainer::setReadOnly( bool state )
159 mCurrentLook->setReadOnly( state ); 162 mCurrentLook->setReadOnly( state );
160} 163}
161 164
162#ifndef KAB_EMBEDDED 165#ifndef KAB_EMBEDDED_
163#include "detailsviewcontainer.moc" 166#include "moc_detailsviewcontainer.cpp"
164#endif //KAB_EMBEDDED 167#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/detailsviewcontainer.h b/kaddressbook/details/detailsviewcontainer.h
index 9684736..f310a30 100644
--- a/kaddressbook/details/detailsviewcontainer.h
+++ b/kaddressbook/details/detailsviewcontainer.h
@@ -24,12 +24,12 @@
24#ifndef DETAILSVIEWCONTAINER_H 24#ifndef DETAILSVIEWCONTAINER_H
25#define DETAILSVIEWCONTAINER_H 25#define DETAILSVIEWCONTAINER_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28 28
29#include "look_basic.h" 29#include "look_basic.h"
30 30
31class QComboBox; 31class QComboBox;
32class QWidgetStack; 32class Q3WidgetStack;
33 33
34class ViewContainer : public QWidget 34class ViewContainer : public QWidget
35{ 35{
@@ -94,10 +94,10 @@ class ViewContainer : public QWidget
94 private: 94 private:
95 KABC::Addressee mCurrentAddressee; 95 KABC::Addressee mCurrentAddressee;
96 KABBasicLook *mCurrentLook; 96 KABBasicLook *mCurrentLook;
97 QPtrList<KABLookFactory> mLookFactories; 97 Q3PtrList<KABLookFactory> mLookFactories;
98 98
99 QComboBox *mStyleCombo; 99 QComboBox *mStyleCombo;
100 QWidgetStack *mDetailsStack; 100 Q3WidgetStack *mDetailsStack;
101}; 101};
102 102
103#endif 103#endif
diff --git a/kaddressbook/details/look_basic.cpp b/kaddressbook/details/look_basic.cpp
index 0245686..48cc42a 100644
--- a/kaddressbook/details/look_basic.cpp
+++ b/kaddressbook/details/look_basic.cpp
@@ -26,7 +26,7 @@
26#include "look_basic.h" 26#include "look_basic.h"
27 27
28KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) 28KABBasicLook::KABBasicLook( QWidget *parent, const char *name )
29 : QVBox( parent, name ), mReadOnly( false ) 29 : Q3VBox( parent, name ), mReadOnly( false )
30{ 30{
31} 31}
32 32
@@ -70,6 +70,6 @@ KABLookFactory::KABLookFactory( QWidget *parent, const char *name )
70KABLookFactory::~KABLookFactory() 70KABLookFactory::~KABLookFactory()
71{ 71{
72} 72}
73#ifndef KAB_EMBEDDED 73#ifndef KAB_EMBEDDED_
74#include "look_basic.moc" 74#include "moc_look_basic.cpp"
75#endif //KAB_EMBEDDED 75#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_basic.h b/kaddressbook/details/look_basic.h
index a65c99c..a70e7f7 100644
--- a/kaddressbook/details/look_basic.h
+++ b/kaddressbook/details/look_basic.h
@@ -25,7 +25,7 @@
25#define LOOK_KABBASIC_H 25#define LOOK_KABBASIC_H
26 26
27#include <kabc/addressbook.h> 27#include <kabc/addressbook.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29 29
30class KConfig; 30class KConfig;
31 31
@@ -41,7 +41,7 @@ class KConfig;
41 The paintEvent() has to paint the whole widget, since repaint() 41 The paintEvent() has to paint the whole widget, since repaint()
42 calls will not delete the widgets background. 42 calls will not delete the widgets background.
43 */ 43 */
44class KABBasicLook : public QVBox 44class KABBasicLook : public Q3VBox
45{ 45{
46 Q_OBJECT 46 Q_OBJECT
47 47
diff --git a/kaddressbook/details/look_details.cpp b/kaddressbook/details/look_details.cpp
index 11d06e9..2c3a79d 100644
--- a/kaddressbook/details/look_details.cpp
+++ b/kaddressbook/details/look_details.cpp
@@ -189,10 +189,10 @@ void KABDetailedView::mouseMoveEvent( QMouseEvent *e )
189 189
190void KABDetailedView::mousePressEvent( QMouseEvent *e ) 190void KABDetailedView::mousePressEvent( QMouseEvent *e )
191{ 191{
192 QPopupMenu menu( this ); 192 Q3PopupMenu menu( this );
193 QPopupMenu *menuBG = new QPopupMenu( &menu ); 193 Q3PopupMenu *menuBG = new Q3PopupMenu( &menu );
194 mMenuBorderedBG = new QPopupMenu( &menu ); 194 mMenuBorderedBG = new Q3PopupMenu( &menu );
195 mMenuTiledBG = new QPopupMenu( &menu ); 195 mMenuTiledBG = new Q3PopupMenu( &menu );
196 196
197 menu.insertItem( i18n( "Select Background" ), menuBG ); 197 menu.insertItem( i18n( "Select Background" ), menuBG );
198 menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG ); 198 menuBG->insertItem( i18n( "Bordered Backgrounds" ), mMenuBorderedBG );
@@ -414,6 +414,6 @@ void KABDetailedView::restoreSettings( KConfig *config )
414 mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) ); 414 mPainter->setCommentFont( QFont( gfont, gpointsize, QFont::Normal, false ) );
415} 415}
416 416
417#ifndef KAB_EMBEDDED 417#ifndef KAB_EMBEDDED_
418#include "look_details.moc" 418#include "moc_look_details.cpp"
419#endif //KAB_EMBEDDED 419#endif //KAB_EMBEDDED
diff --git a/kaddressbook/details/look_details.h b/kaddressbook/details/look_details.h
index e8d50a9..b59d3a7 100644
--- a/kaddressbook/details/look_details.h
+++ b/kaddressbook/details/look_details.h
@@ -130,8 +130,8 @@ class KABDetailedView : public KABBasicLook
130 QStringList mBorders; 130 QStringList mBorders;
131 QStringList mTiles; 131 QStringList mTiles;
132 132
133 QPopupMenu *mMenuBorderedBG; 133 Q3PopupMenu *mMenuBorderedBG;
134 QPopupMenu *mMenuTiledBG; 134 Q3PopupMenu *mMenuTiledBG;
135 135
136 static const QString mBorderedBGDir; 136 static const QString mBorderedBGDir;
137 static const QString mTiledBGDir; 137 static const QString mTiledBGDir;
diff --git a/kaddressbook/details/look_html.cpp b/kaddressbook/details/look_html.cpp
index bb30650..4ec1c7d 100644
--- a/kaddressbook/details/look_html.cpp
+++ b/kaddressbook/details/look_html.cpp
@@ -24,7 +24,7 @@
24#include <addresseeview.h> 24#include <addresseeview.h>
25 25
26#include "look_html.h" 26#include "look_html.h"
27#include <qscrollview.h> 27#include <q3scrollview.h>
28#include "kabprefs.h" 28#include "kabprefs.h"
29#include <kabc/addresseeview.h> 29#include <kabc/addresseeview.h>
30KABHtmlView::KABHtmlView( QWidget *parent, const char *name ) 30KABHtmlView::KABHtmlView( QWidget *parent, const char *name )
@@ -51,6 +51,6 @@ void KABHtmlView::setAddressee( const KABC::Addressee &addr )
51 mView->setAddressee( addr ); 51 mView->setAddressee( addr );
52} 52}
53 53
54#ifndef KAB_EMBEDDED 54#ifndef KAB_EMBEDDED_
55#include "look_html.moc" 55#include "moc_look_html.cpp"
56#endif //KAB_EMBEDDED 56#endif //KAB_EMBEDDED
diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp
index e72face..09df47f 100644
--- a/kaddressbook/emaileditwidget.cpp
+++ b/kaddressbook/emaileditwidget.cpp
@@ -28,7 +28,9 @@
28#include <qstring.h> 28#include <qstring.h>
29#include <qtoolbutton.h> 29#include <qtoolbutton.h>
30#include <qtooltip.h> 30#include <qtooltip.h>
31#include <qlistbox.h> 31#include <q3listbox.h>
32//Added by qt3to4:
33#include <Q3GridLayout>
32 34
33#ifndef KAB_EMBEDDED 35#ifndef KAB_EMBEDDED
34#include <kaccelmanager.h> 36#include <kaccelmanager.h>
@@ -48,14 +50,14 @@
48EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) 50EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name )
49 : QWidget( parent, name ) 51 : QWidget( parent, name )
50{ 52{
51 QGridLayout *topLayout = new QGridLayout( this, 2, 2 ); 53 Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 );
52 topLayout->setSpacing( KDialog::spacingHint() ); 54 topLayout->setSpacing( KDialog::spacingHint() );
53 QLabel* label = new QLabel( this ); 55 QLabel* label = new QLabel( this );
54 56
55 label->setPixmap( KGlobal::iconLoader()->loadIcon( "mail_send", KIcon::Desktop, 0) ); 57 label->setPixmap( KGlobal::iconLoader()->loadIcon( "mail_send", KIcon::Desktop, 0) );
56 58
57 topLayout->addWidget( label, 0, 0 ); 59 topLayout->addWidget( label, 0, 0 );
58 label->setAlignment( AlignCenter ); 60 label->setAlignment( Qt::AlignCenter );
59 QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this); 61 QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this);
60 topLayout->addWidget( editButton, 0, 1 ); 62 topLayout->addWidget( editButton, 0, 1 );
61 label = new QLabel( i18n( "Email:" ), this ); 63 label = new QLabel( i18n( "Email:" ), this );
@@ -137,7 +139,7 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
137{ 139{
138 QWidget *page = plainPage(); 140 QWidget *page = plainPage();
139 141
140 QGridLayout *topLayout = new QGridLayout( page, 4, 3 ); 142 Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 );
141 143
142 QLabel *label = new QLabel( i18n( "Email address:" ), page ); 144 QLabel *label = new QLabel( i18n( "Email address:" ), page );
143 topLayout->addWidget( label, 0, 0 ); 145 topLayout->addWidget( label, 0, 0 );
@@ -154,7 +156,7 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent,
154 connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) ); 156 connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) );
155 topLayout->addWidget( mAddButton, 0, 2 ); 157 topLayout->addWidget( mAddButton, 0, 2 );
156 158
157 mEmailListBox = new QListBox( page ); 159 mEmailListBox = new Q3ListBox( page );
158 160
159 // Make sure there is room for the scrollbar 161 // Make sure there is room for the scrollbar
160 mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 ); 162 mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 );
@@ -272,6 +274,6 @@ void EmailEditDialog::emailChanged()
272 mAddButton->setEnabled( !mEmailEdit->text().isEmpty() ); 274 mAddButton->setEnabled( !mEmailEdit->text().isEmpty() );
273} 275}
274 276
275#ifndef KAB_EMBEDDED 277#ifndef KAB_EMBEDDED_
276#include "emaileditwidget.moc" 278#include "moc_emaileditwidget.cpp"
277#endif //KAB_EMBEDDED 279#endif //KAB_EMBEDDED
diff --git a/kaddressbook/emaileditwidget.h b/kaddressbook/emaileditwidget.h
index acdecaf..618acee 100644
--- a/kaddressbook/emaileditwidget.h
+++ b/kaddressbook/emaileditwidget.h
@@ -29,11 +29,11 @@
29 29
30#include "addresseeconfig.h" 30#include "addresseeconfig.h"
31 31
32class QButtonGroup; 32class Q3ButtonGroup;
33class QCheckBox; 33class QCheckBox;
34class QListView; 34class Q3ListView;
35class QListBox; 35class Q3ListBox;
36class QTextEdit; 36class Q3TextEdit;
37class QToolButton; 37class QToolButton;
38 38
39class KComboBox; 39class KComboBox;
@@ -89,7 +89,7 @@ class EmailEditDialog : public KDialogBase
89 89
90 private: 90 private:
91 KLineEdit *mEmailEdit; 91 KLineEdit *mEmailEdit;
92 QListBox *mEmailListBox; 92 Q3ListBox *mEmailListBox;
93 QPushButton *mAddButton; 93 QPushButton *mAddButton;
94 QPushButton *mRemoveButton; 94 QPushButton *mRemoveButton;
95 QPushButton *mEditButton; 95 QPushButton *mEditButton;
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp
index 46defa1..5356224 100644
--- a/kaddressbook/extensionmanager.cpp
+++ b/kaddressbook/extensionmanager.cpp
@@ -22,6 +22,8 @@
22*/ 22*/
23#include <qlayout.h> 23#include <qlayout.h>
24#include <qapplication.h> 24#include <qapplication.h>
25//Added by qt3to4:
26#include <Q3HBoxLayout>
25#include <kactionclasses.h> 27#include <kactionclasses.h>
26#include <kconfig.h> 28#include <kconfig.h>
27#include <kdebug.h> 29#include <kdebug.h>
@@ -42,7 +44,7 @@
42 44
43ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, 45ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
44 const char *name ) 46 const char *name )
45 : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) 47 : Q3ScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 )
46{ 48{
47#ifdef KAB_EMBEDDED 49#ifdef KAB_EMBEDDED
48//US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); 50//US QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu();
@@ -58,7 +60,7 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent,
58 connect( mActionExtensions, SIGNAL( activated( int ) ), 60 connect( mActionExtensions, SIGNAL( activated( int ) ),
59 SLOT( setActiveExtension( int ) ) ); 61 SLOT( setActiveExtension( int ) ) );
60 mWidgetBox = new QWidget( viewport() ); 62 mWidgetBox = new QWidget( viewport() );
61 new QHBoxLayout (mWidgetBox ); 63 new Q3HBoxLayout (mWidgetBox );
62 addChild( mWidgetBox ); 64 addChild( mWidgetBox );
63 setResizePolicy(AutoOneFit); 65 setResizePolicy(AutoOneFit);
64 createExtensionWidgets(); 66 createExtensionWidgets();
@@ -148,7 +150,7 @@ void ExtensionManager::createExtensionWidgets()
148{ 150{
149 // clear extension widget list 151 // clear extension widget list
150 mExtensionWidgetList.setAutoDelete( true ); 152 mExtensionWidgetList.setAutoDelete( true );
151 QPtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); 153 Q3PtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList );
152 ExtensionWidget *wdg = 0; 154 ExtensionWidget *wdg = 0;
153 while ( ( wdg = wdgIt.current() ) != 0 ) 155 while ( ( wdg = wdgIt.current() ) != 0 )
154 mExtensionWidgetList.remove( wdg ); 156 mExtensionWidgetList.remove( wdg );
@@ -159,7 +161,7 @@ void ExtensionManager::createExtensionWidgets()
159 161
160 // add addressee editor as default 162 // add addressee editor as default
161 163
162 QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();; 164 Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();;
163 165
164 wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox ); 166 wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox );
165 hbl->addWidget( wdg ); 167 hbl->addWidget( wdg );
@@ -244,6 +246,6 @@ void ExtensionManager::createExtensionWidgets()
244 mCurrentExtensionWidget = 0; 246 mCurrentExtensionWidget = 0;
245} 247}
246 248
247#ifndef KAB_EMBEDDED 249#ifndef KAB_EMBEDDED_
248#include "extensionmanager.moc" 250#include "moc_extensionmanager.cpp"
249#endif //KAB_EMBEDDED 251#endif //KAB_EMBEDDED
diff --git a/kaddressbook/extensionmanager.h b/kaddressbook/extensionmanager.h
index 611a037..84c948b 100644
--- a/kaddressbook/extensionmanager.h
+++ b/kaddressbook/extensionmanager.h
@@ -24,9 +24,9 @@
24#ifndef EXTENSIONMANAGER_H 24#ifndef EXTENSIONMANAGER_H
25#define EXTENSIONMANAGER_H 25#define EXTENSIONMANAGER_H
26 26
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qscrollview.h> 28#include <q3scrollview.h>
29#include <qptrlist.h> 29#include <q3ptrlist.h>
30 30
31#include <extensionwidget.h> 31#include <extensionwidget.h>
32 32
@@ -34,7 +34,7 @@ class KABCore;
34class KSelectAction; 34class KSelectAction;
35 35
36 36
37class ExtensionManager : public QScrollView 37class ExtensionManager : public Q3ScrollView
38{ 38{
39 Q_OBJECT 39 Q_OBJECT
40 40
@@ -80,7 +80,7 @@ class ExtensionManager : public QScrollView
80 QWidget *mWidgetBox; 80 QWidget *mWidgetBox;
81 81
82 ExtensionWidget *mCurrentExtensionWidget; 82 ExtensionWidget *mCurrentExtensionWidget;
83 QPtrList<ExtensionWidget> mExtensionWidgetList; 83 Q3PtrList<ExtensionWidget> mExtensionWidgetList;
84 84
85 KSelectAction *mActionExtensions; 85 KSelectAction *mActionExtensions;
86 86
diff --git a/kaddressbook/extensionwidget.cpp b/kaddressbook/extensionwidget.cpp
index 69f4aa8..7c3b415 100644
--- a/kaddressbook/extensionwidget.cpp
+++ b/kaddressbook/extensionwidget.cpp
@@ -78,7 +78,6 @@ ConfigureWidget *ExtensionFactory::configureWidget( QWidget*, const char* )
78 return 0; 78 return 0;
79} 79}
80 80
81#ifndef KAB_EMBEDDED 81#ifndef KAB_EMBEDDED_
82#include "extensionwidget.moc" 82#include "moc_extensionwidget.cpp"
83#endif //KAB_EMBEDDED 83#endif //KAB_EMBEDDED
84
diff --git a/kaddressbook/extensionwidget.h b/kaddressbook/extensionwidget.h
index fc91f21..9fcfba9 100644
--- a/kaddressbook/extensionwidget.h
+++ b/kaddressbook/extensionwidget.h
@@ -86,9 +86,9 @@ class ExtensionWidget : public QWidget
86}; 86};
87 87
88#ifndef KAB_EMBEDDED 88#ifndef KAB_EMBEDDED
89//MOC_SKIP_BEGIN 89#ifndef Q_MOC_RUN
90class ExtensionFactory : public KLibFactory 90class ExtensionFactory : public KLibFactory
91//MOC_SKIP_END 91#endif
92#else //KAB_EMBEDDED 92#else //KAB_EMBEDDED
93class ExtensionFactory 93class ExtensionFactory
94#endif //KAB_EMBEDDED 94#endif //KAB_EMBEDDED
diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp
index bfcb121..996177b 100644
--- a/kaddressbook/features/distributionlistwidget.cpp
+++ b/kaddressbook/features/distributionlistwidget.cpp
@@ -21,13 +21,20 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qbuttongroup.h> 24#include <q3buttongroup.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlistview.h> 28#include <q3listview.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qradiobutton.h> 30#include <qradiobutton.h>
31//Added by qt3to4:
32#include <QDragMoveEvent>
33#include <QDropEvent>
34#include <Q3GridLayout>
35#include <Q3Frame>
36#include <Q3VBoxLayout>
37#include <QDragEnterEvent>
31 38
32#ifndef KAB_EMBEDDED 39#ifndef KAB_EMBEDDED
33#include <kaccelmanager.h> 40#include <kaccelmanager.h>
@@ -77,12 +84,12 @@ extern "C" {
77} 84}
78#endif //KAB_EMBEDDED 85#endif //KAB_EMBEDDED
79 86
80class ContactItem : public QListViewItem 87class ContactItem : public Q3ListViewItem
81{ 88{
82 public: 89 public:
83 ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, 90 ContactItem( DistributionListView *parent, const KABC::Addressee &addressee,
84 const QString &email = QString::null ) : 91 const QString &email = QString::null ) :
85 QListViewItem( parent ), 92 Q3ListViewItem( parent ),
86 mAddressee( addressee ), 93 mAddressee( addressee ),
87 mEmail( email ) 94 mEmail( email )
88 { 95 {
@@ -121,7 +128,7 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent,
121 const char *name ) 128 const char *name )
122 : ExtensionWidget( core, parent, name ), mManager( 0 ) 129 : ExtensionWidget( core, parent, name ), mManager( 0 )
123{ 130{
124 QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), 131 Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(),
125 KDialog::spacingHint() ); 132 KDialog::spacingHint() );
126 133
127 if (KGlobal::getOrientation() == KGlobal::Portrait) 134 if (KGlobal::getOrientation() == KGlobal::Portrait)
@@ -166,8 +173,8 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent,
166 topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 ); 173 topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 );
167 connect( mContactView, SIGNAL( selectionChanged() ), 174 connect( mContactView, SIGNAL( selectionChanged() ),
168 SLOT( selectionContactViewChanged() ) ); 175 SLOT( selectionContactViewChanged() ) );
169 connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), 176 connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ),
170 SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); 177 SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) );
171 178
172 mAddContactButton->setEnabled( false ); 179 mAddContactButton->setEnabled( false );
173 topLayout->addWidget( mAddContactButton, 2, 0 ); 180 topLayout->addWidget( mAddContactButton, 2, 0 );
@@ -410,7 +417,7 @@ QString DistributionListWidget::identifier() const
410 return "distribution_list_editor"; 417 return "distribution_list_editor";
411} 418}
412 419
413void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) 420void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* )
414{ 421{
415 dropEvent( e ); 422 dropEvent( e );
416} 423}
@@ -432,7 +439,7 @@ DistributionListView::DistributionListView( QWidget *parent, const char* name )
432void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) 439void DistributionListView::dragEnterEvent( QDragEnterEvent* e )
433{ 440{
434#ifndef KAB_EMBEDDED 441#ifndef KAB_EMBEDDED
435 bool canDecode = QTextDrag::canDecode( e ); 442 bool canDecode = Q3TextDrag::canDecode( e );
436 e->accept( canDecode ); 443 e->accept( canDecode );
437#endif //KAB_EMBEDDED 444#endif //KAB_EMBEDDED
438} 445}
@@ -440,7 +447,7 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e )
440void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) 447void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e )
441{ 448{
442#ifndef KAB_EMBEDDED 449#ifndef KAB_EMBEDDED
443 bool canDecode = QTextDrag::canDecode( e ); 450 bool canDecode = Q3TextDrag::canDecode( e );
444 e->accept( canDecode ); 451 e->accept( canDecode );
445#endif //KAB_EMBEDDED 452#endif //KAB_EMBEDDED
446} 453}
@@ -461,10 +468,10 @@ EmailSelector::EmailSelector( const QStringList &emails,
461 : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok, 468 : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok, Ok,
462 parent ) 469 parent )
463{ 470{
464 QFrame *topFrame = plainPage(); 471 Q3Frame *topFrame = plainPage();
465 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 472 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
466 473
467 mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), 474 mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"),
468 topFrame ); 475 topFrame );
469 topLayout->addWidget( mButtonGroup ); 476 topLayout->addWidget( mButtonGroup );
470 477
@@ -479,7 +486,7 @@ EmailSelector::EmailSelector( const QStringList &emails,
479 486
480QString EmailSelector::selected() 487QString EmailSelector::selected()
481{ 488{
482 QButton *button = mButtonGroup->selected(); 489 QAbstractButton *button = mButtonGroup->selected();
483 if ( button ) 490 if ( button )
484 return button->text(); 491 return button->text();
485 492
@@ -496,6 +503,6 @@ QString EmailSelector::getEmail( const QStringList &emails,
496} 503}
497 504
498 505
499#ifndef KAB_EMBEDDED 506#ifndef KAB_EMBEDDED_
500#include "distributionlistwidget.moc" 507#include "moc_distributionlistwidget.cpp"
501#endif //KAB_EMBEDDED 508#endif //KAB_EMBEDDED
diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h
index 82bac3d..f619389 100644
--- a/kaddressbook/features/distributionlistwidget.h
+++ b/kaddressbook/features/distributionlistwidget.h
@@ -28,11 +28,16 @@
28#include <klistview.h> 28#include <klistview.h>
29 29
30#include "extensionwidget.h" 30#include "extensionwidget.h"
31//Added by qt3to4:
32#include <QDragEnterEvent>
33#include <QDropEvent>
34#include <QLabel>
35#include <QDragMoveEvent>
31 36
32class QButtonGroup; 37class Q3ButtonGroup;
33class QComboBox; 38class QComboBox;
34class QLabel; 39class QLabel;
35class QListView; 40class Q3ListView;
36 41
37class DistributionListView; 42class DistributionListView;
38class KABCore; 43class KABCore;
@@ -57,7 +62,7 @@ class DistributionListWidget : public ExtensionWidget
57 62
58 public slots: 63 public slots:
59 void save(); 64 void save();
60 void dropped( QDropEvent*, QListViewItem* ); 65 void dropped( QDropEvent*, Q3ListViewItem* );
61 66
62 private slots: 67 private slots:
63 void createList(); 68 void createList();
@@ -120,7 +125,7 @@ class EmailSelector : public KDialogBase
120 QWidget *parent ); 125 QWidget *parent );
121 126
122 private: 127 private:
123 QButtonGroup *mButtonGroup; 128 Q3ButtonGroup *mButtonGroup;
124}; 129};
125 130
126 131
diff --git a/kaddressbook/features/mergewidget.cpp b/kaddressbook/features/mergewidget.cpp
index 2476e42..1becc2f 100644
--- a/kaddressbook/features/mergewidget.cpp
+++ b/kaddressbook/features/mergewidget.cpp
@@ -23,6 +23,8 @@
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qpushbutton.h> 25#include <qpushbutton.h>
26//Added by qt3to4:
27#include <Q3GridLayout>
26 28
27#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
28#include <kaccelmanager.h> 30#include <kaccelmanager.h>
@@ -63,11 +65,11 @@ extern "C" {
63} 65}
64#endif //KAB_EMBEDDED 66#endif //KAB_EMBEDDED
65 67
66class ContactItem : public QListViewItem 68class ContactItem : public Q3ListViewItem
67{ 69{
68 public: 70 public:
69 ContactItem( KListView *parent, const KABC::Addressee &addressee ) 71 ContactItem( KListView *parent, const KABC::Addressee &addressee )
70 : QListViewItem( parent ), mAddressee( addressee ) 72 : Q3ListViewItem( parent ), mAddressee( addressee )
71 { 73 {
72 KABC::Field::List fieldList = KABC::Field::defaultFields(); 74 KABC::Field::List fieldList = KABC::Field::defaultFields();
73 KABC::Field::List::ConstIterator it; 75 KABC::Field::List::ConstIterator it;
@@ -94,7 +96,7 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name )
94 parent->setMaximumSize( KGlobal::getDesktopWidth() , 180); 96 parent->setMaximumSize( KGlobal::getDesktopWidth() , 180);
95#endif //KAB_EMBEDDED 97#endif //KAB_EMBEDDED
96 98
97 QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(), 99 Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(),
98 KDialog::spacingHint() ); 100 KDialog::spacingHint() );
99 101
100 mContactView = new KListView( this ); 102 mContactView = new KListView( this );
@@ -214,7 +216,7 @@ void MergeWidget::mergeAndRemove()
214 emit modified( retval ); 216 emit modified( retval );
215 217
216 mBlockUpdate = true; 218 mBlockUpdate = true;
217 core()->deleteContacts( oldUID ); 219 core()->deleteContacts( QStringList(oldUID) );
218 core()->setContactSelected( mMasterAddressee.uid() ); 220 core()->setContactSelected( mMasterAddressee.uid() );
219 mBlockUpdate = false; 221 mBlockUpdate = false;
220 222
@@ -369,6 +371,6 @@ void MergeWidget::doMerge( const KABC::Addressee &addr )
369 mMasterAddressee.setCustoms( newCustoms ); 371 mMasterAddressee.setCustoms( newCustoms );
370} 372}
371 373
372#ifndef KAB_EMBEDDED 374#ifndef KAB_EMBEDDED_
373#include "mergewidget.moc" 375#include "moc_mergewidget.cpp"
374#endif //KAB_EMBEDDED 376#endif //KAB_EMBEDDED
diff --git a/kaddressbook/features/mergewidget.h b/kaddressbook/features/mergewidget.h
index 1063c80..bb16282 100644
--- a/kaddressbook/features/mergewidget.h
+++ b/kaddressbook/features/mergewidget.h
@@ -29,7 +29,7 @@
29 29
30#include "extensionwidget.h" 30#include "extensionwidget.h"
31 31
32class QListView; 32class Q3ListView;
33 33
34class KABCore; 34class KABCore;
35 35
diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp
index 12ab1e3..6462310 100644
--- a/kaddressbook/filter.cpp
+++ b/kaddressbook/filter.cpp
@@ -218,7 +218,7 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup )
218 filter.noName = false; 218 filter.noName = false;
219 filter.mName = *it; 219 filter.mName = *it;
220 filter.mEnabled = true; 220 filter.mEnabled = true;
221 filter.mCategoryList = *it; 221 filter.mCategoryList = QStringList(*it);
222 filter.mMatchRule = Matching; 222 filter.mMatchRule = Matching;
223 filter.mInternal = true; 223 filter.mInternal = true;
224 list.append( filter ); 224 list.append( filter );
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h
index f4ae123..508436d 100644
--- a/kaddressbook/filter.h
+++ b/kaddressbook/filter.h
@@ -26,7 +26,7 @@
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29#include <qvaluelist.h> 29#include <q3valuelist.h>
30 30
31#include <kabc/addressee.h> 31#include <kabc/addressee.h>
32#include <kconfig.h> 32#include <kconfig.h>
@@ -42,7 +42,7 @@ class Filter
42 enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4 }; 42 enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4 };
43 void setCriteria(int c) { mCriteria = c ;} 43 void setCriteria(int c) { mCriteria = c ;}
44 int criteria() const { return mCriteria;} 44 int criteria() const { return mCriteria;}
45 typedef QValueList<Filter> List; 45 typedef Q3ValueList<Filter> List;
46 46
47 enum MatchRule { Matching = 0, NotMatching = 1 }; 47 enum MatchRule { Matching = 0, NotMatching = 1 };
48 48
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp
index ef9b979..40698a7 100644
--- a/kaddressbook/filtereditdialog.cpp
+++ b/kaddressbook/filtereditdialog.cpp
@@ -28,8 +28,8 @@ Copyright (c) 2004 Ulf Schenk
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include <qbuttongroup.h> 31#include <q3buttongroup.h>
32#include <qhbox.h> 32#include <q3hbox.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qlayout.h> 34#include <qlayout.h>
35#include <qpushbutton.h> 35#include <qpushbutton.h>
@@ -40,6 +40,8 @@ $Id$
40#include <qtoolbutton.h> 40#include <qtoolbutton.h>
41#include <qtooltip.h> 41#include <qtooltip.h>
42#include <qwidget.h> 42#include <qwidget.h>
43//Added by qt3to4:
44#include <Q3GridLayout>
43 45
44#include <kapplication.h> 46#include <kapplication.h>
45#include <kbuttonbox.h> 47#include <kbuttonbox.h>
@@ -64,7 +66,7 @@ FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name )
64 66
65 QStringList::Iterator iter; 67 QStringList::Iterator iter;
66 for ( iter = cats.begin(); iter != cats.end(); ++iter ) 68 for ( iter = cats.begin(); iter != cats.end(); ++iter )
67 mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, (*iter), QCheckListItem::CheckBox ) ); 69 mCategoriesView->insertItem( new Q3CheckListItem( mCategoriesView, (*iter), Q3CheckListItem::CheckBox ) );
68 filterNameTextChanged( mNameEdit->text() ); 70 filterNameTextChanged( mNameEdit->text() );
69} 71}
70 72
@@ -77,10 +79,10 @@ void FilterEditDialog::setFilter( const Filter &filter )
77 mNameEdit->setText( filter.name() ); 79 mNameEdit->setText( filter.name() );
78 80
79 QStringList categories = filter.categories(); 81 QStringList categories = filter.categories();
80 QListViewItem *item = mCategoriesView->firstChild(); 82 Q3ListViewItem *item = mCategoriesView->firstChild();
81 while ( item != 0 ) { 83 while ( item != 0 ) {
82 if ( categories.contains( item->text( 0 ) ) ) { 84 if ( categories.contains( item->text( 0 ) ) ) {
83 QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); 85 Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item );
84 checkItem->setOn( true ); 86 checkItem->setOn( true );
85 } 87 }
86 88
@@ -105,9 +107,9 @@ Filter FilterEditDialog::filter()
105 filter.setName( mNameEdit->text() ); 107 filter.setName( mNameEdit->text() );
106 108
107 QStringList categories; 109 QStringList categories;
108 QListViewItem *item = mCategoriesView->firstChild(); 110 Q3ListViewItem *item = mCategoriesView->firstChild();
109 while ( item != 0 ) { 111 while ( item != 0 ) {
110 QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); 112 Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item );
111 if ( checkItem->isOn() ) 113 if ( checkItem->isOn() )
112 categories.append( item->text( 0 ) ); 114 categories.append( item->text( 0 ) );
113 115
@@ -141,7 +143,7 @@ void FilterEditDialog::initGUI()
141 QWidget *page = plainPage(); 143 QWidget *page = plainPage();
142 QLabel *label; 144 QLabel *label;
143 145
144 QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); 146 Q3GridLayout *topLayout = new Q3GridLayout( page, 3, 2, 0, spacingHint() );
145 147
146 label = new QLabel( i18n( "Name" ), page ); 148 label = new QLabel( i18n( "Name" ), page );
147 mNameEdit = new KLineEdit( page ); 149 mNameEdit = new KLineEdit( page );
@@ -155,7 +157,7 @@ void FilterEditDialog::initGUI()
155 mCategoriesView->addColumn( i18n( "Categories" ) ); 157 mCategoriesView->addColumn( i18n( "Categories" ) );
156 topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); 158 topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 );
157 159
158 mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); 160 mMatchRuleGroup = new Q3HButtonGroup( i18n( "Category rule" ), page );
159 mMatchRuleGroup->setExclusive( true ); 161 mMatchRuleGroup->setExclusive( true );
160 QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); 162 QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup );
161 //mMatchRuleGroup->insert( radio ); 163 //mMatchRuleGroup->insert( radio );
@@ -164,7 +166,7 @@ void FilterEditDialog::initGUI()
164 //mMatchRuleGroup->insert( radio ); 166 //mMatchRuleGroup->insert( radio );
165 topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); 167 topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 );
166 168
167 QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); 169 Q3HButtonGroup * mMatchPPCGroup = new Q3HButtonGroup(i18n( "Include contacts, that are:" ), page );
168 mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); 170 mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup );
169 mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); 171 mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup );
170 mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); 172 mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup );
@@ -272,7 +274,7 @@ void FilterDialog::refresh()
272 mFilterListBox->insertItem( (*iter).name() ); 274 mFilterListBox->insertItem( (*iter).name() );
273} 275}
274 276
275void FilterDialog::selectionChanged( QListBoxItem *item ) 277void FilterDialog::selectionChanged( Q3ListBoxItem *item )
276{ 278{
277 bool state = ( item != 0 ); 279 bool state = ( item != 0 );
278 280
@@ -290,16 +292,16 @@ void FilterDialog::initGUI()
290 292
291 QWidget *page = plainPage(); 293 QWidget *page = plainPage();
292 294
293 QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); 295 Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 2, 0, spacingHint() );
294 296
295 mFilterListBox = new KListBox( page ); 297 mFilterListBox = new KListBox( page );
296 topLayout->addWidget( mFilterListBox, 0, 0 ); 298 topLayout->addWidget( mFilterListBox, 0, 0 );
297 connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ), 299 connect( mFilterListBox, SIGNAL( selectionChanged( Q3ListBoxItem * ) ),
298 SLOT( selectionChanged( QListBoxItem * ) ) ); 300 SLOT( selectionChanged( Q3ListBoxItem * ) ) );
299 connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ), 301 connect( mFilterListBox, SIGNAL( doubleClicked ( Q3ListBoxItem * ) ),
300 SLOT( edit() ) ); 302 SLOT( edit() ) );
301 303
302 KButtonBox *buttonBox = new KButtonBox( page, Vertical ); 304 KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical );
303 buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) ); 305 buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) );
304 mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) ); 306 mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) );
305 mEditButton->setEnabled( false ); 307 mEditButton->setEnabled( false );
@@ -310,6 +312,6 @@ void FilterDialog::initGUI()
310 topLayout->addWidget( buttonBox, 0, 1 ); 312 topLayout->addWidget( buttonBox, 0, 1 );
311} 313}
312 314
313#ifndef KAB_EMBEDDED 315#ifndef KAB_EMBEDDED_
314#include "filtereditdialog.moc" 316#include "moc_filtereditdialog.cpp"
315#endif //KAB_EMBEDDED 317#endif //KAB_EMBEDDED
diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h
index 5a8bad1..64d2976 100644
--- a/kaddressbook/filtereditdialog.h
+++ b/kaddressbook/filtereditdialog.h
@@ -31,11 +31,11 @@ $Id$
31#ifndef FILTEREDITDIALOG_H 31#ifndef FILTEREDITDIALOG_H
32#define FILTEREDITDIALOG_H 32#define FILTEREDITDIALOG_H
33 33
34class QButtonGroup; 34#include <Q3HButtonGroup>
35class QString; 35class QString;
36class QToolButton; 36class QToolButton;
37class QWidget; 37class QWidget;
38class QListBoxItem; 38class Q3ListBoxItem;
39class QCheckBox; 39class QCheckBox;
40 40
41class KLineEdit; 41class KLineEdit;
@@ -43,7 +43,6 @@ class KListBox;
43class KListView; 43class KListView;
44 44
45#include <kdialogbase.h> 45#include <kdialogbase.h>
46#include <qhbuttongroup.h>
47 46
48#include "filter.h" 47#include "filter.h"
49 48
@@ -62,7 +61,7 @@ class FilterDialog : public KDialogBase
62 void add(); 61 void add();
63 void edit(); 62 void edit();
64 void remove(); 63 void remove();
65 void selectionChanged( QListBoxItem* ); 64 void selectionChanged( Q3ListBoxItem* );
66 65
67 private: 66 private:
68 void initGUI(); 67 void initGUI();
@@ -98,7 +97,7 @@ class FilterEditDialog : public KDialogBase
98 97
99 KLineEdit *mNameEdit; 98 KLineEdit *mNameEdit;
100 KListView *mCategoriesView; 99 KListView *mCategoriesView;
101 QHButtonGroup *mMatchRuleGroup; 100 Q3HButtonGroup *mMatchRuleGroup;
102 QCheckBox *mPrivate; 101 QCheckBox *mPrivate;
103 QCheckBox *mPublic; 102 QCheckBox *mPublic;
104 QCheckBox *mConfidential; 103 QCheckBox *mConfidential;
diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp
index 13cd084..caff3b2 100644
--- a/kaddressbook/geowidget.cpp
+++ b/kaddressbook/geowidget.cpp
@@ -27,10 +27,17 @@
27#include <kaccelmanager.h> 27#include <kaccelmanager.h>
28#else //KAB_EMBEDDED 28#else //KAB_EMBEDDED
29 29
30#include <qtextstream.h> 30#include <q3textstream.h>
31//Added by qt3to4:
32#include <QPaintEvent>
33#include <Q3GridLayout>
34#include <Q3Frame>
35#include <QMouseEvent>
31#include <kglobal.h> 36#include <kglobal.h>
32#endif //KAB_EMBEDDED 37#endif //KAB_EMBEDDED
33 38
39#include <QDesktopWidget>
40
34#include <knuminput.h> 41#include <knuminput.h>
35#include <kcombobox.h> 42#include <kcombobox.h>
36#include <kdebug.h> 43#include <kdebug.h>
@@ -41,10 +48,10 @@
41#include <qcheckbox.h> 48#include <qcheckbox.h>
42#include <qfile.h> 49#include <qfile.h>
43#include <qapplication.h> 50#include <qapplication.h>
44#include <qgroupbox.h> 51#include <q3groupbox.h>
45#include <qlabel.h> 52#include <qlabel.h>
46#include <qlayout.h> 53#include <qlayout.h>
47#include <qlistbox.h> 54#include <q3listbox.h>
48#include <qpainter.h> 55#include <qpainter.h>
49#include <qpixmap.h> 56#include <qpixmap.h>
50#include <qpushbutton.h> 57#include <qpushbutton.h>
@@ -59,7 +66,7 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name )
59{ 66{
60 QLabel *label = 0; 67 QLabel *label = 0;
61 68
62 QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); 69 Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 );
63 topLayout->setMargin( KDialog::marginHint() ); 70 topLayout->setMargin( KDialog::marginHint() );
64 topLayout->setSpacing( KDialog::spacingHint() ); 71 topLayout->setSpacing( KDialog::spacingHint() );
65 72
@@ -69,7 +76,7 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name )
69 label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, 0 ) ); 76 label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, 0 ) );
70 label->setAlignment( Qt::AlignTop ); 77 label->setAlignment( Qt::AlignTop );
71 topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); 78 topLayout->addMultiCellWidget( label, 0, 3, 0, 0 );
72 label->setAlignment( AlignCenter ); 79 label->setAlignment( Qt::AlignCenter );
73 mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); 80 mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this );
74 topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); 81 topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 );
75 82
@@ -167,16 +174,16 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name )
167 parent, name, true, true ), 174 parent, name, true, true ),
168 mUpdateSexagesimalInput( true ) 175 mUpdateSexagesimalInput( true )
169{ 176{
170 QFrame *page = plainPage(); 177 Q3Frame *page = plainPage();
171 178
172 QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), 179 Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(),
173 spacingHint() ); 180 spacingHint() );
174 //topLayout->setRowStretch( 1, 1 ); 181 //topLayout->setRowStretch( 1, 1 );
175 182
176 mMapWidget = new GeoMapWidget( page ); 183 mMapWidget = new GeoMapWidget( page );
177 mCityCombo = new KComboBox( page ); 184 mCityCombo = new KComboBox( page );
178 QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); 185 Q3GroupBox *sexagesimalGroup = new Q3GroupBox( 0, Qt::Vertical, i18n( "Sexagesimal" ), page );
179 QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(), 186 Q3GridLayout *sexagesimalLayout = new Q3GridLayout( sexagesimalGroup->layout(),
180 2, 5, spacingHint() ); 187 2, 5, spacingHint() );
181 QLabel *label; 188 QLabel *label;
182 if ( QApplication::desktop()->width() < 320 ) { 189 if ( QApplication::desktop()->width() < 320 ) {
@@ -429,8 +436,8 @@ void GeoDialog::loadCityList()
429 436
430 QFile file( fileName); 437 QFile file( fileName);
431 438
432 if ( file.open( IO_ReadOnly ) ) { 439 if ( file.open( QIODevice::ReadOnly ) ) {
433 QTextStream s( &file ); 440 Q3TextStream s( &file );
434 441
435 QString line, country; 442 QString line, country;
436 QRegExp coord( "[+-]\\d+[+-]\\d+" ); 443 QRegExp coord( "[+-]\\d+[+-]\\d+" );
@@ -552,7 +559,7 @@ int GeoDialog::nearestCity( double x, double y )
552GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) 559GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name )
553 : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) 560 : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 )
554{ 561{
555 setBackgroundMode( NoBackground ); 562 setBackgroundMode( Qt::NoBackground );
556 563
557 setFixedSize( 240, 120 ); 564 setFixedSize( 240, 120 );
558 565
@@ -624,6 +631,6 @@ void GeoMapWidget::paintEvent( QPaintEvent* )
624 bitBlt( this, 0, 0, &world ); 631 bitBlt( this, 0, 0, &world );
625} 632}
626 633
627#ifndef KAB_EMBEDDED 634#ifndef KAB_EMBEDDED_
628#include "geowidget.moc" 635#include "moc_geowidget.cpp"
629#endif //KAB_EMBEDDED 636#endif //KAB_EMBEDDED
diff --git a/kaddressbook/geowidget.h b/kaddressbook/geowidget.h
index 3d39691..5b64370 100644
--- a/kaddressbook/geowidget.h
+++ b/kaddressbook/geowidget.h
@@ -27,6 +27,10 @@
27#include <qmap.h> 27#include <qmap.h>
28 28
29#include <qwidget.h> 29#include <qwidget.h>
30//Added by qt3to4:
31#include <QLabel>
32#include <QMouseEvent>
33#include <QPaintEvent>
30#include <kdialogbase.h> 34#include <kdialogbase.h>
31 35
32namespace KABC { 36namespace KABC {
diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp
index eec5e08..6ecf66d 100644
--- a/kaddressbook/imagewidget.cpp
+++ b/kaddressbook/imagewidget.cpp
@@ -37,23 +37,27 @@
37#include <kurl.h> 37#include <kurl.h>
38 38
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qgroupbox.h> 40#include <q3groupbox.h>
41#include <qlabel.h> 41#include <qlabel.h>
42#include <qlayout.h> 42#include <qlayout.h>
43#include <qpixmap.h> 43#include <qpixmap.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qapplication.h> 45#include <qapplication.h>
46#include <QDesktopWidget>
47//Added by qt3to4:
48#include <Q3GridLayout>
49#include <Q3Frame>
46 50
47#include "imagewidget.h" 51#include "imagewidget.h"
48 52
49ImageWidget::ImageWidget( QWidget *parent, const char *name ) 53ImageWidget::ImageWidget( QWidget *parent, const char *name )
50 : QWidget( parent, name ) 54 : QWidget( parent, name )
51{ 55{
52 QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(), 56 Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 1, KDialog::marginHint(),
53 KDialog::spacingHint() ); 57 KDialog::spacingHint() );
54 58
55 QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); 59 Q3GroupBox *photoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Photo" ), this );
56 QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2, 60 Q3GridLayout *boxLayout = new Q3GridLayout( photoBox->layout(), 3, 2,
57 KDialog::spacingHint() ); 61 KDialog::spacingHint() );
58 boxLayout->setRowStretch( 2, 1 ); 62 boxLayout->setRowStretch( 2, 1 );
59 63
@@ -63,7 +67,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
63 fac = 6; 67 fac = 6;
64 mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); 68 mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac );
65 mPhotoLabel->setScaledContents( true ); 69 mPhotoLabel->setScaledContents( true );
66 mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 70 mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
67 boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); 71 boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 );
68 72
69 mPhotoUrl = new KURLRequester( photoBox ); 73 mPhotoUrl = new KURLRequester( photoBox );
@@ -75,7 +79,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
75 79
76 80
77 boxLayout->addWidget( mPhotoUrl, 0, 1 ); 81 boxLayout->addWidget( mPhotoUrl, 0, 1 );
78 QHBox *hb1 = new QHBox ( photoBox ); 82 Q3HBox *hb1 = new Q3HBox ( photoBox );
79 mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 ); 83 mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 );
80 mUsePhotoUrl->setEnabled( false ); 84 mUsePhotoUrl->setEnabled( false );
81 boxLayout->addWidget( hb1, 1, 1 ); 85 boxLayout->addWidget( hb1, 1, 1 );
@@ -86,14 +90,14 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
86 90
87 topLayout->addWidget( photoBox, 0, 0 ); 91 topLayout->addWidget( photoBox, 0, 0 );
88 92
89 QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); 93 Q3GroupBox *logoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Logo" ), this );
90 boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); 94 boxLayout = new Q3GridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() );
91 boxLayout->setRowStretch( 2, 1 ); 95 boxLayout->setRowStretch( 2, 1 );
92 96
93 mLogoLabel = new QLabel( logoBox ); 97 mLogoLabel = new QLabel( logoBox );
94 mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); 98 mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac );
95 mLogoLabel->setScaledContents( true ); 99 mLogoLabel->setScaledContents( true );
96 mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 100 mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken );
97 boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); 101 boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 );
98 102
99 mLogoUrl = new KURLRequester( logoBox ); 103 mLogoUrl = new KURLRequester( logoBox );
@@ -104,7 +108,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name )
104#endif //KAB_EMBEDDED 108#endif //KAB_EMBEDDED
105 boxLayout->addWidget( mLogoUrl, 0, 1 ); 109 boxLayout->addWidget( mLogoUrl, 0, 1 );
106 110
107 QHBox *hb2 = new QHBox ( logoBox ); 111 Q3HBox *hb2 = new Q3HBox ( logoBox );
108 mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 ); 112 mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 );
109 mUseLogoUrl->setEnabled( false ); 113 mUseLogoUrl->setEnabled( false );
110 boxLayout->addWidget( hb2, 1, 1 ); 114 boxLayout->addWidget( hb2, 1, 1 );
@@ -180,7 +184,7 @@ KABC::Picture ImageWidget::photo() const
180 if ( mUsePhotoUrl->isChecked() ) 184 if ( mUsePhotoUrl->isChecked() )
181 photo.setUrl( mPhotoUrl->url() ); 185 photo.setUrl( mPhotoUrl->url() );
182 else { 186 else {
183 QPixmap *px = mPhotoLabel->pixmap(); 187 const QPixmap *px = mPhotoLabel->pixmap();
184 if ( px ) { 188 if ( px ) {
185#ifndef KAB_EMBEDDED 189#ifndef KAB_EMBEDDED
186 if ( px->height() > px->width() ) 190 if ( px->height() > px->width() )
@@ -232,7 +236,7 @@ KABC::Picture ImageWidget::logo() const
232 if ( mUseLogoUrl->isChecked() ) 236 if ( mUseLogoUrl->isChecked() )
233 logo.setUrl( mLogoUrl->url() ); 237 logo.setUrl( mLogoUrl->url() );
234 else { 238 else {
235 QPixmap *px = mLogoLabel->pixmap(); 239 const QPixmap *px = mLogoLabel->pixmap();
236 if ( px ) { 240 if ( px ) {
237#ifndef KAB_EMBEDDED 241#ifndef KAB_EMBEDDED
238 if ( px->height() > px->width() ) 242 if ( px->height() > px->width() )
@@ -292,6 +296,6 @@ QPixmap ImageWidget::loadPixmap( const QString &url )
292 return pixmap; 296 return pixmap;
293} 297}
294 298
295#ifndef KAB_EMBEDDED 299#ifndef KAB_EMBEDDED_
296#include "imagewidget.moc" 300#include "moc_imagewidget.cpp"
297#endif //KAB_EMBEDDED 301#endif //KAB_EMBEDDED
diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h
index bbfba58..9320a6b 100644
--- a/kaddressbook/imagewidget.h
+++ b/kaddressbook/imagewidget.h
@@ -25,6 +25,9 @@
25#define IMAGEWIDGET_H 25#define IMAGEWIDGET_H
26 26
27#include <qwidget.h> 27#include <qwidget.h>
28//Added by qt3to4:
29#include <QPixmap>
30#include <QLabel>
28 31
29#include <kabc/picture.h> 32#include <kabc/picture.h>
30#include <kdialogbase.h> 33#include <kdialogbase.h>
diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp
index 5f8b83d..a54d1cd 100644
--- a/kaddressbook/incsearchwidget.cpp
+++ b/kaddressbook/incsearchwidget.cpp
@@ -25,7 +25,10 @@
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qtooltip.h> 26#include <qtooltip.h>
27#include <qapplication.h> 27#include <qapplication.h>
28#include <QDesktopWidget>
28#include <qcombobox.h> 29#include <qcombobox.h>
30//Added by qt3to4:
31#include <Q3HBoxLayout>
29 32
30#include <kdialog.h> 33#include <kdialog.h>
31#include <klineedit.h> 34#include <klineedit.h>
@@ -37,17 +40,18 @@
37#include "incsearchwidget.h" 40#include "incsearchwidget.h"
38 41
39IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) 42IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name )
40 : QWidget( parent, name )
41{ 43{
44 setObjectName(name);
45 setParent(parent);
42#ifndef KAB_EMBEDDED 46#ifndef KAB_EMBEDDED
43//US setCaption( i18n( "Incremental Search" ) ); 47//US setCaption( i18n( "Incremental Search" ) );
44#endif //KAB_EMBEDDED 48#endif //KAB_EMBEDDED
45 49
46 QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); 50 Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() );
47 51
48#ifdef DESKTOP_VERSION 52#ifdef DESKTOP_VERSION
49 QLabel *label = new QLabel( i18n( "Search:" ), this ); 53 QLabel *label = new QLabel( i18n( "Search:" ), this );
50 label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); 54 label->setAlignment( Qt::AlignVCenter | Qt::AlignRight );
51 layout->addWidget( label ); 55 layout->addWidget( label );
52#endif //KAB_EMBEDDED 56#endif //KAB_EMBEDDED
53 57
@@ -176,6 +180,6 @@ int IncSearchWidget::currentItem() const
176 180
177 return mFieldCombo->currentItem(); 181 return mFieldCombo->currentItem();
178} 182}
179#ifndef KAB_EMBEDDED 183#ifndef KAB_EMBEDDED_
180#include "incsearchwidget.moc" 184#include "moc_incsearchwidget.cpp"
181#endif //KAB_EMBEDDED 185#endif //KAB_EMBEDDED
diff --git a/kaddressbook/jumpbuttonbar.cpp b/kaddressbook/jumpbuttonbar.cpp
index aebf8a6..740b7db 100644
--- a/kaddressbook/jumpbuttonbar.cpp
+++ b/kaddressbook/jumpbuttonbar.cpp
@@ -25,8 +25,11 @@
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qstring.h> 27#include <qstring.h>
28#include <qtl.h> 28#include <q3tl.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#include <QDesktopWidget>
31//Added by qt3to4:
32#include <Q3GridLayout>
30 33
31#include <kabc/addressbook.h> 34#include <kabc/addressbook.h>
32#include <kabc/field.h> 35#include <kabc/field.h>
@@ -73,9 +76,9 @@ JumpButtonBar::JumpButtonBar( KABCore *core, QWidget *parent, const char *name )
73{ 76{
74 if ( QApplication::desktop()->width() < 480 ) 77 if ( QApplication::desktop()->width() < 480 )
75 78
76 mButtonLayout = new QGridLayout( this, 1, 18 ); 79 mButtonLayout = new Q3GridLayout( this, 1, 18 );
77 else 80 else
78 mButtonLayout = new QGridLayout( this, 1, 20 ); 81 mButtonLayout = new Q3GridLayout( this, 1, 20 );
79 mButtonLayout->setAlignment( Qt::AlignTop ); 82 mButtonLayout->setAlignment( Qt::AlignTop );
80 83
81 recreateButtons(); 84 recreateButtons();
@@ -252,6 +255,6 @@ void JumpButtonBar::sortListLocaleAware( QStringList &list )
252 } 255 }
253} 256}
254 257
255#ifndef KAB_EMBEDDED 258#ifndef KAB_EMBEDDED_
256#include "jumpbuttonbar.moc" 259#include "moc_jumpbuttonbar.cpp"
257#endif //KAB_EMBEDDED 260#endif //KAB_EMBEDDED
diff --git a/kaddressbook/jumpbuttonbar.h b/kaddressbook/jumpbuttonbar.h
index d534f2b..0589812 100644
--- a/kaddressbook/jumpbuttonbar.h
+++ b/kaddressbook/jumpbuttonbar.h
@@ -26,11 +26,14 @@
26 26
27#include <qsizepolicy.h> 27#include <qsizepolicy.h>
28#include <qwidget.h> 28#include <qwidget.h>
29#include <qptrlist.h> 29#include <q3ptrlist.h>
30#include <qstringlist.h> 30#include <qstringlist.h>
31//Added by qt3to4:
32#include <QResizeEvent>
33#include <Q3GridLayout>
31 34
32class QChar; 35class QChar;
33class QGridLayout; 36class Q3GridLayout;
34class QResizeEvent; 37class QResizeEvent;
35class QPushButton; 38class QPushButton;
36class JumpButton; 39class JumpButton;
@@ -76,9 +79,9 @@ class JumpButtonBar : public QWidget
76 79
77 KABCore *mCore; 80 KABCore *mCore;
78 81
79 QGridLayout *mButtonLayout; 82 Q3GridLayout *mButtonLayout;
80 QStringList mCharacters; 83 QStringList mCharacters;
81 QPtrList<JumpButton> mButtons; 84 Q3PtrList<JumpButton> mButtons;
82}; 85};
83 86
84#endif 87#endif
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index ab2824c..03b44d1 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -39,7 +39,17 @@ $Id$
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qcheckbox.h> 40#include <qcheckbox.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qprogressbar.h> 42#include <q3progressbar.h>
43#include <QDesktopWidget>
44//Added by qt3to4:
45#include <QResizeEvent>
46#include <QPixmap>
47#include <Q3ValueList>
48#include <Q3HBoxLayout>
49#include <Q3VBoxLayout>
50#include <Q3CString>
51#include <Q3PopupMenu>
52#include <Q3PtrList>
43#include <libkdepim/phoneaccess.h> 53#include <libkdepim/phoneaccess.h>
44 54
45#ifndef KAB_EMBEDDED 55#ifndef KAB_EMBEDDED
@@ -47,10 +57,10 @@ $Id$
47#include <qdir.h> 57#include <qdir.h>
48#include <qfile.h> 58#include <qfile.h>
49#include <qapplicaton.h> 59#include <qapplicaton.h>
50#include <qprogressbar.h> 60#include <q3progressbar.h>
51#include <qlayout.h> 61#include <qlayout.h>
52#include <qregexp.h> 62#include <qregexp.h>
53#include <qvbox.h> 63#include <q3vbox.h>
54#include <kabc/addresseelist.h> 64#include <kabc/addresseelist.h>
55#include <kabc/errorhandler.h> 65#include <kabc/errorhandler.h>
56#include <kabc/resource.h> 66#include <kabc/resource.h>
@@ -88,7 +98,7 @@ $Id$
88//US 98//US
89#include <addresseeview.h> 99#include <addresseeview.h>
90 100
91#include <qapp.h> 101#include <qapplication.h>
92#include <qmenubar.h> 102#include <qmenubar.h>
93//#include <qtoolbar.h> 103//#include <qtoolbar.h>
94#include <qmessagebox.h> 104#include <qmessagebox.h>
@@ -129,12 +139,12 @@ $Id$
129#include <qmap.h> 139#include <qmap.h>
130#include <qdir.h> 140#include <qdir.h>
131#include <qfile.h> 141#include <qfile.h>
132#include <qvbox.h> 142#include <q3vbox.h>
133#include <qlayout.h> 143#include <qlayout.h>
134#include <qclipboard.h> 144#include <qclipboard.h>
135#include <qtextstream.h> 145#include <q3textstream.h>
136#include <qradiobutton.h> 146#include <qradiobutton.h>
137#include <qbuttongroup.h> 147#include <q3buttongroup.h>
138 148
139#include <libkdepim/categoryselectdialog.h> 149#include <libkdepim/categoryselectdialog.h>
140#include <libkdepim/categoryeditdialog.h> 150#include <libkdepim/categoryeditdialog.h>
@@ -175,12 +185,12 @@ class KABCatPrefs : public QDialog
175 QDialog( parent, name, true ) 185 QDialog( parent, name, true )
176 { 186 {
177 setCaption( i18n("Manage new Categories") ); 187 setCaption( i18n("Manage new Categories") );
178 QVBoxLayout* lay = new QVBoxLayout( this ); 188 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
179 lay->setSpacing( 3 ); 189 lay->setSpacing( 3 );
180 lay->setMargin( 3 ); 190 lay->setMargin( 3 );
181 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 191 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
182 lay->addWidget( lab ); 192 lay->addWidget( lab );
183 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 193 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this );
184 lay->addWidget( format ); 194 lay->addWidget( format );
185 format->setExclusive ( true ) ; 195 format->setExclusive ( true ) ;
186 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 196 addCatBut = new QRadioButton(i18n("Add to category list"), format );
@@ -207,12 +217,12 @@ class KABFormatPrefs : public QDialog
207 QDialog( parent, name, true ) 217 QDialog( parent, name, true )
208 { 218 {
209 setCaption( i18n("Set formatted name") ); 219 setCaption( i18n("Set formatted name") );
210 QVBoxLayout* lay = new QVBoxLayout( this ); 220 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
211 lay->setSpacing( 3 ); 221 lay->setSpacing( 3 );
212 lay->setMargin( 3 ); 222 lay->setMargin( 3 );
213 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 223 QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this );
214 lay->addWidget( lab ); 224 lay->addWidget( lab );
215 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); 225 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Set formatted name to:"), this );
216 lay->addWidget( format ); 226 lay->addWidget( format );
217 format->setExclusive ( true ) ; 227 format->setExclusive ( true ) ;
218 simple = new QRadioButton(i18n("Simple: James Bond"), format ); 228 simple = new QRadioButton(i18n("Simple: James Bond"), format );
@@ -245,29 +255,29 @@ class KAex2phonePrefs : public QDialog
245 QDialog( parent, name, true ) 255 QDialog( parent, name, true )
246 { 256 {
247 setCaption( i18n("Export to phone options") ); 257 setCaption( i18n("Export to phone options") );
248 QVBoxLayout* lay = new QVBoxLayout( this ); 258 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
249 lay->setSpacing( 3 ); 259 lay->setSpacing( 3 );
250 lay->setMargin( 3 ); 260 lay->setMargin( 3 );
251 QLabel *lab; 261 QLabel *lab;
252 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 262 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
253 lab->setAlignment (AlignHCenter ); 263 lab->setAlignment (Qt::AlignHCenter );
254 QHBox* temphb; 264 Q3HBox* temphb;
255 temphb = new QHBox( this ); 265 temphb = new Q3HBox( this );
256 new QLabel( i18n("I/O device: "), temphb ); 266 new QLabel( i18n("I/O device: "), temphb );
257 mPhoneDevice = new QLineEdit( temphb); 267 mPhoneDevice = new QLineEdit( temphb);
258 lay->addWidget( temphb ); 268 lay->addWidget( temphb );
259 temphb = new QHBox( this ); 269 temphb = new Q3HBox( this );
260 new QLabel( i18n("Connection: "), temphb ); 270 new QLabel( i18n("Connection: "), temphb );
261 mPhoneConnection = new QLineEdit( temphb); 271 mPhoneConnection = new QLineEdit( temphb);
262 lay->addWidget( temphb ); 272 lay->addWidget( temphb );
263 temphb = new QHBox( this ); 273 temphb = new Q3HBox( this );
264 new QLabel( i18n("Model(opt.): "), temphb ); 274 new QLabel( i18n("Model(opt.): "), temphb );
265 mPhoneModel = new QLineEdit( temphb); 275 mPhoneModel = new QLineEdit( temphb);
266 lay->addWidget( temphb ); 276 lay->addWidget( temphb );
267 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this ); 277 // mWriteToSim = new QCheckBox( i18n("Write Contacts to SIM card\n(if not, write to phone memory)"), this );
268 // lay->addWidget( mWriteToSim ); 278 // lay->addWidget( mWriteToSim );
269 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); 279 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) );
270 lab->setAlignment (AlignHCenter); 280 lab->setAlignment (Qt::AlignHCenter);
271 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 281 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
272 lay->addWidget( ok ); 282 lay->addWidget( ok );
273 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 283 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
@@ -407,7 +417,7 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
407 //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 417 //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
408 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); 418 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
409} 419}
410void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) 420void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data )
411{ 421{
412 //qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 422 //qDebug("KO: QCOP start message received: %s ", cmsg.data() );
413 mCStringMess = cmsg; 423 mCStringMess = cmsg;
@@ -421,9 +431,9 @@ void KABCore::loadDataAfterStart()
421 mViewManager->refreshView(); 431 mViewManager->refreshView();
422 432
423#ifndef DESKTOP_VERSION 433#ifndef DESKTOP_VERSION
424 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 434 disconnect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT (receiveStart ( const Q3CString &, const QByteArray & )));
425 435
426 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 436 QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & )));
427 if ( !mCStringMess.isEmpty() ) 437 if ( !mCStringMess.isEmpty() )
428 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); 438 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
429#endif 439#endif
@@ -453,11 +463,11 @@ KABCore::~KABCore()
453 delete infrared; 463 delete infrared;
454#endif 464#endif
455} 465}
456void KABCore::receive( const QCString& cmsg, const QByteArray& data ) 466void KABCore::receive( const Q3CString& cmsg, const QByteArray& data )
457{ 467{
458 //qDebug("KA: QCOP message received: %s ", cmsg.data() ); 468 //qDebug("KA: QCOP message received: %s ", cmsg.data() );
459 if ( cmsg == "setDocument(QString)" ) { 469 if ( cmsg == "setDocument(QString)" ) {
460 QDataStream stream( data, IO_ReadOnly ); 470 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
461 QString fileName; 471 QString fileName;
462 stream >> fileName; 472 stream >> fileName;
463 recieve( fileName ); 473 recieve( fileName );
@@ -480,7 +490,7 @@ void KABCore::toggleBeamReceive( )
480 mActionBR->setChecked(true); 490 mActionBR->setChecked(true);
481 491
482 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; 492 infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ;
483 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); 493 QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(receive( const Q3CString&, const QByteArray& )));
484#endif 494#endif
485} 495}
486 496
@@ -560,7 +570,7 @@ void KABCore::restoreSettings()
560 if ( wid < 640 ) 570 if ( wid < 640 )
561 wid = QApplication::desktop()->height(); 571 wid = QApplication::desktop()->height();
562#endif 572#endif
563 QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; 573 Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter;
564 if ( true /*splitterSize.count() == 0*/ ) { 574 if ( true /*splitterSize.count() == 0*/ ) {
565 splitterSize.append( wid / 2 ); 575 splitterSize.append( wid / 2 );
566 splitterSize.append( wid / 2 ); 576 splitterSize.append( wid / 2 );
@@ -650,10 +660,10 @@ QStringList KABCore::selectedUIDs() const
650 660
651KABC::Resource *KABCore::requestResource( QWidget *parent ) 661KABC::Resource *KABCore::requestResource( QWidget *parent )
652{ 662{
653 QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); 663 Q3PtrList<KABC::Resource> kabcResources = addressBook()->resources();
654 664
655 QPtrList<KRES::Resource> kresResources; 665 Q3PtrList<KRES::Resource> kresResources;
656 QPtrListIterator<KABC::Resource> resIt( kabcResources ); 666 Q3PtrListIterator<KABC::Resource> resIt( kabcResources );
657 KABC::Resource *resource; 667 KABC::Resource *resource;
658 while ( ( resource = resIt.current() ) != 0 ) { 668 while ( ( resource = resIt.current() ) != 0 ) {
659 ++resIt; 669 ++resIt;
@@ -795,14 +805,14 @@ void KABCore::mailVCard( const QStringList& uids )
795 805
796 QFile outFile(fileName); 806 QFile outFile(fileName);
797 807
798 if ( outFile.open(IO_WriteOnly) ) { // file opened successfully 808 if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully
799 KABC::VCardConverter converter; 809 KABC::VCardConverter converter;
800 QString vcard; 810 QString vcard;
801 811
802 converter.addresseeToVCard( a, vcard ); 812 converter.addresseeToVCard( a, vcard );
803 813
804 QTextStream t( &outFile ); // use a text stream 814 Q3TextStream t( &outFile ); // use a text stream
805 t.setEncoding( QTextStream::UnicodeUTF8 ); 815 t.setEncoding( Q3TextStream::UnicodeUTF8 );
806 t << vcard; 816 t << vcard;
807 817
808 outFile.close(); 818 outFile.close();
@@ -1016,11 +1026,11 @@ void KABCore::beamVCard(const QStringList& uids)
1016 } 1026 }
1017#ifndef DESKTOP_VERSION 1027#ifndef DESKTOP_VERSION
1018 QFile outFile(fileName); 1028 QFile outFile(fileName);
1019 if ( outFile.open(IO_WriteOnly) ) { 1029 if ( outFile.open(QIODevice::WriteOnly) ) {
1020 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); 1030 datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" );
1021 QTextStream t( &outFile ); // use a text stream 1031 Q3TextStream t( &outFile ); // use a text stream
1022 //t.setEncoding( QTextStream::UnicodeUTF8 ); 1032 //t.setEncoding( QTextStream::UnicodeUTF8 );
1023 t.setEncoding( QTextStream::Latin1 ); 1033 t.setEncoding( Q3TextStream::Latin1 );
1024 t <<datastream.latin1(); 1034 t <<datastream.latin1();
1025 outFile.close(); 1035 outFile.close();
1026 Ir *ir = new Ir( this ); 1036 Ir *ir = new Ir( this );
@@ -1297,10 +1307,10 @@ void KABCore::newContact()
1297{ 1307{
1298 1308
1299 1309
1300 QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); 1310 Q3PtrList<KABC::Resource> kabcResources = mAddressBook->resources();
1301 1311
1302 QPtrList<KRES::Resource> kresResources; 1312 Q3PtrList<KRES::Resource> kresResources;
1303 QPtrListIterator<KABC::Resource> it( kabcResources ); 1313 Q3PtrListIterator<KABC::Resource> it( kabcResources );
1304 KABC::Resource *resource; 1314 KABC::Resource *resource;
1305 while ( ( resource = it.current() ) != 0 ) { 1315 while ( ( resource = it.current() ) != 0 ) {
1306 ++it; 1316 ++it;
@@ -1856,7 +1866,7 @@ void KABCore::slotEditorDestroyed( const QString &uid )
1856void KABCore::initGUI() 1866void KABCore::initGUI()
1857{ 1867{
1858#ifndef KAB_EMBEDDED 1868#ifndef KAB_EMBEDDED
1859 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1869 Q3HBoxLayout *topLayout = new Q3HBoxLayout( this );
1860 topLayout->setSpacing( KDialogBase::spacingHint() ); 1870 topLayout->setSpacing( KDialogBase::spacingHint() );
1861 1871
1862 mExtensionBarSplitter = new QSplitter( this ); 1872 mExtensionBarSplitter = new QSplitter( this );
@@ -1864,7 +1874,7 @@ void KABCore::initGUI()
1864 1874
1865 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1875 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1866 1876
1867 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1877 Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter );
1868 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1878 mIncSearchWidget = new IncSearchWidget( viewSpace );
1869 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1879 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1870 SLOT( incrementalSearch( const QString& ) ) ); 1880 SLOT( incrementalSearch( const QString& ) ) );
@@ -1888,19 +1898,19 @@ void KABCore::initGUI()
1888#else //KAB_EMBEDDED 1898#else //KAB_EMBEDDED
1889 //US initialize viewMenu before settingup viewmanager. 1899 //US initialize viewMenu before settingup viewmanager.
1890 // Viewmanager needs this menu to plugin submenues. 1900 // Viewmanager needs this menu to plugin submenues.
1891 viewMenu = new QPopupMenu( this ); 1901 viewMenu = new Q3PopupMenu( this );
1892 settingsMenu = new QPopupMenu( this ); 1902 settingsMenu = new Q3PopupMenu( this );
1893 //filterMenu = new QPopupMenu( this ); 1903 //filterMenu = new QPopupMenu( this );
1894 ImportMenu = new QPopupMenu( this ); 1904 ImportMenu = new Q3PopupMenu( this );
1895 ExportMenu = new QPopupMenu( this ); 1905 ExportMenu = new Q3PopupMenu( this );
1896 syncMenu = new QPopupMenu( this ); 1906 syncMenu = new Q3PopupMenu( this );
1897 changeMenu= new QPopupMenu( this ); 1907 changeMenu= new Q3PopupMenu( this );
1898 beamMenu= new QPopupMenu( this ); 1908 beamMenu= new Q3PopupMenu( this );
1899 1909
1900//US since we have no splitter for the embedded system, setup 1910//US since we have no splitter for the embedded system, setup
1901// a layout with two frames. One left and one right. 1911// a layout with two frames. One left and one right.
1902 1912
1903 QBoxLayout *topLayout; 1913 Q3BoxLayout *topLayout;
1904 1914
1905 // = new QHBoxLayout( this ); 1915 // = new QHBoxLayout( this );
1906// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1916// QBoxLayout *topLayout = (QBoxLayout*)layout();
@@ -1909,7 +1919,7 @@ void KABCore::initGUI()
1909// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1919// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1910 1920
1911#ifdef DESKTOP_VERSION 1921#ifdef DESKTOP_VERSION
1912 topLayout = new QHBoxLayout( this ); 1922 topLayout = new Q3HBoxLayout( this );
1913 1923
1914 1924
1915 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1925 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
@@ -1924,12 +1934,12 @@ void KABCore::initGUI()
1924 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1934 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1925#else 1935#else
1926 if ( QApplication::desktop()->width() > 480 ) { 1936 if ( QApplication::desktop()->width() > 480 ) {
1927 topLayout = new QHBoxLayout( this ); 1937 topLayout = new Q3HBoxLayout( this );
1928 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1938 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1929 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1939 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1930 } else { 1940 } else {
1931 1941
1932 topLayout = new QHBoxLayout( this ); 1942 topLayout = new Q3HBoxLayout( this );
1933 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1943 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1934 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1944 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1935 } 1945 }
@@ -2034,17 +2044,17 @@ void KABCore::initActions()
2034 2044
2035 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 2045 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
2036 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 2046 //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
2037 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, 2047 mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", Qt::CTRL + Qt::Key_P, mViewManager,
2038 SLOT( printView() ), actionCollection(), "kaddressbook_print" ); 2048 SLOT( printView() ), actionCollection(), "kaddressbook_print" );
2039 2049
2040 2050
2041 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails, 2051 mActionPrintDetails = new KAction( i18n( "&Print Details" ), "fileprint", 0, mDetails,
2042 SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); 2052 SLOT( printView() ), actionCollection(), "kaddressbook_print2" );
2043 2053
2044 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 2054 mActionSave = new KAction( i18n( "&Save" ), "filesave", Qt::CTRL+Qt::Key_S, this,
2045 SLOT( save() ), actionCollection(), "file_sync" ); 2055 SLOT( save() ), actionCollection(), "file_sync" );
2046 2056
2047 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 2057 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", Qt::CTRL+Qt::Key_N, this,
2048 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 2058 SLOT( newContact() ), actionCollection(), "file_new_contact" );
2049 2059
2050 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 2060 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
@@ -2083,22 +2093,22 @@ void KABCore::initActions()
2083 2093
2084 // edit menu 2094 // edit menu
2085 if ( mIsPart ) { 2095 if ( mIsPart ) {
2086 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 2096 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", Qt::CTRL + Qt::Key_C, this,
2087 SLOT( copyContacts() ), actionCollection(), 2097 SLOT( copyContacts() ), actionCollection(),
2088 "kaddressbook_copy" ); 2098 "kaddressbook_copy" );
2089 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 2099 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", Qt::CTRL + Qt::Key_X, this,
2090 SLOT( cutContacts() ), actionCollection(), 2100 SLOT( cutContacts() ), actionCollection(),
2091 "kaddressbook_cut" ); 2101 "kaddressbook_cut" );
2092 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 2102 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", Qt::CTRL + Qt::Key_V, this,
2093 SLOT( pasteContacts() ), actionCollection(), 2103 SLOT( pasteContacts() ), actionCollection(),
2094 "kaddressbook_paste" ); 2104 "kaddressbook_paste" );
2095 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 2105 mActionSelectAll = new KAction( i18n( "Select &All" ), Qt::CTRL + Qt::Key_A, this,
2096 SLOT( selectAllContacts() ), actionCollection(), 2106 SLOT( selectAllContacts() ), actionCollection(),
2097 "kaddressbook_select_all" ); 2107 "kaddressbook_select_all" );
2098 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 2108 mActionUndo = new KAction( i18n( "&Undo" ), "undo", Qt::CTRL + Qt::Key_Z, this,
2099 SLOT( undo() ), actionCollection(), 2109 SLOT( undo() ), actionCollection(),
2100 "kaddressbook_undo" ); 2110 "kaddressbook_undo" );
2101 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 2111 mActionRedo = new KAction( i18n( "Re&do" ), "redo", Qt::CTRL + Qt::SHIFT + Qt::Key_Z,
2102 this, SLOT( redo() ), actionCollection(), 2112 this, SLOT( redo() ), actionCollection(),
2103 "kaddressbook_redo" ); 2113 "kaddressbook_redo" );
2104 } else { 2114 } else {
@@ -2111,7 +2121,7 @@ void KABCore::initActions()
2111 } 2121 }
2112 2122
2113 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 2123 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
2114 Key_Delete, this, SLOT( deleteContacts() ), 2124 Qt::Key_Delete, this, SLOT( deleteContacts() ),
2115 actionCollection(), "edit_delete" ); 2125 actionCollection(), "edit_delete" );
2116 2126
2117 mActionUndo->setEnabled( false ); 2127 mActionUndo->setEnabled( false );
@@ -2246,9 +2256,9 @@ void KABCore::addActionsManually()
2246//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 2256//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
2247 2257
2248#ifdef KAB_EMBEDDED 2258#ifdef KAB_EMBEDDED
2249 QPopupMenu *fileMenu = new QPopupMenu( this ); 2259 Q3PopupMenu *fileMenu = new Q3PopupMenu( this );
2250 QPopupMenu *editMenu = new QPopupMenu( this ); 2260 Q3PopupMenu *editMenu = new Q3PopupMenu( this );
2251 QPopupMenu *helpMenu = new QPopupMenu( this ); 2261 Q3PopupMenu *helpMenu = new Q3PopupMenu( this );
2252 2262
2253 KToolBar* tb = mMainWindow->toolBar(); 2263 KToolBar* tb = mMainWindow->toolBar();
2254 mMainWindow->setToolBarsMovable (false ); 2264 mMainWindow->setToolBarsMovable (false );
@@ -2276,7 +2286,7 @@ void KABCore::addActionsManually()
2276 } else { 2286 } else {
2277 //US setup toolbar 2287 //US setup toolbar
2278 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 2288 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
2279 QPopupMenu *popupBarTB = new QPopupMenu( this ); 2289 Q3PopupMenu *popupBarTB = new Q3PopupMenu( this );
2280 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); 2290 menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB);
2281 tb->insertWidget(-1, 0, menuBarTB); 2291 tb->insertWidget(-1, 0, menuBarTB);
2282 mIncSearchWidget = new IncSearchWidget( tb ); 2292 mIncSearchWidget = new IncSearchWidget( tb );
@@ -2631,7 +2641,7 @@ void KABCore::configureKeyBindings()
2631#ifdef KAB_EMBEDDED 2641#ifdef KAB_EMBEDDED
2632void KABCore::configureResources() 2642void KABCore::configureResources()
2633{ 2643{
2634 KRES::KCMKResources dlg( this, "" , 0 ); 2644 KRES::KCMKResources dlg( this, "" , QStringList() );
2635 2645
2636 if ( !dlg.exec() ) 2646 if ( !dlg.exec() )
2637 return; 2647 return;
@@ -2727,7 +2737,7 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString
2727 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { 2737 for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) {
2728 ++count; 2738 ++count;
2729 } 2739 }
2730 QProgressBar bar(count,0 ); 2740 Q3ProgressBar bar(count,0 );
2731 int w = 300; 2741 int w = 300;
2732 if ( QApplication::desktop()->width() < 320 ) 2742 if ( QApplication::desktop()->width() < 320 )
2733 w = 220; 2743 w = 220;
@@ -2908,7 +2918,7 @@ KABC::Addressee KABCore::getLastSyncAddressee()
2908 sum = "E: "; 2918 sum = "E: ";
2909 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); 2919 lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
2910 lse.setRevision( mLastAddressbookSync ); 2920 lse.setRevision( mLastAddressbookSync );
2911 lse.setCategories( i18n("SyncEvent") ); 2921 lse.setCategories( QStringList(i18n("SyncEvent")) );
2912 mAddressBook->insertAddressee( lse ); 2922 mAddressBook->insertAddressee( lse );
2913 } 2923 }
2914 return lse; 2924 return lse;
@@ -3099,7 +3109,7 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
3099 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee")); 3109 addresseeRSync.setFamilyName(mCurrentSyncName + i18n(" - sync addressee"));
3100 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 3110 addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName );
3101 addresseeRSync.setRevision( mLastAddressbookSync ); 3111 addresseeRSync.setRevision( mLastAddressbookSync );
3102 addresseeRSync.setCategories( i18n("SyncAddressee") ); 3112 addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) );
3103 } 3113 }
3104 } 3114 }
3105 if ( addresseeLSync.revision() == mLastAddressbookSync ) { 3115 if ( addresseeLSync.revision() == mLastAddressbookSync ) {
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index ec6a9ec..4351720 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -28,11 +28,15 @@
28 28
29#ifndef KAB_EMBEDDED 29#ifndef KAB_EMBEDDED
30#endif //KAB_EMBEDDED 30#endif //KAB_EMBEDDED
31#include <qdict.h> 31#include <q3dict.h>
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34#include <qwidget.h> 34#include <qwidget.h>
35#include <qpopupmenu.h> 35#include <q3popupmenu.h>
36//Added by qt3to4:
37#include <Q3CString>
38#include <QPixmap>
39#include <QResizeEvent>
36#include <ksyncmanager.h> 40#include <ksyncmanager.h>
37#ifndef DESKTOP_VERSION 41#ifndef DESKTOP_VERSION
38#include <qcopchannel_qws.h> 42#include <qcopchannel_qws.h>
@@ -85,9 +89,9 @@ class KABCore : public QWidget, public KSyncInterface
85 89
86#ifdef KAB_EMBEDDED 90#ifdef KAB_EMBEDDED
87 //US added functionality 91 //US added functionality
88 QPopupMenu* getViewMenu() {return viewMenu;} 92 Q3PopupMenu* getViewMenu() {return viewMenu;}
89 QPopupMenu* getFilterMenu() {return filterMenu;} 93 Q3PopupMenu* getFilterMenu() {return filterMenu;}
90 QPopupMenu* getSettingsMenu() {return settingsMenu;} 94 Q3PopupMenu* getSettingsMenu() {return settingsMenu;}
91 void addActionsManually(); 95 void addActionsManually();
92#endif //KAB_EMBEDDED 96#endif //KAB_EMBEDDED
93 /** 97 /**
@@ -135,8 +139,8 @@ class KABCore : public QWidget, public KSyncInterface
135#endif //KAB_EMBEDDED 139#endif //KAB_EMBEDDED
136 140
137#ifdef KAB_EMBEDDED 141#ifdef KAB_EMBEDDED
138 inline QPopupMenu* getImportMenu() { return ImportMenu;} 142 inline Q3PopupMenu* getImportMenu() { return ImportMenu;}
139 inline QPopupMenu* getExportMenu() { return ExportMenu;} 143 inline Q3PopupMenu* getExportMenu() { return ExportMenu;}
140#endif //KAB_EMBEDDED 144#endif //KAB_EMBEDDED
141 145
142 public slots: 146 public slots:
@@ -366,8 +370,8 @@ class KABCore : public QWidget, public KSyncInterface
366 private slots: 370 private slots:
367 void updateToolBar(); 371 void updateToolBar();
368 void updateMainWindow(); 372 void updateMainWindow();
369 void receive( const QCString& cmsg, const QByteArray& data ); 373 void receive( const Q3CString& cmsg, const QByteArray& data );
370 void receiveStart( const QCString& cmsg, const QByteArray& data ); 374 void receiveStart( const Q3CString& cmsg, const QByteArray& data );
371 void toggleBeamReceive( ); 375 void toggleBeamReceive( );
372 void disableBR(bool); 376 void disableBR(bool);
373 void setJumpButtonBarVisible( bool visible ); 377 void setJumpButtonBarVisible( bool visible );
@@ -394,7 +398,7 @@ class KABCore : public QWidget, public KSyncInterface
394 void addressBookChanged(); 398 void addressBookChanged();
395 399
396 private: 400 private:
397 QCString mCStringMess; 401 Q3CString mCStringMess;
398 QByteArray mByteData; 402 QByteArray mByteData;
399 QString mEmailSourceChannel; 403 QString mEmailSourceChannel;
400 QString mEmailSourceUID; 404 QString mEmailSourceUID;
@@ -486,14 +490,14 @@ class KABCore : public QWidget, public KSyncInterface
486 490
487 KAction *mActionDeleteView; 491 KAction *mActionDeleteView;
488 492
489 QPopupMenu *viewMenu; 493 Q3PopupMenu *viewMenu;
490 QPopupMenu *filterMenu; 494 Q3PopupMenu *filterMenu;
491 QPopupMenu *settingsMenu; 495 Q3PopupMenu *settingsMenu;
492 QPopupMenu *changeMenu; 496 Q3PopupMenu *changeMenu;
493 QPopupMenu *beamMenu; 497 Q3PopupMenu *beamMenu;
494//US QAction *mActionSave; 498//US QAction *mActionSave;
495 QPopupMenu *ImportMenu; 499 Q3PopupMenu *ImportMenu;
496 QPopupMenu *ExportMenu; 500 Q3PopupMenu *ExportMenu;
497 //LR additional methods 501 //LR additional methods
498 KAction *mActionRemoveVoice; 502 KAction *mActionRemoveVoice;
499 KAction *mActionSetFormattedName; 503 KAction *mActionSetFormattedName;
@@ -524,7 +528,7 @@ class KABCore : public QWidget, public KSyncInterface
524 // LR ******************************* 528 // LR *******************************
525 // sync stuff! 529 // sync stuff!
526 QString sentSyncFile(); 530 QString sentSyncFile();
527 QPopupMenu *syncMenu; 531 Q3PopupMenu *syncMenu;
528 KSyncManager* syncManager; 532 KSyncManager* syncManager;
529 int mGlobalSyncMode; 533 int mGlobalSyncMode;
530 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); 534 bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode);
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 42d541b..6f9c995 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -25,7 +25,7 @@
25//#include <qstring.h> 25//#include <qstring.h>
26//#endif //KAB_EMBEDDED 26//#endif //KAB_EMBEDDED
27 27
28#include <qtextstream.h> 28#include <q3textstream.h>
29#include <qfile.h> 29#include <qfile.h>
30#include <qregexp.h> 30#include <qregexp.h>
31#include <stdlib.h> 31#include <stdlib.h>
@@ -91,7 +91,7 @@ KABPrefs::KABPrefs()
91 KPrefs::setCurrentGroup( "Views" ); 91 KPrefs::setCurrentGroup( "Views" );
92 QString defaultView = i18n( "Default Table View" ); 92 QString defaultView = i18n( "Default Table View" );
93 addItemString( "CurrentView", &mCurrentView, defaultView ); 93 addItemString( "CurrentView", &mCurrentView, defaultView );
94 addItemStringList( "ViewNames", &mViewNames, defaultView ); 94 addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) );
95 95
96 KPrefs::setCurrentGroup( "Filters" ); 96 KPrefs::setCurrentGroup( "Filters" );
97 addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); 97 addItemInt( "CurrentFilter", &mCurrentFilter, 0 );
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h
index ddbc0c0..aff725e 100644
--- a/kaddressbook/kabprefs.h
+++ b/kaddressbook/kabprefs.h
@@ -25,7 +25,9 @@
25#define KABPREFS_H 25#define KABPREFS_H
26 26
27#include <qstringlist.h> 27#include <qstringlist.h>
28#include <qdict.h> 28#include <q3dict.h>
29//Added by qt3to4:
30#include <Q3ValueList>
29 31
30#include <libkdepim/kpimprefs.h> 32#include <libkdepim/kpimprefs.h>
31 33
@@ -73,8 +75,8 @@ class KABPrefs : public KPimPrefs
73 bool mAutoSearchWithWildcard; 75 bool mAutoSearchWithWildcard;
74 bool mHideSearchOnSwitch; 76 bool mHideSearchOnSwitch;
75 bool mAskForDelete; 77 bool mAskForDelete;
76 QValueList<int> mExtensionsSplitter; 78 Q3ValueList<int> mExtensionsSplitter;
77 QValueList<int> mDetailsSplitter; 79 Q3ValueList<int> mDetailsSplitter;
78 80
79 // Extensions stuff 81 // Extensions stuff
80 int mCurrentExtension; 82 int mCurrentExtension;
diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro
index cd38e5f..4eb1f7f 100644
--- a/kaddressbook/kaddressbook.pro
+++ b/kaddressbook/kaddressbook.pro
@@ -13,28 +13,28 @@ unix : {
13 13
14staticlib: { 14staticlib: {
15 TARGET = kapi_linux 15 TARGET = kapi_linux
16LIBS += ../bin/libmicrokabc_qtopia.a 16LIBS += ../bin/libxmicrokabc_qtopia.a
17LIBS += ../bin/libmicrokabc_file.a 17LIBS += ../bin/libxmicrokabc_file.a
18LIBS += ../bin/libmicrokabc_dir.a 18LIBS += ../bin/libxmicrokabc_dir.a
19LIBS += ../bin/libmicrokdepim.a 19LIBS += ../bin/libxmicrokdepim.a
20LIBS += ../bin/libmicrokcal.a 20LIBS += ../bin/libxmicrokcal.a
21LIBS += ../bin/libmicrokabc.a 21LIBS += ../bin/libxmicrokabc.a
22LIBS += ../bin/libmicrokde.a 22LIBS += ../bin/libxmicrokde.a
23LIBS += ../bin/libmicrokabc_qtopia.a 23LIBS += ../bin/libxmicrokabc_qtopia.a
24LIBS += ../bin/libmicrokabc_file.a 24LIBS += ../bin/libxmicrokabc_file.a
25LIBS += ../bin/libmicrokabc_dir.a 25LIBS += ../bin/libxmicrokabc_dir.a
26LIBS += ../bin/libmicrokdepim.a 26LIBS += ../bin/libxmicrokdepim.a
27LIBS += ../bin/libmicrokcal.a 27LIBS += ../bin/libxmicrokcal.a
28LIBS += ../bin/libmicrokabc.a 28LIBS += ../bin/libxmicrokabc.a
29LIBS += ../bin/libmicrokde.a 29LIBS += ../bin/libxmicrokde.a
30LIBS += ../libical/lib/libical.a 30LIBS += ../libical/lib/libical.a
31LIBS += ../libical/lib/libicalss.a 31LIBS += ../libical/lib/libicalss.a
32 32
33} else { 33} else {
34LIBS += ../bin/libmicrokdepim.so 34LIBS += ../bin/libxmicrokdepim.so
35LIBS += ../bin/libmicrokde.so 35LIBS += ../bin/libxmicrokde.so
36LIBS += ../bin/libmicrokabc.so 36LIBS += ../bin/libxmicrokabc.so
37LIBS += ../bin/libmicrokcal.so 37LIBS += ../bin/libxmicrokcal.so
38#LIBS += -lldap 38#LIBS += -lldap
39} 39}
40OBJECTS_DIR = obj/unix 40OBJECTS_DIR = obj/unix
@@ -43,10 +43,10 @@ MOC_DIR = moc/unix
43win32: { 43win32: {
44RC_FILE = winicons.rc 44RC_FILE = winicons.rc
45DEFINES += _WIN32_ 45DEFINES += _WIN32_
46LIBS += ../bin/microkdepim.lib 46LIBS += ../bin/xmicrokdepim.lib
47LIBS += ../bin/microkcal.lib 47LIBS += ../bin/xmicrokcal.lib
48LIBS += ../bin/microkde.lib 48LIBS += ../bin/xmicrokde.lib
49LIBS += ../bin/microkabc.lib 49LIBS += ../bin/xmicrokabc.lib
50QMAKE_LINK += /NODEFAULTLIB:LIBC 50QMAKE_LINK += /NODEFAULTLIB:LIBC
51OBJECTS_DIR = obj/win 51OBJECTS_DIR = obj/win
52MOC_DIR = moc/win 52MOC_DIR = moc/win
@@ -204,3 +204,5 @@ xxport/sharpdtm_xxport.cpp \
204# calendarview.cpp \ 204# calendarview.cpp \
205# timespanview.cpp 205# timespanview.cpp
206 206
207#The following line was inserted by qt3to4
208QT += xml qt3support
diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro
index 64e3a4a..c4b2499 100644
--- a/kaddressbook/kaddressbookE.pro
+++ b/kaddressbook/kaddressbookE.pro
@@ -12,10 +12,10 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER
12#DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL 12#DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOKABC KORG_NOARCHIVE KORG_NOMAIL
13#DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER 13#DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
14#DEFINES += KORG_NOLVALTERNATION 14#DEFINES += KORG_NOLVALTERNATION
15LIBS += -lmicrokdepim 15LIBS += -lxmicrokdepim
16LIBS += -lmicrokde 16LIBS += -lxmicrokde
17LIBS += -lmicroqtcompat 17LIBS += -lmicroqtcompat
18LIBS += -lmicrokabc 18LIBS += -lxmicrokabc
19LIBS += -lqpe 19LIBS += -lqpe
20LIBS += -ljpeg 20LIBS += -ljpeg
21LIBS += $(QTOPIALIB) 21LIBS += $(QTOPIALIB)
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index c417226..b317974 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -25,8 +25,11 @@
25#include "kabprefs.h" 25#include "kabprefs.h"
26#include <kglobal.h> 26#include <kglobal.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtoolbar.h> 28#include <q3toolbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30//Added by qt3to4:
31#include <Q3CString>
32#include <QCloseEvent>
30#else //KAB_EMBEDDED 33#else //KAB_EMBEDDED
31#include <kedittoolbar.h> 34#include <kedittoolbar.h>
32#include <kkeydialog.h> 35#include <kkeydialog.h>
@@ -42,18 +45,18 @@
42#ifdef KAB_EMBEDDED 45#ifdef KAB_EMBEDDED
43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) 46KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" )
44#else //KAB_EMBEDDED 47#else //KAB_EMBEDDED
45//MOC_SKIP_BEGIN 48#ifndef Q_MOC_RUN
46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) 49KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
47//MOC_SKIP_END 50#endif
48#endif //KAB_EMBEDDED 51#endif //KAB_EMBEDDED
49{ 52{
50 setIcon(SmallIcon( "ka24" ) ); 53 setIcon(SmallIcon( "ka24" ) );
51#if 0 54#if 0
52 //US for embedded systems, create the toolbar before we initiate KABCore. 55 //US for embedded systems, create the toolbar before we initiate KABCore.
53 // KABCore will fill the toolbar with menues and icons 56 // KABCore will fill the toolbar with menues and icons
54 QMainWindow::ToolBarDock tbd; 57 Qt::ToolBarDock tbd;
55 tbd = Top; 58 tbd = Qt::DockTop;
56 iconToolBar = new QToolBar( this ); 59 iconToolBar = new Q3ToolBar( this );
57 addToolBar (iconToolBar , tbd ); 60 addToolBar (iconToolBar , tbd );
58 iconToolBar->setHorizontalStretchable(true); 61 iconToolBar->setHorizontalStretchable(true);
59//US iconToolBar->setWidth(300); 62//US iconToolBar->setWidth(300);
@@ -85,7 +88,7 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
85 setAutoSaveSettings(); 88 setAutoSaveSettings();
86 mCore->restoreSettings(); 89 mCore->restoreSettings();
87#ifndef DESKTOP_VERSION 90#ifndef DESKTOP_VERSION
88 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 91 QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), mCore, SLOT (receiveStart ( const Q3CString &, const QByteArray & )));
89#endif 92#endif
90} 93}
91 94
@@ -235,7 +238,6 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce )
235 ce->accept(); 238 ce->accept();
236} 239}
237 240
238#ifndef KAB_EMBEDDED 241#ifndef KAB_EMBEDDED_
239#include "kaddressbookmain.moc" 242#include "moc_kaddressbookmain.cpp"
240#endif //KAB_EMBEDDED 243#endif //KAB_EMBEDDED
241
diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h
index b6d9b4b..d3f5cc7 100644
--- a/kaddressbook/kaddressbookmain.h
+++ b/kaddressbook/kaddressbookmain.h
@@ -24,10 +24,12 @@
24#ifndef KADDRESSBOOKMAIN_H 24#ifndef KADDRESSBOOKMAIN_H
25#define KADDRESSBOOKMAIN_H 25#define KADDRESSBOOKMAIN_H
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28//Added by qt3to4:
29#include <QCloseEvent>
28 30
29#ifdef KAB_EMBEDDED 31#ifdef KAB_EMBEDDED
30class QToolBar; 32class Q3ToolBar;
31#include <qaction.h> 33#include <qaction.h>
32//#include <qmainwindow.h> 34//#include <qmainwindow.h>
33#include <kmainwindow.h> 35#include <kmainwindow.h>
@@ -52,9 +54,9 @@ class KConfig;
52#ifdef KAB_EMBEDDED 54#ifdef KAB_EMBEDDED
53class KAddressBookMain : public KMainWindow 55class KAddressBookMain : public KMainWindow
54#else //KAB_EMBEDDED 56#else //KAB_EMBEDDED
55//MOC_SKIP_BEGIN 57#ifndef Q_MOC_RUN
56class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface 58class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
57//MOC_SKIP_END 59#endif
58#endif //KAB_EMBEDDED 60#endif //KAB_EMBEDDED
59{ 61{
60 Q_OBJECT 62 Q_OBJECT
@@ -73,9 +75,9 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface
73 void showMinimized () ; 75 void showMinimized () ;
74 virtual void addEmail( QString addr ); 76 virtual void addEmail( QString addr );
75#ifndef KAB_EMBEDDED 77#ifndef KAB_EMBEDDED
76//MOC_SKIP_BEGIN 78#ifndef Q_MOC_RUN
77 virtual ASYNC showContactEditor( QString uid ); 79 virtual ASYNC showContactEditor( QString uid );
78//MOC_SKIP_END 80#endif
79#endif //KAB_EMBEDDED 81#endif //KAB_EMBEDDED
80 virtual void newContact(); 82 virtual void newContact();
81 virtual QString getNameByPhone( QString phone ); 83 virtual QString getNameByPhone( QString phone );
diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp
index 86898e2..4823b37 100644
--- a/kaddressbook/kaddressbookview.cpp
+++ b/kaddressbook/kaddressbookview.cpp
@@ -32,6 +32,8 @@
32 32
33#endif //KAB_EMBEDDED 33#endif //KAB_EMBEDDED
34#include <qlayout.h> 34#include <qlayout.h>
35//Added by qt3to4:
36#include <Q3VBoxLayout>
35 37
36#include <kabc/distributionlistdialog.h> 38#include <kabc/distributionlistdialog.h>
37#include <kabc/addressbook.h> 39#include <kabc/addressbook.h>
@@ -133,7 +135,7 @@ KABC::Addressee::List KAddressBookView::addressees()
133void KAddressBookView::initGUI() 135void KAddressBookView::initGUI()
134{ 136{
135 // Create the layout 137 // Create the layout
136 QVBoxLayout *layout = new QVBoxLayout( this ); 138 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
137 139
138 // Add the view widget 140 // Add the view widget
139 mViewWidget = new QWidget( this ); 141 mViewWidget = new QWidget( this );
@@ -183,6 +185,6 @@ ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab,
183 185
184 186
185 187
186#ifndef KAB_EMBEDDED 188#ifndef KAB_EMBEDDED_
187#include "kaddressbookview.moc" 189#include "moc_kaddressbookview.cpp"
188#endif //KAB_EMBEDDED 190#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h
index 3a3f71a..e423cd7 100644
--- a/kaddressbook/kaddressbookview.h
+++ b/kaddressbook/kaddressbookview.h
@@ -1,3 +1,5 @@
1//Added by qt3to4:
2#include <QDropEvent>
1/* 3/*
2 This file is part of KAddressBook. 4 This file is part of KAddressBook.
3 Copyright (c) 2002 Mike Pilone <mpilone@slac.com> 5 Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
@@ -40,7 +42,7 @@ class QDropEvent;
40#include "filter.h" 42#include "filter.h"
41 43
42#ifdef DESKTOP_VERSION 44#ifdef DESKTOP_VERSION
43#include <qpaintdevicemetrics.h> 45#include <q3paintdevicemetrics.h>
44#include <qprinter.h> 46#include <qprinter.h>
45#include <qpainter.h> 47#include <qpainter.h>
46#endif 48#endif
@@ -175,9 +177,9 @@ class KAddressBookView : public QWidget
175 is equal to QString::null, then all addressees should be selected. 177 is equal to QString::null, then all addressees should be selected.
176 */ 178 */
177#ifndef KAB_EMBEDDED 179#ifndef KAB_EMBEDDED
178//MOC_SKIP_BEGIN 180#ifndef Q_MOC_RUN
179 virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; 181 virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0;
180//MOC_SKIP_END 182#endif
181#else //KAB_EMBEDDED 183#else //KAB_EMBEDDED
182 //US my moc can not handle the default parameters. Is this a problem ??? 184 //US my moc can not handle the default parameters. Is this a problem ???
183 virtual void setSelected( QString uid, bool selected) = 0; 185 virtual void setSelected( QString uid, bool selected) = 0;
@@ -262,9 +264,9 @@ class KAddressBookView : public QWidget
262}; 264};
263 265
264#ifndef KAB_EMBEDDED 266#ifndef KAB_EMBEDDED
265//MOC_SKIP_BEGIN 267#ifndef Q_MOC_RUN
266class ViewFactory : public KLibFactory 268class ViewFactory : public KLibFactory
267//MOC_SKIP_END 269#endif
268#else //KAB_EMBEDDED 270#else //KAB_EMBEDDED
269class ViewFactory 271class ViewFactory
270#endif //KAB_EMBEDDED 272#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp
index 168d39e..8055085 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.cpp
+++ b/kaddressbook/kcmconfigs/addresseewidget.cpp
@@ -21,12 +21,16 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qgroupbox.h> 24#include <q3groupbox.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlistbox.h> 27#include <q3listbox.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#include <QDesktopWidget>
31//Added by qt3to4:
32#include <Q3GridLayout>
33#include <Q3HBoxLayout>
30 34
31#include <kbuttonbox.h> 35#include <kbuttonbox.h>
32#include <kcombobox.h> 36#include <kcombobox.h>
@@ -45,13 +49,13 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
45{ 49{
46 if (KGlobal::getOrientation() == KGlobal::Portrait) 50 if (KGlobal::getOrientation() == KGlobal::Portrait)
47 { 51 {
48 QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), 52 Q3GridLayout* layout = new Q3GridLayout( this, 1, 1, KDialog::marginHintSmall(),
49 KDialog::spacingHintSmall() ); 53 KDialog::spacingHintSmall() );
50 54
51 QLabel *label = new QLabel( i18n( title ), this ); 55 QLabel *label = new QLabel( i18n( title ), this );
52 layout->addWidget( label, 0, 1 ); 56 layout->addWidget( label, 0, 1 );
53 57
54 mBox = new QListBox( this ); 58 mBox = new Q3ListBox( this );
55 mBox->setMaximumSize(70, 70); 59 mBox->setMaximumSize(70, 70);
56 layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); 60 layout->addMultiCellWidget( mBox, 0, 1, 0, 0 );
57 61
@@ -70,13 +74,13 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
70 } 74 }
71 else 75 else
72 { 76 {
73 QHBoxLayout *layout = new QHBoxLayout( this ); 77 Q3HBoxLayout *layout = new Q3HBoxLayout( this );
74 78
75 QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); 79 Q3GroupBox *group = new Q3GroupBox( 0, Qt::Vertical, title, this );
76 QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, 80 Q3GridLayout *groupLayout = new Q3GridLayout( group->layout(), 2, 2,
77 KDialog::spacingHint() ); 81 KDialog::spacingHint() );
78 82
79 mBox = new QListBox( group ); 83 mBox = new Q3ListBox( group );
80 84
81 groupLayout->addWidget( mBox, 0, 0 ); 85 groupLayout->addWidget( mBox, 0, 0 );
82 86
@@ -97,8 +101,8 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent,
97 mRemoveButton->setEnabled( false ); 101 mRemoveButton->setEnabled( false );
98 102
99 103
100 connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ), 104 connect( mBox, SIGNAL( selectionChanged( Q3ListBoxItem* ) ),
101 SLOT( selectionChanged( QListBoxItem* ) ) ); 105 SLOT( selectionChanged( Q3ListBoxItem* ) ) );
102 connect( mEdit, SIGNAL( textChanged( const QString& ) ), 106 connect( mEdit, SIGNAL( textChanged( const QString& ) ),
103 SLOT( textChanged( const QString& ) ) ); 107 SLOT( textChanged( const QString& ) ) );
104 connect( mEdit, SIGNAL( returnPressed() ), SLOT( add() ) ); 108 connect( mEdit, SIGNAL( returnPressed() ), SLOT( add() ) );
@@ -143,7 +147,7 @@ void NamePartWidget::remove()
143 emit modified(); 147 emit modified();
144} 148}
145 149
146void NamePartWidget::selectionChanged( QListBoxItem *item ) 150void NamePartWidget::selectionChanged( Q3ListBoxItem *item )
147{ 151{
148 mRemoveButton->setEnabled( item != 0 ); 152 mRemoveButton->setEnabled( item != 0 );
149} 153}
@@ -157,7 +161,7 @@ void NamePartWidget::textChanged( const QString& text )
157AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) 161AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
158 : QWidget( parent, name ) 162 : QWidget( parent, name )
159{ 163{
160 QGridLayout *layout; 164 Q3GridLayout *layout;
161 165
162 mPrefix = new NamePartWidget( i18n( "Prefixes" ), this ); 166 mPrefix = new NamePartWidget( i18n( "Prefixes" ), this );
163 mInclusion = new NamePartWidget( i18n( "Inclusions" ), this ); 167 mInclusion = new NamePartWidget( i18n( "Inclusions" ), this );
@@ -178,7 +182,7 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
178 182
179 if (KGlobal::getOrientation() == KGlobal::Portrait) 183 if (KGlobal::getOrientation() == KGlobal::Portrait)
180 { 184 {
181 layout = new QGridLayout( this, 4, 2, KDialog::marginHintSmall(), 185 layout = new Q3GridLayout( this, 4, 2, KDialog::marginHintSmall(),
182 KDialog::spacingHintSmall() ); 186 KDialog::spacingHintSmall() );
183 187
184 layout->addMultiCellWidget( mPrefix, 0, 0, 0, 1 ); 188 layout->addMultiCellWidget( mPrefix, 0, 0, 0, 1 );
@@ -190,7 +194,7 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name )
190 } 194 }
191 else 195 else
192 { 196 {
193 layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), 197 layout = new Q3GridLayout( this, 2, 3, KDialog::marginHint(),
194 KDialog::spacingHint() ); 198 KDialog::spacingHint() );
195 199
196 layout->addWidget( mPrefix, 0, 0 ); 200 layout->addWidget( mPrefix, 0, 0 );
@@ -233,6 +237,6 @@ void AddresseeWidget::saveSettings()
233 config.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() ); 237 config.writeEntry( "FormattedNameType", mFormattedNameCombo->currentItem() );
234} 238}
235 239
236#ifndef KAB_EMBEDDED 240#ifndef KAB_EMBEDDED_
237#include "addresseewidget.moc" 241#include "moc_addresseewidget.cpp"
238#endif //KAB_EMBEDDED 242#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kcmconfigs/addresseewidget.h b/kaddressbook/kcmconfigs/addresseewidget.h
index 09330c8..f2a95a8 100644
--- a/kaddressbook/kcmconfigs/addresseewidget.h
+++ b/kaddressbook/kcmconfigs/addresseewidget.h
@@ -29,8 +29,8 @@
29class KComboBox; 29class KComboBox;
30class KLineEdit; 30class KLineEdit;
31 31
32class QListBox; 32class Q3ListBox;
33class QListBoxItem; 33class Q3ListBoxItem;
34class QPushButton; 34class QPushButton;
35 35
36class NamePartWidget : public QWidget 36class NamePartWidget : public QWidget
@@ -52,13 +52,13 @@ class NamePartWidget : public QWidget
52 void add(); 52 void add();
53 void remove(); 53 void remove();
54 54
55 void selectionChanged( QListBoxItem* ); 55 void selectionChanged( Q3ListBoxItem* );
56 void textChanged( const QString& ); 56 void textChanged( const QString& );
57 57
58 private: 58 private:
59 KLineEdit *mEdit; 59 KLineEdit *mEdit;
60 60
61 QListBox *mBox; 61 Q3ListBox *mBox;
62 QPushButton *mAddButton; 62 QPushButton *mAddButton;
63 QPushButton *mRemoveButton; 63 QPushButton *mRemoveButton;
64}; 64};
diff --git a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
index e87b000..33b66ad 100644
--- a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
+++ b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp
@@ -22,6 +22,9 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3GridLayout>
27#include <Q3Frame>
25 28
26#include <klocale.h> 29#include <klocale.h>
27 30
@@ -34,8 +37,8 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig
34 : KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent, 37 : KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent,
35 name, true, true ), mWidget( 0 ), mConfig( config ) 38 name, true, true ), mWidget( 0 ), mConfig( config )
36{ 39{
37 QFrame *page = plainPage(); 40 Q3Frame *page = plainPage();
38 QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() ); 41 Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHint(), spacingHint() );
39 42
40 mWidget = factory->configureWidget( page, "ExtensionConfigWidget" ); 43 mWidget = factory->configureWidget( page, "ExtensionConfigWidget" );
41 layout->addWidget( mWidget, 0, 0 ); 44 layout->addWidget( mWidget, 0, 0 );
@@ -54,6 +57,6 @@ void ExtensionConfigDialog::slotOk()
54 KDialogBase::slotOk(); 57 KDialogBase::slotOk();
55} 58}
56 59
57#ifndef KAB_EMBEDDED 60#ifndef KAB_EMBEDDED_
58#include "extensionconfigdialog.moc" 61#include "moc_extensionconfigdialog.cpp"
59#endif //KAB_EMBEDDED 62#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index 9e4db74..d2b7ef1 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -22,8 +22,8 @@
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qgroupbox.h> 26#include <q3groupbox.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qtabwidget.h> 29#include <qtabwidget.h>
@@ -31,7 +31,11 @@
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qlabel.h> 32#include <qlabel.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qvbox.h> 34#include <q3vbox.h>
35//Added by qt3to4:
36#include <Q3HBoxLayout>
37#include <Q3PtrList>
38#include <Q3VBoxLayout>
35 39
36#include <kconfig.h> 40#include <kconfig.h>
37#include <kdebug.h> 41#include <kdebug.h>
@@ -57,15 +61,15 @@
57#include "kabconfigwidget.h" 61#include "kabconfigwidget.h"
58#include <kglobalsettings.h> 62#include <kglobalsettings.h>
59 63
60class ExtensionItem : public QCheckListItem 64class ExtensionItem : public Q3CheckListItem
61{ 65{
62 public: 66 public:
63 67
64#ifndef KAB_EMBEDDED 68#ifndef KAB_EMBEDDED
65 ExtensionItem( QListView *parent, const QString &text ); 69 ExtensionItem( Q3ListView *parent, const QString &text );
66 void setService( const KService::Ptr &ptr ); 70 void setService( const KService::Ptr &ptr );
67#else //KAB_EMBEDDED 71#else //KAB_EMBEDDED
68 ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ); 72 ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment );
69 void setFactory( ExtensionFactory* fac ); 73 void setFactory( ExtensionFactory* fac );
70#endif //KAB_EMBEDDED 74#endif //KAB_EMBEDDED
71 75
@@ -90,7 +94,7 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
90 : KPrefsWidget( prefs, parent, name ) 94 : KPrefsWidget( prefs, parent, name )
91{ 95{
92 96
93 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 97 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
94 KDialog::spacingHintSmall() ); 98 KDialog::spacingHintSmall() );
95 99
96 QTabWidget *tabWidget = new QTabWidget( this ); 100 QTabWidget *tabWidget = new QTabWidget( this );
@@ -98,12 +102,12 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
98 102
99 // General page 103 // General page
100 QWidget *generalPage = new QWidget( this ); 104 QWidget *generalPage = new QWidget( this );
101 QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), 105 Q3VBoxLayout *layout = new Q3VBoxLayout( generalPage, KDialog::marginHintSmall(),
102 KDialog::spacingHintSmall() ); 106 KDialog::spacingHintSmall() );
103 107
104 108
105 QWidget *hBox = new QWidget( generalPage, "qhbox" ); 109 QWidget *hBox = new QWidget( generalPage, "qhbox" );
106 QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); 110 Q3HBoxLayout *hboxLayout = new Q3HBoxLayout( hBox);
107 KPrefsWidFont *detailsFont = 111 KPrefsWidFont *detailsFont =
108 addWidFont(i18n("phone:123"),i18n("Details view font"), 112 addWidFont(i18n("phone:123"),i18n("Details view font"),
109 &(KABPrefs::instance()->mDetailsFont),hBox); 113 &(KABPrefs::instance()->mDetailsFont),hBox);
@@ -117,7 +121,7 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
117 121
118 //general groupbox 122 //general groupbox
119 QWidget *vBox = new QWidget( generalPage, "qvbox" ); 123 QWidget *vBox = new QWidget( generalPage, "qvbox" );
120 QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); 124 Q3VBoxLayout *boxLayout = new Q3VBoxLayout( vBox );
121 boxLayout->setAlignment( Qt::AlignTop ); 125 boxLayout->setAlignment( Qt::AlignTop );
122 boxLayout->setMargin(KDialog::marginHintSmall() ); 126 boxLayout->setMargin(KDialog::marginHintSmall() );
123 boxLayout->setSpacing( KDialog::spacingHintSmall() ); 127 boxLayout->setSpacing( KDialog::spacingHintSmall() );
@@ -154,13 +158,13 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
154 158
155 // Extension page 159 // Extension page
156 QWidget *extensionPage = new QWidget( this ); 160 QWidget *extensionPage = new QWidget( this );
157 QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), 161 Q3VBoxLayout *extensionLayout = new Q3VBoxLayout( extensionPage, KDialog::marginHintSmall(),
158 KDialog::spacingHintSmall() ); 162 KDialog::spacingHintSmall() );
159 163
160 //extensions groupbox 164 //extensions groupbox
161 165
162 QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); 166 Q3GroupBox* groupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage );
163 boxLayout = new QVBoxLayout( groupBox->layout() ); 167 boxLayout = new Q3VBoxLayout( groupBox->layout() );
164 boxLayout->setAlignment( Qt::AlignTop ); 168 boxLayout->setAlignment( Qt::AlignTop );
165 boxLayout->setMargin(KDialog::marginHintSmall()); 169 boxLayout->setMargin(KDialog::marginHintSmall());
166 boxLayout->setSpacing(KDialog::spacingHintSmall()); 170 boxLayout->setSpacing(KDialog::spacingHintSmall());
@@ -189,10 +193,10 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *
189 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 193 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
190 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 194 connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
191 connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 195 connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
192 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), 196 connect( mExtensionView, SIGNAL( selectionChanged( Q3ListViewItem* ) ),
193 SLOT( selectionChanged( QListViewItem* ) ) ); 197 SLOT( selectionChanged( Q3ListViewItem* ) ) );
194 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), 198 connect( mExtensionView, SIGNAL( clicked( Q3ListViewItem* ) ),
195 SLOT( itemClicked( QListViewItem* ) ) ); 199 SLOT( itemClicked( Q3ListViewItem* ) ) );
196 connect( mConfigureButton, SIGNAL( clicked() ), 200 connect( mConfigureButton, SIGNAL( clicked() ),
197 SLOT( configureExtension() ) ); 201 SLOT( configureExtension() ) );
198 202
@@ -295,8 +299,8 @@ void KABConfigWidget::saveExtensionSettings()
295{ 299{
296 QStringList activeExtensions; 300 QStringList activeExtensions;
297 301
298 QPtrList<QListViewItem> list; 302 Q3PtrList<Q3ListViewItem> list;
299 QListViewItemIterator it( mExtensionView ); 303 Q3ListViewItemIterator it( mExtensionView );
300 while ( it.current() ) { 304 while ( it.current() ) {
301 ExtensionItem *item = static_cast<ExtensionItem*>( it.current() ); 305 ExtensionItem *item = static_cast<ExtensionItem*>( it.current() );
302 if ( item ) { 306 if ( item ) {
@@ -328,7 +332,7 @@ void KABConfigWidget::configureExtension()
328 config.sync(); 332 config.sync();
329} 333}
330 334
331void KABConfigWidget::selectionChanged( QListViewItem *i ) 335void KABConfigWidget::selectionChanged( Q3ListViewItem *i )
332{ 336{
333 ExtensionItem *item = static_cast<ExtensionItem*>( i ); 337 ExtensionItem *item = static_cast<ExtensionItem*>( i );
334 if ( !item ) 338 if ( !item )
@@ -337,15 +341,15 @@ void KABConfigWidget::selectionChanged( QListViewItem *i )
337 mConfigureButton->setEnabled( item->configWidgetAvailable() ); 341 mConfigureButton->setEnabled( item->configWidgetAvailable() );
338} 342}
339 343
340void KABConfigWidget::itemClicked( QListViewItem *item ) 344void KABConfigWidget::itemClicked( Q3ListViewItem *item )
341{ 345{
342 if ( item != 0 ) 346 if ( item != 0 )
343 modified(); 347 modified();
344} 348}
345 349
346#ifndef KAB_EMBEDDED 350#ifndef KAB_EMBEDDED
347ExtensionItem::ExtensionItem( QListView *parent, const QString &text ) 351ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text )
348 : QCheckListItem( parent, text, CheckBox ) 352 : Q3CheckListItem( parent, text, CheckBox )
349{ 353{
350} 354}
351 355
@@ -354,8 +358,8 @@ void ExtensionItem::setService( const KService::Ptr &ptr )
354 mPtr = ptr; 358 mPtr = ptr;
355} 359}
356#else //KAB_EMBEDDED 360#else //KAB_EMBEDDED
357ExtensionItem::ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ) 361ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment )
358 : QCheckListItem( parent, text, CheckBox ) 362 : Q3CheckListItem( parent, text, CheckBox )
359{ 363{
360 mName = name; 364 mName = name;
361 mComment = comment; 365 mComment = comment;
@@ -418,7 +422,6 @@ QString ExtensionItem::text( int column ) const
418#endif //KAB_EMBEDDED 422#endif //KAB_EMBEDDED
419} 423}
420 424
421#ifndef KAB_EMBEDDED 425#ifndef KAB_EMBEDDED_
422#include "kabconfigwidget.moc" 426#include "moc_kabconfigwidget.cpp"
423#endif //KAB_EMBEDDED 427#endif //KAB_EMBEDDED
424
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h
index f2a6b1b..4b6e58c 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.h
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.h
@@ -27,7 +27,7 @@
27#include <kprefswidget.h> 27#include <kprefswidget.h>
28 28
29class QCheckBox; 29class QCheckBox;
30class QListViewItem; 30class Q3ListViewItem;
31class QPushButton; 31class QPushButton;
32class QComboBox; 32class QComboBox;
33class QLineEdit; 33class QLineEdit;
@@ -53,8 +53,8 @@ class KABConfigWidget : public KPrefsWidget
53 53
54 private slots: 54 private slots:
55 void configureExtension(); 55 void configureExtension();
56 void selectionChanged( QListViewItem* ); 56 void selectionChanged( Q3ListViewItem* );
57 void itemClicked( QListViewItem* ); 57 void itemClicked( Q3ListViewItem* );
58 58
59 private: 59 private:
60 void restoreExtensionSettings(); 60 void restoreExtensionSettings();
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp
index cbfedbd..55ffcd8 100644
--- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp
+++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp
@@ -22,6 +22,8 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3VBoxLayout>
25 27
26#ifndef KAB_EMBEDDED 28#ifndef KAB_EMBEDDED
27#include <kaboutdata.h> 29#include <kaboutdata.h>
@@ -48,7 +50,7 @@ KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name )
48 : KCModule( KABPrefs::instance(), parent, name ) 50 : KCModule( KABPrefs::instance(), parent, name )
49{ 51{
50 //abort(); 52 //abort();
51 QVBoxLayout *layout = new QVBoxLayout( this ); 53 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
52 mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); 54 mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" );
53 layout->addWidget( mConfigWidget ); 55 layout->addWidget( mConfigWidget );
54 layout->setSpacing( 0 ); 56 layout->setSpacing( 0 );
@@ -87,6 +89,6 @@ const KAboutData* KCMKabConfig::aboutData() const
87} 89}
88#endif //KAB_EMBEDDED 90#endif //KAB_EMBEDDED
89 91
90#ifndef KAB_EMBEDDED 92#ifndef KAB_EMBEDDED_
91#include "kcmkabconfig.moc" 93#include "moc_kcmkabconfig.cpp"
92#endif //KAB_EMBEDDED 94#endif //KAB_EMBEDDED
diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp
index c117d34..8ebee19 100644
--- a/kaddressbook/keywidget.cpp
+++ b/kaddressbook/keywidget.cpp
@@ -28,6 +28,8 @@
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31//Added by qt3to4:
32#include <Q3GridLayout>
31 33
32#ifndef KAB_EMBEDDED 34#ifndef KAB_EMBEDDED
33#include <kaccelmanager.h> 35#include <kaccelmanager.h>
@@ -36,7 +38,7 @@
36#else //KAB_EMBEDDED 38#else //KAB_EMBEDDED
37#include <qmap.h> 39#include <qmap.h>
38#include <qmessagebox.h> 40#include <qmessagebox.h>
39#include <qtextstream.h> 41#include <q3textstream.h>
40#include <kurl.h> 42#include <kurl.h>
41#endif //KAB_EMBEDDED 43#endif //KAB_EMBEDDED
42 44
@@ -52,7 +54,7 @@
52KeyWidget::KeyWidget( QWidget *parent, const char *name ) 54KeyWidget::KeyWidget( QWidget *parent, const char *name )
53 : QWidget( parent, name ) 55 : QWidget( parent, name )
54{ 56{
55 QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), 57 Q3GridLayout *layout = new Q3GridLayout( this, 2, 2, KDialog::marginHint(),
56 KDialog::spacingHint() ); 58 KDialog::spacingHint() );
57 59
58 QLabel *label = new QLabel( i18n( "Keys:" ), this ); 60 QLabel *label = new QLabel( i18n( "Keys:" ), this );
@@ -136,7 +138,7 @@ void KeyWidget::addKey()
136 QString tmpFile; 138 QString tmpFile;
137 if ( KIO::NetAccess::download( url, tmpFile ) ) { 139 if ( KIO::NetAccess::download( url, tmpFile ) ) {
138 QFile file( tmpFile ); 140 QFile file( tmpFile );
139 if ( !file.open( IO_ReadOnly ) ) { 141 if ( !file.open( QIODevice::ReadOnly ) ) {
140 QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); 142 QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
141 KMessageBox::error( this, text.arg( url.url() ) ); 143 KMessageBox::error( this, text.arg( url.url() ) );
142 return; 144 return;
@@ -152,7 +154,7 @@ void KeyWidget::addKey()
152 154
153 { 155 {
154 QFile file( keyfile ); 156 QFile file( keyfile );
155 if ( !file.open( IO_ReadOnly ) ) { 157 if ( !file.open( QIODevice::ReadOnly ) ) {
156 QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); 158 QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
157 QString caption( i18n( "Error" ) ); 159 QString caption( i18n( "Error" ) );
158 QMessageBox::critical( this, caption, text.arg( keyfile ) ); 160 QMessageBox::critical( this, caption, text.arg( keyfile ) );
@@ -163,10 +165,10 @@ void KeyWidget::addKey()
163 165
164 166
165 167
166 QTextStream s( &file ); 168 Q3TextStream s( &file );
167 QString data; 169 QString data;
168 170
169 s.setEncoding( QTextStream::UnicodeUTF8 ); 171 s.setEncoding( Q3TextStream::UnicodeUTF8 );
170 s >> data; 172 s >> data;
171 file.close(); 173 file.close();
172 174
@@ -221,8 +223,8 @@ void KeyWidget::exportKey()
221 KURL url = KFileDialog::getSaveURL(); 223 KURL url = KFileDialog::getSaveURL();
222 224
223 KTempFile tempFile; 225 KTempFile tempFile;
224 QTextStream *s = tempFile.textStream(); 226 Q3TextStream *s = tempFile.textStream();
225 s->setEncoding( QTextStream::UnicodeUTF8 ); 227 s->setEncoding( Q3TextStream::UnicodeUTF8 );
226 (*s) << key.textData(); 228 (*s) << key.textData();
227 tempFile.close(); 229 tempFile.close();
228 230
@@ -235,15 +237,15 @@ void KeyWidget::exportKey()
235 return; 237 return;
236 238
237 QFile file( keyfile ); 239 QFile file( keyfile );
238 if ( !file.open( IO_ReadWrite ) ) { 240 if ( !file.open( QIODevice::ReadWrite ) ) {
239 QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); 241 QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) );
240 QString caption( i18n( "Error" ) ); 242 QString caption( i18n( "Error" ) );
241 QMessageBox::critical( this, caption, text.arg( keyfile ) ); 243 QMessageBox::critical( this, caption, text.arg( keyfile ) );
242 return; 244 return;
243 } 245 }
244 246
245 QTextStream s( &file ); 247 Q3TextStream s( &file );
246 s.setEncoding( QTextStream::UnicodeUTF8 ); 248 s.setEncoding( Q3TextStream::UnicodeUTF8 );
247 s << key.textData(); 249 s << key.textData();
248 file.close(); 250 file.close();
249 251
@@ -272,6 +274,6 @@ void KeyWidget::updateKeyCombo()
272 mExportButton->setEnabled( state ); 274 mExportButton->setEnabled( state );
273} 275}
274 276
275#ifndef KAB_EMBEDDED 277#ifndef KAB_EMBEDDED_
276#include "keywidget.moc" 278#include "moc_keywidget.cpp"
277#endif //KAB_EMBEDDED 279#endif //KAB_EMBEDDED
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp
index 2f3531d..e373105 100644
--- a/kaddressbook/mainembedded.cpp
+++ b/kaddressbook/mainembedded.cpp
@@ -5,8 +5,7 @@
5#else 5#else
6#include <qapplication.h> 6#include <qapplication.h>
7#include <qwindowsstyle.h> 7#include <qwindowsstyle.h>
8#include <qplatinumstyle.h> 8#include <q3mainwindow.h>
9#include <qmainwindow.h>
10#include <qmessagebox.h> 9#include <qmessagebox.h>
11#include <stdlib.h> 10#include <stdlib.h>
12#endif 11#endif
@@ -24,12 +23,12 @@
24void dumpMissing(); 23void dumpMissing();
25int main( int argc, char **argv ) 24int main( int argc, char **argv )
26{ 25{
26 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
27#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 28 QPEApplication a( argc, argv );
29 a.setKeepRunning (); 29 a.setKeepRunning ();
30#else 30#else
31 QApplication a( argc, argv ); 31 QApplication a( argc, argv );
32 QApplication::setStyle( new QPlatinumStyle ());
33#ifdef _WIN32_ 32#ifdef _WIN32_
34 QString hdir ( getenv( "HOME") ); 33 QString hdir ( getenv( "HOME") );
35 if ( hdir.isEmpty() ) { 34 if ( hdir.isEmpty() ) {
diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp
index 199f3d6..96822d8 100644
--- a/kaddressbook/nameeditdialog.cpp
+++ b/kaddressbook/nameeditdialog.cpp
@@ -23,12 +23,14 @@
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qlistbox.h> 26#include <q3listbox.h>
27#include <qlistview.h> 27#include <q3listview.h>
28#include <qtooltip.h> 28#include <qtooltip.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qcheckbox.h> 30#include <qcheckbox.h>
31#include <qstring.h> 31#include <qstring.h>
32//Added by qt3to4:
33#include <Q3GridLayout>
32 34
33#ifndef KAB_EMBEDDED 35#ifndef KAB_EMBEDDED
34#include <kaccelmanager.h> 36#include <kaccelmanager.h>
@@ -57,7 +59,7 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type,
57{ 59{
58 60
59 QWidget *page = plainPage(); 61 QWidget *page = plainPage();
60 QGridLayout *layout = new QGridLayout( page, 5, 3 ); 62 Q3GridLayout *layout = new Q3GridLayout( page, 5, 3 );
61 layout->setSpacing( spacingHint() ); 63 layout->setSpacing( spacingHint() );
62 layout->addColSpacing( 2, 100 ); 64 layout->addColSpacing( 2, 100 );
63 QLabel *label; 65 QLabel *label;
@@ -295,6 +297,6 @@ qDebug("NameEditDialog::slotHelp Help is not supported yet");
295#endif //KAB_EMBEDDED 297#endif //KAB_EMBEDDED
296} 298}
297 299
298#ifndef KAB_EMBEDDED 300#ifndef KAB_EMBEDDED_
299#include "nameeditdialog.moc" 301#include "moc_nameeditdialog.cpp"
300#endif //KAB_EMBEDDED 302#endif //KAB_EMBEDDED
diff --git a/kaddressbook/old_mainwindow.cpp b/kaddressbook/old_mainwindow.cpp
index 0e886d9..7a445c7 100644
--- a/kaddressbook/old_mainwindow.cpp
+++ b/kaddressbook/old_mainwindow.cpp
@@ -316,13 +316,13 @@ void MainWindow::initActions()
316 iconToolBar->clear(); 316 iconToolBar->clear();
317 KABPrefs *p = KABPrefs::instance(); 317 KABPrefs *p = KABPrefs::instance();
318 QPEMenuBar *menuBar1 = new QPEMenuBar( iconToolBar ); 318 QPEMenuBar *menuBar1 = new QPEMenuBar( iconToolBar );
319 QPopupMenu *menuBar = new QPopupMenu( this ); 319 Q3PopupMenu *menuBar = new Q3PopupMenu( this );
320 menuBar1->insertItem( "ME", menuBar); 320 menuBar1->insertItem( "ME", menuBar);
321 QPopupMenu *fileMenu = new QPopupMenu( this ); 321 Q3PopupMenu *fileMenu = new Q3PopupMenu( this );
322 QPopupMenu *editMenu = new QPopupMenu( this ); 322 Q3PopupMenu *editMenu = new Q3PopupMenu( this );
323 QPopupMenu *viewMenu = new QPopupMenu( this ); 323 Q3PopupMenu *viewMenu = new Q3PopupMenu( this );
324 QPopupMenu *settingsMenu = new QPopupMenu( this ); 324 Q3PopupMenu *settingsMenu = new Q3PopupMenu( this );
325 QPopupMenu *importMenu = new QPopupMenu( this ); 325 Q3PopupMenu *importMenu = new Q3PopupMenu( this );
326 326
327 menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); 327 menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
328 328
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index df3b551..3661677 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -27,13 +27,19 @@
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qstring.h> 29#include <qstring.h>
30#include <qlistbox.h> 30#include <q3listbox.h>
31#include <qlistview.h> 31#include <q3listview.h>
32#include <qbuttongroup.h> 32#include <q3buttongroup.h>
33#include <qhbox.h> 33#include <q3hbox.h>
34#include <qcursor.h> 34#include <qcursor.h>
35#include <qtimer.h> 35#include <qtimer.h>
36#include <qapplication.h> 36#include <qapplication.h>
37//Added by qt3to4:
38#include <Q3ValueList>
39#include <Q3GridLayout>
40#include <Q3Frame>
41#include <Q3PopupMenu>
42#include <Q3VBoxLayout>
37 43
38#include <kbuttonbox.h> 44#include <kbuttonbox.h>
39#include <klistview.h> 45#include <klistview.h>
@@ -57,7 +63,7 @@
57PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) 63PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
58 : QWidget(parent,name) 64 : QWidget(parent,name)
59{ 65{
60 QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); 66 Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 );
61 67
62 QLabel *temp = new QLabel( "", this ); 68 QLabel *temp = new QLabel( "", this );
63 temp->setAlignment( Qt::AlignCenter ); 69 temp->setAlignment( Qt::AlignCenter );
@@ -67,14 +73,14 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
67 addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() ); 73 addBut->setMaximumSize( addBut->sizeHint().height(),addBut->sizeHint().height() );
68 connect(addBut,SIGNAL(clicked ()),SLOT(addNumber())); 74 connect(addBut,SIGNAL(clicked ()),SLOT(addNumber()));
69 75
70 sv = new QScrollView( this ); 76 sv = new Q3ScrollView( this );
71 sv->setFrameStyle ( QFrame::Plain ); 77 sv->setFrameStyle ( Q3Frame::Plain );
72 sv->setLineWidth ( 0 ); 78 sv->setLineWidth ( 0 );
73 sv->setMidLineWidth ( 0 ); 79 sv->setMidLineWidth ( 0 );
74 mw = new QWidget ( sv->viewport() ); 80 mw = new QWidget ( sv->viewport() );
75 sv->addChild(mw); 81 sv->addChild(mw);
76 sv->setResizePolicy( QScrollView::AutoOneFit ); 82 sv->setResizePolicy( Q3ScrollView::AutoOneFit );
77 mainLayout = new QVBoxLayout ( mw ); 83 mainLayout = new Q3VBoxLayout ( mw );
78 mainLayout->setMargin( 0 ); 84 mainLayout->setMargin( 0 );
79 mainLayout->setSpacing( 0 ); 85 mainLayout->setSpacing( 0 );
80 gridLayout->setMargin( 2 ); 86 gridLayout->setMargin( 2 );
@@ -90,7 +96,7 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
90 } 96 }
91 setDefaults(); 97 setDefaults();
92 mTypeNumberEditList.setAutoDelete( true ); 98 mTypeNumberEditList.setAutoDelete( true );
93 mPopup = new QPopupMenu( this ); 99 mPopup = new Q3PopupMenu( this );
94 QStringList list = PhoneNumber::supportedTypeListNames(); 100 QStringList list = PhoneNumber::supportedTypeListNames();
95 mPopupCount = list.count(); 101 mPopupCount = list.count();
96 int i = 0; 102 int i = 0;
@@ -226,7 +232,7 @@ KABC::PhoneNumber::List PhoneEditWidget::phoneNumbers()
226PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) 232PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
227 : QWidget( parent, name ) 233 : QWidget( parent, name )
228{ 234{
229 QGridLayout *layout = new QGridLayout( this, 4, 1 ); 235 Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 );
230//US layout->setSpacing( KDialog::spacingHint() ); 236//US layout->setSpacing( KDialog::spacingHint() );
231 layout->setSpacing( KDialogBase::spacingHintSmall() ); 237 layout->setSpacing( KDialogBase::spacingHintSmall() );
232 238
@@ -236,7 +242,7 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
236//US loadIcon call is ambiguous. Add one more parameter 242//US loadIcon call is ambiguous. Add one more parameter
237//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) ); 243//US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) );
238 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); 244 label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) );
239 label->setAlignment( AlignCenter ); 245 label->setAlignment( Qt::AlignCenter );
240//US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); 246//US layout->addMultiCellWidget( label, 0, 1, 3, 3 );
241 layout->addWidget( label, 0, 0 ); 247 layout->addWidget( label, 0, 0 );
242 248
@@ -327,7 +333,7 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
327 // Insert types for existing numbers. 333 // Insert types for existing numbers.
328 mPrefCombo->insertTypeList( list ); 334 mPrefCombo->insertTypeList( list );
329 335
330 QValueList<int> defaultTypes; 336 Q3ValueList<int> defaultTypes;
331 defaultTypes << KABC::PhoneNumber::Home; 337 defaultTypes << KABC::PhoneNumber::Home;
332 defaultTypes << KABC::PhoneNumber::Work; 338 defaultTypes << KABC::PhoneNumber::Work;
333 defaultTypes << KABC::PhoneNumber::Cell; 339 defaultTypes << KABC::PhoneNumber::Cell;
@@ -337,7 +343,7 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list )
337 // Insert default types. 343 // Insert default types.
338 // Doing this for mPrefCombo is enough because the list is shared by all 344 // Doing this for mPrefCombo is enough because the list is shared by all
339 // combos. 345 // combos.
340 QValueList<int>::ConstIterator it; 346 Q3ValueList<int>::ConstIterator it;
341 for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { 347 for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) {
342 if ( !mPrefCombo->hasType( *it ) ) 348 if ( !mPrefCombo->hasType( *it ) )
343 mPrefCombo->insertType( list, *it, PhoneNumber( "", *it ) ); 349 mPrefCombo->insertType( list, *it, PhoneNumber( "", *it ) );
@@ -487,10 +493,10 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot
487/////////////////////////////////////////// 493///////////////////////////////////////////
488// PhoneEditDialog 494// PhoneEditDialog
489 495
490class PhoneViewItem : public QListViewItem 496class PhoneViewItem : public Q3ListViewItem
491{ 497{
492public: 498public:
493 PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ); 499 PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number );
494 500
495 void setPhoneNumber( const KABC::PhoneNumber &number ) 501 void setPhoneNumber( const KABC::PhoneNumber &number )
496 { 502 {
@@ -511,8 +517,8 @@ private:
511 KABC::PhoneNumber mPhoneNumber; 517 KABC::PhoneNumber mPhoneNumber;
512}; 518};
513 519
514PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ) 520PhoneViewItem::PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number )
515 : QListViewItem( parent ), mPhoneNumber( number ) 521 : Q3ListViewItem( parent ), mPhoneNumber( number )
516{ 522{
517#ifdef DESKTOP_VERSION 523#ifdef DESKTOP_VERSION
518 setRenameEnabled ( 0, true ); 524 setRenameEnabled ( 0, true );
@@ -544,7 +550,7 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
544 550
545 QWidget *page = plainPage(); 551 QWidget *page = plainPage();
546 552
547 QGridLayout *layout = new QGridLayout( page, 1, 2 ); 553 Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 );
548 layout->setSpacing( spacingHint() ); 554 layout->setSpacing( spacingHint() );
549 555
550 mListView = new KListView( page ); 556 mListView = new KListView( page );
@@ -552,7 +558,7 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
552 mListView->addColumn( i18n( "Number" ) ); 558 mListView->addColumn( i18n( "Number" ) );
553 mListView->addColumn( i18n( "Type" ) ); 559 mListView->addColumn( i18n( "Type" ) );
554 560
555 KButtonBox *buttonBox = new KButtonBox( page, Vertical ); 561 KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical );
556 562
557 buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) ); 563 buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) );
558 mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( slotEditPhoneNumber() ) ); 564 mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( slotEditPhoneNumber() ) );
@@ -565,7 +571,7 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget *
565 layout->addWidget( buttonBox, 0, 1 ); 571 layout->addWidget( buttonBox, 0, 1 );
566 572
567 connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) ); 573 connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) );
568 connect( mListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); 574 connect( mListView, SIGNAL(doubleClicked( Q3ListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber()));
569 575
570 KABC::PhoneNumber::List::Iterator it; 576 KABC::PhoneNumber::List::Iterator it;
571 for ( it = mPhoneNumberList.begin(); it != mPhoneNumberList.end(); ++it ) 577 for ( it = mPhoneNumberList.begin(); it != mPhoneNumberList.end(); ++it )
@@ -588,7 +594,7 @@ void PhoneEditDialog::slotAddPhoneNumber()
588 PhoneTypeDialog dlg( tmp, this ); 594 PhoneTypeDialog dlg( tmp, this );
589 595
590 if ( dlg.exec() ) { 596 if ( dlg.exec() ) {
591 QListViewItem* i = mListView->firstChild(); 597 Q3ListViewItem* i = mListView->firstChild();
592 KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); 598 KABC::PhoneNumber phoneNumber = dlg.phoneNumber();
593 bool insert = true; 599 bool insert = true;
594 while ( i ) { 600 while ( i ) {
@@ -620,7 +626,7 @@ void PhoneEditDialog::slotRemovePhoneNumber()
620 return; 626 return;
621 627
622 mPhoneNumberList.remove( item->phoneNumber() ); 628 mPhoneNumberList.remove( item->phoneNumber() );
623 QListViewItem *currItem = mListView->currentItem(); 629 Q3ListViewItem *currItem = mListView->currentItem();
624 mListView->takeItem( currItem ); 630 mListView->takeItem( currItem );
625 delete currItem; 631 delete currItem;
626 632
@@ -673,7 +679,7 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
673{ 679{
674 QWidget *page = plainPage(); 680 QWidget *page = plainPage();
675 QLabel *label = 0; 681 QLabel *label = 0;
676 QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); 682 Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() );
677 683
678 label = new QLabel( i18n( "Number:" ), page ); 684 label = new QLabel( i18n( "Number:" ), page );
679 layout->addWidget( label, 0, 0 ); 685 layout->addWidget( label, 0, 0 );
@@ -683,7 +689,7 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber,
683 mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page ); 689 mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page );
684 layout->addMultiCellWidget( mPreferredBox, 1, 1, 0, 1 ); 690 layout->addMultiCellWidget( mPreferredBox, 1, 1, 0, 1 );
685 691
686 mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); 692 mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page );
687 layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); 693 layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 );
688 694
689 // fill widgets 695 // fill widgets
@@ -726,6 +732,6 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber()
726 return mPhoneNumber; 732 return mPhoneNumber;
727} 733}
728#endif 734#endif
729#ifndef KAB_EMBEDDED 735#ifndef KAB_EMBEDDED_
730#include "phoneeditwidget.moc" 736#include "moc_phoneeditwidget.cpp"
731#endif //KAB_EMBEDDED 737#endif //KAB_EMBEDDED
diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h
index 5bb4226..2be3e2b 100644
--- a/kaddressbook/phoneeditwidget.h
+++ b/kaddressbook/phoneeditwidget.h
@@ -27,16 +27,20 @@
27#include <kiconloader.h> 27#include <kiconloader.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qpopupmenu.h> 30#include <q3popupmenu.h>
31#include <qapplication.h> 31#include <qapplication.h>
32#include <QDesktopWidget>
32 33
33#include <qptrlist.h> 34#include <q3ptrlist.h>
34#include <qscrollview.h> 35#include <q3scrollview.h>
36//Added by qt3to4:
37#include <Q3HBoxLayout>
38#include <Q3VBoxLayout>
35 39
36#include "addresseeconfig.h" 40#include "addresseeconfig.h"
37#include "typecombo.h" 41#include "typecombo.h"
38 42
39class QButtonGroup; 43class Q3ButtonGroup;
40class QCheckBox; 44class QCheckBox;
41class PhoneTypeNumberEdit; 45class PhoneTypeNumberEdit;
42 46
@@ -76,15 +80,15 @@ class PhoneEditWidget : public QWidget
76 protected: 80 protected:
77 81
78 private: 82 private:
79 QScrollView* sv; 83 Q3ScrollView* sv;
80 QPopupMenu *mPopup; 84 Q3PopupMenu *mPopup;
81 int mPopupCount; 85 int mPopupCount;
82 PhoneTypeNumberEdit* mPendingDelete; 86 PhoneTypeNumberEdit* mPendingDelete;
83 void setDefaults(); 87 void setDefaults();
84 PhoneTypeNumberEdit* appendEditCombo(); 88 PhoneTypeNumberEdit* appendEditCombo();
85 QWidget* mw; 89 QWidget* mw;
86 QVBoxLayout* mainLayout; 90 Q3VBoxLayout* mainLayout;
87 QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList; 91 Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList;
88 92
89}; 93};
90 94
@@ -95,14 +99,14 @@ class PhoneTypeNumberEdit : public QWidget
95public: 99public:
96 PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent ) 100 PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent )
97 { 101 {
98 QHBoxLayout * lay = new QHBoxLayout( this ); 102 Q3HBoxLayout * lay = new Q3HBoxLayout( this );
99 lay->setSpacing( 2 ); 103 lay->setSpacing( 2 );
100 lay->setMargin( 0 ); 104 lay->setMargin( 0 );
101 mMinusButton = new QPushButton ( this ); 105 mMinusButton = new QPushButton ( this );
102 mMinusButton->setPixmap ( SmallIcon("minus")); 106 mMinusButton->setPixmap ( SmallIcon("minus"));
103 mCombo = new KComboBox( this ); 107 mCombo = new KComboBox( this );
104 if ( QApplication::desktop()->width() <= 640 ) 108 if ( QApplication::desktop()->width() <= 640 )
105 mCombo->setSizeLimit ( 6 ); 109 mCombo->setMaxVisibleItems ( 6 );
106 mNumber = new KLineEdit( this ); 110 mNumber = new KLineEdit( this );
107 mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6); 111 mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6);
108 lay->addWidget( mMinusButton ); 112 lay->addWidget( mMinusButton );
diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp
index 4a2acc8..1c237c0 100644
--- a/kaddressbook/secrecywidget.cpp
+++ b/kaddressbook/secrecywidget.cpp
@@ -22,6 +22,8 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3VBoxLayout>
25 27
26#include <kabc/secrecy.h> 28#include <kabc/secrecy.h>
27#include <kcombobox.h> 29#include <kcombobox.h>
@@ -32,7 +34,7 @@
32SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) 34SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name )
33 : QWidget( parent, name ) 35 : QWidget( parent, name )
34{ 36{
35 QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), 37 Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(),
36 KDialog::spacingHint() ); 38 KDialog::spacingHint() );
37 mSecrecyCombo = new KComboBox( this ); 39 mSecrecyCombo = new KComboBox( this );
38 layout->addWidget( mSecrecyCombo ); 40 layout->addWidget( mSecrecyCombo );
@@ -65,6 +67,6 @@ KABC::Secrecy SecrecyWidget::secrecy() const
65 return secrecy; 67 return secrecy;
66} 68}
67 69
68#ifndef KAB_EMBEDDED 70#ifndef KAB_EMBEDDED_
69#include "secrecywidget.moc" 71#include "moc_secrecywidget.cpp"
70#endif //KAB_EMBEDDED 72#endif //KAB_EMBEDDED
diff --git a/kaddressbook/undo.cpp b/kaddressbook/undo.cpp
index 4442087..a6c1580 100644
--- a/kaddressbook/undo.cpp
+++ b/kaddressbook/undo.cpp
@@ -114,6 +114,6 @@ void RedoStack::redo()
114 UndoStack::instance()->push( command ); 114 UndoStack::instance()->push( command );
115} 115}
116 116
117#ifndef KAB_EMBEDDED 117#ifndef KAB_EMBEDDED_
118#include "undo.moc" 118#include "moc_undo.cpp"
119#endif //KAB_EMBEDDED 119#endif //KAB_EMBEDDED
diff --git a/kaddressbook/undo.h b/kaddressbook/undo.h
index 843bc26..a8ba2ee 100644
--- a/kaddressbook/undo.h
+++ b/kaddressbook/undo.h
@@ -25,7 +25,7 @@
25#define UNDO_H 25#define UNDO_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28#include <qptrstack.h> 28#include <q3ptrstack.h>
29#include <qstring.h> 29#include <qstring.h>
30 30
31class Command 31class Command
@@ -67,7 +67,7 @@ class StackBase : public QObject
67 */ 67 */
68 Command *pop(); 68 Command *pop();
69 69
70 QPtrStack<Command> mCommandStack; 70 Q3PtrStack<Command> mCommandStack;
71}; 71};
72 72
73class UndoStack : public StackBase 73class UndoStack : public StackBase
diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp
index 5807dc0..e900b00 100644
--- a/kaddressbook/undocmds.cpp
+++ b/kaddressbook/undocmds.cpp
@@ -21,7 +21,7 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qtextstream.h> 24#include <q3textstream.h>
25 25
26#include <qapplication.h> 26#include <qapplication.h>
27#include <qclipboard.h> 27#include <qclipboard.h>
diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp
index 5daae1a..7366a0b 100644
--- a/kaddressbook/viewconfigurefieldspage.cpp
+++ b/kaddressbook/viewconfigurefieldspage.cpp
@@ -36,20 +36,24 @@
36 36
37#include <qtoolbutton.h> 37#include <qtoolbutton.h>
38#include <qapplication.h> 38#include <qapplication.h>
39#include <QDesktopWidget>
39#include <qlabel.h> 40#include <qlabel.h>
40#include <qlistbox.h> 41#include <q3listbox.h>
41#include <qlayout.h> 42#include <qlayout.h>
43//Added by qt3to4:
44#include <Q3GridLayout>
45#include <Q3BoxLayout>
42 46
43#include "viewconfigurefieldspage.h" 47#include "viewconfigurefieldspage.h"
44 48
45class FieldItem : public QListBoxText 49class FieldItem : public Q3ListBoxText
46{ 50{
47 public: 51 public:
48 FieldItem( QListBox *parent, KABC::Field *field ) 52 FieldItem( Q3ListBox *parent, KABC::Field *field )
49 : QListBoxText( parent, field->label() ), mField( field ) {} 53 : Q3ListBoxText( parent, field->label() ), mField( field ) {}
50 54
51 FieldItem( QListBox *parent, KABC::Field *field, int index ) 55 FieldItem( Q3ListBox *parent, KABC::Field *field, int index )
52 : QListBoxText( parent, field->label(), parent->item( index ) ), 56 : Q3ListBoxText( parent, field->label(), parent->item( index ) ),
53 mField( field ) {} 57 mField( field ) {}
54 58
55 KABC::Field *field() { return mField; } 59 KABC::Field *field() { return mField; }
@@ -106,7 +110,7 @@ void ViewConfigureFieldsPage::slotShowFields( int index )
106 110
107 KABC::Field::List::ConstIterator it; 111 KABC::Field::List::ConstIterator it;
108 for ( it = allFields.begin(); it != allFields.end(); ++it ) { 112 for ( it = allFields.begin(); it != allFields.end(); ++it ) {
109 QListBoxItem *item = mSelectedBox->firstItem(); 113 Q3ListBoxItem *item = mSelectedBox->firstItem();
110 while( item ) { 114 while( item ) {
111 FieldItem *fieldItem = static_cast<FieldItem *>( item ); 115 FieldItem *fieldItem = static_cast<FieldItem *>( item );
112 if ( (*it)->equals( fieldItem->field() ) ) 116 if ( (*it)->equals( fieldItem->field() ) )
@@ -189,7 +193,7 @@ void ViewConfigureFieldsPage::slotMoveUp()
189{ 193{
190 int i = mSelectedBox->currentItem(); 194 int i = mSelectedBox->currentItem();
191 if ( i > 0 ) { 195 if ( i > 0 ) {
192 QListBoxItem *item = mSelectedBox->item( i ); 196 Q3ListBoxItem *item = mSelectedBox->item( i );
193 mSelectedBox->takeItem( item ); 197 mSelectedBox->takeItem( item );
194 mSelectedBox->insertItem( item, i - 1 ); 198 mSelectedBox->insertItem( item, i - 1 );
195 mSelectedBox->setCurrentItem( item ); 199 mSelectedBox->setCurrentItem( item );
@@ -201,7 +205,7 @@ void ViewConfigureFieldsPage::slotMoveDown()
201{ 205{
202 int i = mSelectedBox->currentItem(); 206 int i = mSelectedBox->currentItem();
203 if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { 207 if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) {
204 QListBoxItem *item = mSelectedBox->item( i ); 208 Q3ListBoxItem *item = mSelectedBox->item( i );
205 mSelectedBox->takeItem( item ); 209 mSelectedBox->takeItem( item );
206 mSelectedBox->insertItem( item, i + 1 ); 210 mSelectedBox->insertItem( item, i + 1 );
207 mSelectedBox->setCurrentItem( item ); 211 mSelectedBox->setCurrentItem( item );
@@ -219,11 +223,11 @@ void ViewConfigureFieldsPage::initGUI()
219 223
220 setCaption( i18n("Select Fields to Display") ); 224 setCaption( i18n("Select Fields to Display") );
221 225
222 QGridLayout *gl = 0; 226 Q3GridLayout *gl = 0;
223 if (orientation == 0) 227 if (orientation == 0)
224 gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() ); 228 gl = new Q3GridLayout( this , 6, 4, 0, KDialog::spacingHint() );
225 else 229 else
226 gl = new QGridLayout( this , 4, 6, 0, KDialog::spacingHint() ); 230 gl = new Q3GridLayout( this , 4, 6, 0, KDialog::spacingHint() );
227 231
228 #ifndef KAB_EMBEDDED 232 #ifndef KAB_EMBEDDED
229 mCategoryCombo = new KComboBox( false, this ); 233 mCategoryCombo = new KComboBox( false, this );
@@ -249,20 +253,20 @@ void ViewConfigureFieldsPage::initGUI()
249 gl->addWidget( label, 2, 0 ); 253 gl->addWidget( label, 2, 0 );
250 254
251 255
252 mUnSelectedBox = new QListBox( this ); 256 mUnSelectedBox = new Q3ListBox( this );
253 mUnSelectedBox->setSelectionMode( QListBox::Extended ); 257 mUnSelectedBox->setSelectionMode( Q3ListBox::Extended );
254 mUnSelectedBox->setMinimumHeight( 80 ); 258 mUnSelectedBox->setMinimumHeight( 80 );
255 if (orientation == 0) 259 if (orientation == 0)
256 gl->addWidget( mUnSelectedBox, 1, 0 ); 260 gl->addWidget( mUnSelectedBox, 1, 0 );
257 else 261 else
258 gl->addWidget( mUnSelectedBox, 0, 1 ); 262 gl->addWidget( mUnSelectedBox, 0, 1 );
259 263
260 mSelectedBox = new QListBox( this ); 264 mSelectedBox = new Q3ListBox( this );
261 //if ( QApplication::desktop()->width() < 320 ) { 265 //if ( QApplication::desktop()->width() < 320 ) {
262 // mUnSelectedBox->setMaximumWidth( 134 ); 266 // mUnSelectedBox->setMaximumWidth( 134 );
263 // mSelectedBox->setMaximumWidth( 134 ); 267 // mSelectedBox->setMaximumWidth( 134 );
264 //} 268 //}
265 mSelectedBox->setSelectionMode( QListBox::Extended ); 269 mSelectedBox->setSelectionMode( Q3ListBox::Extended );
266 mSelectedBox->setMinimumHeight( 80 ); 270 mSelectedBox->setMinimumHeight( 80 );
267 label->setBuddy( mSelectedBox ); 271 label->setBuddy( mSelectedBox );
268 if (orientation == 0) 272 if (orientation == 0)
@@ -270,11 +274,11 @@ void ViewConfigureFieldsPage::initGUI()
270 else 274 else
271 gl->addWidget( mSelectedBox, 2, 1 ); 275 gl->addWidget( mSelectedBox, 2, 1 );
272 276
273 QBoxLayout *vb1 = 0; 277 Q3BoxLayout *vb1 = 0;
274 if (orientation == 0) 278 if (orientation == 0)
275 vb1 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); 279 vb1 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() );
276 else 280 else
277 vb1 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() ); 281 vb1 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() );
278 282
279 vb1->addStretch(); 283 vb1->addStretch();
280 284
@@ -301,11 +305,11 @@ void ViewConfigureFieldsPage::initGUI()
301 else 305 else
302 gl->addLayout( vb1, 1, 1 ); 306 gl->addLayout( vb1, 1, 1 );
303 307
304 QBoxLayout *vb2 = 0; 308 Q3BoxLayout *vb2 = 0;
305 if (orientation == 0) 309 if (orientation == 0)
306 vb2 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); 310 vb2 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() );
307 else 311 else
308 vb2 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() ); 312 vb2 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() );
309 313
310 vb2->addStretch(); 314 vb2->addStretch();
311 315
@@ -340,12 +344,12 @@ void ViewConfigureFieldsPage::initGUI()
340 344
341 connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); 345 connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );
342 connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); 346 connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) );
343 connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); 347 connect( mSelectedBox, SIGNAL( currentChanged( Q3ListBoxItem * ) ), SLOT( slotButtonsEnabled() ) );
344 348
345 slotButtonsEnabled(); 349 slotButtonsEnabled();
346} 350}
347 351
348 352
349#ifndef KAB_EMBEDDED 353#ifndef KAB_EMBEDDED_
350#include "viewconfigurefieldspage.moc" 354#include "moc_viewconfigurefieldspage.cpp"
351#endif //KAB_EMBEDDED 355#endif //KAB_EMBEDDED
diff --git a/kaddressbook/viewconfigurefieldspage.h b/kaddressbook/viewconfigurefieldspage.h
index b27668c..42d132f 100644
--- a/kaddressbook/viewconfigurefieldspage.h
+++ b/kaddressbook/viewconfigurefieldspage.h
@@ -35,8 +35,8 @@ class KComboBox;
35class QComboBox; 35class QComboBox;
36#endif //KAB_EMBEDDED 36#endif //KAB_EMBEDDED
37 37
38class QListBox; 38class Q3ListBox;
39class QListBoxItem; 39class Q3ListBoxItem;
40class QPushButton; 40class QPushButton;
41class QToolButton; 41class QToolButton;
42 42
@@ -68,8 +68,8 @@ class ViewConfigureFieldsPage : public QWidget
68#else //KAB_EMBEDDED 68#else //KAB_EMBEDDED
69 QComboBox *mCategoryCombo; 69 QComboBox *mCategoryCombo;
70#endif //KAB_EMBEDDED 70#endif //KAB_EMBEDDED
71 QListBox *mSelectedBox; 71 Q3ListBox *mSelectedBox;
72 QListBox *mUnSelectedBox; 72 Q3ListBox *mUnSelectedBox;
73 QToolButton *mAddButton; 73 QToolButton *mAddButton;
74 QToolButton *mRemoveButton; 74 QToolButton *mRemoveButton;
75 QToolButton *mUpButton; 75 QToolButton *mUpButton;
diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp
index b085a5e..cdb778b 100644
--- a/kaddressbook/viewconfigurefilterpage.cpp
+++ b/kaddressbook/viewconfigurefilterpage.cpp
@@ -27,10 +27,13 @@
27#include <qcombobox.h> 27#include <qcombobox.h>
28#endif //KAB_EMBEDDED 28#endif //KAB_EMBEDDED
29 29
30#include <qbuttongroup.h> 30#include <q3buttongroup.h>
31#include <qlabel.h> 31#include <qlabel.h>
32#include <qlayout.h> 32#include <qlayout.h>
33#include <qradiobutton.h> 33#include <qradiobutton.h>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3VBoxLayout>
34 37
35#include <kconfig.h> 38#include <kconfig.h>
36#include <kdialog.h> 39#include <kdialog.h>
@@ -44,9 +47,9 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
44 const char *name ) 47 const char *name )
45 : QWidget( parent, name ) 48 : QWidget( parent, name )
46{ 49{
47 QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); 50 Q3BoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() );
48 51
49 mFilterGroup = new QButtonGroup(); 52 mFilterGroup = new Q3ButtonGroup();
50 connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) ); 53 connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) );
51 54
52 QLabel *label = new QLabel( i18n( "The default filter will be activated whenever" 55 QLabel *label = new QLabel( i18n( "The default filter will be activated whenever"
@@ -68,7 +71,7 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent,
68 mFilterGroup->insert( button ); 71 mFilterGroup->insert( button );
69 topLayout->addWidget( button ); 72 topLayout->addWidget( button );
70 73
71 QBoxLayout *comboLayout = new QHBoxLayout(); 74 Q3BoxLayout *comboLayout = new Q3HBoxLayout();
72 topLayout->addLayout( comboLayout ); 75 topLayout->addLayout( comboLayout );
73 button = new QRadioButton( i18n( "Use filter:" ), this ); 76 button = new QRadioButton( i18n( "Use filter:" ), this );
74 mFilterGroup->insert( button ); 77 mFilterGroup->insert( button );
@@ -132,6 +135,6 @@ void ViewConfigureFilterPage::buttonClicked( int id )
132 mFilterCombo->setEnabled( id == 2 ); 135 mFilterCombo->setEnabled( id == 2 );
133} 136}
134 137
135#ifndef KAB_EMBEDDED 138#ifndef KAB_EMBEDDED_
136#include "viewconfigurefilterpage.moc" 139#include "moc_viewconfigurefilterpage.cpp"
137#endif //KAB_EMBEDDED 140#endif //KAB_EMBEDDED
diff --git a/kaddressbook/viewconfigurefilterpage.h b/kaddressbook/viewconfigurefilterpage.h
index 3be9564..fb39a61 100644
--- a/kaddressbook/viewconfigurefilterpage.h
+++ b/kaddressbook/viewconfigurefilterpage.h
@@ -26,7 +26,7 @@
26 26
27#include <qwidget.h> 27#include <qwidget.h>
28 28
29class QButtonGroup; 29class Q3ButtonGroup;
30 30
31#ifndef KAB_EMBEDDED 31#ifndef KAB_EMBEDDED
32class KComboBox; 32class KComboBox;
@@ -57,7 +57,7 @@ class ViewConfigureFilterPage : public QWidget
57 QComboBox *mFilterCombo; 57 QComboBox *mFilterCombo;
58#endif //KAB_EMBEDDED 58#endif //KAB_EMBEDDED
59 59
60 QButtonGroup *mFilterGroup; 60 Q3ButtonGroup *mFilterGroup;
61}; 61};
62 62
63#endif 63#endif
diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp
index 666e188..047df8c 100644
--- a/kaddressbook/viewconfigurewidget.cpp
+++ b/kaddressbook/viewconfigurewidget.cpp
@@ -24,7 +24,7 @@
24 24
25#ifndef KAB_EMBEDDED 25#ifndef KAB_EMBEDDED
26 26
27#include <qvbox.h> 27#include <q3vbox.h>
28 28
29#include <kapplication.h> 29#include <kapplication.h>
30#include <kconfig.h> 30#include <kconfig.h>
@@ -37,6 +37,9 @@
37 37
38 38
39#include <qlayout.h> 39#include <qlayout.h>
40//Added by qt3to4:
41#include <Q3VBoxLayout>
42#include <QPixmap>
40 43
41#include <kjanuswidget.h> 44#include <kjanuswidget.h>
42#include <kglobal.h> 45#include <kglobal.h>
@@ -50,14 +53,14 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent
50 const char *name ) 53 const char *name )
51 : ConfigureWidget( ab, parent, name ) 54 : ConfigureWidget( ab, parent, name )
52{ 55{
53 QVBoxLayout *topLayout = new QVBoxLayout( this ); 56 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
54 57
55 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); 58 mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed );
56 59
57 topLayout->addWidget( mMainWidget ); 60 topLayout->addWidget( mMainWidget );
58 61
59 // Add the first page, the attributes 62 // Add the first page, the attributes
60 QVBox *page = addPage( i18n( "Fields" ), QString::null, 63 Q3VBox *page = addPage( i18n( "Fields" ), QString::null,
61 KGlobal::iconLoader()->loadIcon( "view_detailed", 64 KGlobal::iconLoader()->loadIcon( "view_detailed",
62 KIcon::Panel, 16 ) ); 65 KIcon::Panel, 16 ) );
63 66
@@ -93,13 +96,13 @@ void ViewConfigureWidget::saveSettings( KConfig *config )
93 mFilterPage->saveSettings( config ); 96 mFilterPage->saveSettings( config );
94} 97}
95 98
96QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, 99Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header,
97 const QPixmap &pixmap ) 100 const QPixmap &pixmap )
98{ 101{
99 return mMainWidget->addVBoxPage( item, header, pixmap ); 102 return mMainWidget->addVBoxPage( item, header, pixmap );
100} 103}
101 104
102#include <qframe.h> 105#include <q3frame.h>
103#include <qlabel.h> 106#include <qlabel.h>
104#include <qlayout.h> 107#include <qlayout.h>
105#include <stdlib.h> 108#include <stdlib.h>
@@ -152,8 +155,6 @@ void ViewConfigureDialog::slotHelp()
152#endif //KAB_EMBEDDED 155#endif //KAB_EMBEDDED
153} 156}
154 157
155#ifndef KAB_EMBEDDED 158#ifndef KAB_EMBEDDED_
156#include "viewconfigurewidget.moc" 159#include "moc_viewconfigurewidget.cpp"
157#endif //KAB_EMBEDDED 160#endif //KAB_EMBEDDED
158
159
diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h
index 0c2b77c..e3b9b12 100644
--- a/kaddressbook/viewconfigurewidget.h
+++ b/kaddressbook/viewconfigurewidget.h
@@ -28,7 +28,7 @@
28 28
29#include "configurewidget.h" 29#include "configurewidget.h"
30 30
31class QVBox; 31class Q3VBox;
32 32
33#include <kdialogbase.h> 33#include <kdialogbase.h>
34#include <qpixmap.h> 34#include <qpixmap.h>
@@ -74,7 +74,7 @@ class ViewConfigureWidget : public ConfigureWidget
74 /** 74 /**
75 Use this method to add new pages to the widget. 75 Use this method to add new pages to the widget.
76 */ 76 */
77 QVBox *addPage( const QString &item, const QString &header = QString::null, 77 Q3VBox *addPage( const QString &item, const QString &header = QString::null,
78 const QPixmap &pixmap = QPixmap() ); 78 const QPixmap &pixmap = QPixmap() );
79 79
80 private: 80 private:
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index b5d9419..5cfe3ad 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -50,7 +50,10 @@ $Id$
50 50
51#include <qaction.h> 51#include <qaction.h>
52#include <qmessagebox.h> 52#include <qmessagebox.h>
53#include <qpopupmenu.h> 53#include <q3popupmenu.h>
54//Added by qt3to4:
55#include <Q3HBoxLayout>
56#include <QDropEvent>
54#include <kconfigbase.h> 57#include <kconfigbase.h>
55 58
56#endif //KAB_EMBEDDED 59#endif //KAB_EMBEDDED
@@ -61,7 +64,8 @@ $Id$
61 64
62#include <qlayout.h> 65#include <qlayout.h>
63#include <qapplication.h> 66#include <qapplication.h>
64#include <qwidgetstack.h> 67#include <QDesktopWidget>
68#include <q3widgetstack.h>
65 69
66#include <kabc/addressbook.h> 70#include <kabc/addressbook.h>
67#include "filtereditdialog.h" 71#include "filtereditdialog.h"
@@ -117,7 +121,7 @@ void ViewManager::restoreSettings()
117 // been modified by global settings 121 // been modified by global settings
118 QString _oldgroup = mCore->config()->group(); 122 QString _oldgroup = mCore->config()->group();
119 123
120 QDictIterator<KAddressBookView> it( mViewDict ); 124 Q3DictIterator<KAddressBookView> it( mViewDict );
121 for ( it.toFirst(); it.current(); ++it ) { 125 for ( it.toFirst(); it.current(); ++it ) {
122 KConfigGroupSaver saver( mCore->config(), it.currentKey() ); 126 KConfigGroupSaver saver( mCore->config(), it.currentKey() );
123 it.current()->readConfig( mCore->config() ); 127 it.current()->readConfig( mCore->config() );
@@ -131,7 +135,7 @@ void ViewManager::saveSettings()
131{ 135{
132 QString _oldgroup = mCore->config()->group(); 136 QString _oldgroup = mCore->config()->group();
133 137
134 QDictIterator<KAddressBookView> it( mViewDict ); 138 Q3DictIterator<KAddressBookView> it( mViewDict );
135 for ( it.toFirst(); it.current(); ++it ) { 139 for ( it.toFirst(); it.current(); ++it ) {
136 KConfigGroupSaver saver( mCore->config(), it.currentKey() ); 140 KConfigGroupSaver saver( mCore->config(), it.currentKey() );
137#ifdef DESKTOP_VERSION 141#ifdef DESKTOP_VERSION
@@ -161,7 +165,7 @@ QStringList ViewManager::selectedUids() const
161QStringList ViewManager::selectedEmails() const 165QStringList ViewManager::selectedEmails() const
162{ 166{
163 if ( mActiveView ) 167 if ( mActiveView )
164 return mActiveView->selectedEmails(); 168 return QStringList(mActiveView->selectedEmails());
165 else 169 else
166 return QStringList(); 170 return QStringList();
167} 171}
@@ -556,7 +560,7 @@ void ViewManager::startDrag()
556 addrList.append( mCore->addressBook()->findByUid( *iter ) ); 560 addrList.append( mCore->addressBook()->findByUid( *iter ) );
557 561
558 KMultipleDrag *drag = new KMultipleDrag( this ); 562 KMultipleDrag *drag = new KMultipleDrag( this );
559 drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); 563 drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) );
560 KABC::Addressee::List::Iterator it; 564 KABC::Addressee::List::Iterator it;
561 QStringList vcards; 565 QStringList vcards;
562 for ( it = addrList.begin(); it != addrList.end(); ++it ) { 566 for ( it = addrList.begin(); it != addrList.end(); ++it ) {
@@ -659,9 +663,9 @@ void ViewManager::initActions()
659//US <Separator/> 663//US <Separator/>
660 664
661#ifdef KAB_EMBEDDED 665#ifdef KAB_EMBEDDED
662 QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu(); 666 Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu();
663 QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); 667 Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu();
664 QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu(); 668 Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu();
665#endif //KAB_EMBEDDED 669#endif //KAB_EMBEDDED
666 670
667 mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" ); 671 mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" );
@@ -738,11 +742,11 @@ void ViewManager::initActions()
738 742
739void ViewManager::initGUI() 743void ViewManager::initGUI()
740{ 744{
741 QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); 745 Q3HBoxLayout *layout = new Q3HBoxLayout( this, 0, 0 );
742 mViewWidgetStack = new QWidgetStack( this ); 746 mViewWidgetStack = new Q3WidgetStack( this );
743 layout->addWidget( mViewWidgetStack ); 747 layout->addWidget( mViewWidgetStack );
744} 748}
745 749
746#ifndef KAB_EMBEDDED 750#ifndef KAB_EMBEDDED_
747#include "viewmanager.moc" 751#include "moc_viewmanager.cpp"
748#endif //KAB_EMBEDDED 752#endif //KAB_EMBEDDED
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h
index ab5d372..4bbdbc7 100644
--- a/kaddressbook/viewmanager.h
+++ b/kaddressbook/viewmanager.h
@@ -26,15 +26,17 @@
26 26
27#include <qwidget.h> 27#include <qwidget.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29//Added by qt3to4:
30#include <QDropEvent>
29#include <kaddressbookview.h> 31#include <kaddressbookview.h>
30#include <qdict.h> 32#include <q3dict.h>
31#include "filter.h" 33#include "filter.h"
32 34
33class KAction; 35class KAction;
34class KSelectAction; 36class KSelectAction;
35 37
36class KABCore; 38class KABCore;
37class QWidgetStack; 39class Q3WidgetStack;
38class QDropEvent; 40class QDropEvent;
39 41
40namespace KABC { class AddressBook; } 42namespace KABC { class AddressBook; }
@@ -145,11 +147,11 @@ class ViewManager : public QWidget
145 Filter mCurrentFilter; 147 Filter mCurrentFilter;
146 Filter::List mFilterList; 148 Filter::List mFilterList;
147 149
148 QDict<KAddressBookView> mViewDict; 150 Q3Dict<KAddressBookView> mViewDict;
149 QDict<ViewFactory> mViewFactoryDict; 151 Q3Dict<ViewFactory> mViewFactoryDict;
150 QStringList mViewNameList; 152 QStringList mViewNameList;
151 153
152 QWidgetStack *mViewWidgetStack; 154 Q3WidgetStack *mViewWidgetStack;
153 KAddressBookView *mActiveView; 155 KAddressBookView *mActiveView;
154 156
155 KAction *mActionDeleteView; 157 KAction *mActionDeleteView;
diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp
index b6e053f..1a29f41 100644
--- a/kaddressbook/views/cardview.cpp
+++ b/kaddressbook/views/cardview.cpp
@@ -34,6 +34,14 @@
34#include <qcursor.h> 34#include <qcursor.h>
35#include <qtooltip.h> 35#include <qtooltip.h>
36#include <qapplication.h> 36#include <qapplication.h>
37//Added by qt3to4:
38#include <QKeyEvent>
39#include <Q3PtrList>
40#include <QResizeEvent>
41#include <QFocusEvent>
42#include <QMouseEvent>
43#include <QEvent>
44#include <QWheelEvent>
37 45
38#include "kabprefs.h" 46#include "kabprefs.h"
39#include <kdebug.h> 47#include <kdebug.h>
@@ -71,11 +79,11 @@ class CardViewTip : public QLabel {
71// Warning: make sure you use findRef() instead of find() to find an 79// Warning: make sure you use findRef() instead of find() to find an
72// item! Only the pointer value is unique in the list. 80// item! Only the pointer value is unique in the list.
73// 81//
74class CardViewItemList : public QPtrList<CardViewItem> 82class CardViewItemList : public Q3PtrList<CardViewItem>
75{ 83{
76 protected: 84 protected:
77 virtual int compareItems(QPtrCollection::Item item1, 85 virtual int compareItems(Q3PtrCollection::Item item1,
78 QPtrCollection::Item item2) 86 Q3PtrCollection::Item item2)
79 { 87 {
80 CardViewItem *cItem1 = (CardViewItem*)item1; 88 CardViewItem *cItem1 = (CardViewItem*)item1;
81 CardViewItem *cItem2 = (CardViewItem*)item2; 89 CardViewItem *cItem2 = (CardViewItem*)item2;
@@ -161,7 +169,7 @@ class CardViewPrivate
161 {}; 169 {};
162 170
163 CardViewItemList mItemList; 171 CardViewItemList mItemList;
164 QPtrList<CardViewSeparator> mSeparatorList; 172 Q3PtrList<CardViewSeparator> mSeparatorList;
165 QFontMetrics *mFm; 173 QFontMetrics *mFm;
166 QFontMetrics *mBFm; // bold font 174 QFontMetrics *mBFm; // bold font
167 QFont mHeaderFont; // custom header font 175 QFont mHeaderFont; // custom header font
@@ -208,7 +216,7 @@ class CardViewItemPrivate
208 216
209 217
210 QString mCaption; 218 QString mCaption;
211 QPtrList< CardViewItem::Field > mFieldList; 219 Q3PtrList< CardViewItem::Field > mFieldList;
212 bool mSelected; 220 bool mSelected;
213 int x; // horizontal position, set by the view 221 int x; // horizontal position, set by the view
214 int y; // vertical position, set by the view 222 int y; // vertical position, set by the view
@@ -313,7 +321,7 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg)
313 p->restore(); 321 p->restore();
314 322
315 // Go through the fields and draw them 323 // Go through the fields and draw them
316 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 324 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
317 QString label, value; 325 QString label, value;
318 int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders) 326 int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders)
319 p->setPen(cg.text()); 327 p->setPen(cg.text());
@@ -408,12 +416,12 @@ int CardViewItem::height( bool allowCache ) const
408 int fieldHeight = 0; 416 int fieldHeight = 0;
409 int lines; 417 int lines;
410 int maxLines( mView->maxFieldLines() ); 418 int maxLines( mView->maxFieldLines() );
411 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 419 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
412 for (iter.toFirst(); iter.current(); ++iter) 420 for (iter.toFirst(); iter.current(); ++iter)
413 { 421 {
414 if ( !sef && (*iter)->second.isEmpty() ) 422 if ( !sef && (*iter)->second.isEmpty() )
415 continue; 423 continue;
416 lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines ); 424 lines = QMIN( (*iter)->second.count('\n') + 1, maxLines );
417 fieldHeight += ( lines * fh ) + 2;//sp; 425 fieldHeight += ( lines * fh ) + 2;//sp;
418 } 426 }
419 427
@@ -450,7 +458,7 @@ void CardViewItem::removeField(const QString &label)
450{ 458{
451 CardViewItem::Field *f; 459 CardViewItem::Field *f;
452 460
453 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 461 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
454 for (iter.toFirst(); iter.current(); ++iter) 462 for (iter.toFirst(); iter.current(); ++iter)
455 { 463 {
456 f = *iter; 464 f = *iter;
@@ -523,7 +531,7 @@ void CardViewItem::setCaption(const QString &caption)
523 531
524QString CardViewItem::fieldValue(const QString &label) 532QString CardViewItem::fieldValue(const QString &label)
525{ 533{
526 QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); 534 Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList);
527 for (iter.toFirst(); iter.current(); ++iter) 535 for (iter.toFirst(); iter.current(); ++iter)
528 if ((*iter)->first == label) 536 if ((*iter)->first == label)
529 return (*iter)->second; 537 return (*iter)->second;
@@ -569,7 +577,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
569 Field *_f; 577 Field *_f;
570 for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next()) 578 for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next())
571 if ( se || ! _f->second.isEmpty() ) 579 if ( se || ! _f->second.isEmpty() )
572 y += ( QMIN(_f->second.contains('\n')+1, maxLines) * fh ) + 2; 580 y += ( QMIN(_f->second.count('\n')+1, maxLines) * fh ) + 2;
573// } 581// }
574 if ( isLabel && itempos.y() > y + fh ) 582 if ( isLabel && itempos.y() > y + fh )
575 return; 583 return;
@@ -586,7 +594,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip )
586 trimmed = mView->d->mFm->width( s ) > mw - colonWidth; 594 trimmed = mView->d->mFm->width( s ) > mw - colonWidth;
587 } else { 595 } else {
588 QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); 596 QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) );
589 trimmed = r.width() > mw || r.height()/fh > QMIN(s.contains('\n') + 1, maxLines); 597 trimmed = r.width() > mw || r.height()/fh > QMIN(s.count('\n') + 1, maxLines);
590 } 598 }
591 } 599 }
592 if ( trimmed ) 600 if ( trimmed )
@@ -626,7 +634,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
626 for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() ) 634 for ( f = d->mFieldList.first(); f; f = d->mFieldList.next() )
627 { 635 {
628 if ( showEmpty || !f->second.isEmpty() ) 636 if ( showEmpty || !f->second.isEmpty() )
629 ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2; 637 ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2;
630 if ( iy <= ypos ) 638 if ( iy <= ypos )
631 break; 639 break;
632 } 640 }
@@ -637,7 +645,7 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const
637//BEGIN CardView 645//BEGIN CardView
638 646
639CardView::CardView(QWidget *parent, const char *name) 647CardView::CardView(QWidget *parent, const char *name)
640 : QScrollView(parent, name), 648 : Q3ScrollView(parent, name),
641 d(new CardViewPrivate()) 649 d(new CardViewPrivate())
642{ 650{
643 mFlagKeyPressed = false; 651 mFlagKeyPressed = false;
@@ -656,13 +664,13 @@ CardView::CardView(QWidget *parent, const char *name)
656 664
657 viewport()->setMouseTracking( true ); 665 viewport()->setMouseTracking( true );
658 viewport()->setFocusProxy(this); 666 viewport()->setFocusProxy(this);
659 viewport()->setFocusPolicy(WheelFocus); 667 viewport()->setFocusPolicy(Qt::WheelFocus);
660 viewport()->setBackgroundMode(PaletteBase); 668 viewport()->setBackgroundMode(Qt::PaletteBase);
661 669
662 connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); 670 connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) );
663 671
664//US setBackgroundMode(PaletteBackground, PaletteBase); 672//US setBackgroundMode(PaletteBackground, PaletteBase);
665 setBackgroundMode(PaletteBackground); 673 setBackgroundMode(Qt::PaletteBackground);
666 674
667 // no reason for a vertical scrollbar 675 // no reason for a vertical scrollbar
668 setVScrollBarMode(AlwaysOff); 676 setVScrollBarMode(AlwaysOff);
@@ -739,7 +747,7 @@ void CardView::setCurrentItem( CardViewItem *item )
739CardViewItem *CardView::itemAt(const QPoint &viewPos) 747CardViewItem *CardView::itemAt(const QPoint &viewPos)
740{ 748{
741 CardViewItem *item = 0; 749 CardViewItem *item = 0;
742 QPtrListIterator<CardViewItem> iter(d->mItemList); 750 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
743 bool found = false; 751 bool found = false;
744 for (iter.toFirst(); iter.current() && !found; ++iter) 752 for (iter.toFirst(); iter.current() && !found; ++iter)
745 { 753 {
@@ -787,7 +795,7 @@ CardView::SelectionMode CardView::selectionMode() const
787 795
788void CardView::selectAll(bool state) 796void CardView::selectAll(bool state)
789{ 797{
790 QPtrListIterator<CardViewItem> iter(d->mItemList); 798 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
791 if (!state) 799 if (!state)
792 { 800 {
793 for (iter.toFirst(); iter.current(); ++iter) 801 for (iter.toFirst(); iter.current(); ++iter)
@@ -878,7 +886,7 @@ bool CardView::isSelected(CardViewItem *item) const
878CardViewItem *CardView::selectedItem() const 886CardViewItem *CardView::selectedItem() const
879{ 887{
880 // find the first selected item 888 // find the first selected item
881 QPtrListIterator<CardViewItem> iter(d->mItemList); 889 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
882 for (iter.toFirst(); iter.current(); ++iter) 890 for (iter.toFirst(); iter.current(); ++iter)
883 { 891 {
884 if ((*iter)->isSelected()) 892 if ((*iter)->isSelected())
@@ -955,7 +963,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
955 viewport()->erase( QRect ( cX, cY , clipw, cliph ) ); 963 viewport()->erase( QRect ( cX, cY , clipw, cliph ) );
956 964
957 // Now tell the cards to draw, if they are in the clip region 965 // Now tell the cards to draw, if they are in the clip region
958 QPtrListIterator<CardViewItem> iter(d->mItemList); 966 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
959 for (iter.toFirst(); iter.current(); ++iter) 967 for (iter.toFirst(); iter.current(); ++iter)
960 { 968 {
961 item = *iter; 969 item = *iter;
@@ -975,7 +983,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
975 } 983 }
976 984
977 // Followed by the separators if they are in the clip region 985 // Followed by the separators if they are in the clip region
978 QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); 986 Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
979 for (sepIter.toFirst(); sepIter.current(); ++sepIter) 987 for (sepIter.toFirst(); sepIter.current(); ++sepIter)
980 { 988 {
981 sep = *sepIter; 989 sep = *sepIter;
@@ -993,7 +1001,7 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy,
993 1001
994void CardView::resizeEvent(QResizeEvent *e) 1002void CardView::resizeEvent(QResizeEvent *e)
995{ 1003{
996 QScrollView::resizeEvent(e); 1004 Q3ScrollView::resizeEvent(e);
997 1005
998 setLayoutDirty(true); 1006 setLayoutDirty(true);
999} 1007}
@@ -1013,7 +1021,7 @@ void CardView::calcLayout()
1013 // delete the old separators 1021 // delete the old separators
1014 d->mSeparatorList.clear(); 1022 d->mSeparatorList.clear();
1015 1023
1016 QPtrListIterator<CardViewItem> iter(d->mItemList); 1024 Q3PtrListIterator<CardViewItem> iter(d->mItemList);
1017 CardViewItem *item = 0; 1025 CardViewItem *item = 0;
1018 CardViewSeparator *sep = 0; 1026 CardViewSeparator *sep = 0;
1019 xPos += cardSpacing; 1027 xPos += cardSpacing;
@@ -1056,7 +1064,7 @@ void CardView::calcLayout()
1056 1064
1057 // Update the height of all the separators now that we know the 1065 // Update the height of all the separators now that we know the
1058 // max height of a column 1066 // max height of a column
1059 QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); 1067 Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList);
1060 for (sepIter.toFirst(); sepIter.current(); ++sepIter) 1068 for (sepIter.toFirst(); sepIter.current(); ++sepIter)
1061 { 1069 {
1062 (*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin); 1070 (*sepIter)->mRect.setHeight(maxHeight - 2*cardSpacing - 2*d->mItemMargin);
@@ -1101,7 +1109,7 @@ void CardView::setItemSpacing( uint spacing )
1101 1109
1102void CardView::contentsMousePressEvent(QMouseEvent *e) 1110void CardView::contentsMousePressEvent(QMouseEvent *e)
1103{ 1111{
1104 QScrollView::contentsMousePressEvent(e); 1112 Q3ScrollView::contentsMousePressEvent(e);
1105 1113
1106 QPoint pos = e->pos(); 1114 QPoint pos = e->pos();
1107 d->mLastClickPos = pos; 1115 d->mLastClickPos = pos;
@@ -1171,7 +1179,7 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
1171 1179
1172 bool s = ! item->isSelected(); 1180 bool s = ! item->isSelected();
1173 1181
1174 if ( s && ! (e->state() & ControlButton) ) 1182 if ( s && ! (e->state() & Qt::ControlButton) )
1175 { 1183 {
1176 bool b = signalsBlocked(); 1184 bool b = signalsBlocked();
1177 blockSignals(true); 1185 blockSignals(true);
@@ -1219,7 +1227,7 @@ void CardView::contentsMousePressEvent(QMouseEvent *e)
1219 1227
1220void CardView::contentsMouseReleaseEvent(QMouseEvent *e) 1228void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
1221{ 1229{
1222 QScrollView::contentsMouseReleaseEvent(e); 1230 Q3ScrollView::contentsMouseReleaseEvent(e);
1223 1231
1224 if ( d->mResizeAnchor ) 1232 if ( d->mResizeAnchor )
1225 { 1233 {
@@ -1257,7 +1265,7 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e)
1257 1265
1258void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) 1266void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1259{ 1267{
1260 QScrollView::contentsMouseDoubleClickEvent(e); 1268 Q3ScrollView::contentsMouseDoubleClickEvent(e);
1261 1269
1262 CardViewItem *item = itemAt(e->pos()); 1270 CardViewItem *item = itemAt(e->pos());
1263 1271
@@ -1302,12 +1310,12 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e )
1302 int m = e->x()%colw; 1310 int m = e->x()%colw;
1303 if ( m >= colcontentw && m > 0 ) 1311 if ( m >= colcontentw && m > 0 )
1304 { 1312 {
1305 setCursor( SplitVCursor ); // Why does this fail sometimes? 1313 setCursor( Qt::SplitVCursor ); // Why does this fail sometimes?
1306 d->mOnSeparator = true; 1314 d->mOnSeparator = true;
1307 } 1315 }
1308 else 1316 else
1309 { 1317 {
1310 setCursor( ArrowCursor ); 1318 setCursor( Qt::ArrowCursor );
1311 d->mOnSeparator = false; 1319 d->mOnSeparator = false;
1312 } 1320 }
1313 } 1321 }
@@ -1324,7 +1332,7 @@ void CardView::leaveEvent( QEvent * )
1324 if (d->mOnSeparator) 1332 if (d->mOnSeparator)
1325 { 1333 {
1326 d->mOnSeparator = false; 1334 d->mOnSeparator = false;
1327 setCursor( ArrowCursor ); 1335 setCursor( Qt::ArrowCursor );
1328 } 1336 }
1329} 1337}
1330 1338
@@ -1368,21 +1376,21 @@ void CardView::keyPressEvent( QKeyEvent *e )
1368 1376
1369 switch ( e->key() ) 1377 switch ( e->key() )
1370 { 1378 {
1371 case Key_Up: 1379 case Qt::Key_Up:
1372 if ( pos > 0 ) 1380 if ( pos > 0 )
1373 { 1381 {
1374 aItem = d->mItemList.at( pos - 1 ); 1382 aItem = d->mItemList.at( pos - 1 );
1375 setCurrentItem( aItem ); 1383 setCurrentItem( aItem );
1376 } 1384 }
1377 break; 1385 break;
1378 case Key_Down: 1386 case Qt::Key_Down:
1379 if ( pos < d->mItemList.count() - 1 ) 1387 if ( pos < d->mItemList.count() - 1 )
1380 { 1388 {
1381 aItem = d->mItemList.at( pos + 1 ); 1389 aItem = d->mItemList.at( pos + 1 );
1382 setCurrentItem( aItem ); 1390 setCurrentItem( aItem );
1383 } 1391 }
1384 break; 1392 break;
1385 case Key_Left: 1393 case Qt::Key_Left:
1386 { 1394 {
1387 // look for an item in the previous/next column, starting from 1395 // look for an item in the previous/next column, starting from
1388 // the vertical middle of the current item. 1396 // the vertical middle of the current item.
@@ -1400,7 +1408,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1400 setCurrentItem( aItem ); 1408 setCurrentItem( aItem );
1401 } 1409 }
1402 break; 1410 break;
1403 case Key_Right: 1411 case Qt::Key_Right:
1404 { 1412 {
1405 // FIXME use nice calculated measures!!! 1413 // FIXME use nice calculated measures!!!
1406 QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y ); 1414 QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y );
@@ -1415,15 +1423,15 @@ void CardView::keyPressEvent( QKeyEvent *e )
1415 setCurrentItem( aItem ); 1423 setCurrentItem( aItem );
1416 } 1424 }
1417 break; 1425 break;
1418 case Key_Home: 1426 case Qt::Key_Home:
1419 aItem = d->mItemList.first(); 1427 aItem = d->mItemList.first();
1420 setCurrentItem( aItem ); 1428 setCurrentItem( aItem );
1421 break; 1429 break;
1422 case Key_End: 1430 case Qt::Key_End:
1423 aItem = d->mItemList.last(); 1431 aItem = d->mItemList.last();
1424 setCurrentItem( aItem ); 1432 setCurrentItem( aItem );
1425 break; 1433 break;
1426 case Key_Prior: // PageUp 1434 case Qt::Key_Prior: // PageUp
1427 { 1435 {
1428 // QListView: "Make the item above the top visible and current" 1436 // QListView: "Make the item above the top visible and current"
1429 // TODO if contentsY(), pick the top item of the leftmost visible column 1437 // TODO if contentsY(), pick the top item of the leftmost visible column
@@ -1436,7 +1444,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1436 setCurrentItem( aItem ); 1444 setCurrentItem( aItem );
1437 } 1445 }
1438 break; 1446 break;
1439 case Key_Next: // PageDown 1447 case Qt::Key_Next: // PageDown
1440 { 1448 {
1441 // QListView: "Make the item below the bottom visible and current" 1449 // QListView: "Make the item below the bottom visible and current"
1442 // find the first not fully visible column. 1450 // find the first not fully visible column.
@@ -1458,19 +1466,19 @@ void CardView::keyPressEvent( QKeyEvent *e )
1458 setCurrentItem( aItem ); 1466 setCurrentItem( aItem );
1459 } 1467 }
1460 break; 1468 break;
1461 case Key_Space: 1469 case Qt::Key_Space:
1462 setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); 1470 setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() );
1463 emit selectionChanged(); 1471 emit selectionChanged();
1464 break; 1472 break;
1465 case Key_Return: 1473 case Qt::Key_Return:
1466 case Key_Enter: 1474 case Qt::Key_Enter:
1467 { 1475 {
1468 emit returnPressed( d->mCurrentItem ); 1476 emit returnPressed( d->mCurrentItem );
1469 emit executed( d->mCurrentItem ); 1477 emit executed( d->mCurrentItem );
1470 } 1478 }
1471 break; 1479 break;
1472 default: 1480 default:
1473 if ( (e->state() & ControlButton) && e->key() == Key_A ) 1481 if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
1474 { 1482 {
1475 // select all 1483 // select all
1476 selectAll( true ); 1484 selectAll( true );
@@ -1488,7 +1496,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1488 { 1496 {
1489 if ( d->mSelectionMode == CardView::Extended ) 1497 if ( d->mSelectionMode == CardView::Extended )
1490 { 1498 {
1491 if ( (e->state() & ShiftButton) ) 1499 if ( (e->state() & Qt::ShiftButton) )
1492 { 1500 {
1493 // shift button: toggle range 1501 // shift button: toggle range
1494 // if control button is pressed, leave all items 1502 // if control button is pressed, leave all items
@@ -1519,7 +1527,7 @@ void CardView::keyPressEvent( QKeyEvent *e )
1519 } 1527 }
1520 emit selectionChanged(); 1528 emit selectionChanged();
1521 } 1529 }
1522 else if ( (e->state() & ControlButton) ) 1530 else if ( (e->state() & Qt::ControlButton) )
1523 { 1531 {
1524 // control button: do nothing 1532 // control button: do nothing
1525 } 1533 }
@@ -1638,9 +1646,9 @@ void CardView::drawRubberBands( int pos )
1638 int h = visibleHeight(); 1646 int h = visibleHeight();
1639 1647
1640 QPainter p( viewport() ); 1648 QPainter p( viewport() );
1641 p.setRasterOp( XorROP ); 1649 p.setCompositionMode( QPainter::CompositionMode_Xor );
1642 p.setPen( gray ); 1650 p.setPen( Qt::gray );
1643 p.setBrush( gray ); 1651 p.setBrush( Qt::gray );
1644 uint n = d->first; 1652 uint n = d->first;
1645 // erase 1653 // erase
1646 if ( d->mRubberBandAnchor ) 1654 if ( d->mRubberBandAnchor )
@@ -1699,7 +1707,7 @@ QFont CardView::headerFont() const
1699 1707
1700void CardView::setFont( const QFont &fnt ) 1708void CardView::setFont( const QFont &fnt )
1701{ 1709{
1702 QScrollView::setFont( fnt ); 1710 Q3ScrollView::setFont( fnt );
1703 delete d->mFm; 1711 delete d->mFm;
1704 d->mFm = new QFontMetrics( fnt ); 1712 d->mFm = new QFontMetrics( fnt );
1705} 1713}
@@ -1736,7 +1744,7 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
1736 mFlagBlockKeyPressed = false; 1744 mFlagBlockKeyPressed = false;
1737 mFlagKeyPressed = false; 1745 mFlagKeyPressed = false;
1738 } 1746 }
1739 QScrollView::keyReleaseEvent ( e ); 1747 Q3ScrollView::keyReleaseEvent ( e );
1740} 1748}
1741 1749
1742 1750
@@ -1745,6 +1753,6 @@ void CardView::keyReleaseEvent ( QKeyEvent * e )
1745 1753
1746//END Cardview 1754//END Cardview
1747 1755
1748#ifndef KAB_EMBEDDED 1756#ifndef KAB_EMBEDDED_
1749#include "cardview.moc" 1757#include "moc_cardview.cpp"
1750#endif //KAB_EMBEDDED 1758#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h
index 2ea3771..9c245ea 100644
--- a/kaddressbook/views/cardview.h
+++ b/kaddressbook/views/cardview.h
@@ -1,12 +1,20 @@
1#ifndef CARDVIEW_H 1#ifndef CARDVIEW_H
2#define CARDVIEW_H 2#define CARDVIEW_H
3 3
4#include <qscrollview.h> 4#include <q3scrollview.h>
5#include <qptrlist.h> 5#include <q3ptrlist.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qrect.h> 7#include <qrect.h>
8#include <qpair.h> 8#include <qpair.h>
9#include <qpoint.h> 9#include <qpoint.h>
10//Added by qt3to4:
11#include <QWheelEvent>
12#include <QResizeEvent>
13#include <QFocusEvent>
14#include <QLabel>
15#include <QMouseEvent>
16#include <QKeyEvent>
17#include <QEvent>
10 18
11class QLabel; 19class QLabel;
12class QPainter; 20class QPainter;
@@ -148,7 +156,7 @@ class CardViewItem
148* can be used elsewhere. With the exception of a few simple config checks, 156* can be used elsewhere. With the exception of a few simple config checks,
149* the CardView is also 100% independant of KDE. 157* the CardView is also 100% independant of KDE.
150*/ 158*/
151class CardView : public QScrollView 159class CardView : public Q3ScrollView
152{ 160{
153 friend class CardViewItem; 161 friend class CardViewItem;
154 162
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index 2bddca6..46a59a1 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -19,6 +19,11 @@
19 */ 19 */
20 20
21#include <qpainter.h> 21#include <qpainter.h>
22//Added by qt3to4:
23#include <QDragEnterEvent>
24#include <QDropEvent>
25#include <QDragMoveEvent>
26#include <QDragLeaveEvent>
22 27
23#include <kcolordialog.h> 28#include <kcolordialog.h>
24 29
@@ -31,11 +36,11 @@
31#include <qcolordialog.h> 36#include <qcolordialog.h>
32#endif 37#endif
33 38
34ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) 39ColorListBox::ColorListBox( QWidget *parent, const char *name, Qt::WFlags f )
35 :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) 40 :KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
36{ 41{
37 connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); 42 connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
38 connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); 43 connect( this, SIGNAL(clicked(Q3ListBoxItem *)), this, SLOT(slotNewColor(Q3ListBoxItem *)) );
39 setAcceptDrops( true); 44 setAcceptDrops( true);
40} 45}
41 46
@@ -47,7 +52,7 @@ void ColorListBox::setEnabled( bool state )
47 return; 52 return;
48 } 53 }
49 54
50 QListBox::setEnabled( state ); 55 Q3ListBox::setEnabled( state );
51 for( uint i=0; i<count(); i++ ) 56 for( uint i=0; i<count(); i++ )
52 { 57 {
53 updateItem( i ); 58 updateItem( i );
@@ -75,10 +80,10 @@ QColor ColorListBox::color( uint index ) const
75 } 80 }
76 else 81 else
77 { 82 {
78 return( black ); 83 return( Qt::black );
79 } 84 }
80} 85}
81void ColorListBox::slotNewColor(QListBoxItem * i) 86void ColorListBox::slotNewColor(Q3ListBoxItem * i)
82{ 87{
83 if ( i ) 88 if ( i )
84 newColor( index( i ) ); 89 newColor( index( i ) );
@@ -198,7 +203,7 @@ qDebug("ColorListBox::dropEvent drag&drop currently not supported");
198 203
199 204
200ColorListItem::ColorListItem( const QString &text, const QColor &color ) 205ColorListItem::ColorListItem( const QString &text, const QColor &color )
201 : QListBoxItem(), mColor( color ), mBoxWidth( 30 ) 206 : Q3ListBoxItem(), mColor( color ), mBoxWidth( 30 )
202{ 207{
203 setText( text ); 208 setText( text );
204} 209}
@@ -229,17 +234,17 @@ void ColorListItem::paint( QPainter *p )
229} 234}
230 235
231 236
232int ColorListItem::height(const QListBox *lb ) const 237int ColorListItem::height(const Q3ListBox *lb ) const
233{ 238{
234 return( lb->fontMetrics().lineSpacing()+1 ); 239 return( lb->fontMetrics().lineSpacing()+1 );
235} 240}
236 241
237 242
238int ColorListItem::width(const QListBox *lb ) const 243int ColorListItem::width(const Q3ListBox *lb ) const
239{ 244{
240 return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); 245 return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 );
241} 246}
242 247
243#ifndef KAB_EMBEDDED 248#ifndef KAB_EMBEDDED_
244#include "colorlistbox.moc" 249#include "moc_colorlistbox.cpp"
245#endif //KAB_EMBEDDED 250#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index bb91484..31a8085 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -22,6 +22,11 @@
22#define _COLOR_LISTBOX_H_ 22#define _COLOR_LISTBOX_H_
23 23
24#include <klistbox.h> 24#include <klistbox.h>
25//Added by qt3to4:
26#include <QDragMoveEvent>
27#include <QDragLeaveEvent>
28#include <QDropEvent>
29#include <QDragEnterEvent>
25 30
26class QDragEnterEvent; 31class QDragEnterEvent;
27class QDragLeaveEvent; 32class QDragLeaveEvent;
@@ -33,7 +38,7 @@ class ColorListBox : public KListBox
33 Q_OBJECT 38 Q_OBJECT
34 39
35 public: 40 public:
36 ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); 41 ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 );
37 void setColor( uint index, const QColor &color ); 42 void setColor( uint index, const QColor &color );
38 QColor color( uint index ) const; 43 QColor color( uint index ) const;
39 44
@@ -48,7 +53,7 @@ class ColorListBox : public KListBox
48 53
49 private slots: 54 private slots:
50 void newColor( int index ); 55 void newColor( int index );
51 void slotNewColor(QListBoxItem * i); 56 void slotNewColor(Q3ListBoxItem * i);
52 57
53 private: 58 private:
54 int mCurrentOnDragEnter; 59 int mCurrentOnDragEnter;
@@ -56,7 +61,7 @@ class ColorListBox : public KListBox
56}; 61};
57 62
58 63
59class ColorListItem : public QListBoxItem 64class ColorListItem : public Q3ListBoxItem
60{ 65{
61 public: 66 public:
62 ColorListItem( const QString &text, const QColor &color=Qt::black ); 67 ColorListItem( const QString &text, const QColor &color=Qt::black );
@@ -65,8 +70,8 @@ class ColorListItem : public QListBoxItem
65 70
66 protected: 71 protected:
67 virtual void paint( QPainter * ); 72 virtual void paint( QPainter * );
68 virtual int height( const QListBox * ) const; 73 virtual int height( const Q3ListBox * ) const;
69 virtual int width( const QListBox * ) const; 74 virtual int width( const Q3ListBox * ) const;
70 75
71 private: 76 private:
72 QColor mColor; 77 QColor mColor;
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index e0fbd21..b6327fe 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -25,11 +25,14 @@
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29#include <qgroupbox.h> 29#include <q3groupbox.h>
30#include <qspinbox.h> 30#include <qspinbox.h>
31#include <qtabwidget.h> 31#include <qtabwidget.h>
32#include <qwhatsthis.h> 32#include <q3whatsthis.h>
33//Added by qt3to4:
34#include <Q3GridLayout>
35#include <Q3Frame>
33 36
34#include <kdebug.h> 37#include <kdebug.h>
35#include <kglobal.h> 38#include <kglobal.h>
@@ -89,7 +92,7 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
89//////////////////////// 92////////////////////////
90// CardViewLookNFeelPage 93// CardViewLookNFeelPage
91CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) 94CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
92 : QVBox( parent, name ) 95 : Q3VBox( parent, name )
93{ 96{
94 initGUI(); 97 initGUI();
95} 98}
@@ -234,28 +237,28 @@ void CardViewLookNFeelPage::initGUI()
234 QTabWidget *tabs = new QTabWidget( this ); 237 QTabWidget *tabs = new QTabWidget( this );
235 238
236 // Layout 239 // Layout
237 QVBox *loTab = new QVBox( this, "layouttab" ); 240 Q3VBox *loTab = new Q3VBox( this, "layouttab" );
238 241
239 loTab->setSpacing( spacing ); 242 loTab->setSpacing( spacing );
240 loTab->setMargin( margin ); 243 loTab->setMargin( margin );
241 244
242 QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); 245 Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
243 246
244 cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); 247 cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
245 248
246 QHBox *hbSW = new QHBox( gbGeneral ); 249 Q3HBox *hbSW = new Q3HBox( gbGeneral );
247 QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); 250 QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
248 sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); 251 sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
249 lSW->setBuddy( sbSepWidth); 252 lSW->setBuddy( sbSepWidth);
250 253
251 QHBox *hbPadding = new QHBox( gbGeneral ); 254 Q3HBox *hbPadding = new Q3HBox( gbGeneral );
252 QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); 255 QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
253 sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); 256 sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
254 lSpacing->setBuddy( sbSpacing ); 257 lSpacing->setBuddy( sbSpacing );
255 258
256 QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); 259 Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
257 260
258 QHBox *hbMargin = new QHBox( gbCards ); 261 Q3HBox *hbMargin = new Q3HBox( gbCards );
259 QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); 262 QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
260 sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); 263 sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
261 lMargin->setBuddy( sbMargin ); 264 lMargin->setBuddy( sbMargin );
@@ -264,23 +267,23 @@ void CardViewLookNFeelPage::initGUI()
264 267
265 loTab->setStretchFactor( new QWidget( loTab ), 1 ); 268 loTab->setStretchFactor( new QWidget( loTab ), 1 );
266 269
267 QWhatsThis::add( sbMargin, i18n( 270 Q3WhatsThis::add( sbMargin, i18n(
268 "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " 271 "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
269 "incrementing the item margin will add space between the focus rectangle and the item data." 272 "incrementing the item margin will add space between the focus rectangle and the item data."
270 ) ); 273 ) );
271 QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); 274 /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */
272 QWhatsThis::add( sbSpacing, i18n( 275 Q3WhatsThis::add( sbSpacing, i18n(
273 "The Item Spacing decides the distance (in pixels) between the items and anything else: the view " 276 "The Item Spacing decides the distance (in pixels) between the items and anything else: the view "
274 "borders, other items or column separators." 277 "borders, other items or column separators."
275 ) ); 278 ) );
276 QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); 279 /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */
277 QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); 280 Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
278 QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); 281 /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */
279 282
280 tabs->addTab( loTab, i18n("&Layout") ); 283 tabs->addTab( loTab, i18n("&Layout") );
281 284
282 // Colors 285 // Colors
283 QVBox *colorTab = new QVBox( this, "colortab" ); 286 Q3VBox *colorTab = new Q3VBox( this, "colortab" );
284 colorTab->setSpacing( spacing ); 287 colorTab->setSpacing( spacing );
285 colorTab->setMargin( spacing ); 288 colorTab->setMargin( spacing );
286 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); 289 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -288,16 +291,16 @@ void CardViewLookNFeelPage::initGUI()
288 lbColors = new ColorListBox( colorTab ); 291 lbColors = new ColorListBox( colorTab );
289 tabs->addTab( colorTab, i18n("&Colors") ); 292 tabs->addTab( colorTab, i18n("&Colors") );
290 293
291 QWhatsThis::add( cbEnableCustomColors, i18n( 294 Q3WhatsThis::add( cbEnableCustomColors, i18n(
292 "If custom colors are enabled, you may choose the colors for the view below. " 295 "If custom colors are enabled, you may choose the colors for the view below. "
293 "Otherwise colors from your current KDE color scheme are used." 296 "Otherwise colors from your current KDE color scheme are used."
294 ) ); 297 ) );
295 QWhatsThis::add( lbColors, i18n( 298 Q3WhatsThis::add( lbColors, i18n(
296 "Double click or press RETURN on a item to select a color for the related strings in the view." 299 "Double click or press RETURN on a item to select a color for the related strings in the view."
297 ) ); 300 ) );
298 301
299 // Fonts 302 // Fonts
300 QVBox *fntTab = new QVBox( this, "fonttab" ); 303 Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
301 304
302 fntTab->setSpacing( spacing ); 305 fntTab->setSpacing( spacing );
303 fntTab->setMargin( spacing ); 306 fntTab->setMargin( spacing );
@@ -306,13 +309,13 @@ void CardViewLookNFeelPage::initGUI()
306 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); 309 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
307 310
308 vbFonts = new QWidget( fntTab ); 311 vbFonts = new QWidget( fntTab );
309 QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); 312 Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
310 gFnts->setSpacing( spacing ); 313 gFnts->setSpacing( spacing );
311 gFnts->setAutoAdd( true ); 314 gFnts->setAutoAdd( true );
312 gFnts->setColStretch( 1, 1 ); 315 gFnts->setColStretch( 1, 1 );
313 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); 316 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
314 lTextFont = new QLabel( vbFonts ); 317 lTextFont = new QLabel( vbFonts );
315 lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 318 lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
316#ifndef KAB_EMBEDDED 319#ifndef KAB_EMBEDDED
317 btnFont = new KPushButton( i18n("Choose..."), vbFonts ); 320 btnFont = new KPushButton( i18n("Choose..."), vbFonts );
318#else //KAB_EMBEDDED 321#else //KAB_EMBEDDED
@@ -325,7 +328,7 @@ void CardViewLookNFeelPage::initGUI()
325 328
326 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); 329 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
327 lHeaderFont = new QLabel( vbFonts ); 330 lHeaderFont = new QLabel( vbFonts );
328 lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 331 lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
329#ifndef KAB_EMBEDDED 332#ifndef KAB_EMBEDDED
330 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); 333 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
331#else //KAB_EMBEDDED 334#else //KAB_EMBEDDED
@@ -336,7 +339,7 @@ void CardViewLookNFeelPage::initGUI()
336 339
337 fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); 340 fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
338 341
339 QWhatsThis::add( cbEnableCustomFonts, i18n( 342 Q3WhatsThis::add( cbEnableCustomFonts, i18n(
340 "If custom fonts are enabled, you may choose which fonts to use for this view below. " 343 "If custom fonts are enabled, you may choose which fonts to use for this view below. "
341 "Otherwise the default KDE font will be used, in bold style for the header and " 344 "Otherwise the default KDE font will be used, in bold style for the header and "
342 "normal style for the data." 345 "normal style for the data."
@@ -345,7 +348,7 @@ void CardViewLookNFeelPage::initGUI()
345 tabs->addTab( fntTab, i18n("&Fonts") ); 348 tabs->addTab( fntTab, i18n("&Fonts") );
346 349
347 // Behaviour 350 // Behaviour
348 QVBox *behaviourTab = new QVBox( this ); 351 Q3VBox *behaviourTab = new Q3VBox( this );
349 behaviourTab->setMargin( margin ); 352 behaviourTab->setMargin( margin );
350 behaviourTab->setSpacing( spacing ); 353 behaviourTab->setSpacing( spacing );
351 354
@@ -364,6 +367,6 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
364 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); 367 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
365} 368}
366 369
367#ifndef KAB_EMBEDDED 370#ifndef KAB_EMBEDDED_
368#include "configurecardviewdialog.moc" 371#include "moc_configurecardviewdialog.cpp"
369#endif //KAB_EMBEDDED 372#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h
index 7a62226..4af475d 100644
--- a/kaddressbook/views/configurecardviewdialog.h
+++ b/kaddressbook/views/configurecardviewdialog.h
@@ -26,9 +26,11 @@
26 26
27#include "viewconfigurewidget.h" 27#include "viewconfigurewidget.h"
28 28
29#include <qvbox.h> 29#include <q3vbox.h>
30#include <qwidget.h> 30#include <qwidget.h>
31#include <qfont.h> 31#include <qfont.h>
32//Added by qt3to4:
33#include <QLabel>
32 34
33class QString; 35class QString;
34class QWidget; 36class QWidget;
@@ -77,7 +79,7 @@ class ConfigureCardViewWidget : public ViewConfigureWidget
77 * item spacing 79 * item spacing
78*/ 80*/
79 81
80class CardViewLookNFeelPage : public QVBox { 82class CardViewLookNFeelPage : public Q3VBox {
81 83
82 Q_OBJECT 84 Q_OBJECT
83 85
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index c329cd9..7ed897a 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -27,11 +27,14 @@
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29#include <qcheckbox.h> 29#include <qcheckbox.h>
30#include <qvbox.h> 30#include <q3vbox.h>
31#include <qbuttongroup.h> 31#include <q3buttongroup.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qwhatsthis.h> 33#include <q3whatsthis.h>
34#include <qpushbutton.h> 34#include <qpushbutton.h>
35//Added by qt3to4:
36#include <Q3GridLayout>
37#include <Q3Frame>
35 38
36#include <kglobal.h> 39#include <kglobal.h>
37#include <klocale.h> 40#include <klocale.h>
@@ -84,7 +87,7 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
84 87
85 88
86LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) 89LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
87 : QVBox(parent, name) 90 : Q3VBox(parent, name)
88{ 91{
89 initGUI(); 92 initGUI();
90 93
@@ -229,12 +232,12 @@ void LookAndFeelPage::initGUI()
229 QTabWidget *tabs = new QTabWidget( this ); 232 QTabWidget *tabs = new QTabWidget( this );
230 233
231 // General 234 // General
232 QVBox *generalTab = new QVBox( this, "generaltab" ); 235 Q3VBox *generalTab = new Q3VBox( this, "generaltab" );
233 236
234 generalTab->setSpacing( spacing ); 237 generalTab->setSpacing( spacing );
235 generalTab->setMargin( margin ); 238 generalTab->setMargin( margin );
236 239
237 QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, 240 Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal,
238 i18n("Row Separator"), generalTab); 241 i18n("Row Separator"), generalTab);
239 242
240 mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), 243 mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
@@ -262,7 +265,7 @@ void LookAndFeelPage::initGUI()
262 tabs->addTab( generalTab, i18n("&General") ); 265 tabs->addTab( generalTab, i18n("&General") );
263 266
264 // Colors 267 // Colors
265 QVBox *colorTab = new QVBox( this, "colortab" ); 268 Q3VBox *colorTab = new Q3VBox( this, "colortab" );
266 colorTab->setSpacing( spacing ); 269 colorTab->setSpacing( spacing );
267 colorTab->setMargin( spacing ); 270 colorTab->setMargin( spacing );
268 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); 271 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -270,16 +273,16 @@ void LookAndFeelPage::initGUI()
270 lbColors = new ColorListBox( colorTab ); 273 lbColors = new ColorListBox( colorTab );
271 tabs->addTab( colorTab, i18n("&Colors") ); 274 tabs->addTab( colorTab, i18n("&Colors") );
272 275
273 QWhatsThis::add( cbEnableCustomColors, i18n( 276 Q3WhatsThis::add( cbEnableCustomColors, i18n(
274 "If custom colors are enabled, you may choose the colors for the view below. " 277 "If custom colors are enabled, you may choose the colors for the view below. "
275 "Otherwise colors from your current KDE color scheme are used." 278 "Otherwise colors from your current KDE color scheme are used."
276 ) ); 279 ) );
277 QWhatsThis::add( lbColors, i18n( 280 Q3WhatsThis::add( lbColors, i18n(
278 "Double click or press RETURN on a item to select a color for the related strings in the view." 281 "Double click or press RETURN on a item to select a color for the related strings in the view."
279 ) ); 282 ) );
280 283
281 // Fonts 284 // Fonts
282 QVBox *fntTab = new QVBox( this, "fonttab" ); 285 Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
283 286
284 fntTab->setSpacing( spacing ); 287 fntTab->setSpacing( spacing );
285 fntTab->setMargin( spacing ); 288 fntTab->setMargin( spacing );
@@ -288,13 +291,13 @@ void LookAndFeelPage::initGUI()
288 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); 291 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
289 292
290 vbFonts = new QWidget( fntTab ); 293 vbFonts = new QWidget( fntTab );
291 QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); 294 Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
292 gFnts->setSpacing( spacing ); 295 gFnts->setSpacing( spacing );
293 gFnts->setAutoAdd( true ); 296 gFnts->setAutoAdd( true );
294 gFnts->setColStretch( 1, 1 ); 297 gFnts->setColStretch( 1, 1 );
295 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); 298 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
296 lTextFont = new QLabel( vbFonts ); 299 lTextFont = new QLabel( vbFonts );
297 lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 300 lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
298#ifndef KAB_EMBEDDED 301#ifndef KAB_EMBEDDED
299 btnFont = new KPushButton( i18n("Choose..."), vbFonts ); 302 btnFont = new KPushButton( i18n("Choose..."), vbFonts );
300#else //KAB_EMBEDDED 303#else //KAB_EMBEDDED
@@ -307,7 +310,7 @@ void LookAndFeelPage::initGUI()
307 310
308 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); 311 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
309 lHeaderFont = new QLabel( vbFonts ); 312 lHeaderFont = new QLabel( vbFonts );
310 lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 313 lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
311#ifndef KAB_EMBEDDED 314#ifndef KAB_EMBEDDED
312 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); 315 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
313#else //KAB_EMBEDDED 316#else //KAB_EMBEDDED
@@ -318,7 +321,7 @@ void LookAndFeelPage::initGUI()
318 321
319 fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); 322 fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
320 323
321 QWhatsThis::add( cbEnableCustomFonts, i18n( 324 Q3WhatsThis::add( cbEnableCustomFonts, i18n(
322 "If custom fonts are enabled, you may choose which fonts to use for this view below. " 325 "If custom fonts are enabled, you may choose which fonts to use for this view below. "
323 "Otherwise the default KDE font will be used, in bold style for the header and " 326 "Otherwise the default KDE font will be used, in bold style for the header and "
324 "normal style for the data." 327 "normal style for the data."
@@ -340,6 +343,6 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l )
340 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); 343 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
341} 344}
342 345
343#ifndef KAB_EMBEDDED 346#ifndef KAB_EMBEDDED_
344#include "configuretableviewdialog.moc" 347#include "moc_configuretableviewdialog.cpp"
345#endif //KAB_EMBEDDED 348#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h
index 003ccf8..8125fc9 100644
--- a/kaddressbook/views/configuretableviewdialog.h
+++ b/kaddressbook/views/configuretableviewdialog.h
@@ -26,7 +26,9 @@
26 26
27#include "viewconfigurewidget.h" 27#include "viewconfigurewidget.h"
28 28
29#include <qvbox.h> 29#include <q3vbox.h>
30//Added by qt3to4:
31#include <QLabel>
30 32
31class QString; 33class QString;
32class QWidget; 34class QWidget;
@@ -63,7 +65,7 @@ class ConfigureTableViewWidget : public ViewConfigureWidget
63/** 65/**
64 Internal class. It is only defined here for moc 66 Internal class. It is only defined here for moc
65*/ 67*/
66class LookAndFeelPage : public QVBox 68class LookAndFeelPage : public Q3VBox
67{ 69{
68 Q_OBJECT 70 Q_OBJECT
69 71
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp
index 9accf78..227645d 100644
--- a/kaddressbook/views/contactlistview.cpp
+++ b/kaddressbook/views/contactlistview.cpp
@@ -21,15 +21,20 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qheader.h> 24#include <q3header.h>
25#include <qiconset.h> 25#include <qicon.h>
26#include <qimage.h> 26#include <qimage.h>
27#include <qdragobject.h> 27#include <q3dragobject.h>
28#include <qcombobox.h> 28#include <qcombobox.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qbrush.h> 30#include <qbrush.h>
31#include <qevent.h> 31#include <qevent.h>
32#include <qapplication.h> 32#include <qapplication.h>
33//Added by qt3to4:
34#include <QDropEvent>
35#include <QPixmap>
36#include <QMouseEvent>
37#include <QKeyEvent>
33 38
34#include <klocale.h> 39#include <klocale.h>
35#include <kglobalsettings.h> 40#include <kglobalsettings.h>
@@ -47,12 +52,13 @@
47// DynamicTip Methods 52// DynamicTip Methods
48 53
49DynamicTip::DynamicTip( ContactListView *parent) 54DynamicTip::DynamicTip( ContactListView *parent)
50 : QToolTip( parent ) 55 /* TODO:hacker:: QToolTip( parent ) */
51{ 56{
52} 57}
53 58
54void DynamicTip::maybeTip( const QPoint &pos ) 59void DynamicTip::maybeTip( const QPoint &pos )
55{ 60{
61 /* TODO:hacker:
56 static bool ishidden = true; 62 static bool ishidden = true;
57 if (!parentWidget()->inherits( "ContactListView" )) 63 if (!parentWidget()->inherits( "ContactListView" ))
58 return; 64 return;
@@ -63,7 +69,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
63 69
64 QPoint posVp = plv->viewport()->pos(); 70 QPoint posVp = plv->viewport()->pos();
65 71
66 QListViewItem *lvi = plv->itemAt( pos - posVp ); 72 Q3ListViewItem *lvi = plv->itemAt( pos - posVp );
67 if (!lvi) 73 if (!lvi)
68 return; 74 return;
69 75
@@ -151,7 +157,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
151 else 157 else
152 hide(); 158 hide();
153 ishidden = !ishidden; 159 ishidden = !ishidden;
154 160 */
155} 161}
156 162
157/////////////////////////// 163///////////////////////////
@@ -173,7 +179,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
173 int lan = KGlobal::locale()->language(); 179 int lan = KGlobal::locale()->language();
174 //qDebug("language %d ", lan); 180 //qDebug("language %d ", lan);
175 if ( lan == 1 ) { //GERMAN 181 if ( lan == 1 ) { //GERMAN
176 QString ret = QListViewItem::key(column, ascending).lower().utf8(); 182 QString ret = Q3ListViewItem::key(column, ascending).lower().utf8();
177 int start = -1; 183 int start = -1;
178 while ( (start = ret.find( 'ä', start+1)) > 0 ) { 184 while ( (start = ret.find( 'ä', start+1)) > 0 ) {
179 ret.at(start-1) = 'a'; 185 ret.at(start-1) = 'a';
@@ -197,7 +203,7 @@ QString ContactListViewItem::key(int column, bool ascending) const
197 } 203 }
198 else 204 else
199#endif 205#endif
200 return QListViewItem::key(column, ascending).lower(); 206 return Q3ListViewItem::key(column, ascending).lower();
201} 207}
202 208
203void ContactListViewItem::paintCell(QPainter * p, 209void ContactListViewItem::paintCell(QPainter * p,
@@ -288,7 +294,7 @@ void ContactListView::printMe()
288 return; 294 return;
289 QPainter p; 295 QPainter p;
290 p.begin ( &printer ); 296 p.begin ( &printer );
291 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 297 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
292 float dx, dy; 298 float dx, dy;
293 int wid = (m.width() * 9)/10; 299 int wid = (m.width() * 9)/10;
294 dx = (float) wid/(float)contentsWidth (); 300 dx = (float) wid/(float)contentsWidth ();
@@ -343,7 +349,7 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e)
343// To initiate a drag operation 349// To initiate a drag operation
344void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) 350void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
345{ 351{
346 if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { 352 if ((e->state() & Qt::LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) {
347 emit startAddresseeDrag(); 353 emit startAddresseeDrag();
348 } 354 }
349 else 355 else
@@ -353,7 +359,7 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e )
353bool ContactListView::acceptDrag(QDropEvent *e) const 359bool ContactListView::acceptDrag(QDropEvent *e) const
354{ 360{
355#ifndef KAB_EMBEDDED 361#ifndef KAB_EMBEDDED
356 return QTextDrag::canDecode(e); 362 return Q3TextDrag::canDecode(e);
357#else //KAB_EMBEDDED 363#else //KAB_EMBEDDED
358qDebug("ContactListView::acceptDrag has to be fixed"); 364qDebug("ContactListView::acceptDrag has to be fixed");
359 return false; 365 return false;
@@ -424,6 +430,6 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e )
424 } 430 }
425 KListView::keyReleaseEvent ( e ); 431 KListView::keyReleaseEvent ( e );
426} 432}
427#ifndef KAB_EMBEDDED 433#ifndef KAB_EMBEDDED_
428#include "contactlistview.moc" 434#include "moc_contactlistview.cpp"
429#endif //KAB_EMBEDDED 435#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/contactlistview.h b/kaddressbook/views/contactlistview.h
index 46477e1..c92b002 100644
--- a/kaddressbook/views/contactlistview.h
+++ b/kaddressbook/views/contactlistview.h
@@ -5,6 +5,10 @@
5#include <qpixmap.h> 5#include <qpixmap.h>
6#include <qtooltip.h> 6#include <qtooltip.h>
7#include <qstring.h> 7#include <qstring.h>
8//Added by qt3to4:
9#include <QDropEvent>
10#include <QMouseEvent>
11#include <QKeyEvent>
8 12
9#include <klistview.h> 13#include <klistview.h>
10 14
@@ -20,7 +24,7 @@ class ContactListView;
20/** The whole tooltip design needs a lot of work. Currently it is 24/** The whole tooltip design needs a lot of work. Currently it is
21* hacked together to function. 25* hacked together to function.
22*/ 26*/
23class DynamicTip : public QToolTip 27class DynamicTip /* TODO:hacker: : public QToolTip */
24{ 28{
25 public: 29 public:
26 DynamicTip( ContactListView * parent ); 30 DynamicTip( ContactListView * parent );
diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp
index b503652..1e5a556 100644
--- a/kaddressbook/views/kaddressbookcardview.cpp
+++ b/kaddressbook/views/kaddressbookcardview.cpp
@@ -21,13 +21,18 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qdragobject.h> 24#include <q3dragobject.h>
25#include <qevent.h> 25#include <qevent.h>
26#include <qiconview.h> 26#include <q3iconview.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29#include <qregexp.h> 29#include <qregexp.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <QDropEvent>
33#include <QKeyEvent>
34#include <Q3VBoxLayout>
35#include <QDragEnterEvent>
31 36
32#include <kabc/addressbook.h> 37#include <kabc/addressbook.h>
33#include <kabc/addressee.h> 38#include <kabc/addressee.h>
@@ -125,7 +130,7 @@ void AddresseeCardView::printMe()
125 return; 130 return;
126 QPainter p; 131 QPainter p;
127 p.begin ( &printer ); 132 p.begin ( &printer );
128 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 133 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
129 float dx, dy; 134 float dx, dy;
130 int wid = (m.width() * 9)/10; 135 int wid = (m.width() * 9)/10;
131 dx = (float) wid/(float)contentsWidth (); 136 dx = (float) wid/(float)contentsWidth ();
@@ -148,7 +153,7 @@ void AddresseeCardView::printMe()
148void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) 153void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e)
149{ 154{
150#ifndef KAB_EMBEDDED 155#ifndef KAB_EMBEDDED
151 if (QTextDrag::canDecode(e)) 156 if (Q3TextDrag::canDecode(e))
152 e->accept(); 157 e->accept();
153#else //KAB_EMBEDDED 158#else //KAB_EMBEDDED
154qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented"); 159qDebug("AddresseeCardView::dragEnterEvent drag&drop is not implemented");
@@ -176,7 +181,7 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab,
176 mShowEmptyFields = false; 181 mShowEmptyFields = false;
177 182
178 // Init the GUI 183 // Init the GUI
179 QVBoxLayout *layout = new QVBoxLayout(viewWidget()); 184 Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
180 185
181 mCardView = new AddresseeCardView(viewWidget(), "mCardView"); 186 mCardView = new AddresseeCardView(viewWidget(), "mCardView");
182 mCardView->setSelectionMode(CardView::Extended); 187 mCardView->setSelectionMode(CardView::Extended);
@@ -520,6 +525,6 @@ void KAddressBookCardView::addresseeSelected()
520 emit selected(QString::null); 525 emit selected(QString::null);
521 526
522} 527}
523#ifndef KAB_EMBEDDED 528#ifndef KAB_EMBEDDED_
524#include "kaddressbookcardview.moc" 529#include "moc_kaddressbookcardview.cpp"
525#endif //KAB_EMBEDDED 530#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h
index 2a71f7e..8f8e48b 100644
--- a/kaddressbook/views/kaddressbookcardview.h
+++ b/kaddressbook/views/kaddressbookcardview.h
@@ -25,6 +25,9 @@
25*/ 25*/
26 26
27#include <qstring.h> 27#include <qstring.h>
28//Added by qt3to4:
29#include <QDragEnterEvent>
30#include <QDropEvent>
28#ifndef KAB_EMBEDDED 31#ifndef KAB_EMBEDDED
29#include <kiconview.h> 32#include <kiconview.h>
30#else //KAB_EMBEDDED 33#else //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp
index d6ddec3..3a41a4b 100644
--- a/kaddressbook/views/kaddressbookiconview.cpp
+++ b/kaddressbook/views/kaddressbookiconview.cpp
@@ -22,7 +22,7 @@
22*/ 22*/
23 23
24#ifndef KAB_EMBEDDED 24#ifndef KAB_EMBEDDED
25#include <qiconview.h> 25#include <q3iconview.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27 27
28#include <kabc/addressee.h> 28#include <kabc/addressee.h>
@@ -35,6 +35,14 @@
35#else //KAB_EMBEDDED 35#else //KAB_EMBEDDED
36#endif //KAB_EMBEDDED 36#endif //KAB_EMBEDDED
37 37
38//Added by qt3to4:
39#include <QDropEvent>
40#include <Q3ValueList>
41#include <QPixmap>
42#include <QKeyEvent>
43#include <QEvent>
44#include <Q3VBoxLayout>
45
38#include <kabc/addressbook.h> 46#include <kabc/addressbook.h>
39#include "kabprefs.h" 47#include "kabprefs.h"
40#include "viewmanager.h" 48#include "viewmanager.h"
@@ -73,12 +81,12 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
73 : KIconView(parent, name) 81 : KIconView(parent, name)
74#else //KAB_EMBEDDED 82#else //KAB_EMBEDDED
75AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) 83AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
76 : QIconView(parent, name) 84 : Q3IconView(parent, name)
77#endif //KAB_EMBEDDED 85#endif //KAB_EMBEDDED
78 86
79{ 87{
80 setSelectionMode( QIconView::Extended ); 88 setSelectionMode( Q3IconView::Extended );
81 setResizeMode( QIconView::Adjust ); 89 setResizeMode( Q3IconView::Adjust );
82 setWordWrapIconText( true ); 90 setWordWrapIconText( true );
83 setGridX( 100 ); 91 setGridX( 100 );
84 setItemsMovable(false); 92 setItemsMovable(false);
@@ -89,8 +97,8 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name)
89 97
90#ifndef KAB_EMBEDDED 98#ifndef KAB_EMBEDDED
91 99
92 connect(this, SIGNAL(dropped(QDropEvent*, const QValueList<QIconDragItem>&)), 100 connect(this, SIGNAL(dropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)),
93 this, SLOT(itemDropped(QDropEvent*, const QValueList<QIconDragItem>&))); 101 this, SLOT(itemDropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)));
94#endif //KAB_EMBEDDED 102#endif //KAB_EMBEDDED
95} 103}
96 104
@@ -100,12 +108,12 @@ AddresseeIconView::~AddresseeIconView()
100 108
101 109
102void AddresseeIconView::itemDropped(QDropEvent *e, 110void AddresseeIconView::itemDropped(QDropEvent *e,
103 const QValueList<QIconDragItem> &) 111 const Q3ValueList<Q3IconDragItem> &)
104{ 112{
105 emit addresseeDropped(e); 113 emit addresseeDropped(e);
106} 114}
107 115
108QDragObject *AddresseeIconView::dragObject() 116Q3DragObject *AddresseeIconView::dragObject()
109{ 117{
110 emit startAddresseeDrag(); 118 emit startAddresseeDrag();
111 119
@@ -117,20 +125,20 @@ QDragObject *AddresseeIconView::dragObject()
117#ifndef KAB_EMBEDDED 125#ifndef KAB_EMBEDDED
118class AddresseeIconViewItem : public KIconViewItem 126class AddresseeIconViewItem : public KIconViewItem
119#else //KAB_EMBEDDED 127#else //KAB_EMBEDDED
120class AddresseeIconViewItem : public QIconViewItem 128class AddresseeIconViewItem : public Q3IconViewItem
121#endif //KAB_EMBEDDED 129#endif //KAB_EMBEDDED
122{ 130{
123 public: 131 public:
124#ifndef KAB_EMBEDDED 132#ifndef KAB_EMBEDDED
125 AddresseeIconViewItem(const KABC::Field::List &fields, 133 AddresseeIconViewItem(const KABC::Field::List &fields,
126 KABC::AddressBook *doc, const KABC::Addressee &a, 134 KABC::AddressBook *doc, const KABC::Addressee &a,
127 QIconView *parent) 135 Q3IconView *parent)
128 : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) 136 : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
129#else //KAB_EMBEDDED 137#else //KAB_EMBEDDED
130 AddresseeIconViewItem(const KABC::Field::List &fields, 138 AddresseeIconViewItem(const KABC::Field::List &fields,
131 KABC::AddressBook *doc, const KABC::Addressee &a, 139 KABC::AddressBook *doc, const KABC::Addressee &a,
132 QIconView *parent) 140 Q3IconView *parent)
133 : QIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) 141 : Q3IconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a)
134#endif //KAB_EMBEDDED 142#endif //KAB_EMBEDDED
135 { 143 {
136 if ( mFields.isEmpty() ) { 144 if ( mFields.isEmpty() ) {
@@ -200,7 +208,7 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
200 : KAddressBookView( ab, parent, name ) 208 : KAddressBookView( ab, parent, name )
201{ 209{
202 // Init the GUI 210 // Init the GUI
203 QVBoxLayout *layout = new QVBoxLayout(viewWidget()); 211 Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget());
204 212
205 mIconView = new AddresseeIconView(viewWidget(), "mIconView"); 213 mIconView = new AddresseeIconView(viewWidget(), "mIconView");
206 layout->addWidget(mIconView); 214 layout->addWidget(mIconView);
@@ -210,8 +218,8 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab,
210//US method executed is part of KIconView 218//US method executed is part of KIconView
211//US connect(mIconView, SIGNAL(executed(QIconViewItem *)), 219//US connect(mIconView, SIGNAL(executed(QIconViewItem *)),
212//US this, SLOT(addresseeExecuted(QIconViewItem *))); 220//US this, SLOT(addresseeExecuted(QIconViewItem *)));
213 connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), 221 connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
214 this, SLOT(addresseeExecuted(QIconViewItem *))); 222 this, SLOT(addresseeExecuted(Q3IconViewItem *)));
215 223
216 connect(mIconView, SIGNAL(selectionChanged()), 224 connect(mIconView, SIGNAL(selectionChanged()),
217 this, SLOT(addresseeSelected())); 225 this, SLOT(addresseeSelected()));
@@ -248,8 +256,8 @@ void KAddressBookIconView::readConfig(KConfig *config)
248//US method executed is part of KIconView 256//US method executed is part of KIconView
249//US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)), 257//US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)),
250//US this, SLOT(addresseeExecuted(QIconViewItem *))); 258//US this, SLOT(addresseeExecuted(QIconViewItem *)));
251 disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), 259 disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
252 this, SLOT(addresseeExecuted(QIconViewItem *))); 260 this, SLOT(addresseeExecuted(Q3IconViewItem *)));
253 261
254//US method executed is part of KIconView. Use selectionChanged instead 262//US method executed is part of KIconView. Use selectionChanged instead
255/*US 263/*US
@@ -260,8 +268,8 @@ void KAddressBookIconView::readConfig(KConfig *config)
260 connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)), 268 connect(mIconView, SIGNAL(doubleClicked(QIconViewItem *)),
261 this, SLOT(addresseeExecuted(QIconViewItem *))); 269 this, SLOT(addresseeExecuted(QIconViewItem *)));
262*/ 270*/
263 connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), 271 connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)),
264 this, SLOT(addresseeExecuted(QIconViewItem *))); 272 this, SLOT(addresseeExecuted(Q3IconViewItem *)));
265 273
266} 274}
267void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field ) 275void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
@@ -336,7 +344,7 @@ void KAddressBookIconView::doSearch( const QString& s ,KABC::Field *field )
336QStringList KAddressBookIconView::selectedUids() 344QStringList KAddressBookIconView::selectedUids()
337{ 345{
338 QStringList uidList; 346 QStringList uidList;
339 QIconViewItem *item; 347 Q3IconViewItem *item;
340 AddresseeIconViewItem *aItem; 348 AddresseeIconViewItem *aItem;
341 349
342 for (item = mIconView->firstItem(); item; item = item->nextItem()) 350 for (item = mIconView->firstItem(); item; item = item->nextItem())
@@ -358,7 +366,7 @@ QStringList KAddressBookIconView::selectedUids()
358 366
359void KAddressBookIconView::refresh(QString uid) 367void KAddressBookIconView::refresh(QString uid)
360{ 368{
361 QIconViewItem *item; 369 Q3IconViewItem *item;
362 AddresseeIconViewItem *aItem; 370 AddresseeIconViewItem *aItem;
363 371
364 if ( uid.isNull() ) { 372 if ( uid.isNull() ) {
@@ -406,7 +414,7 @@ void KAddressBookIconView::refresh(QString uid)
406 414
407void KAddressBookIconView::setSelected(QString uid, bool selected) 415void KAddressBookIconView::setSelected(QString uid, bool selected)
408{ 416{
409 QIconViewItem *item; 417 Q3IconViewItem *item;
410 AddresseeIconViewItem *aItem; 418 AddresseeIconViewItem *aItem;
411 419
412 if (uid.isNull()) 420 if (uid.isNull())
@@ -435,7 +443,7 @@ void KAddressBookIconView::setSelected(QString uid, bool selected)
435 } 443 }
436} 444}
437 445
438void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) 446void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item)
439{ 447{
440#ifndef KAB_EMBEDDED 448#ifndef KAB_EMBEDDED
441 AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item); 449 AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>(item);
@@ -450,7 +458,7 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item)
450 458
451void KAddressBookIconView::addresseeSelected() 459void KAddressBookIconView::addresseeSelected()
452{ 460{
453 QIconViewItem *item; 461 Q3IconViewItem *item;
454 AddresseeIconViewItem *aItem; 462 AddresseeIconViewItem *aItem;
455 463
456 bool found = false; 464 bool found = false;
@@ -476,6 +484,6 @@ void KAddressBookIconView::addresseeSelected()
476 emit selected(QString::null); 484 emit selected(QString::null);
477} 485}
478 486
479#ifndef KAB_EMBEDDED 487#ifndef KAB_EMBEDDED_
480#include "kaddressbookiconview.moc" 488#include "moc_kaddressbookiconview.cpp"
481#endif //KAB_EMBEDDED 489#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h
index b0b9fea..6fad4c6 100644
--- a/kaddressbook/views/kaddressbookiconview.h
+++ b/kaddressbook/views/kaddressbookiconview.h
@@ -25,20 +25,23 @@
25#define KADDRESSBOOKICONVIEW_H 25#define KADDRESSBOOKICONVIEW_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28//Added by qt3to4:
29#include <Q3ValueList>
30#include <QDropEvent>
28#ifndef KAB_EMBEDDED 31#ifndef KAB_EMBEDDED
29#include <kiconview.h> 32#include <kiconview.h>
30#else //KAB_EMBEDDED 33#else //KAB_EMBEDDED
31#include <qiconview.h> 34#include <q3iconview.h>
32#include <qptrlist.h> 35#include <q3ptrlist.h>
33#include <klocale.h> 36#include <klocale.h>
34#endif //KAB_EMBEDDED 37#endif //KAB_EMBEDDED
35#include "kaddressbookview.h" 38#include "kaddressbookview.h"
36 39
37class QIconViewItem; 40class Q3IconViewItem;
38class KConfig; 41class KConfig;
39class AddresseeIconView; 42class AddresseeIconView;
40class AddresseeIconViewItem; 43class AddresseeIconViewItem;
41class QIconDragItem; 44class Q3IconDragItem;
42class KAddressBookIconView; 45class KAddressBookIconView;
43 46
44namespace KABC { class AddressBook; } 47namespace KABC { class AddressBook; }
@@ -68,30 +71,30 @@ class KAddressBookIconView : public KAddressBookView
68 public slots: 71 public slots:
69 void refresh(QString uid = QString::null); 72 void refresh(QString uid = QString::null);
70#ifndef KAB_EMBEDDED 73#ifndef KAB_EMBEDDED
71//MOC_SKIP_BEGIN 74#ifndef Q_MOC_RUN
72 void setSelected(QString uid = QString::null, bool selected = true); 75 void setSelected(QString uid = QString::null, bool selected = true);
73//MOC_SKIP_END 76#endif
74#else //KAB_EMBEDDED 77#else //KAB_EMBEDDED
75//US my MOC do not like default parameters ??? 78//US my MOC do not like default parameters ???
76 void setSelected(QString uid, bool selected); 79 void setSelected(QString uid, bool selected);
77#endif //KAB_EMBEDDED 80#endif //KAB_EMBEDDED
78 81
79 protected slots: 82 protected slots:
80 void addresseeExecuted(QIconViewItem *item); 83 void addresseeExecuted(Q3IconViewItem *item);
81 void addresseeSelected(); 84 void addresseeSelected();
82 85
83 private: 86 private:
84 AddresseeIconView *mIconView; 87 AddresseeIconView *mIconView;
85 QPtrList<AddresseeIconViewItem> mIconList; 88 Q3PtrList<AddresseeIconViewItem> mIconList;
86}; 89};
87 90
88 91
89#ifndef KAB_EMBEDDED 92#ifndef KAB_EMBEDDED
90//MOC_SKIP_BEGIN 93#ifndef Q_MOC_RUN
91class AddresseeIconView : public KIconView 94class AddresseeIconView : public KIconView
92//MOC_SKIP_END 95#endif
93#else //KAB_EMBEDDED 96#else //KAB_EMBEDDED
94class AddresseeIconView : public QIconView 97class AddresseeIconView : public Q3IconView
95#endif //KAB_EMBEDDED 98#endif //KAB_EMBEDDED
96{ 99{
97 Q_OBJECT 100 Q_OBJECT
@@ -105,10 +108,10 @@ class AddresseeIconView : public QIconView
105 void startAddresseeDrag(); 108 void startAddresseeDrag();
106 109
107 protected: 110 protected:
108 virtual QDragObject *dragObject(); 111 virtual Q3DragObject *dragObject();
109 112
110 protected slots: 113 protected slots:
111 void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &); 114 void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &);
112}; 115};
113 116
114class IconViewFactory : public ViewFactory 117class IconViewFactory : public ViewFactory
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index 272f2eb..7efaaa9 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -1,16 +1,20 @@
1// $Id$ 1// $Id$
2 2
3#include <qvbox.h> 3#include <q3vbox.h>
4#include <qlistbox.h> 4#include <q3listbox.h>
5#include <qwidget.h> 5#include <qwidget.h>
6#include <qfile.h> 6#include <qfile.h>
7#include <qimage.h> 7#include <qimage.h>
8#include <qcombobox.h> 8#include <qcombobox.h>
9#include <qapplication.h> 9#include <qapplication.h>
10#include <qdragobject.h> 10#include <q3dragobject.h>
11#include <qevent.h> 11#include <qevent.h>
12#include <qurl.h> 12#include <q3url.h>
13#include <qpixmap.h> 13#include <qpixmap.h>
14//Added by qt3to4:
15#include <QDropEvent>
16#include <QKeyEvent>
17#include <Q3VBoxLayout>
14 18
15#include <kabc/addressbook.h> 19#include <kabc/addressbook.h>
16#include <kapplication.h> 20#include <kapplication.h>
@@ -32,7 +36,7 @@
32#include "viewmanager.h" 36#include "viewmanager.h"
33 37
34#include <qlayout.h> 38#include <qlayout.h>
35#include <qheader.h> 39#include <q3header.h>
36#include <qregexp.h> 40#include <qregexp.h>
37 41
38#include "kaddressbooktableview.h" 42#include "kaddressbooktableview.h"
@@ -42,7 +46,7 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab,
42 QWidget *parent, const char *name ) 46 QWidget *parent, const char *name )
43 : KAddressBookView( ab, parent, name ) 47 : KAddressBookView( ab, parent, name )
44{ 48{
45 mainLayout = new QVBoxLayout( viewWidget(), 2 ); 49 mainLayout = new Q3VBoxLayout( viewWidget(), 2 );
46 50
47 // The list view will be created when the config is read. 51 // The list view will be created when the config is read.
48 mListView = 0; 52 mListView = 0;
@@ -77,14 +81,14 @@ void KAddressBookTableView::reconstructListView()
77 { 81 {
78 disconnect(mListView, SIGNAL(selectionChanged()), 82 disconnect(mListView, SIGNAL(selectionChanged()),
79 this, SLOT(addresseeSelected())); 83 this, SLOT(addresseeSelected()));
80 disconnect(mListView, SIGNAL(executed(QListViewItem*)), 84 disconnect(mListView, SIGNAL(executed(Q3ListViewItem*)),
81 this, SLOT(addresseeExecuted(QListViewItem*))); 85 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
82 disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), 86 disconnect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
83 this, SLOT(addresseeExecuted(QListViewItem*))); 87 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
84 disconnect(mListView, SIGNAL(startAddresseeDrag()), this, 88 disconnect(mListView, SIGNAL(startAddresseeDrag()), this,
85 SIGNAL(startDrag())); 89 SIGNAL(startDrag()));
86 disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), 90 disconnect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
87 this, SLOT(addresseeExecuted(QListViewItem*))); 91 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
88 92
89 disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, 93 disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this,
90 SIGNAL(dropped(QDropEvent*))); 94 SIGNAL(dropped(QDropEvent*)));
@@ -105,7 +109,7 @@ void KAddressBookTableView::reconstructListView()
105 int c = 0; 109 int c = 0;
106 for( it = fieldList.begin(); it != fieldList.end(); ++it ) { 110 for( it = fieldList.begin(); it != fieldList.end(); ++it ) {
107 mListView->addColumn( (*it)->label() ); 111 mListView->addColumn( (*it)->label() );
108 mListView->setColumnWidthMode(c++, QListView::Manual); 112 mListView->setColumnWidthMode(c++, Q3ListView::Manual);
109//US 113//US
110 // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1()); 114 // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1());
111 } 115 }
@@ -119,15 +123,15 @@ void KAddressBookTableView::reconstructListView()
119 123
120 if (KABPrefs::instance()->mHonorSingleClick) { 124 if (KABPrefs::instance()->mHonorSingleClick) {
121 // qDebug("KAddressBookTableView::reconstructListView single"); 125 // qDebug("KAddressBookTableView::reconstructListView single");
122 connect(mListView, SIGNAL(executed(QListViewItem*)), 126 connect(mListView, SIGNAL(executed(Q3ListViewItem*)),
123 this, SLOT(addresseeExecuted(QListViewItem*))); 127 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
124 } else { 128 } else {
125 // qDebug("KAddressBookTableView::reconstructListView double"); 129 // qDebug("KAddressBookTableView::reconstructListView double");
126 connect(mListView, SIGNAL(doubleClicked(QListViewItem*)), 130 connect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)),
127 this, SLOT(addresseeExecuted(QListViewItem*))); 131 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
128 } 132 }
129 connect(mListView, SIGNAL(returnPressed(QListViewItem*)), 133 connect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)),
130 this, SLOT(addresseeExecuted(QListViewItem*))); 134 this, SLOT(addresseeExecuted(Q3ListViewItem*)));
131 connect(mListView, SIGNAL(signalDelete()), 135 connect(mListView, SIGNAL(signalDelete()),
132 this, SLOT(addresseeDeleted())); 136 this, SLOT(addresseeDeleted()));
133 137
@@ -344,7 +348,7 @@ void KAddressBookTableView::refresh(QString uid)
344 } else { 348 } else {
345 // Only need to update on entry. Iterate through and try to find it 349 // Only need to update on entry. Iterate through and try to find it
346 ContactListViewItem *ceItem; 350 ContactListViewItem *ceItem;
347 QListViewItemIterator it( mListView ); 351 Q3ListViewItemIterator it( mListView );
348 while ( it.current() ) { 352 while ( it.current() ) {
349#ifndef KAB_EMBEDDED 353#ifndef KAB_EMBEDDED
350 ceItem = dynamic_cast<ContactListViewItem*>( it.current() ); 354 ceItem = dynamic_cast<ContactListViewItem*>( it.current() );
@@ -366,7 +370,7 @@ void KAddressBookTableView::refresh(QString uid)
366QStringList KAddressBookTableView::selectedUids() 370QStringList KAddressBookTableView::selectedUids()
367{ 371{
368 QStringList uidList; 372 QStringList uidList;
369 QListViewItem *item; 373 Q3ListViewItem *item;
370 ContactListViewItem *ceItem; 374 ContactListViewItem *ceItem;
371 375
372 for(item = mListView->firstChild(); item; item = item->itemBelow()) 376 for(item = mListView->firstChild(); item; item = item->itemBelow())
@@ -394,7 +398,7 @@ QStringList KAddressBookTableView::selectedUids()
394 398
395void KAddressBookTableView::setSelected(QString uid, bool selected) 399void KAddressBookTableView::setSelected(QString uid, bool selected)
396{ 400{
397 QListViewItem *item; 401 Q3ListViewItem *item;
398 ContactListViewItem *ceItem; 402 ContactListViewItem *ceItem;
399 403
400 if (uid.isNull()) 404 if (uid.isNull())
@@ -429,7 +433,7 @@ void KAddressBookTableView::addresseeSelected()
429 // last selected item, but when QListView is in multiselection mode, 433 // last selected item, but when QListView is in multiselection mode,
430 // there is no way to figure out which one was 434 // there is no way to figure out which one was
431 // selected last. 435 // selected last.
432 QListViewItem *item; 436 Q3ListViewItem *item;
433 bool found =false; 437 bool found =false;
434 for (item = mListView->firstChild(); item && !found; 438 for (item = mListView->firstChild(); item && !found;
435 item = item->nextSibling()) 439 item = item->nextSibling())
@@ -453,7 +457,7 @@ void KAddressBookTableView::addresseeSelected()
453 emit selected(QString::null); 457 emit selected(QString::null);
454} 458}
455 459
456void KAddressBookTableView::addresseeExecuted(QListViewItem *item) 460void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item)
457{ 461{
458 if (item) 462 if (item)
459 { 463 {
@@ -487,6 +491,6 @@ void KAddressBookTableView::addresseeDeleted()
487 491
488 492
489 493
490#ifndef KAB_EMBEDDED 494#ifndef KAB_EMBEDDED_
491#include "kaddressbooktableview.moc" 495#include "moc_kaddressbooktableview.cpp"
492#endif //KAB_EMBEDDED 496#endif //KAB_EMBEDDED
diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h
index 38db7b4..c3cb038 100644
--- a/kaddressbook/views/kaddressbooktableview.h
+++ b/kaddressbook/views/kaddressbooktableview.h
@@ -10,12 +10,12 @@
10#endif 10#endif
11 11
12#include <qwidget.h> 12#include <qwidget.h>
13#include <qlistview.h> 13#include <q3listview.h>
14#include <qstring.h> 14#include <qstring.h>
15#include <qdialog.h> 15#include <qdialog.h>
16#include <qtabdialog.h> 16#include <q3tabdialog.h>
17#include <qstringlist.h> 17#include <qstringlist.h>
18#include <qvaluelist.h> 18#include <q3valuelist.h>
19 19
20#include "undo.h" 20#include "undo.h"
21 21
@@ -25,10 +25,12 @@
25 25
26#include "klocale.h" 26#include "klocale.h"
27#include "kaddressbookview.h" 27#include "kaddressbookview.h"
28//Added by qt3to4:
29#include <Q3VBoxLayout>
28 30
29class QListViewItem; 31class Q3ListViewItem;
30class QListBox; 32class Q3ListBox;
31class QVBoxLayout; 33class Q3VBoxLayout;
32class KConfig; 34class KConfig;
33 35
34class ContactListViewItem; 36class ContactListViewItem;
@@ -79,10 +81,10 @@ friend class ContactListView;
79 /** Called whenever the user executes an addressee. In terms of the 81 /** Called whenever the user executes an addressee. In terms of the
80 * list view, this is probably a double click 82 * list view, this is probably a double click
81 */ 83 */
82 void addresseeExecuted(QListViewItem*); 84 void addresseeExecuted(Q3ListViewItem*);
83 85
84 private: 86 private:
85 QVBoxLayout *mainLayout; 87 Q3VBoxLayout *mainLayout;
86 ContactListView *mListView; 88 ContactListView *mListView;
87}; 89};
88 90
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp
index 7281003..ed5807f 100644
--- a/kaddressbook/xxport/csv_xxport.cpp
+++ b/kaddressbook/xxport/csv_xxport.cpp
@@ -30,7 +30,7 @@ $Id$
30 30
31#include <qfile.h> 31#include <qfile.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qtextstream.h> 33#include <q3textstream.h>
34#include <qtextcodec.h> 34#include <qtextcodec.h>
35 35
36#include <kfiledialog.h> 36#include <kfiledialog.h>
@@ -104,7 +104,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
104 return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); 104 return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() );
105 } else { 105 } else {
106 QFile file( url.path() ); 106 QFile file( url.path() );
107 if ( !file.open( IO_WriteOnly ) ) { 107 if ( !file.open( QIODevice::WriteOnly ) ) {
108 QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); 108 QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
109 KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); 109 KMessageBox::error( parentWidget(), txt.arg( url.path() ) );
110 return false; 110 return false;
@@ -124,7 +124,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString&
124 return false; 124 return false;
125 125
126 QFile file( fileName ); 126 QFile file( fileName );
127 if ( !file.open( IO_WriteOnly ) ) { 127 if ( !file.open( QIODevice::WriteOnly ) ) {
128 QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); 128 QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" );
129 KMessageBox::error( parentWidget(), txt.arg( fileName ) ); 129 KMessageBox::error( parentWidget(), txt.arg( fileName ) );
130 return false; 130 return false;
@@ -151,7 +151,7 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const
151 151
152void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) 152void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
153{ 153{
154 QTextStream t( fp ); 154 Q3TextStream t( fp );
155 t.setCodec( QTextCodec::codecForName("utf8") ); 155 t.setCodec( QTextCodec::codecForName("utf8") );
156 156
157 KABC::AddresseeList::ConstIterator iter; 157 KABC::AddresseeList::ConstIterator iter;
@@ -187,8 +187,6 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list )
187 } 187 }
188} 188}
189 189
190#ifndef KAB_EMBEDDED 190#ifndef KAB_EMBEDDED_
191#include "csv_xxport.moc" 191#include "moc_csv_xxport.cpp"
192#endif //KAB_EMBEDDED 192#endif //KAB_EMBEDDED
193
194
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index 862241e..7959cac 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -27,7 +27,7 @@ $Id$
27*/ 27*/
28 28
29 29
30#include <qbuttongroup.h> 30#include <q3buttongroup.h>
31#include <qcheckbox.h> 31#include <qcheckbox.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
@@ -39,10 +39,14 @@ $Id$
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qtable.h> 42#include <q3table.h>
43#include <qlayout.h> 43#include <qlayout.h>
44#include <qtextstream.h> 44#include <q3textstream.h>
45#include <qfile.h> 45#include <qfile.h>
46//Added by qt3to4:
47#include <Q3HBoxLayout>
48#include <Q3ValueList>
49#include <Q3GridLayout>
46 50
47#include <kapplication.h> 51#include <kapplication.h>
48#include <kdebug.h> 52#include <kdebug.h>
@@ -56,7 +60,7 @@ $Id$
56#include <kurlrequester.h> 60#include <kurlrequester.h>
57 61
58#ifdef DESKTOP_VERSION 62#ifdef DESKTOP_VERSION
59#include "qtable.h" 63#include "q3table.h"
60#else 64#else
61#include "qcombotableitem.h" 65#include "qcombotableitem.h"
62#endif 66#endif
@@ -161,7 +165,7 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
161 this, SLOT( saveTemplate() ) ); 165 this, SLOT( saveTemplate() ) );
162 166
163 // if ( QApplication::desktop()->width() < 321 ) 167 // if ( QApplication::desktop()->width() < 321 )
164 QIconSet icon = SmallIcon("filesave"); 168 QIcon icon = SmallIcon("filesave");
165 169
166 findButton( User2 )->setIconSet (icon ) ; 170 findButton( User2 )->setIconSet (icon ) ;
167 icon = SmallIcon("fileopen"); 171 icon = SmallIcon("fileopen");
@@ -186,7 +190,7 @@ KABC::AddresseeList CSVImportDialog::contacts() const
186 KABC::Address addrWork( KABC::Address::Work ); 190 KABC::Address addrWork( KABC::Address::Work );
187 for ( int col = 0; col < mTable->numCols(); ++col ) { 191 for ( int col = 0; col < mTable->numCols(); ++col ) {
188 192
189 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); 193 Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) );
190 194
191 if ( !item ) { 195 if ( !item ) {
192 qDebug( "ERROR: item cast failed" ); 196 qDebug( "ERROR: item cast failed" );
@@ -229,7 +233,7 @@ KABC::AddresseeList CSVImportDialog::contacts() const
229// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? 233// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
230 { 234 {
231 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate 235 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
232 a.setBirthday(dt); 236 a.setBirthday(QDateTime(dt));
233 } 237 }
234 break; 238 break;
235 case Email: 239 case Email:
@@ -382,9 +386,9 @@ void CSVImportDialog::initGUI()
382{ 386{
383 QWidget* page = plainPage(); 387 QWidget* page = plainPage();
384 388
385 QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(), 389 Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHintSmall(),
386 spacingHintSmall() ); 390 spacingHintSmall() );
387 QHBoxLayout *hbox = new QHBoxLayout(); 391 Q3HBoxLayout *hbox = new Q3HBoxLayout();
388 hbox->setSpacing( spacingHint() ); 392 hbox->setSpacing( spacingHint() );
389 393
390 QLabel *label = new QLabel( i18n( "File to import:" ), page ); 394 QLabel *label = new QLabel( i18n( "File to import:" ), page );
@@ -397,11 +401,11 @@ void CSVImportDialog::initGUI()
397 layout->addMultiCellLayout( hbox, 0, 0, 0, 2 ); 401 layout->addMultiCellLayout( hbox, 0, 0, 0, 2 );
398 402
399 // Delimiter: comma, semicolon, tab, space, other 403 // Delimiter: comma, semicolon, tab, space, other
400 mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), page ); 404 mDelimiterBox = new Q3ButtonGroup( i18n( "Delimiter" ), page );
401 mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); 405 mDelimiterBox->setColumnLayout( 0, Qt::Vertical );
402 mDelimiterBox->layout()->setSpacing( spacingHint() ); 406 mDelimiterBox->layout()->setSpacing( spacingHint() );
403 mDelimiterBox->layout()->setMargin( marginHint() ); 407 mDelimiterBox->layout()->setMargin( marginHint() );
404 QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); 408 Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() );
405 delimiterLayout->setAlignment( Qt::AlignTop ); 409 delimiterLayout->setAlignment( Qt::AlignTop );
406 layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 ); 410 layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 );
407 411
@@ -450,8 +454,8 @@ void CSVImportDialog::initGUI()
450 mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); 454 mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) );
451 layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 ); 455 layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 );
452 456
453 mTable = new QTable( 0, 0, page ); 457 mTable = new Q3Table( 0, 0, page );
454 mTable->setSelectionMode( QTable::NoSelection ); 458 mTable->setSelectionMode( Q3Table::NoSelection );
455 //mTable->horizontalHeader()->hide(); 459 //mTable->horizontalHeader()->hide();
456 layout->addMultiCellWidget( mTable, 5, 5, 0, 2 ); 460 layout->addMultiCellWidget( mTable, 5, 5, 0, 2 );
457/*US 461/*US
@@ -483,11 +487,11 @@ void CSVImportDialog::fillTable()
483 QString field = ""; 487 QString field = "";
484 488
485 // store previous assignment 489 // store previous assignment
486 QValueList<int> mTypeOld = mTypeStore; 490 Q3ValueList<int> mTypeOld = mTypeStore;
487 491
488 mTypeStore.clear(); 492 mTypeStore.clear();
489 for ( column = 0; column < mTable->numCols(); ++column ) { 493 for ( column = 0; column < mTable->numCols(); ++column ) {
490 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, column ) ); 494 Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) );
491 495
492 if ( !item || mClearTypeStore ) 496 if ( !item || mClearTypeStore )
493 mTypeStore.append( typeToPos( Undefined ) ); 497 mTypeStore.append( typeToPos( Undefined ) );
@@ -506,14 +510,14 @@ void CSVImportDialog::fillTable()
506 mData = QString::fromLocal8Bit( mFileArray.data() ); 510 mData = QString::fromLocal8Bit( mFileArray.data() );
507 } 511 }
508 512
509 QTextStream inputStream( mData, IO_ReadOnly ); 513 Q3TextStream inputStream( mData, QIODevice::ReadOnly );
510 514
511 if ( mComboCodec->currentItem () == 0 ) { 515 if ( mComboCodec->currentItem () == 0 ) {
512 inputStream.setEncoding( QTextStream::UnicodeUTF8 ); 516 inputStream.setEncoding( Q3TextStream::UnicodeUTF8 );
513 } else if ( mComboCodec->currentItem () == 1 ) { 517 } else if ( mComboCodec->currentItem () == 1 ) {
514 inputStream.setEncoding( QTextStream::Latin1 ); 518 inputStream.setEncoding( Q3TextStream::Latin1 );
515 } else { 519 } else {
516 inputStream.setEncoding( QTextStream::Locale ); 520 inputStream.setEncoding( Q3TextStream::Locale );
517 } 521 }
518 522
519 int maxColumn = 0; 523 int maxColumn = 0;
@@ -526,7 +530,7 @@ void CSVImportDialog::fillTable()
526 case S_START : 530 case S_START :
527 if ( x == mTextQuote ) { 531 if ( x == mTextQuote ) {
528 state = S_QUOTED_FIELD; 532 state = S_QUOTED_FIELD;
529 } else if ( x == mDelimiter ) { 533 } else if ( QString(x) == mDelimiter ) {
530 if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) 534 if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) )
531 ++column; 535 ++column;
532 lastCharDelimiter = true; 536 lastCharDelimiter = true;
@@ -561,7 +565,7 @@ void CSVImportDialog::fillTable()
561 if ( x == mTextQuote ) { 565 if ( x == mTextQuote ) {
562 field += x; 566 field += x;
563 state = S_QUOTED_FIELD; 567 state = S_QUOTED_FIELD;
564 } else if ( x == mDelimiter || x == '\n' ) { 568 } else if ( QString(x) == mDelimiter || x == '\n' ) {
565 setText( row - mStartLine + 1, column, field ); 569 setText( row - mStartLine + 1, column, field );
566 field = ""; 570 field = "";
567 if ( x == '\n' ) { 571 if ( x == '\n' ) {
@@ -578,7 +582,7 @@ void CSVImportDialog::fillTable()
578 } 582 }
579 break; 583 break;
580 case S_END_OF_QUOTED_FIELD : 584 case S_END_OF_QUOTED_FIELD :
581 if ( x == mDelimiter || x == '\n' ) { 585 if ( QString(x) == mDelimiter || x == '\n' ) {
582 setText( row - mStartLine + 1, column, field ); 586 setText( row - mStartLine + 1, column, field );
583 field = ""; 587 field = "";
584 if ( x == '\n' ) { 588 if ( x == '\n' ) {
@@ -601,7 +605,7 @@ void CSVImportDialog::fillTable()
601 break; 605 break;
602 } 606 }
603 case S_NORMAL_FIELD : 607 case S_NORMAL_FIELD :
604 if ( x == mDelimiter || x == '\n' ) { 608 if ( QString(x) == mDelimiter || x == '\n' ) {
605 setText( row - mStartLine + 1, column, field ); 609 setText( row - mStartLine + 1, column, field );
606 field = ""; 610 field = "";
607 if ( x == '\n' ) { 611 if ( x == '\n' ) {
@@ -617,7 +621,7 @@ void CSVImportDialog::fillTable()
617 field += x; 621 field += x;
618 } 622 }
619 } 623 }
620 if ( x != mDelimiter ) 624 if ( QString(x) != mDelimiter )
621 lastCharDelimiter = false; 625 lastCharDelimiter = false;
622 626
623 if ( column > maxColumn ) 627 if ( column > maxColumn )
@@ -649,7 +653,7 @@ void CSVImportDialog::fillTable()
649 for ( column = 0; column < mTable->numCols(); ++column ) { 653 for ( column = 0; column < mTable->numCols(); ++column ) {
650 654
651//US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); 655//US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() );
652 QComboTableItem *item = new QComboTableItem( mTable, keys ); 656 Q3ComboTableItem *item = new Q3ComboTableItem( mTable, keys );
653 mTable->setItem( 0, column, item ); 657 mTable->setItem( 0, column, item );
654 if ( column < mTypeStore.count() ) 658 if ( column < mTypeStore.count() )
655 item->setCurrentItem( mTypeStore[ column ] ); 659 item->setCurrentItem( mTypeStore[ column ] );
@@ -764,7 +768,7 @@ void CSVImportDialog::slotOk()
764 bool assigned = false; 768 bool assigned = false;
765 769
766 for ( int column = 0; column < mTable->numCols(); ++column ) { 770 for ( int column = 0; column < mTable->numCols(); ++column ) {
767 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, 771 Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0,
768 column ) ); 772 column ) );
769 if ( item && posToType( item->currentItem() ) != Undefined ) 773 if ( item && posToType( item->currentItem() ) != Undefined )
770 assigned = true; 774 assigned = true;
@@ -836,7 +840,7 @@ void CSVImportDialog::applyTemplate()
836 // apply the column map 840 // apply the column map
837 for ( uint column = 0; column < columnMap.count(); ++column ) { 841 for ( uint column = 0; column < columnMap.count(); ++column ) {
838 int type = columnMap[ column ]; 842 int type = columnMap[ column ];
839 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, 843 Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0,
840 column ) ); 844 column ) );
841 if ( item ) 845 if ( item )
842 item->setCurrentItem( typeToPos( type ) ); 846 item->setCurrentItem( typeToPos( type ) );
@@ -878,7 +882,7 @@ void CSVImportDialog::saveTemplate()
878 config.setGroup( "csv column map" ); 882 config.setGroup( "csv column map" );
879 883
880 for ( uint column = 0; column < mTable->numCols(); ++column ) { 884 for ( uint column = 0; column < mTable->numCols(); ++column ) {
881 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, 885 Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0,
882 column ) ); 886 column ) );
883 if ( item ) 887 if ( item )
884 config.writeEntry( QString::number( column ), posToType( 888 config.writeEntry( QString::number( column ), posToType(
@@ -934,7 +938,7 @@ void CSVImportDialog::setFile( const QString &fileName )
934 return; 938 return;
935 939
936 QFile file( fileName ); 940 QFile file( fileName );
937 if ( !file.open( IO_ReadOnly ) ) { 941 if ( !file.open( QIODevice::ReadOnly ) ) {
938 KMessageBox::sorry( this, i18n( "Cannot open input file!" ) ); 942 KMessageBox::sorry( this, i18n( "Cannot open input file!" ) );
939 file.close(); 943 file.close();
940 return; 944 return;
@@ -964,6 +968,6 @@ void CSVImportDialog::urlChanged( const QString &file )
964 968
965} 969}
966 970
967#ifndef KAB_EMBEDDED 971#ifndef KAB_EMBEDDED_
968#include <csvimportdialog.moc> 972#include <moc_csvimportdialog.cpp>
969#endif //KAB_EMBEDDED 973#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h
index 2661420..520f3fa 100644
--- a/kaddressbook/xxport/csvimportdialog.h
+++ b/kaddressbook/xxport/csvimportdialog.h
@@ -33,17 +33,17 @@ $Id$
33#include <kabc/addresseelist.h> 33#include <kabc/addresseelist.h>
34#include <kdialogbase.h> 34#include <kdialogbase.h>
35 35
36#include <qvaluelist.h> 36#include <q3valuelist.h>
37 37
38class KURLRequester; 38class KURLRequester;
39 39
40class QButtonGroup; 40class Q3ButtonGroup;
41class QComboBox; 41class QComboBox;
42class QCheckBox; 42class QCheckBox;
43class QLineEdit; 43class QLineEdit;
44class QPushButton; 44class QPushButton;
45class QRadioButton; 45class QRadioButton;
46class QTable; 46class Q3Table;
47 47
48class CSVImportDialog : public KDialogBase 48class CSVImportDialog : public KDialogBase
49{ 49{
@@ -85,8 +85,8 @@ class CSVImportDialog : public KDialogBase
85 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories 85 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories
86 }; 86 };
87 87
88 QTable* mTable; 88 Q3Table* mTable;
89 QButtonGroup* mDelimiterBox; 89 Q3ButtonGroup* mDelimiterBox;
90 QRadioButton* mRadioComma; 90 QRadioButton* mRadioComma;
91 QRadioButton* mRadioSemicolon; 91 QRadioButton* mRadioSemicolon;
92 QRadioButton* mRadioTab; 92 QRadioButton* mRadioTab;
@@ -119,7 +119,7 @@ class CSVImportDialog : public KDialogBase
119 KABC::AddressBook *mAddressBook; 119 KABC::AddressBook *mAddressBook;
120 int mCustomCounter; 120 int mCustomCounter;
121 bool mClearTypeStore; 121 bool mClearTypeStore;
122 QValueList<int> mTypeStore; 122 Q3ValueList<int> mTypeStore;
123 123
124}; 124};
125 125
diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp
index 03efc1b..72d3fc2 100644
--- a/kaddressbook/xxport/kde2_xxport.cpp
+++ b/kaddressbook/xxport/kde2_xxport.cpp
@@ -116,6 +116,6 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const
116 return KABC::AddresseeList(); 116 return KABC::AddresseeList();
117} 117}
118 118
119#ifndef KAB_EMBEDDED 119#ifndef KAB_EMBEDDED_
120#include "kde2_xxport.moc" 120#include "moc_kde2_xxport.cpp"
121#endif //KAB_EMBEDDED 121#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp
index 9a8fa68..64b9071 100644
--- a/kaddressbook/xxport/vcard_xxport.cpp
+++ b/kaddressbook/xxport/vcard_xxport.cpp
@@ -29,8 +29,10 @@
29*/ 29*/
30 30
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <q3textstream.h>
33#include <qfileinfo.h> 33#include <qfileinfo.h>
34//Added by qt3to4:
35#include <Q3CString>
34 36
35#include <kabc/vcardconverter.h> 37#include <kabc/vcardconverter.h>
36#include <kabc/vcardparser/vcardtool.h> 38#include <kabc/vcardparser/vcardtool.h>
@@ -102,14 +104,14 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString
102 return false; 104 return false;
103 105
104 QFile outFile( fileName ); 106 QFile outFile( fileName );
105 if ( !outFile.open( IO_WriteOnly ) ) { 107 if ( !outFile.open( QIODevice::WriteOnly ) ) {
106 QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); 108 QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" );
107 KMessageBox::error( parentWidget(), text.arg( fileName ) ); 109 KMessageBox::error( parentWidget(), text.arg( fileName ) );
108 return false; 110 return false;
109 } 111 }
110 112
111 QTextStream t( &outFile ); 113 Q3TextStream t( &outFile );
112 t.setEncoding( QTextStream::UnicodeUTF8 ); 114 t.setEncoding( Q3TextStream::UnicodeUTF8 );
113 115
114 KABC::Addressee::List::ConstIterator it; 116 KABC::Addressee::List::ConstIterator it;
115 for ( it = list.begin(); it != list.end(); ++it ) { 117 for ( it = list.begin(); it != list.end(); ++it ) {
@@ -153,7 +155,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
153 if ( KIO::NetAccess::download( url, fileName ) ) { 155 if ( KIO::NetAccess::download( url, fileName ) ) {
154 QFile file( fileName ); 156 QFile file( fileName );
155 157
156 file.open( IO_ReadOnly ); 158 file.open( QIODevice::ReadOnly );
157 QByteArray rawData = file.readAll(); 159 QByteArray rawData = file.readAll();
158 file.close(); 160 file.close();
159 161
@@ -196,8 +198,8 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const
196 198
197 } 199 }
198 QFile file( fileName ); 200 QFile file( fileName );
199 if ( file.open( IO_ReadOnly ) ) { 201 if ( file.open( QIODevice::ReadOnly ) ) {
200 QCString rawData ( file.readAll().data(),file.size()+1); 202 Q3CString rawData ( file.readAll().data(),file.size()+1);
201 file.close(); 203 file.close();
202 int start = 0; 204 int start = 0;
203#ifndef DESKTOP_VERSION 205#ifndef DESKTOP_VERSION
@@ -267,6 +269,6 @@ KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const
267} 269}
268 270
269 271
270#ifndef KAB_EMBEDDED 272#ifndef KAB_EMBEDDED_
271#include "vcard_xxport.moc" 273#include "moc_vcard_xxport.cpp"
272#endif //KAB_EMBEDDED 274#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 405f7ec..95b240d 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -30,6 +30,8 @@ $Id$
30 30
31#include <qlayout.h> 31#include <qlayout.h>
32#include <qlist.h> 32#include <qlist.h>
33//Added by qt3to4:
34#include <Q3VBoxLayout>
33 35
34#include <kabc/addressbook.h> 36#include <kabc/addressbook.h>
35#include <kabc/resource.h> 37#include <kabc/resource.h>
@@ -217,7 +219,7 @@ void XXPortManager::loadPlugins()
217 } 219 }
218 220
219#else //KAB_EMBEDDED 221#else //KAB_EMBEDDED
220 QList<XXPortFactory> factorylist; 222 QList<XXPortFactory*> factorylist;
221 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); 223 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport()));
222 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport())); 224 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport()));
223 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport())); 225 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_vcard_xxport()));
@@ -225,10 +227,8 @@ void XXPortManager::loadPlugins()
225 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport())); 227 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_qtopia_xxport()));
226 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport())); 228 factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport()));
227 229
228 QListIterator<XXPortFactory> it(factorylist); 230 for(QList<XXPortFactory*>::iterator it=factorylist.begin();it!=factorylist.end();++it) {
229 for ( ; it.current(); ++it ) 231 XXPortFactory *xxportFactory = *it;
230 {
231 XXPortFactory *xxportFactory = it.current();
232#endif //KAB_EMBEDDED 232#endif //KAB_EMBEDDED
233 233
234 XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore ); 234 XXPortObject *obj = xxportFactory->xxportObject( mCore->addressBook(), mCore );
@@ -250,7 +250,7 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
250 name, true, true ,i18n( "Import all!" ),i18n( "No" ) ) 250 name, true, true ,i18n( "Import all!" ),i18n( "No" ) )
251{ 251{
252 QWidget *page = plainPage(); 252 QWidget *page = plainPage();
253 QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); 253 Q3VBoxLayout *layout = new Q3VBoxLayout( page, marginHint(), spacingHint() );
254 connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) ); 254 connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) );
255 connect( this, SIGNAL( user2Clicked() ), this, SLOT ( slotCancel() ) ); 255 connect( this, SIGNAL( user2Clicked() ), this, SLOT ( slotCancel() ) );
256 256
@@ -264,7 +264,6 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
264#endif 264#endif
265} 265}
266 266
267#ifndef KAB_EMBEDDED 267#ifndef KAB_EMBEDDED_
268#include "xxportmanager.moc" 268#include "moc_xxportmanager.cpp"
269#endif //KAB_EMBEDDED 269#endif //KAB_EMBEDDED
270
diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h
index e801d9b..0528922 100644
--- a/kaddressbook/xxportmanager.h
+++ b/kaddressbook/xxportmanager.h
@@ -32,7 +32,7 @@ $Id$
32#ifndef XXPORTMANAGER_H 32#ifndef XXPORTMANAGER_H
33#define XXPORTMANAGER_H 33#define XXPORTMANAGER_H
34 34
35#include <qdict.h> 35#include <q3dict.h>
36#include <qobject.h> 36#include <qobject.h>
37 37
38#include <kurl.h> 38#include <kurl.h>
@@ -71,7 +71,7 @@ class XXPortManager : public QObject
71 private: 71 private:
72 void loadPlugins(); 72 void loadPlugins();
73 73
74 QDict<XXPortObject> mXXPortObjects; 74 Q3Dict<XXPortObject> mXXPortObjects;
75 75
76 KABCore *mCore; 76 KABCore *mCore;
77 bool mShowPreview; 77 bool mShowPreview;
diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp
index bd9d986..2d8d0ff 100644
--- a/kaddressbook/xxportobject.cpp
+++ b/kaddressbook/xxportobject.cpp
@@ -271,6 +271,6 @@ KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identi
271 271
272 272
273 273
274#ifndef KAB_EMBEDDED 274#ifndef KAB_EMBEDDED_
275#include "xxportobject.moc" 275#include "moc_xxportobject.cpp"
276#endif //KAB_EMBEDDED 276#endif //KAB_EMBEDDED
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index 278cab0..088bffa 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -36,16 +36,21 @@ $Id$
36#include <kglobal.h> 36#include <kglobal.h>
37 37
38#include <qapplication.h> 38#include <qapplication.h>
39#include <qbuttongroup.h> 39#include <QDesktopWidget>
40#include <q3buttongroup.h>
40#include <qcombobox.h> 41#include <qcombobox.h>
41#include <qheader.h> 42#include <q3header.h>
42#include <qlabel.h> 43#include <qlabel.h>
43#include <qlayout.h> 44#include <qlayout.h>
44#include <qlistview.h> 45#include <q3listview.h>
45#include <qpushbutton.h> 46#include <qpushbutton.h>
46#include <qradiobutton.h> 47#include <qradiobutton.h>
47#include <qstringlist.h> 48#include <qstringlist.h>
48#include <qwhatsthis.h> 49#include <q3whatsthis.h>
50//Added by qt3to4:
51#include <Q3GridLayout>
52#include <Q3Frame>
53#include <Q3VBoxLayout>
49 54
50#include "kabcore.h" 55#include "kabcore.h"
51#include "kabprefs.h" 56#include "kabprefs.h"
@@ -62,8 +67,8 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
62 67
63 connect( mFiltersCombo, SIGNAL( activated( int ) ), 68 connect( mFiltersCombo, SIGNAL( activated( int ) ),
64 SLOT( filterChanged( int ) ) ); 69 SLOT( filterChanged( int ) ) );
65 connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), 70 connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ),
66 SLOT( categoryClicked( QListViewItem* ) ) ); 71 SLOT( categoryClicked( Q3ListViewItem* ) ) );
67 72
68 // setup filters 73 // setup filters
69#ifndef KAB_EMBEDDED 74#ifndef KAB_EMBEDDED
@@ -84,7 +89,7 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort,
84 QStringList categories = KABPrefs::instance()->mCustomCategories; 89 QStringList categories = KABPrefs::instance()->mCustomCategories;
85 QStringList::Iterator it; 90 QStringList::Iterator it;
86 for ( it = categories.begin(); it != categories.end(); ++it ) 91 for ( it = categories.begin(); it != categories.end(); ++it )
87 new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); 92 new Q3CheckListItem( mCategoriesView, *it, Q3CheckListItem::CheckBox );
88 mUseCategories->setEnabled( categories.count() > 0 ); 93 mUseCategories->setEnabled( categories.count() > 0 );
89 94
90 int count = mCore->selectedUIDs().count(); 95 int count = mCore->selectedUIDs().count();
@@ -210,9 +215,9 @@ QStringList XXPortSelectDialog::categories() const
210{ 215{
211 QStringList list; 216 QStringList list;
212 217
213 QListViewItemIterator it( mCategoriesView ); 218 Q3ListViewItemIterator it( mCategoriesView );
214 for ( ; it.current(); ++it ) { 219 for ( ; it.current(); ++it ) {
215 QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current()); 220 Q3CheckListItem* qcli = static_cast<Q3CheckListItem*>(it.current());
216 if ( qcli->isOn() ) 221 if ( qcli->isOn() )
217 list.append( it.current()->text( 0 ) ); 222 list.append( it.current()->text( 0 ) );
218 } 223 }
@@ -225,9 +230,9 @@ void XXPortSelectDialog::filterChanged( int )
225 mUseFilters->setChecked( true ); 230 mUseFilters->setChecked( true );
226} 231}
227 232
228void XXPortSelectDialog::categoryClicked( QListViewItem *i ) 233void XXPortSelectDialog::categoryClicked( Q3ListViewItem *i )
229{ 234{
230 QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); 235 Q3CheckListItem *qcli = static_cast<Q3CheckListItem*>( i );
231 if ( qcli->isOn() ) 236 if ( qcli->isOn() )
232 mUseCategories->setChecked( true ); 237 mUseCategories->setChecked( true );
233} 238}
@@ -244,60 +249,60 @@ void XXPortSelectDialog::slotHelp()
244 249
245void XXPortSelectDialog::initGUI() 250void XXPortSelectDialog::initGUI()
246{ 251{
247 QFrame *page = plainPage(); 252 Q3Frame *page = plainPage();
248 253
249 QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHintSmall(), 254 Q3VBoxLayout *topLayout = new Q3VBoxLayout( page, KDialog::marginHintSmall(),
250 KDialog::spacingHintSmall() ); 255 KDialog::spacingHintSmall() );
251 256
252 QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page ); 257 QLabel *label = new QLabel( i18n( "Which contacts do you want to select?" ), page );
253 topLayout->addWidget( label ); 258 topLayout->addWidget( label );
254 259
255 mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); 260 mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page );
256 mButtonGroup->setColumnLayout( 0, Qt::Vertical ); 261 mButtonGroup->setColumnLayout( 0, Qt::Vertical );
257 mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); 262 mButtonGroup->layout()->setSpacing( KDialog::spacingHint() );
258 mButtonGroup->layout()->setMargin( KDialog::marginHint() ); 263 mButtonGroup->layout()->setMargin( KDialog::marginHint() );
259 264
260 QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); 265 Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() );
261 groupLayout->setAlignment( Qt::AlignTop ); 266 groupLayout->setAlignment( Qt::AlignTop );
262 267
263 mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup ); 268 mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup );
264 mUseWholeBook->setChecked( true ); 269 mUseWholeBook->setChecked( true );
265 QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) ); 270 Q3WhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) );
266 groupLayout->addWidget( mUseWholeBook, 0, 0 ); 271 groupLayout->addWidget( mUseWholeBook, 0, 0 );
267 272
268 mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup ); 273 mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup );
269 QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" 274 Q3WhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n"
270 "This option is disabled if no contacts are selected." ) ); 275 "This option is disabled if no contacts are selected." ) );
271 groupLayout->addWidget( mUseSelection, 1, 0 ); 276 groupLayout->addWidget( mUseSelection, 1, 0 );
272 277
273 mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); 278 mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup );
274 QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" 279 Q3WhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n"
275 "This option is disabled if you haven't defined any filters" ) ); 280 "This option is disabled if you haven't defined any filters" ) );
276 groupLayout->addWidget( mUseFilters, 2, 0 ); 281 groupLayout->addWidget( mUseFilters, 2, 0 );
277 282
278 mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); 283 mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup );
279 QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" 284 Q3WhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n"
280 "This option is disabled if you have no categories." ) ); 285 "This option is disabled if you have no categories." ) );
281 groupLayout->addWidget( mUseCategories, 3, 0 ); 286 groupLayout->addWidget( mUseCategories, 3, 0 );
282 287
283 mFiltersCombo = new QComboBox( false, mButtonGroup ); 288 mFiltersCombo = new QComboBox( false, mButtonGroup );
284 mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); 289 mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
285 QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); 290 Q3WhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) );
286 groupLayout->addWidget( mFiltersCombo, 2, 1 ); 291 groupLayout->addWidget( mFiltersCombo, 2, 1 );
287 292
288 mCategoriesView = new QListView( mButtonGroup ); 293 mCategoriesView = new Q3ListView( mButtonGroup );
289 mCategoriesView->addColumn( "" ); 294 mCategoriesView->addColumn( "" );
290 mCategoriesView->header()->hide(); 295 mCategoriesView->header()->hide();
291 QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); 296 Q3WhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) );
292 groupLayout->addWidget( mCategoriesView, 3, 1 ); 297 groupLayout->addWidget( mCategoriesView, 3, 1 );
293 mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); 298 mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
294 //if (QApplication::desktop()->height() == 480 ) 299 //if (QApplication::desktop()->height() == 480 )
295 // mCategoriesView->setMaximumHeight( 240 ); 300 // mCategoriesView->setMaximumHeight( 240 );
296 topLayout->addWidget( mButtonGroup ); 301 topLayout->addWidget( mButtonGroup );
297 302
298 QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); 303 Q3ButtonGroup *sortingGroup = new Q3ButtonGroup( i18n( "Sorting" ), page );
299 sortingGroup->setColumnLayout( 0, Qt::Vertical ); 304 sortingGroup->setColumnLayout( 0, Qt::Vertical );
300 QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, 305 Q3GridLayout *sortLayout = new Q3GridLayout( sortingGroup->layout(), 2, 2,
301 KDialog::spacingHint() ); 306 KDialog::spacingHint() );
302 sortLayout->setAlignment( Qt::AlignTop ); 307 sortLayout->setAlignment( Qt::AlignTop );
303 308
@@ -335,8 +340,6 @@ void XXPortSelectDialog::initGUI()
335 } 340 }
336} 341}
337 342
338#ifndef KAB_EMBEDDED 343#ifndef KAB_EMBEDDED_
339#include "xxportselectdialog.moc" 344#include "moc_xxportselectdialog.cpp"
340#endif //KAB_EMBEDDED 345#endif //KAB_EMBEDDED
341
342
diff --git a/kaddressbook/xxportselectdialog.h b/kaddressbook/xxportselectdialog.h
index 28b1fef..208f4f9 100644
--- a/kaddressbook/xxportselectdialog.h
+++ b/kaddressbook/xxportselectdialog.h
@@ -30,10 +30,10 @@
30 30
31#include "filter.h" 31#include "filter.h"
32 32
33class QButtonGroup; 33class Q3ButtonGroup;
34class QComboBox; 34class QComboBox;
35class QListView; 35class Q3ListView;
36class QListViewItem; 36class Q3ListViewItem;
37class QRadioButton; 37class QRadioButton;
38 38
39class KABCore; 39class KABCore;
@@ -53,7 +53,7 @@ class XXPortSelectDialog : public KDialogBase
53 53
54 private slots: 54 private slots:
55 void filterChanged( int ); 55 void filterChanged( int );
56 void categoryClicked( QListViewItem * i ); 56 void categoryClicked( Q3ListViewItem * i );
57 57
58 protected slots: 58 protected slots:
59 void slotHelp(); 59 void slotHelp();
@@ -62,13 +62,13 @@ class XXPortSelectDialog : public KDialogBase
62 void initGUI(); 62 void initGUI();
63 QStringList categories() const; 63 QStringList categories() const;
64 64
65 QButtonGroup* mButtonGroup; 65 Q3ButtonGroup* mButtonGroup;
66 QRadioButton* mUseCategories; 66 QRadioButton* mUseCategories;
67 QRadioButton* mUseFilters; 67 QRadioButton* mUseFilters;
68 QRadioButton* mUseWholeBook; 68 QRadioButton* mUseWholeBook;
69 QRadioButton* mUseSelection; 69 QRadioButton* mUseSelection;
70 QComboBox* mFiltersCombo; 70 QComboBox* mFiltersCombo;
71 QListView* mCategoriesView; 71 Q3ListView* mCategoriesView;
72 72
73 KComboBox *mFieldCombo; 73 KComboBox *mFieldCombo;
74 KComboBox *mSortTypeCombo; 74 KComboBox *mSortTypeCombo;
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp
index 18ce9da..467fef7 100644
--- a/kalarmd/alarmdialog.cpp
+++ b/kalarmd/alarmdialog.cpp
@@ -23,9 +23,10 @@
23 23
24// $Id$ 24// $Id$
25 25
26#include <qhbox.h> 26#include <q3hbox.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qapp.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qlabel.h> 30#include <qlabel.h>
30#include <qlayout.h> 31#include <qlayout.h>
31#include <qfile.h> 32#include <qfile.h>
@@ -39,6 +40,9 @@
39#undef protected 40#undef protected
40#else 41#else
41#include <qspinbox.h> 42#include <qspinbox.h>
43//Added by qt3to4:
44#include <Q3HBoxLayout>
45#include <Q3VBoxLayout>
42#endif 46#endif
43#include <stdlib.h> 47#include <stdlib.h>
44#ifndef _WIN32_ 48#ifndef _WIN32_
@@ -62,10 +66,10 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
62 : QDialog (parent, name ,false, Qt::WStyle_StaysOnTop ) 66 : QDialog (parent, name ,false, Qt::WStyle_StaysOnTop )
63{ 67{
64 setCaption( "KO/Pi Alarm!" ); 68 setCaption( "KO/Pi Alarm!" );
65 QVBoxLayout* layout = new QVBoxLayout( this); 69 Q3VBoxLayout* layout = new Q3VBoxLayout( this);
66 QLabel* l = new QLabel("The following event triggered alarm:",this); 70 QLabel* l = new QLabel("The following event triggered alarm:",this);
67 layout->addWidget ( l ); 71 layout->addWidget ( l );
68 l->setAlignment( AlignCenter); 72 l->setAlignment( Qt::AlignCenter);
69 mMessage = new QLabel ( " ", this ); 73 mMessage = new QLabel ( " ", this );
70 int fs = 18; 74 int fs = 18;
71 int fs2 = 12; 75 int fs2 = 12;
@@ -83,10 +87,10 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
83 l->setFont( fo ); 87 l->setFont( fo );
84 fo.setPointSize( fs ); 88 fo.setPointSize( fs );
85 mMessage->setFont(fo ); 89 mMessage->setFont(fo );
86 mMessage->setAlignment( AlignCenter); 90 mMessage->setAlignment( Qt::AlignCenter);
87 layout->addWidget ( mMessage ); 91 layout->addWidget ( mMessage );
88 mMissedAlarms= new QLabel ( "(No missed Alarms)", this ); 92 mMissedAlarms= new QLabel ( "(No missed Alarms)", this );
89 mMissedAlarms->setAlignment( AlignCenter); 93 mMissedAlarms->setAlignment( Qt::AlignCenter);
90 94
91 playSoundTimer = new QTimer( this ); 95 playSoundTimer = new QTimer( this );
92 connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) ); 96 connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) );
@@ -103,7 +107,7 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
103 fo.setPointSize( 12 ); 107 fo.setPointSize( 12 );
104 labb->setFont ( fo ); 108 labb->setFont ( fo );
105#endif 109#endif
106 labb->setAlignment(AlignCenter); 110 labb->setAlignment(Qt::AlignCenter);
107 //layout->addWidget ( labb ); 111 //layout->addWidget ( labb );
108 fo = font(); 112 fo = font();
109 int pointSize = 36; 113 int pointSize = 36;
@@ -122,17 +126,17 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
122#endif 126#endif
123 mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 ); 127 mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 );
124 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 128 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
125 QHBoxLayout* layoutSpin = new QHBoxLayout( layout ); 129 Q3HBoxLayout* layoutSpin = new Q3HBoxLayout( layout );
126 layoutSpin->addStretch (); 130 layoutSpin->addStretch ();
127 layoutSpin->addWidget ( labb ); 131 layoutSpin->addWidget ( labb );
128 layoutSpin->addWidget ( mSuspendSpin ); 132 layoutSpin->addWidget ( mSuspendSpin );
129 layoutSpin->addStretch (); 133 layoutSpin->addStretch ();
130 134
131 QVBox * bbox = new QVBox ( this ); 135 Q3VBox * bbox = new Q3VBox ( this );
132 layout->addWidget ( bbox ); 136 layout->addWidget ( bbox );
133 bbox->layout()->setSpacing( 2 ); 137 bbox->layout()->setSpacing( 2 );
134 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox); 138 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox);
135 labb->setAlignment(AlignCenter); 139 labb->setAlignment(Qt::AlignCenter);
136 mSuspendButton = new QPushButton( "Suspend", bbox); 140 mSuspendButton = new QPushButton( "Suspend", bbox);
137 QPushButton* silen = new QPushButton( " Stop sound ", bbox); 141 QPushButton* silen = new QPushButton( " Stop sound ", bbox);
138 okbut = new QPushButton( "Ok", bbox); 142 okbut = new QPushButton( "Ok", bbox);
diff --git a/kalarmd/alarmdialog.h b/kalarmd/alarmdialog.h
index 52e681a..c3e0966 100644
--- a/kalarmd/alarmdialog.h
+++ b/kalarmd/alarmdialog.h
@@ -30,6 +30,8 @@
30#include <qstring.h> 30#include <qstring.h>
31#include <qcombobox.h> 31#include <qcombobox.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33//Added by qt3to4:
34#include <QLabel>
33 35
34#include "sharp_char.h" 36#include "sharp_char.h"
35 37
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 15eff28..74a53cb 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -52,7 +52,7 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent )
52 : QLabel( parent ) 52 : QLabel( parent )
53{ 53{
54 mAlarmDialog = new AlarmDialog( 0 ); 54 mAlarmDialog = new AlarmDialog( 0 );
55 mPopUp = new QPopupMenu( this ); 55 mPopUp = new Q3PopupMenu( this );
56 mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); 56 mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) );
57 mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); 57 mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) );
58 mPopUp->insertSeparator(); 58 mPopUp->insertSeparator();
@@ -66,12 +66,12 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent )
66 mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); 66 mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) );
67 mPopUp->insertSeparator(); 67 mPopUp->insertSeparator();
68 mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); 68 mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) );
69 mTimerPopUp = new QPopupMenu( this ); 69 mTimerPopUp = new Q3PopupMenu( this );
70 70
71 mBeepPopUp = new QPopupMenu( this ); 71 mBeepPopUp = new Q3PopupMenu( this );
72 mSoundPopUp = new QPopupMenu( this ); 72 mSoundPopUp = new Q3PopupMenu( this );
73 mPausePopUp = new QPopupMenu( this ); 73 mPausePopUp = new Q3PopupMenu( this );
74 mFontsizePopup = new QPopupMenu( this ); 74 mFontsizePopup = new Q3PopupMenu( this );
75 mFontsizePopup->insertItem( "10", 10 ); 75 mFontsizePopup->insertItem( "10", 10 );
76 mFontsizePopup->insertItem( "12", 12 ); 76 mFontsizePopup->insertItem( "12", 12 );
77 mFontsizePopup->insertItem( "14", 14 ); 77 mFontsizePopup->insertItem( "14", 14 );
@@ -85,7 +85,7 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent )
85 mFontsizePopup->insertItem( "30", 30 ); 85 mFontsizePopup->insertItem( "30", 30 );
86 mFontsizePopup->insertItem( "32", 32 ); 86 mFontsizePopup->insertItem( "32", 32 );
87 mFontsizePopup->insertItem( "36", 36 ); 87 mFontsizePopup->insertItem( "36", 36 );
88 QPopupMenu* savePopUp = new QPopupMenu( this ); 88 QPopupMenu* savePopUp = new Q3PopupMenu( this );
89 savePopUp->insertItem( "Save", 0 ); 89 savePopUp->insertItem( "Save", 0 );
90 savePopUp->insertItem( "Load", 1 ); 90 savePopUp->insertItem( "Load", 1 );
91 mSoundPopUp->insertItem( "Buzzer", 0 ); 91 mSoundPopUp->insertItem( "Buzzer", 0 );
@@ -99,7 +99,7 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent )
99 mPausePopUp->insertItem( "30 sec", 30 ); 99 mPausePopUp->insertItem( "30 sec", 30 );
100 mPausePopUp->insertItem( " 1 min", 60 ); 100 mPausePopUp->insertItem( " 1 min", 60 );
101 mPausePopUp->insertItem( " 5 min", 300 ); 101 mPausePopUp->insertItem( " 5 min", 300 );
102 mSuspendPopUp = new QPopupMenu( this ); 102 mSuspendPopUp = new Q3PopupMenu( this );
103 mSuspendPopUp->insertItem( "Off", 0 ); 103 mSuspendPopUp->insertItem( "Off", 0 );
104 mSuspendPopUp->insertItem( " 1x", 1 ); 104 mSuspendPopUp->insertItem( " 1x", 1 );
105 mSuspendPopUp->insertItem( " 2x", 2 ); 105 mSuspendPopUp->insertItem( " 2x", 2 );
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h
index 06ef91b..ac65797 100644
--- a/kalarmd/simplealarmdaemonimpl.h
+++ b/kalarmd/simplealarmdaemonimpl.h
@@ -30,7 +30,6 @@
30 30
31class QLabel; 31class QLabel;
32class QTimer; 32class QTimer;
33class QPopupMenu;
34class AlarmDialog; 33class AlarmDialog;
35class SimpleAlarmDaemonImpl : public QLabel 34class SimpleAlarmDaemonImpl : public QLabel
36{ 35{
@@ -76,7 +75,7 @@ class SimpleAlarmDaemonImpl : public QLabel
76 QString mAlarmMessage; 75 QString mAlarmMessage;
77 int mTimerTime; 76 int mTimerTime;
78 int getFileNameLen( QString ); 77 int getFileNameLen( QString );
79 QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; 78 Q3PopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup;
80 QDateTime mRunningTimer; 79 QDateTime mRunningTimer;
81 void fillTimerPopUp(); 80 void fillTimerPopUp();
82 QString timerMesssage; 81 QString timerMesssage;
diff --git a/kdepim-desktop.pro b/kdepim-desktop.pro
index 4a5ceef..05d8357 100644
--- a/kdepim-desktop.pro
+++ b/kdepim-desktop.pro
@@ -19,7 +19,9 @@ win32:{
19} 19}
20unix:{ 20unix:{
21!staticlib: { 21!staticlib: {
22SUBDIRS += libetpan kmicromail/libmailwrapper kmicromail pwmanager/libcrypt/cipher pwmanager/libcrypt/error pwmanager/libcrypt/mpi pwmanager/libcrypt/zlib pwmanager/pwmanager 22SUBDIRS += libetpan
23# kmicromail/libmailwrapper kmicromail
24SUBDIRS += pwmanager/libcrypt/cipher pwmanager/libcrypt/error pwmanager/libcrypt/mpi pwmanager/libcrypt/zlib pwmanager/pwmanager
23} 25}
24} 26}
25 27
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp
index 985a762..9b1ea2f 100644
--- a/kmicromail/accountitem.cpp
+++ b/kmicromail/accountitem.cpp
@@ -12,8 +12,10 @@
12//#include <qpe/qpeapplication.h> 12//#include <qpe/qpeapplication.h>
13 13
14/* QT */ 14/* QT */
15#include <qpopupmenu.h> 15#include <q3popupmenu.h>
16#include <qmessagebox.h> 16#include <qmessagebox.h>
17//Added by qt3to4:
18#include <Q3ValueList>
17#include <kiconloader.h> 19#include <kiconloader.h>
18#include <klocale.h> 20#include <klocale.h>
19 21
@@ -54,7 +56,7 @@ AbstractMail *POP3viewItem::getWrapper()
54 return wrapper; 56 return wrapper;
55} 57}
56 58
57void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & ) 59void POP3viewItem::refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > & )
58{ 60{
59 refresh(); 61 refresh();
60} 62}
@@ -62,16 +64,16 @@ void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & )
62void POP3viewItem::refresh() 64void POP3viewItem::refresh()
63{ 65{
64 if (account->getOffline()) return; 66 if (account->getOffline()) return;
65 QValueList<FolderP> *folders = wrapper->listFolders(); 67 Q3ValueList<FolderP> *folders = wrapper->listFolders();
66 QListViewItem *child = firstChild(); 68 Q3ListViewItem *child = firstChild();
67 while ( child ) 69 while ( child )
68 { 70 {
69 QListViewItem *tmp = child; 71 Q3ListViewItem *tmp = child;
70 child = child->nextSibling(); 72 child = child->nextSibling();
71 delete tmp; 73 delete tmp;
72 } 74 }
73 QValueList<FolderP>::ConstIterator it; 75 Q3ValueList<FolderP>::ConstIterator it;
74 QListViewItem*item = 0; 76 Q3ListViewItem*item = 0;
75 for ( it = folders->begin(); it!=folders->end(); ++it) 77 for ( it = folders->begin(); it!=folders->end(); ++it)
76 { 78 {
77 item = new POP3folderItem( (*it), this , item ); 79 item = new POP3folderItem( (*it), this , item );
@@ -86,9 +88,9 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail )
86 return wrapper->fetchBody( mail ); 88 return wrapper->fetchBody( mail );
87} 89}
88 90
89QPopupMenu * POP3viewItem::getContextMenu() 91Q3PopupMenu * POP3viewItem::getContextMenu()
90{ 92{
91 QPopupMenu *m = new QPopupMenu(0); 93 Q3PopupMenu *m = new Q3PopupMenu(0);
92 if (m) 94 if (m)
93 { 95 {
94 if (!account->getOffline()) 96 if (!account->getOffline())
@@ -108,10 +110,10 @@ QPopupMenu * POP3viewItem::getContextMenu()
108 110
109void POP3viewItem::disconnect() 111void POP3viewItem::disconnect()
110{ 112{
111 QListViewItem *child = firstChild(); 113 Q3ListViewItem *child = firstChild();
112 while ( child ) 114 while ( child )
113 { 115 {
114 QListViewItem *tmp = child; 116 Q3ListViewItem *tmp = child;
115 child = child->nextSibling(); 117 child = child->nextSibling();
116 delete tmp; 118 delete tmp;
117 } 119 }
@@ -157,7 +159,7 @@ void POP3viewItem::contextMenuSelected(int which)
157POP3folderItem::~POP3folderItem() 159POP3folderItem::~POP3folderItem()
158{} 160{}
159 161
160POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , QListViewItem*after ) 162POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , Q3ListViewItem*after )
161 : AccountViewItem(folderInit,parent,after ) 163 : AccountViewItem(folderInit,parent,after )
162{ 164{
163 pop3 = parent; 165 pop3 = parent;
@@ -172,7 +174,7 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent ,
172 setText( 0, folder->getDisplayName() ); 174 setText( 0, folder->getDisplayName() );
173} 175}
174 176
175void POP3folderItem::refresh(QValueList<RecMailP>&target) 177void POP3folderItem::refresh(Q3ValueList<RecMailP>&target)
176{ 178{
177 if (folder->may_select()) 179 if (folder->may_select())
178 pop3->getWrapper()->listMessages( folder->getName(),target ); 180 pop3->getWrapper()->listMessages( folder->getName(),target );
@@ -183,9 +185,9 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail)
183 return pop3->getWrapper()->fetchBody(aMail); 185 return pop3->getWrapper()->fetchBody(aMail);
184} 186}
185 187
186QPopupMenu * POP3folderItem::getContextMenu() 188Q3PopupMenu * POP3folderItem::getContextMenu()
187{ 189{
188 QPopupMenu *m = new QPopupMenu(0); 190 Q3PopupMenu *m = new Q3PopupMenu(0);
189 if (m) 191 if (m)
190 { 192 {
191 m->insertItem(i18n("Get new messages"),GET_NEW_MAILS); 193 m->insertItem(i18n("Get new messages"),GET_NEW_MAILS);
@@ -261,7 +263,7 @@ AbstractMail *NNTPviewItem::getWrapper()
261 return wrapper; 263 return wrapper;
262} 264}
263 265
264void NNTPviewItem::refresh( QValueList<RecMailP> & ) 266void NNTPviewItem::refresh( Q3ValueList<RecMailP> & )
265{ 267{
266 refresh(); 268 refresh();
267} 269}
@@ -269,17 +271,17 @@ void NNTPviewItem::refresh( QValueList<RecMailP> & )
269void NNTPviewItem::refresh() 271void NNTPviewItem::refresh()
270{ 272{
271 if (account->getOffline()) return; 273 if (account->getOffline()) return;
272 QValueList<FolderP> *folders = wrapper->listFolders(); 274 Q3ValueList<FolderP> *folders = wrapper->listFolders();
273 275
274 QListViewItem *child = firstChild(); 276 Q3ListViewItem *child = firstChild();
275 while ( child ) 277 while ( child )
276 { 278 {
277 QListViewItem *tmp = child; 279 Q3ListViewItem *tmp = child;
278 child = child->nextSibling(); 280 child = child->nextSibling();
279 delete tmp; 281 delete tmp;
280 } 282 }
281 QValueList<FolderP>::ConstIterator it; 283 Q3ValueList<FolderP>::ConstIterator it;
282 QListViewItem*item = 0; 284 Q3ListViewItem*item = 0;
283 for ( it = folders->begin(); it!=folders->end(); ++it) 285 for ( it = folders->begin(); it!=folders->end(); ++it)
284 { 286 {
285 item = new NNTPfolderItem( (*it), this , item ); 287 item = new NNTPfolderItem( (*it), this , item );
@@ -294,9 +296,9 @@ RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail )
294 return wrapper->fetchBody( mail ); 296 return wrapper->fetchBody( mail );
295} 297}
296 298
297QPopupMenu * NNTPviewItem::getContextMenu() 299Q3PopupMenu * NNTPviewItem::getContextMenu()
298{ 300{
299 QPopupMenu *m = new QPopupMenu(0); 301 Q3PopupMenu *m = new Q3PopupMenu(0);
300 if (m) 302 if (m)
301 { 303 {
302 if (!account->getOffline()) 304 if (!account->getOffline())
@@ -326,10 +328,10 @@ void NNTPviewItem::subscribeGroups()
326 328
327void NNTPviewItem::disconnect() 329void NNTPviewItem::disconnect()
328{ 330{
329 QListViewItem *child = firstChild(); 331 Q3ListViewItem *child = firstChild();
330 while ( child ) 332 while ( child )
331 { 333 {
332 QListViewItem *tmp = child; 334 Q3ListViewItem *tmp = child;
333 child = child->nextSibling(); 335 child = child->nextSibling();
334 delete tmp; 336 delete tmp;
335 } 337 }
@@ -368,7 +370,7 @@ void NNTPviewItem::contextMenuSelected(int which)
368NNTPfolderItem::~NNTPfolderItem() 370NNTPfolderItem::~NNTPfolderItem()
369{} 371{}
370 372
371NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , QListViewItem*after ) 373NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , Q3ListViewItem*after )
372 : AccountViewItem( folderInit, parent,after ) 374 : AccountViewItem( folderInit, parent,after )
373{ 375{
374 nntp = parent; 376 nntp = parent;
@@ -383,7 +385,7 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent
383 setText( 0, folder->getDisplayName() ); 385 setText( 0, folder->getDisplayName() );
384} 386}
385 387
386void NNTPfolderItem::refresh(QValueList<RecMailP>&target) 388void NNTPfolderItem::refresh(Q3ValueList<RecMailP>&target)
387{ 389{
388 if (folder->may_select()) 390 if (folder->may_select())
389 nntp->getWrapper()->listMessages( folder->getName(),target ); 391 nntp->getWrapper()->listMessages( folder->getName(),target );
@@ -394,9 +396,9 @@ RECBODYP NNTPfolderItem::fetchBody(const RecMailP&aMail)
394 return nntp->getWrapper()->fetchBody(aMail); 396 return nntp->getWrapper()->fetchBody(aMail);
395} 397}
396 398
397QPopupMenu * NNTPfolderItem::getContextMenu() 399Q3PopupMenu * NNTPfolderItem::getContextMenu()
398{ 400{
399 QPopupMenu *m = new QPopupMenu(0); 401 Q3PopupMenu *m = new Q3PopupMenu(0);
400 if (m) 402 if (m)
401 { 403 {
402 m->insertItem(i18n("Refresh header list"),0); 404 m->insertItem(i18n("Refresh header list"),0);
@@ -453,7 +455,7 @@ AbstractMail *IMAPviewItem::getWrapper()
453 return wrapper; 455 return wrapper;
454} 456}
455 457
456void IMAPviewItem::refresh(QValueList<RecMailP>&) 458void IMAPviewItem::refresh(Q3ValueList<RecMailP>&)
457{ 459{
458 refreshFolders(false); 460 refreshFolders(false);
459} 461}
@@ -470,11 +472,11 @@ void IMAPviewItem::refreshFolders(bool force)
470 472
471 removeChilds(); 473 removeChilds();
472 currentFolders.clear(); 474 currentFolders.clear();
473 QValueList<FolderP> * folders = wrapper->listFolders(); 475 Q3ValueList<FolderP> * folders = wrapper->listFolders();
474 476
475 QValueList<FolderP>::Iterator it; 477 Q3ValueList<FolderP>::Iterator it;
476 QListViewItem*item = 0; 478 Q3ListViewItem*item = 0;
477 QListViewItem*titem = 0; 479 Q3ListViewItem*titem = 0;
478 QString fname,del,search; 480 QString fname,del,search;
479 int pos; 481 int pos;
480 482
@@ -513,9 +515,9 @@ void IMAPviewItem::refreshFolders(bool force)
513 delete folders; 515 delete folders;
514} 516}
515 517
516QPopupMenu * IMAPviewItem::getContextMenu() 518Q3PopupMenu * IMAPviewItem::getContextMenu()
517{ 519{
518 QPopupMenu *m = new QPopupMenu(0); 520 Q3PopupMenu *m = new Q3PopupMenu(0);
519 if (m) 521 if (m)
520 { 522 {
521 if (!account->getOffline()) 523 if (!account->getOffline())
@@ -615,7 +617,7 @@ bool IMAPviewItem::offline()
615 return account->getOffline(); 617 return account->getOffline();
616} 618}
617 619
618IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , QListViewItem*after ) 620IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , Q3ListViewItem*after )
619 : AccountViewItem( folderInit, parent , after ) 621 : AccountViewItem( folderInit, parent , after )
620{ 622{
621 imap = parent; 623 imap = parent;
@@ -630,7 +632,7 @@ IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent
630 setText( 0, folder->getDisplayName() ); 632 setText( 0, folder->getDisplayName() );
631} 633}
632 634
633IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ) 635IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master )
634 : AccountViewItem(folderInit, parent,after ) 636 : AccountViewItem(folderInit, parent,after )
635{ 637{
636 imap = master; 638 imap = master;
@@ -653,7 +655,7 @@ const QString& IMAPfolderItem::Delemiter()const
653 return folder->Separator(); 655 return folder->Separator();
654} 656}
655 657
656void IMAPfolderItem::refresh(QValueList<RecMailP>&target) 658void IMAPfolderItem::refresh(Q3ValueList<RecMailP>&target)
657{ 659{
658 if (folder->may_select()) 660 if (folder->may_select())
659 { 661 {
@@ -670,9 +672,9 @@ RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail)
670 return imap->getWrapper()->fetchBody(aMail); 672 return imap->getWrapper()->fetchBody(aMail);
671} 673}
672 674
673QPopupMenu * IMAPfolderItem::getContextMenu() 675Q3PopupMenu * IMAPfolderItem::getContextMenu()
674{ 676{
675 QPopupMenu *m = new QPopupMenu(0); 677 Q3PopupMenu *m = new Q3PopupMenu(0);
676 if (m) 678 if (m)
677 { 679 {
678 if (folder->may_select()) 680 if (folder->may_select())
@@ -721,7 +723,7 @@ void IMAPfolderItem::deleteFolder()
721 { 723 {
722 if (imap->getWrapper()->deleteMbox(folder)) 724 if (imap->getWrapper()->deleteMbox(folder))
723 { 725 {
724 QListView*v=listView(); 726 Q3ListView*v=listView();
725 IMAPviewItem * box = imap; 727 IMAPviewItem * box = imap;
726 /* be carefull - after that this object is destroyd so don't use 728 /* be carefull - after that this object is destroyd so don't use
727 * any member of it after that call!!*/ 729 * any member of it after that call!!*/
@@ -800,7 +802,7 @@ AbstractMail *MHviewItem::getWrapper()
800 return wrapper; 802 return wrapper;
801} 803}
802 804
803void MHviewItem::refresh( QValueList<RecMailP> & target) 805void MHviewItem::refresh( Q3ValueList<RecMailP> & target)
804{ 806{
805 refresh(false); 807 refresh(false);
806 getWrapper()->listMessages( "",target ); 808 getWrapper()->listMessages( "",target );
@@ -811,8 +813,8 @@ void MHviewItem::refresh(bool force)
811 if (childCount()>0 && force==false) return; 813 if (childCount()>0 && force==false) return;
812 removeChilds(); 814 removeChilds();
813 currentFolders.clear(); 815 currentFolders.clear();
814 QValueList<FolderP> *folders = wrapper->listFolders(); 816 Q3ValueList<FolderP> *folders = wrapper->listFolders();
815 QValueList<FolderP>::ConstIterator it; 817 Q3ValueList<FolderP>::ConstIterator it;
816 MHfolderItem*item = 0; 818 MHfolderItem*item = 0;
817 MHfolderItem*pmaster = 0; 819 MHfolderItem*pmaster = 0;
818 QString fname = ""; 820 QString fname = "";
@@ -857,9 +859,9 @@ RECBODYP MHviewItem::fetchBody( const RecMailP &mail )
857 return wrapper->fetchBody( mail ); 859 return wrapper->fetchBody( mail );
858} 860}
859 861
860QPopupMenu * MHviewItem::getContextMenu() 862Q3PopupMenu * MHviewItem::getContextMenu()
861{ 863{
862 QPopupMenu *m = new QPopupMenu(0); 864 Q3PopupMenu *m = new Q3PopupMenu(0);
863 if (m) 865 if (m)
864 { 866 {
865 m->insertItem(i18n("Refresh folder list"),0); 867 m->insertItem(i18n("Refresh folder list"),0);
@@ -920,14 +922,14 @@ void MHviewItem::contextMenuSelected(int which)
920MHfolderItem::~MHfolderItem() 922MHfolderItem::~MHfolderItem()
921{} 923{}
922 924
923MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after ) 925MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , Q3ListViewItem*after )
924 : AccountViewItem(folderInit, parent,after ) 926 : AccountViewItem(folderInit, parent,after )
925{ 927{
926 mbox = parent; 928 mbox = parent;
927 initName(); 929 initName();
928} 930}
929 931
930MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master) 932MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master)
931 : AccountViewItem(folderInit, parent,after ) 933 : AccountViewItem(folderInit, parent,after )
932{ 934{
933 folder = folderInit; 935 folder = folderInit;
@@ -967,7 +969,7 @@ const FolderP&MHfolderItem::getFolder()const
967 return folder; 969 return folder;
968} 970}
969 971
970void MHfolderItem::refresh(QValueList<RecMailP>&target) 972void MHfolderItem::refresh(Q3ValueList<RecMailP>&target)
971{ 973{
972 if (folder->may_select()) 974 if (folder->may_select())
973 mbox->getWrapper()->listMessages( folder->getName(),target ); 975 mbox->getWrapper()->listMessages( folder->getName(),target );
@@ -989,7 +991,7 @@ void MHfolderItem::deleteFolder()
989 { 991 {
990 if (mbox->getWrapper()->deleteMbox(folder)) 992 if (mbox->getWrapper()->deleteMbox(folder))
991 { 993 {
992 QListView*v=listView(); 994 Q3ListView*v=listView();
993 MHviewItem * box = mbox; 995 MHviewItem * box = mbox;
994 /* be carefull - after that this object is destroyd so don't use 996 /* be carefull - after that this object is destroyd so don't use
995 * any member of it after that call!!*/ 997 * any member of it after that call!!*/
@@ -1002,9 +1004,9 @@ void MHfolderItem::deleteFolder()
1002 } 1004 }
1003} 1005}
1004 1006
1005QPopupMenu * MHfolderItem::getContextMenu() 1007Q3PopupMenu * MHfolderItem::getContextMenu()
1006{ 1008{
1007 QPopupMenu *m = new QPopupMenu(0); 1009 Q3PopupMenu *m = new Q3PopupMenu(0);
1008 if (m) 1010 if (m)
1009 { 1011 {
1010 m->insertItem(i18n("Move/Copie all mails"),2); 1012 m->insertItem(i18n("Move/Copie all mails"),2);
@@ -1031,7 +1033,7 @@ void MHfolderItem::createFolder()
1031 QString ndir = ndirdlg.Newdir(); 1033 QString ndir = ndirdlg.Newdir();
1032 if (mbox->getWrapper()->createMbox(ndir,folder)) 1034 if (mbox->getWrapper()->createMbox(ndir,folder))
1033 { 1035 {
1034 QListView*v=listView(); 1036 Q3ListView*v=listView();
1035 MHviewItem * box = mbox; 1037 MHviewItem * box = mbox;
1036 /* be carefull - after that this object is destroyd so don't use 1038 /* be carefull - after that this object is destroyd so don't use
1037 * any member of it after that call!!*/ 1039 * any member of it after that call!!*/
@@ -1078,26 +1080,26 @@ bool MHfolderItem::isDraftfolder()
1078const QString AccountViewItem::contextName="AccountViewItem"; 1080const QString AccountViewItem::contextName="AccountViewItem";
1079 1081
1080AccountViewItem::AccountViewItem( AccountView *parent ) 1082AccountViewItem::AccountViewItem( AccountView *parent )
1081 : QListViewItem( parent ) 1083 : Q3ListViewItem( parent )
1082{ 1084{
1083 init(); 1085 init();
1084 m_Backlink = parent; 1086 m_Backlink = parent;
1085} 1087}
1086 1088
1087AccountViewItem::AccountViewItem( QListViewItem *parent) 1089AccountViewItem::AccountViewItem( Q3ListViewItem *parent)
1088 : QListViewItem( parent),folder(0) 1090 : Q3ListViewItem( parent),folder(0)
1089{ 1091{
1090 init(); 1092 init();
1091} 1093}
1092 1094
1093AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) 1095AccountViewItem::AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after )
1094 :QListViewItem( parent,after ),folder(0) 1096 :Q3ListViewItem( parent,after ),folder(0)
1095{ 1097{
1096 init(); 1098 init();
1097} 1099}
1098 1100
1099AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) 1101AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after )
1100 :QListViewItem( parent,after ),folder(folderInit) 1102 :Q3ListViewItem( parent,after ),folder(folderInit)
1101{ 1103{
1102 init(); 1104 init();
1103} 1105}
@@ -1140,10 +1142,10 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder)
1140 1142
1141void AccountViewItem::removeChilds() 1143void AccountViewItem::removeChilds()
1142{ 1144{
1143 QListViewItem *child = firstChild(); 1145 Q3ListViewItem *child = firstChild();
1144 while ( child ) 1146 while ( child )
1145 { 1147 {
1146 QListViewItem *tmp = child; 1148 Q3ListViewItem *tmp = child;
1147 child = child->nextSibling(); 1149 child = child->nextSibling();
1148 delete tmp; 1150 delete tmp;
1149 } 1151 }
diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h
index 4c92bfc..bbfd05f 100644
--- a/kmicromail/accountitem.h
+++ b/kmicromail/accountitem.h
@@ -2,15 +2,18 @@
2#define __ACCOUNT_ITEM 2#define __ACCOUNT_ITEM
3 3
4 4
5#include <qlistview.h> 5#include <q3listview.h>
6#include <qlist.h> 6#include <qlist.h>
7//Added by qt3to4:
8#include <Q3ValueList>
9#include <Q3PopupMenu>
7#include <opie2/osmartpointer.h> 10#include <opie2/osmartpointer.h>
8#include <libmailwrapper/mailwrapper.h> 11#include <libmailwrapper/mailwrapper.h>
9 12
10class POP3wrapper; 13class POP3wrapper;
11class RecMail; 14class RecMail;
12class RecBody; 15class RecBody;
13class QPopupMenu; 16class Q3PopupMenu;
14class Selectstore; 17class Selectstore;
15class AccountView; 18class AccountView;
16class POP3account; 19class POP3account;
@@ -21,19 +24,19 @@ class Folder;
21 24
22#define RECBODYP Opie::Core::OSmartPointer<RecBody> 25#define RECBODYP Opie::Core::OSmartPointer<RecBody>
23 26
24class AccountViewItem : public QListViewItem 27class AccountViewItem : public Q3ListViewItem
25{ 28{
26 29
27public: 30public:
28 AccountViewItem( AccountView *parent ); 31 AccountViewItem( AccountView *parent );
29 AccountViewItem( QListViewItem *parent); 32 AccountViewItem( Q3ListViewItem *parent);
30 AccountViewItem( QListViewItem *parent , QListViewItem*after ); 33 AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after );
31 AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); 34 AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after );
32 35
33 virtual ~AccountViewItem(); 36 virtual ~AccountViewItem();
34 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; 37 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&)=0;
35 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; 38 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0;
36 virtual QPopupMenu * getContextMenu(){return 0;}; 39 virtual Q3PopupMenu * getContextMenu(){return 0;};
37 virtual void contextMenuSelected(int){} 40 virtual void contextMenuSelected(int){}
38 virtual AccountView*accountView(); 41 virtual AccountView*accountView();
39 virtual bool matchName(const QString&name)const; 42 virtual bool matchName(const QString&name)const;
@@ -56,10 +59,10 @@ class POP3viewItem : public AccountViewItem
56public: 59public:
57 POP3viewItem( POP3account *a, AccountView *parent ); 60 POP3viewItem( POP3account *a, AccountView *parent );
58 virtual ~POP3viewItem(); 61 virtual ~POP3viewItem();
59 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); 62 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target );
60 virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); 63 virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail );
61 AbstractMail *getWrapper(); 64 AbstractMail *getWrapper();
62 virtual QPopupMenu * getContextMenu(); 65 virtual Q3PopupMenu * getContextMenu();
63 virtual void contextMenuSelected(int); 66 virtual void contextMenuSelected(int);
64 67
65protected: 68protected:
@@ -74,11 +77,11 @@ class POP3folderItem : public AccountViewItem
74{ 77{
75 78
76public: 79public:
77 POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); 80 POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , Q3ListViewItem*after );
78 virtual ~POP3folderItem(); 81 virtual ~POP3folderItem();
79 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); 82 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&);
80 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); 83 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&);
81 virtual QPopupMenu * getContextMenu(); 84 virtual Q3PopupMenu * getContextMenu();
82 virtual void contextMenuSelected(int); 85 virtual void contextMenuSelected(int);
83 86
84protected: 87protected:
@@ -93,10 +96,10 @@ class NNTPviewItem : public AccountViewItem
93public: 96public:
94 NNTPviewItem( NNTPaccount *a, AccountView *parent ); 97 NNTPviewItem( NNTPaccount *a, AccountView *parent );
95 virtual ~NNTPviewItem(); 98 virtual ~NNTPviewItem();
96 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); 99 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target );
97 virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); 100 virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail );
98 AbstractMail *getWrapper(); 101 AbstractMail *getWrapper();
99 virtual QPopupMenu * getContextMenu(); 102 virtual Q3PopupMenu * getContextMenu();
100 virtual void contextMenuSelected(int); 103 virtual void contextMenuSelected(int);
101 104
102protected: 105protected:
@@ -112,11 +115,11 @@ class NNTPfolderItem : public AccountViewItem
112{ 115{
113 116
114public: 117public:
115 NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); 118 NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , Q3ListViewItem*after );
116 virtual ~NNTPfolderItem(); 119 virtual ~NNTPfolderItem();
117 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); 120 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&);
118 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); 121 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&);
119 virtual QPopupMenu * getContextMenu(); 122 virtual Q3PopupMenu * getContextMenu();
120 virtual void contextMenuSelected(int); 123 virtual void contextMenuSelected(int);
121 124
122protected: 125protected:
@@ -132,10 +135,10 @@ class IMAPviewItem : public AccountViewItem
132public: 135public:
133 IMAPviewItem( IMAPaccount *a, AccountView *parent ); 136 IMAPviewItem( IMAPaccount *a, AccountView *parent );
134 virtual ~IMAPviewItem(); 137 virtual ~IMAPviewItem();
135 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); 138 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&);
136 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); 139 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&);
137 AbstractMail *getWrapper(); 140 AbstractMail *getWrapper();
138 virtual QPopupMenu * getContextMenu(); 141 virtual Q3PopupMenu * getContextMenu();
139 virtual void contextMenuSelected(int); 142 virtual void contextMenuSelected(int);
140 const QStringList&subFolders(); 143 const QStringList&subFolders();
141 virtual void refreshFolders(bool force=false); 144 virtual void refreshFolders(bool force=false);
@@ -152,12 +155,12 @@ class IMAPfolderItem : public AccountViewItem
152{ 155{
153 156
154public: 157public:
155 IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); 158 IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , Q3ListViewItem*after );
156 IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); 159 IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master );
157 virtual ~IMAPfolderItem(); 160 virtual ~IMAPfolderItem();
158 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); 161 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&);
159 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); 162 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&);
160 virtual QPopupMenu * getContextMenu(); 163 virtual Q3PopupMenu * getContextMenu();
161 virtual void contextMenuSelected(int); 164 virtual void contextMenuSelected(int);
162 virtual const QString& Delemiter()const; 165 virtual const QString& Delemiter()const;
163protected: 166protected:
@@ -174,10 +177,10 @@ class MHviewItem : public AccountViewItem
174public: 177public:
175 MHviewItem( const QString&aMboxPath, AccountView *parent ); 178 MHviewItem( const QString&aMboxPath, AccountView *parent );
176 virtual ~MHviewItem(); 179 virtual ~MHviewItem();
177 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); 180 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target );
178 virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); 181 virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail );
179 AbstractMail *getWrapper(); 182 AbstractMail *getWrapper();
180 virtual QPopupMenu * getContextMenu(); 183 virtual Q3PopupMenu * getContextMenu();
181 virtual void contextMenuSelected(int); 184 virtual void contextMenuSelected(int);
182 QStringList subFolders(); 185 QStringList subFolders();
183 virtual void refresh(bool force=false); 186 virtual void refresh(bool force=false);
@@ -194,12 +197,12 @@ class MHfolderItem : public AccountViewItem
194{ 197{
195 198
196public: 199public:
197 MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); 200 MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , Q3ListViewItem*after );
198 MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); 201 MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master);
199 virtual ~MHfolderItem(); 202 virtual ~MHfolderItem();
200 virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); 203 virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&);
201 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); 204 virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&);
202 virtual QPopupMenu * getContextMenu(); 205 virtual Q3PopupMenu * getContextMenu();
203 virtual void contextMenuSelected(int); 206 virtual void contextMenuSelected(int);
204 virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; 207 virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const;
205 virtual bool isDraftfolder(); 208 virtual bool isDraftfolder();
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index d1d4f7e..eea1f65 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -13,25 +13,27 @@
13 13
14/* QT */ 14/* QT */
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16#include <qpopupmenu.h> 16#include <q3popupmenu.h>
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qtimer.h> 18#include <qtimer.h>
19#include <qspinbox.h> 19#include <qspinbox.h>
20//Added by qt3to4:
21#include <Q3ValueList>
20#include <klocale.h> 22#include <klocale.h>
21#include <kmessagebox.h> 23#include <kmessagebox.h>
22 24
23using namespace Opie::Core; 25using namespace Opie::Core;
24AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) 26AccountView::AccountView( QWidget *parent, const char *name, Qt::WFlags flags )
25 : QListView( parent, name, flags ) 27 : Q3ListView( parent, name, flags )
26{ 28{
27 //connect( this, SIGNAL( selectionChanged(QListViewItem*) ), 29 //connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
28 // SLOT( refresh(QListViewItem*) ) ); 30 // SLOT( refresh(QListViewItem*) ) );
29 connect( this, SIGNAL( clicked(QListViewItem*) ), 31 connect( this, SIGNAL( clicked(Q3ListViewItem*) ),
30 SLOT( refresh(QListViewItem*) ) ); 32 SLOT( refresh(Q3ListViewItem*) ) );
31 connect( this, SIGNAL( returnPressed(QListViewItem*) ), 33 connect( this, SIGNAL( returnPressed(Q3ListViewItem*) ),
32 SLOT( refresh(QListViewItem*) ) ); 34 SLOT( refresh(Q3ListViewItem*) ) );
33 connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 35 connect( this, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this,
34 SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); 36 SLOT( slotHold(int,Q3ListViewItem*,const QPoint&,int) ) );
35 setSorting(0); 37 setSorting(0);
36} 38}
37 39
@@ -48,12 +50,12 @@ void AccountView::slotContextMenu(int id)
48 view->contextMenuSelected(id); 50 view->contextMenuSelected(id);
49} 51}
50 52
51void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) 53void AccountView::slotHold(int button, Q3ListViewItem * item,const QPoint&,int)
52{ 54{
53 if (button==1) {return;} 55 if (button==1) {return;}
54 if (!item) return; 56 if (!item) return;
55 AccountViewItem *view = static_cast<AccountViewItem *>(item); 57 AccountViewItem *view = static_cast<AccountViewItem *>(item);
56 QPopupMenu*m = view->getContextMenu(); 58 Q3PopupMenu*m = view->getContextMenu();
57 if (!m) return; 59 if (!m) return;
58 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); 60 connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int)));
59 m->setFocus(); 61 m->setFocus();
@@ -93,7 +95,7 @@ void AccountView::populate( QList<Account> list )
93 } 95 }
94} 96}
95 97
96void AccountView::refresh(QListViewItem *item) 98void AccountView::refresh(Q3ListViewItem *item)
97{ 99{
98 if ( item ) 100 if ( item )
99 { 101 {
@@ -145,7 +147,7 @@ void AccountView::refreshOutgoing()
145void AccountView::refreshCurrentSelected() 147void AccountView::refreshCurrentSelected()
146{ 148{
147 if ( !m_currentItem ) return; 149 if ( !m_currentItem ) return;
148 QValueList<RecMailP> headerlist; 150 Q3ValueList<RecMailP> headerlist;
149 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); 151 AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem);
150 view->refresh(headerlist); 152 view->refresh(headerlist);
151 emit refreshMailview(headerlist); 153 emit refreshMailview(headerlist);
@@ -166,7 +168,7 @@ void AccountView::refreshAll()
166 168
167RecBodyP AccountView::fetchBody(const RecMailP&aMail) 169RecBodyP AccountView::fetchBody(const RecMailP&aMail)
168{ 170{
169 QListViewItem*item = selectedItem (); 171 Q3ListViewItem*item = selectedItem ();
170 if (!item) return new RecBody(); 172 if (!item) return new RecBody();
171 AccountViewItem *view = static_cast<AccountViewItem *>(item); 173 AccountViewItem *view = static_cast<AccountViewItem *>(item);
172 return view->fetchBody(aMail); 174 return view->fetchBody(aMail);
diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h
index 33f3479..14b0ff9 100644
--- a/kmicromail/accountview.h
+++ b/kmicromail/accountview.h
@@ -1,8 +1,10 @@
1#ifndef ACCOUNTVIEW_H 1#ifndef ACCOUNTVIEW_H
2#define ACCOUNTVIEW_H 2#define ACCOUNTVIEW_H
3 3
4#include <qlistview.h> 4#include <q3listview.h>
5#include <qlist.h> 5#include <qlist.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6#include <opie2/osmartpointer.h> 8#include <opie2/osmartpointer.h>
7#include <libmailwrapper/mailtypes.h> 9#include <libmailwrapper/mailtypes.h>
8 10
@@ -13,36 +15,36 @@ class Account;
13class IMAPviewItem; 15class IMAPviewItem;
14class MHviewItem; 16class MHviewItem;
15 17
16class AccountView : public QListView 18class AccountView : public Q3ListView
17{ 19{
18 Q_OBJECT 20 Q_OBJECT
19 21
20public: 22public:
21 AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 23 AccountView( QWidget *parent = 0, const char *name = 0, Qt::WFlags flags = 0 );
22 virtual ~AccountView(); 24 virtual ~AccountView();
23 virtual void populate( QList<Account> list ); 25 virtual void populate( QList<Account> list );
24 virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); 26 virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail);
25 virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); 27 virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper);
26 virtual void downloadMailsInbox(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); 28 virtual void downloadMailsInbox(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper);
27 virtual bool currentisDraft(); 29 virtual bool currentisDraft();
28 QValueList<MHviewItem*> allAccounts() { return mhAccounts;} 30 Q3ValueList<MHviewItem*> allAccounts() { return mhAccounts;}
29public slots: 31public slots:
30 virtual void refreshAll(); 32 virtual void refreshAll();
31 virtual void refresh(QListViewItem *item); 33 virtual void refresh(Q3ListViewItem *item);
32 virtual void refreshCurrent(); 34 virtual void refreshCurrent();
33 virtual void refreshCurrentSelected(); 35 virtual void refreshCurrentSelected();
34 virtual void refreshOutgoing(); 36 virtual void refreshOutgoing();
35 virtual void slotHold(int, QListViewItem *,const QPoint&,int); 37 virtual void slotHold(int, Q3ListViewItem *,const QPoint&,int);
36 virtual void slotContextMenu(int id); 38 virtual void slotContextMenu(int id);
37 void setupFolderselect(Selectstore*sels); 39 void setupFolderselect(Selectstore*sels);
38 40
39signals: 41signals:
40 void refreshMailview(const QValueList<RecMailP>& ); 42 void refreshMailview(const Q3ValueList<RecMailP>& );
41 43
42protected: 44protected:
43 QListViewItem* m_currentItem; 45 Q3ListViewItem* m_currentItem;
44 QValueList<IMAPviewItem*> imapAccounts; 46 Q3ValueList<IMAPviewItem*> imapAccounts;
45 QValueList<MHviewItem*> mhAccounts; 47 Q3ValueList<MHviewItem*> mhAccounts;
46}; 48};
47 49
48#endif 50#endif
diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp
index 4bc4441..81d7b52 100644
--- a/kmicromail/composemail.cpp
+++ b/kmicromail/composemail.cpp
@@ -38,14 +38,14 @@
38 38
39#include <qcombobox.h> 39#include <qcombobox.h>
40#include <qcheckbox.h> 40#include <qcheckbox.h>
41#include <qiconset.h> 41#include <qicon.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qmessagebox.h> 43#include <qmessagebox.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qmultilineedit.h> 45#include <q3multilineedit.h>
46#include <qlabel.h> 46#include <qlabel.h>
47#include <qtabwidget.h> 47#include <qtabwidget.h>
48#include <qlistview.h> 48#include <q3listview.h>
49 49
50//using namespace Opie::Core; 50//using namespace Opie::Core;
51//using namespace Opie::Ui; 51//using namespace Opie::Ui;
@@ -125,7 +125,7 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo
125 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); 125 connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) );
126 mMail = 0; 126 mMail = 0;
127 warnAttach = true; 127 warnAttach = true;
128 QIconSet icon; 128 QIcon icon;
129 //icon = SmallIcon("fileexport"); 129 //icon = SmallIcon("fileexport");
130 icon = SmallIcon("filesave"); 130 icon = SmallIcon("filesave");
131 SaveButton->setIconSet (icon ) ; 131 SaveButton->setIconSet (icon ) ;
@@ -141,7 +141,7 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo
141 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); 141 QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold );
142#endif 142#endif
143 message->setFont ( KOPrefs::instance()->mComposeFont ); 143 message->setFont ( KOPrefs::instance()->mComposeFont );
144 message->setWordWrap (QMultiLineEdit::WidgetWidth); 144 message->setWordWrap (Q3MultiLineEdit::WidgetWidth);
145 if ( smtpAccounts.count() > 0 ) { 145 if ( smtpAccounts.count() > 0 ) {
146 fillValues( smtpAccountBox->currentItem() ); 146 fillValues( smtpAccountBox->currentItem() );
147 } else { 147 } else {
@@ -534,8 +534,8 @@ void ComposeMail::reEditMail(const RecMailP&current)
534 setCharset(body->getCharset()); 534 setCharset(body->getCharset());
535} 535}
536 536
537AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) 537AttachViewItem::AttachViewItem( Q3ListView *parent, Attachment *att )
538 : QListViewItem( parent ) 538 : Q3ListViewItem( parent )
539{ 539{
540 attachment = att; 540 attachment = att;
541 if ( !attachment->getPixmap().isNull() ) 541 if ( !attachment->getPixmap().isNull() )
diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h
index 966ac3e..9aef4e1 100644
--- a/kmicromail/composemail.h
+++ b/kmicromail/composemail.h
@@ -2,7 +2,7 @@
2#define COMPOSEMAIL_H 2#define COMPOSEMAIL_H
3 3
4#include <qlineedit.h> 4#include <qlineedit.h>
5#include <qlistview.h> 5#include <q3listview.h>
6 6
7#include "composemailui.h" 7#include "composemailui.h"
8//#include "addresspickerui.h" 8//#include "addresspickerui.h"
@@ -80,10 +80,10 @@ protected:
80 bool warnAttach; 80 bool warnAttach;
81}; 81};
82 82
83class AttachViewItem : public QListViewItem 83class AttachViewItem : public Q3ListViewItem
84{ 84{
85public: 85public:
86 AttachViewItem( QListView *parent, Attachment *att ); 86 AttachViewItem( Q3ListView *parent, Attachment *att );
87 Attachment *getAttachment() { return attachment; } 87 Attachment *getAttachment() { return attachment; }
88 88
89private: 89private:
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 2c0f2d8..f274dc3 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -16,7 +16,7 @@
16#include <qlineedit.h> 16#include <qlineedit.h>
17#include <qlabel.h> 17#include <qlabel.h>
18#include <qtabwidget.h> 18#include <qtabwidget.h>
19#include <qlistview.h> 19#include <q3listview.h>
20#include <qspinbox.h> 20#include <qspinbox.h>
21#include <klocale.h> 21#include <klocale.h>
22#include <kfiledialog.h> 22#include <kfiledialog.h>
@@ -25,8 +25,8 @@
25 25
26using namespace Opie::Core; 26using namespace Opie::Core;
27 27
28AccountListItem::AccountListItem( QListView *parent, Account *a) 28AccountListItem::AccountListItem( Q3ListView *parent, Account *a)
29 : QListViewItem( parent ) 29 : Q3ListViewItem( parent )
30{ 30{
31 account = a; 31 account = a;
32 setText( 0, account->getAccountName() ); 32 setText( 0, account->getAccountName() );
@@ -51,7 +51,7 @@ AccountListItem::AccountListItem( QListView *parent, Account *a)
51 setText( 1, ttext); 51 setText( 1, ttext);
52} 52}
53 53
54EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) 54EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
55 : EditAccountsUI( parent, name, modal, flags ) 55 : EditAccountsUI( parent, name, modal, flags )
56{ 56{
57 settings = s; 57 settings = s;
@@ -308,7 +308,7 @@ void EditAccounts::accept()
308 * SelectMailType 308 * SelectMailType
309 */ 309 */
310 310
311SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) 311SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
312 : SelectMailTypeUI( parent, name, modal, flags ) 312 : SelectMailTypeUI( parent, name, modal, flags )
313{ 313{
314 selected = selection; 314 selected = selection;
@@ -325,7 +325,7 @@ void SelectMailType::slotSelection( const QString &sel )
325 * IMAPconfig 325 * IMAPconfig
326 */ 326 */
327 327
328IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 328IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
329 : IMAPconfigUI( parent, name, modal, flags ) 329 : IMAPconfigUI( parent, name, modal, flags )
330{ 330{
331 data = account; 331 data = account;
@@ -408,7 +408,7 @@ void IMAPconfig::accept()
408 * POP3config 408 * POP3config
409 */ 409 */
410 410
411POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 411POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
412 : POP3configUI( parent, name, modal, flags ) 412 : POP3configUI( parent, name, modal, flags )
413{ 413{
414 data = account; 414 data = account;
@@ -489,7 +489,7 @@ void POP3config::accept()
489 * SMTPconfig 489 * SMTPconfig
490 */ 490 */
491 491
492SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 492SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
493 : SMTPconfigUI( parent, name, modal, flags ) 493 : SMTPconfigUI( parent, name, modal, flags )
494{ 494{
495 data = account; 495 data = account;
@@ -498,7 +498,7 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name,
498 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); 498 connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
499 499
500 // fillValues(); 500 // fillValues();
501 QIconSet icon; 501 QIcon icon;
502 //icon = SmallIcon("fileexport"); 502 //icon = SmallIcon("fileexport");
503 icon = SmallIcon("fileopen"); 503 icon = SmallIcon("fileopen");
504 SignaturButton->setText(""); 504 SignaturButton->setText("");
@@ -572,7 +572,7 @@ void SMTPconfig::accept()
572 * NNTPconfig 572 * NNTPconfig
573 */ 573 */
574 574
575NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) 575NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
576 : NNTPconfigUI( parent, name, modal, flags ) 576 : NNTPconfigUI( parent, name, modal, flags )
577{ 577{
578 data = account; 578 data = account;
@@ -593,8 +593,8 @@ void NNTPconfig::slotShowSub()
593 data->save(); 593 data->save();
594 ListViewGroups->clear(); 594 ListViewGroups->clear();
595 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 595 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
596 QCheckListItem *item; 596 Q3CheckListItem *item;
597 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 597 item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox );
598 item->setOn( true ); 598 item->setOn( true );
599 } 599 }
600 topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count())); 600 topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count()));
@@ -606,9 +606,9 @@ void NNTPconfig::slotShowFilter()
606 ListViewGroups->clear(); 606 ListViewGroups->clear();
607 int count = 0; 607 int count = 0;
608 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { 608 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) {
609 QCheckListItem *item; 609 Q3CheckListItem *item;
610 if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { 610 if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) {
611 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 611 item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox );
612 ++count; 612 ++count;
613 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 613 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
614 item->setOn( true ); 614 item->setOn( true );
@@ -629,8 +629,8 @@ void NNTPconfig::slotGetNG() {
629 ListViewGroups->clear(); 629 ListViewGroups->clear();
630 630
631 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { 631 for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) {
632 QCheckListItem *item; 632 Q3CheckListItem *item;
633 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 633 item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox );
634 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 634 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
635 item->setOn( true ); 635 item->setOn( true );
636 636
@@ -663,8 +663,8 @@ void NNTPconfig::fillValues()
663 subscribedGroups = data->getGroups(); 663 subscribedGroups = data->getGroups();
664 /* don't forget that - you will overwrite values if user clicks cancel! */ 664 /* don't forget that - you will overwrite values if user clicks cancel! */
665 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 665 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
666 QCheckListItem *item; 666 Q3CheckListItem *item;
667 item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); 667 item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox );
668 item->setOn( true ); 668 item->setOn( true );
669 } 669 }
670} 670}
@@ -679,11 +679,11 @@ void NNTPconfig::save()
679 data->setUser( userLine->text() ); 679 data->setUser( userLine->text() );
680 data->setPassword( passLine->text() ); 680 data->setPassword( passLine->text() );
681 681
682 QListViewItemIterator list_it( ListViewGroups ); 682 Q3ListViewItemIterator list_it( ListViewGroups );
683 683
684 for ( ; list_it.current(); ++list_it ) { 684 for ( ; list_it.current(); ++list_it ) {
685 685
686 if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { 686 if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) {
687 if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) 687 if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 )
688 subscribedGroups.append( list_it.current()->text(0) ); 688 subscribedGroups.append( list_it.current()->text(0) );
689 } else { 689 } else {
diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h
index 465780c..3d01d23 100644
--- a/kmicromail/editaccounts.h
+++ b/kmicromail/editaccounts.h
@@ -2,7 +2,7 @@
2#define EDITACCOUNTS_H 2#define EDITACCOUNTS_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qlistview.h> 5#include <q3listview.h>
6 6
7#include "editaccountsui.h" 7#include "editaccountsui.h"
8#include "selectmailtypeui.h" 8#include "selectmailtypeui.h"
@@ -15,11 +15,11 @@
15#include <libmailwrapper/settings.h> 15#include <libmailwrapper/settings.h>
16 16
17 17
18class AccountListItem : public QListViewItem 18class AccountListItem : public Q3ListViewItem
19{ 19{
20 20
21public: 21public:
22 AccountListItem( QListView *parent, Account *a); 22 AccountListItem( Q3ListView *parent, Account *a);
23 Account *getAccount() { return account; } 23 Account *getAccount() { return account; }
24 24
25private: 25private:
@@ -32,7 +32,7 @@ class EditAccounts : public EditAccountsUI
32 Q_OBJECT 32 Q_OBJECT
33 33
34public: 34public:
35 EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 35 EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 );
36 36
37public slots: 37public slots:
38 void slotNewAccount( const QString &type ); 38 void slotNewAccount( const QString &type );
@@ -60,7 +60,7 @@ class SelectMailType : public SelectMailTypeUI
60 Q_OBJECT 60 Q_OBJECT
61 61
62public: 62public:
63 SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 63 SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 );
64 64
65private slots: 65private slots:
66 void slotSelection( const QString &sel ); 66 void slotSelection( const QString &sel );
@@ -75,7 +75,7 @@ class IMAPconfig : public IMAPconfigUI
75 Q_OBJECT 75 Q_OBJECT
76 76
77public: 77public:
78 IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 78 IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 );
79 79
80public slots: 80public slots:
81 void fillValues(); 81 void fillValues();
@@ -94,7 +94,7 @@ class POP3config : public POP3configUI
94 Q_OBJECT 94 Q_OBJECT
95 95
96public: 96public:
97 POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 97 POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 );
98 98
99public slots: 99public slots:
100 void fillValues(); 100 void fillValues();
@@ -113,7 +113,7 @@ class SMTPconfig : public SMTPconfigUI
113 Q_OBJECT 113 Q_OBJECT
114 114
115public: 115public:
116 SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 116 SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 );
117 117
118public slots: 118public slots:
119 void fillValues(); 119 void fillValues();
@@ -133,7 +133,7 @@ class NNTPconfig : public NNTPconfigUI
133 Q_OBJECT 133 Q_OBJECT
134 134
135public: 135public:
136 NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); 136 NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 );
137 137
138public slots: 138public slots:
139 void fillValues(); 139 void fillValues();
diff --git a/kmicromail/kmicromail.pro b/kmicromail/kmicromail.pro
index 9f4d4bd..ce30bbf 100644
--- a/kmicromail/kmicromail.pro
+++ b/kmicromail/kmicromail.pro
@@ -41,7 +41,8 @@ SOURCES = main.cpp \
41 koprefsdialog.cpp\ 41 koprefsdialog.cpp\
42 nntpgroupsdlg.cpp 42 nntpgroupsdlg.cpp
43 43
44INTERFACES = editaccountsui.ui \ 44#The following line was changed from INTERFACES to FORMS3 by qt3to4
45FORMS3 = editaccountsui.ui \
45 selectmailtypeui.ui \ 46 selectmailtypeui.ui \
46 imapconfigui.ui \ 47 imapconfigui.ui \
47 pop3configui.ui \ 48 pop3configui.ui \
@@ -56,7 +57,7 @@ INTERFACES = editaccountsui.ui \
56 57
57 58
58INCLUDEPATH += ./qpe . .. ../libkdepim ../microkde ../microkde/kdecore ../libetpan/include ../microkde/kdeui 59INCLUDEPATH += ./qpe . .. ../libkdepim ../microkde ../microkde/kdecore ../libetpan/include ../microkde/kdeui
59LIBS += -L../bin -lmicromailwrapper -lmicrolibetpan -lmicrokde -lssl -lcrypto -lmicrokdepim -lmicrokabc -lpthread 60LIBS += -L../bin -lmicromailwrapper -lxmicrolibetpan -lxmicrokde -lssl -lcrypto -lxmicrokdepim -lxmicrokabc -lpthread
60 61
61DESTDIR= ../bin 62DESTDIR= ../bin
62TARGET = ompi 63TARGET = ompi
@@ -76,3 +77,8 @@ OBJECTS_DIR = obj/win
76MOC_DIR = moc/win 77MOC_DIR = moc/win
77} 78}
78 79
80#The following line was inserted by qt3to4
81QT += xml qt3support
82#The following line was inserted by qt3to4
83CONFIG += uic3
84
diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro
index a5a51f7..19fa398 100644
--- a/kmicromail/kmicromailE.pro
+++ b/kmicromail/kmicromailE.pro
@@ -55,7 +55,7 @@ INTERFACES = editaccountsui.ui \
55 55
56 56
57INCLUDEPATH += $(QPEDIR)/include . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/libetpan/include $(KDEPIMDIR)/microkde/kdeui 57INCLUDEPATH += $(QPEDIR)/include . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/libetpan/include $(KDEPIMDIR)/microkde/kdeui
58LIBS += -L$(QPEDIR)/lib -lmicromailwrapper -lqpe -lmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokdepim -lpthread 58LIBS += -L$(QPEDIR)/lib -lmicromailwrapper -lqpe -lxmicrolibetpan -lxmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lxmicrokdepim -lpthread
59LIBS += $(QTOPIALIB) 59LIBS += $(QTOPIALIB)
60#LIBS += -lqtopia 60#LIBS += -lqtopia
61#next line for Zaurus only 61#next line for Zaurus only
diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp
index e4b61dc..e2eed9a 100644
--- a/kmicromail/koprefs.cpp
+++ b/kmicromail/koprefs.cpp
@@ -26,7 +26,7 @@
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <q3textstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 017f1f7..e3102a4 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -23,24 +23,29 @@
23#include <kdialog.h> 23#include <kdialog.h>
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <q3groupbox.h>
27#include <qbuttongroup.h> 27#include <q3buttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <q3textstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <q3vbox.h>
35#include <qhbox.h> 35#include <q3hbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <q3strlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44//Added by qt3to4:
45#include <Q3HBoxLayout>
46#include <Q3GridLayout>
47#include <QPixmap>
48#include <Q3Frame>
44 49
45#include <kcolorbutton.h> 50#include <kcolorbutton.h>
46#include <kdebug.h> 51#include <kdebug.h>
@@ -111,9 +116,9 @@ void KOPrefsDialog::setupGlobalTab()
111} 116}
112void KOPrefsDialog::setupMainTab() 117void KOPrefsDialog::setupMainTab()
113{ 118{
114 QFrame *topFrame = addPage(i18n("General"),0,0); 119 Q3Frame *topFrame = addPage(i18n("General"),0,0);
115 120
116 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 121 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
117 topLayout->setSpacing(spacingHint()); 122 topLayout->setSpacing(spacingHint());
118 topLayout->setMargin(marginHint()); 123 topLayout->setMargin(marginHint());
119 124
@@ -136,9 +141,9 @@ void KOPrefsDialog::setupMainTab()
136 141
137void KOPrefsDialog::setupMailTab() 142void KOPrefsDialog::setupMailTab()
138{ 143{
139 QFrame *topFrame = addPage(i18n("Mail"),0,0); 144 Q3Frame *topFrame = addPage(i18n("Mail"),0,0);
140 145
141 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 146 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
142 topLayout->setSpacing(spacingHint()); 147 topLayout->setSpacing(spacingHint());
143 topLayout->setMargin(marginHint()); 148 topLayout->setMargin(marginHint());
144 149
@@ -182,10 +187,10 @@ void KOPrefsDialog::setupMailTab()
182void KOPrefsDialog::setupFontsTab() 187void KOPrefsDialog::setupFontsTab()
183{ 188{
184 189
185 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 190 Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
186 // DesktopIcon("fonts",KIcon::SizeMedium)); 191 // DesktopIcon("fonts",KIcon::SizeMedium));
187 192
188 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 193 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
189 topLayout->setSpacing(1); 194 topLayout->setSpacing(1);
190 topLayout->setMargin(3); 195 topLayout->setMargin(3);
191 KPrefsDialogWidFont * tVFont; 196 KPrefsDialogWidFont * tVFont;
@@ -238,8 +243,8 @@ void KOPrefsDialog::usrWriteConfig()
238#if 0 243#if 0
239void KOPrefsDialog::setupLocaleDateTab() 244void KOPrefsDialog::setupLocaleDateTab()
240{ 245{
241QFrame *topFrame = addPage(i18n("Date Format"),0,0); 246Q3Frame *topFrame = addPage(i18n("Date Format"),0,0);
242 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 247 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2);
243 topLayout->setSpacing(spacingHint()); 248 topLayout->setSpacing(spacingHint());
244 topLayout->setMargin(marginHint()); 249 topLayout->setMargin(marginHint());
245 int iii = 0; 250 int iii = 0;
@@ -292,8 +297,8 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
292 297
293void KOPrefsDialog::setupLocaleTab() 298void KOPrefsDialog::setupLocaleTab()
294{ 299{
295 QFrame *topFrame = addPage(i18n("Locale"),0,0); 300 Q3Frame *topFrame = addPage(i18n("Locale"),0,0);
296 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 301 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
297 topLayout->setSpacing(spacingHint()); 302 topLayout->setSpacing(spacingHint());
298 topLayout->setMargin(marginHint()); 303 topLayout->setMargin(marginHint());
299 int iii = 0; 304 int iii = 0;
@@ -331,7 +336,7 @@ void KOPrefsDialog::setupLocaleTab()
331 } 336 }
332 else { 337 else {
333 QWidget * hb = new QWidget( topFrame ); 338 QWidget * hb = new QWidget( topFrame );
334 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 339 Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb);
335 sb = 340 sb =
336 addWidBool(i18n("Week starts on Sunday"), 341 addWidBool(i18n("Week starts on Sunday"),
337 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 342 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
@@ -361,9 +366,9 @@ void KOPrefsDialog::setupSyncAlgTab()
361{ 366{
362#if 0 367#if 0
363 QLabel * lab; 368 QLabel * lab;
364 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); 369 Q3Frame *topFrame = addPage(i18n("Sync Prefs"),0,0);
365 mSetupSyncAlgTab = topFrame; 370 mSetupSyncAlgTab = topFrame;
366 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 371 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
367 topLayout->setSpacing(spacingHint()); 372 topLayout->setSpacing(spacingHint());
368 topLayout->setMargin(marginHint()); 373 topLayout->setMargin(marginHint());
369 int iii = 0; 374 int iii = 0;
@@ -403,8 +408,8 @@ void KOPrefsDialog::setupSyncTab()
403{ 408{
404#if 0 409#if 0
405 QLabel * lab; 410 QLabel * lab;
406 QFrame *topFrame = addPage(i18n("Sync Network"),0,0); 411 Q3Frame *topFrame = addPage(i18n("Sync Network"),0,0);
407 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 412 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
408 topLayout->setSpacing(spacingHint()); 413 topLayout->setSpacing(spacingHint());
409 topLayout->setMargin(marginHint()); 414 topLayout->setMargin(marginHint());
410 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); 415 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
@@ -451,10 +456,10 @@ void KOPrefsDialog::setupSyncTab()
451 456
452void KOPrefsDialog::setupMainTab() 457void KOPrefsDialog::setupMainTab()
453{ 458{
454 QFrame *topFrame = addPage(i18n("General"),0,0); 459 Q3Frame *topFrame = addPage(i18n("General"),0,0);
455 // DesktopIcon("identity",KIcon::SizeMedium)); 460 // DesktopIcon("identity",KIcon::SizeMedium));
456 461
457 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 462 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
458 topLayout->setSpacing(spacingHint()); 463 topLayout->setSpacing(spacingHint());
459 topLayout->setMargin(marginHint()); 464 topLayout->setMargin(marginHint());
460 465
@@ -475,11 +480,11 @@ void KOPrefsDialog::setupMainTab()
475 topLayout->addWidget(mEmailLabel,1,0); 480 topLayout->addWidget(mEmailLabel,1,0);
476 topLayout->addWidget(mEmailEdit,1,1); 481 topLayout->addWidget(mEmailEdit,1,1);
477 KPrefsDialogWidBool *wb; 482 KPrefsDialogWidBool *wb;
478 QHBox *dummy; 483 Q3HBox *dummy;
479 if ( QApplication::desktop()->width() > 480 ) { 484 if ( QApplication::desktop()->width() > 480 ) {
480 dummy = new QHBox(topFrame); 485 dummy = new Q3HBox(topFrame);
481 } else { 486 } else {
482 dummy = new QVBox(topFrame); 487 dummy = new Q3VBox(topFrame);
483 } 488 }
484 489
485 topLayout->addMultiCellWidget(dummy, 2,2,0,1); 490 topLayout->addMultiCellWidget(dummy, 2,2,0,1);
@@ -491,7 +496,7 @@ void KOPrefsDialog::setupMainTab()
491 &(KOPrefs::instance()->mToolBarMiniIcons),dummy); 496 &(KOPrefs::instance()->mToolBarMiniIcons),dummy);
492 497
493 498
494 dummy = new QHBox(topFrame); 499 dummy = new Q3HBox(topFrame);
495 new QLabel(i18n("Days in What's Next:"),dummy); 500 new QLabel(i18n("Days in What's Next:"),dummy);
496 mWhatsNextSpin = new QSpinBox(1,14,1,dummy); 501 mWhatsNextSpin = new QSpinBox(1,14,1,dummy);
497 502
@@ -499,13 +504,13 @@ void KOPrefsDialog::setupMainTab()
499 504
500 505
501 506
502 dummy = new QHBox(topFrame); 507 dummy = new Q3HBox(topFrame);
503 new QLabel(i18n("Days in Next-X-Days:"),dummy); 508 new QLabel(i18n("Days in Next-X-Days:"),dummy);
504 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 509 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
505 510
506 topLayout->addMultiCellWidget(dummy,4,4,0,1); 511 topLayout->addMultiCellWidget(dummy,4,4,0,1);
507 512
508 QHBox *prioBox = new QHBox(topFrame); 513 Q3HBox *prioBox = new Q3HBox(topFrame);
509 // intervalBox->setSpacing(spacingHint()); 514 // intervalBox->setSpacing(spacingHint());
510 topLayout->addMultiCellWidget(prioBox,5,5,0,1); 515 topLayout->addMultiCellWidget(prioBox,5,5,0,1);
511 QString messa = i18n("Show topmost todo prios in What's Next:"); 516 QString messa = i18n("Show topmost todo prios in What's Next:");
@@ -529,7 +534,7 @@ void KOPrefsDialog::setupMainTab()
529 // addWidBool(i18n("Enable automatic saving of calendar"), 534 // addWidBool(i18n("Enable automatic saving of calendar"),
530 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 535 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
531 536
532 QHBox *intervalBox = new QHBox(topFrame); 537 Q3HBox *intervalBox = new Q3HBox(topFrame);
533 // intervalBox->setSpacing(spacingHint()); 538 // intervalBox->setSpacing(spacingHint());
534 topLayout->addMultiCellWidget(intervalBox,6,6,0,1); 539 topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
535 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); 540 QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
@@ -620,14 +625,14 @@ void KOPrefsDialog::setupMainTab()
620 625
621void KOPrefsDialog::setupTimeTab() 626void KOPrefsDialog::setupTimeTab()
622{ 627{
623 QFrame *topFrame = addPage(i18n("Time"),0,0); 628 Q3Frame *topFrame = addPage(i18n("Time"),0,0);
624 // DesktopIcon("clock",KIcon::SizeMedium)); 629 // DesktopIcon("clock",KIcon::SizeMedium));
625 630
626 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 631 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
627 topLayout->setSpacing(spacingHint()); 632 topLayout->setSpacing(spacingHint());
628 topLayout->setMargin(marginHint()); 633 topLayout->setMargin(marginHint());
629 634
630 QHBox *dummy = new QHBox(topFrame); 635 Q3HBox *dummy = new Q3HBox(topFrame);
631 KPrefsWidTime *dayBegins = 636 KPrefsWidTime *dayBegins =
632 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 637 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
633 dummy); 638 dummy);
@@ -658,22 +663,22 @@ void KOPrefsDialog::setupTimeTab()
658 topLayout->addWidget(mAlarmTimeCombo,3,1); 663 topLayout->addWidget(mAlarmTimeCombo,3,1);
659 664
660 665
661 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 666 Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal,
662 i18n("Working Hours"), 667 i18n("Working Hours"),
663 topFrame); 668 topFrame);
664 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); 669 topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
665 workingHoursGroup->layout()->setSpacing( 0 ); 670 workingHoursGroup->layout()->setSpacing( 0 );
666 workingHoursGroup->layout()->setMargin( 4 ); 671 workingHoursGroup->layout()->setMargin( 4 );
667 QHBox *workStartBox = new QHBox(workingHoursGroup); 672 Q3HBox *workStartBox = new Q3HBox(workingHoursGroup);
668 // workStartBox->setMargin( 0 ); 673 // workStartBox->setMargin( 0 );
669 addWidTime(i18n("Daily starting hour:"), 674 addWidTime(i18n("Daily starting hour:"),
670 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 675 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
671 676
672 QHBox *workEndBox = new QHBox(workingHoursGroup); 677 Q3HBox *workEndBox = new Q3HBox(workingHoursGroup);
673 //workEndBox->setMargin( 0 ); 678 //workEndBox->setMargin( 0 );
674 addWidTime(i18n("Daily ending hour:"), 679 addWidTime(i18n("Daily ending hour:"),
675 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 680 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
676 QVBox *excludeBox = new QVBox(workingHoursGroup); 681 Q3VBox *excludeBox = new Q3VBox(workingHoursGroup);
677 //excludeBox->setMargin( 0 ); 682 //excludeBox->setMargin( 0 );
678 addWidBool(i18n("Exclude holidays"), 683 addWidBool(i18n("Exclude holidays"),
679 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 684 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
@@ -693,10 +698,10 @@ void KOPrefsDialog::setupTimeTab()
693void KOPrefsDialog::setupViewsTab() 698void KOPrefsDialog::setupViewsTab()
694{ 699{
695 700
696 QFrame *topFrame = addPage(i18n("Views"),0,0); 701 Q3Frame *topFrame = addPage(i18n("Views"),0,0);
697 // DesktopIcon("viewmag",KIcon::SizeMedium)); 702 // DesktopIcon("viewmag",KIcon::SizeMedium));
698 703
699 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 704 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1);
700 topLayout->setSpacing(spacingHint()); 705 topLayout->setSpacing(spacingHint());
701 topLayout->setMargin(marginHint()); 706 topLayout->setMargin(marginHint());
702 707
@@ -785,7 +790,7 @@ void KOPrefsDialog::setupViewsTab()
785 topFrame = addPage(i18n("ViewChange"),0,0); 790 topFrame = addPage(i18n("ViewChange"),0,0);
786 // DesktopIcon("viewmag",KIcon::SizeMedium)); 791 // DesktopIcon("viewmag",KIcon::SizeMedium));
787 792
788 topLayout = new QGridLayout(topFrame,6,1); 793 topLayout = new Q3GridLayout(topFrame,6,1);
789 topLayout->setSpacing(spacingHint()); 794 topLayout->setSpacing(spacingHint());
790 topLayout->setMargin(marginHint()); 795 topLayout->setMargin(marginHint());
791 ii = 0; 796 ii = 0;
@@ -838,12 +843,12 @@ void KOPrefsDialog::setupViewsTab()
838 topFrame = addPage(i18n("Month View"),0,0); 843 topFrame = addPage(i18n("Month View"),0,0);
839 // DesktopIcon("viewmag",KIcon::SizeMedium)); 844 // DesktopIcon("viewmag",KIcon::SizeMedium));
840 845
841 topLayout = new QGridLayout(topFrame,5,1); 846 topLayout = new Q3GridLayout(topFrame,5,1);
842 topLayout->setSpacing(spacingHint()); 847 topLayout->setSpacing(spacingHint());
843 topLayout->setMargin(marginHint()); 848 topLayout->setMargin(marginHint());
844 ii = 0; 849 ii = 0;
845 QLabel *lab; 850 QLabel *lab;
846 QHBox *habo = new QHBox( topFrame ); 851 Q3HBox *habo = new Q3HBox( topFrame );
847 if ( QApplication::desktop()->width() < 320 ) { 852 if ( QApplication::desktop()->width() < 320 ) {
848 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 853 lab = new QLabel ( i18n("Show events that recur "), topFrame );
849 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 854 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
@@ -865,7 +870,7 @@ void KOPrefsDialog::setupViewsTab()
865 ii++; 870 ii++;
866 871
867 872
868 habo = new QHBox( topFrame ); 873 habo = new Q3HBox( topFrame );
869 if ( QApplication::desktop()->width() < 320 ) { 874 if ( QApplication::desktop()->width() < 320 ) {
870 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 875 lab = new QLabel (i18n("Show in every cell ") , topFrame );
871 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 876 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
@@ -933,7 +938,7 @@ void KOPrefsDialog::setupViewsTab()
933 topFrame = addPage(i18n("Todo View"),0,0); 938 topFrame = addPage(i18n("Todo View"),0,0);
934 // DesktopIcon("viewmag",KIcon::SizeMedium)); 939 // DesktopIcon("viewmag",KIcon::SizeMedium));
935 940
936 topLayout = new QGridLayout(topFrame,4,1); 941 topLayout = new Q3GridLayout(topFrame,4,1);
937 topLayout->setSpacing(spacingHint()); 942 topLayout->setSpacing(spacingHint());
938 topLayout->setMargin(marginHint()); 943 topLayout->setMargin(marginHint());
939 ii = 0; 944 ii = 0;
@@ -965,7 +970,7 @@ void KOPrefsDialog::setupViewsTab()
965 KPrefsWidColor *todoDueTodayColor = 970 KPrefsWidColor *todoDueTodayColor =
966 addWidColor(i18n("Todo due today color:"), 971 addWidColor(i18n("Todo due today color:"),
967 &(KOPrefs::instance()->mTodoDueTodayColor),wid); 972 &(KOPrefs::instance()->mTodoDueTodayColor),wid);
968 QHBoxLayout *widLayout = new QHBoxLayout(wid); 973 Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid);
969 widLayout->addWidget( todoDueTodayColor->label() ); 974 widLayout->addWidget( todoDueTodayColor->label() );
970 widLayout->addWidget( todoDueTodayColor->button() ); 975 widLayout->addWidget( todoDueTodayColor->button() );
971 topLayout->addWidget(wid,ii++,0); 976 topLayout->addWidget(wid,ii++,0);
@@ -973,7 +978,7 @@ void KOPrefsDialog::setupViewsTab()
973 978
974 // Todo overdue color 979 // Todo overdue color
975 wid = new QWidget( topFrame ); 980 wid = new QWidget( topFrame );
976 widLayout = new QHBoxLayout(wid); 981 widLayout = new Q3HBoxLayout(wid);
977 KPrefsWidColor *todoOverdueColor = 982 KPrefsWidColor *todoOverdueColor =
978 addWidColor(i18n("Todo overdue color:"), 983 addWidColor(i18n("Todo overdue color:"),
979 &(KOPrefs::instance()->mTodoOverdueColor),wid); 984 &(KOPrefs::instance()->mTodoOverdueColor),wid);
@@ -997,7 +1002,7 @@ void KOPrefsDialog::setupViewsTab()
997 topFrame = addPage(i18n("Alarm"),0,0); 1002 topFrame = addPage(i18n("Alarm"),0,0);
998 // DesktopIcon("viewmag",KIcon::SizeMedium)); 1003 // DesktopIcon("viewmag",KIcon::SizeMedium));
999 1004
1000 topLayout = new QGridLayout(topFrame,2,1); 1005 topLayout = new Q3GridLayout(topFrame,2,1);
1001 topLayout->setSpacing(spacingHint()); 1006 topLayout->setSpacing(spacingHint());
1002 topLayout->setMargin(marginHint()); 1007 topLayout->setMargin(marginHint());
1003 int iii = 0; 1008 int iii = 0;
@@ -1010,28 +1015,28 @@ void KOPrefsDialog::setupViewsTab()
1010 1015
1011 topLayout->addWidget(lab ,iii++,0); 1016 topLayout->addWidget(lab ,iii++,0);
1012#ifndef DESKTOP_VERSION 1017#ifndef DESKTOP_VERSION
1013 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 1018 lab->setAlignment( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop);
1014#else 1019#else
1015 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 1020 lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
1016 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 1021 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
1017#endif 1022#endif
1018 1023
1019 QHBox* dummyBox = new QHBox(topFrame); 1024 Q3HBox* dummyBox = new Q3HBox(topFrame);
1020 new QLabel(i18n("Play beeps count:"),dummyBox); 1025 new QLabel(i18n("Play beeps count:"),dummyBox);
1021 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 1026 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
1022 topLayout->addWidget(dummyBox,iii++,0); 1027 topLayout->addWidget(dummyBox,iii++,0);
1023 1028
1024 dummyBox = new QHBox(topFrame); 1029 dummyBox = new Q3HBox(topFrame);
1025 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 1030 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
1026 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 1031 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
1027 topLayout->addWidget(dummyBox,iii++,0); 1032 topLayout->addWidget(dummyBox,iii++,0);
1028 1033
1029 dummyBox = new QHBox(topFrame); 1034 dummyBox = new Q3HBox(topFrame);
1030 new QLabel(i18n("Default suspend time in min:"),dummyBox); 1035 new QLabel(i18n("Default suspend time in min:"),dummyBox);
1031 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 1036 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
1032 topLayout->addWidget(dummyBox,iii++,0); 1037 topLayout->addWidget(dummyBox,iii++,0);
1033 1038
1034 dummyBox = new QHBox(topFrame); 1039 dummyBox = new Q3HBox(topFrame);
1035 new QLabel(i18n("Auto suspend count:"),dummyBox); 1040 new QLabel(i18n("Auto suspend count:"),dummyBox);
1036 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1041 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
1037 topLayout->addWidget(dummyBox,iii++,0); 1042 topLayout->addWidget(dummyBox,iii++,0);
@@ -1042,7 +1047,7 @@ void KOPrefsDialog::setupViewsTab()
1042 1047
1043 1048
1044 1049
1045 QHBox* hbo = new QHBox ( topFrame ); 1050 Q3HBox* hbo = new Q3HBox ( topFrame );
1046 mDefaultAlarmFile = new QLineEdit(hbo); 1051 mDefaultAlarmFile = new QLineEdit(hbo);
1047 QPushButton * loadTemplate = new QPushButton(hbo); 1052 QPushButton * loadTemplate = new QPushButton(hbo);
1048 QPixmap icon; 1053 QPixmap icon;
@@ -1082,10 +1087,10 @@ void KOPrefsDialog::selectSoundFile()
1082void KOPrefsDialog::setupFontsTab() 1087void KOPrefsDialog::setupFontsTab()
1083{ 1088{
1084 1089
1085 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1090 Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
1086 // DesktopIcon("fonts",KIcon::SizeMedium)); 1091 // DesktopIcon("fonts",KIcon::SizeMedium));
1087 1092
1088 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1093 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
1089 topLayout->setSpacing(1); 1094 topLayout->setSpacing(1);
1090 topLayout->setMargin(3); 1095 topLayout->setMargin(3);
1091 KPrefsDialogWidFont * tVFont; 1096 KPrefsDialogWidFont * tVFont;
@@ -1152,7 +1157,7 @@ void KOPrefsDialog::setupFontsTab()
1152 topFrame = addPage(i18n("View Fonts"),0, 1157 topFrame = addPage(i18n("View Fonts"),0,
1153 DesktopIcon("fonts",KIcon::SizeMedium)); 1158 DesktopIcon("fonts",KIcon::SizeMedium));
1154 1159
1155 topLayout = new QGridLayout(topFrame,7,3); 1160 topLayout = new Q3GridLayout(topFrame,7,3);
1156 topLayout->setSpacing(1); 1161 topLayout->setSpacing(1);
1157 topLayout->setMargin(3); 1162 topLayout->setMargin(3);
1158 1163
@@ -1220,10 +1225,10 @@ void KOPrefsDialog::setupFontsTab()
1220 1225
1221void KOPrefsDialog::setupColorsTab() 1226void KOPrefsDialog::setupColorsTab()
1222{ 1227{
1223 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1228 Q3Frame *topFrame = addPage(i18n("Colors"),0,0);
1224 // DesktopIcon("colorize",KIcon::SizeMedium)); 1229 // DesktopIcon("colorize",KIcon::SizeMedium));
1225 1230
1226 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1231 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
1227 // topLayout->setSpacing(spacingHint()); 1232 // topLayout->setSpacing(spacingHint());
1228 // topLayout->setMargin(marginHint()); 1233 // topLayout->setMargin(marginHint());
1229 1234
@@ -1231,9 +1236,9 @@ void KOPrefsDialog::setupColorsTab()
1231 topLayout->setMargin(3); 1236 topLayout->setMargin(3);
1232 1237
1233 int ii = 1; 1238 int ii = 1;
1234 QGroupBox *categoryGroup ; 1239 Q3GroupBox *categoryGroup ;
1235 1240
1236 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1241 categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"),
1237 topFrame); 1242 topFrame);
1238 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1243 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1239 1244
@@ -1326,7 +1331,7 @@ void KOPrefsDialog::setupPrinterTab()
1326 mPrinterTab = addPage(i18n("Printing"),0, 1331 mPrinterTab = addPage(i18n("Printing"),0,
1327 DesktopIcon("fileprint",KIcon::SizeMedium)); 1332 DesktopIcon("fileprint",KIcon::SizeMedium));
1328 1333
1329 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1334 Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2);
1330 topLayout->setSpacing(spacingHint()); 1335 topLayout->setSpacing(spacingHint());
1331 topLayout->setMargin(marginHint()); 1336 topLayout->setMargin(marginHint());
1332 1337
@@ -1336,10 +1341,10 @@ void KOPrefsDialog::setupPrinterTab()
1336void KOPrefsDialog::setupGroupSchedulingTab() 1341void KOPrefsDialog::setupGroupSchedulingTab()
1337{ 1342{
1338#if 0 1343#if 0
1339 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1344 Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0,
1340 DesktopIcon("personal",KIcon::SizeMedium)); 1345 DesktopIcon("personal",KIcon::SizeMedium));
1341 1346
1342 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1347 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
1343 topLayout->setSpacing(spacingHint()); 1348 topLayout->setSpacing(spacingHint());
1344 topLayout->setMargin(marginHint()); 1349 topLayout->setMargin(marginHint());
1345 1350
@@ -1362,7 +1367,7 @@ void KOPrefsDialog::setupGroupSchedulingTab()
1362 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1367 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1363 1368
1364 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1369 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1365 mAMails = new QListView(topFrame); 1370 mAMails = new Q3ListView(topFrame);
1366 mAMails->addColumn(i18n("Email"),300); 1371 mAMails->addColumn(i18n("Email"),300);
1367 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1372 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1368 1373
@@ -1380,17 +1385,17 @@ void KOPrefsDialog::setupGroupSchedulingTab()
1380 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1385 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1381 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1386 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1382 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1387 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1383 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1388 connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput()));
1384#endif 1389#endif
1385} 1390}
1386 1391
1387void KOPrefsDialog::setupGroupAutomationTab() 1392void KOPrefsDialog::setupGroupAutomationTab()
1388{ 1393{
1389 return; 1394 return;
1390 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1395 Q3Frame *topFrame = addPage(i18n("Group Automation"),0,
1391 DesktopIcon("personal",KIcon::SizeMedium)); 1396 DesktopIcon("personal",KIcon::SizeMedium));
1392 1397
1393 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1398 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1);
1394 topLayout->setSpacing(spacingHint()); 1399 topLayout->setSpacing(spacingHint());
1395 topLayout->setMargin(marginHint()); 1400 topLayout->setMargin(marginHint());
1396 1401
@@ -1543,7 +1548,7 @@ void KOPrefsDialog::usrWriteConfig()
1543 1548
1544 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); 1549 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1545 1550
1546 QDictIterator<QColor> it(mCategoryDict); 1551 Q3DictIterator<QColor> it(mCategoryDict);
1547 while (it.current()) { 1552 while (it.current()) {
1548 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1553 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1549 ++it; 1554 ++it;
@@ -1683,14 +1688,14 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
1683 1688
1684void KOPrefsDialog::setupTimeZoneTab() 1689void KOPrefsDialog::setupTimeZoneTab()
1685{ 1690{
1686 QFrame *topFrame = addPage(i18n("Time Zone"),0,0); 1691 Q3Frame *topFrame = addPage(i18n("Time Zone"),0,0);
1687 // DesktopIcon("clock",KIcon::SizeMedium)); 1692 // DesktopIcon("clock",KIcon::SizeMedium));
1688 1693
1689 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1694 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
1690 topLayout->setSpacing(spacingHint()); 1695 topLayout->setSpacing(spacingHint());
1691 topLayout->setMargin(marginHint()); 1696 topLayout->setMargin(marginHint());
1692 1697
1693 QHBox *timeZoneBox = new QHBox( topFrame ); 1698 Q3HBox *timeZoneBox = new Q3HBox( topFrame );
1694 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 1699 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1695 1700
1696 new QLabel( i18n("Timezone:"), timeZoneBox ); 1701 new QLabel( i18n("Timezone:"), timeZoneBox );
diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h
index 7fa9261..042af3f 100644
--- a/kmicromail/koprefsdialog.h
+++ b/kmicromail/koprefsdialog.h
@@ -23,10 +23,12 @@
23#ifndef _KOPREFSDIALOG_H 23#ifndef _KOPREFSDIALOG_H
24#define _KOPREFSDIALOG_H 24#define _KOPREFSDIALOG_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qdict.h> 27#include <q3dict.h>
28#include <qcolor.h> 28#include <qcolor.h>
29#include <qlistview.h> 29#include <q3listview.h>
30//Added by qt3to4:
31#include <QLabel>
30 32
31#include <kdialogbase.h> 33#include <kdialogbase.h>
32 34
@@ -119,7 +121,7 @@ protected:
119 KPrefsWidBool *mEnableGroupScheduling; 121 KPrefsWidBool *mEnableGroupScheduling;
120 KPrefsWidBool *mEnableProjectView; 122 KPrefsWidBool *mEnableProjectView;
121 123
122 QFrame *mPrinterTab; 124 Q3Frame *mPrinterTab;
123 125
124 QLineEdit *nameEdit; 126 QLineEdit *nameEdit;
125 QLineEdit *emailEdit; 127 QLineEdit *emailEdit;
@@ -146,7 +148,7 @@ protected:
146 148
147 QComboBox *mCategoryCombo; 149 QComboBox *mCategoryCombo;
148 KColorButton *mCategoryButton; 150 KColorButton *mCategoryButton;
149 QDict<QColor> mCategoryDict; 151 Q3Dict<QColor> mCategoryDict;
150 152
151 QSlider *mHourSizeSlider; 153 QSlider *mHourSizeSlider;
152 154
diff --git a/kmicromail/libetpan/libetpan.pro b/kmicromail/libetpan/libetpan.pro
index dfafa07..4b2654e 100644
--- a/kmicromail/libetpan/libetpan.pro
+++ b/kmicromail/libetpan/libetpan.pro
@@ -3,7 +3,7 @@
3###################################################################### 3######################################################################
4 4
5TEMPLATE = lib 5TEMPLATE = lib
6 TARGET = microlibetpan 6 TARGET = xmicrolibetpan
7 7
8OBJECTS_DIR = obj 8OBJECTS_DIR = obj
9MOC_DIR = moc 9MOC_DIR = moc
diff --git a/kmicromail/libetpan/libetpanE.pro b/kmicromail/libetpan/libetpanE.pro
index 7f37948..ea22692 100644
--- a/kmicromail/libetpan/libetpanE.pro
+++ b/kmicromail/libetpan/libetpanE.pro
@@ -3,7 +3,7 @@
3###################################################################### 3######################################################################
4 4
5TEMPLATE = lib 5TEMPLATE = lib
6 TARGET = microlibetpan 6 TARGET = xmicrolibetpan
7 7
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp
index 870985e..746d2ae 100644
--- a/kmicromail/libmailwrapper/abstractmail.cpp
+++ b/kmicromail/libmailwrapper/abstractmail.cpp
@@ -8,13 +8,15 @@
8#include <qpe/global.h> 8#include <qpe/global.h>
9 9
10 10
11#include <qprogressbar.h> 11#include <q3progressbar.h>
12#include <qapplication.h> 12#include <qapplication.h>
13#include <qmessagebox.h> 13#include <qmessagebox.h>
14//Added by qt3to4:
15#include <Q3ValueList>
14#include <klocale.h> 16#include <klocale.h>
15#include <kdecore/kstandarddirs.h> 17#include <kdecore/kstandarddirs.h>
16#include <qfile.h> 18#include <qfile.h>
17#include <qtextstream.h> 19#include <q3textstream.h>
18#include <stdlib.h> 20#include <stdlib.h>
19#include <libetpan/mailmime_content.h> 21#include <libetpan/mailmime_content.h>
20#include <libetpan/mailmime.h> 22#include <libetpan/mailmime.h>
@@ -111,10 +113,10 @@ QString AbstractMail::convert_String(const char*text)
111QString AbstractMail::gen_attachment_id() 113QString AbstractMail::gen_attachment_id()
112{ 114{
113 QFile file( "/proc/sys/kernel/random/uuid" ); 115 QFile file( "/proc/sys/kernel/random/uuid" );
114 if (!file.open(IO_ReadOnly ) ) 116 if (!file.open(QIODevice::ReadOnly ) )
115 return QString::null; 117 return QString::null;
116 118
117 QTextStream stream(&file); 119 Q3TextStream stream(&file);
118 120
119 return "{" + stream.read().stripWhiteSpace() + "}"; 121 return "{" + stream.read().stripWhiteSpace() + "}";
120} 122}
@@ -138,16 +140,16 @@ QString AbstractMail::draftFolder()
138} 140}
139 141
140/* temporary - will be removed when implemented in all classes */ 142/* temporary - will be removed when implemented in all classes */
141void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) 143void AbstractMail::deleteMails(const QString &,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &)
142{ 144{
143} 145}
144void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) 146void AbstractMail::deleteMailList(const Q3ValueList<RecMailP>&target)
145{ 147{
146 //qDebug("AbstractMail::deleteMailList:: Please reimplement! "); 148 //qDebug("AbstractMail::deleteMailList:: Please reimplement! ");
147 // this is currently re-implemented in pop3wrapper and imapwrapper 149 // this is currently re-implemented in pop3wrapper and imapwrapper
148 int iii = 0; 150 int iii = 0;
149 int count = target.count(); 151 int count = target.count();
150 QProgressBar wid ( count ); 152 Q3ProgressBar wid ( count );
151 wid.setCaption( i18n("Deleting ...")); 153 wid.setCaption( i18n("Deleting ..."));
152 wid.show(); 154 wid.show();
153 while (iii < count ) { 155 while (iii < count ) {
@@ -177,7 +179,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
177 i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName)); 179 i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName));
178 return; 180 return;
179 } 181 }
180 QValueList<RecMailP> t; 182 Q3ValueList<RecMailP> t;
181 listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); 183 listMessages(fromFolder->getName(),t,acc->getMaxMailSize() );
182 if ( t.count() == 0 ) { 184 if ( t.count() == 0 ) {
183 qDebug("There are no new messages %s", fromFolder->getName().latin1()); 185 qDebug("There are no new messages %s", fromFolder->getName().latin1());
@@ -187,10 +189,10 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
187 Global::statusMessage(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); 189 Global::statusMessage(i18n("%1 :Downloading mails..."). arg(acc->getAccountName()));
188 qDebug(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); 190 qDebug(i18n("%1 :Downloading mails..."). arg(acc->getAccountName()));
189 qApp->processEvents(); 191 qApp->processEvents();
190 QValueList<RecMailP> e; 192 Q3ValueList<RecMailP> e;
191 targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); 193 targetMail->listMessages(lfName,e,acc->getMaxMailSize() );
192 //qDebug("target has mails %d ", e.count()); 194 //qDebug("target has mails %d ", e.count());
193 QValueList<RecMailP> n; 195 Q3ValueList<RecMailP> n;
194 int iii = 0; 196 int iii = 0;
195 int count = t.count(); 197 int count = t.count();
196 while (iii < count ) { 198 while (iii < count ) {
@@ -221,7 +223,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
221 Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count())); 223 Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count()));
222 224
223#if 0 225#if 0
224 QValueList<RecMailP> t; 226 Q3ValueList<RecMailP> t;
225 listMessages(fromFolder->getName(),t, maxSizeInKb); 227 listMessages(fromFolder->getName(),t, maxSizeInKb);
226 mvcpMailList( t,targetFolder,targetWrapper,moveit); 228 mvcpMailList( t,targetFolder,targetWrapper,moveit);
227#endif 229#endif
@@ -230,12 +232,12 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
230void AbstractMail::mvcpAllMails(const FolderP&fromFolder, 232void AbstractMail::mvcpAllMails(const FolderP&fromFolder,
231 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) 233 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb)
232{ 234{
233 QValueList<RecMailP> t; 235 Q3ValueList<RecMailP> t;
234 listMessages(fromFolder->getName(),t, maxSizeInKb); 236 listMessages(fromFolder->getName(),t, maxSizeInKb);
235 mvcpMailList( t,targetFolder,targetWrapper,moveit); 237 mvcpMailList( t,targetFolder,targetWrapper,moveit);
236 238
237} 239}
238void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, 240void AbstractMail::mvcpMailList(const Q3ValueList<RecMailP>& t,
239 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) 241 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit)
240{ 242{
241 encodedString*st = 0; 243 encodedString*st = 0;
@@ -246,7 +248,7 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t,
246 // wel, processevents is qite strange, we need a widget for getting 248 // wel, processevents is qite strange, we need a widget for getting
247 // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye 249 // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye
248 250
249 QProgressBar wid ( count ); 251 Q3ProgressBar wid ( count );
250 wid.setCaption( i18n("Copying...")); 252 wid.setCaption( i18n("Copying..."));
251 wid.show(); 253 wid.show();
252 while (iii < count ) { 254 while (iii < count ) {
diff --git a/kmicromail/libmailwrapper/abstractmail.h b/kmicromail/libmailwrapper/abstractmail.h
index 2069ca1..f606b1f 100644
--- a/kmicromail/libmailwrapper/abstractmail.h
+++ b/kmicromail/libmailwrapper/abstractmail.h
@@ -7,6 +7,8 @@
7#include "settings.h" 7#include "settings.h"
8 8
9#include <qobject.h> 9#include <qobject.h>
10//Added by qt3to4:
11#include <Q3ValueList>
10#include <opie2/osmartpointer.h> 12#include <opie2/osmartpointer.h>
11#include "mailtypes.h" 13#include "mailtypes.h"
12 14
@@ -25,8 +27,8 @@ class AbstractMail:public QObject
25public: 27public:
26 AbstractMail(){}; 28 AbstractMail(){};
27 virtual ~AbstractMail(){} 29 virtual ~AbstractMail(){}
28 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; 30 virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0;
29 virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target, int sizeInKb = 0 )=0; 31 virtual void listMessages(const QString & mailbox,Q3ValueList<RecMailP>&target, int sizeInKb = 0 )=0;
30 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; 32 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0;
31 virtual RecBodyP fetchBody(const RecMailP&mail)=0; 33 virtual RecBodyP fetchBody(const RecMailP&mail)=0;
32 virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0; 34 virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0;
@@ -35,16 +37,16 @@ public:
35 virtual encodedString* fetchRawBody(const RecMailP&mail)=0; 37 virtual encodedString* fetchRawBody(const RecMailP&mail)=0;
36 38
37 virtual void deleteMail(const RecMailP&mail)=0; 39 virtual void deleteMail(const RecMailP&mail)=0;
38 virtual void deleteMailList(const QValueList<RecMailP>&target); 40 virtual void deleteMailList(const Q3ValueList<RecMailP>&target);
39 virtual void answeredMail(const RecMailP&mail)=0; 41 virtual void answeredMail(const RecMailP&mail)=0;
40 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; 42 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0;
41 virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); 43 virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target);
42 virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; 44 virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0;
43 virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; 45 virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0;
44 void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper ); 46 void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper );
45 virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, 47 virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,
46 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); 48 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0);
47 virtual void mvcpMailList(const QValueList<RecMailP>& t, 49 virtual void mvcpMailList(const Q3ValueList<RecMailP>& t,
48 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); 50 const QString&targetFolder,AbstractMail*targetWrapper,bool moveit);
49 virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); 51 virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit);
50 52
diff --git a/kmicromail/libmailwrapper/generatemail.cpp b/kmicromail/libmailwrapper/generatemail.cpp
index 2d213fe..ddad21b 100644
--- a/kmicromail/libmailwrapper/generatemail.cpp
+++ b/kmicromail/libmailwrapper/generatemail.cpp
@@ -7,6 +7,8 @@
7 7
8#include <stdlib.h> 8#include <stdlib.h>
9#include <qfileinfo.h> 9#include <qfileinfo.h>
10//Added by qt3to4:
11#include <Q3CString>
10 12
11using namespace Opie::Core; 13using namespace Opie::Core;
12const char* Generatemail::USER_AGENT="KOpieMail 33 1/3"; 14const char* Generatemail::USER_AGENT="KOpieMail 33 1/3";
@@ -228,7 +230,7 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) {
228 mailmime_content *content; 230 mailmime_content *content;
229 mailmime_parameter *param; 231 mailmime_parameter *param;
230 int err; 232 int err;
231 QCString __str; 233 Q3CString __str;
232 //qDebug(" Generatemail::buildTxtPart %s", str.latin1()); 234 //qDebug(" Generatemail::buildTxtPart %s", str.latin1());
233 param = mailmime_parameter_new( strdup( "charset" ), 235 param = mailmime_parameter_new( strdup( "charset" ),
234 strdup( mCharset.latin1() ) ); 236 strdup( mCharset.latin1() ) );
@@ -252,7 +254,7 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) {
252 goto err_free_fields; 254 goto err_free_fields;
253 { 255 {
254 //__str = str.utf8(); 256 //__str = str.utf8();
255 __str = QCString (str.latin1()); 257 __str = Q3CString (str.latin1());
256 err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() ); 258 err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() );
257 } 259 }
258 if ( err != MAILIMF_NO_ERROR ) 260 if ( err != MAILIMF_NO_ERROR )
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp
index 0b6adf7..633ab42 100644
--- a/kmicromail/libmailwrapper/genericwrapper.cpp
+++ b/kmicromail/libmailwrapper/genericwrapper.cpp
@@ -6,6 +6,8 @@
6#include <kconfig.h> 6#include <kconfig.h>
7#include <kglobal.h> 7#include <kglobal.h>
8#include <kstandarddirs.h> 8#include <kstandarddirs.h>
9//Added by qt3to4:
10#include <Q3ValueList>
9 11
10 12
11using namespace Opie::Core; 13using namespace Opie::Core;
@@ -182,7 +184,7 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc)
182 return enc; 184 return enc;
183} 185}
184 186
185void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) 187void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rec,int current_count)
186{ 188{
187 if (current_rec >= 10) { 189 if (current_rec >= 10) {
188 ; // odebug << "too deep recursion!" << oendl; 190 ; // odebug << "too deep recursion!" << oendl;
@@ -200,7 +202,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
200 switch (mime->mm_type) { 202 switch (mime->mm_type) {
201 case MAILMIME_SINGLE: 203 case MAILMIME_SINGLE:
202 { 204 {
203 QValueList<int>countlist = recList; 205 Q3ValueList<int>countlist = recList;
204 countlist.append(current_count); 206 countlist.append(current_count);
205 r = mailmessage_fetch_section(message,mime,&data,&len); 207 r = mailmessage_fetch_section(message,mime,&data,&len);
206 part->setSize(len); 208 part->setSize(len);
@@ -250,7 +252,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
250 { 252 {
251 unsigned int ccount = 1; 253 unsigned int ccount = 1;
252 mailmime*cbody=0; 254 mailmime*cbody=0;
253 QValueList<int>countlist = recList; 255 Q3ValueList<int>countlist = recList;
254 for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { 256 for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) {
255 cbody = (mailmime*)clist_content(cur); 257 cbody = (mailmime*)clist_content(cur);
256 if (cbody->mm_type==MAILMIME_MULTIPLE) { 258 if (cbody->mm_type==MAILMIME_MULTIPLE) {
@@ -270,7 +272,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m
270 break; 272 break;
271 case MAILMIME_MESSAGE: 273 case MAILMIME_MESSAGE:
272 { 274 {
273 QValueList<int>countlist = recList; 275 Q3ValueList<int>countlist = recList;
274 countlist.append(current_count); 276 countlist.append(current_count);
275 /* the own header is always at recursion 0 - we don't need that */ 277 /* the own header is always at recursion 0 - we don't need that */
276 if (current_rec > 0) { 278 if (current_rec > 0) {
@@ -302,7 +304,7 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg )
302 RecBodyP body = new RecBody(); 304 RecBodyP body = new RecBody();
303 //memset(&fields, 0, sizeof(struct mailmime_single_fields)); 305 //memset(&fields, 0, sizeof(struct mailmime_single_fields));
304 err = mailmessage_get_bodystructure(msg,&mime); 306 err = mailmessage_get_bodystructure(msg,&mime);
305 QValueList<int>recList; 307 Q3ValueList<int>recList;
306 traverseBody(body,msg,mime,recList); 308 traverseBody(body,msg,mime,recList);
307 return body; 309 return body;
308} 310}
@@ -447,7 +449,7 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies)
447 return res; 449 return res;
448} 450}
449 451
450void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) 452void Genericwrapper::parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb)
451{ 453{
452 int r; 454 int r;
453 mailmessage_list * env_list = 0; 455 mailmessage_list * env_list = 0;
diff --git a/kmicromail/libmailwrapper/genericwrapper.h b/kmicromail/libmailwrapper/genericwrapper.h
index c35a6da..a50161d 100644
--- a/kmicromail/libmailwrapper/genericwrapper.h
+++ b/kmicromail/libmailwrapper/genericwrapper.h
@@ -5,6 +5,8 @@
5#include "abstractmail.h" 5#include "abstractmail.h"
6#include <qmap.h> 6#include <qmap.h>
7#include <qstring.h> 7#include <qstring.h>
8//Added by qt3to4:
9#include <Q3ValueList>
8#include <libetpan/clist.h> 10#include <libetpan/clist.h>
9 11
10class RecMail; 12class RecMail;
@@ -51,11 +53,11 @@ protected:
51 QString parseGroup( mailimf_group *group ); 53 QString parseGroup( mailimf_group *group );
52 QString parseAddressList( mailimf_address_list *list ); 54 QString parseAddressList( mailimf_address_list *list );
53 55
54 void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); 56 void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rek=0,int current_count=1);
55 static void fillSingleBody(RecPartP&target,mailmessage*message,mailmime*mime); 57 static void fillSingleBody(RecPartP&target,mailmessage*message,mailmime*mime);
56 static void fillParameters(RecPartP&target,clist*parameters); 58 static void fillParameters(RecPartP&target,clist*parameters);
57 static QString getencoding(mailmime_mechanism*aEnc); 59 static QString getencoding(mailmime_mechanism*aEnc);
58 virtual void parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); 60 virtual void parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0);
59 QStringList parseInreplies(mailimf_in_reply_to * in_replies); 61 QStringList parseInreplies(mailimf_in_reply_to * in_replies);
60 62
61 QString msgTempName; 63 QString msgTempName;
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index 4f0c849..f73f4cc 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -3,10 +3,12 @@
3#include <libetpan/libetpan.h> 3#include <libetpan/libetpan.h>
4#include <qpe/global.h> 4#include <qpe/global.h>
5#include <qapplication.h> 5#include <qapplication.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6#include "imapwrapper.h" 8#include "imapwrapper.h"
7#include "mailtypes.h" 9#include "mailtypes.h"
8#include "logindialog.h" 10#include "logindialog.h"
9#include <qprogressbar.h> 11#include <q3progressbar.h>
10#include "genericwrapper.h" 12#include "genericwrapper.h"
11#include <kglobal.h> 13#include <kglobal.h>
12 14
@@ -239,7 +241,7 @@ void IMAPwrapper::logout()
239 m_Lastmbox = ""; 241 m_Lastmbox = "";
240} 242}
241 243
242void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) 244void IMAPwrapper::listMessages(const QString&mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb)
243{ 245{
244 246
245 int tryAgain = 1; 247 int tryAgain = 1;
@@ -320,7 +322,7 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma
320 } 322 }
321} 323}
322 324
323QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() 325Q3ValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
324{ 326{
325 const char *path, *mask; 327 const char *path, *mask;
326 int err = MAILIMAP_NO_ERROR; 328 int err = MAILIMAP_NO_ERROR;
@@ -329,7 +331,7 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders()
329 clistcell*cur_flag = 0; 331 clistcell*cur_flag = 0;
330 mailimap_mbx_list_flags*bflags = 0; 332 mailimap_mbx_list_flags*bflags = 0;
331 333
332 QValueList<FolderP>* folders = new QValueList<FolderP>(); 334 Q3ValueList<FolderP>* folders = new Q3ValueList<FolderP>();
333 login(); 335 login();
334 if (!m_imap) { 336 if (!m_imap) {
335 return folders; 337 return folders;
@@ -613,7 +615,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail)
613 mailimap_msg_att * msg_att; 615 mailimap_msg_att * msg_att;
614 msg_att = (mailimap_msg_att*)current->data; 616 msg_att = (mailimap_msg_att*)current->data;
615 mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; 617 mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data;
616 QValueList<int> path; 618 Q3ValueList<int> path;
617 body_desc = item->att_data.att_static->att_data.att_body; 619 body_desc = item->att_data.att_static->att_data.att_body;
618 traverseBody(mail,body_desc,body,0,path); 620 traverseBody(mail,body_desc,body,0,path);
619 } else { 621 } else {
@@ -664,7 +666,7 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list)
664 return l; 666 return l;
665} 667}
666 668
667encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) 669encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call)
668{ 670{
669 encodedString*res=new encodedString; 671 encodedString*res=new encodedString;
670 int err; 672 int err;
@@ -738,7 +740,7 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int
738/* current_recursion is for recursive calls. 740/* current_recursion is for recursive calls.
739 current_count means the position inside the internal loop! */ 741 current_count means the position inside the internal loop! */
740void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, 742void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,
741 int current_recursion,QValueList<int>recList,int current_count) 743 int current_recursion,Q3ValueList<int>recList,int current_count)
742{ 744{
743 if (!body || current_recursion>=10) { 745 if (!body || current_recursion>=10) {
744 return; 746 return;
@@ -746,7 +748,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
746 switch (body->bd_type) { 748 switch (body->bd_type) {
747 case MAILIMAP_BODY_1PART: 749 case MAILIMAP_BODY_1PART:
748 { 750 {
749 QValueList<int>countlist = recList; 751 Q3ValueList<int>countlist = recList;
750 countlist.append(current_count); 752 countlist.append(current_count);
751 RecPartP currentPart = new RecPart(); 753 RecPartP currentPart = new RecPart();
752 mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; 754 mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part;
@@ -799,7 +801,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t
799 break; 801 break;
800 case MAILIMAP_BODY_MPART: 802 case MAILIMAP_BODY_MPART:
801 { 803 {
802 QValueList<int>countlist = recList; 804 Q3ValueList<int>countlist = recList;
803 clistcell*current=0; 805 clistcell*current=0;
804 mailimap_body*current_body=0; 806 mailimap_body*current_body=0;
805 unsigned int ccount = 1; 807 unsigned int ccount = 1;
@@ -985,7 +987,7 @@ void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which
985 target_part->setEncoding(encoding); 987 target_part->setEncoding(encoding);
986 target_part->setSize(which->bd_size); 988 target_part->setSize(which->bd_size);
987} 989}
988void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) 990void IMAPwrapper::deleteMailList(const Q3ValueList<RecMailP>&target)
989{ 991{
990 //#if 0 992 //#if 0
991 mailimap_flag_list*flist; 993 mailimap_flag_list*flist;
@@ -1005,7 +1007,7 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target)
1005 mMax = count; 1007 mMax = count;
1006 progress( i18n("Delete")); 1008 progress( i18n("Delete"));
1007 1009
1008 QProgressBar wid ( count ); 1010 Q3ProgressBar wid ( count );
1009 wid.setCaption( i18n("Deleting ...")); 1011 wid.setCaption( i18n("Deleting ..."));
1010 wid.show(); 1012 wid.show();
1011 while (iii < count ) { 1013 while (iii < count ) {
@@ -1114,7 +1116,7 @@ void IMAPwrapper::answeredMail(const RecMailP&mail)
1114 } 1116 }
1115} 1117}
1116 1118
1117QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call,const QString&enc) 1119QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call,const QString&enc)
1118{ 1120{
1119 QString body(""); 1121 QString body("");
1120 encodedString*res = fetchRawPart(mail,path,internal_call); 1122 encodedString*res = fetchRawPart(mail,path,internal_call);
@@ -1299,7 +1301,7 @@ const QString&IMAPwrapper::getName()const
1299encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) 1301encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail)
1300{ 1302{
1301 // dummy 1303 // dummy
1302 QValueList<int> path; 1304 Q3ValueList<int> path;
1303 return fetchRawPart(mail,path,false); 1305 return fetchRawPart(mail,path,false);
1304} 1306}
1305 1307
diff --git a/kmicromail/libmailwrapper/imapwrapper.h b/kmicromail/libmailwrapper/imapwrapper.h
index 31c60a8..d3d3ecd 100644
--- a/kmicromail/libmailwrapper/imapwrapper.h
+++ b/kmicromail/libmailwrapper/imapwrapper.h
@@ -3,6 +3,8 @@
3#define __IMAPWRAPPER 3#define __IMAPWRAPPER
4 4
5#include <qlist.h> 5#include <qlist.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6#include "mailwrapper.h" 8#include "mailwrapper.h"
7#include "abstractmail.h" 9#include "abstractmail.h"
8#include <libetpan/clist.h> 10#include <libetpan/clist.h>
@@ -24,12 +26,12 @@ class IMAPwrapper : public AbstractMail
24public: 26public:
25 IMAPwrapper( IMAPaccount *a ); 27 IMAPwrapper( IMAPaccount *a );
26 virtual ~IMAPwrapper(); 28 virtual ~IMAPwrapper();
27 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); 29 virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
28 virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); 30 virtual void listMessages(const QString & mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0);
29 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 31 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
30 32
31 virtual void deleteMail(const RecMailP&mail); 33 virtual void deleteMail(const RecMailP&mail);
32 void deleteMailList(const QValueList<RecMailP>&target); 34 void deleteMailList(const Q3ValueList<RecMailP>&target);
33 virtual void answeredMail(const RecMailP&mail); 35 virtual void answeredMail(const RecMailP&mail);
34 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); 36 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder);
35 virtual void storeMessage(const char*msg,size_t length, const QString&folder); 37 virtual void storeMessage(const char*msg,size_t length, const QString&folder);
@@ -59,8 +61,8 @@ protected:
59 void login(bool tryTLS = true); 61 void login(bool tryTLS = true);
60 bool start_tls(bool force=true); 62 bool start_tls(bool force=true);
61 63
62 virtual QString fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); 64 virtual QString fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call=false,const QString&enc="");
63 virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call); 65 virtual encodedString*fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call);
64 int selectMbox(const QString&mbox); 66 int selectMbox(const QString&mbox);
65 67
66 void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description); 68 void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description);
@@ -68,7 +70,7 @@ protected:
68 void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which); 70 void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which);
69 void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which); 71 void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which);
70 void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which); 72 void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which);
71 void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,QValueList<int>recList,int current_count=1); 73 void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,Q3ValueList<int>recList,int current_count=1);
72 74
73 /* just helpers */ 75 /* just helpers */
74 static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which); 76 static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which);
diff --git a/kmicromail/libmailwrapper/libmailwrapper.pro b/kmicromail/libmailwrapper/libmailwrapper.pro
index 646630b..6b595ab 100644
--- a/kmicromail/libmailwrapper/libmailwrapper.pro
+++ b/kmicromail/libmailwrapper/libmailwrapper.pro
@@ -38,7 +38,8 @@ SOURCES = imapwrapper.cpp \
38 ../qpe/qdialog_hacked.cpp \ 38 ../qpe/qdialog_hacked.cpp \
39 ../qpe/global.cpp 39 ../qpe/global.cpp
40 40
41INTERFACES = logindialogui.ui \ 41#The following line was changed from INTERFACES to FORMS3 by qt3to4
42FORMS3 = logindialogui.ui \
42 sendmailprogressui.ui 43 sendmailprogressui.ui
43 44
44INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../../libetpan/include 45INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../../libetpan/include
@@ -63,3 +64,8 @@ QMAKE_LINK += /NODEFAULTLIB:LIBC
63OBJECTS_DIR = obj/win 64OBJECTS_DIR = obj/win
64MOC_DIR = moc/win 65MOC_DIR = moc/win
65} 66}
67#The following line was inserted by qt3to4
68QT += xml qt3support
69#The following line was inserted by qt3to4
70CONFIG += uic3
71
diff --git a/kmicromail/libmailwrapper/logindialog.cpp b/kmicromail/libmailwrapper/logindialog.cpp
index 31b75d0..d1f4b5d 100644
--- a/kmicromail/libmailwrapper/logindialog.cpp
+++ b/kmicromail/libmailwrapper/logindialog.cpp
@@ -6,7 +6,7 @@
6 6
7//using namespace Opie::Core; 7//using namespace Opie::Core;
8 8
9LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, WFlags flags ) 9LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, Qt::WFlags flags )
10 : LoginDialogUI( parent, name, modal, flags ) 10 : LoginDialogUI( parent, name, modal, flags )
11{ 11{
12 userLine->setText( (user.isEmpty()?QString(""):user) ); 12 userLine->setText( (user.isEmpty()?QString(""):user) );
diff --git a/kmicromail/libmailwrapper/logindialog.h b/kmicromail/libmailwrapper/logindialog.h
index f406f2c..a18daa5 100644
--- a/kmicromail/libmailwrapper/logindialog.h
+++ b/kmicromail/libmailwrapper/logindialog.h
@@ -8,7 +8,7 @@ class LoginDialog : public LoginDialogUI
8 Q_OBJECT 8 Q_OBJECT
9 9
10public: 10public:
11 LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); 11 LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, Qt::WFlags flags = 0 );
12 QString getUser() { return _user; } 12 QString getUser() { return _user; }
13 QString getPassword() { return _pass; } 13 QString getPassword() { return _pass; }
14 14
diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp
index 70a0ab5..84ccf9f 100644
--- a/kmicromail/libmailwrapper/mailtypes.cpp
+++ b/kmicromail/libmailwrapper/mailtypes.cpp
@@ -3,6 +3,8 @@
3//#include <opie2/odebug.h> 3//#include <opie2/odebug.h>
4 4
5#include <stdlib.h> 5#include <stdlib.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6 8
7using namespace Opie::Core; 9using namespace Opie::Core;
8RecMail::RecMail() 10RecMail::RecMail()
@@ -283,12 +285,12 @@ const QString RecPart::searchParamter(const QString&key)const
283 return value; 285 return value;
284} 286}
285 287
286void RecPart::setPositionlist(const QValueList<int>&poslist) 288void RecPart::setPositionlist(const Q3ValueList<int>&poslist)
287{ 289{
288 m_poslist = poslist; 290 m_poslist = poslist;
289} 291}
290 292
291const QValueList<int>& RecPart::Positionlist()const 293const Q3ValueList<int>& RecPart::Positionlist()const
292{ 294{
293 return m_poslist; 295 return m_poslist;
294} 296}
@@ -323,13 +325,13 @@ const QString& RecBody::Bodytext()const
323 return m_BodyText; 325 return m_BodyText;
324} 326}
325 327
326void RecBody::setParts(const QValueList<RecPartP>&parts) 328void RecBody::setParts(const Q3ValueList<RecPartP>&parts)
327{ 329{
328 m_PartsList.clear(); 330 m_PartsList.clear();
329 m_PartsList = parts; 331 m_PartsList = parts;
330} 332}
331 333
332const QValueList<RecPartP>& RecBody::Parts()const 334const Q3ValueList<RecPartP>& RecBody::Parts()const
333{ 335{
334 return m_PartsList; 336 return m_PartsList;
335} 337}
diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h
index 97f10d7..ac7f8da 100644
--- a/kmicromail/libmailwrapper/mailtypes.h
+++ b/kmicromail/libmailwrapper/mailtypes.h
@@ -14,7 +14,7 @@
14#include <qstring.h> 14#include <qstring.h>
15#include <qstringlist.h> 15#include <qstringlist.h>
16#include <qmap.h> 16#include <qmap.h>
17#include <qvaluelist.h> 17#include <q3valuelist.h>
18 18
19class AbstractMail; 19class AbstractMail;
20/* a class to describe mails in a mailbox */ 20/* a class to describe mails in a mailbox */
@@ -109,7 +109,7 @@ protected:
109 unsigned int m_lines,m_size; 109 unsigned int m_lines,m_size;
110 part_plist_t m_Parameters; 110 part_plist_t m_Parameters;
111 /* describes the position in the mail */ 111 /* describes the position in the mail */
112 QValueList<int> m_poslist; 112 Q3ValueList<int> m_poslist;
113 113
114public: 114public:
115 RecPart(); 115 RecPart();
@@ -136,8 +136,8 @@ public:
136 const part_plist_t&Parameters()const; 136 const part_plist_t&Parameters()const;
137 void addParameter(const QString&key,const QString&value); 137 void addParameter(const QString&key,const QString&value);
138 const QString searchParamter(const QString&key)const; 138 const QString searchParamter(const QString&key)const;
139 void setPositionlist(const QValueList<int>&poslist); 139 void setPositionlist(const Q3ValueList<int>&poslist);
140 const QValueList<int>& Positionlist()const; 140 const Q3ValueList<int>& Positionlist()const;
141}; 141};
142 142
143typedef Opie::Core::OSmartPointer<RecPart> RecPartP; 143typedef Opie::Core::OSmartPointer<RecPart> RecPartP;
@@ -147,7 +147,7 @@ class RecBody:public Opie::Core::ORefCount
147protected: 147protected:
148 QString m_BodyText; 148 QString m_BodyText;
149 QString mCharset; 149 QString mCharset;
150 QValueList<RecPartP> m_PartsList; 150 Q3ValueList<RecPartP> m_PartsList;
151 RecPartP m_description; 151 RecPartP m_description;
152 152
153public: 153public:
@@ -162,8 +162,8 @@ public:
162 void setDescription(const RecPartP&des); 162 void setDescription(const RecPartP&des);
163 const RecPartP& Description()const; 163 const RecPartP& Description()const;
164 164
165 void setParts(const QValueList<RecPartP>&parts); 165 void setParts(const Q3ValueList<RecPartP>&parts);
166 const QValueList<RecPartP>& Parts()const; 166 const Q3ValueList<RecPartP>& Parts()const;
167 void addPart(const RecPartP&part); 167 void addPart(const RecPartP&part);
168}; 168};
169 169
diff --git a/kmicromail/libmailwrapper/mailwrapper.cpp b/kmicromail/libmailwrapper/mailwrapper.cpp
index 2ee1ab3..9c299e8 100644
--- a/kmicromail/libmailwrapper/mailwrapper.cpp
+++ b/kmicromail/libmailwrapper/mailwrapper.cpp
@@ -5,6 +5,8 @@
5#include <fcntl.h> 5#include <fcntl.h>
6#include <string.h> 6#include <string.h>
7#include <qdir.h> 7#include <qdir.h>
8//Added by qt3to4:
9#include <Q3CString>
8 10
9#include "mailwrapper.h" 11#include "mailwrapper.h"
10//#include "logindialog.h" 12//#include "logindialog.h"
@@ -81,8 +83,8 @@ QString IMAPFolder::decodeFolderName( const QString &name )
81 unsigned long ucs4, utf16, bitbuf; 83 unsigned long ucs4, utf16, bitbuf;
82 unsigned char base64[256], utf8[6]; 84 unsigned char base64[256], utf8[6];
83 unsigned long srcPtr = 0; 85 unsigned long srcPtr = 0;
84 QCString dst = ""; 86 Q3CString dst = "";
85 QCString src = name.ascii(); 87 Q3CString src = name.ascii();
86 88
87 /* initialize modified base64 decoding table */ 89 /* initialize modified base64 decoding table */
88 memset(base64, UNDEFINED, sizeof(base64)); 90 memset(base64, UNDEFINED, sizeof(base64));
@@ -92,9 +94,9 @@ QString IMAPFolder::decodeFolderName( const QString &name )
92 94
93 /* loop until end of string */ 95 /* loop until end of string */
94 while (srcPtr < src.length ()) { 96 while (srcPtr < src.length ()) {
95 c = src[srcPtr++]; 97 c = src.at(srcPtr++);
96 /* deal with literal characters and &- */ 98 /* deal with literal characters and &- */
97 if (c != '&' || src[srcPtr] == '-') { 99 if (c != '&' || src.at(srcPtr) == '-') {
98 /* encode literally */ 100 /* encode literally */
99 dst += c; 101 dst += c;
100 /* skip over the '-' if this is an &- sequence */ 102 /* skip over the '-' if this is an &- sequence */
@@ -105,7 +107,7 @@ QString IMAPFolder::decodeFolderName( const QString &name )
105 bitbuf = 0; 107 bitbuf = 0;
106 bitcount = 0; 108 bitcount = 0;
107 ucs4 = 0; 109 ucs4 = 0;
108 while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { 110 while ((c = base64[(unsigned char) src.at(srcPtr)]) != UNDEFINED) {
109 ++srcPtr; 111 ++srcPtr;
110 bitbuf = (bitbuf << 6) | c; 112 bitbuf = (bitbuf << 6) | c;
111 bitcount += 6; 113 bitcount += 6;
@@ -149,7 +151,7 @@ QString IMAPFolder::decodeFolderName( const QString &name )
149 } 151 }
150 } 152 }
151 /* skip over trailing '-' in modified UTF-7 encoding */ 153 /* skip over trailing '-' in modified UTF-7 encoding */
152 if (src[srcPtr] == '-') 154 if (src.at(srcPtr) == '-')
153 ++srcPtr; 155 ++srcPtr;
154 } 156 }
155 } 157 }
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h
index 3e8b51f..bebabf4 100644
--- a/kmicromail/libmailwrapper/mailwrapper.h
+++ b/kmicromail/libmailwrapper/mailwrapper.h
@@ -6,6 +6,8 @@
6#include <qbitarray.h> 6#include <qbitarray.h>
7#include <qdatetime.h> 7#include <qdatetime.h>
8#include <qfileinfo.h> 8#include <qfileinfo.h>
9//Added by qt3to4:
10#include <QPixmap>
9#include <kiconloader.h> 11#include <kiconloader.h>
10 12
11#include "settings.h" 13#include "settings.h"
@@ -61,7 +63,7 @@ public:
61 */ 63 */
62 virtual ~Mail(){} 64 virtual ~Mail(){}
63 void addAttachment( Attachment *att ) { attList.append( att ); } 65 void addAttachment( Attachment *att ) { attList.append( att ); }
64 const QList<Attachment>& getAttachments()const { return attList; } 66 const QList<Attachment*>& getAttachments()const { return attList; }
65 void removeAttachment( Attachment *att ) { attList.remove( att ); } 67 void removeAttachment( Attachment *att ) { attList.remove( att ); }
66 const QString&getName()const { return name; } 68 const QString&getName()const { return name; }
67 void setName( QString s ) { name = s; } 69 void setName( QString s ) { name = s; }
@@ -86,7 +88,7 @@ public:
86 const QString& getCharset() const { return charset; } 88 const QString& getCharset() const { return charset; }
87 89
88private: 90private:
89 QList<Attachment> attList; 91 QList<Attachment*> attList;
90 QString name, mail, to, cc, bcc, reply, subject, message, charset; 92 QString name, mail, to, cc, bcc, reply, subject, message, charset;
91 QStringList m_in_reply_to; 93 QStringList m_in_reply_to;
92}; 94};
diff --git a/kmicromail/libmailwrapper/mboxwrapper.cpp b/kmicromail/libmailwrapper/mboxwrapper.cpp
index 87f8c8a..888cae2 100644
--- a/kmicromail/libmailwrapper/mboxwrapper.cpp
+++ b/kmicromail/libmailwrapper/mboxwrapper.cpp
@@ -3,6 +3,8 @@
3#include "mailwrapper.h" 3#include "mailwrapper.h"
4#include <libetpan/libetpan.h> 4#include <libetpan/libetpan.h>
5#include <qdir.h> 5#include <qdir.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6#include <stdlib.h> 8#include <stdlib.h>
7#include <klocale.h> 9#include <klocale.h>
8 10
@@ -23,7 +25,7 @@ MBOXwrapper::~MBOXwrapper()
23{ 25{
24} 26}
25 27
26void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &target ) 28void MBOXwrapper::listMessages(const QString & mailbox, Q3ValueList<RecMailP> &target )
27{ 29{
28 mailstorage*storage = mailstorage_new(NULL); 30 mailstorage*storage = mailstorage_new(NULL);
29 QString p = MBOXPath+"/"; 31 QString p = MBOXPath+"/";
@@ -48,9 +50,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta
48 Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); 50 Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count()));
49} 51}
50 52
51QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() 53Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders()
52{ 54{
53 QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); 55 Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >();
54 QDir dir(MBOXPath); 56 QDir dir(MBOXPath);
55 if (!dir.exists()) return folders; 57 if (!dir.exists()) return folders;
56 dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); 58 dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable);
@@ -217,7 +219,7 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail)
217 return result; 219 return result;
218} 220}
219 221
220void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) 222void MBOXwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target)
221{ 223{
222 QString p = MBOXPath+"/"; 224 QString p = MBOXPath+"/";
223 p+=mailbox; 225 p+=mailbox;
@@ -231,11 +233,11 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP>
231 mailmbox_done(f); 233 mailmbox_done(f);
232} 234}
233 235
234void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target) 236void MBOXwrapper::deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target)
235{ 237{
236 if (!f) return; 238 if (!f) return;
237 int r; 239 int r;
238 QValueList<RecMailP>::ConstIterator it; 240 Q3ValueList<RecMailP>::ConstIterator it;
239 for (it=target.begin(); it != target.end();++it) { 241 for (it=target.begin(); it != target.end();++it) {
240 r = mailmbox_delete_msg(f,(*it)->getNumber()); 242 r = mailmbox_delete_msg(f,(*it)->getNumber());
241 if (r!=MAILMBOX_NO_ERROR) { 243 if (r!=MAILMBOX_NO_ERROR) {
diff --git a/kmicromail/libmailwrapper/mboxwrapper.h b/kmicromail/libmailwrapper/mboxwrapper.h
index d03940f..e658a71 100644
--- a/kmicromail/libmailwrapper/mboxwrapper.h
+++ b/kmicromail/libmailwrapper/mboxwrapper.h
@@ -3,6 +3,8 @@
3 3
4#include "genericwrapper.h" 4#include "genericwrapper.h"
5#include <qstring.h> 5#include <qstring.h>
6//Added by qt3to4:
7#include <Q3ValueList>
6 8
7class encodedString; 9class encodedString;
8struct mailmbox_folder; 10struct mailmbox_folder;
@@ -15,8 +17,8 @@ public:
15 MBOXwrapper(const QString & dir,const QString&name); 17 MBOXwrapper(const QString & dir,const QString&name);
16 virtual ~MBOXwrapper(); 18 virtual ~MBOXwrapper();
17 19
18 virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); 20 virtual void listMessages(const QString & mailbox, Q3ValueList<RecMailP>&target );
19 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); 21 virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
20 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 22 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
21 23
22 virtual void deleteMail(const RecMailP&mail); 24 virtual void deleteMail(const RecMailP&mail);
@@ -32,14 +34,14 @@ public:
32 static void mbox_progress( size_t current, size_t maximum ); 34 static void mbox_progress( size_t current, size_t maximum );
33 35
34 virtual encodedString* fetchRawBody(const RecMailP&mail); 36 virtual encodedString* fetchRawBody(const RecMailP&mail);
35 virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); 37 virtual void deleteMails(const QString & FolderName,const Q3ValueList<RecMailP> &target);
36 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); 38 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&);
37 virtual MAILLIB::ATYPE getType()const; 39 virtual MAILLIB::ATYPE getType()const;
38 virtual const QString&getName()const; 40 virtual const QString&getName()const;
39 virtual Account* getAccount() { return 0; }; 41 virtual Account* getAccount() { return 0; };
40 42
41protected: 43protected:
42 static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); 44 static void deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target);
43 QString MBOXPath; 45 QString MBOXPath;
44 QString MBOXName; 46 QString MBOXName;
45}; 47};
diff --git a/kmicromail/libmailwrapper/mhwrapper.cpp b/kmicromail/libmailwrapper/mhwrapper.cpp
index 787e85d..4cd7a94 100644
--- a/kmicromail/libmailwrapper/mhwrapper.cpp
+++ b/kmicromail/libmailwrapper/mhwrapper.cpp
@@ -5,6 +5,8 @@
5#include <libetpan/libetpan.h> 5#include <libetpan/libetpan.h>
6#include <qdir.h> 6#include <qdir.h>
7#include <qmessagebox.h> 7#include <qmessagebox.h>
8//Added by qt3to4:
9#include <Q3ValueList>
8#include <stdlib.h> 10#include <stdlib.h>
9#include <qpe/global.h> 11#include <qpe/global.h>
10#include <klocale.h> 12#include <klocale.h>
@@ -64,7 +66,7 @@ MHwrapper::~MHwrapper()
64 clean_storage(); 66 clean_storage();
65} 67}
66 68
67void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) 69void MHwrapper::listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb )
68{ 70{
69 init_storage(); 71 init_storage();
70 if (!m_storage) { 72 if (!m_storage) {
@@ -80,9 +82,9 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSm
80 Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); 82 Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count()));
81} 83}
82 84
83QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() 85Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders()
84{ 86{
85 QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); 87 Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >();
86 /* this is needed! */ 88 /* this is needed! */
87 if (m_storage) mailstorage_disconnect(m_storage); 89 if (m_storage) mailstorage_disconnect(m_storage);
88 init_storage(); 90 init_storage();
@@ -255,7 +257,7 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail)
255 return result; 257 return result;
256} 258}
257 259
258void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) 260void MHwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target)
259{ 261{
260 QString f = buildPath(mailbox); 262 QString f = buildPath(mailbox);
261 int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); 263 int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1());
@@ -263,7 +265,7 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &
263 qDebug("deleteMails: error selecting folder! "); 265 qDebug("deleteMails: error selecting folder! ");
264 return; 266 return;
265 } 267 }
266 QValueList<RecMailP>::ConstIterator it; 268 Q3ValueList<RecMailP>::ConstIterator it;
267 for (it=target.begin(); it!=target.end();++it) { 269 for (it=target.begin(); it!=target.end();++it) {
268 r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); 270 r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber());
269 if (r != MAIL_NO_ERROR) { 271 if (r != MAIL_NO_ERROR) {
diff --git a/kmicromail/libmailwrapper/mhwrapper.h b/kmicromail/libmailwrapper/mhwrapper.h
index 36a443a..6151ff1 100644
--- a/kmicromail/libmailwrapper/mhwrapper.h
+++ b/kmicromail/libmailwrapper/mhwrapper.h
@@ -6,6 +6,8 @@
6 6
7#include "genericwrapper.h" 7#include "genericwrapper.h"
8#include <qstring.h> 8#include <qstring.h>
9//Added by qt3to4:
10#include <Q3ValueList>
9 11
10class encodedString; 12class encodedString;
11struct mailmbox_folder; 13struct mailmbox_folder;
@@ -16,8 +18,8 @@ public:
16 MHwrapper(const QString & dir,const QString&name); 18 MHwrapper(const QString & dir,const QString&name);
17 virtual ~MHwrapper(); 19 virtual ~MHwrapper();
18 20
19 virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); 21 virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 );
20 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); 22 virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
21 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 23 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
22 24
23 virtual void deleteMail(const RecMailP&mail); 25 virtual void deleteMail(const RecMailP&mail);
@@ -36,7 +38,7 @@ public:
36 static void mbox_progress( size_t current, size_t maximum ); 38 static void mbox_progress( size_t current, size_t maximum );
37 39
38 virtual encodedString* fetchRawBody(const RecMailP&mail); 40 virtual encodedString* fetchRawBody(const RecMailP&mail);
39 virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> > &target); 41 virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target);
40 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); 42 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&);
41 virtual MAILLIB::ATYPE getType()const; 43 virtual MAILLIB::ATYPE getType()const;
42 virtual const QString&getName()const; 44 virtual const QString&getName()const;
diff --git a/kmicromail/libmailwrapper/nntpwrapper.cpp b/kmicromail/libmailwrapper/nntpwrapper.cpp
index 93cd2b5..b328ecd 100644
--- a/kmicromail/libmailwrapper/nntpwrapper.cpp
+++ b/kmicromail/libmailwrapper/nntpwrapper.cpp
@@ -4,6 +4,8 @@
4#include "mailtypes.h" 4#include "mailtypes.h"
5 5
6#include <qfile.h> 6#include <qfile.h>
7//Added by qt3to4:
8#include <Q3ValueList>
7 9
8#include <stdlib.h> 10#include <stdlib.h>
9 11
@@ -60,14 +62,14 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) {
60 if (msg_cache.exists()) { 62 if (msg_cache.exists()) {
61 msg_cache.remove(); 63 msg_cache.remove();
62 } 64 }
63 msg_cache.open(IO_ReadWrite|IO_Truncate); 65 msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate);
64 last_msg_id = mail->getNumber(); 66 last_msg_id = mail->getNumber();
65 err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg); 67 err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg);
66 err = mailmessage_fetch(mailmsg,&message,&length); 68 err = mailmessage_fetch(mailmsg,&message,&length);
67 msg_cache.writeBlock(message,length); 69 msg_cache.writeBlock(message,length);
68 } else { 70 } else {
69 QString msg=""; 71 QString msg="";
70 msg_cache.open(IO_ReadOnly); 72 msg_cache.open(QIODevice::ReadOnly);
71 message = new char[4096]; 73 message = new char[4096];
72 memset(message,0,4096); 74 memset(message,0,4096);
73 while (msg_cache.readBlock(message,4095)>0) { 75 while (msg_cache.readBlock(message,4095)>0) {
@@ -99,7 +101,7 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) {
99} 101}
100 102
101 103
102void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) 104void NNTPwrapper::listMessages(const QString & which, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb)
103{ 105{
104 login(); 106 login();
105 if (!m_nntp) 107 if (!m_nntp)
@@ -186,9 +188,9 @@ void NNTPwrapper::logout()
186 m_nntp = 0; 188 m_nntp = 0;
187} 189}
188 190
189QValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { 191Q3ValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() {
190 192
191 QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); 193 Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >();
192 QStringList groups; 194 QStringList groups;
193 if (account) { 195 if (account) {
194 groups = account->getGroups(); 196 groups = account->getGroups();
diff --git a/kmicromail/libmailwrapper/nntpwrapper.h b/kmicromail/libmailwrapper/nntpwrapper.h
index 8c54f12..7c8e671 100644
--- a/kmicromail/libmailwrapper/nntpwrapper.h
+++ b/kmicromail/libmailwrapper/nntpwrapper.h
@@ -5,6 +5,8 @@
5#include "mailwrapper.h" 5#include "mailwrapper.h"
6#include "genericwrapper.h" 6#include "genericwrapper.h"
7#include <qstring.h> 7#include <qstring.h>
8//Added by qt3to4:
9#include <Q3ValueList>
8#include <libetpan/clist.h> 10#include <libetpan/clist.h>
9 11
10class encodedString; 12class encodedString;
@@ -21,9 +23,9 @@ public:
21 virtual ~NNTPwrapper(); 23 virtual ~NNTPwrapper();
22 24
23 /* mailbox will be ignored */ 25 /* mailbox will be ignored */
24 virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); 26 virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 );
25 /* should only get the subscribed one */ 27 /* should only get the subscribed one */
26 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); 28 virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
27 /* mailbox will be ignored */ 29 /* mailbox will be ignored */
28 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 30 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
29 QStringList listAllNewsgroups(const QString&mask = QString::null); 31 QStringList listAllNewsgroups(const QString&mask = QString::null);
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index 2888f7c..ebeed71 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -9,8 +9,10 @@
9 9
10#include <qpe/global.h> 10#include <qpe/global.h>
11#include <qfile.h> 11#include <qfile.h>
12#include <qprogressbar.h> 12#include <q3progressbar.h>
13#include <qapplication.h> 13#include <qapplication.h>
14//Added by qt3to4:
15#include <Q3ValueList>
14 16
15/* we don't fetch messages larger than 5 MB */ 17/* we don't fetch messages larger than 5 MB */
16#define HARD_MSG_SIZE_LIMIT 5242880 18#define HARD_MSG_SIZE_LIMIT 5242880
@@ -62,14 +64,14 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) {
62 if (msg_cache.exists()) { 64 if (msg_cache.exists()) {
63 msg_cache.remove(); 65 msg_cache.remove();
64 } 66 }
65 msg_cache.open(IO_ReadWrite|IO_Truncate); 67 msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate);
66 last_msg_id = mail->getNumber(); 68 last_msg_id = mail->getNumber();
67 err = mailsession_get_message(m_pop3->sto_session, mail->getNumber(), &mailmsg); 69 err = mailsession_get_message(m_pop3->sto_session, mail->getNumber(), &mailmsg);
68 err = mailmessage_fetch(mailmsg,&message,&length); 70 err = mailmessage_fetch(mailmsg,&message,&length);
69 msg_cache.writeBlock(message,length); 71 msg_cache.writeBlock(message,length);
70 } else { 72 } else {
71 QString msg=""; 73 QString msg="";
72 msg_cache.open(IO_ReadOnly); 74 msg_cache.open(QIODevice::ReadOnly);
73 message = new char[4096]; 75 message = new char[4096];
74 memset(message,0,4096); 76 memset(message,0,4096);
75 while (msg_cache.readBlock(message,4095)>0) { 77 while (msg_cache.readBlock(message,4095)>0) {
@@ -100,7 +102,7 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) {
100 return body; 102 return body;
101} 103}
102 104
103void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) 105void POP3wrapper::listMessages(const QString &, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb )
104{ 106{
105 login(); 107 login();
106 if (!m_pop3) 108 if (!m_pop3)
@@ -187,14 +189,14 @@ void POP3wrapper::logout()
187} 189}
188 190
189 191
190QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { 192Q3ValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() {
191 QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); 193 Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<FolderP>();
192 FolderP inb=new Folder("INBOX","/"); 194 FolderP inb=new Folder("INBOX","/");
193 folders->append(inb); 195 folders->append(inb);
194 return folders; 196 return folders;
195} 197}
196 198
197void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) 199void POP3wrapper::deleteMailList(const Q3ValueList<RecMailP>&target)
198{ 200{
199 login(); 201 login();
200 if (!m_pop3) 202 if (!m_pop3)
@@ -202,7 +204,7 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
202 int iii = 0; 204 int iii = 0;
203 int count = target.count(); 205 int count = target.count();
204 206
205 QProgressBar wid ( count ); 207 Q3ProgressBar wid ( count );
206 wid.setCaption( i18n("Deleting ...")); 208 wid.setCaption( i18n("Deleting ..."));
207 wid.show(); 209 wid.show();
208 while (iii < count ) { 210 while (iii < count ) {
@@ -246,7 +248,7 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
246 248
247 249
248 250
249 QProgressBar wid ( result ); 251 Q3ProgressBar wid ( result );
250 wid.setCaption( i18n("Deleting ...")); 252 wid.setCaption( i18n("Deleting ..."));
251 wid.show(); 253 wid.show();
252 for (unsigned int i = 0; i < result; ++i) { 254 for (unsigned int i = 0; i < result; ++i) {
diff --git a/kmicromail/libmailwrapper/pop3wrapper.h b/kmicromail/libmailwrapper/pop3wrapper.h
index ebc2fc7..a077877 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.h
+++ b/kmicromail/libmailwrapper/pop3wrapper.h
@@ -5,6 +5,8 @@
5#include "mailwrapper.h" 5#include "mailwrapper.h"
6#include "genericwrapper.h" 6#include "genericwrapper.h"
7#include <qstring.h> 7#include <qstring.h>
8//Added by qt3to4:
9#include <Q3ValueList>
8 10
9class encodedString; 11class encodedString;
10struct mailstorage; 12struct mailstorage;
@@ -18,13 +20,13 @@ public:
18 POP3wrapper( POP3account *a ); 20 POP3wrapper( POP3account *a );
19 virtual ~POP3wrapper(); 21 virtual ~POP3wrapper();
20 /* mailbox will be ignored */ 22 /* mailbox will be ignored */
21 virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); 23 virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 );
22 virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); 24 virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders();
23 /* mailbox will be ignored */ 25 /* mailbox will be ignored */
24 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 26 virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX");
25 27
26 virtual void deleteMail(const RecMailP&mail); 28 virtual void deleteMail(const RecMailP&mail);
27 virtual void deleteMailList(const QValueList<RecMailP>&target); 29 virtual void deleteMailList(const Q3ValueList<RecMailP>&target);
28 virtual void answeredMail(const RecMailP&mail); 30 virtual void answeredMail(const RecMailP&mail);
29 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); 31 virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&);
30 32
diff --git a/kmicromail/libmailwrapper/sendmailprogress.cpp b/kmicromail/libmailwrapper/sendmailprogress.cpp
index 20dfe9b..6cd6409 100644
--- a/kmicromail/libmailwrapper/sendmailprogress.cpp
+++ b/kmicromail/libmailwrapper/sendmailprogress.cpp
@@ -1,5 +1,5 @@
1#include "sendmailprogress.h" 1#include "sendmailprogress.h"
2#include <qprogressbar.h> 2#include <q3progressbar.h>
3#include <qlabel.h> 3#include <qlabel.h>
4#include <klocale.h> 4#include <klocale.h>
5 5
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 9436d43..fc01528 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -2,7 +2,7 @@
2#include <qdir.h> 2#include <qdir.h>
3 3
4#include <qtextcodec.h> 4#include <qtextcodec.h>
5#include <qtextstream.h> 5#include <q3textstream.h>
6#include <qfile.h> 6#include <qfile.h>
7 7
8//#include <opie2/odebug.h> 8//#include <opie2/odebug.h>
@@ -376,11 +376,11 @@ QString SMTPaccount::getSignature()
376 return QString(); 376 return QString();
377 377
378 QFile file( signature ); 378 QFile file( signature );
379 if (!file.open( IO_ReadOnly ) ) { 379 if (!file.open( QIODevice::ReadOnly ) ) {
380 return QString(); 380 return QString();
381 381
382 } 382 }
383 QTextStream ts( &file ); 383 Q3TextStream ts( &file );
384 ts.setCodec( QTextCodec::codecForName("utf8") ); 384 ts.setCodec( QTextCodec::codecForName("utf8") );
385 QString text = ts.read(); 385 QString text = ts.read();
386 file.close(); 386 file.close();
@@ -399,11 +399,11 @@ void SMTPaccount::setSignature( QString b )
399 save(); 399 save();
400 } 400 }
401 QFile fileIn( signature ); 401 QFile fileIn( signature );
402 if (!fileIn.open( IO_WriteOnly ) ) { 402 if (!fileIn.open( QIODevice::WriteOnly ) ) {
403 qDebug("OM: Cannot write signature file %s ", signature.latin1() ); 403 qDebug("OM: Cannot write signature file %s ", signature.latin1() );
404 return ; 404 return ;
405 } 405 }
406 QTextStream tsIn( &fileIn ); 406 Q3TextStream tsIn( &fileIn );
407 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 407 tsIn.setCodec( QTextCodec::codecForName("utf8") );
408 tsIn << b ; 408 tsIn << b ;
409 fileIn.close(); 409 fileIn.close();
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 7c813cc..2df55ff 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -9,6 +9,8 @@
9//#include <qt.h> 9//#include <qt.h>
10#include <qapplication.h> 10#include <qapplication.h>
11#include <qmessagebox.h> 11#include <qmessagebox.h>
12//Added by qt3to4:
13#include <Q3ValueList>
12#include <stdlib.h> 14#include <stdlib.h>
13#ifndef DESKTOP_VERSION 15#ifndef DESKTOP_VERSION
14//#include <qpe/config.h> 16//#include <qpe/config.h>
@@ -434,8 +436,8 @@ bool SMTPwrapper::flushOutbox() {
434 return false; 436 return false;
435 } 437 }
436 QString oldPw, oldUser; 438 QString oldPw, oldUser;
437 QValueList<RecMailP> mailsToSend; 439 Q3ValueList<RecMailP> mailsToSend;
438 QValueList<RecMailP> mailsToRemove; 440 Q3ValueList<RecMailP> mailsToRemove;
439 QString mbox("Outgoing"); 441 QString mbox("Outgoing");
440 wrap->listMessages(mbox,mailsToSend); 442 wrap->listMessages(mbox,mailsToSend);
441 if (mailsToSend.count()==0) { 443 if (mailsToSend.count()==0) {
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp
index 41cee52..d8eee7d 100644
--- a/kmicromail/mailistviewitem.cpp
+++ b/kmicromail/mailistviewitem.cpp
@@ -1,12 +1,12 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include "mailistviewitem.h" 2#include "mailistviewitem.h"
3#include <libmailwrapper/abstractmail.h> 3#include <libmailwrapper/abstractmail.h>
4#include <qtextstream.h> 4#include <q3textstream.h>
5#include <kiconloader.h> 5#include <kiconloader.h>
6#include "koprefs.h" 6#include "koprefs.h"
7//#include <qpe/resource.h> 7//#include <qpe/resource.h>
8 8
9MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) 9MailListViewItem::MailListViewItem(Q3ListView * parent, MailListViewItem * item )
10 :KListViewItem(parent,item),mail_data() 10 :KListViewItem(parent,item),mail_data()
11{ 11{
12} 12}
diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h
index b409c9d..ecc01ba 100644
--- a/kmicromail/mailistviewitem.h
+++ b/kmicromail/mailistviewitem.h
@@ -9,7 +9,7 @@
9class MailListViewItem:public KListViewItem 9class MailListViewItem:public KListViewItem
10{ 10{
11public: 11public:
12 MailListViewItem(QListView * parent, MailListViewItem * after ); 12 MailListViewItem(Q3ListView * parent, MailListViewItem * after );
13 virtual ~MailListViewItem(){} 13 virtual ~MailListViewItem(){}
14 14
15 void storeData(const RecMailP&data); 15 void storeData(const RecMailP&data);
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
index fe4bc76..dc73455 100644
--- a/kmicromail/main.cpp
+++ b/kmicromail/main.cpp
@@ -3,6 +3,8 @@
3 3
4#ifndef DESKTOP_VERSION 4#ifndef DESKTOP_VERSION
5#include <qpe/qpeapplication.h> 5#include <qpe/qpeapplication.h>
6//Added by qt3to4:
7#include <Q3CString>
6#include <libkdepim/externalapphandler.h> 8#include <libkdepim/externalapphandler.h>
7#include <stdlib.h> 9#include <stdlib.h>
8#else 10#else
@@ -23,6 +25,7 @@
23void dumpMissing(); 25void dumpMissing();
24//using namespace Opie::Core; 26//using namespace Opie::Core;
25int main( int argc, char **argv ) { 27int main( int argc, char **argv ) {
28 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
26 29
27#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
28 QPEApplication a( argc, argv ); 31 QPEApplication a( argc, argv );
@@ -51,7 +54,7 @@ int main( int argc, char **argv ) {
51 OpieMail mw; 54 OpieMail mw;
52#ifndef DESKTOP_VERSION 55#ifndef DESKTOP_VERSION
53 //qDebug("CONNECT "); 56 //qDebug("CONNECT ");
54 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); 57 QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&mw, SLOT(message( const Q3CString&, const QByteArray& )));
55 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 58 // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
56 a.showMainWidget(&mw ); 59 a.showMainWidget(&mw );
57#else 60#else
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index d547dda..627d92e 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,10 +1,16 @@
1 1
2// CHANGED 2004-08-06 Lutz Rogowski 2// CHANGED 2004-08-06 Lutz Rogowski
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qvbox.h> 4#include <q3vbox.h>
5#include <qheader.h> 5#include <q3header.h>
6#include <qtimer.h> 6#include <qtimer.h>
7#include <qlayout.h> 7#include <qlayout.h>
8//Added by qt3to4:
9#include <Q3CString>
10#include <Q3GridLayout>
11#include <Q3ValueList>
12#include <QPixmap>
13#include <Q3PopupMenu>
8//#include <kdialog.h> 14//#include <kdialog.h>
9#include <kiconloader.h> 15#include <kiconloader.h>
10#include <kapplication.h> 16#include <kapplication.h>
@@ -27,8 +33,8 @@ extern QStatusBar* globalSstatusBarMainWindow;
27 33
28#include "koprefs.h" 34#include "koprefs.h"
29 35
30MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 36MainWindow::MainWindow( QWidget *parent, const char *name, Qt::WFlags flags )
31 : QMainWindow( parent, name ) //, flags ) 37 : Q3MainWindow( parent, name ) //, flags )
32{ 38{
33#ifdef DESKTOP_VERSION 39#ifdef DESKTOP_VERSION
34 globalSstatusBarMainWindow = statusBar(); 40 globalSstatusBarMainWindow = statusBar();
@@ -36,11 +42,11 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
36 setCaption( i18n( "KOpieMail/Pi" ) ); 42 setCaption( i18n( "KOpieMail/Pi" ) );
37 setToolBarsMovable( false ); 43 setToolBarsMovable( false );
38 //KABC::StdAddressBook::self(); 44 //KABC::StdAddressBook::self();
39 toolBar = new QToolBar( this ); 45 toolBar = new Q3ToolBar( this );
40 menuBar = new QPEMenuBar( toolBar ); 46 menuBar = new QPEMenuBar( toolBar );
41 mailMenu = new QPopupMenu( menuBar ); 47 mailMenu = new Q3PopupMenu( menuBar );
42 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 48 menuBar->insertItem( i18n( "Mail" ), mailMenu );
43 settingsMenu = new QPopupMenu( menuBar ); 49 settingsMenu = new Q3PopupMenu( menuBar );
44 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 50 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
45 51
46 addToolBar( toolBar ); 52 addToolBar( toolBar );
@@ -114,7 +120,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
114 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 120 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
115 0, 0, this ); 121 0, 0, this );
116 editAccounts->addTo( settingsMenu ); 122 editAccounts->addTo( settingsMenu );
117 codecMenu = new QPopupMenu( menuBar ); 123 codecMenu = new Q3PopupMenu( menuBar );
118 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 124 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
119 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 125 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
120 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 126 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
@@ -125,7 +131,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
125 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 131 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
126 //setCentralWidget( view ); 132 //setCentralWidget( view );
127 133
128 QVBox* wrapperBox = new QVBox( this ); 134 Q3VBox* wrapperBox = new Q3VBox( this );
129 setCentralWidget( wrapperBox ); 135 setCentralWidget( wrapperBox );
130 136
131 // QWidget *view = new QWidget( wrapperBox ); 137 // QWidget *view = new QWidget( wrapperBox );
@@ -139,7 +145,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
139 toLE = 0; 145 toLE = 0;
140 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { 146 if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) {
141 QWidget* infoBox = new QWidget( splithor ); 147 QWidget* infoBox = new QWidget( splithor );
142 QGridLayout *griLay = new QGridLayout( infoBox, 2,2); 148 Q3GridLayout *griLay = new Q3GridLayout( infoBox, 2,2);
143 if ( KOPrefs::instance()->mShowInfoSub ) { 149 if ( KOPrefs::instance()->mShowInfoSub ) {
144 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); 150 griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 );
145 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; 151 griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ;
@@ -168,18 +174,18 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
168 174
169 mailView = new KListView( split ); 175 mailView = new KListView( split );
170 mailView->addColumn( i18n( " " ) ); 176 mailView->addColumn( i18n( " " ) );
171 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 177 mailView->addColumn( i18n( "Subject" ),Q3ListView::Manual );
172 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 178 mailView->addColumn( i18n( "Sender" ),Q3ListView::Manual );
173 mailView->addColumn( i18n( "Size" ),QListView::Manual); 179 mailView->addColumn( i18n( "Size" ),Q3ListView::Manual);
174 mailView->addColumn( i18n( "Date" ),QListView::Manual); 180 mailView->addColumn( i18n( "Date" ),Q3ListView::Manual);
175 if ( KOPrefs::instance()->mShowToField ) 181 if ( KOPrefs::instance()->mShowToField )
176 mailView->addColumn( i18n( "To" ),QListView::Manual); 182 mailView->addColumn( i18n( "To" ),Q3ListView::Manual);
177 mailView->setAllColumnsShowFocus(true); 183 mailView->setAllColumnsShowFocus(true);
178 //mailView->setSorting(-1); 184 //mailView->setSorting(-1);
179 mailView->setRootIsDecorated( false ); 185 mailView->setRootIsDecorated( false );
180 statusWidget = new StatusWidget( wrapperBox ); 186 statusWidget = new StatusWidget( wrapperBox );
181 statusWidget->hide(); 187 statusWidget->hide();
182 mailView->setSelectionMode( QListView::Multi ); 188 mailView->setSelectionMode( Q3ListView::Multi );
183 mailView->setMultiSelection( true); 189 mailView->setMultiSelection( true);
184 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor ); 190 mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor );
185 //layout->addWidget( mailView ); 191 //layout->addWidget( mailView );
@@ -197,17 +203,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
197 if ( toLE ) 203 if ( toLE )
198 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); 204 QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold);
199#endif 205#endif
200 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 206 connect( mailView, SIGNAL( doubleClicked (Q3ListViewItem* )),this,
201 SLOT( mailLeftClicked(QListViewItem*) ) ); 207 SLOT( mailLeftClicked(Q3ListViewItem*) ) );
202 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 208 connect( mailView, SIGNAL( returnPressed (Q3ListViewItem* )),this,
203 SLOT( mailLeftClicked(QListViewItem*) ) ); 209 SLOT( mailLeftClicked(Q3ListViewItem*) ) );
204 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 210 connect( mailView, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this,
205 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 211 SLOT( mailHold(int,Q3ListViewItem*,const QPoint&,int) ) );
206 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 212 connect(folderView, SIGNAL(refreshMailview(const Q3ValueList<RecMailP>&)),
207 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 213 this,SLOT(refreshMailView(const Q3ValueList<RecMailP>&)));
208 214
209 connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, 215 connect( mailView, SIGNAL( currentChanged (Q3ListViewItem* )),this,
210 SLOT( setInfoFields(QListViewItem*) ) ); 216 SLOT( setInfoFields(Q3ListViewItem*) ) );
211 217
212 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 218 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
213 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 219 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
@@ -215,7 +221,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
215 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 221 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
216 //mailView->setMultiSelection ( true ); 222 //mailView->setMultiSelection ( true );
217 //mailView->setSelectionMode( QListView::Extended ); 223 //mailView->setSelectionMode( QListView::Extended );
218 QValueList<int> list; 224 Q3ValueList<int> list;
219 int fw = 100; 225 int fw = 100;
220 if ( QApplication::desktop()->width() > 320 ) 226 if ( QApplication::desktop()->width() > 320 )
221 fw = 50; 227 fw = 50;
@@ -235,7 +241,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
235 closeMail->addTo(mailMenu); 241 closeMail->addTo(mailMenu);
236 242
237 243
238 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 244 Q3PopupMenu* helpMenu = new Q3PopupMenu( menuBar );
239 menuBar->insertItem( i18n( "Help" ), helpMenu ); 245 menuBar->insertItem( i18n( "Help" ), helpMenu );
240 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 246 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
241 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 247 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
@@ -259,7 +265,7 @@ MainWindow::~MainWindow()
259{ 265{
260} 266}
261 267
262void MainWindow::setInfoFields(QListViewItem* item ) 268void MainWindow::setInfoFields(Q3ListViewItem* item )
263{ 269{
264 if ( item == 0) { 270 if ( item == 0) {
265 if ( subLE ) subLE->setText(""); 271 if ( subLE ) subLE->setText("");
@@ -345,7 +351,7 @@ void MainWindow::showEtpanLicence()
345 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 351 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
346 352
347} 353}
348void MainWindow::appMessage(const QCString &, const QByteArray &) 354void MainWindow::appMessage(const Q3CString &, const QByteArray &)
349{ 355{
350 qDebug("appMessage implemented by subclass"); 356 qDebug("appMessage implemented by subclass");
351} 357}
@@ -405,12 +411,12 @@ void MainWindow::slotShowFolders( bool )
405 qDebug("not implemented: "); 411 qDebug("not implemented: ");
406} 412}
407 413
408void MainWindow::refreshMailView(const QValueList<RecMailP>&) 414void MainWindow::refreshMailView(const Q3ValueList<RecMailP>&)
409{ 415{
410 qDebug("not implemented: "); 416 qDebug("not implemented: ");
411} 417}
412 418
413void MainWindow::mailLeftClicked(QListViewItem * ) 419void MainWindow::mailLeftClicked(Q3ListViewItem * )
414{ 420{
415 qDebug("not implemented: "); 421 qDebug("not implemented: ");
416} 422}
@@ -425,7 +431,7 @@ void MainWindow::slotDeleteMail()
425 qDebug("not implemented: "); 431 qDebug("not implemented: ");
426} 432}
427 433
428void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) 434void MainWindow::mailHold(int, Q3ListViewItem *,const QPoint&,int )
429{ 435{
430 qDebug("not implemented: "); 436 qDebug("not implemented: ");
431} 437}
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index f65f3b4..1ccadc2 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -3,12 +3,16 @@
3#ifndef MAINWINDOW_H 3#ifndef MAINWINDOW_H
4#define MAINWINDOW_H 4#define MAINWINDOW_H
5 5
6#include <qmainwindow.h> 6#include <q3mainwindow.h>
7//Added by qt3to4:
8#include <Q3CString>
9#include <Q3ValueList>
10#include <Q3PopupMenu>
7#include <klistview.h> 11#include <klistview.h>
8#include <qaction.h> 12#include <qaction.h>
9#include <qlineedit.h> 13#include <qlineedit.h>
10 14
11#include <qtoolbar.h> 15#include <q3toolbar.h>
12#ifdef DESKTOP_VERSION 16#ifdef DESKTOP_VERSION
13#include <qmenubar.h> 17#include <qmenubar.h>
14#define QPEMenuBar QMenuBar 18#define QPEMenuBar QMenuBar
@@ -24,46 +28,46 @@
24 28
25class RecMail; 29class RecMail;
26 30
27class MainWindow : public QMainWindow 31class MainWindow : public Q3MainWindow
28{ 32{
29 Q_OBJECT 33 Q_OBJECT
30 34
31public: 35public:
32 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 36 MainWindow( QWidget *parent = 0, const char *name = 0, Qt::WFlags flags = 0 );
33 virtual ~MainWindow(); 37 virtual ~MainWindow();
34 38
35public slots: 39public slots:
36 virtual void slotAdjustColumns(); 40 virtual void slotAdjustColumns();
37 virtual void slotAdjustColumnsWide(); 41 virtual void slotAdjustColumnsWide();
38 virtual void appMessage(const QCString &msg, const QByteArray &data); 42 virtual void appMessage(const Q3CString &msg, const QByteArray &data);
39 virtual void slotComposeMail(); 43 virtual void slotComposeMail();
40 44
41protected slots: 45protected slots:
42 virtual void setInfoFields(QListViewItem* ); 46 virtual void setInfoFields(Q3ListViewItem* );
43 virtual void slotSendQueued(); 47 virtual void slotSendQueued();
44 virtual void slotEditAccounts(); 48 virtual void slotEditAccounts();
45 virtual void slotShowFolders( bool show ); 49 virtual void slotShowFolders( bool show );
46 virtual void refreshMailView(const QValueList<RecMailP>&); 50 virtual void refreshMailView(const Q3ValueList<RecMailP>&);
47 virtual void displayMail(); 51 virtual void displayMail();
48 virtual void slotGetMail() = 0; 52 virtual void slotGetMail() = 0;
49 virtual void slotGetAllMail() = 0; 53 virtual void slotGetAllMail() = 0;
50 virtual void slotDeleteMail(); 54 virtual void slotDeleteMail();
51 virtual void slotDeleteAllMail() = 0; 55 virtual void slotDeleteAllMail() = 0;
52 virtual void slotSetCodec(int); 56 virtual void slotSetCodec(int);
53 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 57 virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int);
54 virtual void slotAdjustLayout(); 58 virtual void slotAdjustLayout();
55 virtual void slotEditSettings(); 59 virtual void slotEditSettings();
56 virtual void slotEditGlobalSettings(); 60 virtual void slotEditGlobalSettings();
57 virtual void mailLeftClicked( QListViewItem * ); 61 virtual void mailLeftClicked( Q3ListViewItem * );
58 void showLicence(); 62 void showLicence();
59 void showAbout(); 63 void showAbout();
60 void showEtpanLicence(); 64 void showEtpanLicence();
61 65
62protected: 66protected:
63 QToolBar *toolBar; 67 Q3ToolBar *toolBar;
64 StatusWidget *statusWidget; 68 StatusWidget *statusWidget;
65 QPEMenuBar *menuBar; 69 QPEMenuBar *menuBar;
66 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 70 Q3PopupMenu *mailMenu, *settingsMenu, *codecMenu;
67 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 71 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
68 *editSettings, *editAccounts, *syncFolders; 72 *editSettings, *editAccounts, *syncFolders;
69 AccountView *folderView; 73 AccountView *folderView;
diff --git a/kmicromail/nntpgroups.cpp b/kmicromail/nntpgroups.cpp
index c729f79..d2213d4 100644
--- a/kmicromail/nntpgroups.cpp
+++ b/kmicromail/nntpgroups.cpp
@@ -1,12 +1,12 @@
1#include "nntpgroups.h" 1#include "nntpgroups.h"
2 2
3#include <libmailwrapper/settings.h> 3#include <libmailwrapper/settings.h>
4#include <qlistview.h> 4#include <q3listview.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6 6
7using namespace Opie::Core; 7using namespace Opie::Core;
8 8
9NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, WFlags fl) 9NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, Qt::WFlags fl)
10 : NNTPGroupsUI(parent,name,fl),subscribedGroups() 10 : NNTPGroupsUI(parent,name,fl),subscribedGroups()
11{ 11{
12 m_Account = account; 12 m_Account = account;
@@ -27,8 +27,8 @@ void NNTPGroups::slotGetNG()
27 QStringList list = tmp.listAllNewsgroups(filter); 27 QStringList list = tmp.listAllNewsgroups(filter);
28 subscribedGroupsNotListed = subscribedGroups; 28 subscribedGroupsNotListed = subscribedGroups;
29 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { 29 for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
30 QCheckListItem *item; 30 Q3CheckListItem *item;
31 item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); 31 item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox );
32 if ( subscribedGroups.contains( (*it) ) >= 1 ) { 32 if ( subscribedGroups.contains( (*it) ) >= 1 ) {
33 item->setOn( true ); 33 item->setOn( true );
34 subscribedGroupsNotListed.remove((*it)); 34 subscribedGroupsNotListed.remove((*it));
@@ -41,8 +41,8 @@ void NNTPGroups::fillGroups()
41 if (!m_Account) return; 41 if (!m_Account) return;
42 subscribedGroups = m_Account->getGroups(); 42 subscribedGroups = m_Account->getGroups();
43 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { 43 for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) {
44 QCheckListItem *item; 44 Q3CheckListItem *item;
45 item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); 45 item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox );
46 item->setOn( true ); 46 item->setOn( true );
47 } 47 }
48} 48}
@@ -50,10 +50,10 @@ void NNTPGroups::fillGroups()
50void NNTPGroups::storeValues() 50void NNTPGroups::storeValues()
51{ 51{
52 if (!m_Account) return; 52 if (!m_Account) return;
53 QListViewItemIterator list_it( GroupListView ); 53 Q3ListViewItemIterator list_it( GroupListView );
54 subscribedGroups.clear(); 54 subscribedGroups.clear();
55 for ( ; list_it.current(); ++list_it ) { 55 for ( ; list_it.current(); ++list_it ) {
56 if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { 56 if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) {
57 subscribedGroups.append( list_it.current()->text(0) ); 57 subscribedGroups.append( list_it.current()->text(0) );
58 } 58 }
59 } 59 }
diff --git a/kmicromail/nntpgroups.h b/kmicromail/nntpgroups.h
index e5b7c35..80cc329 100644
--- a/kmicromail/nntpgroups.h
+++ b/kmicromail/nntpgroups.h
@@ -12,7 +12,7 @@ class NNTPGroups:public NNTPGroupsUI
12{ 12{
13 Q_OBJECT 13 Q_OBJECT
14public: 14public:
15 NNTPGroups(NNTPaccount *account, QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 15 NNTPGroups(NNTPaccount *account, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
16 virtual ~NNTPGroups(); 16 virtual ~NNTPGroups();
17 /* must be called from external. 17 /* must be called from external.
18 * it will store the new subscription list into the account 18 * it will store the new subscription list into the account
diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp
index f564b10..bfe1d35 100644
--- a/kmicromail/nntpgroupsdlg.cpp
+++ b/kmicromail/nntpgroupsdlg.cpp
@@ -5,13 +5,15 @@
5#include <libmailwrapper/settings.h> 5#include <libmailwrapper/settings.h>
6 6
7#include <qlayout.h> 7#include <qlayout.h>
8//Added by qt3to4:
9#include <Q3VBoxLayout>
8 10
9NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name) 11NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name)
10 : QDialog(parent,name,true,0) 12 : QDialog(parent,name,true,0)
11{ 13{
12 setCaption(i18n("Subscribed newsgroups")); 14 setCaption(i18n("Subscribed newsgroups"));
13 m_Account = account; 15 m_Account = account;
14 QVBoxLayout*dlglayout = new QVBoxLayout(this); 16 Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this);
15 dlglayout->setSpacing(2); 17 dlglayout->setSpacing(2);
16 dlglayout->setMargin(1); 18 dlglayout->setMargin(1);
17 groupsWidget = new NNTPGroups(account,this); 19 groupsWidget = new NNTPGroups(account,this);
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index 75a75b9..f453be5 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -4,6 +4,11 @@
4 4
5#define protected public 5#define protected public
6#include <qwidget.h> 6#include <qwidget.h>
7//Added by qt3to4:
8#include <Q3ValueList>
9#include <Q3CString>
10#include <QPixmap>
11#include <Q3PopupMenu>
7#undef protected 12#undef protected
8#include "koprefsdialog.h" 13#include "koprefsdialog.h"
9#include <kapplication.h> 14#include <kapplication.h>
@@ -27,7 +32,7 @@
27#include <qmessagebox.h> 32#include <qmessagebox.h>
28#include <qtimer.h> 33#include <qtimer.h>
29#include <qcursor.h> 34#include <qcursor.h>
30#include <qtextbrowser.h> 35#include <q3textbrowser.h>
31#include <qregexp.h> 36#include <qregexp.h>
32#include <qpe/global.h> 37#include <qpe/global.h>
33 38
@@ -63,12 +68,12 @@ OpieMail::~OpieMail()
63 delete tb; 68 delete tb;
64} 69}
65 70
66void OpieMail::appMessage(const QCString &msg, const QByteArray &data) 71void OpieMail::appMessage(const Q3CString &msg, const QByteArray &data)
67{ 72{
68 73
69} 74}
70#include <stdlib.h> 75#include <stdlib.h>
71void OpieMail::message(const QCString &msg, const QByteArray &data) 76void OpieMail::message(const Q3CString &msg, const QByteArray &data)
72{ 77{
73 // copied from old mail2 78 // copied from old mail2
74 static int ii = 0; 79 static int ii = 0;
@@ -83,7 +88,7 @@ void OpieMail::message(const QCString &msg, const QByteArray &data)
83 if (msg == "writeMail(QString,QString)") 88 if (msg == "writeMail(QString,QString)")
84 { 89 {
85 //qDebug("writeMail(QString,QString) "); 90 //qDebug("writeMail(QString,QString) ");
86 QDataStream stream(data,IO_ReadOnly); 91 QDataStream stream(data,QIODevice::ReadOnly);
87 stream >> mPendingName >> mPendingEmail; 92 stream >> mPendingName >> mPendingEmail;
88 // removing the whitespaces at beginning and end is needed! 93 // removing the whitespaces at beginning and end is needed!
89 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); 94 QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) );
@@ -100,7 +105,7 @@ void OpieMail::message(const QCString &msg, const QByteArray &data)
100 else if (msg == "newMail(QString)") 105 else if (msg == "newMail(QString)")
101 { 106 {
102 //qDebug(" newMail(QString)"); 107 //qDebug(" newMail(QString)");
103 QDataStream stream(data,IO_ReadOnly); 108 QDataStream stream(data,QIODevice::ReadOnly);
104 stream >> mPendingName; 109 stream >> mPendingName;
105 // the format is 110 // the format is
106 // NAME <EMAIL>:SUBJECT 111 // NAME <EMAIL>:SUBJECT
@@ -279,7 +284,7 @@ void OpieMail::slotEditAccounts()
279void OpieMail::replyMail() 284void OpieMail::replyMail()
280{ 285{
281 286
282 QListViewItem*item = mailView->currentItem(); 287 Q3ListViewItem*item = mailView->currentItem();
283 if (!item) return; 288 if (!item) return;
284 RecMailP mail = ((MailListViewItem*)item)->data(); 289 RecMailP mail = ((MailListViewItem*)item)->data();
285 RecBodyP body = folderView->fetchBody(mail); 290 RecBodyP body = folderView->fetchBody(mail);
@@ -331,7 +336,7 @@ void OpieMail::closeViewMail(ViewMail * vm)
331 336
332void OpieMail::slotDownloadMail( ) 337void OpieMail::slotDownloadMail( )
333{ 338{
334 QListViewItem*item = mailView->currentItem(); 339 Q3ListViewItem*item = mailView->currentItem();
335 if (!item ) { 340 if (!item ) {
336 Global::statusMessage("Error: No item slected!"); 341 Global::statusMessage("Error: No item slected!");
337 return; 342 return;
@@ -372,7 +377,7 @@ void OpieMail::slotDownloadMail( )
372 377
373void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) 378void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
374{ 379{
375 QListViewItem*item = mailView->currentItem(); 380 Q3ListViewItem*item = mailView->currentItem();
376 if (!item ) { 381 if (!item ) {
377 closeViewMail(vm); 382 closeViewMail(vm);
378 return; 383 return;
@@ -392,7 +397,7 @@ void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
392} 397}
393void OpieMail::displayNextMail(ViewMail * vm) 398void OpieMail::displayNextMail(ViewMail * vm)
394{ 399{
395 QListViewItem*item = mailView->currentItem(); 400 Q3ListViewItem*item = mailView->currentItem();
396 if (!item) return; 401 if (!item) return;
397 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 402 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
398 item = item->itemBelow(); 403 item = item->itemBelow();
@@ -408,7 +413,7 @@ void OpieMail::displayNextMail(ViewMail * vm)
408} 413}
409void OpieMail::displayMail() 414void OpieMail::displayMail()
410{ 415{
411 QListViewItem*item = mailView->currentItem(); 416 Q3ListViewItem*item = mailView->currentItem();
412 if (!item) return; 417 if (!item) return;
413 RecMailP mail = ((MailListViewItem*)item)->data(); 418 RecMailP mail = ((MailListViewItem*)item)->data();
414 RecBodyP body = folderView->fetchBody(mail); 419 RecBodyP body = folderView->fetchBody(mail);
@@ -432,14 +437,14 @@ void OpieMail::displayMail()
432 } 437 }
433 else 438 else
434 { 439 {
435 QListViewItem*item = mailView->currentItem(); 440 Q3ListViewItem*item = mailView->currentItem();
436 if (item) 441 if (item)
437 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); 442 ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
438 } 443 }
439} 444}
440void OpieMail::slotGetAllMail() 445void OpieMail::slotGetAllMail()
441{ 446{
442 QListViewItem * item = folderView->firstChild(); 447 Q3ListViewItem * item = folderView->firstChild();
443 while ( item ){ 448 while ( item ){
444 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 449 ((AccountViewItem *)item)->contextMenuSelected( 101 );
445 item = item->nextSibling (); 450 item = item->nextSibling ();
@@ -447,7 +452,7 @@ void OpieMail::slotGetAllMail()
447} 452}
448void OpieMail::slotGetMail() 453void OpieMail::slotGetMail()
449{ 454{
450 QListViewItem * item = folderView->currentItem(); 455 Q3ListViewItem * item = folderView->currentItem();
451 if ( ! item ) return; 456 if ( ! item ) return;
452 ((AccountViewItem *)item)->contextMenuSelected( 101 ); 457 ((AccountViewItem *)item)->contextMenuSelected( 101 );
453} 458}
@@ -464,7 +469,7 @@ void OpieMail::slotDeleteMail()
464void OpieMail::slotDeleteAllMail() 469void OpieMail::slotDeleteAllMail()
465{ 470{
466 471
467 QValueList<RecMailP> t; 472 Q3ValueList<RecMailP> t;
468 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 473 if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
469 { 474 {
470 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 475 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
@@ -492,21 +497,21 @@ void OpieMail::clearSelection()
492} 497}
493void OpieMail::selectAll() 498void OpieMail::selectAll()
494{ 499{
495 QListViewItem* item = mailView->firstChild (); 500 Q3ListViewItem* item = mailView->firstChild ();
496 while ( item ) { 501 while ( item ) {
497 mailView->setSelected ( item, true ); 502 mailView->setSelected ( item, true );
498 item = item->nextSibling(); 503 item = item->nextSibling();
499 } 504 }
500} 505}
501 506
502void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) 507void OpieMail::mailHold(int button, Q3ListViewItem *item,const QPoint&,int )
503{ 508{
504 if (!mailView->currentItem()) return; 509 if (!mailView->currentItem()) return;
505 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); 510 MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType();
506 /* just the RIGHT button - or hold on pda */ 511 /* just the RIGHT button - or hold on pda */
507 if (button!=2) {return;} 512 if (button!=2) {return;}
508 if (!item) return; 513 if (!item) return;
509 QPopupMenu *m = new QPopupMenu(0); 514 Q3PopupMenu *m = new Q3PopupMenu(0);
510 if (m) 515 if (m)
511 { 516 {
512 if (mailtype==MAILLIB::A_NNTP) { 517 if (mailtype==MAILLIB::A_NNTP) {
@@ -553,12 +558,12 @@ void OpieMail::slotShowFolders( bool show )
553 } 558 }
554} 559}
555 560
556void OpieMail::refreshMailView(const QValueList<RecMailP>&list) 561void OpieMail::refreshMailView(const Q3ValueList<RecMailP>&list)
557{ 562{
558 MailListViewItem*item = 0; 563 MailListViewItem*item = 0;
559 mailView->clear(); 564 mailView->clear();
560 565
561 QValueList<RecMailP>::ConstIterator it; 566 Q3ValueList<RecMailP>::ConstIterator it;
562 for (it = list.begin(); it != list.end();++it) 567 for (it = list.begin(); it != list.end();++it)
563 { 568 {
564 item = new MailListViewItem(mailView,item); 569 item = new MailListViewItem(mailView,item);
@@ -568,7 +573,7 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list)
568 mailView->setSorting ( 4, false ); 573 mailView->setSorting ( 4, false );
569} 574}
570 575
571void OpieMail::mailLeftClicked( QListViewItem *item ) 576void OpieMail::mailLeftClicked( Q3ListViewItem *item )
572{ 577{
573 mailView->clearSelection(); 578 mailView->clearSelection();
574 /* just LEFT button - or tap with stylus on pda */ 579 /* just LEFT button - or tap with stylus on pda */
@@ -614,7 +619,7 @@ void OpieMail::slotMoveCopyAllMail()
614{ 619{
615 620
616 if (!mailView->currentItem()) return; 621 if (!mailView->currentItem()) return;
617 QValueList<RecMailP> t; 622 Q3ValueList<RecMailP> t;
618 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) 623 // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
619 { 624 {
620 MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); 625 MailListViewItem* item = (MailListViewItem*)mailView->firstChild ();
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index bdd9058..ea64dc4 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -9,6 +9,9 @@
9#include <libmailwrapper/mailtypes.h> 9#include <libmailwrapper/mailtypes.h>
10#include <viewmail.h> 10#include <viewmail.h>
11#include <qstringlist.h> 11#include <qstringlist.h>
12//Added by qt3to4:
13#include <Q3CString>
14#include <Q3ValueList>
12 15
13class ComposeMail; 16class ComposeMail;
14 17
@@ -26,8 +29,8 @@ public slots:
26 virtual void slotwriteMail2(const QString&nameemail); 29 virtual void slotwriteMail2(const QString&nameemail);
27 virtual void slotComposeMail(); 30 virtual void slotComposeMail();
28 virtual void slotExtAppHandler(); 31 virtual void slotExtAppHandler();
29 virtual void appMessage(const QCString &msg, const QByteArray &data); 32 virtual void appMessage(const Q3CString &msg, const QByteArray &data);
30 virtual void message(const QCString &msg, const QByteArray &data); 33 virtual void message(const Q3CString &msg, const QByteArray &data);
31 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); 34 void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist);
32protected slots: 35protected slots:
33 virtual void deleteAndDisplayNextMail(ViewMail * vm); 36 virtual void deleteAndDisplayNextMail(ViewMail * vm);
@@ -43,10 +46,10 @@ protected slots:
43 virtual void slotGetMail(); 46 virtual void slotGetMail();
44 virtual void slotGetAllMail(); 47 virtual void slotGetAllMail();
45 virtual void slotDeleteAllMail(); 48 virtual void slotDeleteAllMail();
46 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 49 virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int);
47 virtual void slotShowFolders( bool show ); 50 virtual void slotShowFolders( bool show );
48 virtual void refreshMailView(const QValueList<RecMailP>&); 51 virtual void refreshMailView(const Q3ValueList<RecMailP>&);
49 virtual void mailLeftClicked( QListViewItem * ); 52 virtual void mailLeftClicked( Q3ListViewItem * );
50 virtual void slotMoveCopyMail(); 53 virtual void slotMoveCopyMail();
51 virtual void slotMoveCopyAllMail(); 54 virtual void slotMoveCopyAllMail();
52 virtual void reEditMail(); 55 virtual void reEditMail();
@@ -59,9 +62,9 @@ private:
59 QString mPendingEmail; 62 QString mPendingEmail;
60 QString mPendingName; 63 QString mPendingName;
61 QByteArray mPendingData; 64 QByteArray mPendingData;
62 QCString mPendingMessage; 65 Q3CString mPendingMessage;
63 Settings *settings; 66 Settings *settings;
64 QTextBrowser * tb; 67 Q3TextBrowser * tb;
65 68
66}; 69};
67 70
diff --git a/kmicromail/qpe/qdialog.h b/kmicromail/qpe/qdialog.h
index c63133d..3720182 100644
--- a/kmicromail/qpe/qdialog.h
+++ b/kmicromail/qpe/qdialog.h
@@ -14,7 +14,7 @@ class QDialog_hacked : public QDialog
14 //Q__OBJECT 14 //Q__OBJECT
15 15
16 public: 16 public:
17 QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, WFlags f=0 ); 17 QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, Qt::WFlags f=0 );
18 18
19}; 19};
20 20
diff --git a/kmicromail/qpe/qdialog_hacked.cpp b/kmicromail/qpe/qdialog_hacked.cpp
index 0a34cec..5d4d353 100644
--- a/kmicromail/qpe/qdialog_hacked.cpp
+++ b/kmicromail/qpe/qdialog_hacked.cpp
@@ -1,19 +1,19 @@
1 1
2#include <qdialog.h> 2#include <qdialog.h>
3#include <qhbox.h> 3#include <q3hbox.h>
4#include <qpushbutton.h> 4#include <qpushbutton.h>
5#include <klocale.h> 5#include <klocale.h>
6#ifdef QDialog 6#ifdef QDialog
7#undef QDialog 7#undef QDialog
8#endif 8#endif
9 QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, WFlags f ) 9 QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, Qt::WFlags f )
10 : QDialog( parent,name,modal, f) 10 : QDialog( parent,name,modal, f)
11 { 11 {
12 qDebug("New hacked QDialog for ompi desktop"); 12 qDebug("New hacked QDialog for ompi desktop");
13 //QTimer::singleShot( 1, this,SLOT(addaddbuttons()) ); 13 //QTimer::singleShot( 1, this,SLOT(addaddbuttons()) );
14 14
15 setOrientation ( Vertical ); 15 setOrientation ( Vertical );
16 QHBox * hb = new QHBox ( this ); 16 Q3HBox * hb = new Q3HBox ( this );
17 QPushButton *ok = new QPushButton( i18n("OK"), hb ); 17 QPushButton *ok = new QPushButton( i18n("OK"), hb );
18 QPushButton *cancel = new QPushButton( i18n("Cancel"), hb ); 18 QPushButton *cancel = new QPushButton( i18n("Cancel"), hb );
19 setExtension ( hb ); 19 setExtension ( hb );
diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp
index 10b6d79..ead723c 100644
--- a/kmicromail/selectsmtp.cpp
+++ b/kmicromail/selectsmtp.cpp
@@ -8,9 +8,9 @@
8#include <qlineedit.h> 8#include <qlineedit.h>
9#include <qlabel.h> 9#include <qlabel.h>
10#include <qtabwidget.h> 10#include <qtabwidget.h>
11#include <qlistview.h> 11#include <q3listview.h>
12#include <klocale.h> 12#include <klocale.h>
13selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) 13selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, Qt::WFlags fl)
14 : selectstoreui(parent,name,modal,fl) 14 : selectstoreui(parent,name,modal,fl)
15{ 15{
16 //m_smtpList.setAutoDelete(false); 16 //m_smtpList.setAutoDelete(false);
diff --git a/kmicromail/selectsmtp.h b/kmicromail/selectsmtp.h
index 9157ddf..d7accf6 100644
--- a/kmicromail/selectsmtp.h
+++ b/kmicromail/selectsmtp.h
@@ -11,7 +11,7 @@ class selectsmtp : public selectstoreui
11{ 11{
12 Q_OBJECT 12 Q_OBJECT
13public: 13public:
14 selectsmtp(QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); 14 selectsmtp(QWidget* parent = 0, const char* name = 0, bool modal = TRUE, Qt::WFlags fl = 0 );
15 virtual ~selectsmtp(); 15 virtual ~selectsmtp();
16 void setSelectionlist(QList<SMTPaccount>*list); 16 void setSelectionlist(QList<SMTPaccount>*list);
17 SMTPaccount*selected_smtp(); 17 SMTPaccount*selected_smtp();
diff --git a/kmicromail/selectstore.h b/kmicromail/selectstore.h
index 447a6ae..d312c1d 100644
--- a/kmicromail/selectstore.h
+++ b/kmicromail/selectstore.h
@@ -2,7 +2,7 @@
2#define _SELECTSTORE_H 2#define _SELECTSTORE_H
3 3
4#include "selectstoreui.h" 4#include "selectstoreui.h"
5#include <qvaluelist.h> 5#include <q3valuelist.h>
6#include <qmap.h> 6#include <qmap.h>
7#include <qstringlist.h> 7#include <qstringlist.h>
8 8
diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp
index c593b48..889c490 100644
--- a/kmicromail/settingsdialog.cpp
+++ b/kmicromail/settingsdialog.cpp
@@ -2,6 +2,8 @@
2#include <qspinbox.h> 2#include <qspinbox.h>
3#include <qlayout.h> 3#include <qlayout.h>
4#include <qtabwidget.h> 4#include <qtabwidget.h>
5//Added by qt3to4:
6#include <Q3GridLayout>
5 7
6#include <kconfig.h> 8#include <kconfig.h>
7#include <kprefs.h> 9#include <kprefs.h>
@@ -12,13 +14,13 @@
12#include "settingsdialog.h" 14#include "settingsdialog.h"
13 15
14 16
15SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 17SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
16 : SettingsDialogUI( parent, name, modal, fl ) { 18 : SettingsDialogUI( parent, name, modal, fl ) {
17 19
18#if 0 20#if 0
19 QTabWidget *topFrame = TabWidget2; 21 QTabWidget *topFrame = TabWidget2;
20 22
21 QGridLayout *topLayout = new QGridLayout(topFrame,3,3); 23 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,3);
22 topLayout->setSpacing(2); 24 topLayout->setSpacing(2);
23 topLayout->setMargin(3); 25 topLayout->setMargin(3);
24 KPrefsWidFont * tVFont; 26 KPrefsWidFont * tVFont;
diff --git a/kmicromail/settingsdialog.h b/kmicromail/settingsdialog.h
index 042b69f..b168226 100644
--- a/kmicromail/settingsdialog.h
+++ b/kmicromail/settingsdialog.h
@@ -11,7 +11,7 @@ class SettingsDialog : public SettingsDialogUI {
11Q_OBJECT 11Q_OBJECT
12 12
13public: 13public:
14 SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 14 SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
15 ~SettingsDialog(); 15 ~SettingsDialog();
16 16
17private: 17private:
diff --git a/kmicromail/statuswidget.cpp b/kmicromail/statuswidget.cpp
index 19cf635..6da6f54 100644
--- a/kmicromail/statuswidget.cpp
+++ b/kmicromail/statuswidget.cpp
@@ -1,5 +1,5 @@
1#include <qtimer.h> 1#include <qtimer.h>
2#include <qprogressbar.h> 2#include <q3progressbar.h>
3#include <qlabel.h> 3#include <qlabel.h>
4 4
5#include "statuswidget.h" 5#include "statuswidget.h"
@@ -7,7 +7,7 @@
7// the current problem I see is "locking": used exclusive by one sender 7// the current problem I see is "locking": used exclusive by one sender
8 8
9 9
10StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl ) 10StatusWidget::StatusWidget( QWidget* parent, const char* name,Qt::WFlags fl )
11 : StatusWidgetUI( parent, name, fl ) { 11 : StatusWidgetUI( parent, name, fl ) {
12 12
13 setMaximumHeight( 15 ); 13 setMaximumHeight( 15 );
diff --git a/kmicromail/statuswidget.h b/kmicromail/statuswidget.h
index 73f0d75..1d29daf 100644
--- a/kmicromail/statuswidget.h
+++ b/kmicromail/statuswidget.h
@@ -9,7 +9,7 @@ class StatusWidget : public StatusWidgetUI {
9Q_OBJECT 9Q_OBJECT
10 10
11public: 11public:
12 StatusWidget( QWidget* parent = 0, const char* name = 0,WFlags fl = 0 ); 12 StatusWidget( QWidget* parent = 0, const char* name = 0,Qt::WFlags fl = 0 );
13 ~StatusWidget(); 13 ~StatusWidget();
14 14
15 15
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 685b4e4..c9dedb0 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -24,20 +24,23 @@
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25 25
26/* QT */ 26/* QT */
27#include <qtextbrowser.h> 27#include <q3textbrowser.h>
28#include <qmessagebox.h> 28#include <qmessagebox.h>
29#include <qtextstream.h> 29#include <q3textstream.h>
30#include <qaction.h> 30#include <qaction.h>
31#include <qpopupmenu.h> 31#include <q3popupmenu.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qlayout.h> 33#include <qlayout.h>
34//Added by qt3to4:
35#include <Q3ValueList>
36#include <Q3VBoxLayout>
34 37
35//using namespace Opie::Ui; 38//using namespace Opie::Ui;
36//using namespace Opie::Core; 39//using namespace Opie::Core;
37 40
38AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 41AttachItem::AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file,
39 const QString&fsize,int num,const QValueList<int>&path) 42 const QString&fsize,int num,const Q3ValueList<int>&path)
40 : QListViewItem(parent,after),_partNum(num) 43 : Q3ListViewItem(parent,after),_partNum(num)
41{ 44{
42 _path=path; 45 _path=path;
43 setText(0, mime); 46 setText(0, mime);
@@ -46,9 +49,9 @@ AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mi
46 setText(3, fsize); 49 setText(3, fsize);
47} 50}
48 51
49AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 52AttachItem::AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file,
50 const QString&fsize,int num,const QValueList<int>&path) 53 const QString&fsize,int num,const Q3ValueList<int>&path)
51 : QListViewItem(parent,after),_partNum(num) 54 : Q3ListViewItem(parent,after),_partNum(num)
52{ 55{
53 _path=path; 56 _path=path;
54 setText(0, mime); 57 setText(0, mime);
@@ -57,7 +60,7 @@ AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QStrin
57 setText(3, fsize); 60 setText(3, fsize);
58} 61}
59 62
60bool AttachItem::isParentof(const QValueList<int>&path) 63bool AttachItem::isParentof(const Q3ValueList<int>&path)
61{ 64{
62 /* if not set, then no parent */ 65 /* if not set, then no parent */
63 if (path.count()==0||_path.count()==0) return false; 66 if (path.count()==0||_path.count()==0) return false;
@@ -70,9 +73,9 @@ bool AttachItem::isParentof(const QValueList<int>&path)
70 return true; 73 return true;
71} 74}
72 75
73AttachItem* ViewMail::searchParent(const QValueList<int>&path) 76AttachItem* ViewMail::searchParent(const Q3ValueList<int>&path)
74{ 77{
75 QListViewItemIterator it( attachments ); 78 Q3ListViewItemIterator it( attachments );
76 for ( ; it.current(); ++it ) 79 for ( ; it.current(); ++it )
77 { 80 {
78 AttachItem*ati = (AttachItem*)it.current(); 81 AttachItem*ati = (AttachItem*)it.current();
@@ -154,7 +157,7 @@ void ViewMail::setBody(const RecBodyP&body )
154 */ 157 */
155 QTextOStream o(&fsize); 158 QTextOStream o(&fsize);
156 if (w>0) o.precision(2); else o.precision(0); 159 if (w>0) o.precision(2); else o.precision(0);
157 o.setf(QTextStream::fixed); 160 o.setf(Q3TextStream::fixed);
158 o << s << " " << q << "Byte"; 161 o << s << " " << q << "Byte";
159 } 162 }
160 163
@@ -195,7 +198,7 @@ void ViewMail::setBody(const RecBodyP&body )
195 } 198 }
196 QTextOStream o(&fsize); 199 QTextOStream o(&fsize);
197 if (w>0) o.precision(2); else o.precision(0); 200 if (w>0) o.precision(2); else o.precision(0);
198 o.setf(QTextStream::fixed); 201 o.setf(Q3TextStream::fixed);
199 o << s << " " << q << "Byte"; 202 o << s << " " << q << "Byte";
200 desc = body->Parts()[i]->Description(); 203 desc = body->Parts()[i]->Description();
201 parentItem = searchParent(body->Parts()[i]->Positionlist()); 204 parentItem = searchParent(body->Parts()[i]->Positionlist());
@@ -239,7 +242,7 @@ void ViewMail::slotShowHtml( bool state )
239 setText(); 242 setText();
240} 243}
241 244
242void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) 245void ViewMail::slotItemClicked( Q3ListViewItem * item , const QPoint & point, int )
243{ 246{
244 if (!item ) 247 if (!item )
245 return; 248 return;
@@ -249,7 +252,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
249 setText(); 252 setText();
250 return; 253 return;
251 } 254 }
252 QPopupMenu *menu = new QPopupMenu(); 255 Q3PopupMenu *menu = new Q3PopupMenu();
253 int ret=0; 256 int ret=0;
254 257
255 if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" ) 258 if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" )
@@ -278,7 +281,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
278 if (content) 281 if (content)
279 { 282 {
280 QFile output(str); 283 QFile output(str);
281 output.open(IO_WriteOnly); 284 output.open(QIODevice::WriteOnly);
282 output.writeBlock(content->Content(),content->Length()); 285 output.writeBlock(content->Content(),content->Length());
283 output.close(); 286 output.close();
284 delete content; 287 delete content;
@@ -297,7 +300,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int
297 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); 300 encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] );
298 if (content) { 301 if (content) {
299 QFile output(tmpfile); 302 QFile output(tmpfile);
300 output.open(IO_WriteOnly); 303 output.open(QIODevice::WriteOnly);
301 output.writeBlock(content->Content(),content->Length()); 304 output.writeBlock(content->Content(),content->Length());
302 output.close(); 305 output.close();
303 delete content; 306 delete content;
@@ -352,7 +355,7 @@ void ViewMail::slotNextMail()
352 nextMail->blockSignals( false ); 355 nextMail->blockSignals( false );
353} 356}
354 357
355ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) 358ViewMail::ViewMail( QWidget *parent, const char *name, Qt::WFlags fl)
356 : ViewMailBase(parent, name, fl), _inLoop(false) 359 : ViewMailBase(parent, name, fl), _inLoop(false)
357{ 360{
358 m_gotBody = false; 361 m_gotBody = false;
@@ -369,7 +372,7 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl)
369 connect( downloadMail, SIGNAL( activated() ), SIGNAL( signalDownloadMail() ) ); 372 connect( downloadMail, SIGNAL( activated() ), SIGNAL( signalDownloadMail() ) );
370 373
371 attachments->setEnabled(m_gotBody); 374 attachments->setEnabled(m_gotBody);
372 connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); 375 connect( attachments, SIGNAL( clicked(Q3ListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(Q3ListViewItem*,const QPoint&, int) ) );
373 376
374 attachments->setSorting(-1); 377 attachments->setSorting(-1);
375} 378}
@@ -557,10 +560,10 @@ void ViewMail::slotDeleteMail( )
557 } 560 }
558} 561}
559 562
560MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) 563MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, Qt::WFlags f)
561 : QDialog(parent,name,modal) 564 : QDialog(parent,name,modal)
562{ 565{
563 QVBoxLayout*dlglayout = new QVBoxLayout(this); 566 Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this);
564 dlglayout->setSpacing(2); 567 dlglayout->setSpacing(2);
565 dlglayout->setMargin(1); 568 dlglayout->setMargin(1);
566 //m_imageview = new Opie::MM::OImageScrollView(this); 569 //m_imageview = new Opie::MM::OImageScrollView(this);
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index bb5b685..6cf6efb 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -7,28 +7,28 @@
7#include <qdialog.h> 7#include <qdialog.h>
8#include <qapplication.h> 8#include <qapplication.h>
9 9
10#include <qlistview.h> 10#include <q3listview.h>
11#include <qmap.h> 11#include <qmap.h>
12#include <klocale.h> 12#include <klocale.h>
13#include <qstringlist.h> 13#include <qstringlist.h>
14#include <qvaluelist.h> 14#include <q3valuelist.h>
15 15
16//namespace Opie { namespace MM { class OImageScrollView; } } 16//namespace Opie { namespace MM { class OImageScrollView; } }
17 17
18class AttachItem : public QListViewItem 18class AttachItem : public Q3ListViewItem
19{ 19{
20public: 20public:
21 AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 21 AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file,
22 const QString&fsize,int num,const QValueList<int>&path); 22 const QString&fsize,int num,const Q3ValueList<int>&path);
23 AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, 23 AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file,
24 const QString&fsize,int num,const QValueList<int>&path); 24 const QString&fsize,int num,const Q3ValueList<int>&path);
25 int Partnumber() { return _partNum; } 25 int Partnumber() { return _partNum; }
26 bool isParentof(const QValueList<int>&path); 26 bool isParentof(const Q3ValueList<int>&path);
27 27
28private: 28private:
29 int _partNum; 29 int _partNum;
30 /* needed for a better display of attachments */ 30 /* needed for a better display of attachments */
31 QValueList<int> _path; 31 Q3ValueList<int> _path;
32}; 32};
33 33
34class ViewMail : public ViewMailBase 34class ViewMail : public ViewMailBase
@@ -36,7 +36,7 @@ class ViewMail : public ViewMailBase
36 Q_OBJECT 36 Q_OBJECT
37 37
38public: 38public:
39 ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 39 ViewMail( QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0);
40 ~ViewMail(); 40 ~ViewMail();
41 41
42 void hide(); 42 void hide();
@@ -50,7 +50,7 @@ public:
50 void signalDownloadMail(); 50 void signalDownloadMail();
51protected: 51protected:
52 QString deHtml(const QString &string); 52 QString deHtml(const QString &string);
53 AttachItem* searchParent(const QValueList<int>&path); 53 AttachItem* searchParent(const Q3ValueList<int>&path);
54 AttachItem* lastChild(AttachItem*parent); 54 AttachItem* lastChild(AttachItem*parent);
55 55
56protected slots: 56protected slots:
@@ -58,7 +58,7 @@ protected slots:
58 void slotReply(); 58 void slotReply();
59 void slotForward(); 59 void slotForward();
60 void setText(); 60 void setText();
61 void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); 61 void slotItemClicked( Q3ListViewItem * item , const QPoint & point, int c );
62 void slotDeleteMail( ); 62 void slotDeleteMail( );
63 void slotShowHtml( bool ); 63 void slotShowHtml( bool );
64 void slotViewSource(); 64 void slotViewSource();
@@ -83,7 +83,7 @@ class MailImageDlg:public QDialog
83{ 83{
84 Q_OBJECT 84 Q_OBJECT
85public: 85public:
86 MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); 86 MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, Qt::WFlags f = 0);
87 ~MailImageDlg(); 87 ~MailImageDlg();
88 void setName(const QString&); 88 void setName(const QString&);
89protected: 89protected:
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 3bb964e..371ee91 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -1,13 +1,16 @@
1// CHANGED 2004-08-06 Lutz Rogowski 1// CHANGED 2004-08-06 Lutz Rogowski
2#include <qtextbrowser.h> 2#include <q3textbrowser.h>
3#include <qlistview.h> 3#include <q3listview.h>
4#include <qaction.h> 4#include <qaction.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qvbox.h> 6#include <q3vbox.h>
7#include <qapplication.h> 7#include <qapplication.h>
8 8
9#include <qtoolbar.h> 9#include <q3toolbar.h>
10#include <qmenubar.h> 10#include <qmenubar.h>
11//Added by qt3to4:
12#include <QKeyEvent>
13#include <Q3PopupMenu>
11#include <kiconloader.h> 14#include <kiconloader.h>
12//#include <qpe/resource.h> 15//#include <qpe/resource.h>
13#include <klocale.h> 16#include <klocale.h>
@@ -15,15 +18,15 @@
15#include "viewmailbase.h" 18#include "viewmailbase.h"
16//#include "opendiag.h" 19//#include "opendiag.h"
17 20
18ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 21ViewMailBase::ViewMailBase(QWidget *parent, const char *name, Qt::WFlags fl)
19 : QMainWindow(parent, name, fl) 22 : Q3MainWindow(parent, name, fl)
20{ 23{
21 24
22 setToolBarsMovable(false); 25 setToolBarsMovable(false);
23 26
24 toolbar = new QToolBar(this); 27 toolbar = new Q3ToolBar(this);
25 menubar = new QMenuBar( toolbar ); 28 menubar = new QMenuBar( toolbar );
26 mailmenu = new QPopupMenu( menubar ); 29 mailmenu = new Q3PopupMenu( menubar );
27 menubar->insertItem( i18n( "Mail" ), mailmenu ); 30 menubar->insertItem( i18n( "Mail" ), mailmenu );
28 31
29 toolbar->setHorizontalStretchable(true); 32 toolbar->setHorizontalStretchable(true);
@@ -69,10 +72,10 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
69 toolbar->setStretchableWidget(spacer); 72 toolbar->setStretchableWidget(spacer);
70 closeMail->addTo(toolbar); 73 closeMail->addTo(toolbar);
71 closeMail->addTo(mailmenu); 74 closeMail->addTo(mailmenu);
72 QVBox *view = new QVBox(this); 75 Q3VBox *view = new Q3VBox(this);
73 setCentralWidget(view); 76 setCentralWidget(view);
74 77
75 attachments = new QListView(view); 78 attachments = new Q3ListView(view);
76 int fixh = 100; 79 int fixh = 100;
77 if ( QApplication::desktop()->width() > 320 ) 80 if ( QApplication::desktop()->width() > 320 )
78 fixh = 200; 81 fixh = 200;
@@ -85,7 +88,7 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
85 attachments->setSorting(-1); 88 attachments->setSorting(-1);
86 attachments->hide(); 89 attachments->hide();
87 90
88 browser = new QTextBrowser(view); 91 browser = new Q3TextBrowser(view);
89 92
90 //openDiag = new OpenDiag(view); 93 //openDiag = new OpenDiag(view);
91 //openDiag->hide(); 94 //openDiag->hide();
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index 7c075eb..3f1dead 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -2,7 +2,10 @@
2#ifndef VIEWMAILBASE_H 2#ifndef VIEWMAILBASE_H
3#define VIEWMAILBASE_H 3#define VIEWMAILBASE_H
4 4
5#include <qmainwindow.h> 5#include <q3mainwindow.h>
6//Added by qt3to4:
7#include <Q3PopupMenu>
8#include <QKeyEvent>
6 9
7#ifndef DESKTOP_VERSION 10#ifndef DESKTOP_VERSION
8#include <qpe/qpemenubar.h> 11#include <qpe/qpemenubar.h>
@@ -11,27 +14,27 @@
11 14
12class QAction; 15class QAction;
13class OpenDiag; 16class OpenDiag;
14class QListView; 17class Q3ListView;
15class QToolBar; 18class Q3ToolBar;
16class QTextBrowser; 19class Q3TextBrowser;
17class QMenuBar; 20class QMenuBar;
18class QPopupMenu; 21class Q3PopupMenu;
19 22
20class ViewMailBase : public QMainWindow 23class ViewMailBase : public Q3MainWindow
21{ 24{
22 Q_OBJECT 25 Q_OBJECT
23 26
24public: 27public:
25 ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); 28 ViewMailBase(QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0);
26 29
27protected: 30protected:
28 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource; 31 QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource;
29 QListView *attachments; 32 Q3ListView *attachments;
30 QToolBar *toolbar; 33 Q3ToolBar *toolbar;
31 QTextBrowser *browser; 34 Q3TextBrowser *browser;
32 OpenDiag *openDiag; 35 OpenDiag *openDiag;
33 QMenuBar *menubar; 36 QMenuBar *menubar;
34 QPopupMenu *mailmenu; 37 Q3PopupMenu *mailmenu;
35 38
36protected slots: 39protected slots:
37 void slotChangeAttachview(bool state); 40 void slotChangeAttachview(bool state);
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8385bcc..c1a2f76 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -32,22 +32,28 @@
32 32
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qradiobutton.h> 34#include <qradiobutton.h>
35#include <qbuttongroup.h> 35#include <q3buttongroup.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qclipboard.h> 37#include <qclipboard.h>
38#include <qcursor.h> 38#include <qcursor.h>
39#include <qmessagebox.h> 39#include <qmessagebox.h>
40#include <qprogressbar.h> 40#include <q3progressbar.h>
41#include <qmultilineedit.h> 41#include <q3multilineedit.h>
42#include <qtimer.h> 42#include <qtimer.h>
43#include <qwidgetstack.h> 43#include <q3widgetstack.h>
44#include <qptrlist.h> 44#include <q3ptrlist.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qgroupbox.h> 46#include <q3groupbox.h>
47#include <qfile.h> 47#include <qfile.h>
48#include <qdir.h> 48#include <qdir.h>
49#ifndef KORG_NOSPLITTER 49#ifndef KORG_NOSPLITTER
50#include <qsplitter.h> 50#include <qsplitter.h>
51//Added by qt3to4:
52#include <Q3VBoxLayout>
53#include <QKeyEvent>
54#include <Q3Frame>
55#include <QLabel>
56#include <Q3ValueList>
51#endif 57#endif
52 58
53#include <kglobal.h> 59#include <kglobal.h>
@@ -128,7 +134,7 @@
128#include <stdio.h> 134#include <stdio.h>
129#include <unistd.h> 135#include <unistd.h>
130#else 136#else
131#include <qprocess.h> 137#include <q3process.h>
132#endif 138#endif
133 139
134#ifdef DESKTOP_VERSION 140#ifdef DESKTOP_VERSION
@@ -140,7 +146,7 @@ extern int globalFlagBlockAgenda;
140extern int globalFlagBlockStartup; 146extern int globalFlagBlockStartup;
141 147
142 148
143MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) 149MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms,QDateTime start ) : Q3TextBrowser(parent)
144 150
145{ 151{
146 mAlarms = alarms; 152 mAlarms = alarms;
@@ -277,13 +283,13 @@ class KOBeamPrefs : public QDialog
277 QDialog( parent, name, true ) 283 QDialog( parent, name, true )
278 { 284 {
279 setCaption( i18n("Beam Options") ); 285 setCaption( i18n("Beam Options") );
280 QVBoxLayout* lay = new QVBoxLayout( this ); 286 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
281 lay->setSpacing( 3 ); 287 lay->setSpacing( 3 );
282 lay->setMargin( 3 ); 288 lay->setMargin( 3 );
283 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 289 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("File format"), this );
284 lay->addWidget( format ); 290 lay->addWidget( format );
285 format->setExclusive ( true ) ; 291 format->setExclusive ( true ) ;
286 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 292 Q3ButtonGroup* time = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Time format"), this );
287 lay->addWidget( time ); time->setExclusive ( true ) ; 293 lay->addWidget( time ); time->setExclusive ( true ) ;
288 vcal = new QRadioButton(" vCalendar ", format ); 294 vcal = new QRadioButton(" vCalendar ", format );
289 ical = new QRadioButton(" iCalendar ", format ); 295 ical = new QRadioButton(" iCalendar ", format );
@@ -312,12 +318,12 @@ class KOCatPrefs : public QDialog
312 QDialog( parent, name, true ) 318 QDialog( parent, name, true )
313 { 319 {
314 setCaption( i18n("Manage new Categories") ); 320 setCaption( i18n("Manage new Categories") );
315 QVBoxLayout* lay = new QVBoxLayout( this ); 321 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
316 lay->setSpacing( 3 ); 322 lay->setSpacing( 3 );
317 lay->setMargin( 3 ); 323 lay->setMargin( 3 );
318 QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); 324 QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this );
319 lay->addWidget( lab ); 325 lay->addWidget( lab );
320 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 326 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this );
321 lay->addWidget( format ); 327 lay->addWidget( format );
322 format->setExclusive ( true ) ; 328 format->setExclusive ( true ) ;
323 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 329 addCatBut = new QRadioButton(i18n("Add to category list"), format );
@@ -373,7 +379,7 @@ void CalendarView::init()
373 flag_clearallviewsEventDisplay = false; 379 flag_clearallviewsEventDisplay = false;
374 flag_clearallviewsupdateView = false; 380 flag_clearallviewsupdateView = false;
375 mNextAlarmDateTime = QDateTime::currentDateTime(); 381 mNextAlarmDateTime = QDateTime::currentDateTime();
376 setFocusPolicy (NoFocus ); 382 setFocusPolicy (Qt::NoFocus );
377 mViewerCallerIsSearchDialog = false; 383 mViewerCallerIsSearchDialog = false;
378 mBlockShowDates = false; 384 mBlockShowDates = false;
379 mConflictingEvent = 0; 385 mConflictingEvent = 0;
@@ -394,7 +400,7 @@ void CalendarView::init()
394 mStorage = new FileStorage( mCalendar ); 400 mStorage = new FileStorage( mCalendar );
395 mNavigator = new DateNavigator( this, "datevav", mViewManager ); 401 mNavigator = new DateNavigator( this, "datevav", mViewManager );
396 402
397 QBoxLayout *topLayout = (QBoxLayout*)layout(); 403 Q3BoxLayout *topLayout = (Q3BoxLayout*)layout();
398#ifndef KORG_NOSPLITTER 404#ifndef KORG_NOSPLITTER
399 // create the main layout frames. 405 // create the main layout frames.
400 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); 406 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
@@ -425,9 +431,9 @@ void CalendarView::init()
425 } 431 }
426#endif 432#endif
427 QWidget *rightBox = new QWidget( mPanner ); 433 QWidget *rightBox = new QWidget( mPanner );
428 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 434 Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox );
429 435
430 mRightFrame = new QWidgetStack( rightBox ); 436 mRightFrame = new Q3WidgetStack( rightBox );
431 rightLayout->addWidget( mRightFrame, 1 ); 437 rightLayout->addWidget( mRightFrame, 1 );
432 438
433 mLeftFrame = mLeftSplitter; 439 mLeftFrame = mLeftSplitter;
@@ -454,7 +460,7 @@ void CalendarView::init()
454 //QBoxLayout * leftFrameLayout; 460 //QBoxLayout * leftFrameLayout;
455 topLayout->addWidget( mMainFrame ); 461 topLayout->addWidget( mMainFrame );
456#ifdef DESKTOP_VERSION 462#ifdef DESKTOP_VERSION
457 mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); 463 mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,Qt::Horizontal, this );
458 topLayout->addWidget( mDateScrollBar ); 464 topLayout->addWidget( mDateScrollBar );
459 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); 465 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
460 if ( QApplication::desktop()->width() < 800 ) 466 if ( QApplication::desktop()->width() < 800 )
@@ -501,8 +507,8 @@ void CalendarView::init()
501 mCalEditView->hide(); 507 mCalEditView->hide();
502 QWidget *rightBox = new QWidget( mMainFrame ); 508 QWidget *rightBox = new QWidget( mMainFrame );
503 //mainBoxLayout->addWidget ( rightBox, 10 ); 509 //mainBoxLayout->addWidget ( rightBox, 10 );
504 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 510 Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox );
505 mRightFrame = new QWidgetStack( rightBox ); 511 mRightFrame = new Q3WidgetStack( rightBox );
506 rightLayout->addWidget( mRightFrame, 10 ); 512 rightLayout->addWidget( mRightFrame, 10 );
507 513
508 //mLeftFrame = (QWidget *)leftFrame; 514 //mLeftFrame = (QWidget *)leftFrame;
@@ -616,9 +622,9 @@ void CalendarView::init()
616 622
617 // kdDebug() << "CalendarView::CalendarView() done" << endl; 623 // kdDebug() << "CalendarView::CalendarView() done" << endl;
618 624
619 mDateFrame = new QVBox(0,0,WType_Popup); 625 mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
620 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 626 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
621 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 627 mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
622 mDateFrame->setLineWidth(3); 628 mDateFrame->setLineWidth(3);
623 mDateFrame->hide(); 629 mDateFrame->hide();
624 mDateFrame->setCaption( i18n( "Pick a date to display")); 630 mDateFrame->setCaption( i18n( "Pick a date to display"));
@@ -669,7 +675,7 @@ void CalendarView::nextConflict( bool all, bool allday )
669{ 675{
670 if ( flag_blockConflict ) return; 676 if ( flag_blockConflict ) return;
671 flag_blockConflict = true; 677 flag_blockConflict = true;
672 QPtrList<Event> testlist = mCalendar->events(); 678 Q3PtrList<Event> testlist = mCalendar->events();
673 Event * test = testlist.first(); 679 Event * test = testlist.first();
674 while ( test ) { 680 while ( test ) {
675 test->setTagged( false ); 681 test->setTagged( false );
@@ -685,7 +691,7 @@ void CalendarView::nextConflict( bool all, bool allday )
685 bool found = false; 691 bool found = false;
686 Event * cE = 0; 692 Event * cE = 0;
687 Event * cE2 = 0; 693 Event * cE2 = 0;
688 QPtrList<Event> testlist2 = testlist; 694 Q3PtrList<Event> testlist2 = testlist;
689 test = testlist.first(); 695 test = testlist.first();
690 bool skip = false; 696 bool skip = false;
691 topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); 697 topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") );
@@ -835,7 +841,7 @@ void CalendarView::updateView(const QDate &start, const QDate &end)
835void CalendarView::checkFiles() 841void CalendarView::checkFiles()
836{ 842{
837 QString message; 843 QString message;
838 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 844 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
839 KopiCalendarFile * cal = calendars.first(); 845 KopiCalendarFile * cal = calendars.first();
840 while ( cal ) { 846 while ( cal ) {
841 if ( cal->mErrorOnLoad ) { 847 if ( cal->mErrorOnLoad ) {
@@ -857,7 +863,7 @@ void CalendarView::checkAlarms()
857 KConfig *config = KOGlobals::config(); 863 KConfig *config = KOGlobals::config();
858 config->setGroup( "AppRun" ); 864 config->setGroup( "AppRun" );
859 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 865 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
860 int daysto = dt.daysTo( QDate::currentDate() ); 866 int daysto = dt.daysTo( (QDateTime)QDate::currentDate() );
861 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 867 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
862 dt = dt.addDays( days ); 868 dt = dt.addDays( days );
863 int secto = dt.secsTo( QDateTime::currentDateTime() ); 869 int secto = dt.secsTo( QDateTime::currentDateTime() );
@@ -867,8 +873,8 @@ void CalendarView::checkAlarms()
867 QDateTime latest = dt.addSecs ( secs ); 873 QDateTime latest = dt.addSecs ( secs );
868 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 874 qDebug("KO: Last termination on %s ", latest.toString().latin1());
869 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 875 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
870 QPtrList<Incidence> el = mCalendar->rawIncidences(); 876 Q3PtrList<Incidence> el = mCalendar->rawIncidences();
871 QPtrList<Incidence> al; 877 Q3PtrList<Incidence> al;
872 Incidence* inL = el.first(); 878 Incidence* inL = el.first();
873 QDateTime cur = QDateTime::currentDateTime().addSecs(-59); 879 QDateTime cur = QDateTime::currentDateTime().addSecs(-59);
874 qDebug("KO: Checking alarm until %s ", cur.toString().latin1()); 880 qDebug("KO: Checking alarm until %s ", cur.toString().latin1());
@@ -886,9 +892,9 @@ void CalendarView::checkAlarms()
886 inL = el.next(); 892 inL = el.next();
887 } 893 }
888 if ( al.count() ) { 894 if ( al.count() ) {
889 QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); 895 QDialog* dia = new QDialog( this, "huhu", false, Qt::WDestructiveClose | Qt::WStyle_StaysOnTop );
890 dia->setCaption( i18n("KO/Pi: Missing alarms!") ); 896 dia->setCaption( i18n("KO/Pi: Missing alarms!") );
891 QVBoxLayout* lay = new QVBoxLayout( dia ); 897 Q3VBoxLayout* lay = new Q3VBoxLayout( dia );
892 lay->setSpacing( 0 ); 898 lay->setSpacing( 0 );
893 lay->setMargin( 0 ); 899 lay->setMargin( 0 );
894 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest ); 900 MissedAlarmTextBrowser* matb = new MissedAlarmTextBrowser ( dia, al, latest );
@@ -1216,7 +1222,7 @@ void CalendarView::computeAlarm( QString msg )
1216 return; 1222 return;
1217 } 1223 }
1218#else 1224#else
1219 QProcess* p = new QProcess(); 1225 Q3Process* p = new Q3Process();
1220 p->addArgument( tempfilename.latin1() ); 1226 p->addArgument( tempfilename.latin1() );
1221 p->start(); 1227 p->start();
1222 return; 1228 return;
@@ -1266,10 +1272,10 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString &noti )
1266 //qDebug("nextsuspendalarm = \n%s ",mess.latin1() ); 1272 //qDebug("nextsuspendalarm = \n%s ",mess.latin1() );
1267 QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm"; 1273 QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm";
1268 QFile file( fn ); 1274 QFile file( fn );
1269 if (!file.open( IO_WriteOnly ) ) { 1275 if (!file.open( QIODevice::WriteOnly ) ) {
1270 qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); 1276 qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
1271 } else { 1277 } else {
1272 QTextStream ts( &file ); 1278 Q3TextStream ts( &file );
1273 ts << mess; 1279 ts << mess;
1274 file.close(); 1280 file.close();
1275 } 1281 }
@@ -1294,10 +1300,10 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString &noti )
1294 //qDebug("nextalarm = \n%s ",mess.latin1() ); 1300 //qDebug("nextalarm = \n%s ",mess.latin1() );
1295 QString fn = QDir::homeDirPath() + "/.kopi_next_alarm"; 1301 QString fn = QDir::homeDirPath() + "/.kopi_next_alarm";
1296 QFile file( fn ); 1302 QFile file( fn );
1297 if (!file.open( IO_WriteOnly ) ) { 1303 if (!file.open( QIODevice::WriteOnly ) ) {
1298 qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); 1304 qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1());
1299 } else { 1305 } else {
1300 QTextStream ts( &file ); 1306 Q3TextStream ts( &file );
1301 ts << mess; 1307 ts << mess;
1302 file.close(); 1308 file.close();
1303 } 1309 }
@@ -1570,7 +1576,7 @@ Event* CalendarView::getLastSyncEvent()
1570 1576
1571// we check, if the to delete event has a id for a profile 1577// we check, if the to delete event has a id for a profile
1572// if yes, we set this id in the profile to delete 1578// if yes, we set this id in the profile to delete
1573void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) 1579void CalendarView::checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete )
1574{ 1580{
1575 if ( lastSync.count() == 0 ) { 1581 if ( lastSync.count() == 0 ) {
1576 //qDebug(" lastSync.count() == 0"); 1582 //qDebug(" lastSync.count() == 0");
@@ -1600,7 +1606,7 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t
1600} 1606}
1601void CalendarView::checkExternalId( Incidence * inc ) 1607void CalendarView::checkExternalId( Incidence * inc )
1602{ 1608{
1603 QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; 1609 Q3PtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ;
1604 checkExternSyncEvent( lastSync, inc ); 1610 checkExternSyncEvent( lastSync, inc );
1605 1611
1606} 1612}
@@ -1624,8 +1630,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1624 Event* eventRSync; 1630 Event* eventRSync;
1625 Event* eventLSync; 1631 Event* eventLSync;
1626 clearAllViews(); 1632 clearAllViews();
1627 QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); 1633 Q3PtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents();
1628 QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); 1634 Q3PtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents();
1629 bool fullDateRange = false; 1635 bool fullDateRange = false;
1630 local->resetTempSyncStat(); 1636 local->resetTempSyncStat();
1631 mLastCalendarSync = QDateTime::currentDateTime(); 1637 mLastCalendarSync = QDateTime::currentDateTime();
@@ -1684,10 +1690,10 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1684 } 1690 }
1685 //qDebug("*************************** "); 1691 //qDebug("*************************** ");
1686 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); 1692 qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange);
1687 QPtrList<Incidence> er = remote->rawIncidences(); 1693 Q3PtrList<Incidence> er = remote->rawIncidences();
1688 Incidence* inR = er.first(); 1694 Incidence* inR = er.first();
1689 Incidence* inL; 1695 Incidence* inL;
1690 QProgressBar bar( er.count(),0 ); 1696 Q3ProgressBar bar( er.count(),0 );
1691 bar.setCaption (i18n("Syncing - close to abort!") ); 1697 bar.setCaption (i18n("Syncing - close to abort!") );
1692 1698
1693 // ************** setting up filter ************* 1699 // ************** setting up filter *************
@@ -1831,7 +1837,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1831 } 1837 }
1832 inR = er.next(); 1838 inR = er.next();
1833 } 1839 }
1834 QPtrList<Incidence> el = local->rawIncidences(); 1840 Q3PtrList<Incidence> el = local->rawIncidences();
1835 inL = el.first(); 1841 inL = el.first();
1836 modulo = (el.count()/10)+1; 1842 modulo = (el.count()/10)+1;
1837 bar.setCaption (i18n("Add / remove events") ); 1843 bar.setCaption (i18n("Add / remove events") );
@@ -2048,7 +2054,7 @@ void CalendarView::syncExternal( int mode )
2048 if ( syncOK ) { 2054 if ( syncOK ) {
2049 if ( mSyncManager->mWriteBackFile ) 2055 if ( mSyncManager->mWriteBackFile )
2050 { 2056 {
2051 QPtrList<Incidence> iL = mCalendar->rawIncidences(); 2057 Q3PtrList<Incidence> iL = mCalendar->rawIncidences();
2052 Incidence* inc = iL.first(); 2058 Incidence* inc = iL.first();
2053 if ( phoneFormat ) { 2059 if ( phoneFormat ) {
2054 while ( inc ) { 2060 while ( inc ) {
@@ -2115,7 +2121,7 @@ bool CalendarView::importBday()
2115 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 2121 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
2116 ++count; 2122 ++count;
2117 } 2123 }
2118 QProgressBar bar(count,0 ); 2124 Q3ProgressBar bar(count,0 );
2119 int w = 300; 2125 int w = 300;
2120 if ( QApplication::desktop()->width() < 320 ) 2126 if ( QApplication::desktop()->width() < 320 )
2121 w = 220; 2127 w = 220;
@@ -2186,7 +2192,7 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd
2186 2192
2187 //qDebug("CalView 1 %i", count); 2193 //qDebug("CalView 1 %i", count);
2188 2194
2189 QProgressBar bar(count,0 ); 2195 Q3ProgressBar bar(count,0 );
2190 int w = 300; 2196 int w = 300;
2191 if ( QApplication::desktop()->width() < 320 ) 2197 if ( QApplication::desktop()->width() < 320 )
2192 w = 220; 2198 w = 220;
@@ -2350,7 +2356,7 @@ void CalendarView::setSyncEventsReadOnly()
2350 2356
2351bool CalendarView::loadCalendars() 2357bool CalendarView::loadCalendars()
2352{ 2358{
2353 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2359 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2354 KopiCalendarFile * cal = calendars.first(); 2360 KopiCalendarFile * cal = calendars.first();
2355 mCalendar->setDefaultCalendar( 1 ); 2361 mCalendar->setDefaultCalendar( 1 );
2356 openCalendar( MainWindow::defaultFileName(), false ); 2362 openCalendar( MainWindow::defaultFileName(), false );
@@ -2364,7 +2370,7 @@ bool CalendarView::loadCalendars()
2364} 2370}
2365bool CalendarView::restoreCalendarSettings() 2371bool CalendarView::restoreCalendarSettings()
2366{ 2372{
2367 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2373 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2368 KopiCalendarFile * cal = calendars.first(); 2374 KopiCalendarFile * cal = calendars.first();
2369 while ( cal ) { 2375 while ( cal ) {
2370 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); 2376 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
@@ -2529,7 +2535,7 @@ void CalendarView::watchSavedFile()
2529} 2535}
2530bool CalendarView::checkAllFileVersions() 2536bool CalendarView::checkAllFileVersions()
2531{ 2537{
2532 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2538 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2533 KopiCalendarFile * cal = calendars.first(); 2539 KopiCalendarFile * cal = calendars.first();
2534 mCalendar->setDefaultCalendar( 1 ); 2540 mCalendar->setDefaultCalendar( 1 );
2535 mCalendar->setDefaultCalendarEnabledOnly(); 2541 mCalendar->setDefaultCalendarEnabledOnly();
@@ -2591,7 +2597,7 @@ bool CalendarView::checkFileVersion(QString fn)
2591} 2597}
2592bool CalendarView::saveCalendars() 2598bool CalendarView::saveCalendars()
2593{ 2599{
2594 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2600 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2595 KopiCalendarFile * cal = calendars.first(); 2601 KopiCalendarFile * cal = calendars.first();
2596 mCalendar->setDefaultCalendar( 1 ); 2602 mCalendar->setDefaultCalendar( 1 );
2597 mCalendar->setDefaultCalendarEnabledOnly(); 2603 mCalendar->setDefaultCalendarEnabledOnly();
@@ -2695,7 +2701,7 @@ void CalendarView::readSettings()
2695#ifndef KORG_NOSPLITTER 2701#ifndef KORG_NOSPLITTER
2696 config->setGroup("KOrganizer Geometry"); 2702 config->setGroup("KOrganizer Geometry");
2697 2703
2698 QValueList<int> sizes = config->readIntListEntry("Separator1"); 2704 Q3ValueList<int> sizes = config->readIntListEntry("Separator1");
2699 if (sizes.count() != 2) { 2705 if (sizes.count() != 2) {
2700 sizes << mDateNavigator->minimumSizeHint().width(); 2706 sizes << mDateNavigator->minimumSizeHint().width();
2701 sizes << 300; 2707 sizes << 300;
@@ -2763,7 +2769,7 @@ void CalendarView::readSettings()
2763 config->setGroup( "Views" ); 2769 config->setGroup( "Views" );
2764 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 2770 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
2765 2771
2766 QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); 2772 Q3ValueList<int> sizes = config->readIntListEntry("Left Splitter Frame");
2767 2773
2768 int resetval = 0; 2774 int resetval = 0;
2769 int maxVal = 0; 2775 int maxVal = 0;
@@ -2842,7 +2848,7 @@ void CalendarView::writeSettings()
2842 writeFilterSettings(config); 2848 writeFilterSettings(config);
2843 config->setGroup( "AppRun" ); 2849 config->setGroup( "AppRun" );
2844 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 2850 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
2845 int days = dt.daysTo( QDate::currentDate() ); 2851 int days = dt.daysTo( (QDateTime)QDate::currentDate() );
2846 dt = dt.addDays( days ); 2852 dt = dt.addDays( days );
2847 int secs = dt.secsTo( QDateTime::currentDateTime() ); 2853 int secs = dt.secsTo( QDateTime::currentDateTime() );
2848 config->writeEntry( "LatestProgramStopDays", days ); 2854 config->writeEntry( "LatestProgramStopDays", days );
@@ -2869,9 +2875,9 @@ void CalendarView::writeSettings()
2869 2875
2870#endif 2876#endif
2871 2877
2872 QValueList<int> listINT = mLeftFrame->sizes(); 2878 Q3ValueList<int> listINT = mLeftFrame->sizes();
2873 config->writeEntry("Left Splitter Frame",listINT); 2879 config->writeEntry("Left Splitter Frame",listINT);
2874 QValueList<int> listINT2 = mMainFrame->sizes(); 2880 Q3ValueList<int> listINT2 = mMainFrame->sizes();
2875 config->writeEntry("Main Splitter Frame",listINT2); 2881 config->writeEntry("Main Splitter Frame",listINT2);
2876#ifdef DESKTOP_VERSION 2882#ifdef DESKTOP_VERSION
2877 config->setGroup("WidgetLayout"); 2883 config->setGroup("WidgetLayout");
@@ -3166,7 +3172,7 @@ void CalendarView::checkConflictForEvent()
3166 return; 3172 return;
3167 } 3173 }
3168 } 3174 }
3169 QPtrList<Event> testlist = mCalendar->events(); 3175 Q3PtrList<Event> testlist = mCalendar->events();
3170 Event * test = testlist.first(); 3176 Event * test = testlist.first();
3171 QDateTime conflict; 3177 QDateTime conflict;
3172 QDateTime retVal; 3178 QDateTime retVal;
@@ -3428,7 +3434,7 @@ void CalendarView::slotSelectPickerDate( QDate d)
3428 3434
3429void CalendarView::removeCategories() 3435void CalendarView::removeCategories()
3430{ 3436{
3431 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 3437 Q3PtrList<Incidence> incList = mCalendar->rawIncidences();
3432 QStringList catList = KOPrefs::instance()->mCustomCategories; 3438 QStringList catList = KOPrefs::instance()->mCustomCategories;
3433 QStringList catIncList; 3439 QStringList catIncList;
3434 QStringList newCatList; 3440 QStringList newCatList;
@@ -3449,7 +3455,7 @@ void CalendarView::removeCategories()
3449 3455
3450int CalendarView::addCategories() 3456int CalendarView::addCategories()
3451{ 3457{
3452 QPtrList<Incidence> incList = mCalendar->rawIncidences(); 3458 Q3PtrList<Incidence> incList = mCalendar->rawIncidences();
3453 QStringList catList = KOPrefs::instance()->mCustomCategories; 3459 QStringList catList = KOPrefs::instance()->mCustomCategories;
3454 QStringList catIncList; 3460 QStringList catIncList;
3455 Incidence* inc = incList.first(); 3461 Incidence* inc = incList.first();
@@ -3507,23 +3513,23 @@ void CalendarView::manageCategories()
3507 3513
3508void CalendarView::beamIncidence(Incidence * Inc) 3514void CalendarView::beamIncidence(Incidence * Inc)
3509{ 3515{
3510 QPtrList<Incidence> delSel ; 3516 Q3PtrList<Incidence> delSel ;
3511 delSel.append(Inc); 3517 delSel.append(Inc);
3512 beamIncidenceList( delSel ); 3518 beamIncidenceList( delSel );
3513} 3519}
3514void CalendarView::beamCalendar() 3520void CalendarView::beamCalendar()
3515{ 3521{
3516 QPtrList<Incidence> delSel = mCalendar->rawIncidences(); 3522 Q3PtrList<Incidence> delSel = mCalendar->rawIncidences();
3517 //qDebug("beamCalendar() "); 3523 //qDebug("beamCalendar() ");
3518 beamIncidenceList( delSel ); 3524 beamIncidenceList( delSel );
3519} 3525}
3520void CalendarView::beamFilteredCalendar() 3526void CalendarView::beamFilteredCalendar()
3521{ 3527{
3522 QPtrList<Incidence> delSel = mCalendar->incidences(); 3528 Q3PtrList<Incidence> delSel = mCalendar->incidences();
3523 //qDebug("beamFilteredCalendar() "); 3529 //qDebug("beamFilteredCalendar() ");
3524 beamIncidenceList( delSel ); 3530 beamIncidenceList( delSel );
3525} 3531}
3526void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) 3532void CalendarView::beamIncidenceList(Q3PtrList<Incidence> delSel )
3527{ 3533{
3528 3534
3529 KOBeamPrefs beamDialog; 3535 KOBeamPrefs beamDialog;
@@ -4315,7 +4321,7 @@ void CalendarView::schedule_publish(Incidence *incidence)
4315 4321
4316 PublishDialog *publishdlg = new PublishDialog(); 4322 PublishDialog *publishdlg = new PublishDialog();
4317 if (incidence->attendeeCount()>0) { 4323 if (incidence->attendeeCount()>0) {
4318 QPtrList<Attendee> attendees = incidence->attendees(); 4324 Q3PtrList<Attendee> attendees = incidence->attendees();
4319 attendees.first(); 4325 attendees.first();
4320 while ( attendees.current()!=0 ) { 4326 while ( attendees.current()!=0 ) {
4321 publishdlg->addAttendee(attendees.current()); 4327 publishdlg->addAttendee(attendees.current());
@@ -4724,7 +4730,7 @@ void CalendarView::showDates(const DateList &selectedDates)
4724 4730
4725} 4731}
4726 4732
4727QPtrList<CalFilter> CalendarView::filters() 4733Q3PtrList<CalFilter> CalendarView::filters()
4728{ 4734{
4729 return mFilters; 4735 return mFilters;
4730 4736
@@ -4765,7 +4771,7 @@ void CalendarView::showFilter(bool visible)
4765 if (visible) { 4771 if (visible) {
4766 mCalEditView->readConfig(); 4772 mCalEditView->readConfig();
4767 mCalEditView->show(); 4773 mCalEditView->show();
4768 QValueList<int> sizes; 4774 Q3ValueList<int> sizes;
4769 sizes = mLeftFrame->sizes(); 4775 sizes = mLeftFrame->sizes();
4770 if ( sizes.count() == 4 && sizes[3] < 20 ) { 4776 if ( sizes.count() == 4 && sizes[3] < 20 ) {
4771 sizes.clear(); 4777 sizes.clear();
@@ -4846,21 +4852,21 @@ void CalendarView::takeOverCalendar()
4846 // TODO: Create Calendar::allIncidences() function and use it here 4852 // TODO: Create Calendar::allIncidences() function and use it here
4847 4853
4848 clearAllViews(); 4854 clearAllViews();
4849 QPtrList<Event> events = mCalendar->events(); 4855 Q3PtrList<Event> events = mCalendar->events();
4850 for(uint i=0; i<events.count(); ++i) { 4856 for(uint i=0; i<events.count(); ++i) {
4851 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 4857 events.at(i)->setOrganizer(KOPrefs::instance()->email());
4852 events.at(i)->recreate(); 4858 events.at(i)->recreate();
4853 events.at(i)->setReadOnly(false); 4859 events.at(i)->setReadOnly(false);
4854 } 4860 }
4855 4861
4856 QPtrList<Todo> todos = mCalendar->todos(); 4862 Q3PtrList<Todo> todos = mCalendar->todos();
4857 for(uint i=0; i<todos.count(); ++i) { 4863 for(uint i=0; i<todos.count(); ++i) {
4858 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 4864 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
4859 todos.at(i)->recreate(); 4865 todos.at(i)->recreate();
4860 todos.at(i)->setReadOnly(false); 4866 todos.at(i)->setReadOnly(false);
4861 } 4867 }
4862 4868
4863 QPtrList<Journal> journals = mCalendar->journals(); 4869 Q3PtrList<Journal> journals = mCalendar->journals();
4864 for(uint i=0; i<journals.count(); ++i) { 4870 for(uint i=0; i<journals.count(); ++i) {
4865 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 4871 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
4866 journals.at(i)->recreate(); 4872 journals.at(i)->recreate();
@@ -4875,7 +4881,7 @@ void CalendarView::showIntro()
4875 kdDebug() << "To be implemented." << endl; 4881 kdDebug() << "To be implemented." << endl;
4876} 4882}
4877 4883
4878QWidgetStack *CalendarView::viewStack() 4884Q3WidgetStack *CalendarView::viewStack()
4879{ 4885{
4880 return mRightFrame; 4886 return mRightFrame;
4881} 4887}
@@ -5060,7 +5066,7 @@ void CalendarView::lookForIncomingMessages()
5060bool CalendarView::removeCompletedSubTodos( Todo* t ) 5066bool CalendarView::removeCompletedSubTodos( Todo* t )
5061{ 5067{
5062 bool deleteTodo = true; 5068 bool deleteTodo = true;
5063 QPtrList<Incidence> subTodos; 5069 Q3PtrList<Incidence> subTodos;
5064 Incidence *aTodo; 5070 Incidence *aTodo;
5065 subTodos = t->relations(); 5071 subTodos = t->relations();
5066 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 5072 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
@@ -5086,8 +5092,8 @@ void CalendarView::purgeCompleted()
5086 5092
5087 if (result == KMessageBox::Continue) { 5093 if (result == KMessageBox::Continue) {
5088 5094
5089 QPtrList<Todo> todoCal; 5095 Q3PtrList<Todo> todoCal;
5090 QPtrList<Todo> rootTodos; 5096 Q3PtrList<Todo> rootTodos;
5091 //QPtrList<Incidence> rel; 5097 //QPtrList<Incidence> rel;
5092 Todo *aTodo; 5098 Todo *aTodo;
5093 todoCal = calendar()->todos(); 5099 todoCal = calendar()->todos();
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 60b1276..b4eada7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -24,13 +24,15 @@
24#ifndef CALENDARVIEW_H 24#ifndef CALENDARVIEW_H
25#define CALENDARVIEW_H 25#define CALENDARVIEW_H
26 26
27#include <qframe.h> 27#include <q3frame.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qwidget.h> 29#include <qwidget.h>
30#include <qptrlist.h> 30#include <q3ptrlist.h>
31#include <qvbox.h> 31#include <q3vbox.h>
32#include <qmap.h> 32#include <qmap.h>
33#include <qscrollbar.h> 33#include <qscrollbar.h>
34//Added by qt3to4:
35#include <QKeyEvent>
34#ifndef DESKTOP_VERSION 36#ifndef DESKTOP_VERSION
35#include <qtopia/ir.h> 37#include <qtopia/ir.h>
36#else 38#else
@@ -47,7 +49,7 @@
47#include <ksyncmanager.h> 49#include <ksyncmanager.h>
48//#include <koprefs.h> 50//#include <koprefs.h>
49 51
50class QWidgetStack; 52class Q3WidgetStack;
51class QSplitter; 53class QSplitter;
52class KopiCalendarFile; 54class KopiCalendarFile;
53class CalPrinter; 55class CalPrinter;
@@ -84,19 +86,19 @@ using namespace KCal;
84 @author Cornelius Schumacher 86 @author Cornelius Schumacher
85*/ 87*/
86 88
87#include <qtextbrowser.h> 89#include <q3textbrowser.h>
88#include <qtextcodec.h> 90#include <qtextcodec.h>
89 91
90class MissedAlarmTextBrowser : public QTextBrowser { 92class MissedAlarmTextBrowser : public Q3TextBrowser {
91 Q_OBJECT 93 Q_OBJECT
92 public: 94 public:
93 MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); 95 MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms ,QDateTime start);
94 ~MissedAlarmTextBrowser(); 96 ~MissedAlarmTextBrowser();
95 void setSource(const QString & n); 97 void setSource(const QString & n);
96 98
97 private: 99 private:
98 Incidence * getNextInc(QDateTime start ); 100 Incidence * getNextInc(QDateTime start );
99 QPtrList<Incidence> mAlarms; 101 Q3PtrList<Incidence> mAlarms;
100 signals: 102 signals:
101 void showIncidence( QString uid); 103 void showIncidence( QString uid);
102}; 104};
@@ -127,7 +129,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
127 QDate startDate(); 129 QDate startDate();
128 QDate endDate(); 130 QDate endDate();
129 131
130 QWidgetStack *viewStack(); 132 Q3WidgetStack *viewStack();
131 QWidget *leftFrame(); 133 QWidget *leftFrame();
132 134
133 DateNavigator *dateNavigator(); 135 DateNavigator *dateNavigator();
@@ -441,7 +443,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
441 443
442 void editFilters(); 444 void editFilters();
443 void toggleFilerEnabled(); 445 void toggleFilerEnabled();
444 QPtrList<CalFilter> filters(); 446 Q3PtrList<CalFilter> filters();
445 void toggleFilter(); 447 void toggleFilter();
446 void showFilter(bool visible); 448 void showFilter(bool visible);
447 void updateFilter(); 449 void updateFilter();
@@ -495,7 +497,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
495 void beamIncidence(Incidence *) ; 497 void beamIncidence(Incidence *) ;
496 void beamCalendar() ; 498 void beamCalendar() ;
497 void beamFilteredCalendar() ; 499 void beamFilteredCalendar() ;
498 void beamIncidenceList(QPtrList<Incidence>) ; 500 void beamIncidenceList(Q3PtrList<Incidence>) ;
499 void manageCategories(); 501 void manageCategories();
500 void editCategories(); 502 void editCategories();
501 int addCategories(); 503 int addCategories();
@@ -575,7 +577,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
575 void setSyncEventsReadOnly(); 577 void setSyncEventsReadOnly();
576 578
577 QDateTime loadedFileVersion; 579 QDateTime loadedFileVersion;
578 void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); 580 void checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete );
579 void checkExternalId( Incidence * inc ); 581 void checkExternalId( Incidence * inc );
580 int mGlobalSyncMode; 582 int mGlobalSyncMode;
581 QString mCurrentSyncDevice; 583 QString mCurrentSyncDevice;
@@ -593,10 +595,10 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
593 QSplitter *mPanner; 595 QSplitter *mPanner;
594 QSplitter *mLeftSplitter; 596 QSplitter *mLeftSplitter;
595 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; 597 KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame;
596 QWidgetStack *mRightFrame; 598 Q3WidgetStack *mRightFrame;
597 599
598 KDatePicker* mDatePicker; 600 KDatePicker* mDatePicker;
599 QVBox* mDateFrame; 601 Q3VBox* mDateFrame;
600 602
601 DateNavigatorContainer *mDateNavigator; // widget showing small month view. 603 DateNavigatorContainer *mDateNavigator; // widget showing small month view.
602 604
@@ -618,7 +620,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
618 KODialogManager *mDialogManager; 620 KODialogManager *mDialogManager;
619 621
620 // Calendar filters 622 // Calendar filters
621 QPtrList<CalFilter> mFilters; 623 Q3PtrList<CalFilter> mFilters;
622 624
623 // various housekeeping variables. 625 // various housekeeping variables.
624 bool mModified; // flag indicating if calendar is modified 626 bool mModified; // flag indicating if calendar is modified
diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp
index 7b7d54c..ecb9e03 100644
--- a/korganizer/calprintbase.cpp
+++ b/korganizer/calprintbase.cpp
@@ -25,11 +25,13 @@
25 25
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qframe.h> 28#include <q3frame.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qptrlist.h> 30#include <q3ptrlist.h>
31#include <qintdict.h> 31#include <q3intdict.h>
32#include <qfontmetrics.h> 32#include <qfontmetrics.h>
33//Added by qt3to4:
34#include <Q3VBoxLayout>
33 35
34#include <kglobal.h> 36#include <kglobal.h>
35#include <klocale.h> 37#include <klocale.h>
@@ -145,8 +147,8 @@ CalPrintBase::~CalPrintBase()
145 147
146QWidget *CalPrintBase::configWidget( QWidget *w ) 148QWidget *CalPrintBase::configWidget( QWidget *w )
147{ 149{
148 QFrame *wdg = new QFrame( w ); 150 Q3Frame *wdg = new Q3Frame( w );
149 QVBoxLayout *layout = new QVBoxLayout( wdg ); 151 Q3VBoxLayout *layout = new Q3VBoxLayout( wdg );
150 152
151 QLabel *title = new QLabel( description(), wdg ); 153 QLabel *title = new QLabel( description(), wdg );
152 QFont titleFont( title->font() ); 154 QFont titleFont( title->font() );
@@ -285,7 +287,7 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
285 p.setFont(QFont("helvetica", 7, QFont::Bold)); 287 p.setFont(QFont("helvetica", 7, QFont::Bold));
286 // int lineSpacing = p.fontMetrics().lineSpacing(); 288 // int lineSpacing = p.fontMetrics().lineSpacing();
287 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); 289 const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
288 p.drawText(x, y, width, height/4, AlignCenter, calSys->monthName( qd ) ); 290 p.drawText(x, y, width, height/4, Qt::AlignCenter, calSys->monthName( qd ) );
289 291
290 int cellWidth = width/7; 292 int cellWidth = width/7;
291 int cellHeight = height/8; 293 int cellHeight = height/8;
@@ -301,7 +303,7 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
301 // tmpStr.sprintf("%c",(const char*)monthDate2.dayName(monthDate2.dayOfWeek())); 303 // tmpStr.sprintf("%c",(const char*)monthDate2.dayName(monthDate2.dayOfWeek()));
302 tmpStr=calSys->weekDayName( monthDate2 )[0].upper(); 304 tmpStr=calSys->weekDayName( monthDate2 )[0].upper();
303 p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight, 305 p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight,
304 AlignCenter, tmpStr); 306 Qt::AlignCenter, tmpStr);
305 monthDate2 = monthDate2.addDays(1); 307 monthDate2 = monthDate2.addDays(1);
306 } 308 }
307 309
@@ -318,7 +320,7 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd,
318 } 320 }
319 p.drawText( x+col*cellWidth, 321 p.drawText( x+col*cellWidth,
320 y+height/4+cellHeight+(row*cellHeight), 322 y+height/4+cellHeight+(row*cellHeight),
321 cellWidth, cellHeight, AlignCenter, 323 cellWidth, cellHeight, Qt::AlignCenter,
322 tmpStr.setNum(monthDate.day()) ); 324 tmpStr.setNum(monthDate.day()) );
323 monthDate = monthDate.addDays(1); 325 monthDate = monthDate.addDays(1);
324 } 326 }
@@ -358,7 +360,7 @@ void CalPrintBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd,
358// p.fillRect( x+1, y+1, 360// p.fillRect( x+1, y+1,
359// width-2, height-2, 361// width-2, height-2,
360// QBrush( Dense7Pattern ) ); 362// QBrush( Dense7Pattern ) );
361 p.drawText( x+5, y, width-10, height, AlignCenter | AlignVCenter, 363 p.drawText( x+5, y, width-10, height, Qt::AlignCenter | Qt::AlignVCenter,
362 calSys->weekDayName( qd ) ); 364 calSys->weekDayName( qd ) );
363} 365}
364 366
@@ -401,16 +403,16 @@ void CalPrintBase::drawTimeLine(QPainter &p,
401 p.setFont(QFont("helvetica", 12, QFont::Bold)); 403 p.setFont(QFont("helvetica", 12, QFont::Bold));
402 } 404 }
403 p.drawText(x+2, (int)currY+2, width/2-2, (int)cellHeight, 405 p.drawText(x+2, (int)currY+2, width/2-2, (int)cellHeight,
404 AlignTop|AlignRight, numStr); 406 Qt::AlignTop|Qt::AlignRight, numStr);
405 p.setFont(QFont("helvetica", 10, QFont::Normal)); 407 p.setFont(QFont("helvetica", 10, QFont::Normal));
406 p.drawText(x+width/2, (int)currY+2, width/2+2, (int)(cellHeight/2)-3, 408 p.drawText(x+width/2, (int)currY+2, width/2+2, (int)(cellHeight/2)-3,
407 AlignTop | AlignLeft, "00"); 409 Qt::AlignTop | Qt::AlignLeft, "00");
408 } else { 410 } else {
409 QTime time( curTime.hour(), 0 ); 411 QTime time( curTime.hour(), 0 );
410 numStr = KGlobal::locale()->formatTime( time ); 412 numStr = KGlobal::locale()->formatTime( time );
411 p.setFont(QFont("helvetica", 14, QFont::Bold)); 413 p.setFont(QFont("helvetica", 14, QFont::Bold));
412 p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3, 414 p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3,
413 AlignTop|AlignLeft, numStr); 415 Qt::AlignTop|Qt::AlignLeft, numStr);
414 } 416 }
415 currY+=cellHeight; 417 currY+=cellHeight;
416 } // enough space for half-hour line and time 418 } // enough space for half-hour line and time
@@ -472,7 +474,7 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
472 p.drawRect( x, offset, width, height ); 474 p.drawRect( x, offset, width, height );
473 475
474 p.drawText( x+5, offset+5, width-10, height-10, 476 p.drawText( x+5, offset+5, width-10, height-10,
475 AlignCenter | AlignVCenter | AlignJustify | WordBreak, 477 Qt::AlignCenter | Qt::AlignVCenter | Qt::AlignJustify | Qt::WordBreak,
476 text ); 478 text );
477 // reset the colors 479 // reset the colors
478 p.setBrush( oldBrush ); 480 p.setBrush( oldBrush );
@@ -493,7 +495,7 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList,
493 if (!multiDayStr.isEmpty()) { 495 if (!multiDayStr.isEmpty()) {
494 // p.fillRect(x+1, offset+1, width-2, height-2, QBrush(Dense5Pattern) ); 496 // p.fillRect(x+1, offset+1, width-2, height-2, QBrush(Dense5Pattern) );
495 p.drawText( x+5, offset+5, width-10, height-10, 497 p.drawText( x+5, offset+5, width-10, height-10,
496 AlignLeft | AlignTop | AlignJustify , 498 Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify ,
497 multiDayStr); 499 multiDayStr);
498 } 500 }
499 } else { 501 } else {
@@ -560,7 +562,7 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
560 // Calculate horizontal positions and widths of events taking into account 562 // Calculate horizontal positions and widths of events taking into account
561 // overlapping events 563 // overlapping events
562 564
563 QPtrList<KOrg::CellItem> cells; 565 Q3PtrList<KOrg::CellItem> cells;
564 cells.setAutoDelete( true ); 566 cells.setAutoDelete( true );
565 567
566 Event::List::ConstIterator itEvents; 568 Event::List::ConstIterator itEvents;
@@ -568,7 +570,7 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
568 cells.append( new PrintCellItem( *itEvents, qd ) ); 570 cells.append( new PrintCellItem( *itEvents, qd ) );
569 } 571 }
570 572
571 QPtrListIterator<KOrg::CellItem> it1( cells ); 573 Q3PtrListIterator<KOrg::CellItem> it1( cells );
572 for( it1.toFirst(); it1.current(); ++it1 ) { 574 for( it1.toFirst(); it1.current(); ++it1 ) {
573 KOrg::CellItem *placeItem = it1.current(); 575 KOrg::CellItem *placeItem = it1.current();
574 576
@@ -593,7 +595,7 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events,
593 p.setBackgroundColor( oldBgColor ); 595 p.setBackgroundColor( oldBgColor );
594 } 596 }
595 597
596 p.setBrush( QBrush( NoBrush ) ); 598 p.setBrush( QBrush( Qt::NoBrush ) );
597} 599}
598 600
599 601
@@ -635,7 +637,7 @@ void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p,
635 p.setPen( pe ); 637 p.setPen( pe );
636 p.drawRect( currentX, currentyPos+1, currentWidth+1, eventLength+1 ); 638 p.drawRect( currentX, currentyPos+1, currentWidth+1, eventLength+1 );
637 p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3, 639 p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3,
638 AlignLeft | AlignTop | AlignJustify | WordBreak, 640 Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify | Qt::TextWordWrap,
639 text); 641 text);
640 // p.restore(); 642 // p.restore();
641 } 643 }
@@ -670,7 +672,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
670 if (!hstring.isEmpty()) { 672 if (!hstring.isEmpty()) {
671 p.setFont( QFont( "helvetica", 8, QFont::Bold, true ) ); 673 p.setFont( QFont( "helvetica", 8, QFont::Bold, true ) );
672 674
673 p.drawText( x+5, y, width-25, mSubHeaderHeight, AlignLeft | AlignVCenter, 675 p.drawText( x+5, y, width-25, mSubHeaderHeight, Qt::AlignLeft | Qt::AlignVCenter,
674 hstring ); 676 hstring );
675 } 677 }
676 p.setFont(QFont("helvetica", 10, QFont::Bold)); 678 p.setFont(QFont("helvetica", 10, QFont::Bold));
@@ -680,7 +682,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
680 if ( fm.width( dayNumStr ) > width -10 ) 682 if ( fm.width( dayNumStr ) > width -10 )
681 dayNumStr = local->formatDate(qd, true); 683 dayNumStr = local->formatDate(qd, true);
682 } 684 }
683 p.drawText(x+5, y, width-10, mSubHeaderHeight, AlignRight | AlignVCenter, 685 p.drawText(x+5, y, width-10, mSubHeaderHeight, Qt::AlignRight | Qt::AlignVCenter,
684 dayNumStr); 686 dayNumStr);
685 Event::List eventList; 687 Event::List eventList;
686 eventList.fill( mCalendar->events( qd, true )); 688 eventList.fill( mCalendar->events( qd, true ));
@@ -724,7 +726,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
724 } // doesFloat 726 } // doesFloat
725 727
726 p.drawText(x+5, y+textY, width-10, lineSpacing, 728 p.drawText(x+5, y+textY, width-10, lineSpacing,
727 AlignLeft|AlignBottom, outStr); 729 Qt::AlignLeft|Qt::AlignBottom, outStr);
728 textY+=lineSpacing; 730 textY+=lineSpacing;
729 } 731 }
730 732
@@ -743,7 +745,7 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd,
743 text += i18n("To-Do: %1").arg(todo->summary()); 745 text += i18n("To-Do: %1").arg(todo->summary());
744 746
745 p.drawText(x+5, y+textY, width-10, lineSpacing, 747 p.drawText(x+5, y+textY, width-10, lineSpacing,
746 AlignLeft|AlignBottom, text); 748 Qt::AlignLeft|Qt::AlignBottom, text);
747 textY+=lineSpacing; 749 textY+=lineSpacing;
748 } 750 }
749 } 751 }
@@ -849,7 +851,7 @@ void CalPrintBase::drawMonth(QPainter &p, const QDate &qd, bool weeknumbers,
849 for (int row = 0; row<rows; row++) { 851 for (int row = 0; row<rows; row++) {
850 int calWeek = weekDate.weekNumber(); 852 int calWeek = weekDate.weekNumber();
851 QRect rc(x, y+yoffset+cellHeight*row, xoffset-1, cellHeight); 853 QRect rc(x, y+yoffset+cellHeight*row, xoffset-1, cellHeight);
852 p.drawText( rc, AlignRight|AlignVCenter, QString::number(calWeek) ); 854 p.drawText( rc, Qt::AlignRight|Qt::AlignVCenter, QString::number(calWeek) );
853 weekDate = weekDate.addDays(7); 855 weekDate = weekDate.addDays(7);
854 } 856 }
855 p.setFont(oldFont); 857 p.setFont(oldFont);
@@ -897,7 +899,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
897 TodoParentStart startpt; 899 TodoParentStart startpt;
898 // This list keeps all starting points of the parent todos so the connection 900 // This list keeps all starting points of the parent todos so the connection
899 // lines of the tree can easily be drawn (needed if a new page is started) 901 // lines of the tree can easily be drawn (needed if a new page is started)
900 static QPtrList<TodoParentStart> startPoints; 902 static Q3PtrList<TodoParentStart> startPoints;
901 if (level<1) { 903 if (level<1) {
902 startPoints.clear(); 904 startPoints.clear();
903 } 905 }
@@ -910,12 +912,12 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
910 outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]"; 912 outStr += " [" +local->formatDate(item->dtDue().date(),true)+"]";
911 } 913 }
912 int left = possummary+(level*10); 914 int left = possummary+(level*10);
913 rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr); 915 rect = p.boundingRect(left, y, (posdue-left-5),-1, Qt::WordBreak, outStr);
914 //qDebug("bottom1 %d ", rect.bottom() ); 916 //qDebug("bottom1 %d ", rect.bottom() );
915 if ( !item->description().isEmpty() && desc ) { 917 if ( !item->description().isEmpty() && desc ) {
916 outStr = item->description(); 918 outStr = item->description();
917 rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1, 919 rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1,
918 WordBreak, outStr ); 920 Qt::WordBreak, outStr );
919 } 921 }
920 //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight ); 922 //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight );
921 // if too big make new page 923 // if too big make new page
@@ -933,8 +935,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
933 start = rct->mRect.bottom() + 1; 935 start = rct->mRect.bottom() + 1;
934 else 936 else
935 start = p.viewport().top(); 937 start = p.viewport().top();
936 p.moveTo( center, start ); 938 p.drawLine( center, start, center, to );
937 p.lineTo( center, to );
938 rct->mSamePage=false; 939 rct->mSamePage=false;
939 } 940 }
940 } 941 }
@@ -951,12 +952,12 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
951 952
952 // Priority 953 // Priority
953 outStr.setNum(priority); 954 outStr.setNum(priority);
954 rect = p.boundingRect(pospriority, y + 10, 5, -1, AlignCenter, outStr); 955 rect = p.boundingRect(pospriority, y + 10, 5, -1, Qt::AlignCenter, outStr);
955 // Make it a more reasonable size 956 // Make it a more reasonable size
956 rect.setWidth(19); 957 rect.setWidth(19);
957 rect.setHeight(19); 958 rect.setHeight(19);
958 if ( priority > 0 && pospriority>=0 ) { 959 if ( priority > 0 && pospriority>=0 ) {
959 p.drawText(rect, AlignCenter, outStr); 960 p.drawText(rect, Qt::AlignCenter, outStr);
960 p.drawRect(rect); 961 p.drawRect(rect);
961 // cross out the rectangle for completed items 962 // cross out the rectangle for completed items
962 if ( item->isCompleted() ) { 963 if ( item->isCompleted() ) {
@@ -964,7 +965,7 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
964 p.drawLine( rect.topRight(), rect.bottomLeft() ); 965 p.drawLine( rect.topRight(), rect.bottomLeft() );
965 } else if (item->cancelled() ) { 966 } else if (item->cancelled() ) {
966 QPen pen = p.pen(); 967 QPen pen = p.pen();
967 p.setPen ( QPen ( black, 2) ); 968 p.setPen ( QPen ( Qt::black, 2) );
968 p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 ); 969 p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 );
969 p.setPen( pen ); 970 p.setPen( pen );
970 } 971 }
@@ -981,9 +982,8 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
981 bottom = 0; 982 bottom = 0;
982 int to( rect.top() + (rect.height()/2)+1 ); 983 int to( rect.top() + (rect.height()/2)+1 );
983 int endx( rect.left() ); 984 int endx( rect.left() );
984 p.moveTo(center, bottom); 985 p.drawLine(center,bottom, center,to);
985 p.lineTo(center, to); 986 p.drawLine(center,to, endx,to);
986 p.lineTo(endx, to);
987 } 987 }
988 988
989 // if completed, use strike out font 989 // if completed, use strike out font
@@ -999,9 +999,9 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
999 outStr += " [" +item->dtDueStr(true)+"]"; 999 outStr += " [" +item->dtDueStr(true)+"]";
1000 } 1000 }
1001 rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)), 1001 rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)),
1002 -1, WordBreak, outStr); 1002 -1, Qt::WordBreak, outStr);
1003 QRect newrect; 1003 QRect newrect;
1004 p.drawText( rect, WordBreak, outStr, -1, &newrect ); 1004 p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect );
1005 //ft.setStrikeOut(false); 1005 //ft.setStrikeOut(false);
1006 // p.setFont(ft); 1006 // p.setFont(ft);
1007 1007
@@ -1016,8 +1016,8 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter &
1016 y=newrect.bottom() + 5; 1016 y=newrect.bottom() + 5;
1017 outStr = item->description(); 1017 outStr = item->description();
1018 rect = p.boundingRect( left+20, y, x+width-(left+10), -1, 1018 rect = p.boundingRect( left+20, y, x+width-(left+10), -1,
1019 WordBreak, outStr ); 1019 Qt::WordBreak, outStr );
1020 p.drawText( rect, WordBreak, outStr, -1, &newrect ); 1020 p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect );
1021 } 1021 }
1022 1022
1023 // Set the new line position 1023 // Set the new line position
@@ -1138,8 +1138,8 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
1138 mSubHeaderHeight+= mSubHeaderHeight; 1138 mSubHeaderHeight+= mSubHeaderHeight;
1139 KLocale *local = KGlobal::locale(); 1139 KLocale *local = KGlobal::locale();
1140 QFont font("helvetica", 18, QFont::Bold); 1140 QFont font("helvetica", 18, QFont::Bold);
1141 QPen penA( black,0); 1141 QPen penA( Qt::black,0);
1142 QPen penB( black,3); 1142 QPen penB( Qt::black,3);
1143 p.setFont(font); 1143 p.setFont(font);
1144 int lineSpacing = p.fontMetrics().lineSpacing(); 1144 int lineSpacing = p.fontMetrics().lineSpacing();
1145 QString title; 1145 QString title;
@@ -1161,7 +1161,7 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
1161 QFontInfo info(p.font()); 1161 QFontInfo info(p.font());
1162 1162
1163 lineSpacing = p.fontMetrics().lineSpacing(); 1163 lineSpacing = p.fontMetrics().lineSpacing();
1164 p.drawText(0, lineSpacing * 0, width, lineSpacing, AlignRight |AlignTop, title ); 1164 p.drawText(0, lineSpacing * 0, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title );
1165 1165
1166 title.truncate(0); 1166 title.truncate(0);
1167 1167
@@ -1171,7 +1171,7 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd,
1171 1171
1172 p.setFont(QFont("Helvetica", 20, QFont::Bold, TRUE)); 1172 p.setFont(QFont("Helvetica", 20, QFont::Bold, TRUE));
1173 title += QString::number(fd.year()); 1173 title += QString::number(fd.year());
1174 p.drawText(0, lineSpacing * 1, width, lineSpacing, AlignRight |AlignTop, title ); 1174 p.drawText(0, lineSpacing * 1, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title );
1175 mSubHeaderHeight = tempStore ; 1175 mSubHeaderHeight = tempStore ;
1176} 1176}
1177 1177
@@ -1197,7 +1197,7 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
1197 p.setPen( Qt::black); 1197 p.setPen( Qt::black);
1198 p.setFont(QFont("helvetica", 12, QFont::Bold, true)); 1198 p.setFont(QFont("helvetica", 12, QFont::Bold, true));
1199 p.drawText(offsetLeft, mHeaderHeight + 5, 1199 p.drawText(offsetLeft, mHeaderHeight + 5,
1200 width, mSubHeaderHeight, AlignHCenter | AlignVCenter, 1200 width, mSubHeaderHeight, Qt::AlignHCenter | Qt::AlignVCenter,
1201 dayName); 1201 dayName);
1202 1202
1203 p.setPen( QPen(Qt::black,2)); 1203 p.setPen( QPen(Qt::black,2));
@@ -1254,10 +1254,10 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width,
1254 p.drawRect(offsetLeft+2, 1+offset+startMinuteOff+startTime*cellHeight, 1254 p.drawRect(offsetLeft+2, 1+offset+startMinuteOff+startTime*cellHeight,
1255 width-4, cheight); 1255 width-4, cheight);
1256 p.drawText(offsetLeft+12, offset+startMinuteOff+startTime*cellHeight+5, width-24, 1256 p.drawText(offsetLeft+12, offset+startMinuteOff+startTime*cellHeight+5, width-24,
1257 cheight-10, AlignHCenter | AlignTop, text); 1257 cheight-10, Qt::AlignHCenter | Qt::AlignTop, text);
1258 } 1258 }
1259 } 1259 }
1260 p.setBrush(QBrush(NoBrush)); 1260 p.setBrush(QBrush(Qt::NoBrush));
1261 mSubHeaderHeight = tempStore ; 1261 mSubHeaderHeight = tempStore ;
1262} 1262}
1263 1263
@@ -1274,12 +1274,12 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
1274 1274
1275 QString numStr; 1275 QString numStr;
1276 for (int i = 0; i < hours; i++) { 1276 for (int i = 0; i < hours; i++) {
1277 p.setPen(QPen(black,1)); 1277 p.setPen(QPen(Qt::black,1));
1278 p.drawLine(0, offset+i*cellHeight, width, offset+i*cellHeight); 1278 p.drawLine(0, offset+i*cellHeight, width, offset+i*cellHeight);
1279 p.setPen(QPen(gray,0)); 1279 p.setPen(QPen(Qt::gray,0));
1280 p.drawLine(37, offset+i*cellHeight+(cellHeight/2), 1280 p.drawLine(37, offset+i*cellHeight+(cellHeight/2),
1281 width, offset+i*cellHeight+(cellHeight/2)); 1281 width, offset+i*cellHeight+(cellHeight/2));
1282 p.setPen(QPen(black,0)); 1282 p.setPen(QPen(Qt::black,0));
1283 1283
1284 if ( !KGlobal::locale()->use12Clock() ) { 1284 if ( !KGlobal::locale()->use12Clock() ) {
1285 numStr.setNum(i+startHour); 1285 numStr.setNum(i+startHour);
@@ -1289,16 +1289,16 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth,
1289 p.setFont(QFont("helvetica", 14, QFont::Bold)); 1289 p.setFont(QFont("helvetica", 14, QFont::Bold));
1290 } 1290 }
1291 p.drawText(0, offset+i*cellHeight, 33, cellHeight/2, 1291 p.drawText(0, offset+i*cellHeight, 33, cellHeight/2,
1292 AlignTop|AlignRight, numStr); 1292 Qt::AlignTop|Qt::AlignRight, numStr);
1293 p.setFont(QFont("helvetica", 12, QFont::Bold)); 1293 p.setFont(QFont("helvetica", 12, QFont::Bold));
1294 p.drawText(37, offset+i*cellHeight, 45, cellHeight/2, 1294 p.drawText(37, offset+i*cellHeight, 45, cellHeight/2,
1295 AlignTop | AlignLeft, "00"); 1295 Qt::AlignTop | Qt::AlignLeft, "00");
1296 } else { 1296 } else {
1297 QTime time( i + startHour, 0 ); 1297 QTime time( i + startHour, 0 );
1298 numStr = KGlobal::locale()->formatTime( time ); 1298 numStr = KGlobal::locale()->formatTime( time );
1299 p.setFont(QFont("helvetica", 12, QFont::Bold)); 1299 p.setFont(QFont("helvetica", 12, QFont::Bold));
1300 p.drawText(4, offset+i*cellHeight, 70, cellHeight/2, 1300 p.drawText(4, offset+i*cellHeight, 70, cellHeight/2,
1301 AlignTop|AlignLeft, numStr); 1301 Qt::AlignTop|Qt::AlignLeft, numStr);
1302 } 1302 }
1303 } mSubHeaderHeight = tempStore ; 1303 } mSubHeaderHeight = tempStore ;
1304} 1304}
diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp
index 0cdf28e..d4bf988 100644
--- a/korganizer/calprinter.cpp
+++ b/korganizer/calprinter.cpp
@@ -21,15 +21,18 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qvbuttongroup.h> 24// #include <qvbuttongroup.h>
25#include <qwidgetstack.h> 25#include <q3widgetstack.h>
26#include <qradiobutton.h> 26#include <qradiobutton.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qcombobox.h> 29#include <qcombobox.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qvbox.h> 31#include <q3vbox.h>
32#include <qsplitter.h> 32#include <qsplitter.h>
33//Added by qt3to4:
34#include <Q3GridLayout>
35#include <Q3PtrList>
33 36
34#include <kprinter.h> 37#include <kprinter.h>
35#include <kglobal.h> 38#include <kglobal.h>
@@ -174,14 +177,14 @@ void CalPrinter::updateConfig()
174 177
175/****************************************************************************/ 178/****************************************************************************/
176 179
177CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, 180CalPrintDialog::CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p,
178 QWidget *parent, const char *name ) 181 QWidget *parent, const char *name )
179 : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ), 182 : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ),
180 mPrinter( p ), mPrintPlugins( plugins ) 183 mPrinter( p ), mPrintPlugins( plugins )
181{ 184{
182 QVBox *page = new QVBox(this);//makeVBoxMainWidget(); 185 Q3VBox *page = new Q3VBox(this);//makeVBoxMainWidget();
183 setMainWidget( page ); 186 setMainWidget( page );
184 QHBox *printerLayout = new QHBox( page ); 187 Q3HBox *printerLayout = new Q3HBox( page );
185 188
186 mPrinterLabel = new QLabel( printerLayout ); 189 mPrinterLabel = new QLabel( printerLayout );
187 QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."), 190 QPushButton *setupButton = new QPushButton( i18n("&Setup Printer..."),
@@ -191,20 +194,20 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p,
191 0, 0, setupButton->sizePolicy().hasHeightForWidth() ) ); 194 0, 0, setupButton->sizePolicy().hasHeightForWidth() ) );
192 195
193 QSplitter *splitter = new QSplitter( page ); 196 QSplitter *splitter = new QSplitter( page );
194 splitter->setOrientation( QSplitter::Horizontal ); 197 splitter->setOrientation( Qt::Horizontal );
195 198
196 mTypeGroup = new QVButtonGroup( i18n("View Type"), splitter, "buttonGroup" ); 199 mTypeGroup = new Q3VButtonGroup( i18n("View Type"), splitter, "buttonGroup" );
197 // use the minimal width possible = max width of the radio buttons, not extensible 200 // use the minimal width possible = max width of the radio buttons, not extensible
198/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, 201/* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4,
199 (QSizePolicy::SizeType)5, 0, 0, 202 (QSizePolicy::SizeType)5, 0, 0,
200 mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/ 203 mTypeGroup->sizePolicy().hasHeightForWidth() ) );*/
201 204
202 QWidget *splitterRight = new QWidget( splitter, "splitterRight" ); 205 QWidget *splitterRight = new QWidget( splitter, "splitterRight" );
203 QGridLayout *splitterRightLayout = new QGridLayout( splitterRight ); 206 Q3GridLayout *splitterRightLayout = new Q3GridLayout( splitterRight );
204 splitterRightLayout->setMargin( marginHint() ); 207 splitterRightLayout->setMargin( marginHint() );
205 splitterRightLayout->setSpacing( spacingHint() ); 208 splitterRightLayout->setSpacing( spacingHint() );
206 209
207 mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" ); 210 mConfigArea = new Q3WidgetStack( splitterRight, "configWidgetStack" );
208 splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 ); 211 splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 );
209 212
210 QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"), 213 QLabel *orientationLabel = new QLabel( i18n("Page &orientation:"),
diff --git a/korganizer/calprinter.h b/korganizer/calprinter.h
index 7b58f4f..e065779 100644
--- a/korganizer/calprinter.h
+++ b/korganizer/calprinter.h
@@ -1,3 +1,5 @@
1//Added by qt3to4:
2#include <QLabel>
1/* 3/*
2 This file is part of KOrganizer. 4 This file is part of KOrganizer.
3 5
@@ -28,7 +30,7 @@
28 30
29#ifndef KORG_NOPRINTER 31#ifndef KORG_NOPRINTER
30 32
31#include <qptrlist.h> 33#include <q3ptrlist.h>
32 34
33#include <kdialogbase.h> 35#include <kdialogbase.h>
34 36
@@ -38,8 +40,8 @@
38 40
39using namespace KCal; 41using namespace KCal;
40 42
41class QVButtonGroup; 43class Q3VButtonGroup;
42class QWidgetStack; 44class Q3WidgetStack;
43class KPrinter; 45class KPrinter;
44class CalPrintDialog; 46class CalPrintDialog;
45class KConfig; 47class KConfig;
@@ -94,7 +96,7 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase
94 void print( PrintType type, const QDate &fd, const QDate &td ); 96 void print( PrintType type, const QDate &fd, const QDate &td );
95 97
96 protected: 98 protected:
97 QPtrList<CalPrintBase> mPrintPlugins; 99 Q3PtrList<CalPrintBase> mPrintPlugins;
98 100
99 private: 101 private:
100 KPrinter *mPrinter; 102 KPrinter *mPrinter;
@@ -109,7 +111,7 @@ class CalPrintDialog : public KDialogBase
109{ 111{
110 Q_OBJECT 112 Q_OBJECT
111 public: 113 public:
112 CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, 114 CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p,
113 QWidget *parent = 0, const char *name = 0 ); 115 QWidget *parent = 0, const char *name = 0 );
114 virtual ~CalPrintDialog(); 116 virtual ~CalPrintDialog();
115 CalPrintBase *selectedPlugin(); 117 CalPrintBase *selectedPlugin();
@@ -127,9 +129,9 @@ signals:
127 void okClicked(); 129 void okClicked();
128 private: 130 private:
129 KPrinter *mPrinter; 131 KPrinter *mPrinter;
130 QVButtonGroup *mTypeGroup; 132 Q3VButtonGroup *mTypeGroup;
131 QWidgetStack *mConfigArea; 133 Q3WidgetStack *mConfigArea;
132 QPtrList<CalPrintBase> mPrintPlugins; 134 Q3PtrList<CalPrintBase> mPrintPlugins;
133 QLabel *mPrinterLabel; 135 QLabel *mPrinterLabel;
134 QString mPreviewText; 136 QString mPreviewText;
135 QComboBox *mOrientationSelection; 137 QComboBox *mOrientationSelection;
diff --git a/korganizer/calprintplugins.cpp b/korganizer/calprintplugins.cpp
index bc35ca4..9b6dc6e 100644
--- a/korganizer/calprintplugins.cpp
+++ b/korganizer/calprintplugins.cpp
@@ -25,11 +25,11 @@
25*/ 25*/
26 26
27#include <qpainter.h> 27#include <qpainter.h>
28#include <qdatetimeedit.h> 28#include <q3datetimeedit.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qcheckbox.h> 30#include <qcheckbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qbuttongroup.h> 32#include <q3buttongroup.h>
33 33
34#include <kglobal.h> 34#include <kglobal.h>
35#include <klocale.h> 35#include <klocale.h>
diff --git a/korganizer/cellitem.cpp b/korganizer/cellitem.cpp
index 61d06ac..1fd703c 100644
--- a/korganizer/cellitem.cpp
+++ b/korganizer/cellitem.cpp
@@ -27,7 +27,9 @@
27#include <klocale.h> 27#include <klocale.h>
28#include <kdebug.h> 28#include <kdebug.h>
29 29
30#include <qintdict.h> 30#include <q3intdict.h>
31//Added by qt3to4:
32#include <Q3PtrList>
31 33
32using namespace KOrg; 34using namespace KOrg;
33 35
@@ -36,17 +38,17 @@ QString CellItem::label() const
36 return i18n("<undefined>"); 38 return i18n("<undefined>");
37} 39}
38 40
39QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, 41Q3PtrList<CellItem> CellItem::placeItem( Q3PtrList<CellItem> cells,
40 CellItem *placeItem ) 42 CellItem *placeItem )
41{ 43{
42 kdDebug(5855) << "Placing " << placeItem->label() << endl; 44 kdDebug(5855) << "Placing " << placeItem->label() << endl;
43 45
44 QPtrList<KOrg::CellItem> conflictItems; 46 Q3PtrList<KOrg::CellItem> conflictItems;
45 int maxSubCells = 0; 47 int maxSubCells = 0;
46 QIntDict<KOrg::CellItem> subCellDict; 48 Q3IntDict<KOrg::CellItem> subCellDict;
47 49
48 // Find all items which are in same cell 50 // Find all items which are in same cell
49 QPtrListIterator<KOrg::CellItem> it2( cells ); 51 Q3PtrListIterator<KOrg::CellItem> it2( cells );
50 for( it2.toFirst(); it2.current(); ++it2 ) { 52 for( it2.toFirst(); it2.current(); ++it2 ) {
51 KOrg::CellItem *item = it2.current(); 53 KOrg::CellItem *item = it2.current();
52 if ( item == placeItem ) continue; 54 if ( item == placeItem ) continue;
@@ -83,7 +85,7 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells,
83 conflictItems.append( placeItem ); 85 conflictItems.append( placeItem );
84 placeItem->setSubCells( maxSubCells ); 86 placeItem->setSubCells( maxSubCells );
85 87
86 QPtrListIterator<KOrg::CellItem> it3( conflictItems ); 88 Q3PtrListIterator<KOrg::CellItem> it3( conflictItems );
87 for( it3.toFirst(); it3.current(); ++it3 ) { 89 for( it3.toFirst(); it3.current(); ++it3 ) {
88 (*it3)->setSubCells( maxSubCells ); 90 (*it3)->setSubCells( maxSubCells );
89 } 91 }
diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h
index 72773d0..b917bd5 100644
--- a/korganizer/cellitem.h
+++ b/korganizer/cellitem.h
@@ -25,7 +25,7 @@
25#define KORG_CELLITEM_H 25#define KORG_CELLITEM_H
26 26
27#include <qstring.h> 27#include <qstring.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30namespace KOrg { 30namespace KOrg {
31 31
@@ -53,7 +53,7 @@ class CellItem
53 53
54 \return Placed items 54 \return Placed items
55 */ 55 */
56 static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells, 56 static Q3PtrList<CellItem> placeItem( Q3PtrList<CellItem> cells,
57 CellItem *placeItem ); 57 CellItem *placeItem );
58 58
59 private: 59 private:
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index ea510f1..53507d3 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -34,6 +34,8 @@
34 34
35#include "datenavigatorcontainer.h" 35#include "datenavigatorcontainer.h"
36#include "koprefs.h" 36#include "koprefs.h"
37//Added by qt3to4:
38#include <QResizeEvent>
37 39
38DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, 40DateNavigatorContainer::DateNavigatorContainer( QWidget *parent,
39 const char *name ) 41 const char *name )
diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h
index 87cc59f..75d387c 100644
--- a/korganizer/datenavigatorcontainer.h
+++ b/korganizer/datenavigatorcontainer.h
@@ -1,3 +1,6 @@
1//Added by qt3to4:
2#include <QResizeEvent>
3#include <Q3PtrList>
1/* 4/*
2 This file is part of KOrganizer. 5 This file is part of KOrganizer.
3 6
@@ -100,7 +103,7 @@ class DateNavigatorContainer: public QWidget
100 103
101 KCal::Calendar *mCalendar; 104 KCal::Calendar *mCalendar;
102 105
103 QPtrList<KDateNavigator> mExtraViews; 106 Q3PtrList<KDateNavigator> mExtraViews;
104 107
105 int mHorizontalCount; 108 int mHorizontalCount;
106 int mVerticalCount; 109 int mVerticalCount;
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp
index 505edf6..9425963 100644
--- a/korganizer/filteredit_base.cpp
+++ b/korganizer/filteredit_base.cpp
@@ -11,42 +11,47 @@
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qpushbutton.h> 13#include <qpushbutton.h>
14#include <qframe.h> 14#include <q3frame.h>
15#include <qbuttongroup.h> 15#include <q3buttongroup.h>
16#include <qapplication.h> 16#include <qapplication.h>
17#include <QDesktopWidget>
17#include <qradiobutton.h> 18#include <qradiobutton.h>
18#include <qlistbox.h> 19#include <q3listbox.h>
19#include <qlabel.h> 20#include <qlabel.h>
20#include <qcheckbox.h> 21#include <qcheckbox.h>
21#include <qlayout.h> 22#include <qlayout.h>
22#include <qtooltip.h> 23#include <qtooltip.h>
23#include <qwhatsthis.h> 24#include <q3whatsthis.h>
25//Added by qt3to4:
26#include <Q3GridLayout>
27#include <Q3HBoxLayout>
28#include <Q3VBoxLayout>
24#include "tr.h" 29#include "tr.h"
25 30
26/* 31/*
27 * Constructs a FilterEdit_base as a child of 'parent', with the 32 * Constructs a FilterEdit_base as a child of 'parent', with the
28 * name 'name' and widget flags set to 'f'. 33 * name 'name' and widget flags set to 'f'.
29 */ 34 */
30FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) 35FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, Qt::WFlags fl )
31 : QWidget( parent, name, fl ) 36 : QWidget( parent, name, fl )
32{ 37{
33 if ( !name ) 38 if ( !name )
34 setName( "FilterEdit_base" ); 39 setName( "FilterEdit_base" );
35 FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); 40 FilterEdit_baseLayout = new Q3VBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
36 41
37 mCriteriaFrame = new QFrame( this, "mCriteriaFrame" ); 42 mCriteriaFrame = new Q3Frame( this, "mCriteriaFrame" );
38 mCriteriaFrame->setFrameShape( QFrame::StyledPanel ); 43 mCriteriaFrame->setFrameShape( Q3Frame::StyledPanel );
39 mCriteriaFrame->setFrameShadow( QFrame::Raised ); 44 mCriteriaFrame->setFrameShadow( Q3Frame::Raised );
40 mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout"); 45 mCriteriaFrameLayout = new Q3VBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
41 46
42 ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" ); 47 ButtonGroup1 = new Q3ButtonGroup( mCriteriaFrame, "ButtonGroup1" );
43 ButtonGroup1->setColumnLayout(0, Qt::Vertical ); 48 ButtonGroup1->setColumnLayout(0, Qt::Vertical );
44 ButtonGroup1->layout()->setSpacing( 6 ); 49 ButtonGroup1->layout()->setSpacing( 6 );
45 ButtonGroup1->layout()->setMargin( 6 ); 50 ButtonGroup1->layout()->setMargin( 6 );
46 ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() ); 51 ButtonGroup1Layout = new Q3GridLayout( ButtonGroup1->layout() );
47 ButtonGroup1Layout->setAlignment( Qt::AlignTop ); 52 ButtonGroup1Layout->setAlignment( Qt::AlignTop );
48 53
49 layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 54 layout4 = new Q3HBoxLayout( 0, 0, 6, "layout4");
50 55
51 mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" ); 56 mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" );
52 layout4->addWidget( mCatShowCheck ); 57 layout4->addWidget( mCatShowCheck );
@@ -59,12 +64,12 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
59 64
60 ButtonGroup1Layout->addLayout( layout4, 0, 0 ); 65 ButtonGroup1Layout->addLayout( layout4, 0, 0 );
61 66
62 mCatList = new QListBox( ButtonGroup1, "mCatList" ); 67 mCatList = new Q3ListBox( ButtonGroup1, "mCatList" );
63 68
64 ButtonGroup1Layout->addWidget( mCatList, 1, 0 ); 69 ButtonGroup1Layout->addWidget( mCatList, 1, 0 );
65 mCriteriaFrameLayout->addWidget( ButtonGroup1 ); 70 mCriteriaFrameLayout->addWidget( ButtonGroup1 );
66 71
67 layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); 72 layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7");
68 73
69 textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" ); 74 textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" );
70 layout7->addWidget( textLabel1 ); 75 layout7->addWidget( textLabel1 );
@@ -76,7 +81,7 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
76 layout7->addWidget( mCompletedCheck ); 81 layout7->addWidget( mCompletedCheck );
77 mCriteriaFrameLayout->addLayout( layout7 ); 82 mCriteriaFrameLayout->addLayout( layout7 );
78 83
79 layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); 84 layout9 = new Q3HBoxLayout( 0, 0, 6, "layout9");
80 85
81 textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" ); 86 textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" );
82 layout9->addWidget( textLabel1_2 ); 87 layout9->addWidget( textLabel1_2 );
@@ -91,7 +96,7 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
91 layout9->addWidget( mJournalCheck ); 96 layout9->addWidget( mJournalCheck );
92 mCriteriaFrameLayout->addLayout( layout9 ); 97 mCriteriaFrameLayout->addLayout( layout9 );
93 98
94 layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); 99 layout2 = new Q3HBoxLayout( 0, 0, 0, "layout2");
95 100
96 textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" ); 101 textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" );
97 layout2->addWidget( textLabel2 ); 102 layout2->addWidget( textLabel2 );
@@ -109,7 +114,6 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
109 FilterEdit_baseLayout->addWidget( mCriteriaFrame ); 114 FilterEdit_baseLayout->addWidget( mCriteriaFrame );
110 languageChange(); 115 languageChange();
111 resize( QSize(300, 200).expandedTo(minimumSizeHint()) ); 116 resize( QSize(300, 200).expandedTo(minimumSizeHint()) );
112 clearWState( WState_Polished );
113} 117}
114 118
115/* 119/*
diff --git a/korganizer/filteredit_base.h b/korganizer/filteredit_base.h
index 13a02c3..135f6fa 100644
--- a/korganizer/filteredit_base.h
+++ b/korganizer/filteredit_base.h
@@ -12,17 +12,23 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qwidget.h> 14#include <qwidget.h>
15//Added by qt3to4:
16#include <Q3VBoxLayout>
17#include <Q3Frame>
18#include <Q3GridLayout>
19#include <Q3HBoxLayout>
20#include <QLabel>
15 21
16class QVBoxLayout; 22class Q3VBoxLayout;
17class QHBoxLayout; 23class Q3HBoxLayout;
18class QGridLayout; 24class Q3GridLayout;
19class QSpacerItem; 25class QSpacerItem;
20class QFrame; 26class Q3Frame;
21class QButtonGroup; 27class Q3ButtonGroup;
22class QRadioButton; 28class QRadioButton;
23class QPushButton; 29class QPushButton;
24class QListBox; 30class Q3ListBox;
25class QListBoxItem; 31class Q3ListBoxItem;
26class QLabel; 32class QLabel;
27class QCheckBox; 33class QCheckBox;
28 34
@@ -31,15 +37,15 @@ class FilterEdit_base : public QWidget
31 Q_OBJECT 37 Q_OBJECT
32 38
33public: 39public:
34 FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 40 FilterEdit_base( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 );
35 ~FilterEdit_base(); 41 ~FilterEdit_base();
36 42
37 QFrame* mCriteriaFrame; 43 Q3Frame* mCriteriaFrame;
38 QButtonGroup* ButtonGroup1; 44 Q3ButtonGroup* ButtonGroup1;
39 QRadioButton* mCatShowCheck; 45 QRadioButton* mCatShowCheck;
40 QRadioButton* mCatHideCheck; 46 QRadioButton* mCatHideCheck;
41 QPushButton* mCatEditButton; 47 QPushButton* mCatEditButton;
42 QListBox* mCatList; 48 Q3ListBox* mCatList;
43 QLabel* textLabel1; 49 QLabel* textLabel1;
44 QCheckBox* mRecurringCheck; 50 QCheckBox* mRecurringCheck;
45 QCheckBox* mCompletedCheck; 51 QCheckBox* mCompletedCheck;
@@ -53,13 +59,13 @@ public:
53 QCheckBox* mConfidentialCheck; 59 QCheckBox* mConfidentialCheck;
54 60
55protected: 61protected:
56 QVBoxLayout* FilterEdit_baseLayout; 62 Q3VBoxLayout* FilterEdit_baseLayout;
57 QVBoxLayout* mCriteriaFrameLayout; 63 Q3VBoxLayout* mCriteriaFrameLayout;
58 QGridLayout* ButtonGroup1Layout; 64 Q3GridLayout* ButtonGroup1Layout;
59 QHBoxLayout* layout4; 65 Q3HBoxLayout* layout4;
60 QHBoxLayout* layout7; 66 Q3HBoxLayout* layout7;
61 QHBoxLayout* layout9; 67 Q3HBoxLayout* layout9;
62 QHBoxLayout* layout2; 68 Q3HBoxLayout* layout2;
63 69
64protected slots: 70protected slots:
65 virtual void languageChange(); 71 virtual void languageChange();
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index df84911..a3cff49 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -26,8 +26,13 @@
26#include <qcombobox.h> 26#include <qcombobox.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29#include <qlistbox.h> 29#include <q3listbox.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <Q3GridLayout>
33#include <Q3PtrList>
34
35#include <QDesktopWidget>
31 36
32#include <kdebug.h> 37#include <kdebug.h>
33#include <klocale.h> 38#include <klocale.h>
@@ -53,7 +58,7 @@ public:
53 58
54}; 59};
55 60
56FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, 61FilterEditDialog::FilterEditDialog(Q3PtrList<CalFilter> *filters,QWidget *parent,
57 const char *name) : 62 const char *name) :
58 KDialogBase(parent,name,true,i18n("Edit Calendar Filters"), 63 KDialogBase(parent,name,true,i18n("Edit Calendar Filters"),
59 Ok|Apply|Cancel) 64 Ok|Apply|Cancel)
@@ -80,7 +85,7 @@ FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent,
80 85
81 mEditor = new FilterEdit_base(mainWidget); 86 mEditor = new FilterEdit_base(mainWidget);
82 87
83 QGridLayout *topLayout = new QGridLayout(mainWidget,2,2); 88 Q3GridLayout *topLayout = new Q3GridLayout(mainWidget,2,2);
84 topLayout->setSpacing(spacingHint()); 89 topLayout->setSpacing(spacingHint());
85 topLayout->addWidget(mSelectionCombo,0,0); 90 topLayout->addWidget(mSelectionCombo,0,0);
86 topLayout->addWidget(upButton,0,1); 91 topLayout->addWidget(upButton,0,1);
diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h
index 42aa3da..c1a52ed 100644
--- a/korganizer/filtereditdialog.h
+++ b/korganizer/filtereditdialog.h
@@ -23,7 +23,7 @@
23#ifndef _FILTEREDITDIALOG_H 23#ifndef _FILTEREDITDIALOG_H
24#define _FILTEREDITDIALOG_H 24#define _FILTEREDITDIALOG_H
25 25
26#include <qptrlist.h> 26#include <q3ptrlist.h>
27 27
28#include <kdialogbase.h> 28#include <kdialogbase.h>
29 29
@@ -46,7 +46,7 @@ class FilterEditDialog : public KDialogBase
46{ 46{
47 Q_OBJECT 47 Q_OBJECT
48 public: 48 public:
49 FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0); 49 FilterEditDialog(Q3PtrList<CalFilter> *,QWidget *parent=0, const char *name=0);
50 virtual ~FilterEditDialog(); 50 virtual ~FilterEditDialog();
51 51
52 public slots: 52 public slots:
@@ -74,7 +74,7 @@ class FilterEditDialog : public KDialogBase
74 void writeFilter(CalFilter *); 74 void writeFilter(CalFilter *);
75 75
76 private: 76 private:
77 QPtrList<CalFilter> *mFilters; 77 Q3PtrList<CalFilter> *mFilters;
78 78
79 ComboFilterBox *mSelectionCombo; 79 ComboFilterBox *mSelectionCombo;
80 QPushButton *mRemoveButton; 80 QPushButton *mRemoveButton;
diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp
index fe78356..c2402d4 100644
--- a/korganizer/incomingdialog.cpp
+++ b/korganizer/incomingdialog.cpp
@@ -17,10 +17,12 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qlistview.h> 20#include <q3listview.h>
21#include <qfile.h> 21#include <qfile.h>
22#include <qdir.h> 22#include <qdir.h>
23#include <qmap.h> 23#include <qmap.h>
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25#include <kglobal.h> 27#include <kglobal.h>
26#include <klocale.h> 28#include <klocale.h>
@@ -56,9 +58,9 @@
56#endif 58#endif
57 59
58 60
59ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev, 61ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,
60 Scheduler::Method method,ScheduleMessage::Status status) 62 Scheduler::Method method,ScheduleMessage::Status status)
61 : QListViewItem(parent) 63 : Q3ListViewItem(parent)
62{ 64{
63 mIncidence = ev; 65 mIncidence = ev;
64 mMethod = method; 66 mMethod = method;
@@ -135,7 +137,7 @@ bool ScheduleItemVisitor::visit(Journal *)
135 * TRUE to construct a modal dialog. 137 * TRUE to construct a modal dialog.
136 */ 138 */
137IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, 139IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
138 QWidget* parent,const char* name,bool modal,WFlags fl) : 140 QWidget* parent,const char* name,bool modal,Qt::WFlags fl) :
139 IncomingDialog_base(parent,name,modal,fl) 141 IncomingDialog_base(parent,name,modal,fl)
140{ 142{
141 mCalendar = calendar; 143 mCalendar = calendar;
@@ -145,12 +147,12 @@ IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
145#else 147#else
146 mScheduler = new DummyScheduler(mCalendar); 148 mScheduler = new DummyScheduler(mCalendar);
147#endif 149#endif
148 mMessageListView->setColumnAlignment(1,AlignHCenter); 150 mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
149 mMessageListView->setColumnAlignment(2,AlignHCenter); 151 mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
150 mMessageListView->setColumnAlignment(3,AlignHCenter); 152 mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
151 mMessageListView->setColumnAlignment(4,AlignHCenter); 153 mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
152 QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), 154 QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
153 this,SLOT(showEvent(QListViewItem *))); 155 this,SLOT(showEvent(Q3ListViewItem *)));
154 retrieve(); 156 retrieve();
155} 157}
156 158
@@ -169,7 +171,7 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing)
169 171
170void IncomingDialog::retrieve() 172void IncomingDialog::retrieve()
171{ 173{
172 QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); 174 Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions();
173 175
174 ScheduleMessage *message; 176 ScheduleMessage *message;
175 for(message = messages.first();message;message = messages.next()) { 177 for(message = messages.first();message;message = messages.next()) {
@@ -252,7 +254,7 @@ void IncomingDialog::rejectMessage()
252 } 254 }
253} 255}
254 256
255void IncomingDialog::showEvent(QListViewItem *item) 257void IncomingDialog::showEvent(Q3ListViewItem *item)
256{ 258{
257 IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); 259 IncidenceBase *incidence = ((ScheduleItemIn *)item)->event();
258 if( incidence && incidence->typeID() == eventID ) { 260 if( incidence && incidence->typeID() == eventID ) {
@@ -269,7 +271,7 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item)
269 if (ev) { 271 if (ev) {
270 //user interaction before?? 272 //user interaction before??
271 Attendee *att; 273 Attendee *att;
272 QPtrList<Attendee> attlist = ev->attendees(); 274 Q3PtrList<Attendee> attlist = ev->attendees();
273 for (att=attlist.first(); att; att=attlist.next()) { 275 for (att=attlist.first(); att; att=attlist.next()) {
274 Event *event = new Event(*ev); 276 Event *event = new Event(*ev);
275 mOutgoing->addMessage(event,Scheduler::Request,att->email()); 277 mOutgoing->addMessage(event,Scheduler::Request,att->email());
@@ -514,7 +516,7 @@ bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc)
514#ifndef KORG_NOKABC 516#ifndef KORG_NOKABC
515 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 517 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
516 KABC::Addressee::List addressList; 518 KABC::Addressee::List addressList;
517 QPtrList <Attendee> attendees; 519 Q3PtrList <Attendee> attendees;
518 Attendee *att; 520 Attendee *att;
519 attendees = inc->attendees(); 521 attendees = inc->attendees();
520 for (att=attendees.first();att;att=attendees.next()) { 522 for (att=attendees.first();att;att=attendees.next()) {
diff --git a/korganizer/incomingdialog.h b/korganizer/incomingdialog.h
index 413ce6a..e002b25 100644
--- a/korganizer/incomingdialog.h
+++ b/korganizer/incomingdialog.h
@@ -19,7 +19,7 @@
19#ifndef INCOMINGDIALOG_H 19#ifndef INCOMINGDIALOG_H
20#define INCOMINGDIALOG_H 20#define INCOMINGDIALOG_H
21 21
22#include <qlistview.h> 22#include <q3listview.h>
23 23
24#include <libkcal/calendar.h> 24#include <libkcal/calendar.h>
25#include <libkcal/scheduler.h> 25#include <libkcal/scheduler.h>
@@ -29,10 +29,10 @@
29 29
30using namespace KCal; 30using namespace KCal;
31 31
32class ScheduleItemIn : public QListViewItem 32class ScheduleItemIn : public Q3ListViewItem
33{ 33{
34 public: 34 public:
35 ScheduleItemIn(QListView *parent,IncidenceBase *ev,Scheduler::Method method, 35 ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,Scheduler::Method method,
36 ScheduleMessage::Status status); 36 ScheduleMessage::Status status);
37 virtual ~ScheduleItemIn() {} 37 virtual ~ScheduleItemIn() {}
38 38
@@ -72,7 +72,7 @@ class IncomingDialog : public IncomingDialog_base
72 Q_OBJECT 72 Q_OBJECT
73 public: 73 public:
74 IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, 74 IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing,
75 QWidget* parent=0,const char* name=0,bool modal=false,WFlags fl=0); 75 QWidget* parent=0,const char* name=0,bool modal=false,Qt::WFlags fl=0);
76 ~IncomingDialog(); 76 ~IncomingDialog();
77 77
78 void setOutgoingDialog(OutgoingDialog *outgoing); 78 void setOutgoingDialog(OutgoingDialog *outgoing);
@@ -87,7 +87,7 @@ class IncomingDialog : public IncomingDialog_base
87 void acceptAllMessages(); 87 void acceptAllMessages();
88 void acceptMessage(); 88 void acceptMessage();
89 void rejectMessage(); 89 void rejectMessage();
90 void showEvent(QListViewItem *); 90 void showEvent(Q3ListViewItem *);
91 91
92 protected: 92 protected:
93 bool acceptMessage(ScheduleItemIn *item); 93 bool acceptMessage(ScheduleItemIn *item);
diff --git a/korganizer/incomingdialog_base.cpp b/korganizer/incomingdialog_base.cpp
index 8589803..5c5ace4 100644
--- a/korganizer/incomingdialog_base.cpp
+++ b/korganizer/incomingdialog_base.cpp
@@ -11,12 +11,14 @@
11#include "incomingdialog_base.h" 11#include "incomingdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlistview.h> 15#include <q3listview.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlayout.h> 17#include <qlayout.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <q3whatsthis.h>
20//Added by qt3to4:
21#include <Q3GridLayout>
20 22
21/* 23/*
22 * Constructs a IncomingDialog_base as a child of 'parent', with the 24 * Constructs a IncomingDialog_base as a child of 'parent', with the
@@ -25,13 +27,13 @@
25 * The dialog will by default be modeless, unless you set 'modal' to 27 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog. 28 * TRUE to construct a modal dialog.
27 */ 29 */
28IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 30IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
29 : QDialog( parent, name, modal, fl ) 31 : QDialog( parent, name, modal, fl )
30 32
31{ 33{
32 if ( !name ) 34 if ( !name )
33 setName( "IncomingDialog_base" ); 35 setName( "IncomingDialog_base" );
34 IncomingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout"); 36 IncomingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout");
35 37
36 PushButton4 = new QPushButton( this, "PushButton4" ); 38 PushButton4 = new QPushButton( this, "PushButton4" );
37 39
@@ -42,7 +44,7 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo
42 44
43 IncomingDialog_baseLayout->addWidget( PushButton7, 5, 1 ); 45 IncomingDialog_baseLayout->addWidget( PushButton7, 5, 1 );
44 46
45 mMessageListView = new QListView( this, "mMessageListView" ); 47 mMessageListView = new Q3ListView( this, "mMessageListView" );
46 mMessageListView->addColumn( tr2i18n( "Summary" ) ); 48 mMessageListView->addColumn( tr2i18n( "Summary" ) );
47 mMessageListView->addColumn( tr2i18n( "Start Date" ) ); 49 mMessageListView->addColumn( tr2i18n( "Start Date" ) );
48 mMessageListView->addColumn( tr2i18n( "Start Time" ) ); 50 mMessageListView->addColumn( tr2i18n( "Start Time" ) );
diff --git a/korganizer/incomingdialog_base.h b/korganizer/incomingdialog_base.h
index 7732384..537ef86 100644
--- a/korganizer/incomingdialog_base.h
+++ b/korganizer/incomingdialog_base.h
@@ -12,12 +12,16 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3VBoxLayout>
17class QHBoxLayout; 17#include <Q3GridLayout>
18class QGridLayout; 18#include <Q3HBoxLayout>
19class QListView; 19
20class QListViewItem; 20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
23class Q3ListView;
24class Q3ListViewItem;
21class QPushButton; 25class QPushButton;
22 26
23class IncomingDialog_base : public QDialog 27class IncomingDialog_base : public QDialog
@@ -25,18 +29,18 @@ class IncomingDialog_base : public QDialog
25 Q_OBJECT 29 Q_OBJECT
26 30
27public: 31public:
28 IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 32 IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
29 ~IncomingDialog_base(); 33 ~IncomingDialog_base();
30 34
31 QPushButton* PushButton4; 35 QPushButton* PushButton4;
32 QPushButton* PushButton7; 36 QPushButton* PushButton7;
33 QListView* mMessageListView; 37 Q3ListView* mMessageListView;
34 QPushButton* PushButton7_2; 38 QPushButton* PushButton7_2;
35 QPushButton* PushButton8; 39 QPushButton* PushButton8;
36 QPushButton* PushButton9; 40 QPushButton* PushButton9;
37 41
38protected: 42protected:
39 QGridLayout* IncomingDialog_baseLayout; 43 Q3GridLayout* IncomingDialog_baseLayout;
40 44
41protected slots: 45protected slots:
42 virtual void languageChange(); 46 virtual void languageChange();
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index 2ac9de1..c828573 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -24,8 +24,8 @@
24// KOBaseView is the abstract base class of all calendar views. 24// KOBaseView is the abstract base class of all calendar views.
25 25
26#include <qwidget.h> 26#include <qwidget.h>
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29 29
30#include <klocale.h> 30#include <klocale.h>
31#include <kdebug.h> 31#include <kdebug.h>
@@ -88,7 +88,7 @@ class BaseView : public QWidget
88 select a single event at a time, but some may be able to select 88 select a single event at a time, but some may be able to select
89 more than one. 89 more than one.
90 */ 90 */
91 virtual QPtrList<Incidence> selectedIncidences() = 0; 91 virtual Q3PtrList<Incidence> selectedIncidences() = 0;
92 92
93 /** 93 /**
94 @return a list of the dates of selected events. Most views can probably only 94 @return a list of the dates of selected events. Most views can probably only
@@ -153,7 +153,7 @@ class BaseView : public QWidget
153 153
154 @param eventList a list of events to show. 154 @param eventList a list of events to show.
155 */ 155 */
156 virtual void showEvents(QPtrList<Event> eventList) = 0; 156 virtual void showEvents(Q3PtrList<Event> eventList) = 0;
157 157
158 /** 158 /**
159 Updates the current display to reflect changes that may have happened 159 Updates the current display to reflect changes that may have happened
diff --git a/korganizer/interfaces/korganizer/calendarviewbase.h b/korganizer/interfaces/korganizer/calendarviewbase.h
index 3c715b1..1f49357 100644
--- a/korganizer/interfaces/korganizer/calendarviewbase.h
+++ b/korganizer/interfaces/korganizer/calendarviewbase.h
@@ -23,6 +23,8 @@
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qlayout.h> 25#include <qlayout.h>
26//Added by qt3to4:
27#include <Q3VBoxLayout>
26 28
27 29
28#include <libkcal/calendar.h> 30#include <libkcal/calendar.h>
@@ -40,7 +42,7 @@ class CalendarViewBase : public QWidget
40 Q_OBJECT 42 Q_OBJECT
41 public: 43 public:
42 CalendarViewBase(QWidget *parent, const char *name) : 44 CalendarViewBase(QWidget *parent, const char *name) :
43 QWidget(parent,name) {new QVBoxLayout(this);} 45 QWidget(parent,name) {new Q3VBoxLayout(this);}
44 virtual ~CalendarViewBase() {}; 46 virtual ~CalendarViewBase() {};
45 47
46 virtual KCal::Calendar *calendar() = 0; 48 virtual KCal::Calendar *calendar() = 0;
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 5269af7..2814c61 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -26,14 +26,21 @@
26 26
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qvbox.h> 29#include <q3vbox.h>
30#include <qfile.h> 30#include <qfile.h>
31#include <qdir.h> 31#include <qdir.h>
32#include <qtextstream.h> 32#include <q3textstream.h>
33#include <qtextcodec.h> 33#include <qtextcodec.h>
34#include <qpixmap.h> 34#include <qpixmap.h>
35#include <qpushbutton.h> 35#include <qpushbutton.h>
36#include <qapplication.h> 36#include <qapplication.h>
37#include <QDesktopWidget>
38//Added by qt3to4:
39#include <QResizeEvent>
40#include <Q3Frame>
41#include <QKeyEvent>
42#include <QEvent>
43#include <Q3VBoxLayout>
37 44
38#include <kdebug.h> 45#include <kdebug.h>
39#include <kglobal.h> 46#include <kglobal.h>
@@ -57,7 +64,7 @@
57#include <qpe/qpeapplication.h> 64#include <qpe/qpeapplication.h>
58#endif 65#endif
59JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : 66JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
60 QFrame(parent) 67 Q3Frame(parent)
61{ 68{
62 69
63 int fac = 5; 70 int fac = 5;
@@ -70,7 +77,7 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
70 mCalendar = calendar; 77 mCalendar = calendar;
71 mJournal = 0; 78 mJournal = 0;
72 visibleMode = true; 79 visibleMode = true;
73 QHBox * vb = new QHBox ( this ); 80 Q3HBox * vb = new Q3HBox ( this );
74 QPixmap iconp; 81 QPixmap iconp;
75 vb->setMargin ( KDialog::marginHint()-1 ); 82 vb->setMargin ( KDialog::marginHint()-1 );
76 QPushButton * toggleJournal = new QPushButton( vb ); 83 QPushButton * toggleJournal = new QPushButton( vb );
@@ -129,13 +136,13 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
129 } 136 }
130 //mCalendarBox->setMaximumWidth( maxwid/2 -20 ); 137 //mCalendarBox->setMaximumWidth( maxwid/2 -20 );
131 mEditor->setWordWrap( KTextEdit::WidgetWidth ); 138 mEditor->setWordWrap( KTextEdit::WidgetWidth );
132 QBoxLayout *topLayout = new QVBoxLayout(this); 139 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
133 topLayout->addWidget(vb); 140 topLayout->addWidget(vb);
134 topLayout->addWidget(mEditor); 141 topLayout->addWidget(mEditor);
135 mEditor->installEventFilter(this); 142 mEditor->installEventFilter(this);
136 installEventFilter(this); 143 installEventFilter(this);
137 mTitle->installEventFilter(this); 144 mTitle->installEventFilter(this);
138 setFocusPolicy (QWidget::NoFocus); 145 setFocusPolicy (Qt::NoFocus);
139 146
140 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 147 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
141 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 148 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
@@ -168,7 +175,7 @@ void JournalEntry::resizeEvent(QResizeEvent* e )
168 //setMaximumWidth( QApplication::desktop()->width() ); 175 //setMaximumWidth( QApplication::desktop()->width() );
169 //qDebug("MAXXX %d ", QApplication::desktop()->width()); 176 //qDebug("MAXXX %d ", QApplication::desktop()->width());
170#endif 177#endif
171 QFrame::resizeEvent( e ); 178 Q3Frame::resizeEvent( e );
172} 179}
173QSize JournalEntry::sizeHint() const 180QSize JournalEntry::sizeHint() const
174{ 181{
@@ -186,13 +193,13 @@ void JournalEntry::slotSaveTemplate()
186 return; 193 return;
187 194
188 QFile fileIn( fileName ); 195 QFile fileIn( fileName );
189 if (!fileIn.open( IO_WriteOnly ) ) { 196 if (!fileIn.open( QIODevice::WriteOnly ) ) {
190 KMessageBox::error( this, i18n("Error saving template file\n '%1'.") 197 KMessageBox::error( this, i18n("Error saving template file\n '%1'.")
191 .arg( fileName ) ); 198 .arg( fileName ) );
192 return; 199 return;
193 } 200 }
194 // QString text; 201 // QString text;
195 QTextStream tsIn( &fileIn ); 202 Q3TextStream tsIn( &fileIn );
196 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 203 tsIn.setCodec( QTextCodec::codecForName("utf8") );
197 tsIn << mEditor->text(); 204 tsIn << mEditor->text();
198 fileIn.close(); 205 fileIn.close();
@@ -208,12 +215,12 @@ void JournalEntry::slotLoadTemplate()
208 if ( fileName.length() == 0 ) 215 if ( fileName.length() == 0 )
209 return; 216 return;
210 QFile fileIn( fileName ); 217 QFile fileIn( fileName );
211 if (!fileIn.open( IO_ReadOnly ) ) { 218 if (!fileIn.open( QIODevice::ReadOnly ) ) {
212 KMessageBox::error( this, i18n("Error loading template file\n '%1'.") 219 KMessageBox::error( this, i18n("Error loading template file\n '%1'.")
213 .arg( fileName ) ); 220 .arg( fileName ) );
214 return; 221 return;
215 } 222 }
216 QTextStream tsIn( &fileIn ); 223 Q3TextStream tsIn( &fileIn );
217 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 224 tsIn.setCodec( QTextCodec::codecForName("utf8") );
218 QString text = tsIn.read(); 225 QString text = tsIn.read();
219 fileIn.close(); 226 fileIn.close();
@@ -316,11 +323,11 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
316{ 323{
317// kdDebug() << "JournalEntry::event received " << e->type() << endl; 324// kdDebug() << "JournalEntry::event received " << e->type() << endl;
318 if ( isVisible() ) { 325 if ( isVisible() ) {
319 mEditor->setFocusPolicy (QWidget::StrongFocus); 326 mEditor->setFocusPolicy (Qt::StrongFocus);
320 mTitle->setFocusPolicy (QWidget::StrongFocus); 327 mTitle->setFocusPolicy (Qt::StrongFocus);
321 } else { 328 } else {
322 mEditor->setFocusPolicy (QWidget::NoFocus); 329 mEditor->setFocusPolicy (Qt::NoFocus);
323 mTitle->setFocusPolicy (QWidget::NoFocus); 330 mTitle->setFocusPolicy (Qt::NoFocus);
324 } 331 }
325 if ( e->type() == QEvent::FocusOut ) { 332 if ( e->type() == QEvent::FocusOut ) {
326 writeJournal(); 333 writeJournal();
@@ -335,7 +342,7 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e )
335 } 342 }
336 } 343 }
337 344
338 return QFrame::eventFilter( o, e ); // standard event processing 345 return Q3Frame::eventFilter( o, e ); // standard event processing
339} 346}
340 347
341void JournalEntry::writeJournal() 348void JournalEntry::writeJournal()
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index ee17da8..0adebe9 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -25,7 +25,12 @@
25// 25//
26// Widget showing one Journal entry 26// Widget showing one Journal entry
27 27
28#include <qframe.h> 28#include <q3frame.h>
29//Added by qt3to4:
30#include <QResizeEvent>
31#include <QEvent>
32#include <QLabel>
33#include <QKeyEvent>
29 34
30#include <libkcal/calendar.h> 35#include <libkcal/calendar.h>
31 36
@@ -37,7 +42,7 @@ class KOLocationBox;
37 42
38using namespace KCal; 43using namespace KCal;
39 44
40class JournalEntry : public QFrame { 45class JournalEntry : public Q3Frame {
41 Q_OBJECT 46 Q_OBJECT
42 public: 47 public:
43 JournalEntry(Calendar *,QWidget *parent); 48 JournalEntry(Calendar *,QWidget *parent);
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index 6697602..ecc7a2f 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -22,12 +22,16 @@
22*/ 22*/
23 23
24#include <qstring.h> 24#include <qstring.h>
25#include <qkeycode.h> 25#include <qnamespace.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qtimer.h> 27#include <qtimer.h>
28#include <qframe.h> 28#include <q3frame.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qapplication.h> 30#include <qapplication.h>
31//Added by qt3to4:
32#include <QWheelEvent>
33#include <Q3GridLayout>
34#include <QEvent>
31 35
32#include <kdebug.h> 36#include <kdebug.h>
33#include <klocale.h> 37#include <klocale.h>
@@ -46,12 +50,12 @@
46#include "kdatenavigator.h" 50#include "kdatenavigator.h"
47 51
48KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) 52KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
49 : QFrame(parent, name), 53 : Q3Frame(parent, name),
50 updateTimer(0L) 54 updateTimer(0L)
51{ 55{
52 setFrameStyle(QFrame::NoFrame); 56 setFrameStyle(Q3Frame::NoFrame);
53 QDate startDate = QDate::currentDate(); 57 QDate startDate = QDate::currentDate();
54 QGridLayout *topLayout = new QGridLayout(this,8,8); 58 Q3GridLayout *topLayout = new Q3GridLayout(this,8,8);
55 59
56 if (! startDate.isValid()) { 60 if (! startDate.isValid()) {
57 qDebug("KDateNavigator::invalid startdate "); 61 qDebug("KDateNavigator::invalid startdate ");
@@ -81,7 +85,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
81 for( i = 0; i < 7; i++ ) { 85 for( i = 0; i < 7; i++ ) {
82 headings[i] = new QLabel("",this); 86 headings[i] = new QLabel("",this);
83 //headings[i]->setFont(QFont("Arial", 10, QFont::Bold)); 87 //headings[i]->setFont(QFont("Arial", 10, QFont::Bold));
84 headings[i]->setAlignment(AlignCenter); 88 headings[i]->setAlignment(Qt::AlignCenter);
85 headings[i]->installEventFilter(this); 89 headings[i]->installEventFilter(this);
86 90
87 topLayout->addWidget(headings[i],1,i+1); 91 topLayout->addWidget(headings[i],1,i+1);
@@ -90,7 +94,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
90 // Create the weeknumber labels 94 // Create the weeknumber labels
91 for( i = 0; i < 6; i++ ) { 95 for( i = 0; i < 6; i++ ) {
92 weeknos[i] = new QLabel(this); 96 weeknos[i] = new QLabel(this);
93 weeknos[i]->setAlignment(AlignCenter ); 97 weeknos[i]->setAlignment(Qt::AlignCenter );
94 //weeknos[i]->setFont(QFont("Arial", 10)); 98 //weeknos[i]->setFont(QFont("Arial", 10));
95 if(!m_bShowWeekNums) { 99 if(!m_bShowWeekNums) {
96 weeknos[i]->hide(); 100 weeknos[i]->hide();
@@ -101,7 +105,7 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
101 } 105 }
102 106
103 daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix"); 107 daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix");
104 daymatrix->setFrameStyle(QFrame::Panel|QFrame::Sunken); 108 daymatrix->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
105 daymatrix->setLineWidth(1); 109 daymatrix->setLineWidth(1);
106 110
107 connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ), 111 connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ),
diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h
index 780ebb8..2cbca76 100644
--- a/korganizer/kdatenavigator.h
+++ b/korganizer/kdatenavigator.h
@@ -23,9 +23,12 @@
23#ifndef KDATENAVIGATOR_H 23#ifndef KDATENAVIGATOR_H
24#define KDATENAVIGATOR_H 24#define KDATENAVIGATOR_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qlabel.h> 28#include <qlabel.h>
29//Added by qt3to4:
30#include <QWheelEvent>
31#include <QEvent>
29 32
30#include <libkcal/calendar.h> 33#include <libkcal/calendar.h>
31 34
@@ -38,7 +41,7 @@ class KCalendarSystem;
38 41
39class NavigatorBar; 42class NavigatorBar;
40 43
41class KDateNavigator: public QFrame 44class KDateNavigator: public Q3Frame
42{ 45{
43 Q_OBJECT 46 Q_OBJECT
44 public: 47 public:
@@ -133,8 +136,8 @@ class KDateNavigator: public QFrame
133 int mMonthSignalOffset; 136 int mMonthSignalOffset;
134 NavigatorBar *mNavigatorBar; 137 NavigatorBar *mNavigatorBar;
135 138
136 QFrame *headingSep; 139 Q3Frame *headingSep;
137 QFrame *weeknumSep; 140 Q3Frame *weeknumSep;
138 QLabel *headings[7]; 141 QLabel *headings[7];
139 QLabel *weeknos[7]; 142 QLabel *weeknos[7];
140 KODayMatrix *daymatrix; 143 KODayMatrix *daymatrix;
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 1d4d6de..fe59787 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -29,12 +29,23 @@
29#include <qwidget.h> 29#include <qwidget.h>
30#undef protected 30#undef protected
31#endif 31#endif
32#include <qintdict.h> 32#include <q3intdict.h>
33#include <qdatetime.h> 33#include <qdatetime.h>
34#include <qapplication.h> 34#include <qapplication.h>
35#include <qpopupmenu.h> 35#include <q3popupmenu.h>
36#include <qcursor.h> 36#include <qcursor.h>
37#include <qpainter.h> 37#include <qpainter.h>
38#include <QDesktopWidget>
39//Added by qt3to4:
40#include <QResizeEvent>
41#include <QLabel>
42#include <QPixmap>
43#include <QMouseEvent>
44#include <QKeyEvent>
45#include <Q3MemArray>
46#include <QEvent>
47#include <Q3Frame>
48#include <Q3PtrList>
38 49
39#include <kdebug.h> 50#include <kdebug.h>
40#include <klocale.h> 51#include <klocale.h>
@@ -63,7 +74,7 @@ extern int globalFlagBlockStartup;
63 74
64//////////////////////////////////////////////////////////////////////////// 75////////////////////////////////////////////////////////////////////////////
65MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) 76MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
66 : QFrame(_agenda->viewport(),name), agenda(_agenda) 77 : Q3Frame(_agenda->viewport(),name), agenda(_agenda)
67{ 78{
68 setLineWidth(0); 79 setLineWidth(0);
69 setMargin(0); 80 setMargin(0);
@@ -169,8 +180,8 @@ void MarcusBains::updateLocation(bool recalculate)
169 Create an agenda widget with rows rows and columns columns. 180 Create an agenda widget with rows rows and columns columns.
170*/ 181*/
171KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, 182KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
172 const char *name,WFlags f) : 183 const char *name,Qt::WFlags f) :
173 QScrollView(parent,name,f) 184 Q3ScrollView(parent,name,f)
174{ 185{
175 186
176 mAllAgendaPopup = 0; 187 mAllAgendaPopup = 0;
@@ -190,8 +201,8 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent,
190 Create an agenda widget with columns columns and one row. This is used for 201 Create an agenda widget with columns columns and one row. This is used for
191 all-day events. 202 all-day events.
192*/ 203*/
193KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : 204KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,Qt::WFlags f) :
194 QScrollView(parent,name,f) 205 Q3ScrollView(parent,name,f)
195{ 206{
196 mAllAgendaPopup = 0; 207 mAllAgendaPopup = 0;
197 blockResize = false; 208 blockResize = false;
@@ -231,7 +242,7 @@ void KOAgenda::init()
231 mPopupTimer = new QTimer(this); 242 mPopupTimer = new QTimer(this);
232 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); 243 connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu()));
233 244
234 mNewItemPopup = new QPopupMenu( this ); 245 mNewItemPopup = new Q3PopupMenu( this );
235 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); 246 connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) );
236 QString pathString = ""; 247 QString pathString = "";
237 if ( !KOPrefs::instance()->mToolBarMiniIcons ) { 248 if ( !KOPrefs::instance()->mToolBarMiniIcons ) {
@@ -240,18 +251,18 @@ void KOAgenda::init()
240 } else 251 } else
241 pathString += "iconsmini/"; 252 pathString += "iconsmini/";
242 253
243 mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); 254 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 );
244 mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); 255 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 );
245 mNewItemPopup->insertSeparator ( ); 256 mNewItemPopup->insertSeparator ( );
246 mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); 257 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"day" ), i18n("Day view"),3 );
247 mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); 258 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"xdays" ), i18n("Next days"),8 );
248 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); 259 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next week"),4 );
249 mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); 260 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 );
250 mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); 261 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"month" ), i18n("This month"),6 );
251 mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); 262 mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"journal" ), i18n("Journal view"),7 );
252#ifndef _WIN32_ 263#ifndef _WIN32_
253 int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase 264 Qt::WindowFlags wflags = viewport()-> windowFlags() |Qt::WRepaintNoErase;//WResizeNoErase
254 viewport()->setWFlags ( wflags); 265 viewport()->setWindowFlags ( wflags);
255#endif 266#endif
256 mGridSpacingX = 80; 267 mGridSpacingX = 80;
257 mResizeBorderWidth = 8; 268 mResizeBorderWidth = 8;
@@ -263,7 +274,7 @@ void KOAgenda::init()
263 274
264 // Grab key strokes for keyboard navigation of agenda. Seems to have no 275 // Grab key strokes for keyboard navigation of agenda. Seems to have no
265 // effect. Has to be fixed. 276 // effect. Has to be fixed.
266 setFocusPolicy(WheelFocus); 277 setFocusPolicy(Qt::WheelFocus);
267 278
268 connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); 279 connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp()));
269 connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown())); 280 connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown()));
@@ -395,11 +406,11 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event )
395 406
396 case (QEvent::Leave): 407 case (QEvent::Leave):
397 if (!mActionItem) 408 if (!mActionItem)
398 setCursor(arrowCursor); 409 setCursor(Qt::arrowCursor);
399 return true; 410 return true;
400 411
401 default: 412 default:
402 return QScrollView::eventFilter(object,event); 413 return Q3ScrollView::eventFilter(object,event);
403 } 414 }
404} 415}
405void KOAgenda::popupMenu() 416void KOAgenda::popupMenu()
@@ -505,11 +516,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
505 bool objIsNotViewport = (object != viewport()); 516 bool objIsNotViewport = (object != viewport());
506 bool leftButt = false; 517 bool leftButt = false;
507#ifdef DESKTOP_VERSION 518#ifdef DESKTOP_VERSION
508 leftButt = (me->button() == LeftButton); 519 leftButt = (me->button() == Qt::LeftButton);
509#endif 520#endif
510 switch (me->type()) { 521 switch (me->type()) {
511 case QEvent::MouseButtonPress: 522 case QEvent::MouseButtonPress:
512 if (me->button() == LeftButton) { 523 if (me->button() == Qt::LeftButton) {
513 mPopupTimer->start( 600 ); 524 mPopupTimer->start( 600 );
514 mLeftMouseDown = true; 525 mLeftMouseDown = true;
515 } 526 }
@@ -578,10 +589,10 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
578 if ( objIsNotViewport ) { 589 if ( objIsNotViewport ) {
579 mPopupItem = (KOAgendaItem *)object; 590 mPopupItem = (KOAgendaItem *)object;
580 mPopupKind = 1; 591 mPopupKind = 1;
581 if (me->button() == RightButton) { 592 if (me->button() == Qt::RightButton) {
582 mPopupKind = 3; 593 mPopupKind = 3;
583 popupMenu(); 594 popupMenu();
584 } else if (me->button() == LeftButton) { 595 } else if (me->button() == Qt::LeftButton) {
585 mActionItem = (KOAgendaItem *)object; 596 mActionItem = (KOAgendaItem *)object;
586 if (mActionItem) { 597 if (mActionItem) {
587 emit signalClearSelection(); 598 emit signalClearSelection();
@@ -600,7 +611,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
600 mPopupKind = 2; 611 mPopupKind = 2;
601 selectItem(0); 612 selectItem(0);
602 mActionItem = 0; 613 mActionItem = 0;
603 if (me->button() == RightButton) { 614 if (me->button() == Qt::RightButton) {
604 int x,y; 615 int x,y;
605 viewportToContents(viewportPos.x(),viewportPos.y(),x,y); 616 viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
606 int gx,gy; 617 int gx,gy;
@@ -611,19 +622,19 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
611 mStartCellY = gy; 622 mStartCellY = gy;
612 mPopupKind = 4; 623 mPopupKind = 4;
613 popupMenu(); 624 popupMenu();
614 } else if (me->button() == LeftButton) { 625 } else if (me->button() == Qt::LeftButton) {
615 setCursor(arrowCursor); 626 setCursor(Qt::arrowCursor);
616 startSelectAction(viewportPos); 627 startSelectAction(viewportPos);
617 } 628 }
618 } 629 }
619 break; 630 break;
620 631
621 case QEvent::MouseButtonRelease: 632 case QEvent::MouseButtonRelease:
622 if (me->button() == LeftButton ) { 633 if (me->button() == Qt::LeftButton ) {
623 mPopupTimer->stop(); 634 mPopupTimer->stop();
624 } 635 }
625 if (object != viewport()) { 636 if (object != viewport()) {
626 if (me->button() == LeftButton && mLeftMouseDown) { 637 if (me->button() == Qt::LeftButton && mLeftMouseDown) {
627 if (mActionItem) { 638 if (mActionItem) {
628 QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); 639 QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos));
629 //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 ); 640 //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 );
@@ -633,7 +644,7 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
633 mActionItem->resetMove(); 644 mActionItem->resetMove();
634 placeSubCells( mActionItem ); 645 placeSubCells( mActionItem );
635 // emit startDragSignal( mActionItem->incidence() ); 646 // emit startDragSignal( mActionItem->incidence() );
636 setCursor( arrowCursor ); 647 setCursor( Qt::arrowCursor );
637 mActionItem = 0; 648 mActionItem = 0;
638 mActionType = NOP; 649 mActionType = NOP;
639 mItemMoved = 0; 650 mItemMoved = 0;
@@ -645,11 +656,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
645 } 656 }
646 657
647 } else { // ---------- viewport() 658 } else { // ---------- viewport()
648 if (me->button() == LeftButton && mLeftMouseDown ) { //left click 659 if (me->button() == Qt::LeftButton && mLeftMouseDown ) { //left click
649 endSelectAction( true ); // emit new event signal 660 endSelectAction( true ); // emit new event signal
650 } 661 }
651 } 662 }
652 if (me->button() == LeftButton) 663 if (me->button() == Qt::LeftButton)
653 mLeftMouseDown = false; 664 mLeftMouseDown = false;
654 665
655 break; 666 break;
@@ -850,15 +861,15 @@ void KOAgenda::startItemAction(QPoint viewportPos)
850 if ( allowResize && gridDistanceX < mResizeBorderWidth && 861 if ( allowResize && gridDistanceX < mResizeBorderWidth &&
851 mActionItem->cellX() == mCurrentCellX) { 862 mActionItem->cellX() == mCurrentCellX) {
852 mActionType = RESIZELEFT; 863 mActionType = RESIZELEFT;
853 setCursor(sizeHorCursor); 864 setCursor(Qt::sizeHorCursor);
854 } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && 865 } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
855 mActionItem->cellXWidth() == mCurrentCellX) { 866 mActionItem->cellXWidth() == mCurrentCellX) {
856 mActionType = RESIZERIGHT; 867 mActionType = RESIZERIGHT;
857 setCursor(sizeHorCursor); 868 setCursor(Qt::sizeHorCursor);
858 } else { 869 } else {
859 mActionType = MOVE; 870 mActionType = MOVE;
860 mActionItem->startMove(); 871 mActionItem->startMove();
861 setCursor(sizeAllCursor); 872 setCursor(Qt::sizeAllCursor);
862 } 873 }
863 } else { 874 } else {
864 int gridDistanceY = (y - gy * mGridSpacingY); 875 int gridDistanceY = (y - gy * mGridSpacingY);
@@ -866,16 +877,16 @@ void KOAgenda::startItemAction(QPoint viewportPos)
866 mActionItem->cellYTop() == mCurrentCellY && 877 mActionItem->cellYTop() == mCurrentCellY &&
867 !mActionItem->firstMultiItem()) { 878 !mActionItem->firstMultiItem()) {
868 mActionType = RESIZETOP; 879 mActionType = RESIZETOP;
869 setCursor(sizeVerCursor); 880 setCursor(Qt::sizeVerCursor);
870 } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && 881 } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
871 mActionItem->cellYBottom() == mCurrentCellY && 882 mActionItem->cellYBottom() == mCurrentCellY &&
872 !mActionItem->lastMultiItem()) { 883 !mActionItem->lastMultiItem()) {
873 mActionType = RESIZEBOTTOM; 884 mActionType = RESIZEBOTTOM;
874 setCursor(sizeVerCursor); 885 setCursor(Qt::sizeVerCursor);
875 } else { 886 } else {
876 mActionType = MOVE; 887 mActionType = MOVE;
877 mActionItem->startMove(); 888 mActionItem->startMove();
878 setCursor(sizeAllCursor); 889 setCursor(Qt::sizeAllCursor);
879 } 890 }
880 } 891 }
881} 892}
@@ -906,7 +917,7 @@ void KOAgenda::performItemAction(QPoint viewportPos)
906 mActionItem->resetMove(); 917 mActionItem->resetMove();
907 placeSubCells( mActionItem ); 918 placeSubCells( mActionItem );
908 // emit startDragSignal( mActionItem->incidence() ); 919 // emit startDragSignal( mActionItem->incidence() );
909 setCursor( arrowCursor ); 920 setCursor( Qt::arrowCursor );
910 mActionItem = 0; 921 mActionItem = 0;
911 mActionType = NOP; 922 mActionType = NOP;
912 mItemMoved = 0; 923 mItemMoved = 0;
@@ -915,18 +926,18 @@ void KOAgenda::performItemAction(QPoint viewportPos)
915 } else { 926 } else {
916 switch ( mActionType ) { 927 switch ( mActionType ) {
917 case MOVE: 928 case MOVE:
918 setCursor( sizeAllCursor ); 929 setCursor( Qt::sizeAllCursor );
919 break; 930 break;
920 case RESIZETOP: 931 case RESIZETOP:
921 case RESIZEBOTTOM: 932 case RESIZEBOTTOM:
922 setCursor( sizeVerCursor ); 933 setCursor( Qt::sizeVerCursor );
923 break; 934 break;
924 case RESIZELEFT: 935 case RESIZELEFT:
925 case RESIZERIGHT: 936 case RESIZERIGHT:
926 setCursor( sizeHorCursor ); 937 setCursor( Qt::sizeHorCursor );
927 break; 938 break;
928 default: 939 default:
929 setCursor( arrowCursor ); 940 setCursor( Qt::arrowCursor );
930 } 941 }
931 } 942 }
932 943
@@ -971,7 +982,7 @@ void KOAgenda::performItemAction(QPoint viewportPos)
971 int x,y; 982 int x,y;
972 gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y); 983 gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y);
973 //moveChild(mActionItem,childX(mActionItem),y); 984 //moveChild(mActionItem,childX(mActionItem),y);
974 QScrollView::moveChild( mActionItem,childX(mActionItem),y ); 985 Q3ScrollView::moveChild( mActionItem,childX(mActionItem),y );
975 } 986 }
976 } else if (mActionType == RESIZEBOTTOM) { 987 } else if (mActionType == RESIZEBOTTOM) {
977 if (mCurrentCellY >= mActionItem->cellYTop()) { 988 if (mCurrentCellY >= mActionItem->cellYTop()) {
@@ -1019,7 +1030,7 @@ void KOAgenda::endItemAction()
1019 type = -1; 1030 type = -1;
1020 KOAgendaItem *modifiedItem = placeItem; 1031 KOAgendaItem *modifiedItem = placeItem;
1021 //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); 1032 //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */);
1022 QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); 1033 Q3PtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems();
1023 KOAgendaItem *item; 1034 KOAgendaItem *item;
1024 1035
1025 if ( placeItem->incidence()->typeID() == todoID ) { 1036 if ( placeItem->incidence()->typeID() == todoID ) {
@@ -1110,7 +1121,7 @@ void KOAgenda::endItemAction()
1110 emit incidenceSelected( mActionItem->incidence() ); 1121 emit incidenceSelected( mActionItem->incidence() );
1111 mScrollUpTimer.stop(); 1122 mScrollUpTimer.stop();
1112 mScrollDownTimer.stop(); 1123 mScrollDownTimer.stop();
1113 setCursor( arrowCursor ); 1124 setCursor( Qt::arrowCursor );
1114 mActionItem = 0; 1125 mActionItem = 0;
1115 mActionType = NOP; 1126 mActionType = NOP;
1116 mItemMoved = 0; 1127 mItemMoved = 0;
@@ -1136,25 +1147,25 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
1136 int gridDistanceX = (x - gx * mGridSpacingX); 1147 int gridDistanceX = (x - gx * mGridSpacingX);
1137 if (gridDistanceX < mResizeBorderWidth && 1148 if (gridDistanceX < mResizeBorderWidth &&
1138 moveItem->cellX() == gx) { 1149 moveItem->cellX() == gx) {
1139 setCursor(sizeHorCursor); 1150 setCursor(Qt::sizeHorCursor);
1140 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && 1151 } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth &&
1141 moveItem->cellXWidth() == gx) { 1152 moveItem->cellXWidth() == gx) {
1142 setCursor(sizeHorCursor); 1153 setCursor(Qt::sizeHorCursor);
1143 } else { 1154 } else {
1144 setCursor(arrowCursor); 1155 setCursor(Qt::arrowCursor);
1145 } 1156 }
1146 } else { 1157 } else {
1147 int gridDistanceY = (y - gy * mGridSpacingY); 1158 int gridDistanceY = (y - gy * mGridSpacingY);
1148 if (gridDistanceY < mResizeBorderWidth && 1159 if (gridDistanceY < mResizeBorderWidth &&
1149 moveItem->cellYTop() == gy && 1160 moveItem->cellYTop() == gy &&
1150 !moveItem->firstMultiItem()) { 1161 !moveItem->firstMultiItem()) {
1151 setCursor(sizeVerCursor); 1162 setCursor(Qt::sizeVerCursor);
1152 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && 1163 } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth &&
1153 moveItem->cellYBottom() == gy && 1164 moveItem->cellYBottom() == gy &&
1154 !moveItem->lastMultiItem()) { 1165 !moveItem->lastMultiItem()) {
1155 setCursor(sizeVerCursor); 1166 setCursor(Qt::sizeVerCursor);
1156 } else { 1167 } else {
1157 setCursor(arrowCursor); 1168 setCursor(Qt::arrowCursor);
1158 } 1169 }
1159 } 1170 }
1160} 1171}
@@ -1173,9 +1184,9 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos)
1173void KOAgenda::placeSubCells(KOAgendaItem *placeItem) 1184void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
1174{ 1185{
1175 1186
1176 QPtrList<KOAgendaItem> conflictItems; 1187 Q3PtrList<KOAgendaItem> conflictItems;
1177 int maxSubCells = 0; 1188 int maxSubCells = 0;
1178 QIntDict<KOAgendaItem> subCellDict(7); 1189 Q3IntDict<KOAgendaItem> subCellDict(7);
1179 1190
1180 KOAgendaItem *item; 1191 KOAgendaItem *item;
1181 for ( item=mItems.first(); item != 0; item=mItems.next() ) { 1192 for ( item=mItems.first(); item != 0; item=mItems.next() ) {
@@ -1240,7 +1251,7 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem)
1240 item=conflictItems.next() ) { 1251 item=conflictItems.next() ) {
1241 if ( placeItem != item ) { 1252 if ( placeItem != item ) {
1242 KOAgendaItem *item2; 1253 KOAgendaItem *item2;
1243 QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); 1254 Q3PtrList<KOAgendaItem> conflictItems2 = item->conflictItems();
1244 for ( item2=conflictItems2.first(); item2 != 0; 1255 for ( item2=conflictItems2.first(); item2 != 0;
1245 item2=conflictItems2.next() ) { 1256 item2=conflictItems2.next() ) {
1246 if ( item2->subCells() != maxSubCells) { 1257 if ( item2->subCells() != maxSubCells) {
@@ -1325,9 +1336,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1325 if ( vySel < 0 ) 1336 if ( vySel < 0 )
1326 off += vySel; 1337 off += vySel;
1327 //qDebug("OFF %d %d %d", off,vySel, vy ); 1338 //qDebug("OFF %d %d %d", off,vySel, vy );
1328 bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); 1339 bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,QPainter::CompositionMode_Source);
1329 } else { 1340 } else {
1330 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); 1341 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source);
1331 } 1342 }
1332 } 1343 }
1333 if ( mSelectionHeight > 0 ) { 1344 if ( mSelectionHeight > 0 ) {
@@ -1342,7 +1353,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1342 int p_hei = 5; 1353 int p_hei = 5;
1343 if ( hei < 5 ) p_hei = hei; 1354 if ( hei < 5 ) p_hei = hei;
1344 hei -= 5; 1355 hei -= 5;
1345 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); 1356 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source);
1346 offset += 5; 1357 offset += 5;
1347 } 1358 }
1348 } 1359 }
@@ -1365,7 +1376,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1365 contentsToViewport ( cx, cy, vx,vy); 1376 contentsToViewport ( cx, cy, vx,vy);
1366 // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; 1377 // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ;
1367 if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) 1378 if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) )
1368 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); 1379 bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source);
1369 1380
1370 if ( mSelectionHeight > 0 ) { 1381 if ( mSelectionHeight > 0 ) {
1371 //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); 1382 //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight );
@@ -1379,7 +1390,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
1379 int p_hei = 5; 1390 int p_hei = 5;
1380 if ( hei < 5 ) p_hei = hei; 1391 if ( hei < 5 ) p_hei = hei;
1381 hei -= 5; 1392 hei -= 5;
1382 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); 1393 bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source);
1383 offset += 5; 1394 offset += 5;
1384 } 1395 }
1385 } 1396 }
@@ -1576,14 +1587,14 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i
1576 int y = ((int)(cy/lGridSpacingY))*lGridSpacingY; 1587 int y = ((int)(cy/lGridSpacingY))*lGridSpacingY;
1577 if ( lGridSpacingY > 0 ) { 1588 if ( lGridSpacingY > 0 ) {
1578 while (y < cy + ch) { 1589 while (y < cy + ch) {
1579 p->setPen( SolidLine ); 1590 p->setPen( Qt::SolidLine );
1580 p->drawLine(cx,y,cx+cw,y); 1591 p->drawLine(cx,y,cx+cw,y);
1581 y+=lGridSpacingY; 1592 y+=lGridSpacingY;
1582 p->setPen( DotLine ); 1593 p->setPen( Qt::DotLine );
1583 p->drawLine(cx,y,cx+cw,y); 1594 p->drawLine(cx,y,cx+cw,y);
1584 y+=lGridSpacingY; 1595 y+=lGridSpacingY;
1585 } 1596 }
1586 p->setPen( SolidLine ); 1597 p->setPen( Qt::SolidLine );
1587 } 1598 }
1588 mPixPainter.end() ; 1599 mPixPainter.end() ;
1589} 1600}
@@ -1717,7 +1728,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1717 item->select(false); 1728 item->select(false);
1718 mUnusedItems.append( item ); 1729 mUnusedItems.append( item );
1719 mItems.remove( item ); 1730 mItems.remove( item );
1720 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); 1731 Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
1721 KOAgendaItem *itemit; 1732 KOAgendaItem *itemit;
1722 //globalFlagBlockAgendaItemPaint = 1; 1733 //globalFlagBlockAgendaItemPaint = 1;
1723 for ( itemit=oldconflictItems.first(); itemit != 0; 1734 for ( itemit=oldconflictItems.first(); itemit != 0;
@@ -1747,7 +1758,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1747 return; 1758 return;
1748 //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); 1759 //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ ");
1749 QDate currentDate = QDate::currentDate(); 1760 QDate currentDate = QDate::currentDate();
1750 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); 1761 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda );
1751 QDateTime dt; 1762 QDateTime dt;
1752 if ( todo->hasCompletedDate() ) 1763 if ( todo->hasCompletedDate() )
1753 dt = todo->completed(); 1764 dt = todo->completed();
@@ -1779,7 +1790,7 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove)
1779 } 1790 }
1780 qApp->processEvents(); 1791 qApp->processEvents();
1781 globalFlagBlockAgendaItemPaint = 0; 1792 globalFlagBlockAgendaItemPaint = 0;
1782 QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); 1793 Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems();
1783 KOAgendaItem *itemit; 1794 KOAgendaItem *itemit;
1784 for ( itemit=oldconflictItems.first(); itemit != 0; 1795 for ( itemit=oldconflictItems.first(); itemit != 0;
1785 itemit=oldconflictItems.next() ) { 1796 itemit=oldconflictItems.next() ) {
@@ -1867,7 +1878,7 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd,
1867 int width = XEnd - XBegin + 1; 1878 int width = XEnd - XBegin + 1;
1868 int count = 0; 1879 int count = 0;
1869 KOAgendaItem *current = 0; 1880 KOAgendaItem *current = 0;
1870 QPtrList<KOAgendaItem> multiItems; 1881 Q3PtrList<KOAgendaItem> multiItems;
1871 for (cellX = XBegin;cellX <= XEnd;++cellX) { 1882 for (cellX = XBegin;cellX <= XEnd;++cellX) {
1872 if (cellX == XBegin) cellYTop = YTop; 1883 if (cellX == XBegin) cellYTop = YTop;
1873 else cellYTop = 0; 1884 else cellYTop = 0;
@@ -1927,7 +1938,7 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev )
1927 mSelectionHeight = 0; 1938 mSelectionHeight = 0;
1928 mResizeTimer.start( 150 , true ); 1939 mResizeTimer.start( 150 , true );
1929 computeSizes(); 1940 computeSizes();
1930 QScrollView::resizeEvent( ev ); 1941 Q3ScrollView::resizeEvent( ev );
1931 return; 1942 return;
1932 1943
1933} 1944}
@@ -2016,7 +2027,7 @@ void KOAgenda::popupAlarm()
2016 } 2027 }
2017 // TODO: deal correctly with multiple alarms 2028 // TODO: deal correctly with multiple alarms
2018 Alarm* alarm; 2029 Alarm* alarm;
2019 QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); 2030 Q3PtrList<Alarm> list(mClickedItem->incidence()->alarms());
2020 for(alarm=list.first();alarm;alarm=list.next()) { 2031 for(alarm=list.first();alarm;alarm=list.next()) {
2021 alarm->toggleAlarm(); 2032 alarm->toggleAlarm();
2022 } 2033 }
@@ -2107,16 +2118,16 @@ void KOAgenda::selectItem(KOAgendaItem *item)
2107void KOAgenda::keyPressEvent( QKeyEvent *kev ) 2118void KOAgenda::keyPressEvent( QKeyEvent *kev )
2108{ 2119{
2109 switch(kev->key()) { 2120 switch(kev->key()) {
2110 case Key_PageDown: 2121 case Qt::Key_PageDown:
2111 verticalScrollBar()->addPage(); 2122 verticalScrollBar()->addPage();
2112 break; 2123 break;
2113 case Key_PageUp: 2124 case Qt::Key_PageUp:
2114 verticalScrollBar()->subtractPage(); 2125 verticalScrollBar()->subtractPage();
2115 break; 2126 break;
2116 case Key_Down: 2127 case Qt::Key_Down:
2117 verticalScrollBar()->addLine(); 2128 verticalScrollBar()->addLine();
2118 break; 2129 break;
2119 case Key_Up: 2130 case Qt::Key_Up:
2120 verticalScrollBar()->subtractLine(); 2131 verticalScrollBar()->subtractLine();
2121 break; 2132 break;
2122 default: 2133 default:
@@ -2146,7 +2157,7 @@ void KOAgenda::setDateList(const DateList &selectedDates)
2146 mSelectedDates = selectedDates; 2157 mSelectedDates = selectedDates;
2147} 2158}
2148 2159
2149void KOAgenda::setHolidayMask(QMemArray<bool> *mask) 2160void KOAgenda::setHolidayMask(Q3MemArray<bool> *mask)
2150{ 2161{
2151 mHolidayMask = mask; 2162 mHolidayMask = mask;
2152 2163
@@ -2162,7 +2173,7 @@ void KOAgenda::setHolidayMask(QMemArray<bool> *mask)
2162void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) 2173void KOAgenda::contentsMousePressEvent ( QMouseEvent *event )
2163{ 2174{
2164 2175
2165 QScrollView::contentsMousePressEvent(event); 2176 Q3ScrollView::contentsMousePressEvent(event);
2166} 2177}
2167 2178
2168void KOAgenda::storePosition() 2179void KOAgenda::storePosition()
@@ -2196,13 +2207,13 @@ void KOAgenda::restorePosition()
2196void KOAgenda::moveChild( QWidget *w, int x , int y ) 2207void KOAgenda::moveChild( QWidget *w, int x , int y )
2197{ 2208{
2198 ++x; 2209 ++x;
2199 QScrollView::moveChild( w, x , y ); 2210 Q3ScrollView::moveChild( w, x , y );
2200} 2211}
2201#include <qmessagebox.h> 2212#include <qmessagebox.h>
2202#ifdef DESKTOP_VERSION 2213#ifdef DESKTOP_VERSION
2203#include <qprinter.h> 2214#include <qprinter.h>
2204#include <qpainter.h> 2215#include <qpainter.h>
2205#include <qpaintdevicemetrics.h> 2216#include <q3paintdevicemetrics.h>
2206 2217
2207#endif 2218#endif
2208void KOAgenda::printSelection() 2219void KOAgenda::printSelection()
@@ -2231,7 +2242,7 @@ void KOAgenda::printSelection()
2231 return; 2242 return;
2232 } 2243 }
2233 QPainter p( printer ); 2244 QPainter p( printer );
2234 QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); 2245 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( printer );
2235 QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() ); 2246 QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() );
2236 //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true ); 2247 //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true );
2237 int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); 2248 int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height();
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h
index 380ce62..0708341 100644
--- a/korganizer/koagenda.h
+++ b/korganizer/koagenda.h
@@ -23,27 +23,36 @@
23#ifndef KOAGENDA_H 23#ifndef KOAGENDA_H
24#define KOAGENDA_H 24#define KOAGENDA_H
25 25
26#include <qscrollview.h> 26#include <q3scrollview.h>
27#include <qtimer.h> 27#include <qtimer.h>
28#include <qmemarray.h> 28#include <q3memarray.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qpixmap.h> 30#include <qpixmap.h>
31#include <qguardedptr.h> 31#include <qpointer.h>
32//Added by qt3to4:
33#include <QResizeEvent>
34#include <Q3Frame>
35#include <QLabel>
36#include <QMouseEvent>
37#include <Q3PtrList>
38#include <Q3PopupMenu>
39#include <QKeyEvent>
40#include <QEvent>
32 41
33#include "koagendaitem.h" 42#include "koagendaitem.h"
34#include "koeventview.h" 43#include "koeventview.h"
35 44
36class QPopupMenu; 45class Q3PopupMenu;
37class QTime; 46class QTime;
38class KConfig; 47class KConfig;
39class QFrame; 48class Q3Frame;
40class KOAgenda; 49class KOAgenda;
41class KCal::Event; 50class KCal::Event;
42class KCal::Todo; 51class KCal::Todo;
43 52
44using namespace KCal; 53using namespace KCal;
45 54
46class MarcusBains : public QFrame { 55class MarcusBains : public Q3Frame {
47 Q_OBJECT 56 Q_OBJECT
48 public: 57 public:
49 MarcusBains(KOAgenda *agenda=0,const char *name=0); 58 MarcusBains(KOAgenda *agenda=0,const char *name=0);
@@ -63,7 +72,7 @@ class MarcusBains : public QFrame {
63}; 72};
64 73
65 74
66class KOAgenda : public QScrollView 75class KOAgenda : public Q3ScrollView
67{ 76{
68 Q_OBJECT 77 Q_OBJECT
69 public: 78 public:
@@ -71,9 +80,9 @@ class KOAgenda : public QScrollView
71 RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT }; 80 RESIZETOP, RESIZEBOTTOM, RESIZELEFT, RESIZERIGHT };
72 81
73 KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0, 82 KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0,
74 const char * name=0, WFlags f=0 ); 83 const char * name=0, Qt::WFlags f=0 );
75 KOAgenda ( int columns, QWidget * parent=0, 84 KOAgenda ( int columns, QWidget * parent=0,
76 const char * name=0, WFlags f=0 ); 85 const char * name=0, Qt::WFlags f=0 );
77 virtual ~KOAgenda(); 86 virtual ~KOAgenda();
78 bool mInvalidPixmap; 87 bool mInvalidPixmap;
79 88
@@ -117,7 +126,7 @@ class KOAgenda : public QScrollView
117 126
118 void checkScrollBoundaries(); 127 void checkScrollBoundaries();
119 128
120 void setHolidayMask(QMemArray<bool> *); 129 void setHolidayMask(Q3MemArray<bool> *);
121 void setDateList(const DateList &selectedDates); 130 void setDateList(const DateList &selectedDates);
122 DateList dateList() const; 131 DateList dateList() const;
123 void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false); 132 void drawContentsToPainter( QPainter* paint = 0, bool backgroundOnly = false);
@@ -277,10 +286,10 @@ class KOAgenda : public QScrollView
277 KOAgendaItem *mClickedItem; 286 KOAgendaItem *mClickedItem;
278 287
279 // The KOAgendaItem, which is being moved/resized 288 // The KOAgendaItem, which is being moved/resized
280 QGuardedPtr<KOAgendaItem> mActionItem; 289 QPointer<KOAgendaItem> mActionItem;
281 290
282 // Currently selected item 291 // Currently selected item
283 QGuardedPtr<KOAgendaItem> mSelectedItem; 292 QPointer<KOAgendaItem> mSelectedItem;
284 293
285 // The Marcus Bains Line widget. 294 // The Marcus Bains Line widget.
286 MarcusBains *mMarcusBains; 295 MarcusBains *mMarcusBains;
@@ -291,16 +300,16 @@ class KOAgenda : public QScrollView
291 bool mItemMoved; 300 bool mItemMoved;
292 301
293 // List of all Items contained in agenda 302 // List of all Items contained in agenda
294 QPtrList<KOAgendaItem> mItems; 303 Q3PtrList<KOAgendaItem> mItems;
295 QPtrList<KOAgendaItem> mUnusedItems; 304 Q3PtrList<KOAgendaItem> mUnusedItems;
296 KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); 305 KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport);
297 QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems 306 Q3PopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems
298 QPopupMenu *mNewItemPopup; 307 Q3PopupMenu *mNewItemPopup;
299 308
300 int mOldLowerScrollValue; 309 int mOldLowerScrollValue;
301 int mOldUpperScrollValue; 310 int mOldUpperScrollValue;
302 KOAgendaItem * getItemForTodo ( Todo * todo ); 311 KOAgendaItem * getItemForTodo ( Todo * todo );
303 QMemArray<bool> *mHolidayMask; 312 Q3MemArray<bool> *mHolidayMask;
304 int mCurPixWid; 313 int mCurPixWid;
305 int mCurPixHei; 314 int mCurPixHei;
306}; 315};
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 407424d..0f9a38f 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -19,13 +19,23 @@
19 19
20#include <qlabel.h> 20#include <qlabel.h>
21#include <qlayout.h> 21#include <qlayout.h>
22#include <qhbox.h> 22#include <q3hbox.h>
23#include <qvbox.h> 23#include <q3vbox.h>
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qwhatsthis.h> 25#include <q3whatsthis.h>
26#include <qdragobject.h> 26#include <q3dragobject.h>
27#include <qdrawutil.h> 27#include <qdrawutil.h>
28#include <qpainter.h> 28#include <qpainter.h>
29#include <QDesktopWidget>
30//Added by qt3to4:
31#include <Q3PtrList>
32#include <QPixmap>
33#include <QDragEnterEvent>
34#include <QDropEvent>
35#include <QResizeEvent>
36#include <QMouseEvent>
37#include <QEvent>
38#include <QPaintEvent>
29 39
30#include <kiconloader.h> 40#include <kiconloader.h>
31#include <kdebug.h> 41#include <kdebug.h>
@@ -57,10 +67,10 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0;
57 67
58//-------------------------------------------------------------------------- 68//--------------------------------------------------------------------------
59 69
60class KOAgendaItemWhatsThis :public QWhatsThis 70class KOAgendaItemWhatsThis :public Q3WhatsThis
61{ 71{
62public: 72public:
63 KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { }; 73 KOAgendaItemWhatsThis( KOAgendaItem* view ) : Q3WhatsThis( view ),_view (view) { };
64 74
65protected: 75protected:
66 virtual QString text( const QPoint& ) 76 virtual QString text( const QPoint& )
@@ -72,15 +82,15 @@ private:
72}; 82};
73 83
74KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, 84KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday,
75 const char *name,WFlags) : 85 const char *name,Qt::WFlags) :
76 QWidget(parent, name), mIncidence(incidence), mDate(qd) 86 QWidget(parent, name), mIncidence(incidence), mDate(qd)
77{ 87{
78#ifndef DESKTOP_VERSION 88#ifndef DESKTOP_VERSION
79 //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); 89 //QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
80#endif 90#endif
81 mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this); 91 mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this);
82 int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase 92 Qt::WindowFlags wflags = windowFlags() |Qt::WRepaintNoErase;// WResizeNoErase
83 setWFlags ( wflags); 93 setWindowFlags ( wflags);
84 mAllDay = allday; 94 mAllDay = allday;
85 init ( incidence, qd ); 95 init ( incidence, qd );
86 //setMouseTracking(true); 96 //setMouseTracking(true);
@@ -103,7 +113,7 @@ void KOAgendaItem::initColor ()
103 if ( (mIncidence->typeID() == todoID ) && 113 if ( (mIncidence->typeID() == todoID ) &&
104 ( !((static_cast<Todo*>(mIncidence))->isCompleted()) && 114 ( !((static_cast<Todo*>(mIncidence))->isCompleted()) &&
105 ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) { 115 ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) {
106 if ( (static_cast<Todo*>(mIncidence))->dtDue() < QDateTime::currentDateTime().date()) 116 if ( (static_cast<Todo*>(mIncidence))->dtDue() < (QDateTime)QDateTime::currentDateTime().date())
107 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; 117 mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ;
108 else 118 else
109 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor; 119 mBackgroundColor = KOPrefs::instance()->mTodoDueTodayColor;
@@ -132,7 +142,7 @@ void KOAgendaItem::initColor ()
132 } 142 }
133 mColorGroup = QColorGroup( BackgroundColor.light(), 143 mColorGroup = QColorGroup( BackgroundColor.light(),
134 BackgroundColor.dark(),BackgroundColor.light(), 144 BackgroundColor.dark(),BackgroundColor.light(),
135 BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; 145 BackgroundColor.dark(),BackgroundColor, Qt::black, BackgroundColor) ;
136 setBackgroundColor( mBackgroundColor ); 146 setBackgroundColor( mBackgroundColor );
137 mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); 147 mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250);
138} 148}
@@ -228,28 +238,28 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
228 ++yOff; 238 ++yOff;
229 } 239 }
230 if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) { 240 if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) {
231 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, red ); 241 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::red );
232 if ( horLayout ) 242 if ( horLayout )
233 ++xOff; 243 ++xOff;
234 else 244 else
235 ++yOff; 245 ++yOff;
236 } 246 }
237 if (mIncidence->doesRecur()) { 247 if (mIncidence->doesRecur()) {
238 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, blue ); 248 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::blue );
239 if ( horLayout ) 249 if ( horLayout )
240 ++xOff; 250 ++xOff;
241 else 251 else
242 ++yOff; 252 ++yOff;
243 } 253 }
244 if (mIncidence->description().length() > 0) { 254 if (mIncidence->description().length() > 0) {
245 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkGreen ); 255 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkGreen );
246 if ( horLayout ) 256 if ( horLayout )
247 ++xOff; 257 ++xOff;
248 else 258 else
249 ++yOff; 259 ++yOff;
250 } 260 }
251 if (mIncidence->isReadOnly()) { 261 if (mIncidence->isReadOnly()) {
252 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, white ); 262 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::white );
253 if ( horLayout ) 263 if ( horLayout )
254 ++xOff; 264 ++xOff;
255 else 265 else
@@ -259,7 +269,7 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
259 if (mIncidence->attendeeCount()>0) { 269 if (mIncidence->attendeeCount()>0) {
260 270
261 if (mIncidence->organizer() == KOPrefs::instance()->email()) { 271 if (mIncidence->organizer() == KOPrefs::instance()->email()) {
262 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, black ); 272 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::black );
263 if ( horLayout ) 273 if ( horLayout )
264 ++xOff; 274 ++xOff;
265 else 275 else
@@ -270,14 +280,14 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout)
270 280
271 281
272 } else { 282 } else {
273 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, yellow ); 283 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::yellow );
274 if ( horLayout ) 284 if ( horLayout )
275 ++xOff; 285 ++xOff;
276 else 286 else
277 ++yOff; 287 ++yOff;
278 288
279 } 289 }
280 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkYellow ); 290 p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkYellow );
281 if ( horLayout ) 291 if ( horLayout )
282 ++xOff; 292 ++xOff;
283 else 293 else
@@ -420,9 +430,9 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
420 } 430 }
421 int align; 431 int align;
422#ifndef DESKTOP_VERSION 432#ifndef DESKTOP_VERSION
423 align = ( AlignLeft|WordBreak|AlignTop); 433 align = ( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop);
424#else 434#else
425 align = ( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 435 align = ( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
426#endif 436#endif
427 if ( addIcon ) { 437 if ( addIcon ) {
428 if ( ! horLayout ) { 438 if ( ! horLayout ) {
@@ -435,7 +445,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
435 } 445 }
436 } 446 }
437 if ( mWhiteText ) 447 if ( mWhiteText )
438 paint->setPen ( white); 448 paint->setPen ( Qt::white);
439 if ( x < 0 ) { 449 if ( x < 0 ) {
440 w = w+x-3; 450 w = w+x-3;
441 x = 3; 451 x = 3;
@@ -444,9 +454,9 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint )
444 if ( w > parentWidget()->width() ){ 454 if ( w > parentWidget()->width() ){
445 w = parentWidget()->width() - 6; 455 w = parentWidget()->width() - 6;
446#ifndef DESKTOP_VERSION 456#ifndef DESKTOP_VERSION
447 align = ( AlignHCenter|WordBreak|AlignTop); 457 align = ( Qt::AlignHCenter|Qt::TextWordWrap|Qt::AlignTop);
448#else 458#else
449 align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop); 459 align = ( Qt::AlignHCenter|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
450#endif 460#endif
451 461
452 } 462 }
@@ -561,7 +571,7 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
561 } 571 }
562 } 572 }
563 //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh); 573 //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh);
564 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP); 574 bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,QPainter::CompositionMode_Source);
565} 575}
566void KOAgendaItem::computeText() 576void KOAgendaItem::computeText()
567{ 577{
@@ -628,7 +638,7 @@ void KOAgendaItem::computeText()
628 if (!mIncidence->location().isEmpty()) { 638 if (!mIncidence->location().isEmpty()) {
629 tipText += "\n"+i18n("Location: ")+mIncidence->location(); 639 tipText += "\n"+i18n("Location: ")+mIncidence->location();
630 } 640 }
631 QToolTip::add(this,tipText,toolTipGroup(),""); 641 QToolTip::add(this,tipText /*TODO:hacker: ,toolTipGroup(),"" */);
632#endif 642#endif
633} 643}
634void KOAgendaItem::updateItem() 644void KOAgendaItem::updateItem()
@@ -795,7 +805,7 @@ void KOAgendaItem::expandRight(int dx)
795 805
796QToolTipGroup *KOAgendaItem::toolTipGroup() 806QToolTipGroup *KOAgendaItem::toolTipGroup()
797{ 807{
798 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); 808 /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */
799 return mToolTipGroup; 809 return mToolTipGroup;
800} 810}
801 811
@@ -803,7 +813,7 @@ void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e )
803{ 813{
804#ifndef KORG_NODND 814#ifndef KORG_NODND
805 if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) || 815 if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) ||
806 !QTextDrag::canDecode( e ) ) { 816 !Q3TextDrag::canDecode( e ) ) {
807 e->ignore(); 817 e->ignore();
808 return; 818 return;
809 } 819 }
@@ -815,7 +825,7 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
815{ 825{
816#ifndef KORG_NODND 826#ifndef KORG_NODND
817 QString text; 827 QString text;
818 if(QTextDrag::decode(e,text)) 828 if(Q3TextDrag::decode(e,text))
819 { 829 {
820 kdDebug() << "Dropped : " << text << endl; 830 kdDebug() << "Dropped : " << text << endl;
821 QStringList emails = QStringList::split(",",text); 831 QStringList emails = QStringList::split(",",text);
@@ -833,12 +843,12 @@ void KOAgendaItem::dropEvent( QDropEvent *e )
833} 843}
834 844
835 845
836QPtrList<KOAgendaItem> KOAgendaItem::conflictItems() 846Q3PtrList<KOAgendaItem> KOAgendaItem::conflictItems()
837{ 847{
838 return mConflictItems; 848 return mConflictItems;
839} 849}
840 850
841void KOAgendaItem::setConflictItems(QPtrList<KOAgendaItem> ci) 851void KOAgendaItem::setConflictItems(Q3PtrList<KOAgendaItem> ci)
842{ 852{
843 mConflictItems = ci; 853 mConflictItems = ci;
844 KOAgendaItem *item; 854 KOAgendaItem *item;
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h
index 27ee720..17cf975 100644
--- a/korganizer/koagendaitem.h
+++ b/korganizer/koagendaitem.h
@@ -19,11 +19,18 @@
19#ifndef KOAGENDAITEM_H 19#ifndef KOAGENDAITEM_H
20#define KOAGENDAITEM_H 20#define KOAGENDAITEM_H
21 21
22#include <qframe.h> 22#include <q3frame.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qpixmap.h> 24#include <qpixmap.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qpalette.h> 26#include <qpalette.h>
27//Added by qt3to4:
28#include <QDropEvent>
29#include <QPaintEvent>
30#include <QResizeEvent>
31#include <Q3PtrList>
32#include <QEvent>
33#include <QDragEnterEvent>
27 34
28#include <libkcal/incidence.h> 35#include <libkcal/incidence.h>
29 36
@@ -45,7 +52,7 @@ class KOAgendaItem : public QWidget
45 Q_OBJECT 52 Q_OBJECT
46 public: 53 public:
47 KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0, 54 KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0,
48 WFlags f=0 ); 55 Qt::WFlags f=0 );
49 ~KOAgendaItem(); 56 ~KOAgendaItem();
50 QString getWhatsThisText(); 57 QString getWhatsThisText();
51 void init ( Incidence *incidence, QDate qd ); 58 void init ( Incidence *incidence, QDate qd );
@@ -96,8 +103,8 @@ class KOAgendaItem : public QWidget
96 103
97 static QToolTipGroup *toolTipGroup(); 104 static QToolTipGroup *toolTipGroup();
98 105
99 QPtrList<KOAgendaItem> conflictItems(); 106 Q3PtrList<KOAgendaItem> conflictItems();
100 void setConflictItems(QPtrList<KOAgendaItem>); 107 void setConflictItems(Q3PtrList<KOAgendaItem>);
101 void addConflictItem(KOAgendaItem *ci); 108 void addConflictItem(KOAgendaItem *ci);
102 void paintMe( bool, QPainter* painter = 0 ); 109 void paintMe( bool, QPainter* painter = 0 );
103 void repaintMe(); 110 void repaintMe();
@@ -161,7 +168,7 @@ class KOAgendaItem : public QWidget
161 QColorGroup mColorGroup; 168 QColorGroup mColorGroup;
162 QString mDisplayedText; 169 QString mDisplayedText;
163 bool mSelected; 170 bool mSelected;
164 QPtrList<KOAgendaItem> mConflictItems; 171 Q3PtrList<KOAgendaItem> mConflictItems;
165}; 172};
166 173
167#endif // KOAGENDAITEM_H 174#endif // KOAGENDAITEM_H
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6e65a03..87993ae 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -21,21 +21,33 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qhbox.h> 24#include <q3hbox.h>
25#include <qvbox.h> 25#include <q3vbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qframe.h> 27#include <q3frame.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#ifndef KORG_NOSPLITTER 29#ifndef KORG_NOSPLITTER
30#include <qsplitter.h> 30#include <qsplitter.h>
31#endif 31#endif
32#include <qfont.h> 32#include <qfont.h>
33#include <qfontmetrics.h> 33#include <qfontmetrics.h>
34#include <qpopupmenu.h> 34#include <q3popupmenu.h>
35#include <qtooltip.h> 35#include <qtooltip.h>
36#include <qpainter.h> 36#include <qpainter.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qapplication.h> 38#include <qapplication.h>
39#include <QDesktopWidget>
40//Added by qt3to4:
41#include <QResizeEvent>
42#include <QPixmap>
43#include <QMouseEvent>
44#include <Q3GridLayout>
45#include <Q3ValueList>
46#include <QKeyEvent>
47#include <Q3HBoxLayout>
48#include <Q3VBoxLayout>
49#include <QPaintEvent>
50#include <Q3PtrList>
39 51
40#include <kapplication.h> 52#include <kapplication.h>
41#include <KDGanttMinimizeSplitter.h> 53#include <KDGanttMinimizeSplitter.h>
@@ -78,8 +90,8 @@ using namespace KOrg;
78 90
79#define IDLETIMEOUT 45 91#define IDLETIMEOUT 45
80 92
81TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : 93TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,Qt::WFlags f) :
82 QScrollView(parent,name,f) 94 Q3ScrollView(parent,name,f)
83{ 95{
84 myPix.resize( 1, 1 ); 96 myPix.resize( 1, 1 );
85 mRows = rows; 97 mRows = rows;
@@ -95,7 +107,7 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) :
95 107
96 resizeContents(50,mRows * mCellHeight); 108 resizeContents(50,mRows * mCellHeight);
97 109
98 viewport()->setBackgroundMode( PaletteBackground ); 110 viewport()->setBackgroundMode( Qt::PaletteBackground );
99} 111}
100 112
101void TimeLabels::setCellHeight(int height) 113void TimeLabels::setCellHeight(int height)
@@ -283,7 +295,7 @@ void TimeLabels::paintEvent(QPaintEvent*)
283//////////////////////////////////////////////////////////////////////////// 295////////////////////////////////////////////////////////////////////////////
284 296
285EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) 297EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name)
286 : QFrame(parent,name) 298 : Q3Frame(parent,name)
287{ 299{
288 mColumns = 1; 300 mColumns = 1;
289 mTopBox = 0; 301 mTopBox = 0;
@@ -393,7 +405,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
393 expandPix = SmallIcon("1leftrightarrow" ); 405 expandPix = SmallIcon("1leftrightarrow" );
394 } 406 }
395 407
396 QBoxLayout *topLayout = new QVBoxLayout(this); 408 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
397 409
398 // Create day name labels for agenda columns 410 // Create day name labels for agenda columns
399 // Create agenda splitter 411 // Create agenda splitter
@@ -401,13 +413,13 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
401 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); 413 mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this);
402 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 414 mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
403 topLayout->addWidget( mSplitterAgenda ); 415 topLayout->addWidget( mSplitterAgenda );
404 mAllDayFrame = new QHBox(mSplitterAgenda); 416 mAllDayFrame = new Q3HBox(mSplitterAgenda);
405 mAllDayFrame->setFocusPolicy(NoFocus); 417 mAllDayFrame->setFocusPolicy(Qt::NoFocus);
406 QWidget *agendaFrame = new QWidget(mSplitterAgenda); 418 QWidget *agendaFrame = new QWidget(mSplitterAgenda);
407 agendaFrame->setFocusPolicy(NoFocus); 419 agendaFrame->setFocusPolicy(Qt::NoFocus);
408 420
409 // Create all-day agenda widget 421 // Create all-day agenda widget
410 mDummyAllDayLeft = new QVBox( mAllDayFrame ); 422 mDummyAllDayLeft = new Q3VBox( mAllDayFrame );
411 423
412 mExpandButton = new QPushButton(mDummyAllDayLeft); 424 mExpandButton = new QPushButton(mDummyAllDayLeft);
413 mExpandButton->setPixmap( expandPix ); 425 mExpandButton->setPixmap( expandPix );
@@ -420,16 +432,16 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
420 // QSizePolicy::Fixed ) ); 432 // QSizePolicy::Fixed ) );
421 mExpandButton->setFixedSize( widebut, widebut); 433 mExpandButton->setFixedSize( widebut, widebut);
422 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); 434 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
423 mExpandButton->setFocusPolicy(NoFocus); 435 mExpandButton->setFocusPolicy(Qt::NoFocus);
424 mAllDayAgenda = new KOAgenda(1,mAllDayFrame); 436 mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
425 mAllDayAgenda->setFocusPolicy(NoFocus); 437 mAllDayAgenda->setFocusPolicy(Qt::NoFocus);
426 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); 438 QLabel *dummyAllDayRight = new QLabel (mAllDayFrame);
427 439
428 // Create event context menu for all day agenda 440 // Create event context menu for all day agenda
429 //mAllDayAgendaPopup = eventPopup(); 441 //mAllDayAgendaPopup = eventPopup();
430 442
431 // Create agenda frame 443 // Create agenda frame
432 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); 444 Q3GridLayout *agendaLayout = new Q3GridLayout(agendaFrame,4,3);
433 // QHBox *agendaFrame = new QHBox(splitterAgenda); 445 // QHBox *agendaFrame = new QHBox(splitterAgenda);
434 446
435 // create event indicator bars 447 // create event indicator bars
@@ -437,10 +449,10 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
437#ifndef DESKTOP_VERSION 449#ifndef DESKTOP_VERSION
438 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 450 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
439#endif 451#endif
440 mDayLabelsFrame = new QHBox(agendaFrame); 452 mDayLabelsFrame = new Q3HBox(agendaFrame);
441 //topLayout->addWidget(mDayLabelsFrame); 453 //topLayout->addWidget(mDayLabelsFrame);
442 mDayLabels = new QFrame (mDayLabelsFrame); 454 mDayLabels = new Q3Frame (mDayLabelsFrame);
443 mLayoutDayLabels = new QHBoxLayout(mDayLabels); 455 mLayoutDayLabels = new Q3HBoxLayout(mDayLabels);
444 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); 456 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
445 agendaLayout->addWidget(mEventIndicatorTop,1,1); 457 agendaLayout->addWidget(mEventIndicatorTop,1,1);
446 458
@@ -460,12 +472,12 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
460 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); 472 mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame);
461 agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); 473 agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2);
462 agendaLayout->setColStretch(1,1); 474 agendaLayout->setColStretch(1,1);
463 mAgenda->setFocusPolicy(NoFocus); 475 mAgenda->setFocusPolicy(Qt::NoFocus);
464 // Create event context menu for agenda 476 // Create event context menu for agenda
465 mAllAgendaPopup = eventPopup(); 477 mAllAgendaPopup = eventPopup();
466 478
467#if 0 479#if 0
468 mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), 480 mAllAgendaPopup->addAdditionalItem(QIcon(SmallIcon("bell")),
469 i18n("Toggle Alarm"),mAgenda, 481 i18n("Toggle Alarm"),mAgenda,
470 SLOT(popupAlarm()),true); 482 SLOT(popupAlarm()),true);
471 483
@@ -918,9 +930,9 @@ int KOAgendaView::currentDateCount()
918 return mSelectedDates.count(); 930 return mSelectedDates.count();
919} 931}
920 932
921QPtrList<Incidence> KOAgendaView::selectedIncidences() 933Q3PtrList<Incidence> KOAgendaView::selectedIncidences()
922{ 934{
923 QPtrList<Incidence> selected; 935 Q3PtrList<Incidence> selected;
924 Incidence *incidence; 936 Incidence *incidence;
925 937
926 incidence = mAgenda->selectedIncidence(); 938 incidence = mAgenda->selectedIncidence();
@@ -987,8 +999,8 @@ void KOAgendaView::updateConfig()
987 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 999 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
988 1000
989 // ToolTips displaying summary of events 1001 // ToolTips displaying summary of events
990 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() 1002 /* TODO:hacker: KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
991 ->mEnableToolTips); 1003 ->mEnableToolTips); */
992 1004
993 //setHolidayMasks(); 1005 //setHolidayMasks();
994 1006
@@ -1117,7 +1129,7 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end )
1117} 1129}
1118 1130
1119 1131
1120void KOAgendaView::showEvents(QPtrList<Event>) 1132void KOAgendaView::showEvents(Q3PtrList<Event>)
1121{ 1133{
1122 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; 1134 kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl;
1123} 1135}
@@ -1165,11 +1177,11 @@ void KOAgendaView::fillAgenda()
1165 mMinY.resize(mSelectedDates.count()); 1177 mMinY.resize(mSelectedDates.count());
1166 mMaxY.resize(mSelectedDates.count()); 1178 mMaxY.resize(mSelectedDates.count());
1167 1179
1168 QPtrList<Event> dayEvents; 1180 Q3PtrList<Event> dayEvents;
1169 1181
1170 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1182 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1171 // Therefore, gtodoset all of them. 1183 // Therefore, gtodoset all of them.
1172 QPtrList<Todo> todos = calendar()->todos(); 1184 Q3PtrList<Todo> todos = calendar()->todos();
1173 1185
1174 mAgenda->setDateList(mSelectedDates); 1186 mAgenda->setDateList(mSelectedDates);
1175 1187
@@ -1300,7 +1312,7 @@ void KOAgendaView::fillAgenda()
1300 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. 1312 // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue.
1301 // Already completed items can be displayed on their original due date 1313 // Already completed items can be displayed on their original due date
1302 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda 1314 //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda
1303 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; 1315 bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)today) && KOPrefs::instance()->mShowTodoInAgenda;
1304 bool fillIn = false; 1316 bool fillIn = false;
1305 if ( todo->hasCompletedDate() && todo->completed().date() == currentDate ) 1317 if ( todo->hasCompletedDate() && todo->completed().date() == currentDate )
1306 fillIn = true; 1318 fillIn = true;
@@ -1503,7 +1515,7 @@ void KOAgendaView::readSettings(KConfig *config)
1503 config->setGroup("Views"); 1515 config->setGroup("Views");
1504 1516
1505 //#ifndef KORG_NOSPLITTER 1517 //#ifndef KORG_NOSPLITTER
1506 QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); 1518 Q3ValueList<int> sizes = config->readIntListEntry("Separator AgendaView");
1507 if (sizes.count() == 2) { 1519 if (sizes.count() == 2) {
1508 if ( sizes[0] < 20 ) { 1520 if ( sizes[0] < 20 ) {
1509 sizes[1] = sizes[1] +20 - sizes[0]; 1521 sizes[1] = sizes[1] +20 - sizes[0];
@@ -1524,7 +1536,7 @@ void KOAgendaView::writeSettings(KConfig *config)
1524 config->setGroup("Views"); 1536 config->setGroup("Views");
1525 1537
1526 //#ifndef KORG_NOSPLITTER 1538 //#ifndef KORG_NOSPLITTER
1527 QValueList<int> list = mSplitterAgenda->sizes(); 1539 Q3ValueList<int> list = mSplitterAgenda->sizes();
1528 config->writeEntry("Separator AgendaView",list); 1540 config->writeEntry("Separator AgendaView",list);
1529 //qDebug("write %d %d ", list[0],list[1] ); 1541 //qDebug("write %d %d ", list[0],list[1] );
1530 //#endif 1542 //#endif
@@ -1541,7 +1553,7 @@ void KOAgendaView::setHolidayMasks()
1541 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); 1553 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7);
1542 bool showHoliday = false; 1554 bool showHoliday = false;
1543 if ( KOPrefs::instance()->mExcludeHolidays ) { 1555 if ( KOPrefs::instance()->mExcludeHolidays ) {
1544 QPtrList<Event> events = calendar()->events( date, true ); 1556 Q3PtrList<Event> events = calendar()->events( date, true );
1545 Event *event; 1557 Event *event;
1546 for( event = events.first(); event; event = events.next() ) { 1558 for( event = events.first(); event; event = events.next() ) {
1547 if ( event->isHoliday()) { 1559 if ( event->isHoliday()) {
@@ -1663,7 +1675,7 @@ void KOAgendaView::updateTodo( Todo * t, int )
1663 removeAD = true; 1675 removeAD = true;
1664 } 1676 }
1665 else { 1677 else {
1666 bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; 1678 bool overdue = (!t->isCompleted()) && (t->dtDue() < (QDateTime)QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ;
1667 if ( overdue && 1679 if ( overdue &&
1668 QDate::currentDate() >= mSelectedDates.first() && 1680 QDate::currentDate() >= mSelectedDates.first() &&
1669 QDate::currentDate() <= mSelectedDates.last()) { 1681 QDate::currentDate() <= mSelectedDates.last()) {
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 5e68146..3b871d9 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -23,21 +23,31 @@
23#ifndef KOAGENDAVIEW_H 23#ifndef KOAGENDAVIEW_H
24#define KOAGENDAVIEW_H 24#define KOAGENDAVIEW_H
25 25
26#include <qscrollview.h> 26#include <q3scrollview.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <Q3BoxLayout>
30#ifndef DESKTOP_VERSION 31#ifndef DESKTOP_VERSION
31#include <qksplitter.h> 32#include <qksplitter.h>
32#else 33#else
33#include <qsplitter.h> 34#include <qsplitter.h>
34#endif 35#endif
35#include <qmemarray.h> 36#include <q3memarray.h>
37//Added by qt3to4:
38#include <QPaintEvent>
39#include <QResizeEvent>
40#include <Q3Frame>
41#include <QPixmap>
42#include <QLabel>
43#include <QMouseEvent>
44#include <Q3PtrList>
45#include <QKeyEvent>
36 46
37#include "koeventview.h" 47#include "koeventview.h"
38 48
39class QHBox; 49class Q3HBox;
40class QFrame; 50class Q3Frame;
41class QLabel; 51class QLabel;
42class QPushButton; 52class QPushButton;
43class CalendarView; 53class CalendarView;
@@ -55,7 +65,7 @@ class KOAgendaButton : public QPushButton
55 { 65 {
56 mNum = -3; 66 mNum = -3;
57 setFlat( true ); 67 setFlat( true );
58 setFocusPolicy(NoFocus); 68 setFocusPolicy(Qt::NoFocus);
59 setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); 69 setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding ));
60 connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) ); 70 connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) );
61 }; 71 };
@@ -70,10 +80,10 @@ private:
70 int mNum; 80 int mNum;
71}; 81};
72 82
73class TimeLabels : public QScrollView { 83class TimeLabels : public Q3ScrollView {
74 Q_OBJECT 84 Q_OBJECT
75 public: 85 public:
76 TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); 86 TimeLabels(int rows,QWidget *parent=0,const char *name=0,Qt::WFlags f=0);
77 87
78 void setCellHeight(int height); 88 void setCellHeight(int height);
79 89
@@ -113,7 +123,7 @@ class TimeLabels : public QScrollView {
113 KOAgenda* mAgenda; 123 KOAgenda* mAgenda;
114}; 124};
115 125
116class EventIndicator : public QFrame { 126class EventIndicator : public Q3Frame {
117 Q_OBJECT 127 Q_OBJECT
118 public: 128 public:
119 enum Location { Top, Bottom }; 129 enum Location { Top, Bottom };
@@ -132,11 +142,11 @@ class EventIndicator : public QFrame {
132 int mXOffset; 142 int mXOffset;
133 KDGanttMinimizeSplitter* mPaintWidget; 143 KDGanttMinimizeSplitter* mPaintWidget;
134 int mColumns; 144 int mColumns;
135 QHBox *mTopBox; 145 Q3HBox *mTopBox;
136 QBoxLayout *mTopLayout; 146 Q3BoxLayout *mTopLayout;
137 Location mLocation; 147 Location mLocation;
138 QPixmap mPixmap; 148 QPixmap mPixmap;
139 QMemArray<bool> mEnabled; 149 Q3MemArray<bool> mEnabled;
140}; 150};
141 151
142/** 152/**
@@ -159,7 +169,7 @@ class KOAgendaView : public KOEventView {
159 virtual int currentDateCount(); 169 virtual int currentDateCount();
160 170
161 /** returns the currently selected events */ 171 /** returns the currently selected events */
162 virtual QPtrList<Incidence> selectedIncidences(); 172 virtual Q3PtrList<Incidence> selectedIncidences();
163 173
164 /** returns the currently selected events */ 174 /** returns the currently selected events */
165 virtual DateList selectedDates(); 175 virtual DateList selectedDates();
@@ -185,7 +195,7 @@ class KOAgendaView : public KOEventView {
185 virtual void updateView(); 195 virtual void updateView();
186 virtual void updateConfig(); 196 virtual void updateConfig();
187 virtual void showDates(const QDate &start, const QDate &end); 197 virtual void showDates(const QDate &start, const QDate &end);
188 virtual void showEvents(QPtrList<Event> eventList); 198 virtual void showEvents(Q3PtrList<Event> eventList);
189 199
190 void updateTodo( Todo *, int ); 200 void updateTodo( Todo *, int );
191 void changeEventDisplay(Event *, int); 201 void changeEventDisplay(Event *, int);
@@ -260,10 +270,10 @@ class KOAgendaView : public KOEventView {
260 QTimer* mIdleTimer; 270 QTimer* mIdleTimer;
261 QDateTime mIdleStart; 271 QDateTime mIdleStart;
262 // view widgets 272 // view widgets
263 QFrame *mDayLabels; 273 Q3Frame *mDayLabels;
264 QHBox *mDayLabelsFrame; 274 Q3HBox *mDayLabelsFrame;
265 QBoxLayout *mLayoutDayLabels; 275 Q3BoxLayout *mLayoutDayLabels;
266 QFrame *mAllDayFrame; 276 Q3Frame *mAllDayFrame;
267 KOAgenda *mAllDayAgenda; 277 KOAgenda *mAllDayAgenda;
268 KOAgenda *mAgenda; 278 KOAgenda *mAgenda;
269 TimeLabels *mTimeLabels; 279 TimeLabels *mTimeLabels;
@@ -284,12 +294,12 @@ class KOAgendaView : public KOEventView {
284 EventIndicator *mEventIndicatorTop; 294 EventIndicator *mEventIndicatorTop;
285 EventIndicator *mEventIndicatorBottom; 295 EventIndicator *mEventIndicatorBottom;
286 296
287 QMemArray<int> mMinY; 297 Q3MemArray<int> mMinY;
288 QMemArray<int> mMaxY; 298 Q3MemArray<int> mMaxY;
289 299
290 QMemArray<bool> mHolidayMask; 300 Q3MemArray<bool> mHolidayMask;
291 301
292 QPtrList<KOAgendaButton> mDayLabelsList; 302 Q3PtrList<KOAgendaButton> mDayLabelsList;
293 QDateTime mTimeSpanBegin; 303 QDateTime mTimeSpanBegin;
294 QDateTime mTimeSpanEnd; 304 QDateTime mTimeSpanEnd;
295 bool mTimeSpanInAllDay; 305 bool mTimeSpanInAllDay;
diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h
index c8dcf45..493d9e1 100644
--- a/korganizer/kocounterdialog.h
+++ b/korganizer/kocounterdialog.h
@@ -22,7 +22,7 @@
22// Viewer dialog for counter events. 22// Viewer dialog for counter events.
23// 23//
24 24
25#include <qtextview.h> 25#include <q3textview.h>
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28 28
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 52fd1e8..4f681b3 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -24,9 +24,18 @@
24 24
25#include <qevent.h> 25#include <qevent.h>
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qwhatsthis.h> 29#include <q3whatsthis.h>
30//Added by qt3to4:
31#include <QDragLeaveEvent>
32#include <Q3Frame>
33#include <QDragEnterEvent>
34#include <QDragMoveEvent>
35#include <QDropEvent>
36#include <QResizeEvent>
37#include <QMouseEvent>
38#include <QPaintEvent>
30 39
31#include <kglobal.h> 40#include <kglobal.h>
32#include <kdebug.h> 41#include <kdebug.h>
@@ -54,15 +63,15 @@
54// ============================================================================ 63// ============================================================================
55 64
56DynamicTip::DynamicTip( QWidget * parent ) 65DynamicTip::DynamicTip( QWidget * parent )
57 : QToolTip( parent ) 66 /* TODO:hacker: : QToolTip( parent ) */
58{ 67{
59 matrix = (KODayMatrix*)parent; 68 matrix = (KODayMatrix*)parent;
60} 69}
61 70
62class KODaymatrixWhatsThis :public QWhatsThis 71class KODaymatrixWhatsThis :public Q3WhatsThis
63{ 72{
64public: 73public:
65 KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;}; 74 KODaymatrixWhatsThis( KODayMatrix* view ) : Q3WhatsThis( view ),_view (view) { ;};
66 ~KODaymatrixWhatsThis() { ; }; 75 ~KODaymatrixWhatsThis() { ; };
67 76
68protected: 77protected:
@@ -91,7 +100,7 @@ void DynamicTip::maybeTip( const QPoint &pos )
91 //show holiday names only 100 //show holiday names only
92 QString str = matrix->getHolidayLabel(col+row*7); 101 QString str = matrix->getHolidayLabel(col+row*7);
93 if (str.isEmpty()) return; 102 if (str.isEmpty()) return;
94 tip(rct, str); 103 /* TODO:hacker: tip(rct, str);*/
95} 104}
96 105
97 106
@@ -103,7 +112,7 @@ const int KODayMatrix::NOSELECTION = -1000;
103const int KODayMatrix::NUMDAYS = 42; 112const int KODayMatrix::NUMDAYS = 42;
104 113
105KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) 114KODayMatrix::KODayMatrix( QWidget *parent, const char *name )
106 : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) 115 : Q3Frame( parent, name , Qt::WNoAutoErase ), mCalendar( 0 )
107 116
108 117
109{ 118{
@@ -151,7 +160,7 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
151 if ( tmp < 0 || tmp > NUMDAYS-1 || !mCalendar ) 160 if ( tmp < 0 || tmp > NUMDAYS-1 || !mCalendar )
152 return QString(); 161 return QString();
153 QDate mDate = days[tmp]; 162 QDate mDate = days[tmp];
154 QPtrList<Event> eventlist = mCalendar->events(mDate); 163 Q3PtrList<Event> eventlist = mCalendar->events(mDate);
155 Event *event; 164 Event *event;
156 QStringList mToolTip; 165 QStringList mToolTip;
157 for(event=eventlist.first();event != 0;event=eventlist.next()) { 166 for(event=eventlist.first();event != 0;event=eventlist.next()) {
@@ -205,7 +214,7 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
205 } 214 }
206 mToolTip.sort(); 215 mToolTip.sort();
207 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 216 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
208 QPtrList<Todo> todolist = mCalendar->todos(mDate); 217 Q3PtrList<Todo> todolist = mCalendar->todos(mDate);
209 Todo *todo; 218 Todo *todo;
210 for(todo=todolist.first();todo != 0;todo=todolist.next()) { 219 for(todo=todolist.first();todo != 0;todo=todolist.next()) {
211 QString mToolTipText; 220 QString mToolTipText;
@@ -220,7 +229,7 @@ QString KODayMatrix::getWhatsThisText( QPoint p )
220 } 229 }
221 } 230 }
222 if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 231 if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
223 QPtrList<Journal> j_list = mCalendar->journals4Date( mDate ); 232 Q3PtrList<Journal> j_list = mCalendar->journals4Date( mDate );
224 Journal *j = j_list.first(); 233 Journal *j = j_list.first();
225 while ( j ) { 234 while ( j ) {
226 QString mToolTipText; 235 QString mToolTipText;
@@ -441,7 +450,7 @@ void KODayMatrix::updateViewTimed()
441 450
442 int i; 451 int i;
443 int timeSpan = NUMDAYS-1; 452 int timeSpan = NUMDAYS-1;
444 QPtrList<Event> events = mCalendar->events(); 453 Q3PtrList<Event> events = mCalendar->events();
445 Event *event; 454 Event *event;
446 QDateTime dt; 455 QDateTime dt;
447 bool ok; 456 bool ok;
@@ -526,7 +535,7 @@ void KODayMatrix::updateViewTimed()
526 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { 535 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) {
527 bDays.fill( false); 536 bDays.fill( false);
528 // insert due todos 537 // insert due todos
529 QPtrList<Todo> todos = mCalendar->todos( ); 538 Q3PtrList<Todo> todos = mCalendar->todos( );
530 Todo *todo; 539 Todo *todo;
531 for(todo = todos.first(); todo; todo = todos.next()) { 540 for(todo = todos.first(); todo; todo = todos.next()) {
532 //insertTodo( todo ); 541 //insertTodo( todo );
@@ -551,7 +560,7 @@ void KODayMatrix::updateViewTimed()
551 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { 560 if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) {
552 bDays.fill( false); 561 bDays.fill( false);
553 // insert due todos 562 // insert due todos
554 QPtrList<Journal> todos = mCalendar->journals( ); 563 Q3PtrList<Journal> todos = mCalendar->journals( );
555 Journal *todo; 564 Journal *todo;
556 for(todo = todos.first(); todo; todo = todos.next()) { 565 for(todo = todos.first(); todo; todo = todos.next()) {
557 int day = mStartDate.daysTo( todo->dtStart().date() ); 566 int day = mStartDate.daysTo( todo->dtStart().date() );
@@ -575,7 +584,7 @@ void KODayMatrix::updateViewTimed()
575 //qDebug("KODayMatrix::updateViewTimed "); 584 //qDebug("KODayMatrix::updateViewTimed ");
576 for(int i = 0; i < NUMDAYS; i++) { 585 for(int i = 0; i < NUMDAYS; i++) {
577 // if events are set for the day then remember to draw it bold 586 // if events are set for the day then remember to draw it bold
578 QPtrList<Event> eventlist = mCalendar->events(days[i]); 587 Q3PtrList<Event> eventlist = mCalendar->events(days[i]);
579 Event *event; 588 Event *event;
580 int numEvents = eventlist.count(); 589 int numEvents = eventlist.count();
581 QString holiStr = ""; 590 QString holiStr = "";
@@ -675,7 +684,7 @@ void KODayMatrix::updateEvents()
675 684
676 for( int i = 0; i < NUMDAYS; i++ ) { 685 for( int i = 0; i < NUMDAYS; i++ ) {
677 // if events are set for the day then remember to draw it bold 686 // if events are set for the day then remember to draw it bold
678 QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); 687 Q3PtrList<Event> eventlist = mCalendar->events( days[ i ] );
679 int numEvents = eventlist.count(); 688 int numEvents = eventlist.count();
680 Event *event; 689 Event *event;
681 for( event = eventlist.first(); event != 0;event=eventlist.next()) { 690 for( event = eventlist.first(); event != 0;event=eventlist.next()) {
@@ -739,7 +748,7 @@ int KODayMatrix::getDayIndexFrom(int x, int y)
739void KODayMatrix::mousePressEvent (QMouseEvent* e) 748void KODayMatrix::mousePressEvent (QMouseEvent* e)
740{ 749{
741 750
742 if ( e->button() == LeftButton ) 751 if ( e->button() == Qt::LeftButton )
743 mouseDown = true; 752 mouseDown = true;
744 mSelStart = getDayIndexFrom(e->x(), e->y()); 753 mSelStart = getDayIndexFrom(e->x(), e->y());
745 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1; 754 if (mSelStart > NUMDAYS-1) mSelStart=NUMDAYS-1;
@@ -752,7 +761,7 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e)
752void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) 761void KODayMatrix::mouseReleaseEvent (QMouseEvent* e)
753{ 762{
754 mRedrawNeeded = true; 763 mRedrawNeeded = true;
755 if ( e->button() == LeftButton ) 764 if ( e->button() == Qt::LeftButton )
756 if ( ! mouseDown ) { 765 if ( ! mouseDown ) {
757 return; 766 return;
758 } 767 }
@@ -1195,7 +1204,7 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
1195 //qDebug("NO redraw "); 1204 //qDebug("NO redraw ");
1196 } 1205 }
1197 1206
1198 bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP); 1207 bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,QPainter::CompositionMode_Source);
1199 mRedrawNeeded = false; 1208 mRedrawNeeded = false;
1200} 1209}
1201 1210
@@ -1208,7 +1217,7 @@ void KODayMatrix::resizeEvent(QResizeEvent * e)
1208 QRect sz = frameRect(); 1217 QRect sz = frameRect();
1209 daysize.setHeight(sz.height()*7 / NUMDAYS); 1218 daysize.setHeight(sz.height()*7 / NUMDAYS);
1210 daysize.setWidth(sz.width() / 7); 1219 daysize.setWidth(sz.width() / 7);
1211 QFrame::resizeEvent( e ); 1220 Q3Frame::resizeEvent( e );
1212} 1221}
1213 1222
1214QSize KODayMatrix::sizeHint() const 1223QSize KODayMatrix::sizeHint() const
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index b96e08f..6edf7cd 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -26,7 +26,7 @@
26#include <libkcal/calendar.h> 26#include <libkcal/calendar.h>
27 27
28#include <qstring.h> 28#include <qstring.h>
29#include <qframe.h> 29#include <q3frame.h>
30#include <qcolor.h> 30#include <qcolor.h>
31#include <qpen.h> 31#include <qpen.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
@@ -34,6 +34,14 @@
34#include <qpixmap.h> 34#include <qpixmap.h>
35#include <qbitarray.h> 35#include <qbitarray.h>
36#include <qmap.h> 36#include <qmap.h>
37//Added by qt3to4:
38#include <QDragMoveEvent>
39#include <QDropEvent>
40#include <QDragLeaveEvent>
41#include <QPaintEvent>
42#include <QResizeEvent>
43#include <QMouseEvent>
44#include <QDragEnterEvent>
37 45
38class QDragEnterEvent; 46class QDragEnterEvent;
39class QDragMoveEvent; 47class QDragMoveEvent;
@@ -51,7 +59,7 @@ using namespace KCal;
51 * This class asks the day matrix object for a appropriate label which 59 * This class asks the day matrix object for a appropriate label which
52 * is in our special case the name of the holiday or null if this day is no holiday. 60 * is in our special case the name of the holiday or null if this day is no holiday.
53 */ 61 */
54class DynamicTip : public QToolTip 62class DynamicTip /* TODO:hacker: : public QToolTip */
55{ 63{
56public: 64public:
57 65
@@ -103,7 +111,7 @@ private:
103 * 111 *
104 * @author Eitzenberger Thomas 112 * @author Eitzenberger Thomas
105 */ 113 */
106class KODayMatrix: public QFrame { 114class KODayMatrix: public Q3Frame {
107 115
108 Q_OBJECT 116 Q_OBJECT
109 117
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index ea30fac..deb1e46 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -41,6 +41,8 @@
41#include "kconfig.h" 41#include "kconfig.h"
42#include "kodialogmanager.h" 42#include "kodialogmanager.h"
43#include <kapplication.h> 43#include <kapplication.h>
44//Added by qt3to4:
45#include <Q3PtrList>
44 46
45KODialogManager::KODialogManager( CalendarView *mainView ) : 47KODialogManager::KODialogManager( CalendarView *mainView ) :
46 QObject(), mMainView( mainView ) 48 QObject(), mMainView( mainView )
@@ -188,8 +190,8 @@ void KODialogManager::showSearchDialog()
188 mMainView, SLOT(beamIncidence(Incidence *))); 190 mMainView, SLOT(beamIncidence(Incidence *)));
189 connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), 191 connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)),
190 mMainView, SLOT(moveIncidence(Incidence *))); 192 mMainView, SLOT(moveIncidence(Incidence *)));
191 connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), 193 connect(lview, SIGNAL(beamIncidenceList(Q3PtrList<Incidence> )),
192 mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); 194 mMainView, SLOT(beamIncidenceList(Q3PtrList<Incidence> )));
193 195
194 connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); 196 connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig()));
195 connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); 197 connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList()));
@@ -246,7 +248,7 @@ void KODialogManager::showArchiveDialog()
246#endif 248#endif
247} 249}
248 250
249void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) 251void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters)
250{ 252{
251 if (!mFilterEditDialog) { 253 if (!mFilterEditDialog) {
252 mFilterEditDialog = new FilterEditDialog(filters,mMainView); 254 mFilterEditDialog = new FilterEditDialog(filters,mMainView);
diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h
index b68ddc2..00ad1df 100644
--- a/korganizer/kodialogmanager.h
+++ b/korganizer/kodialogmanager.h
@@ -25,7 +25,7 @@
25#define KODIALOGMANAGER_H 25#define KODIALOGMANAGER_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29 29
30#include <libkcal/calfilter.h> 30#include <libkcal/calfilter.h>
31 31
@@ -78,7 +78,7 @@ class KODialogManager : public QObject
78 // void showCategoryEditDialog(); 78 // void showCategoryEditDialog();
79 void showSearchDialog(); 79 void showSearchDialog();
80 void showArchiveDialog(); 80 void showArchiveDialog();
81 void showFilterEditDialog(QPtrList<CalFilter> *filters); 81 void showFilterEditDialog(Q3PtrList<CalFilter> *filters);
82 void showPluginDialog(); 82 void showPluginDialog();
83 void hideSearchDialog(); 83 void hideSearchDialog();
84 84
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index 9a4b4ec..a01c838 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -22,14 +22,20 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <q3filedialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapp.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3GridLayout>
36#include <QLabel>
37#include <Q3PtrList>
38#include <Q3VBoxLayout>
33 39
34#include <klocale.h> 40#include <klocale.h>
35#include <kglobal.h> 41#include <kglobal.h>
@@ -80,7 +86,7 @@ void CustomListViewItem<Attendee *>::updateItem()
80KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 86KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
81 : QWidget( parent, name), mDisableItemUpdate( false ) 87 : QWidget( parent, name), mDisableItemUpdate( false )
82{ 88{
83 QGridLayout *topLayout = new QGridLayout(this); 89 Q3GridLayout *topLayout = new Q3GridLayout(this);
84 topLayout->setSpacing(spacing); 90 topLayout->setSpacing(spacing);
85 topLayout->setMargin(KDialog::marginHint()-2); 91 topLayout->setMargin(KDialog::marginHint()-2);
86 92
@@ -101,11 +107,11 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
101 } 107 }
102 mListView->setAllColumnsShowFocus (true ); 108 mListView->setAllColumnsShowFocus (true );
103 //mListView->setSingleClick( true ); 109 //mListView->setSingleClick( true );
104 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 110 connect(mListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
105 SLOT(updateAttendeeInput())); 111 SLOT(updateAttendeeInput()));
106 112
107 connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), 113 connect(mListView,SIGNAL(executed(Q3ListViewItem * ,const QPoint&, int )),
108 SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); 114 SLOT(itemClicked(Q3ListViewItem * ,const QPoint& , int )));
109 115
110 mRsvpButton = new QCheckBox(this); 116 mRsvpButton = new QCheckBox(this);
111 mRsvpButton->setText(i18n("Request response")); 117 mRsvpButton->setText(i18n("Request response"));
@@ -140,7 +146,7 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
140 146
141 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); 147 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
142 QWidget *buttonBox = new QWidget(this); 148 QWidget *buttonBox = new QWidget(this);
143 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); 149 Q3VBoxLayout *buttonLayout = new Q3VBoxLayout(buttonBox);
144 150
145 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); 151 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
146 buttonLayout->addWidget(newButton); 152 buttonLayout->addWidget(newButton);
@@ -365,7 +371,7 @@ void KOEditorDetails::readEvent(Incidence *event)
365 setDefaults(); 371 setDefaults();
366 //mListView->clear(); 372 //mListView->clear();
367 //mdelAttendees.clear(); 373 //mdelAttendees.clear();
368 QPtrList<Attendee> tmpAList = event->attendees(); 374 Q3PtrList<Attendee> tmpAList = event->attendees();
369 Attendee *a; 375 Attendee *a;
370 for (a = tmpAList.first(); a; a = tmpAList.next()) 376 for (a = tmpAList.first(); a; a = tmpAList.next())
371 insertAttendee(new Attendee(*a)); 377 insertAttendee(new Attendee(*a));
@@ -377,7 +383,7 @@ void KOEditorDetails::readEvent(Incidence *event)
377void KOEditorDetails::writeEvent(Incidence *event) 383void KOEditorDetails::writeEvent(Incidence *event)
378{ 384{
379 event->clearAttendees(); 385 event->clearAttendees();
380 QListViewItem *item; 386 Q3ListViewItem *item;
381 AttendeeListItem *a; 387 AttendeeListItem *a;
382 for (item = mListView->firstChild(); item; 388 for (item = mListView->firstChild(); item;
383 item = item->nextSibling()) { 389 item = item->nextSibling()) {
@@ -404,7 +410,7 @@ bool KOEditorDetails::validateInput()
404 410
405void KOEditorDetails::updateAttendeeInput() 411void KOEditorDetails::updateAttendeeInput()
406{ 412{
407 QListViewItem *item = mListView->selectedItem(); 413 Q3ListViewItem *item = mListView->selectedItem();
408 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); 414 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
409 if (aItem) { 415 if (aItem) {
410 fillAttendeeInput( aItem ); 416 fillAttendeeInput( aItem );
@@ -451,7 +457,7 @@ void KOEditorDetails::setEnabledAttendeeInput( bool enabled )
451 mRemoveButton->setEnabled( enabled ); 457 mRemoveButton->setEnabled( enabled );
452} 458}
453 459
454void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c ) 460void KOEditorDetails::itemClicked(Q3ListViewItem * item ,const QPoint & pnt, int c )
455{ 461{
456 if ( item && c == 4 ) { 462 if ( item && c == 4 ) {
457 mRsvpButton->setChecked( !mRsvpButton->isChecked() ); 463 mRsvpButton->setChecked( !mRsvpButton->isChecked() );
@@ -462,7 +468,7 @@ void KOEditorDetails::updateAttendeeItem()
462{ 468{
463 if (mDisableItemUpdate) return; 469 if (mDisableItemUpdate) return;
464 470
465 QListViewItem *item = mListView->selectedItem(); 471 Q3ListViewItem *item = mListView->selectedItem();
466 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); 472 AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item );
467 if ( !aItem ) return; 473 if ( !aItem ) return;
468 474
diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h
index 5f8f6f2..40e896c 100644
--- a/korganizer/koeditordetails.h
+++ b/korganizer/koeditordetails.h
@@ -24,17 +24,17 @@
24#define _KOEDITORDETAILS_H 24#define _KOEDITORDETAILS_H
25 25
26#include <qmap.h> 26#include <qmap.h>
27#include <qframe.h> 27#include <q3frame.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qcheckbox.h> 29#include <qcheckbox.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qmultilineedit.h> 34#include <q3multilineedit.h>
35#include <klistview.h> 35#include <klistview.h>
36#include <qradiobutton.h> 36#include <qradiobutton.h>
37#include <qptrlist.h> 37#include <q3ptrlist.h>
38 38
39#include <kapplication.h> 39#include <kapplication.h>
40 40
@@ -83,7 +83,7 @@ class KOEditorDetails : public QWidget
83 void updateAttendeeInput(); 83 void updateAttendeeInput();
84 void clearAttendeeInput(); 84 void clearAttendeeInput();
85 void fillAttendeeInput(AttendeeListItem *); 85 void fillAttendeeInput(AttendeeListItem *);
86 void itemClicked(QListViewItem *,const QPoint & pnt, int c); 86 void itemClicked(Q3ListViewItem *,const QPoint & pnt, int c);
87 void updateAttendeeItem(); 87 void updateAttendeeItem();
88 void setEnabledAttendeeInput(bool); 88 void setEnabledAttendeeInput(bool);
89 89
@@ -103,7 +103,7 @@ class KOEditorDetails : public QWidget
103 QPushButton* mRemoveButton; 103 QPushButton* mRemoveButton;
104 QPushButton* mAddressBookButton; 104 QPushButton* mAddressBookButton;
105 105
106 QPtrList<Attendee> mdelAttendees; 106 Q3PtrList<Attendee> mdelAttendees;
107}; 107};
108 108
109#endif 109#endif
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 21f220c..8105432 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -24,15 +24,22 @@
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qtimer.h> 32#include <qtimer.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qregexp.h> 34#include <qregexp.h>
35//Added by qt3to4:
36#include <Q3HBoxLayout>
37#include <QLabel>
38#include <Q3GridLayout>
39#include <Q3PtrList>
40#include <Q3PopupMenu>
35 41
42#include <QDesktopWidget>
36 43
37#include <kglobal.h> 44#include <kglobal.h>
38#include <kdialog.h> 45#include <kdialog.h>
@@ -69,9 +76,9 @@ KOEditorGeneral::~KOEditorGeneral()
69{ 76{
70} 77}
71 78
72void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) 79void KOEditorGeneral::initHeader(QWidget *parent,Q3BoxLayout *topLayout)
73{ 80{
74 QGridLayout *headerLayout = new QGridLayout(topLayout); 81 Q3GridLayout *headerLayout = new Q3GridLayout(topLayout);
75 82
76#if 0 83#if 0
77 mOwnerLabel = new QLabel(i18n("Owner:"),parent); 84 mOwnerLabel = new QLabel(i18n("Owner:"),parent);
@@ -195,10 +202,10 @@ void KOEditorGeneral::selectedCatPopup( int index )
195 setCategories( categories.join(",") ); 202 setCategories( categories.join(",") );
196} 203}
197 204
198void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) 205void KOEditorGeneral::initCategories(QWidget *parent, Q3BoxLayout *topLayout)
199{ 206{
200 QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); 207 Q3BoxLayout *categoriesLayout = new Q3HBoxLayout( topLayout );
201 mCatPopup = new QPopupMenu ( parent ); 208 mCatPopup = new Q3PopupMenu ( parent );
202 mCatPopup->setCheckable (true); 209 mCatPopup->setCheckable (true);
203 connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); 210 connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup()));
204 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int ))); 211 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT(selectedCatPopup( int )));
@@ -214,9 +221,9 @@ void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
214 categoriesLayout->addWidget(mCategoriesLabel,1); 221 categoriesLayout->addWidget(mCategoriesLabel,1);
215} 222}
216 223
217void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) 224void KOEditorGeneral::initSecrecy(QWidget *parent, Q3BoxLayout *topLayout)
218{ 225{
219 QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); 226 Q3BoxLayout *secrecyLayout = new Q3HBoxLayout( topLayout );
220 227
221 QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent); 228 QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent);
222 mCancelBox = new QCheckBox ( i18n("Cancelled"), parent); 229 mCancelBox = new QCheckBox ( i18n("Cancelled"), parent);
@@ -228,7 +235,7 @@ void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
228 secrecyLayout->addWidget(mSecrecyCombo); 235 secrecyLayout->addWidget(mSecrecyCombo);
229} 236}
230 237
231void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) 238void KOEditorGeneral::initDescription(QWidget *parent,Q3BoxLayout *topLayout)
232{ 239{
233 mDescriptionEdit = new KTextEdit(parent); 240 mDescriptionEdit = new KTextEdit(parent);
234 mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont ); 241 mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont );
@@ -243,9 +250,9 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
243 250
244} 251}
245 252
246void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) 253void KOEditorGeneral::initAlarm(QWidget *parent,Q3BoxLayout *topLayout)
247{ 254{
248 QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); 255 Q3BoxLayout *alarmLayout = new Q3HBoxLayout(topLayout);
249 256
250 //mAlarmBell = new QLabel(parent); 257 //mAlarmBell = new QLabel(parent);
251 //mAlarmBell->setPixmap(SmallIcon("bell")); 258 //mAlarmBell->setPixmap(SmallIcon("bell"));
@@ -528,7 +535,7 @@ void KOEditorGeneral::readIncidence(Incidence *event)
528 mAlarmSoundButton->setOn(false); 535 mAlarmSoundButton->setOn(false);
529 536
530 // set up alarm stuff 537 // set up alarm stuff
531 QPtrList<Alarm> alarms = event->alarms(); 538 Q3PtrList<Alarm> alarms = event->alarms();
532 Alarm* alarm; 539 Alarm* alarm;
533 mAlarmIncrCombo->setCurrentItem(0); 540 mAlarmIncrCombo->setCurrentItem(0);
534 for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) { 541 for ( alarm = alarms.first(); alarm; alarm = alarms.next() ) {
@@ -590,7 +597,7 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
590 if (mAlarmButton->isChecked()) { 597 if (mAlarmButton->isChecked()) {
591 if (event->alarms().count() == 0) 598 if (event->alarms().count() == 0)
592 event->newAlarm(); 599 event->newAlarm();
593 QPtrList<Alarm> alarms = event->alarms(); 600 Q3PtrList<Alarm> alarms = event->alarms();
594 Alarm *alarm; 601 Alarm *alarm;
595 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { 602 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
596 alarm->setEnabled(true); 603 alarm->setEnabled(true);
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index b10a5d4..45f26fd 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -23,19 +23,20 @@
23#ifndef KOEDITORGENERAL_H 23#ifndef KOEDITORGENERAL_H
24#define KOEDITORGENERAL_H 24#define KOEDITORGENERAL_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qpopupmenu.h> 30#include <q3popupmenu.h>
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qcombobox.h> 38#include <qcombobox.h>
39#include <Q3BoxLayout>
39 40
40#include <ktextedit.h> 41#include <ktextedit.h>
41#include <krestrictedline.h> 42#include <krestrictedline.h>
@@ -55,11 +56,11 @@ class KOEditorGeneral : public QObject
55 KOEditorGeneral (QObject* parent=0,const char* name=0); 56 KOEditorGeneral (QObject* parent=0,const char* name=0);
56 virtual ~KOEditorGeneral(); 57 virtual ~KOEditorGeneral();
57 void setFocusOn( int i ); 58 void setFocusOn( int i );
58 void initHeader(QWidget *,QBoxLayout *); 59 void initHeader(QWidget *,Q3BoxLayout *);
59 void initDescription(QWidget *,QBoxLayout *); 60 void initDescription(QWidget *,Q3BoxLayout *);
60 void initSecrecy(QWidget *,QBoxLayout *); 61 void initSecrecy(QWidget *,Q3BoxLayout *);
61 void initCategories(QWidget *,QBoxLayout *); 62 void initCategories(QWidget *,Q3BoxLayout *);
62 void initAlarm(QWidget *,QBoxLayout *); 63 void initAlarm(QWidget *,Q3BoxLayout *);
63 64
64 /** Set widgets to default values */ 65 /** Set widgets to default values */
65 void setDefaults(bool allDay); 66 void setDefaults(bool allDay);
@@ -115,7 +116,7 @@ class KOEditorGeneral : public QObject
115 QPushButton *mCategoriesLabel; 116 QPushButton *mCategoriesLabel;
116 117
117 private: 118 private:
118 QPopupMenu * mCatPopup; 119 Q3PopupMenu * mCatPopup;
119 QString getFittingPath( const QString &) ; 120 QString getFittingPath( const QString &) ;
120 QString mAlarmSound; 121 QString mAlarmSound;
121 QString mAlarmProgram; 122 QString mAlarmProgram;
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 2c6ed9f..73a4139 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -23,11 +23,17 @@
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qvbox.h> 26#include <q3vbox.h>
27#include <qbuttongroup.h> 27#include <q3buttongroup.h>
28#include <qvgroupbox.h> 28#include <q3vgroupbox.h>
29#include <qwidgetstack.h> 29#include <q3widgetstack.h>
30#include <qdatetime.h> 30#include <qdatetime.h>
31//Added by qt3to4:
32#include <Q3HBoxLayout>
33#include <Q3GridLayout>
34#include <Q3Frame>
35#include <QLabel>
36#include <Q3VBoxLayout>
31 37
32#include <kdebug.h> 38#include <kdebug.h>
33#include <kglobal.h> 39#include <kglobal.h>
@@ -84,19 +90,19 @@ void KOEditorGeneralEvent::finishSetup()
84 mSummaryEdit->setFocus(); 90 mSummaryEdit->setFocus();
85} 91}
86 92
87void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) 93void KOEditorGeneralEvent::initTime(QWidget *parent,Q3BoxLayout *topLayout)
88{ 94{
89 QBoxLayout *timeLayout = new QVBoxLayout(topLayout); 95 Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout);
90 96
91 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, 97 Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal,
92 i18n("Date && Time"),parent); 98 i18n("Date && Time"),parent);
93 timeLayout->addWidget(timeGroupBox); 99 timeLayout->addWidget(timeGroupBox);
94 100
95 timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() ); 101 timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() );
96 timeGroupBox->layout()->setMargin( KDialog::marginHint() ); 102 timeGroupBox->layout()->setMargin( KDialog::marginHint() );
97 QFrame *timeBoxFrame = new QFrame(timeGroupBox); 103 Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox);
98 104
99 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); 105 Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,2,3);
100 layoutTimeBox->setSpacing(topLayout->spacing()); 106 layoutTimeBox->setSpacing(topLayout->spacing());
101 107
102 mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame); 108 mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame);
@@ -118,7 +124,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
118 mEndTimeEdit = new KOTimeEdit(timeBoxFrame); 124 mEndTimeEdit = new KOTimeEdit(timeBoxFrame);
119 layoutTimeBox->addWidget(mEndTimeEdit,1,2); 125 layoutTimeBox->addWidget(mEndTimeEdit,1,2);
120 QWidget* duration = new QWidget( timeBoxFrame ); 126 QWidget* duration = new QWidget( timeBoxFrame );
121 QHBoxLayout *flagsBox = new QHBoxLayout( duration ); 127 Q3HBoxLayout *flagsBox = new Q3HBoxLayout( duration );
122 mNoTimeButton = new QCheckBox(i18n("All day event"),duration); 128 mNoTimeButton = new QCheckBox(i18n("All day event"),duration);
123 flagsBox->addWidget(mNoTimeButton); 129 flagsBox->addWidget(mNoTimeButton);
124 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); 130 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool)));
@@ -129,7 +135,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
129 flagsBox->addWidget( mDurationLabel ); 135 flagsBox->addWidget( mDurationLabel );
130 //} 136 //}
131 flagsBox->setStretchFactor(mDurationLabel, 10 ); 137 flagsBox->setStretchFactor(mDurationLabel, 10 );
132 mDurationLabel->setAlignment( AlignRight | AlignVCenter); 138 mDurationLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter);
133 layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); 139 layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 );
134 140
135 // time widgets are checked if they contain a valid time 141 // time widgets are checked if they contain a valid time
@@ -147,9 +153,9 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
147 connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(eTimeChanged(QTime))); 153 connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),this,SLOT(eTimeChanged(QTime)));
148} 154}
149 155
150void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) 156void KOEditorGeneralEvent::initClass(QWidget *parent,Q3BoxLayout *topLayout)
151{ 157{
152 QBoxLayout *classLayout = new QHBoxLayout(topLayout); 158 Q3BoxLayout *classLayout = new Q3HBoxLayout(topLayout);
153 159
154 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); 160 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent);
155 classLayout->addWidget(freeTimeLabel); 161 classLayout->addWidget(freeTimeLabel);
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index d798905..5d97a5c 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -23,15 +23,15 @@
23#ifndef _KOEDITORGENERALEVENT_H 23#ifndef _KOEDITORGENERALEVENT_H
24#define _KOEDITORGENERALEVENT_H 24#define _KOEDITORGENERALEVENT_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qgroupbox.h> 30#include <q3groupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36 36
37#include <krestrictedline.h> 37#include <krestrictedline.h>
@@ -51,8 +51,8 @@ class KOEditorGeneralEvent : public KOEditorGeneral
51 KOEditorGeneralEvent (QObject* parent=0,const char* name=0); 51 KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
52 virtual ~KOEditorGeneralEvent(); 52 virtual ~KOEditorGeneralEvent();
53 53
54 void initTime(QWidget *,QBoxLayout *); 54 void initTime(QWidget *,Q3BoxLayout *);
55 void initClass(QWidget *,QBoxLayout *); 55 void initClass(QWidget *,Q3BoxLayout *);
56 56
57 void finishSetup(); 57 void finishSetup();
58 58
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index d32d5a5..baee9fc 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -22,14 +22,21 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <q3filedialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3GridLayout>
37#include <Q3Frame>
38#include <QLabel>
39#include <Q3VBoxLayout>
33 40
34#include <kglobal.h> 41#include <kglobal.h>
35#include <klocale.h> 42#include <klocale.h>
@@ -82,18 +89,18 @@ void KOEditorGeneralTodo::finishSetup()
82 mSummaryEdit->setFocus(); 89 mSummaryEdit->setFocus();
83} 90}
84 91
85void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) 92void KOEditorGeneralTodo::initTime(QWidget *parent,Q3BoxLayout *topLayout)
86{ 93{
87 QBoxLayout *timeLayout = new QVBoxLayout(topLayout); 94 Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout);
88 95
89 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, 96 Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal,
90 i18n("Date && Time"),parent); 97 i18n("Date && Time"),parent);
91 timeLayout->addWidget(timeGroupBox); 98 timeLayout->addWidget(timeGroupBox);
92 timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); 99 timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 );
93 timeGroupBox->layout()->setMargin( KDialog::marginHint() ); 100 timeGroupBox->layout()->setMargin( KDialog::marginHint() );
94 QFrame *timeBoxFrame = new QFrame(timeGroupBox); 101 Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox);
95 102
96 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); 103 Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,3,3);
97 layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); 104 layoutTimeBox->setSpacing(KDialog::spacingHintSmall());
98 layoutTimeBox->setColStretch( 1, 1 ); 105 layoutTimeBox->setColStretch( 1, 1 );
99 106
@@ -133,7 +140,7 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
133} 140}
134 141
135 142
136void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) 143void KOEditorGeneralTodo::initCompletion(QWidget *parent, Q3BoxLayout *topLayout)
137{ 144{
138 mCompletedCombo = new QComboBox(parent); 145 mCompletedCombo = new QComboBox(parent);
139 // xgettext:no-c-format 146 // xgettext:no-c-format
@@ -173,10 +180,10 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout)
173 } 180 }
174} 181}
175 182
176void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) 183void KOEditorGeneralTodo::initPriority(QWidget *parent, Q3BoxLayout *topLayout)
177{ 184{
178 185
179 QHBox* h = new QHBox ( parent ); 186 Q3HBox* h = new Q3HBox ( parent );
180 topLayout->addWidget( h ); 187 topLayout->addWidget( h );
181 QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); 188 QLabel *priorityLabel = new QLabel(i18n("Priority:"), h);
182 // topLayout->addWidget(priorityLabel); 189 // topLayout->addWidget(priorityLabel);
@@ -189,9 +196,9 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout)
189 //topLayout->addWidget(mPriorityCombo); 196 //topLayout->addWidget(mPriorityCombo);
190} 197}
191 198
192void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) 199void KOEditorGeneralTodo::initStatus(QWidget *parent,Q3BoxLayout *topLayout)
193{ 200{
194 QBoxLayout *statusLayout = new QHBoxLayout(topLayout); 201 Q3BoxLayout *statusLayout = new Q3HBoxLayout(topLayout);
195 202
196 initCompletion( parent, statusLayout ); 203 initCompletion( parent, statusLayout );
197 204
@@ -396,7 +403,7 @@ void KOEditorGeneralTodo::enableStartEdit( bool enable )
396void KOEditorGeneralTodo::startDateChanged(QDate newdate) 403void KOEditorGeneralTodo::startDateChanged(QDate newdate)
397{ 404{
398 if ( mDueCheck->isChecked() ) 405 if ( mDueCheck->isChecked() )
399 emit dateTimesChanged(newdate,mDueDateEdit->date()); 406 emit dateTimesChanged((QDateTime)newdate,(QDateTime)mDueDateEdit->date());
400} 407}
401void KOEditorGeneralTodo::enableTimeEdits(bool enable) 408void KOEditorGeneralTodo::enableTimeEdits(bool enable)
402{ 409{
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index 2e56a7a..2e97ff5 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -23,15 +23,15 @@
23#ifndef _KOEDITORGENERALTODO_H 23#ifndef _KOEDITORGENERALTODO_H
24#define _KOEDITORGENERALTODO_H 24#define _KOEDITORGENERALTODO_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qgroupbox.h> 30#include <q3groupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36 36
37#include "koeditorgeneral.h" 37#include "koeditorgeneral.h"
@@ -50,10 +50,10 @@ class KOEditorGeneralTodo : public KOEditorGeneral
50 KOEditorGeneralTodo (QObject* parent=0,const char* name=0); 50 KOEditorGeneralTodo (QObject* parent=0,const char* name=0);
51 virtual ~KOEditorGeneralTodo(); 51 virtual ~KOEditorGeneralTodo();
52 52
53 void initTime(QWidget *, QBoxLayout *); 53 void initTime(QWidget *, Q3BoxLayout *);
54 void initStatus(QWidget *, QBoxLayout *); 54 void initStatus(QWidget *, Q3BoxLayout *);
55 void initCompletion(QWidget *, QBoxLayout *); 55 void initCompletion(QWidget *, Q3BoxLayout *);
56 void initPriority(QWidget *, QBoxLayout *); 56 void initPriority(QWidget *, Q3BoxLayout *);
57 57
58 void finishSetup(); 58 void finishSetup();
59 59
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index e0380c4..e0ae3a0 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -22,17 +22,25 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <q3filedialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qbuttongroup.h> 28#include <q3buttongroup.h>
29#include <qvgroupbox.h> 29#include <q3vgroupbox.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qlistbox.h> 32#include <q3listbox.h>
33#include <qspinbox.h> 33#include <qspinbox.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <QDesktopWidget>
37//Added by qt3to4:
38#include <Q3HBoxLayout>
39#include <QLabel>
40#include <Q3GridLayout>
41#include <Q3PtrList>
42#include <Q3Frame>
43#include <Q3VBoxLayout>
36 44
37#include <kdialog.h> 45#include <kdialog.h>
38#include <kglobal.h> 46#include <kglobal.h>
@@ -81,7 +89,7 @@ int RecurBase::frequency()
81RecurDaily::RecurDaily( QWidget *parent, const char *name ) : 89RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
82 RecurBase( parent, name ) 90 RecurBase( parent, name )
83{ 91{
84 QBoxLayout *topLayout = new QHBoxLayout( this ); 92 Q3BoxLayout *topLayout = new Q3HBoxLayout( this );
85 topLayout->setSpacing( KDialog::spacingHint() ); 93 topLayout->setSpacing( KDialog::spacingHint() );
86 topLayout->setMargin( KDialog::marginHintSmall() ); 94 topLayout->setMargin( KDialog::marginHintSmall() );
87 95
@@ -100,13 +108,13 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) :
100RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : 108RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
101 RecurBase( parent, name ) 109 RecurBase( parent, name )
102{ 110{
103 QBoxLayout *topLayout = new QVBoxLayout( this ); 111 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
104 topLayout->setSpacing( KDialog::spacingHint() ); 112 topLayout->setSpacing( KDialog::spacingHint() );
105 topLayout->setMargin( KDialog::marginHintSmall() ); 113 topLayout->setMargin( KDialog::marginHintSmall() );
106 114
107 //topLayout->addStretch( 1 ); 115 //topLayout->addStretch( 1 );
108 116
109 QBoxLayout *weeksLayout = new QHBoxLayout( topLayout ); 117 Q3BoxLayout *weeksLayout = new Q3HBoxLayout( topLayout );
110 118
111 QLabel *preLabel = new QLabel( i18n("Recur every"), this ); 119 QLabel *preLabel = new QLabel( i18n("Recur every"), this );
112 weeksLayout->addWidget( preLabel ); 120 weeksLayout->addWidget( preLabel );
@@ -116,8 +124,8 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) :
116 QLabel *postLabel = new QLabel( i18n("week(s) on:"), this ); 124 QLabel *postLabel = new QLabel( i18n("week(s) on:"), this );
117 weeksLayout->addWidget( postLabel ); 125 weeksLayout->addWidget( postLabel );
118 126
119 QHBox *dayBox = new QHBox( this ); 127 Q3HBox *dayBox = new Q3HBox( this );
120 topLayout->addWidget( dayBox, 1, AlignVCenter ); 128 topLayout->addWidget( dayBox, 1, Qt::AlignVCenter );
121 // TODO: Respect start of week setting 129 // TODO: Respect start of week setting
122 for ( int i = 0; i < 7; ++i ) { 130 for ( int i = 0; i < 7; ++i ) {
123 QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true ); 131 QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true );
@@ -156,12 +164,12 @@ QBitArray RecurWeekly::days()
156RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : 164RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
157 RecurBase( parent, name ) 165 RecurBase( parent, name )
158{ 166{
159 QBoxLayout *topLayout = new QVBoxLayout( this ); 167 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
160 topLayout->setSpacing( KDialog::spacingHint() ); 168 topLayout->setSpacing( KDialog::spacingHint() );
161 topLayout->setMargin( KDialog::marginHintSmall() ); 169 topLayout->setMargin( KDialog::marginHintSmall() );
162 170
163 171
164 QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); 172 Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout );
165 173
166 QLabel *preLabel = new QLabel( i18n("every"), this ); 174 QLabel *preLabel = new QLabel( i18n("every"), this );
167 freqLayout->addWidget( preLabel ); 175 freqLayout->addWidget( preLabel );
@@ -172,11 +180,11 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
172 freqLayout->addWidget( postLabel ); 180 freqLayout->addWidget( postLabel );
173 181
174 182
175 QButtonGroup *buttonGroup = new QButtonGroup( this ); 183 Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this );
176 buttonGroup->setFrameStyle( QFrame::NoFrame ); 184 buttonGroup->setFrameStyle( Q3Frame::NoFrame );
177 topLayout->addWidget( buttonGroup, 1, AlignVCenter ); 185 topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter );
178 186
179 QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 ); 187 Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 3, 2 );
180 buttonLayout->setSpacing( KDialog::spacingHint() ); 188 buttonLayout->setSpacing( KDialog::spacingHint() );
181 buttonLayout->setMargin( KDialog::marginHintSmall() ); 189 buttonLayout->setMargin( KDialog::marginHintSmall() );
182 190
@@ -189,7 +197,7 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) :
189 mByDayRadio = new QRadioButton( recurOnText, buttonGroup ); 197 mByDayRadio = new QRadioButton( recurOnText, buttonGroup );
190 buttonLayout->addWidget( mByDayRadio, 0, 0 ); 198 buttonLayout->addWidget( mByDayRadio, 0, 0 );
191 199
192 mByDayCombo = new QComboBox( buttonGroup ); 200 mByDayCombo = new Q3ComboBox( buttonGroup );
193 mByDayCombo->setSizeLimit( 7 ); 201 mByDayCombo->setSizeLimit( 7 );
194 mByDayCombo->insertItem( i18n("1st") ); 202 mByDayCombo->insertItem( i18n("1st") );
195 mByDayCombo->insertItem( i18n("2nd") ); 203 mByDayCombo->insertItem( i18n("2nd") );
@@ -293,12 +301,12 @@ int RecurMonthly::weekday()
293RecurYearly::RecurYearly( QWidget *parent, const char *name ) : 301RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
294 RecurBase( parent, name ) 302 RecurBase( parent, name )
295{ 303{
296 QBoxLayout *topLayout = new QVBoxLayout( this ); 304 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
297 topLayout->setSpacing( KDialog::spacingHint() ); 305 topLayout->setSpacing( KDialog::spacingHint() );
298 topLayout->setMargin( KDialog::marginHintSmall() ); 306 topLayout->setMargin( KDialog::marginHintSmall() );
299 307
300 308
301 QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); 309 Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout );
302 310
303 QLabel *preLabel = new QLabel( i18n("every"), this ); 311 QLabel *preLabel = new QLabel( i18n("every"), this );
304 freqLayout->addWidget( preLabel ); 312 freqLayout->addWidget( preLabel );
@@ -309,18 +317,18 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) :
309 freqLayout->addWidget( postLabel ); 317 freqLayout->addWidget( postLabel );
310 318
311 319
312 QButtonGroup *buttonGroup = new QButtonGroup( this ); 320 Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this );
313 buttonGroup->setFrameStyle( QFrame::NoFrame ); 321 buttonGroup->setFrameStyle( Q3Frame::NoFrame );
314 topLayout->addWidget( buttonGroup, 1, AlignVCenter ); 322 topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter );
315 323
316 QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 2, 3 ); 324 Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 2, 3 );
317 325
318 mByMonthRadio = new QRadioButton( i18n("On day "), buttonGroup); 326 mByMonthRadio = new QRadioButton( i18n("On day "), buttonGroup);
319 buttonLayout->addWidget( mByMonthRadio, 0, 0 , Qt::AlignRight); 327 buttonLayout->addWidget( mByMonthRadio, 0, 0 , Qt::AlignRight);
320 mByDayLabel = new QLabel( i18n("%1 of ").arg(1), buttonGroup ); 328 mByDayLabel = new QLabel( i18n("%1 of ").arg(1), buttonGroup );
321 329
322 buttonLayout->addWidget( mByDayLabel, 0, 1 ); 330 buttonLayout->addWidget( mByDayLabel, 0, 1 );
323 mByMonthCombo = new QComboBox( buttonGroup ); 331 mByMonthCombo = new Q3ComboBox( buttonGroup );
324 mByMonthCombo->insertItem( i18n("January") ); 332 mByMonthCombo->insertItem( i18n("January") );
325 mByMonthCombo->insertItem( i18n("February") ); 333 mByMonthCombo->insertItem( i18n("February") );
326 mByMonthCombo->insertItem( i18n("March") ); 334 mByMonthCombo->insertItem( i18n("March") );
@@ -383,15 +391,15 @@ int RecurYearly::day()
383ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : 391ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
384 QWidget( parent, name ) 392 QWidget( parent, name )
385{ 393{
386 QBoxLayout *topLayout = new QVBoxLayout( this ); 394 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
387 395
388 QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"), 396 Q3GroupBox *groupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Exceptions"),
389 this ); 397 this );
390 topLayout->addWidget( groupBox ); 398 topLayout->addWidget( groupBox );
391 399
392 QWidget *box = new QWidget( groupBox ); 400 QWidget *box = new QWidget( groupBox );
393 401
394 QGridLayout *boxLayout = new QGridLayout( box ); 402 Q3GridLayout *boxLayout = new Q3GridLayout( box );
395 403
396 mExceptionDateEdit = new KDateEdit( box ); 404 mExceptionDateEdit = new KDateEdit( box );
397 boxLayout->addWidget( mExceptionDateEdit, 0, 0 ); 405 boxLayout->addWidget( mExceptionDateEdit, 0, 0 );
@@ -403,7 +411,7 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) :
403 QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box ); 411 QPushButton *deleteExceptionButton = new QPushButton( i18n("Delete"), box );
404 boxLayout->addWidget( deleteExceptionButton, 3, 0 ); 412 boxLayout->addWidget( deleteExceptionButton, 3, 0 );
405 413
406 mExceptionList = new QListBox( box ); 414 mExceptionList = new Q3ListBox( box );
407 boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); 415 boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 );
408 416
409 boxLayout->setRowStretch( 4, 1 ); 417 boxLayout->setRowStretch( 4, 1 );
@@ -506,27 +514,27 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
506 const char *name ) 514 const char *name )
507 : QWidget( parent, name ) 515 : QWidget( parent, name )
508{ 516{
509 QBoxLayout *topLayout = new QVBoxLayout( this ); 517 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
510 518
511 mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), 519 mRangeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Range"),
512 this ); 520 this );
513 topLayout->addWidget( mRangeGroupBox ); 521 topLayout->addWidget( mRangeGroupBox );
514 522
515 QWidget *rangeBox = new QWidget( mRangeGroupBox ); 523 QWidget *rangeBox = new QWidget( mRangeGroupBox );
516 QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); 524 Q3VBoxLayout *rangeLayout = new Q3VBoxLayout( rangeBox );
517 rangeLayout->setSpacing( KDialog::spacingHint() ); 525 rangeLayout->setSpacing( KDialog::spacingHint() );
518 rangeLayout->setMargin( KDialog::marginHintSmall() ); 526 rangeLayout->setMargin( KDialog::marginHintSmall() );
519 527
520 mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox ); 528 mStartDateLabel = new QLabel( i18n("Begin on:"), rangeBox );
521 rangeLayout->addWidget( mStartDateLabel ); 529 rangeLayout->addWidget( mStartDateLabel );
522 530
523 mRangeButtonGroup = new QButtonGroup; 531 mRangeButtonGroup = new Q3ButtonGroup;
524 532
525 mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox ); 533 mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox );
526 mRangeButtonGroup->insert( mNoEndDateButton ); 534 mRangeButtonGroup->insert( mNoEndDateButton );
527 rangeLayout->addWidget( mNoEndDateButton ); 535 rangeLayout->addWidget( mNoEndDateButton );
528 536
529 QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); 537 Q3BoxLayout *durationLayout = new Q3HBoxLayout( rangeLayout );
530 durationLayout->setSpacing( KDialog::spacingHint() ); 538 durationLayout->setSpacing( KDialog::spacingHint() );
531 539
532 mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox ); 540 mEndDurationButton = new QRadioButton( i18n("End after"), rangeBox );
@@ -539,7 +547,7 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent,
539 QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox ); 547 QLabel *endDurationLabel = new QLabel( i18n("occurrence(s)"), rangeBox );
540 durationLayout ->addWidget( endDurationLabel ); 548 durationLayout ->addWidget( endDurationLabel );
541 549
542 QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); 550 Q3BoxLayout *endDateLayout = new Q3HBoxLayout( rangeLayout );
543 endDateLayout->setSpacing( KDialog::spacingHint() ); 551 endDateLayout->setSpacing( KDialog::spacingHint() );
544 552
545 mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox ); 553 mEndDateButton = new QRadioButton( i18n("End by:"), rangeBox );
@@ -666,7 +674,7 @@ void RecurrenceRangeDialog::setDateTimes( const QDateTime &start,
666RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : 674RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) :
667 QWidget( parent, name ) 675 QWidget( parent, name )
668{ 676{
669 QBoxLayout *topLayout = new QVBoxLayout( this ); 677 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
670 678
671 mTypeCombo = new QComboBox( this ); 679 mTypeCombo = new QComboBox( this );
672 mTypeCombo->insertItem( i18n("Daily") ); 680 mTypeCombo->insertItem( i18n("Daily") );
@@ -725,7 +733,7 @@ void RecurrenceChooser::emitChoice()
725KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : 733KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
726 QWidget( parent, name ) 734 QWidget( parent, name )
727{ 735{
728 QGridLayout *topLayout = new QGridLayout( this, 2,2 ); 736 Q3GridLayout *topLayout = new Q3GridLayout( this, 2,2 );
729 topLayout->setSpacing( KDialog::spacingHint() ); 737 topLayout->setSpacing( KDialog::spacingHint() );
730 topLayout->setMargin( KDialog::marginHintSmall() ); 738 topLayout->setMargin( KDialog::marginHintSmall() );
731 739
@@ -735,7 +743,7 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
735 topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 ); 743 topLayout->addMultiCellWidget( mEnabledCheck, 0, 0, 0, 1 );
736 744
737 745
738 mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"), 746 mTimeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Time"),
739 this ); 747 this );
740 topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 ); 748 topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 );
741 749
@@ -752,14 +760,14 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) :
752// layoutTimeFrame->addWidget( mDateTimeLabel ); 760// layoutTimeFrame->addWidget( mDateTimeLabel );
753 //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) ); 761 //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) );
754 //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) ); 762 //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) );
755 mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this ); 763 mRuleBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Rule"), this );
756 topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); 764 topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 );
757 mRecurrenceChooser = new RecurrenceChooser( mRuleBox ); 765 mRecurrenceChooser = new RecurrenceChooser( mRuleBox );
758 connect( mRecurrenceChooser, SIGNAL( chosen( int ) ), 766 connect( mRecurrenceChooser, SIGNAL( chosen( int ) ),
759 SLOT( showCurrentRule( int ) ) ); 767 SLOT( showCurrentRule( int ) ) );
760 768
761 769
762 mRuleStack = new QWidgetStack( mRuleBox ); 770 mRuleStack = new Q3WidgetStack( mRuleBox );
763 771
764 mDaily = new RecurDaily( mRuleStack ); 772 mDaily = new RecurDaily( mRuleStack );
765 mRuleStack->addWidget( mDaily, 0 ); 773 mRuleStack->addWidget( mDaily, 0 );
@@ -896,8 +904,8 @@ void KOEditorRecurrence::readEvent(Incidence *event)
896 904
897 setDefaults( event->dtStart(), dtEnd ); 905 setDefaults( event->dtStart(), dtEnd );
898 QBitArray rDays( 7 ); 906 QBitArray rDays( 7 );
899 QPtrList<Recurrence::rMonthPos> rmp; 907 Q3PtrList<Recurrence::rMonthPos> rmp;
900 QPtrList<int> rmd; 908 Q3PtrList<int> rmd;
901 int day = 0; 909 int day = 0;
902 int count = 0; 910 int count = 0;
903 int month = 0; 911 int month = 0;
@@ -968,7 +976,7 @@ void KOEditorRecurrence::readEvent(Incidence *event)
968 mYearly->setByMonth( month, day ); 976 mYearly->setByMonth( month, day );
969#if 0 977#if 0
970 //qDebug("2day = %d ",day ); 978 //qDebug("2day = %d ",day );
971 QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); 979 Q3PtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions();
972 int month; 980 int month;
973 if ( !monthlist.isEmpty() ) { 981 if ( !monthlist.isEmpty() ) {
974 month = monthlist.first()->rPos ; 982 month = monthlist.first()->rPos ;
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index 75e0c73..6c012bd 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -23,17 +23,19 @@
23#ifndef _KOEDITORRECURRENCE_H 23#ifndef _KOEDITORRECURRENCE_H
24#define _KOEDITORRECURRENCE_H 24#define _KOEDITORRECURRENCE_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qcheckbox.h> 28#include <qcheckbox.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30#include <qgroupbox.h> 30#include <q3groupbox.h>
31#include <qlineedit.h> 31#include <qlineedit.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#include <qlistview.h> 34#include <q3listview.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qbuttongroup.h> 36#include <q3buttongroup.h>
37#include <Q3ListBox>
38#include <Q3ComboBox>
37 39
38#include <kdialogbase.h> 40#include <kdialogbase.h>
39 41
@@ -41,7 +43,7 @@
41 43
42#include "ktimeedit.h" 44#include "ktimeedit.h"
43 45
44class QWidgetStack; 46class Q3WidgetStack;
45class QSpinBox; 47class QSpinBox;
46 48
47class KDateEdit; 49class KDateEdit;
@@ -98,7 +100,7 @@ class RecurMonthly : public RecurBase
98 100
99 private: 101 private:
100 QRadioButton *mByDayRadio; 102 QRadioButton *mByDayRadio;
101 QComboBox *mByDayCombo; 103 Q3ComboBox *mByDayCombo;
102 104
103 QRadioButton *mByPosRadio; 105 QRadioButton *mByPosRadio;
104 QComboBox *mByPosCountCombo; 106 QComboBox *mByPosCountCombo;
@@ -122,7 +124,7 @@ class RecurYearly : public RecurBase
122 private: 124 private:
123 int mDay; 125 int mDay;
124 QRadioButton *mByMonthRadio; 126 QRadioButton *mByMonthRadio;
125 QComboBox *mByMonthCombo; 127 Q3ComboBox *mByMonthCombo;
126 QLabel* mByDayLabel; 128 QLabel* mByDayLabel;
127 QLabel* mDayOfLabel; 129 QLabel* mDayOfLabel;
128 QRadioButton *mByDayRadio; 130 QRadioButton *mByDayRadio;
@@ -180,7 +182,7 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase
180 182
181 private: 183 private:
182 KDateEdit *mExceptionDateEdit; 184 KDateEdit *mExceptionDateEdit;
183 QListBox *mExceptionList; 185 Q3ListBox *mExceptionList;
184 DateList mExceptionDates; 186 DateList mExceptionDates;
185}; 187};
186 188
@@ -235,8 +237,8 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase
235 void showCurrentRange(); 237 void showCurrentRange();
236 238
237 private: 239 private:
238 QButtonGroup *mRangeButtonGroup; 240 Q3ButtonGroup *mRangeButtonGroup;
239 QGroupBox *mRangeGroupBox; 241 Q3GroupBox *mRangeGroupBox;
240 QLabel *mStartDateLabel; 242 QLabel *mStartDateLabel;
241 QRadioButton *mNoEndDateButton; 243 QRadioButton *mNoEndDateButton;
242 QRadioButton *mEndDurationButton; 244 QRadioButton *mEndDurationButton;
@@ -300,11 +302,11 @@ class KOEditorRecurrence : public QWidget
300 private: 302 private:
301 QCheckBox *mEnabledCheck; 303 QCheckBox *mEnabledCheck;
302 304
303 QGroupBox *mTimeGroupBox; 305 Q3GroupBox *mTimeGroupBox;
304 QLabel *mDateTimeLabel; 306 QLabel *mDateTimeLabel;
305 307
306 QGroupBox *mRuleBox; 308 Q3GroupBox *mRuleBox;
307 QWidgetStack *mRuleStack; 309 Q3WidgetStack *mRuleStack;
308 RecurrenceChooser *mRecurrenceChooser; 310 RecurrenceChooser *mRecurrenceChooser;
309 311
310 RecurDaily *mDaily; 312 RecurDaily *mDaily;
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 3e87197..62ad250 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -22,14 +22,19 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qdir.h> 29#include <qdir.h>
30#include <qlayout.h> 30#include <qlayout.h>
31#include <qwidgetstack.h> 31#include <q3widgetstack.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3PtrList>
37#include <Q3VBoxLayout>
33 38
34#include <kiconloader.h> 39#include <kiconloader.h>
35#include <kstandarddirs.h> 40#include <kstandarddirs.h>
@@ -105,8 +110,8 @@ void KOEventEditor::setupGeneral()
105 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) ); 110 connect ( mGeneral, SIGNAL ( allAccepted() ), this, SLOT ( slotOk () ) );
106 111
107 if( KOPrefs::instance()->mCompactDialogs ) { 112 if( KOPrefs::instance()->mCompactDialogs ) {
108 QFrame *topFrame = addPage(i18n("General")); 113 Q3Frame *topFrame = addPage(i18n("General"));
109 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 114 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
110 topLayout->setSpacing(spacingHint()-1); 115 topLayout->setSpacing(spacingHint()-1);
111 topLayout->setMargin(marginHint()-1); 116 topLayout->setMargin(marginHint()-1);
112 topLayout->addStretch ( 1 ); 117 topLayout->addStretch ( 1 );
@@ -119,13 +124,13 @@ void KOEventEditor::setupGeneral()
119 topLayout->addStretch ( 1 ); 124 topLayout->addStretch ( 1 );
120 mGeneral->enableAlarm( false ); 125 mGeneral->enableAlarm( false );
121 126
122 QBoxLayout *buttonLayout; 127 Q3BoxLayout *buttonLayout;
123 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 ) 128 if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 )
124 buttonLayout = new QVBoxLayout( topLayout ); 129 buttonLayout = new Q3VBoxLayout( topLayout );
125 else 130 else
126 buttonLayout = new QHBoxLayout( topLayout ); 131 buttonLayout = new Q3HBoxLayout( topLayout );
127 QHBox* buttonWidget = new QHBox (topFrame); 132 Q3HBox* buttonWidget = new Q3HBox (topFrame);
128 QIconSet icon; 133 QIcon icon;
129 if ( QApplication::desktop()->width() < 321 ) 134 if ( QApplication::desktop()->width() < 321 )
130 icon = SmallIcon("fileexport16"); 135 icon = SmallIcon("fileexport16");
131 else 136 else
@@ -146,9 +151,9 @@ void KOEventEditor::setupGeneral()
146 151
147 topLayout->addStretch( 1 ); 152 topLayout->addStretch( 1 );
148 153
149 QFrame *topFrame2 = addPage(i18n("Details")); 154 Q3Frame *topFrame2 = addPage(i18n("Details"));
150 155
151 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); 156 Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
152 topLayout2->setSpacing(spacingHint()-1); 157 topLayout2->setSpacing(spacingHint()-1);
153 topLayout2->setMargin(marginHint()-1); 158 topLayout2->setMargin(marginHint()-1);
154 topLayout2->setSpacing(spacingHint()); 159 topLayout2->setSpacing(spacingHint());
@@ -160,18 +165,18 @@ void KOEventEditor::setupGeneral()
160 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); 165 connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
161 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 166 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
162 } else { 167 } else {
163 QFrame *topFrame = addPage(i18n("General")); 168 Q3Frame *topFrame = addPage(i18n("General"));
164 169
165 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 170 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
166 topLayout->setSpacing(spacingHint()); 171 topLayout->setSpacing(spacingHint());
167 172
168 mGeneral->initHeader(topFrame,topLayout); 173 mGeneral->initHeader(topFrame,topLayout);
169 mGeneral->initTime(topFrame,topLayout); 174 mGeneral->initTime(topFrame,topLayout);
170 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 175 Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
171 mGeneral->initAlarm(topFrame,alarmLineLayout); 176 mGeneral->initAlarm(topFrame,alarmLineLayout);
172 mGeneral->initClass(topFrame,alarmLineLayout); 177 mGeneral->initClass(topFrame,alarmLineLayout);
173 mGeneral->initDescription(topFrame,topLayout); 178 mGeneral->initDescription(topFrame,topLayout);
174 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); 179 Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout);
175 mGeneral->initCategories( topFrame, detailsLayout ); 180 mGeneral->initCategories( topFrame, detailsLayout );
176 mGeneral->initSecrecy( topFrame, detailsLayout ); 181 mGeneral->initSecrecy( topFrame, detailsLayout );
177 } 182 }
@@ -182,8 +187,8 @@ void KOEventEditor::setupGeneral()
182 187
183void KOEventEditor::setupRecurrence() 188void KOEventEditor::setupRecurrence()
184{ 189{
185 QFrame *topFrame = addPage( i18n("Recurrence") ); 190 Q3Frame *topFrame = addPage( i18n("Recurrence") );
186 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 191 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
187 192
188 mRecurrence = new KOEditorRecurrence( topFrame ); 193 mRecurrence = new KOEditorRecurrence( topFrame );
189 topLayout->addWidget( mRecurrence ); 194 topLayout->addWidget( mRecurrence );
@@ -356,7 +361,7 @@ void KOEventEditor::slotLoadTemplate()
356 .arg( fileName ) ); 361 .arg( fileName ) );
357 return ; 362 return ;
358 } 363 }
359 QPtrList<Event> events = cal.events(); 364 Q3PtrList<Event> events = cal.events();
360 Event* event = events.first(); 365 Event* event = events.first();
361 if ( !event ) { 366 if ( !event ) {
362 KMessageBox::error( this, 367 KMessageBox::error( this,
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp
index fc4d9a4..81047c1 100644
--- a/korganizer/koeventpopupmenu.cpp
+++ b/korganizer/koeventpopupmenu.cpp
@@ -22,6 +22,9 @@
22*/ 22*/
23 23
24#include <qcursor.h> 24#include <qcursor.h>
25//Added by qt3to4:
26#include <Q3ValueList>
27#include <Q3PopupMenu>
25 28
26#include <klocale.h> 29#include <klocale.h>
27#include <kdebug.h> 30#include <kdebug.h>
@@ -32,7 +35,7 @@
32#include "koeventpopupmenu.h" 35#include "koeventpopupmenu.h"
33#include "koprefs.h" 36#include "koprefs.h"
34 37
35KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() 38KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu()
36{ 39{
37 mCurrentIncidence = 0; 40 mCurrentIncidence = 0;
38 mHasAdditionalItems = false; 41 mHasAdditionalItems = false;
@@ -53,11 +56,11 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
53 mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), 56 mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"),
54 this,SLOT(popupCancel()))); 57 this,SLOT(popupCancel())));
55 isDisabled = false; 58 isDisabled = false;
56 mCatPopup = new QPopupMenu ( this ); 59 mCatPopup = new Q3PopupMenu ( this );
57 mCatPopup->setCheckable (true); 60 mCatPopup->setCheckable (true);
58 connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); 61 connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup()));
59 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); 62 connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int )));
60 mCalPopup = new QPopupMenu ( this ); 63 mCalPopup = new Q3PopupMenu ( this );
61 mCalPopup->setCheckable (true); 64 mCalPopup->setCheckable (true);
62 connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); 65 connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup()));
63 connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); 66 connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int )));
@@ -65,7 +68,7 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
65 //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); 68 //mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup ));
66 insertItem (i18n("Categories"),mCatPopup ); 69 insertItem (i18n("Categories"),mCatPopup );
67 insertItem (i18n("Calendar"),mCalPopup ); 70 insertItem (i18n("Calendar"),mCalPopup );
68 QValueList<int>::Iterator it; 71 Q3ValueList<int>::Iterator it;
69 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { 72 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
70 mSingleOnlyItems.append(*it); 73 mSingleOnlyItems.append(*it);
71 } 74 }
@@ -74,7 +77,7 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu()
74void KOEventPopupMenu::enableDefault( bool enable ) 77void KOEventPopupMenu::enableDefault( bool enable )
75{ 78{
76 isDisabled = !enable; 79 isDisabled = !enable;
77 QValueList<int>::Iterator it; 80 Q3ValueList<int>::Iterator it;
78 for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { 81 for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) {
79 setItemEnabled(*it,enable); 82 setItemEnabled(*it,enable);
80 } 83 }
@@ -146,7 +149,7 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
146 if (mCurrentIncidence) { 149 if (mCurrentIncidence) {
147 // Enable/Disabled menu items only valid for editable events. 150 // Enable/Disabled menu items only valid for editable events.
148 if ( !isDisabled ) { 151 if ( !isDisabled ) {
149 QValueList<int>::Iterator it; 152 Q3ValueList<int>::Iterator it;
150 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { 153 for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) {
151 setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); 154 setItemEnabled(*it,!mCurrentIncidence->isReadOnly());
152 } 155 }
@@ -155,7 +158,7 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence)
155 } 158 }
156} 159}
157 160
158void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, 161void KOEventPopupMenu::addAdditionalItem(const QIcon &icon,const QString &text,
159 const QObject *receiver, const char *member, 162 const QObject *receiver, const char *member,
160 bool editOnly) 163 bool editOnly)
161{ 164{
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h
index e28745b..de5220b 100644
--- a/korganizer/koeventpopupmenu.h
+++ b/korganizer/koeventpopupmenu.h
@@ -26,18 +26,20 @@
26// Context menu for event views with standard event actions 26// Context menu for event views with standard event actions
27// 27//
28 28
29#include <qpopupmenu.h> 29#include <q3popupmenu.h>
30//Added by qt3to4:
31#include <Q3ValueList>
30 32
31#include <libkcal/incidence.h> 33#include <libkcal/incidence.h>
32 34
33using namespace KCal; 35using namespace KCal;
34 36
35class KOEventPopupMenu : public QPopupMenu { 37class KOEventPopupMenu : public Q3PopupMenu {
36 Q_OBJECT 38 Q_OBJECT
37 public: 39 public:
38 KOEventPopupMenu(); 40 KOEventPopupMenu();
39 41
40 void addAdditionalItem(const QIconSet &icon,const QString &text, 42 void addAdditionalItem(const QIcon &icon,const QString &text,
41 const QObject *receiver, const char *member, 43 const QObject *receiver, const char *member,
42 bool editOnly=false); 44 bool editOnly=false);
43 45
@@ -73,11 +75,11 @@ class KOEventPopupMenu : public QPopupMenu {
73 Incidence *mCurrentIncidence; 75 Incidence *mCurrentIncidence;
74 76
75 bool mHasAdditionalItems; 77 bool mHasAdditionalItems;
76 QValueList<int> mEditOnlyItems; 78 Q3ValueList<int> mEditOnlyItems;
77 QValueList<int> mSingleOnlyItems; 79 Q3ValueList<int> mSingleOnlyItems;
78 bool isDisabled; 80 bool isDisabled;
79 QPopupMenu *mCatPopup; 81 Q3PopupMenu *mCatPopup;
80 QPopupMenu *mCalPopup; 82 Q3PopupMenu *mCalPopup;
81}; 83};
82 84
83#endif 85#endif
diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp
index 1d26930..a4ba85e 100644
--- a/korganizer/koeventview.cpp
+++ b/korganizer/koeventview.cpp
@@ -21,7 +21,7 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qpopupmenu.h> 24#include <q3popupmenu.h>
25#include <qcursor.h> 25#include <qcursor.h>
26 26
27#include <klocale.h> 27#include <klocale.h>
@@ -73,7 +73,7 @@ KOEventPopupMenu *KOEventView::eventPopup()
73 73
74//--------------------------------------------------------------------------- 74//---------------------------------------------------------------------------
75 75
76void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event) 76void KOEventView::showIncidencePopup(Q3PopupMenu *popup,Incidence *event)
77{ 77{
78 mCurrentIncidence = event; 78 mCurrentIncidence = event;
79 if (event) popup->popup(QCursor::pos()); 79 if (event) popup->popup(QCursor::pos());
diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h
index 77ec111..f28e68b 100644
--- a/korganizer/koeventview.h
+++ b/korganizer/koeventview.h
@@ -30,6 +30,8 @@
30#include <korganizer/baseview.h> 30#include <korganizer/baseview.h>
31 31
32#include "koeventpopupmenu.h" 32#include "koeventpopupmenu.h"
33//Added by qt3to4:
34#include <Q3PopupMenu>
33 35
34using namespace KCal; 36using namespace KCal;
35 37
@@ -87,7 +89,7 @@ class KOEventView : public KOrg::BaseView
87 * @param event event, which is to be manipulated by the menu actions 89 * @param event event, which is to be manipulated by the menu actions
88 * @param popup a popop menu created with eventPopup() 90 * @param popup a popop menu created with eventPopup()
89 */ 91 */
90 void showIncidencePopup(QPopupMenu *popup, Incidence *event); 92 void showIncidencePopup(Q3PopupMenu *popup, Incidence *event);
91 93
92 /** 94 /**
93 Perform the default action for an incidence, e.g. open the event editor, 95 Perform the default action for an incidence, e.g. open the event editor,
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index c0acf34..4df26a9 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -17,12 +17,17 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qcstring.h> 20#include <q3cstring.h>
21#include <qwhatsthis.h> 21#include <q3whatsthis.h>
22#include <qdialog.h> 22#include <qdialog.h>
23#include <qapplication.h> 23#include <qapplication.h>
24#include <QDesktopWidget>
24#include <qlabel.h> 25#include <qlabel.h>
25#include <qlayout.h> 26#include <qlayout.h>
27//Added by qt3to4:
28#include <QKeyEvent>
29#include <Q3PtrList>
30#include <Q3VBoxLayout>
26 31
27#include <klocale.h> 32#include <klocale.h>
28#include <kapplication.h> 33#include <kapplication.h>
@@ -55,14 +60,14 @@
55#include <kabc/addresseeview.h> 60#include <kabc/addresseeview.h>
56#include <qprinter.h> 61#include <qprinter.h>
57#include <qpainter.h> 62#include <qpainter.h>
58#include <qpaintdevicemetrics.h> 63#include <q3paintdevicemetrics.h>
59#else //DESKTOP_VERSION 64#else //DESKTOP_VERSION
60#include <qtopia/qcopenvelope_qws.h> 65#include <qtopia/qcopenvelope_qws.h>
61#endif //DESKTOP_VERSION 66#endif //DESKTOP_VERSION
62#include <externalapphandler.h> 67#include <externalapphandler.h>
63 68
64KOEventViewer::KOEventViewer(QWidget *parent,const char *name) 69KOEventViewer::KOEventViewer(QWidget *parent,const char *name)
65 : QTextBrowser(parent,name) 70 : Q3TextBrowser(parent,name)
66{ 71{
67 mSyncMode = false; 72 mSyncMode = false;
68 mColorMode = 0; 73 mColorMode = 0;
@@ -86,7 +91,7 @@ void KOEventViewer::printMe()
86 return; 91 return;
87 QPainter p; 92 QPainter p;
88 p.begin ( &printer ); 93 p.begin ( &printer );
89 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 94 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
90 float dx, dy; 95 float dx, dy;
91 int wid = (m.width() * 9)/10; 96 int wid = (m.width() * 9)/10;
92 dx = (float) wid/(float)contentsWidth (); 97 dx = (float) wid/(float)contentsWidth ();
@@ -134,7 +139,7 @@ void KOEventViewer::setSource(const QString& n)
134 //qDebug("found %s ",(*it).mobileHomePhone().latin1() ); 139 //qDebug("found %s ",(*it).mobileHomePhone().latin1() );
135 QDialog dia( this,"dia123", true ); 140 QDialog dia( this,"dia123", true );
136 dia.setCaption( i18n("Details of attendee") ); 141 dia.setCaption( i18n("Details of attendee") );
137 QVBoxLayout lay ( &dia ); 142 Q3VBoxLayout lay ( &dia );
138 KABC::AddresseeView av ( &dia ); 143 KABC::AddresseeView av ( &dia );
139 av.setAddressee( (*it) ); 144 av.setAddressee( (*it) );
140 lay.addWidget( &av ); 145 lay.addWidget( &av );
@@ -155,7 +160,7 @@ void KOEventViewer::setSource(const QString& n)
155 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),""); 160 ExternalAppHandler::instance()->requestDetailsFromKAPI("", mCurrentIncidence->organizer(),"");
156 return; 161 return;
157 } 162 }
158 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 163 Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees();
159 if (attendees.count()) { 164 if (attendees.count()) {
160 Attendee *a; 165 Attendee *a;
161 for(a=attendees.first();a;a=attendees.next()) { 166 for(a=attendees.first();a;a=attendees.next()) {
@@ -200,14 +205,14 @@ void KOEventViewer::setSource(const QString& n)
200 const QByteArray noParamData; 205 const QByteArray noParamData;
201 const QByteArray paramData; 206 const QByteArray paramData;
202 QByteArray replyData; 207 QByteArray replyData;
203 QCString replyTypeStr; 208 Q3CString replyTypeStr;
204#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) 209#define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData))
205 bool foundAbbrowser = PING_ABBROWSER; 210 bool foundAbbrowser = PING_ABBROWSER;
206 211
207 if (foundAbbrowser) { 212 if (foundAbbrowser) {
208 //KAddressbook is already running, so just DCOP to it to bring up the contact editor 213 //KAddressbook is already running, so just DCOP to it to bring up the contact editor
209 //client->send("kaddressbook","KAddressBookIface", 214 //client->send("kaddressbook","KAddressBookIface",
210 QDataStream arg(paramData, IO_WriteOnly); 215 QDataStream arg(paramData, QIODevice::WriteOnly);
211 arg << n.mid(6); 216 arg << n.mid(6);
212 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); 217 client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData);
213 return; 218 return;
@@ -231,7 +236,7 @@ void KOEventViewer::setSource(const QString& n)
231} 236}
232void KOEventViewer::mailToAttendees( bool all ) 237void KOEventViewer::mailToAttendees( bool all )
233{ 238{
234 QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); 239 Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees();
235 if (attendees.count() == 0) return; 240 if (attendees.count() == 0) return;
236 QStringList nameList; 241 QStringList nameList;
237 QStringList emailList; 242 QStringList emailList;
@@ -260,7 +265,7 @@ void KOEventViewer::mailToAttendees( bool all )
260} 265}
261void KOEventViewer::addTag(const QString & tag,const QString & text) 266void KOEventViewer::addTag(const QString & tag,const QString & text)
262{ 267{
263 int number=text.contains("\n"); 268 int number=text.count("\n");
264 QString str = "<" + tag + ">"; 269 QString str = "<" + tag + ">";
265 QString tmpText=text; 270 QString tmpText=text;
266 QString tmpStr=str; 271 QString tmpStr=str;
@@ -587,7 +592,7 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
587 592
588 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); 593 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>");
589 } 594 }
590 QPtrList<Incidence> Relations = event->relations(); 595 Q3PtrList<Incidence> Relations = event->relations();
591 Incidence *to; 596 Incidence *to;
592 if ( Relations.first() ) 597 if ( Relations.first() )
593 addTag("b",i18n("Sub todos:<br>")); 598 addTag("b",i18n("Sub todos:<br>"));
@@ -621,7 +626,7 @@ void KOEventViewer::formatCategories(Incidence *event)
621} 626}
622void KOEventViewer::formatAttendees(Incidence *event) 627void KOEventViewer::formatAttendees(Incidence *event)
623{ 628{
624 QPtrList<Attendee> attendees = event->attendees(); 629 Q3PtrList<Attendee> attendees = event->attendees();
625 if (attendees.count()) { 630 if (attendees.count()) {
626 631
627 632
@@ -654,7 +659,7 @@ void KOEventViewer::formatAttendees(Incidence *event)
654 mText.append(event->organizer()); 659 mText.append(event->organizer());
655#endif 660#endif
656 661
657 if (iconPath) { 662 if (!iconPath.isEmpty()) {
658 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 663 mText += " <a href=\"mailto:" + event->organizer() + "\">";
659 mText += "<IMG src=\"" + iconPath + "\">"; 664 mText += "<IMG src=\"" + iconPath + "\">";
660 mText += "</a>\n"; 665 mText += "</a>\n";
@@ -704,7 +709,7 @@ void KOEventViewer::formatAttendees(Incidence *event)
704 709
705 710
706 if (!a->email().isEmpty()) { 711 if (!a->email().isEmpty()) {
707 if (iconPath) { 712 if (!iconPath.isEmpty()) {
708 mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; 713 mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">";
709 if ( a->RSVP() ) { 714 if ( a->RSVP() ) {
710 ++a_count_nr; 715 ++a_count_nr;
@@ -862,7 +867,7 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e )
862 e->ignore(); 867 e->ignore();
863 break; 868 break;
864 default: 869 default:
865 QTextBrowser::keyPressEvent ( e ); 870 Q3TextBrowser::keyPressEvent ( e );
866 break; 871 break;
867 } 872 }
868} 873}
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 64eb4ff..3df667f 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -22,7 +22,10 @@
22// Viewer widget for events. 22// Viewer widget for events.
23// 23//
24 24
25#include <qtextbrowser.h> 25#include <q3textbrowser.h>
26//Added by qt3to4:
27#include <Q3VBoxLayout>
28#include <QKeyEvent>
26 29
27#include <libkcal/event.h> 30#include <libkcal/event.h>
28#include <libkcal/journal.h> 31#include <libkcal/journal.h>
@@ -37,7 +40,7 @@ using namespace KCal;
37#include <qlayout.h> 40#include <qlayout.h>
38#include <qdialog.h> 41#include <qdialog.h>
39#include <qlabel.h> 42#include <qlabel.h>
40#include <qbuttongroup.h> 43#include <q3buttongroup.h>
41#include <kglobal.h> 44#include <kglobal.h>
42 45
43class KOPrintPrefs : public QDialog 46class KOPrintPrefs : public QDialog
@@ -47,13 +50,13 @@ class KOPrintPrefs : public QDialog
47 QDialog( parent, name, true ) 50 QDialog( parent, name, true )
48 { 51 {
49 setCaption( i18n("KO/Pi Printout") ); 52 setCaption( i18n("KO/Pi Printout") );
50 QVBoxLayout* lay = new QVBoxLayout( this ); 53 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
51 lay->setSpacing( 9 ); 54 lay->setSpacing( 9 );
52 lay->setMargin( 9 ); 55 lay->setMargin( 9 );
53 QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n"), this ); 56 QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n"), this );
54 lay->addWidget( lab ); 57 lay->addWidget( lab );
55 lab->setAlignment( AlignCenter ); 58 lab->setAlignment( Qt::AlignCenter );
56 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); 59 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Printout Mode"), this );
57 lay->addWidget( format ); 60 lay->addWidget( format );
58 format->setExclusive ( true ) ; 61 format->setExclusive ( true ) ;
59 pmNo = new QRadioButton(i18n("Print unscaled"), format ); 62 pmNo = new QRadioButton(i18n("Print unscaled"), format );
@@ -83,7 +86,7 @@ private:
83 86
84#endif 87#endif
85 88
86class KOEventViewer : public QTextBrowser { 89class KOEventViewer : public Q3TextBrowser {
87 Q_OBJECT 90 Q_OBJECT
88 public: 91 public:
89 KOEventViewer(QWidget *parent=0,const char *name=0); 92 KOEventViewer(QWidget *parent=0,const char *name=0);
@@ -117,7 +120,7 @@ class KOEventViewer : public QTextBrowser {
117 void keyPressEvent ( QKeyEvent * e ); 120 void keyPressEvent ( QKeyEvent * e );
118 121
119 private: 122 private:
120 QTextBrowser *mEventTextView; 123 Q3TextBrowser *mEventTextView;
121 bool mSyncMode; 124 bool mSyncMode;
122 QString deTag(QString text); 125 QString deTag(QString text);
123 126
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 2e936f3..3a37852 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -22,12 +22,15 @@
22#include <libkcal/event.h> 22#include <libkcal/event.h>
23#include <qtimer.h> 23#include <qtimer.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25//Added by qt3to4:
26#include <QHideEvent>
27#include <QKeyEvent>
25 28
26#include "koeventviewer.h" 29#include "koeventviewer.h"
27#include <kmessagebox.h> 30#include <kmessagebox.h>
28#include "koprefs.h" 31#include "koprefs.h"
29#include <libkcal/todo.h> 32#include <libkcal/todo.h>
30#include "qapp.h" 33#include "qapplication.h"
31 34
32#include "koeventviewerdialog.h" 35#include "koeventviewerdialog.h"
33extern int globalFlagBlockAgenda; 36extern int globalFlagBlockAgenda;
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 71696f4..947c10b 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -22,7 +22,10 @@
22// Viewer dialog for events. 22// Viewer dialog for events.
23// 23//
24 24
25#include <qtextview.h> 25#include <q3textview.h>
26//Added by qt3to4:
27#include <QKeyEvent>
28#include <QHideEvent>
26 29
27#include <kdialogbase.h> 30#include <kdialogbase.h>
28 31
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ee9c9f6..8335ba9 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -27,10 +27,14 @@
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qdialog.h> 29#include <qdialog.h>
30#include <qtextstream.h> 30#include <q3textstream.h>
31#include <qtextcodec.h> 31#include <qtextcodec.h>
32#include <qwhatsthis.h> 32#include <q3whatsthis.h>
33#include <qdir.h> 33#include <qdir.h>
34//Added by qt3to4:
35#include <Q3GridLayout>
36#include <Q3Frame>
37#include <Q3PtrList>
34 38
35 39
36#include <libkcal/calfilter.h> 40#include <libkcal/calfilter.h>
@@ -47,8 +51,8 @@
47 51
48 52
49 53
50KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, 54KOFilterView::KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent,
51 const char* name,WFlags fl ) 55 const char* name,Qt::WFlags fl )
52 : KOFilterView_base(parent,name,fl) 56 : KOFilterView_base(parent,name,fl)
53{ 57{
54 mFilters = filterList; 58 mFilters = filterList;
@@ -114,14 +118,14 @@ void KOFilterView::setSelectedFilter( int fil )
114 118
115KOCalEditView::KOCalEditView(QWidget* parent, 119KOCalEditView::KOCalEditView(QWidget* parent,
116 const char* name ) 120 const char* name )
117 : QScrollView(parent,name) 121 : Q3ScrollView(parent,name)
118{ 122{
119 mw = 0; 123 mw = 0;
120 setResizePolicy( AutoOneFit ); 124 setResizePolicy( AutoOneFit );
121 setFrameStyle ( QFrame::Panel | QFrame::Plain ); 125 setFrameStyle ( Q3Frame::Panel | Q3Frame::Plain );
122 setLineWidth ( 1 ); 126 setLineWidth ( 1 );
123 setMidLineWidth ( 1 ); 127 setMidLineWidth ( 1 );
124 setFocusPolicy(NoFocus); 128 setFocusPolicy(Qt::NoFocus);
125} 129}
126 130
127KOCalEditView::~KOCalEditView() 131KOCalEditView::~KOCalEditView()
@@ -247,55 +251,55 @@ void KOCalEditView::readConfig()
247 mw = new QWidget ( viewport() ); 251 mw = new QWidget ( viewport() );
248 addChild(mw); 252 addChild(mw);
249 int ii = 0; 253 int ii = 0;
250 mainLayout = new QGridLayout ( mw , 2, 8 ); 254 mainLayout = new Q3GridLayout ( mw , 2, 8 );
251 mainLayout->setMargin( 2 ); 255 mainLayout->setMargin( 2 );
252 mainLayout->setSpacing( 2 ); 256 mainLayout->setSpacing( 2 );
253 QPushButton * addButT = new QPushButton ( mw ); 257 QPushButton * addButT = new QPushButton ( mw );
254 addButT->setFocusPolicy(NoFocus); 258 addButT->setFocusPolicy(Qt::NoFocus);
255 mainLayout->addWidget( addButT,0,0 ); 259 mainLayout->addWidget( addButT,0,0 );
256 addButT->setText( "D"); 260 addButT->setText( "D");
257 connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); 261 connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo()));
258 QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); 262 Q3WhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
259 //addBut->setPixmap ( SmallIcon("greenhook16")); 263 //addBut->setPixmap ( SmallIcon("greenhook16"));
260 QPushButton *addBut = new QPushButton ( mw ); 264 QPushButton *addBut = new QPushButton ( mw );
261 addBut->setFocusPolicy(NoFocus); 265 addBut->setFocusPolicy(Qt::NoFocus);
262 mainLayout->addWidget( addBut,0,++ii ); 266 mainLayout->addWidget( addBut,0,++ii );
263 addBut->setPixmap ( SmallIcon("eye")); 267 addBut->setPixmap ( SmallIcon("eye"));
264 QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") ); 268 Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.") );
265 connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); 269 connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
266 int max = addBut->sizeHint().height(); 270 int max = addBut->sizeHint().height();
267 addBut->setMaximumWidth( max ); 271 addBut->setMaximumWidth( max );
268 addButT->setFixedSize( QSize( max, max ) ); 272 addButT->setFixedSize( QSize( max, max ) );
269 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); 273 QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw );
270 mainLayout->addWidget( lab,0,++ii ); 274 mainLayout->addWidget( lab,0,++ii );
271 QWhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") ); 275 Q3WhatsThis::add( lab, i18n("In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.") );
272 //lab = new QLabel ( i18n(" "), mw ); 276 //lab = new QLabel ( i18n(" "), mw );
273 //mainLayout->addWidget( lab,0,++ii ); 277 //mainLayout->addWidget( lab,0,++ii );
274 //lab->setFixedWidth( 1 ); 278 //lab->setFixedWidth( 1 );
275 addBut = new QPushButton ( mw ); 279 addBut = new QPushButton ( mw );
276 addBut->setFocusPolicy(NoFocus); 280 addBut->setFocusPolicy(Qt::NoFocus);
277 mainLayout->addWidget( addBut,0,++ii ); 281 mainLayout->addWidget( addBut,0,++ii );
278 addBut->setPixmap ( SmallIcon("bell")); 282 addBut->setPixmap ( SmallIcon("bell"));
279 QWhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") ); 283 Q3WhatsThis::add( addBut, i18n("In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as \"do not use\". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.") );
280 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); 284 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
281 addBut->setMaximumWidth( addBut->sizeHint().height() ); 285 addBut->setMaximumWidth( addBut->sizeHint().height() );
282 286
283 addBut = new QPushButton ( mw ); 287 addBut = new QPushButton ( mw );
284 addBut->setFocusPolicy(NoFocus); 288 addBut->setFocusPolicy(Qt::NoFocus);
285 mainLayout->addWidget( addBut,0,++ii ); 289 mainLayout->addWidget( addBut,0,++ii );
286 addBut->setPixmap ( SmallIcon("pencil")); 290 addBut->setPixmap ( SmallIcon("pencil"));
287 QWhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") ); 291 Q3WhatsThis::add( addBut, i18n("In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.") );
288 connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); 292 connect(addBut,SIGNAL(clicked()),SLOT(disableRO()));
289 addBut->setMaximumWidth( addBut->sizeHint().height() ); 293 addBut->setMaximumWidth( addBut->sizeHint().height() );
290 lab = new QLabel ( "", mw ); 294 lab = new QLabel ( "", mw );
291 mainLayout->addWidget( lab,0,++ii ); 295 mainLayout->addWidget( lab,0,++ii );
292 296
293 addBut = new QPushButton ( mw ); 297 addBut = new QPushButton ( mw );
294 addBut->setFocusPolicy(NoFocus); 298 addBut->setFocusPolicy(Qt::NoFocus);
295 mainLayout->addWidget( addBut,0,++ii ); 299 mainLayout->addWidget( addBut,0,++ii );
296 addBut->setPixmap ( SmallIcon("plus")); 300 addBut->setPixmap ( SmallIcon("plus"));
297 connect(addBut,SIGNAL(clicked()),SLOT(addCal())); 301 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
298 QWhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") ); 302 Q3WhatsThis::add( addBut, i18n("Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.") );
299 lab = new QLabel ( " ", mw ); 303 lab = new QLabel ( " ", mw );
300 mainLayout->addWidget( lab,0,++ii ); 304 mainLayout->addWidget( lab,0,++ii );
301 305
@@ -431,11 +435,11 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask )
431 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No ) 435 if ( KMessageBox::questionYesNo(this, i18n("The file\n%1\ndoes not exist!\nShall I create it for you?").arg( KGlobal::formatMessage (absFile,0) ) )== KMessageBox::No )
432 return 0; 436 return 0;
433 QFile fileIn( absFile ); 437 QFile fileIn( absFile );
434 if (!fileIn.open( IO_WriteOnly ) ) { 438 if (!fileIn.open( QIODevice::WriteOnly ) ) {
435 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); 439 KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) );
436 return 0; 440 return 0;
437 } 441 }
438 QTextStream tsIn( &fileIn ); 442 Q3TextStream tsIn( &fileIn );
439 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 443 tsIn.setCodec( QTextCodec::codecForName("utf8") );
440 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; 444 tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n";
441 fileIn.close(); 445 fileIn.close();
@@ -475,7 +479,7 @@ void KOCalEditView::disableRO()
475{ 479{
476 toggleList( mROB, false ); 480 toggleList( mROB, false );
477} 481}
478void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list , bool enable ) 482void KOCalEditView::toggleList ( Q3PtrList<KOCalCheckButton> list , bool enable )
479{ 483{
480 bool dis = !enable; 484 bool dis = !enable;
481 KOCalCheckButton* it = list.first(); 485 KOCalCheckButton* it = list.first();
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 0dd423a..f1bbab4 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -26,12 +26,18 @@
26#include <qstring.h> 26#include <qstring.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qradiobutton.h> 30#include <qradiobutton.h>
30#include <qlayout.h> 31#include <qlayout.h>
31#include <qlabel.h> 32#include <qlabel.h>
32#include <qdialog.h> 33#include <qdialog.h>
33#include <qscrollview.h> 34#include <q3scrollview.h>
34#include <qpushbutton.h> 35#include <qpushbutton.h>
36//Added by qt3to4:
37#include <Q3GridLayout>
38#include <Q3PtrList>
39#include <QKeyEvent>
40#include <Q3VBoxLayout>
35#include <kconfig.h> 41#include <kconfig.h>
36#include "kofilterview_base.h" 42#include "kofilterview_base.h"
37 43
@@ -42,7 +48,7 @@
42#include <kglobal.h> 48#include <kglobal.h>
43#include <kmessagebox.h> 49#include <kmessagebox.h>
44 50
45class QGridLayout; 51class Q3GridLayout;
46 52
47using namespace KCal; 53using namespace KCal;
48 54
@@ -54,7 +60,7 @@ class KONewCalPrefs : public QDialog
54 QDialog( parent, name, true ) 60 QDialog( parent, name, true )
55 { 61 {
56 setCaption( i18n("Add new Calendar") ); 62 setCaption( i18n("Add new Calendar") );
57 QVBoxLayout* lay = new QVBoxLayout( this ); 63 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
58 lay->setSpacing( 3 ); 64 lay->setSpacing( 3 );
59 lay->setMargin( 3 ); 65 lay->setMargin( 3 );
60 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); 66 QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this );
@@ -110,7 +116,7 @@ class KOCalButton : public QPushButton
110 connect( this, SIGNAL( clicked() ), 116 connect( this, SIGNAL( clicked() ),
111 SLOT( bottonClicked() )); 117 SLOT( bottonClicked() ));
112 mNumber = -1; 118 mNumber = -1;
113 setFocusPolicy(NoFocus); 119 setFocusPolicy(Qt::NoFocus);
114 } 120 }
115 void setNum ( int num ) {mNumber = num; } 121 void setNum ( int num ) {mNumber = num; }
116 signals: 122 signals:
@@ -135,7 +141,7 @@ class KOCalCheckButton : public QCheckBox
135 connect( this, SIGNAL( toggled ( bool ) ), 141 connect( this, SIGNAL( toggled ( bool ) ),
136 SLOT( bottonClicked( bool ) )); 142 SLOT( bottonClicked( bool ) ));
137 mNumber = -1; 143 mNumber = -1;
138 setFocusPolicy(NoFocus); 144 setFocusPolicy(Qt::NoFocus);
139 //setMaximumWidth( 10 ); 145 //setMaximumWidth( 10 );
140 146
141 } 147 }
@@ -163,7 +169,7 @@ class KOCalRadioButton : public QRadioButton
163 connect( this, SIGNAL( toggled ( bool ) ), 169 connect( this, SIGNAL( toggled ( bool ) ),
164 SLOT( bottonClicked( bool ) )); 170 SLOT( bottonClicked( bool ) ));
165 mNumber = -1; 171 mNumber = -1;
166 setFocusPolicy(NoFocus); 172 setFocusPolicy(Qt::NoFocus);
167 //setMaximumWidth( 10 ); 173 //setMaximumWidth( 10 );
168 174
169 } 175 }
@@ -188,7 +194,7 @@ class KOFilterView : public KOFilterView_base
188{ 194{
189 Q_OBJECT 195 Q_OBJECT
190 public: 196 public:
191 KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); 197 KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, Qt::WFlags fl=0);
192 ~KOFilterView(); 198 ~KOFilterView();
193 199
194 void updateFilters(); 200 void updateFilters();
@@ -204,10 +210,10 @@ class KOFilterView : public KOFilterView_base
204 void editFilters(); 210 void editFilters();
205 211
206 private: 212 private:
207 QPtrList<CalFilter> *mFilters; 213 Q3PtrList<CalFilter> *mFilters;
208}; 214};
209 215
210class KOCalEditView : public QScrollView 216class KOCalEditView : public Q3ScrollView
211{ 217{
212 Q_OBJECT 218 Q_OBJECT
213 public: 219 public:
@@ -244,12 +250,12 @@ class KOCalEditView : public QScrollView
244 250
245 private: 251 private:
246 QWidget *mw; 252 QWidget *mw;
247 void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); 253 void toggleList ( Q3PtrList<KOCalCheckButton> , bool b = true );
248 QPtrList<KOCalRadioButton> mStdandardB; 254 Q3PtrList<KOCalRadioButton> mStdandardB;
249 QPtrList<KOCalCheckButton> mEnabledB; 255 Q3PtrList<KOCalCheckButton> mEnabledB;
250 QPtrList<KOCalCheckButton> mAlarmB; 256 Q3PtrList<KOCalCheckButton> mAlarmB;
251 QPtrList<KOCalCheckButton> mROB; 257 Q3PtrList<KOCalCheckButton> mROB;
252 QGridLayout* mainLayout; 258 Q3GridLayout* mainLayout;
253}; 259};
254 260
255 261
diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp
index 79b97e8..63d044c 100644
--- a/korganizer/koimportoldialog.cpp
+++ b/korganizer/koimportoldialog.cpp
@@ -22,20 +22,20 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qprogressbar.h> 28#include <q3progressbar.h>
29#include <qprogressdialog.h> 29#include <q3progressdialog.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qhbox.h> 34#include <q3hbox.h>
35#include <qregexp.h> 35#include <qregexp.h>
36#include <qheader.h> 36#include <q3header.h>
37#include <qdatetime.h> 37#include <qdatetime.h>
38#include <qlistview.h> 38#include <q3listview.h>
39 39
40#include <kdebug.h> 40#include <kdebug.h>
41#include <klocale.h> 41#include <klocale.h>
@@ -70,13 +70,13 @@ QDateTime mDdate2Qdtr( DATE dt)
70 return qdt; 70 return qdt;
71} 71}
72 72
73class OLEListViewItem : public QCheckListItem 73class OLEListViewItem : public Q3CheckListItem
74{ 74{
75 public: 75 public:
76 OLEListViewItem( QListView *parent, QString text ) : 76 OLEListViewItem( Q3ListView *parent, QString text ) :
77 QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; }; 77 Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { mData = 0; };
78 OLEListViewItem( QListViewItem *after, QString text ) : 78 OLEListViewItem( Q3ListViewItem *after, QString text ) :
79 QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; }; 79 Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { mData = 0; };
80 ~OLEListViewItem() {}; 80 ~OLEListViewItem() {};
81 void setData( DWORD data ) {mData= data; }; 81 void setData( DWORD data ) {mData= data; };
82 DWORD data() { return mData ;}; 82 DWORD data() { return mData ;};
@@ -89,9 +89,9 @@ KOImportOLdialog::KOImportOLdialog( const QString &caption,
89 KDialogBase( Plain, caption, User1 | Close, Ok, 89 KDialogBase( Plain, caption, User1 | Close, Ok,
90 parent, caption, true, false, i18n("Import!") ) 90 parent, caption, true, false, i18n("Import!") )
91{ 91{
92 QHBox * mw = new QHBox( this ); 92 Q3HBox * mw = new Q3HBox( this );
93 setMainWidget( mw ); 93 setMainWidget( mw );
94 mListView = new QListView( mw ); 94 mListView = new Q3ListView( mw );
95 mListView->addColumn(i18n("Select Folder to import")); 95 mListView->addColumn(i18n("Select Folder to import"));
96 mListView->addColumn(i18n("Content Type")); 96 mListView->addColumn(i18n("Content Type"));
97 mCalendar = calendar; 97 mCalendar = calendar;
@@ -212,7 +212,7 @@ void KOImportOLdialog::readCalendarData( DWORD folder )
212 LPDISPATCH itm; 212 LPDISPATCH itm;
213 int i; 213 int i;
214 folderItems = mf.GetItems(); 214 folderItems = mf.GetItems();
215 QProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this ); 215 Q3ProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this );
216 bar.setCaption (i18n("Importing!") ); 216 bar.setCaption (i18n("Importing!") );
217 int h = bar.sizeHint().height() ; 217 int h = bar.sizeHint().height() ;
218 int w = 300; 218 int w = 300;
diff --git a/korganizer/koimportoldialog.h b/korganizer/koimportoldialog.h
index c8847c5..d66f099 100644
--- a/korganizer/koimportoldialog.h
+++ b/korganizer/koimportoldialog.h
@@ -31,7 +31,7 @@
31 31
32 32
33class QDateTime; 33class QDateTime;
34class QListView; 34class Q3ListView;
35class OLEListViewItem; 35class OLEListViewItem;
36class _AppointmentItem; 36class _AppointmentItem;
37namespace KPIM { class CategorySelectDialog; } 37namespace KPIM { class CategorySelectDialog; }
@@ -72,7 +72,7 @@ class KOImportOLdialog : public KDialogBase
72 void ol2kopiCalendar( _AppointmentItem * , bool computeRecurrence = true ); 72 void ol2kopiCalendar( _AppointmentItem * , bool computeRecurrence = true );
73 73
74 Calendar *mCalendar; 74 Calendar *mCalendar;
75 QListView * mListView; 75 Q3ListView * mListView;
76 QString getUidByEmail( QString email ); 76 QString getUidByEmail( QString email );
77 77
78 private: 78 private:
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 236f6f9..2060ea1 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -22,12 +22,14 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qdir.h> 30#include <qdir.h>
31//Added by qt3to4:
32#include <Q3VBoxLayout>
31 33
32#include <kdebug.h> 34#include <kdebug.h>
33#include <klocale.h> 35#include <klocale.h>
@@ -82,9 +84,9 @@ KOIncidenceEditor::~KOIncidenceEditor()
82 84
83void KOIncidenceEditor::setupAttendeesTab() 85void KOIncidenceEditor::setupAttendeesTab()
84{ 86{
85 QFrame *topFrame = addPage(i18n("Attendees")); 87 Q3Frame *topFrame = addPage(i18n("Attendees"));
86 88
87 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 89 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
88 90
89 mDetails = new KOEditorDetails(spacingHint()-2,topFrame); 91 mDetails = new KOEditorDetails(spacingHint()-2,topFrame);
90 topLayout->addWidget(mDetails); 92 topLayout->addWidget(mDetails);
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index 406df5a..51594ff 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -25,13 +25,19 @@
25// View of Journal entries 25// View of Journal entries
26 26
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qscrollview.h> 28#include <q3scrollview.h>
29#include <qpopupmenu.h> 29#include <q3popupmenu.h>
30#include <qhbox.h> 30#include <q3hbox.h>
31#include <qpushbutton.h> 31#include <qpushbutton.h>
32#include <qlabel.h> 32#include <qlabel.h>
33#include <qpushbutton.h> 33#include <qpushbutton.h>
34#include <qapplication.h> 34#include <qapplication.h>
35#include <QDesktopWidget>
36//Added by qt3to4:
37#include <QPixmap>
38#include <Q3PtrList>
39#include <QKeyEvent>
40#include <Q3VBoxLayout>
35 41
36#include <klocale.h> 42#include <klocale.h>
37#include <kdebug.h> 43#include <kdebug.h>
@@ -51,7 +57,7 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
51 : KOrg::BaseView(calendar, parent, name) 57 : KOrg::BaseView(calendar, parent, name)
52{ 58{
53 mCalendar = calendar; 59 mCalendar = calendar;
54 QHBox * vb = new QHBox ( this ); 60 Q3HBox * vb = new Q3HBox ( this );
55 QPushButton * newJournal = new QPushButton( vb ); 61 QPushButton * newJournal = new QPushButton( vb );
56 QPixmap icon; 62 QPixmap icon;
57 if ( QApplication::desktop()->width() < 321 ) 63 if ( QApplication::desktop()->width() < 321 )
@@ -63,15 +69,15 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
63 newJournal->setFixedSize( size, size ); 69 newJournal->setFixedSize( size, size );
64 mDateLabel = new QLabel ( vb ); 70 mDateLabel = new QLabel ( vb );
65 mDateLabel->setMargin(1); 71 mDateLabel->setMargin(1);
66 mDateLabel->setAlignment(AlignCenter); 72 mDateLabel->setAlignment(Qt::AlignCenter);
67 QScrollView * sv = new QScrollView( this ); 73 Q3ScrollView * sv = new Q3ScrollView( this );
68 QVBoxLayout * hbl = new QVBoxLayout( this ); 74 Q3VBoxLayout * hbl = new Q3VBoxLayout( this );
69 hbl->addWidget( vb ); 75 hbl->addWidget( vb );
70 hbl->addWidget( sv ); 76 hbl->addWidget( sv );
71 parWid = new QWidget( sv->viewport() ); 77 parWid = new QWidget( sv->viewport() );
72 sv->addChild(parWid); 78 sv->addChild(parWid);
73 sv->setResizePolicy( QScrollView:: AutoOneFit ); 79 sv->setResizePolicy( Q3ScrollView:: AutoOneFit );
74 mTopLayout = new QVBoxLayout(parWid); 80 mTopLayout = new Q3VBoxLayout(parWid);
75 connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); 81 connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) );
76 getNewEntry(); 82 getNewEntry();
77} 83}
@@ -96,9 +102,9 @@ JournalEntry* KOJournalView::getNewEntry()
96 return Entry; 102 return Entry;
97} 103}
98 104
99QPtrList<Incidence> KOJournalView::selectedIncidences() 105Q3PtrList<Incidence> KOJournalView::selectedIncidences()
100{ 106{
101 QPtrList<Incidence> eventList; 107 Q3PtrList<Incidence> eventList;
102 108
103 return eventList; 109 return eventList;
104} 110}
@@ -162,13 +168,13 @@ void KOJournalView::showOnly ( Journal* j )
162 showDates( mDate, QDate() ); 168 showDates( mDate, QDate() );
163 return; 169 return;
164 } 170 }
165 QPtrList<Journal> jl; 171 Q3PtrList<Journal> jl;
166 jl.append ( j ); 172 jl.append ( j );
167 showList( jl ); 173 showList( jl );
168 JournalEntry* mEntry = jEntries.first(); 174 JournalEntry* mEntry = jEntries.first();
169 mEntry->setShowOnly(); 175 mEntry->setShowOnly();
170} 176}
171void KOJournalView::showList(QPtrList<Journal> jl) 177void KOJournalView::showList(Q3PtrList<Journal> jl)
172{ 178{
173 static bool ff = false; 179 static bool ff = false;
174 if ( ff ) return; 180 if ( ff ) return;
@@ -225,11 +231,11 @@ void KOJournalView::showDates(const QDate &start, const QDate &)
225{ 231{
226 mDate = start; 232 mDate = start;
227 mDateLabel->setText(KGlobal::locale()->formatDate(mDate)); 233 mDateLabel->setText(KGlobal::locale()->formatDate(mDate));
228 QPtrList<Journal> jl = calendar()->journals4Date( start ); 234 Q3PtrList<Journal> jl = calendar()->journals4Date( start );
229 showList( jl ); 235 showList( jl );
230} 236}
231 237
232void KOJournalView::showEvents(QPtrList<Event>) 238void KOJournalView::showEvents(Q3PtrList<Event>)
233{ 239{
234 // After new creation of list view no events are selected. 240 // After new creation of list view no events are selected.
235// emit incidenceSelected( 0 ); 241// emit incidenceSelected( 0 );
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index 7fa94ae..22f26cd 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -25,6 +25,11 @@
25 25
26#include <korganizer/baseview.h> 26#include <korganizer/baseview.h>
27#include <qlayout.h> 27#include <qlayout.h>
28//Added by qt3to4:
29#include <QKeyEvent>
30#include <Q3PtrList>
31#include <QLabel>
32#include <Q3BoxLayout>
28 33
29class JournalEntry; 34class JournalEntry;
30class QLabel; 35class QLabel;
@@ -46,7 +51,7 @@ class KOJournalView : public KOrg::BaseView
46 51
47 virtual int currentDateCount(); 52 virtual int currentDateCount();
48 void clearList(); 53 void clearList();
49 virtual QPtrList<Incidence> selectedIncidences(); 54 virtual Q3PtrList<Incidence> selectedIncidences();
50 DateList selectedDates() 55 DateList selectedDates()
51 {DateList q; 56 {DateList q;
52 return q;}; 57 return q;};
@@ -60,17 +65,17 @@ class KOJournalView : public KOrg::BaseView
60 void flushView(); 65 void flushView();
61 void updateConfig(); 66 void updateConfig();
62 void showDates( const QDate &start, const QDate &end ); 67 void showDates( const QDate &start, const QDate &end );
63 void showEvents(QPtrList<Event> eventList); 68 void showEvents(Q3PtrList<Event> eventList);
64 69
65 void changeEventDisplay(Event *, int); 70 void changeEventDisplay(Event *, int);
66 71
67 private: 72 private:
68 void showList(QPtrList<Journal> jl); 73 void showList(Q3PtrList<Journal> jl);
69 Calendar *mCalendar; 74 Calendar *mCalendar;
70 JournalEntry* getNewEntry(); 75 JournalEntry* getNewEntry();
71 QPtrList<JournalEntry> jEntries; 76 Q3PtrList<JournalEntry> jEntries;
72 void keyPressEvent ( QKeyEvent * ) ; 77 void keyPressEvent ( QKeyEvent * ) ;
73 QBoxLayout *mTopLayout; 78 Q3BoxLayout *mTopLayout;
74 QWidget *parWid; 79 QWidget *parWid;
75 QLabel * mDateLabel; 80 QLabel * mDateLabel;
76 QDate mDate; 81 QDate mDate;
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 192f8c0..0ea1d50 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -22,20 +22,29 @@
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qlistview.h> 25#include <q3listview.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qpopupmenu.h> 28#include <q3popupmenu.h>
29#include <qprogressbar.h> 29#include <q3progressbar.h>
30#include <qfileinfo.h> 30#include <qfileinfo.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qdialog.h> 32#include <qdialog.h>
33#include <qtextstream.h> 33#include <q3textstream.h>
34#include <qdir.h> 34#include <qdir.h>
35#include <qwhatsthis.h> 35#include <q3whatsthis.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qpainter.h> 37#include <qpainter.h>
38#include <qpaintdevicemetrics.h> 38#include <q3paintdevicemetrics.h>
39//Added by qt3to4:
40#include <QPixmap>
41#include <QMouseEvent>
42#include <QKeyEvent>
43#include <QEvent>
44#include <Q3VBoxLayout>
45#include <Q3PtrList>
46
47#include<QDesktopWidget>
39 48
40#include <klocale.h> 49#include <klocale.h>
41#include <kdebug.h> 50#include <kdebug.h>
@@ -70,10 +79,10 @@
70extern QPixmap* sgListViewCompletedPix[6]; 79extern QPixmap* sgListViewCompletedPix[6];
71extern QPixmap* sgListViewJournalPix; 80extern QPixmap* sgListViewJournalPix;
72 81
73class KOListViewWhatsThis :public QWhatsThis 82class KOListViewWhatsThis :public Q3WhatsThis
74{ 83{
75public: 84public:
76 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 85 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { };
77 86
78protected: 87protected:
79 virtual QString text( const QPoint& p) 88 virtual QString text( const QPoint& p)
@@ -274,29 +283,29 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
274 mListView->addColumn(i18n("Calendar")); 283 mListView->addColumn(i18n("Calendar"));
275 mListView->addColumn(i18n("Last Modified")); 284 mListView->addColumn(i18n("Last Modified"));
276 285
277 mListView->setColumnAlignment(0,AlignLeft); 286 mListView->setColumnAlignment(0,Qt::AlignLeft);
278 mListView->setColumnAlignment(1,AlignLeft); 287 mListView->setColumnAlignment(1,Qt::AlignLeft);
279 mListView->setColumnAlignment(2,AlignHCenter); 288 mListView->setColumnAlignment(2,Qt::AlignHCenter);
280 mListView->setColumnAlignment(3,AlignLeft); 289 mListView->setColumnAlignment(3,Qt::AlignLeft);
281 mListView->setColumnAlignment(4,AlignHCenter); 290 mListView->setColumnAlignment(4,Qt::AlignHCenter);
282 mListView->setColumnAlignment(5,AlignLeft); 291 mListView->setColumnAlignment(5,Qt::AlignLeft);
283 mListView->setColumnAlignment(6,AlignLeft); 292 mListView->setColumnAlignment(6,Qt::AlignLeft);
284 mListView->setColumnAlignment(7,AlignLeft); 293 mListView->setColumnAlignment(7,Qt::AlignLeft);
285 mListView->setColumnAlignment(8,AlignLeft); 294 mListView->setColumnAlignment(8,Qt::AlignLeft);
286 mListView->setColumnAlignment(9,AlignLeft); 295 mListView->setColumnAlignment(9,Qt::AlignLeft);
287 mListView->setColumnAlignment(10,AlignLeft); 296 mListView->setColumnAlignment(10,Qt::AlignLeft);
288 mListView->setColumnAlignment(11,AlignLeft); 297 mListView->setColumnAlignment(11,Qt::AlignLeft);
289 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); 298 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
290 299
291 int iii = 0; 300 int iii = 0;
292 for ( iii = 0; iii< 12 ; ++iii ) 301 for ( iii = 0; iii< 12 ; ++iii )
293 mListView->setColumnWidthMode( iii, QListView::Manual ); 302 mListView->setColumnWidthMode( iii, Q3ListView::Manual );
294 303
295 QBoxLayout *layoutTop = new QVBoxLayout(this); 304 Q3BoxLayout *layoutTop = new Q3VBoxLayout(this);
296 layoutTop->addWidget(mListView); 305 layoutTop->addWidget(mListView);
297 mListView->setFont ( KOPrefs::instance()->mListViewFont ); 306 mListView->setFont ( KOPrefs::instance()->mListViewFont );
298 mPopupMenu = eventPopup(); 307 mPopupMenu = eventPopup();
299 QPopupMenu* selPopup = new QPopupMenu ( this ); 308 Q3PopupMenu* selPopup = new Q3PopupMenu ( this );
300 mPopupMenu->insertSeparator(); 309 mPopupMenu->insertSeparator();
301 310
302 selPopup->insertItem(i18n("All"),this, 311 selPopup->insertItem(i18n("All"),this,
@@ -306,20 +315,20 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
306 selPopup->insertItem(i18n("Delete selected..."),this, 315 selPopup->insertItem(i18n("Delete selected..."),this,
307 SLOT(deleteAll())); 316 SLOT(deleteAll()));
308 mPopupMenu->insertItem(i18n("Selection"), selPopup ); 317 mPopupMenu->insertItem(i18n("Selection"), selPopup );
309 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 318 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
310 i18n("Hide all selected"),this, 319 i18n("Hide all selected"),this,
311 SLOT(hideAll()),true); 320 SLOT(hideAll()),true);
312 321
313 selPopup->insertSeparator(); 322 selPopup->insertSeparator();
314 QPopupMenu * exportPO = new QPopupMenu ( this ); 323 Q3PopupMenu * exportPO = new Q3PopupMenu ( this );
315 selPopup->insertItem( i18n("Export"), exportPO ); 324 selPopup->insertItem( i18n("Export"), exportPO );
316#ifdef DESKTOP_VERSION 325#ifdef DESKTOP_VERSION
317 mPopupMenu->insertSeparator(); 326 mPopupMenu->insertSeparator();
318 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 327 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
319 i18n("Print complete list..."),this, 328 i18n("Print complete list..."),this,
320 SLOT(printList()),true); 329 SLOT(printList()),true);
321#endif 330#endif
322 mCalPopup = new QPopupMenu ( this ); 331 mCalPopup = new Q3PopupMenu ( this );
323 selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); 332 selPopup->insertItem( i18n("Set Calendar"), mCalPopup );
324 333
325 selPopup->insertItem(i18n("Set categories")+"...",this, 334 selPopup->insertItem(i18n("Set categories")+"...",this,
@@ -327,10 +336,10 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
327 selPopup->insertItem( i18n("Set alarm..."),this, 336 selPopup->insertItem( i18n("Set alarm..."),this,
328 SLOT(setAlarm())); 337 SLOT(setAlarm()));
329#if 0 338#if 0
330 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 339 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
331 i18n("Set categories")+"...",this, 340 i18n("Set categories")+"...",this,
332 SLOT(setCat()),true); 341 SLOT(setCat()),true);
333 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 342 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
334 i18n("Set alarm..."),this, 343 i18n("Set alarm..."),this,
335 SLOT(setAlarm()),true); 344 SLOT(setAlarm()),true);
336#endif 345#endif
@@ -356,7 +365,7 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
356 selPopup->insertItem( i18n("Beam via IR..."),this, 365 selPopup->insertItem( i18n("Beam via IR..."),this,
357 SLOT(beamSelected())); 366 SLOT(beamSelected()));
358#if 0 367#if 0
359 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 368 mPopupMenu->addAdditionalItem(QIcon(QPixmap()),
360 i18n("Beam via IR"),this, 369 i18n("Beam via IR"),this,
361 SLOT(beamSelected()),true); 370 SLOT(beamSelected()),true);
362#endif 371#endif
@@ -375,13 +384,13 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
375 */ 384 */
376 QObject::connect(mListView,SIGNAL( newEvent()), 385 QObject::connect(mListView,SIGNAL( newEvent()),
377 this,SIGNAL(signalNewEvent())); 386 this,SIGNAL(signalNewEvent()));
378 QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), 387 QObject::connect(mListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
379 this,SLOT(defaultItemAction(QListViewItem *))); 388 this,SLOT(defaultItemAction(Q3ListViewItem *)));
380 QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, 389 QObject::connect(mListView,SIGNAL(rightButtonPressed( Q3ListViewItem *,
381 const QPoint &, int )), 390 const QPoint &, int )),
382 this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); 391 this,SLOT(popupMenu(Q3ListViewItem *,const QPoint &,int)));
383 QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), 392 QObject::connect(mListView,SIGNAL(currentChanged(Q3ListViewItem *)),
384 SLOT(processSelectionChange(QListViewItem *))); 393 SLOT(processSelectionChange(Q3ListViewItem *)));
385 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), 394 QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)),
386 SIGNAL(showIncidenceSignal(Incidence *)) ); 395 SIGNAL(showIncidenceSignal(Incidence *)) );
387 396
@@ -428,7 +437,7 @@ void KOListView::setCalendar( int c )
428 return; 437 return;
429 } 438 }
430 439
431 QPtrList<Incidence> delSel = getSelectedIncidences() ; 440 Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
432 int icount = delSel.count(); 441 int icount = delSel.count();
433 if ( icount ) { 442 if ( icount ) {
434 Incidence *incidence = delSel.first(); 443 Incidence *incidence = delSel.first();
@@ -442,7 +451,7 @@ void KOListView::setCalendar( int c )
442 incidence = delSel.next(); 451 incidence = delSel.next();
443 } 452 }
444 } 453 }
445 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 454 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
446 KopiCalendarFile * cal = calendars.first(); 455 KopiCalendarFile * cal = calendars.first();
447 while ( cal ) { 456 while ( cal ) {
448 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled ); 457 mCalendar->setCalendarEnabled( cal->mCalNumber,cal->isEnabled );
@@ -497,7 +506,7 @@ void KOListView::setAlarm()
497 KOAlarmPrefs kap( this); 506 KOAlarmPrefs kap( this);
498 if ( !kap.exec() ) 507 if ( !kap.exec() )
499 return; 508 return;
500 QPtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos 509 Q3PtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos
501 Incidence* inc = delSel.first(); 510 Incidence* inc = delSel.first();
502 int count = 0; 511 int count = 0;
503 while ( inc ) { 512 while ( inc ) {
@@ -522,7 +531,7 @@ void KOListView::setAlarm()
522 else 531 else
523 alarm->setType(Alarm::Invalid); 532 alarm->setType(Alarm::Invalid);
524 } else { 533 } else {
525 QPtrList<Alarm> alarms = inc->alarms(); 534 Q3PtrList<Alarm> alarms = inc->alarms();
526 Alarm *alarm; 535 Alarm *alarm;
527 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { 536 for (alarm = alarms.first(); alarm; alarm = alarms.next() ) {
528 alarm->setEnabled(false); 537 alarm->setEnabled(false);
@@ -552,7 +561,7 @@ void KOListView::setCategories( bool removeOld )
552 } 561 }
553 QStringList catList = csd->selectedCategories(); 562 QStringList catList = csd->selectedCategories();
554 delete csd; 563 delete csd;
555 QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; 564 Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
556 Incidence* inc = delSel.first(); 565 Incidence* inc = delSel.first();
557 while ( inc ) { 566 while ( inc ) {
558 if ( removeOld ) { 567 if ( removeOld ) {
@@ -572,7 +581,7 @@ void KOListView::setCategories( bool removeOld )
572 581
573void KOListView::beamSelected() 582void KOListView::beamSelected()
574{ 583{
575 QPtrList<Incidence> delSel = getSelectedIncidences() ; 584 Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
576 if ( delSel.count() ) 585 if ( delSel.count() )
577 emit beamIncidenceList( delSel ); 586 emit beamIncidenceList( delSel );
578} 587}
@@ -587,7 +596,7 @@ void KOListView::saveDescriptionToFile()
587 if ( result != 0 ) { 596 if ( result != 0 ) {
588 return; 597 return;
589 } 598 }
590 QPtrList<Incidence> delSel = getSelectedIncidences() ; 599 Q3PtrList<Incidence> delSel = getSelectedIncidences() ;
591 int icount = delSel.count(); 600 int icount = delSel.count();
592 if ( icount ) { 601 if ( icount ) {
593 QString fn = KOPrefs::instance()->mLastSaveFile; 602 QString fn = KOPrefs::instance()->mLastSaveFile;
@@ -645,11 +654,11 @@ void KOListView::saveDescriptionToFile()
645 incidence = delSel.next(); 654 incidence = delSel.next();
646 } 655 }
647 QFile file( fn ); 656 QFile file( fn );
648 if (!file.open( IO_WriteOnly ) ) { 657 if (!file.open( QIODevice::WriteOnly ) ) {
649 topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); 658 topLevelWidget()->setCaption(i18n("File open error - nothing saved!") );
650 return; 659 return;
651 } 660 }
652 QTextStream ts( &file ); 661 Q3TextStream ts( &file );
653 ts << text; 662 ts << text;
654 file.close(); 663 file.close();
655 //qDebug("%s ", text.latin1()); 664 //qDebug("%s ", text.latin1());
@@ -667,12 +676,12 @@ void KOListView::saveToFile()
667{ 676{
668 writeToFile( true ); 677 writeToFile( true );
669} 678}
670QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos ) 679Q3PtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos )
671{ 680{
672 QPtrList<Incidence> delSel ; 681 Q3PtrList<Incidence> delSel ;
673 bool addSubTodos = false; 682 bool addSubTodos = false;
674 bool askSubTodos = true; 683 bool askSubTodos = true;
675 QListViewItem *item = mListView->firstChild (); 684 Q3ListViewItem *item = mListView->firstChild ();
676 while ( item ) { 685 while ( item ) {
677 if ( item->isSelected() ) { 686 if ( item->isSelected() ) {
678 Incidence* inc = ((KOListViewItem *)item)->data(); 687 Incidence* inc = ((KOListViewItem *)item)->data();
@@ -706,7 +715,7 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
706 askSubTodos = false; 715 askSubTodos = false;
707 } 716 }
708 if ( addSubTodos ) { 717 if ( addSubTodos ) {
709 QPtrList<Incidence> tempSel ; 718 Q3PtrList<Incidence> tempSel ;
710 inc->addRelationsToList( &tempSel ); 719 inc->addRelationsToList( &tempSel );
711 Incidence* tempinc = tempSel.first(); 720 Incidence* tempinc = tempSel.first();
712 while ( tempinc ) { 721 while ( tempinc ) {
@@ -730,7 +739,7 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool
730 739
731void KOListView::writeToFile( bool iCal ) 740void KOListView::writeToFile( bool iCal )
732{ 741{
733 QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; 742 Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;
734 if ( !iCal ) { 743 if ( !iCal ) {
735 bool journal = false; 744 bool journal = false;
736 Incidence *incidence = delSel.first(); 745 Incidence *incidence = delSel.first();
@@ -803,8 +812,8 @@ void KOListView::writeToFile( bool iCal )
803} 812}
804void KOListView::hideAll() 813void KOListView::hideAll()
805{ 814{
806 QPtrList<QListViewItem> delSel ; 815 Q3PtrList<Q3ListViewItem> delSel ;
807 QListViewItem *item = mListView->firstChild (); 816 Q3ListViewItem *item = mListView->firstChild ();
808 while ( item ) { 817 while ( item ) {
809 if ( item->isSelected() ) { 818 if ( item->isSelected() ) {
810 delSel.append(item); 819 delSel.append(item);
@@ -813,7 +822,7 @@ void KOListView::hideAll()
813 } 822 }
814 item = delSel.first() ; 823 item = delSel.first() ;
815 while ( item ) { 824 while ( item ) {
816 QListViewItem * del = item; 825 Q3ListViewItem * del = item;
817 item = delSel.next(); 826 item = delSel.next();
818 delete del; 827 delete del;
819 } 828 }
@@ -824,7 +833,7 @@ void KOListView::printList()
824} 833}
825void KOListView::deleteAll() 834void KOListView::deleteAll()
826{ 835{
827 QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;; 836 Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;;
828 if ( delSel.count() ) { 837 if ( delSel.count() ) {
829 int icount = delSel.count(); 838 int icount = delSel.count();
830 Incidence *incidence = delSel.first(); 839 Incidence *incidence = delSel.first();
@@ -838,11 +847,11 @@ void KOListView::deleteAll()
838 int delCounter = 0; 847 int delCounter = 0;
839 QDialog dia ( this, "p-dialog", true ); 848 QDialog dia ( this, "p-dialog", true );
840 QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); 849 QLabel lab (i18n("Close dialog to abort deletion!"), &dia );
841 QVBoxLayout lay( &dia ); 850 Q3VBoxLayout lay( &dia );
842 lay.setMargin(7); 851 lay.setMargin(7);
843 lay.setSpacing(7); 852 lay.setSpacing(7);
844 lay.addWidget( &lab); 853 lay.addWidget( &lab);
845 QProgressBar bar( icount, &dia ); 854 Q3ProgressBar bar( icount, &dia );
846 lay.addWidget( &bar); 855 lay.addWidget( &bar);
847 int w = 220; 856 int w = 220;
848 int h = 50; 857 int h = 50;
@@ -884,10 +893,10 @@ int KOListView::currentDateCount()
884 return 0; 893 return 0;
885} 894}
886 895
887QPtrList<Incidence> KOListView::selectedIncidences() 896Q3PtrList<Incidence> KOListView::selectedIncidences()
888{ 897{
889 QPtrList<Incidence> eventList; 898 Q3PtrList<Incidence> eventList;
890 QListViewItem *item = mListView->firstChild (); 899 Q3ListViewItem *item = mListView->firstChild ();
891 while ( item ) { 900 while ( item ) {
892 if ( item->isSelected() ) { 901 if ( item->isSelected() ) {
893 eventList.append(((KOListViewItem *)item)->data()); 902 eventList.append(((KOListViewItem *)item)->data());
@@ -987,7 +996,7 @@ void KOListView::showDates(const QDate &start, const QDate &end)
987 996
988} 997}
989 998
990void KOListView::addEvents(QPtrList<Event> eventList) 999void KOListView::addEvents(Q3PtrList<Event> eventList)
991{ 1000{
992 1001
993 Event *ev; 1002 Event *ev;
@@ -999,7 +1008,7 @@ void KOListView::addEvents(QPtrList<Event> eventList)
999 } 1008 }
1000} 1009}
1001 1010
1002void KOListView::addTodos(QPtrList<Todo> eventList) 1011void KOListView::addTodos(Q3PtrList<Todo> eventList)
1003{ 1012{
1004 Todo *ev; 1013 Todo *ev;
1005 for(ev = eventList.first(); ev; ev = eventList.next()) { 1014 for(ev = eventList.first(); ev; ev = eventList.next()) {
@@ -1009,7 +1018,7 @@ void KOListView::addTodos(QPtrList<Todo> eventList)
1009 updateView(); 1018 updateView();
1010 } 1019 }
1011} 1020}
1012void KOListView::addJournals(QPtrList<Journal> eventList) 1021void KOListView::addJournals(Q3PtrList<Journal> eventList)
1013{ 1022{
1014 Journal *ev; 1023 Journal *ev;
1015 for(ev = eventList.first(); ev; ev = eventList.next()) { 1024 for(ev = eventList.first(); ev; ev = eventList.next()) {
@@ -1044,7 +1053,7 @@ void KOListView::addIncidence(Incidence *incidence)
1044 else delete item; 1053 else delete item;
1045} 1054}
1046 1055
1047void KOListView::showEvents(QPtrList<Event> eventList) 1056void KOListView::showEvents(Q3PtrList<Event> eventList)
1048{ 1057{
1049 clear(); 1058 clear();
1050 1059
@@ -1095,14 +1104,14 @@ KOListViewItem *KOListView::getItemForEvent(Incidence *event)
1095 return 0; 1104 return 0;
1096} 1105}
1097 1106
1098void KOListView::defaultItemAction(QListViewItem *i) 1107void KOListView::defaultItemAction(Q3ListViewItem *i)
1099{ 1108{
1100 KOListViewItem *item = static_cast<KOListViewItem *>( i ); 1109 KOListViewItem *item = static_cast<KOListViewItem *>( i );
1101 if ( item ) defaultAction( item->data() ); 1110 if ( item ) defaultAction( item->data() );
1102 1111
1103} 1112}
1104 1113
1105void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) 1114void KOListView::popupMenu(Q3ListViewItem *item,const QPoint &,int)
1106{ 1115{
1107 mActiveItem = (KOListViewItem *)item; 1116 mActiveItem = (KOListViewItem *)item;
1108 if (mActiveItem) { 1117 if (mActiveItem) {
@@ -1131,7 +1140,7 @@ void KOListView::writeSettings(KConfig *config, QString setting)
1131 mListView->saveLayout(config, setting); 1140 mListView->saveLayout(config, setting);
1132} 1141}
1133 1142
1134void KOListView::processSelectionChange(QListViewItem *) 1143void KOListView::processSelectionChange(Q3ListViewItem *)
1135{ 1144{
1136 1145
1137 KOListViewItem *item = 1146 KOListViewItem *item =
@@ -1180,8 +1189,8 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1180 1189
1181 switch ( e->key() ) { 1190 switch ( e->key() ) {
1182 case Qt::Key_Down: 1191 case Qt::Key_Down:
1183 if ( e->state() == ShiftButton ) { 1192 if ( e->state() == Qt::ShiftButton ) {
1184 QListViewItem* cn = currentItem(); 1193 Q3ListViewItem* cn = currentItem();
1185 if ( !cn ) 1194 if ( !cn )
1186 cn = firstChild(); 1195 cn = firstChild();
1187 if ( !cn ) 1196 if ( !cn )
@@ -1194,10 +1203,10 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1194 e->accept(); 1203 e->accept();
1195 return; 1204 return;
1196 } 1205 }
1197 if ( e->state() == ControlButton ) { 1206 if ( e->state() == Qt::ControlButton ) {
1198 int count = childCount (); 1207 int count = childCount ();
1199 int jump = count / 5; 1208 int jump = count / 5;
1200 QListViewItem* cn; 1209 Q3ListViewItem* cn;
1201 cn = currentItem(); 1210 cn = currentItem();
1202 if ( ! cn ) 1211 if ( ! cn )
1203 return; 1212 return;
@@ -1211,13 +1220,13 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1211 ensureItemVisible ( cn ); 1220 ensureItemVisible ( cn );
1212 1221
1213 } else 1222 } else
1214 QListView::keyPressEvent ( e ) ; 1223 Q3ListView::keyPressEvent ( e ) ;
1215 e->accept(); 1224 e->accept();
1216 break; 1225 break;
1217 1226
1218 case Qt::Key_Up: 1227 case Qt::Key_Up:
1219 if ( e->state() == ShiftButton ) { 1228 if ( e->state() == Qt::ShiftButton ) {
1220 QListViewItem* cn = firstChild(); 1229 Q3ListViewItem* cn = firstChild();
1221 if ( cn ) { 1230 if ( cn ) {
1222 setCurrentItem ( cn ); 1231 setCurrentItem ( cn );
1223 ensureItemVisible ( cn ); 1232 ensureItemVisible ( cn );
@@ -1225,10 +1234,10 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1225 e->accept(); 1234 e->accept();
1226 return; 1235 return;
1227 } 1236 }
1228 if ( e->state() == ControlButton ) { 1237 if ( e->state() == Qt::ControlButton ) {
1229 int count = childCount (); 1238 int count = childCount ();
1230 int jump = count / 5; 1239 int jump = count / 5;
1231 QListViewItem* cn; 1240 Q3ListViewItem* cn;
1232 cn = currentItem(); 1241 cn = currentItem();
1233 if ( ! cn ) 1242 if ( ! cn )
1234 return; 1243 return;
@@ -1241,11 +1250,11 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1241 setCurrentItem ( cn ); 1250 setCurrentItem ( cn );
1242 ensureItemVisible ( cn ); 1251 ensureItemVisible ( cn );
1243 } else 1252 } else
1244 QListView::keyPressEvent ( e ) ; 1253 Q3ListView::keyPressEvent ( e ) ;
1245 e->accept(); 1254 e->accept();
1246 break; 1255 break;
1247 case Qt::Key_I: { 1256 case Qt::Key_I: {
1248 QListViewItem* cn; 1257 Q3ListViewItem* cn;
1249 cn = currentItem(); 1258 cn = currentItem();
1250 if ( cn ) { 1259 if ( cn ) {
1251 KOListViewItem* ci = (KOListViewItem*)( cn ); 1260 KOListViewItem* ci = (KOListViewItem*)( cn );
@@ -1265,12 +1274,12 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e)
1265 case Qt::Key_Return: 1274 case Qt::Key_Return:
1266 case Qt::Key_Enter: 1275 case Qt::Key_Enter:
1267 { 1276 {
1268 QListViewItem* cn; 1277 Q3ListViewItem* cn;
1269 cn = currentItem(); 1278 cn = currentItem();
1270 if ( cn ) { 1279 if ( cn ) {
1271 KOListViewItem* ci = (KOListViewItem*)( cn ); 1280 KOListViewItem* ci = (KOListViewItem*)( cn );
1272 if ( ci ){ 1281 if ( ci ){
1273 if ( e->state() == ShiftButton ) 1282 if ( e->state() == Qt::ShiftButton )
1274 ci->setSelected( false ); 1283 ci->setSelected( false );
1275 else 1284 else
1276 ci->setSelected( true ); 1285 ci->setSelected( true );
@@ -1300,12 +1309,12 @@ KOListViewListView::KOListViewListView(KOListView * lv )
1300#ifndef DESKTOP_VERSION 1309#ifndef DESKTOP_VERSION
1301 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); 1310 //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold );
1302#endif 1311#endif
1303 setSelectionMode( QListView::Multi ); 1312 setSelectionMode( Q3ListView::Multi );
1304 setMultiSelection( true); 1313 setMultiSelection( true);
1305} 1314}
1306bool KOListViewListView::hasMultiSelection(QListViewItem* item) 1315bool KOListViewListView::hasMultiSelection(Q3ListViewItem* item)
1307{ 1316{
1308 QListViewItem *qitem = firstChild (); 1317 Q3ListViewItem *qitem = firstChild ();
1309 while ( qitem ) { 1318 while ( qitem ) {
1310 if ( qitem->isSelected() && item != qitem ) 1319 if ( qitem->isSelected() && item != qitem )
1311 return true; 1320 return true;
@@ -1317,7 +1326,7 @@ void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
1317{ 1326{
1318 if (!e) return; 1327 if (!e) return;
1319 QPoint vp = contentsToViewport(e->pos()); 1328 QPoint vp = contentsToViewport(e->pos());
1320 QListViewItem *item = itemAt(vp); 1329 Q3ListViewItem *item = itemAt(vp);
1321 if (!item) { 1330 if (!item) {
1322 emit newEvent(); 1331 emit newEvent();
1323 return; 1332 return;
@@ -1329,8 +1338,8 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
1329{ 1338{
1330 //qDebug("contentsMousePressEvent++++ "); 1339 //qDebug("contentsMousePressEvent++++ ");
1331 KListView::contentsMousePressEvent( e ); 1340 KListView::contentsMousePressEvent( e );
1332 if ( e->button() == RightButton ) { 1341 if ( e->button() == Qt::RightButton ) {
1333 QListViewItem* ci = currentItem(); 1342 Q3ListViewItem* ci = currentItem();
1334 clearSelection () ; 1343 clearSelection () ;
1335 if ( ci ) 1344 if ( ci )
1336 ci->setSelected( true ); 1345 ci->setSelected( true );
@@ -1348,7 +1357,7 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
1348void KOListViewListView::popupMenu() 1357void KOListViewListView::popupMenu()
1349{ 1358{
1350 mPopupTimer->stop(); 1359 mPopupTimer->stop();
1351 QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); 1360 QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, Qt::RightButton , Qt::RightButton );
1352 QApplication::postEvent( this->viewport(), e ); 1361 QApplication::postEvent( this->viewport(), e );
1353 1362
1354} 1363}
@@ -1356,14 +1365,14 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
1356{ 1365{
1357 //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); 1366 //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y());
1358 mYMousePos = mapToGlobal( (e->pos())).y(); 1367 mYMousePos = mapToGlobal( (e->pos())).y();
1359 if ( e->button() == LeftButton ) { 1368 if ( e->button() == Qt::LeftButton ) {
1360 mPopupTimer->start( 600 ); 1369 mPopupTimer->start( 600 );
1361 mEventPos = contentsToViewport(e->pos()); 1370 mEventPos = contentsToViewport(e->pos());
1362 mEventGlobalPos = e->globalPos(); 1371 mEventGlobalPos = e->globalPos();
1363 } 1372 }
1364 KListView::contentsMousePressEvent( e ); 1373 KListView::contentsMousePressEvent( e );
1365 if ( e->button() == RightButton ) { 1374 if ( e->button() == Qt::RightButton ) {
1366 QListViewItem* ci = currentItem(); 1375 Q3ListViewItem* ci = currentItem();
1367 //clearSelection(); 1376 //clearSelection();
1368 if ( ci ) 1377 if ( ci )
1369 ci->setSelected( true ); 1378 ci->setSelected( true );
@@ -1390,7 +1399,7 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
1390} 1399}
1391 1400
1392#define protected public 1401#define protected public
1393#include <qheader.h> 1402#include <q3header.h>
1394#undef protected 1403#undef protected
1395void KOListViewListView::printList() 1404void KOListViewListView::printList()
1396{ 1405{
@@ -1407,7 +1416,7 @@ void KOListViewListView::printList()
1407 QPainter p; 1416 QPainter p;
1408 p.begin ( &printer ); 1417 p.begin ( &printer );
1409 p.setFont(font()); 1418 p.setFont(font());
1410 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 1419 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
1411 float dx, dy; 1420 float dx, dy;
1412 int wid = (m.width() * 9)/10; 1421 int wid = (m.width() * 9)/10;
1413 dx = (float) wid/(float)contentsWidth (); 1422 dx = (float) wid/(float)contentsWidth ();
@@ -1443,7 +1452,7 @@ void KOListViewListView::printList()
1443 p.save(); 1452 p.save();
1444 for ( iii = 0; iii < cou; ++iii ) { 1453 for ( iii = 0; iii < cou; ++iii ) {
1445 int align = columnAlignment( iii ); 1454 int align = columnAlignment( iii );
1446 if ( align == AlignAuto ) align = AlignLeft; 1455 if ( align == Qt::AlignLeft ) align = Qt::AlignLeft;
1447 p.restore(); 1456 p.restore();
1448 p.save(); 1457 p.save();
1449 p.translate( header()->sectionPos( iii ), 0); 1458 p.translate( header()->sectionPos( iii ), 0);
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index 99d0561..9fb0b00 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -24,9 +24,15 @@
24#ifndef _KOLISTVIEW_H 24#ifndef _KOLISTVIEW_H
25#define _KOLISTVIEW_H 25#define _KOLISTVIEW_H
26 26
27#include <qlistview.h> 27#include <q3listview.h>
28#include <qmap.h> 28#include <qmap.h>
29#include <qdict.h> 29#include <q3dict.h>
30//Added by qt3to4:
31#include <QMouseEvent>
32#include <Q3PtrList>
33#include <Q3PopupMenu>
34#include <QKeyEvent>
35#include <Q3VBoxLayout>
30 36
31#include <klistview.h> 37#include <klistview.h>
32 38
@@ -47,7 +53,7 @@ class KOListViewWhatsThis;
47#include <qspinbox.h> 53#include <qspinbox.h>
48#include <qtooltip.h> 54#include <qtooltip.h>
49#include <qcheckbox.h> 55#include <qcheckbox.h>
50#include <qhbox.h> 56#include <q3hbox.h>
51#include <qlabel.h> 57#include <qlabel.h>
52#include <kiconloader.h> 58#include <kiconloader.h>
53#include "kfiledialog.h" 59#include "kfiledialog.h"
@@ -60,7 +66,7 @@ class KOAlarmPrefs : public QDialog
60 QDialog( par, name, true ) 66 QDialog( par, name, true )
61 { 67 {
62 setCaption( i18n("Alarm Options") ); 68 setCaption( i18n("Alarm Options") );
63 QVBoxLayout* alarmLayout = new QVBoxLayout( this ); 69 Q3VBoxLayout* alarmLayout = new Q3VBoxLayout( this );
64 alarmLayout->setSpacing( 3 ); 70 alarmLayout->setSpacing( 3 );
65 alarmLayout->setMargin( 3 ); 71 alarmLayout->setMargin( 3 );
66 QWidget *parent = this; 72 QWidget *parent = this;
@@ -74,7 +80,7 @@ class KOAlarmPrefs : public QDialog
74 mAlarmIncrCombo->insertItem(i18n("hour(s)")); 80 mAlarmIncrCombo->insertItem(i18n("hour(s)"));
75 mAlarmIncrCombo->insertItem(i18n("day(s)")); 81 mAlarmIncrCombo->insertItem(i18n("day(s)"));
76 alarmLayout->addWidget(mAlarmIncrCombo); 82 alarmLayout->addWidget(mAlarmIncrCombo);
77 QHBox * hb = new QHBox ( parent ); 83 Q3HBox * hb = new Q3HBox ( parent );
78 alarmLayout->addWidget(hb); 84 alarmLayout->addWidget(hb);
79 mAlarmSoundButton = new QPushButton(hb); 85 mAlarmSoundButton = new QPushButton(hb);
80 mAlarmSoundButton->setPixmap(SmallIcon("playsound")); 86 mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
@@ -210,7 +216,7 @@ class KOListViewListView : public KListView
210 Q_OBJECT 216 Q_OBJECT
211 public: 217 public:
212 KOListViewListView(KOListView * lv ); 218 KOListViewListView(KOListView * lv );
213 bool hasMultiSelection(QListViewItem*); 219 bool hasMultiSelection(Q3ListViewItem*);
214 void printList(); 220 void printList();
215 signals: 221 signals:
216 void newEvent(); 222 void newEvent();
@@ -240,13 +246,13 @@ class KOListView : public KOEventView
240 246
241 virtual int maxDatesHint(); 247 virtual int maxDatesHint();
242 virtual int currentDateCount(); 248 virtual int currentDateCount();
243 virtual QPtrList<Incidence> selectedIncidences(); 249 virtual Q3PtrList<Incidence> selectedIncidences();
244 virtual DateList selectedDates(); 250 virtual DateList selectedDates();
245 251
246 void showDates(bool show); 252 void showDates(bool show);
247 Incidence* currentItem(); 253 Incidence* currentItem();
248 void addTodos(QPtrList<Todo> eventList); 254 void addTodos(Q3PtrList<Todo> eventList);
249 void addJournals(QPtrList<Journal> eventList); 255 void addJournals(Q3PtrList<Journal> eventList);
250 virtual void printPreview(CalPrinter *calPrinter, 256 virtual void printPreview(CalPrinter *calPrinter,
251 const QDate &, const QDate &); 257 const QDate &, const QDate &);
252 258
@@ -257,11 +263,11 @@ class KOListView : public KOEventView
257 void setStartDate(const QDate &start); 263 void setStartDate(const QDate &start);
258 int count(); 264 int count();
259 QString getWhatsThisText(QPoint p); 265 QString getWhatsThisText(QPoint p);
260 QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); 266 Q3PtrList<Incidence> getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false );
261 void showCompletedTodos(); 267 void showCompletedTodos();
262 signals: 268 signals:
263 void signalNewEvent(); 269 void signalNewEvent();
264 void beamIncidenceList(QPtrList<Incidence>); 270 void beamIncidenceList(Q3PtrList<Incidence>);
265 271
266 public slots: 272 public slots:
267 void hideAll(); 273 void hideAll();
@@ -269,7 +275,7 @@ class KOListView : public KOEventView
269 void resetFocus(); 275 void resetFocus();
270 virtual void updateView(); 276 virtual void updateView();
271 virtual void showDates(const QDate &start, const QDate &end); 277 virtual void showDates(const QDate &start, const QDate &end);
272 virtual void showEvents(QPtrList<Event> eventList); 278 virtual void showEvents(Q3PtrList<Event> eventList);
273 void clearSelection(); 279 void clearSelection();
274 void allSelection(); 280 void allSelection();
275 281
@@ -287,29 +293,29 @@ class KOListView : public KOEventView
287 void setCategories( bool removeOld ); 293 void setCategories( bool removeOld );
288 void changeEventDisplay(Event *, int); 294 void changeEventDisplay(Event *, int);
289 295
290 void defaultItemAction(QListViewItem *item); 296 void defaultItemAction(Q3ListViewItem *item);
291 void popupMenu(QListViewItem *item,const QPoint &,int); 297 void popupMenu(Q3ListViewItem *item,const QPoint &,int);
292 void setCalendar( int c ); 298 void setCalendar( int c );
293 void populateCalPopup(); 299 void populateCalPopup();
294 300
295 protected slots: 301 protected slots:
296 void processSelectionChange(QListViewItem *); 302 void processSelectionChange(Q3ListViewItem *);
297 void catChanged( Incidence* ); 303 void catChanged( Incidence* );
298 304
299 protected: 305 protected:
300 void writeToFile( bool iCal ); 306 void writeToFile( bool iCal );
301 void addEvents(QPtrList<Event> eventList); 307 void addEvents(Q3PtrList<Event> eventList);
302 void addIncidence(Incidence *); 308 void addIncidence(Incidence *);
303 KOListViewItem *getItemForEvent(Incidence *event); 309 KOListViewItem *getItemForEvent(Incidence *event);
304 310
305 private: 311 private:
306 bool mForceShowCompletedTodos; 312 bool mForceShowCompletedTodos;
307 QPopupMenu* mCalPopup; 313 Q3PopupMenu* mCalPopup;
308 KOListViewWhatsThis *mKOListViewWhatsThis; 314 KOListViewWhatsThis *mKOListViewWhatsThis;
309 KOListViewListView *mListView; 315 KOListViewListView *mListView;
310 KOEventPopupMenu *mPopupMenu; 316 KOEventPopupMenu *mPopupMenu;
311 KOListViewItem *mActiveItem; 317 KOListViewItem *mActiveItem;
312 QDict<Incidence> mUidDict; 318 Q3Dict<Incidence> mUidDict;
313 QDate mStartDate; 319 QDate mStartDate;
314 void keyPressEvent ( QKeyEvent * ) ; 320 void keyPressEvent ( QKeyEvent * ) ;
315}; 321};
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 85e9166..ca55c43 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -17,22 +17,34 @@
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#include <qpopupmenu.h> 20#include <q3popupmenu.h>
21#include <qfont.h> 21#include <qfont.h>
22#include <qfontmetrics.h> 22#include <qfontmetrics.h>
23#include <qkeycode.h> 23#include <qnamespace.h>
24#include <qhbox.h> 24#include <q3hbox.h>
25#include <qvbox.h> 25#include <q3vbox.h>
26#include <qwidgetstack.h> 26#include <q3widgetstack.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qtooltip.h> 28#include <qtooltip.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qwhatsthis.h> 31#include <q3whatsthis.h>
32#ifndef DESKTOP_VERSION 32#ifndef DESKTOP_VERSION
33#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
34#else 34#else
35#include <qapplication.h> 35#include <qapplication.h>
36#include <QDesktopWidget>
37//Added by qt3to4:
38#include <QResizeEvent>
39#include <QLabel>
40#include <QPixmap>
41#include <QFocusEvent>
42#include <QMouseEvent>
43#include <QKeyEvent>
44#include <Q3VBoxLayout>
45#include <Q3Frame>
46#include <Q3PointArray>
47#include <Q3PtrList>
36#endif 48#endif
37 49
38#include <kdebug.h> 50#include <kdebug.h>
@@ -59,10 +71,10 @@
59#ifdef DESKTOP_VERSION 71#ifdef DESKTOP_VERSION
60QToolTipGroup *MonthViewCell::mToolTipGroup = 0; 72QToolTipGroup *MonthViewCell::mToolTipGroup = 0;
61#endif 73#endif
62class KNOWhatsThis :public QWhatsThis 74class KNOWhatsThis :public Q3WhatsThis
63{ 75{
64public: 76public:
65 KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; 77 KNOWhatsThis( KNoScrollListBox* sbox ) : Q3WhatsThis( sbox ), _wid( sbox) { };
66 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; 78 //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); };
67 79
68protected: 80protected:
@@ -77,7 +89,7 @@ private:
77 89
78 90
79KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) 91KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
80 : QListBox(parent, name, WRepaintNoErase) 92 : Q3ListBox(parent, name, Qt::WNoAutoErase)
81{ 93{
82#ifndef DESKTOP_VERSION 94#ifndef DESKTOP_VERSION
83 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 95 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
@@ -85,8 +97,8 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name)
85 mBlockDeselect = false; 97 mBlockDeselect = false;
86 mWT = new KNOWhatsThis(this); 98 mWT = new KNOWhatsThis(this);
87 resetOnFocusIn = true; 99 resetOnFocusIn = true;
88 setVScrollBarMode(QScrollView::AlwaysOff); 100 setVScrollBarMode(Q3ScrollView::AlwaysOff);
89 setHScrollBarMode(QScrollView::AlwaysOff); 101 setHScrollBarMode(Q3ScrollView::AlwaysOff);
90} 102}
91KNoScrollListBox::~KNoScrollListBox() 103KNoScrollListBox::~KNoScrollListBox()
92{ 104{
@@ -100,7 +112,7 @@ KNoScrollListBox::~KNoScrollListBox()
100 112
101void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) 113void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
102{ 114{
103 QListBox::focusInEvent ( e ); 115 Q3ListBox::focusInEvent ( e );
104 if ( count() ){ 116 if ( count() ){
105 int ci = currentItem(); 117 int ci = currentItem();
106 if ( ci < 0 ) ci = 0; 118 if ( ci < 0 ) ci = 0;
@@ -112,24 +124,24 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e )
112 resetOnFocusIn = true; 124 resetOnFocusIn = true;
113 125
114 if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { 126 if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) {
115 QListBoxItem *fi = firstItem (); 127 Q3ListBoxItem *fi = firstItem ();
116 if (fi ) { 128 if (fi ) {
117 int ihei = fi->height( this ); 129 int ihei = fi->height( this );
118 int hei = numRows () * ihei; 130 int hei = numRows () * ihei;
119 if ( hei < height() - horizontalScrollBar()->height () ) { 131 if ( hei < height() - horizontalScrollBar()->height () ) {
120 setVScrollBarMode(QScrollView::AlwaysOff); 132 setVScrollBarMode(Q3ScrollView::AlwaysOff);
121 } 133 }
122 else 134 else
123 setVScrollBarMode(QScrollView::Auto); 135 setVScrollBarMode(Q3ScrollView::Auto);
124 if ( ihei *3 > height() ) { 136 if ( ihei *3 > height() ) {
125 setHScrollBarMode(QScrollView::AlwaysOff); 137 setHScrollBarMode(Q3ScrollView::AlwaysOff);
126 } 138 }
127 else { 139 else {
128 setHScrollBarMode(QScrollView::Auto); 140 setHScrollBarMode(Q3ScrollView::Auto);
129 } 141 }
130 } else { 142 } else {
131 setVScrollBarMode(QScrollView::Auto); 143 setVScrollBarMode(Q3ScrollView::Auto);
132 setHScrollBarMode(QScrollView::Auto); 144 setHScrollBarMode(Q3ScrollView::Auto);
133 } 145 }
134 } 146 }
135 } 147 }
@@ -141,10 +153,10 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
141 if ( i >= 0 ) { 153 if ( i >= 0 ) {
142 setSelected ( i, false ); 154 setSelected ( i, false );
143 } 155 }
144 QListBox::focusOutEvent ( e ); 156 Q3ListBox::focusOutEvent ( e );
145 } 157 }
146 setVScrollBarMode(QScrollView::AlwaysOff); 158 setVScrollBarMode(Q3ScrollView::AlwaysOff);
147 setHScrollBarMode(QScrollView::AlwaysOff); 159 setHScrollBarMode(Q3ScrollView::AlwaysOff);
148 if ( ! mBlockDeselect ) 160 if ( ! mBlockDeselect )
149 emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); 161 emit highlightIncidence( 0, (MonthViewCell*)this, 0 );
150 mBlockDeselect = false; 162 mBlockDeselect = false;
@@ -152,7 +164,7 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e )
152 164
153QString KNoScrollListBox::getWhatsThisText(QPoint p) 165QString KNoScrollListBox::getWhatsThisText(QPoint p)
154{ 166{
155 QListBoxItem* item = itemAt ( p ); 167 Q3ListBoxItem* item = itemAt ( p );
156 if ( ! item ) { 168 if ( ! item ) {
157 return i18n("Click in the cell\nto add an event!"); 169 return i18n("Click in the cell\nto add an event!");
158 } 170 }
@@ -165,7 +177,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
165{ 177{
166 //qDebug("KNoScrollListBox::keyPressEvent "); 178 //qDebug("KNoScrollListBox::keyPressEvent ");
167 switch(e->key()) { 179 switch(e->key()) {
168 case Key_Right: 180 case Qt::Key_Right:
169 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 181 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
170 { 182 {
171 e->ignore(); 183 e->ignore();
@@ -173,7 +185,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
173 } 185 }
174 scrollBy(10,0); 186 scrollBy(10,0);
175 break; 187 break;
176 case Key_Left: 188 case Qt::Key_Left:
177 if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 189 if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
178 { 190 {
179 e->ignore(); 191 e->ignore();
@@ -181,7 +193,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
181 } 193 }
182 scrollBy(-10,0); 194 scrollBy(-10,0);
183 break; 195 break;
184 case Key_Up: 196 case Qt::Key_Up:
185 if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 197 if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
186 e->ignore(); 198 e->ignore();
187 break; 199 break;
@@ -201,7 +213,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
201 } 213 }
202 } 214 }
203 break; 215 break;
204 case Key_Down: 216 case Qt::Key_Down:
205 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { 217 if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) {
206 e->ignore(); 218 e->ignore();
207 break; 219 break;
@@ -221,12 +233,12 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
221 } 233 }
222 } 234 }
223 break; 235 break;
224 case Key_I: 236 case Qt::Key_I:
225 QTimer::singleShot( 1, this, SLOT ( oneDown() ) ); 237 QTimer::singleShot( 1, this, SLOT ( oneDown() ) );
226 e->ignore(); 238 e->ignore();
227 break; 239 break;
228 case Key_Return: 240 case Qt::Key_Return:
229 case Key_Enter: 241 case Qt::Key_Enter:
230 { 242 {
231 if ( currentItem() >= 0 ) { 243 if ( currentItem() >= 0 ) {
232 emit doubleClicked( item( currentItem() ) ); 244 emit doubleClicked( item( currentItem() ) );
@@ -236,7 +248,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e)
236 } 248 }
237 } 249 }
238 break; 250 break;
239 case Key_Shift: 251 case Qt::Key_Shift:
240 emit shiftDown(); 252 emit shiftDown();
241 break; 253 break;
242 default: 254 default:
@@ -266,7 +278,7 @@ void KNoScrollListBox::oneDown()
266void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) 278void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
267{ 279{
268 switch(e->key()) { 280 switch(e->key()) {
269 case Key_Shift: 281 case Qt::Key_Shift:
270 emit shiftUp(); 282 emit shiftUp();
271 break; 283 break;
272 default: 284 default:
@@ -276,15 +288,15 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e)
276 288
277void KNoScrollListBox::mousePressEvent(QMouseEvent *e) 289void KNoScrollListBox::mousePressEvent(QMouseEvent *e)
278{ 290{
279 QListBox::mousePressEvent(e); 291 Q3ListBox::mousePressEvent(e);
280 292
281 if(e->button() == RightButton) { 293 if(e->button() == Qt::RightButton) {
282 emit rightClick(); 294 emit rightClick();
283 } 295 }
284} 296}
285 297
286MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s) 298MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s)
287 : QListBoxItem() 299 : Q3ListBoxItem()
288{ 300{
289 mblockRepaint = true; 301 mblockRepaint = true;
290 isWeekItem = KOPrefs::instance()->mMonthViewWeek; 302 isWeekItem = KOPrefs::instance()->mMonthViewWeek;
@@ -395,14 +407,14 @@ void MonthViewItem::paint(QPainter *p)
395 p->setBrush( QBrush( textColor ) ); 407 p->setBrush( QBrush( textColor ) );
396 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ; 408 p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ;
397 if ( mMultiday == 2 || mMultiday == 3 ) { 409 if ( mMultiday == 2 || mMultiday == 3 ) {
398 QPointArray pa ( 3 ); 410 Q3PointArray pa ( 3 );
399 pa.setPoint (0, x, yyy ); 411 pa.setPoint (0, x, yyy );
400 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 ); 412 pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 );
401 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 ); 413 pa.setPoint (2, x+sizeM/2, yyy-sizeM/2 );
402 p->drawPolygon( pa ); 414 p->drawPolygon( pa );
403 } 415 }
404 if ( mMultiday == 2 || mMultiday == 1 ) { 416 if ( mMultiday == 2 || mMultiday == 1 ) {
405 QPointArray pa ( 3 ); 417 Q3PointArray pa ( 3 );
406 pa.setPoint (0, x+sizeM +sizeM/2, yyy ); 418 pa.setPoint (0, x+sizeM +sizeM/2, yyy );
407 pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); 419 pa.setPoint (1, x+sizeM, yyy+sizeM/2 );
408 pa.setPoint (2, x+sizeM, yyy-sizeM/2 ); 420 pa.setPoint (2, x+sizeM, yyy-sizeM/2 );
@@ -462,7 +474,7 @@ void MonthViewItem::paint(QPainter *p)
462 } 474 }
463} 475}
464 476
465int MonthViewItem::height(const QListBox *lb) const 477int MonthViewItem::height(const Q3ListBox *lb) const
466{ 478{
467 int ret = 10; 479 int ret = 10;
468 if ( lb ) 480 if ( lb )
@@ -470,7 +482,7 @@ int MonthViewItem::height(const QListBox *lb) const
470 return ret; 482 return ret;
471} 483}
472 484
473int MonthViewItem::width(const QListBox *lb) const 485int MonthViewItem::width(const Q3ListBox *lb) const
474{ 486{
475 if( KOPrefs::instance()->mEnableMonthScroll || isWeekItem ) { 487 if( KOPrefs::instance()->mEnableMonthScroll || isWeekItem ) {
476 int size = PIXMAP_SIZE; 488 int size = PIXMAP_SIZE;
@@ -514,10 +526,10 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
514 //mLabel->setLineWidth( 1 ); 526 //mLabel->setLineWidth( 1 );
515 //mLabel->setAlignment( AlignCenter ); 527 //mLabel->setAlignment( AlignCenter );
516 mLabel->setFlat( true ); 528 mLabel->setFlat( true );
517 mLabel->setFocusPolicy(NoFocus); 529 mLabel->setFocusPolicy(Qt::NoFocus);
518 //mItemList = new KNoScrollListBox( this ); 530 //mItemList = new KNoScrollListBox( this );
519 setMinimumSize( 10, 10 ); 531 setMinimumSize( 10, 10 );
520 setFrameStyle( QFrame::Panel | QFrame::Plain ); 532 setFrameStyle( Q3Frame::Panel | Q3Frame::Plain );
521 setLineWidth( 1 ); 533 setLineWidth( 1 );
522 //topLayout->addWidget( mItemList ); 534 //topLayout->addWidget( mItemList );
523 mLabel->raise(); 535 mLabel->raise();
@@ -529,13 +541,13 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
529 updateConfig(); 541 updateConfig();
530 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() )); 542 //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() ));
531 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); 543 connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() ));
532 connect( this , SIGNAL( doubleClicked( QListBoxItem *) ), 544 connect( this , SIGNAL( doubleClicked( Q3ListBoxItem *) ),
533 SLOT( defaultAction( QListBoxItem * ) ) ); 545 SLOT( defaultAction( Q3ListBoxItem * ) ) );
534 connect( this, SIGNAL( rightButtonPressed( QListBoxItem *, 546 connect( this, SIGNAL( rightButtonPressed( Q3ListBoxItem *,
535 const QPoint &) ), 547 const QPoint &) ),
536 SLOT( contextMenu( QListBoxItem * ) ) ); 548 SLOT( contextMenu( Q3ListBoxItem * ) ) );
537 connect( this, SIGNAL( highlighted( QListBoxItem *) ), 549 connect( this, SIGNAL( highlighted( Q3ListBoxItem *) ),
538 SLOT( selection( QListBoxItem * ) ) ); 550 SLOT( selection( Q3ListBoxItem * ) ) );
539 551
540 /* 552 /*
541 connect( this, SIGNAL( clicked( QListBoxItem * ) ), 553 connect( this, SIGNAL( clicked( QListBoxItem * ) ),
@@ -545,7 +557,7 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par )
545#ifdef DESKTOP_VERSION 557#ifdef DESKTOP_VERSION
546QToolTipGroup *MonthViewCell::toolTipGroup() 558QToolTipGroup *MonthViewCell::toolTipGroup()
547{ 559{
548 if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); 560 /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */
549 return mToolTipGroup; 561 return mToolTipGroup;
550} 562}
551#endif 563#endif
@@ -637,7 +649,7 @@ void MonthViewCell::startUpdateCell()
637{ 649{
638 blockSignals( true ); 650 blockSignals( true );
639 mdayCount = 0; 651 mdayCount = 0;
640 setFocusPolicy(NoFocus); 652 setFocusPolicy(Qt::NoFocus);
641 if ( !mMonthView->isUpdatePossible() ) 653 if ( !mMonthView->isUpdatePossible() )
642 return; 654 return;
643 MonthViewItem *mitem = (MonthViewItem*) firstItem (); 655 MonthViewItem *mitem = (MonthViewItem*) firstItem ();
@@ -692,7 +704,7 @@ int MonthViewCell::insertEvent(Event *event)
692 useToolTips = false; 704 useToolTips = false;
693#endif 705#endif
694 QString mToolTipText; 706 QString mToolTipText;
695 setFocusPolicy(WheelFocus); 707 setFocusPolicy(Qt::WheelFocus);
696 if ( !(event->doesRecur() == Recurrence::rNone) ) { 708 if ( !(event->doesRecur() == Recurrence::rNone) ) {
697 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) 709 if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily )
698 return mdayCount; 710 return mdayCount;
@@ -834,7 +846,7 @@ int MonthViewCell::insertEvent(Event *event)
834 } 846 }
835 for ( i = pos; i < itcount;++i ) { 847 for ( i = pos; i < itcount;++i ) {
836 // qDebug("i %d mday %u count %d ",i,itcount,mdayCount ); 848 // qDebug("i %d mday %u count %d ",i,itcount,mdayCount );
837 QListBoxItem* it = this->item ( i ); 849 Q3ListBoxItem* it = this->item ( i );
838 if ( it && text < it->text() ) { 850 if ( it && text < it->text() ) {
839 pos = i; 851 pos = i;
840 break; 852 break;
@@ -850,7 +862,7 @@ int MonthViewCell::insertEvent(Event *event)
850} 862}
851void MonthViewCell::insertTodo(Todo *todo) 863void MonthViewCell::insertTodo(Todo *todo)
852{ 864{
853 setFocusPolicy(WheelFocus); 865 setFocusPolicy(Qt::WheelFocus);
854 QString text; 866 QString text;
855 if (todo->hasDueDate()) { 867 if (todo->hasDueDate()) {
856 if (!todo->doesFloat()) { 868 if (!todo->doesFloat()) {
@@ -922,7 +934,7 @@ void MonthViewCell::finishUpdateCell()
922#ifdef DESKTOP_VERSION 934#ifdef DESKTOP_VERSION
923 if (mToolTip.count() > 0 ) { 935 if (mToolTip.count() > 0 ) {
924 mToolTip.sort(); 936 mToolTip.sort();
925 QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); 937 /* TODO: hacker: QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); */
926 } 938 }
927#endif 939#endif
928 //sort(); 940 //sort();
@@ -938,13 +950,13 @@ void MonthViewCell::updateCell()
938 return; 950 return;
939 startUpdateCell(); 951 startUpdateCell();
940 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 952 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
941 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 953 Q3PtrList<Event> events = mMonthView->calendar()->events( mDate, true );
942 Event *event; 954 Event *event;
943 for( event = events.first(); event; event = events.next() ) { // for event 955 for( event = events.first(); event; event = events.next() ) { // for event
944 insertEvent(event); 956 insertEvent(event);
945 } 957 }
946 // insert due todos 958 // insert due todos
947 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 959 Q3PtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
948 Todo *todo; 960 Todo *todo;
949 for(todo = todos.first(); todo; todo = todos.next()) { 961 for(todo = todos.first(); todo; todo = todos.next()) {
950 insertTodo( todo ); 962 insertTodo( todo );
@@ -992,28 +1004,28 @@ void MonthViewCell::enableScrollBars( bool enabled )
992 1004
993 return; 1005 return;
994 if ( enabled ) { 1006 if ( enabled ) {
995 QListBoxItem *fi = firstItem (); 1007 Q3ListBoxItem *fi = firstItem ();
996 if (fi ) { 1008 if (fi ) {
997 int ihei = fi->height( this ); 1009 int ihei = fi->height( this );
998 int hei = numRows () * ihei; 1010 int hei = numRows () * ihei;
999 if ( hei < height() - horizontalScrollBar()->height () ) { 1011 if ( hei < height() - horizontalScrollBar()->height () ) {
1000 setVScrollBarMode(QScrollView::AlwaysOff); 1012 setVScrollBarMode(Q3ScrollView::AlwaysOff);
1001 } 1013 }
1002 else 1014 else
1003 setVScrollBarMode(QScrollView::Auto); 1015 setVScrollBarMode(Q3ScrollView::Auto);
1004 if ( ihei *3 > height() ) { 1016 if ( ihei *3 > height() ) {
1005 setHScrollBarMode(QScrollView::AlwaysOff); 1017 setHScrollBarMode(Q3ScrollView::AlwaysOff);
1006 } 1018 }
1007 else { 1019 else {
1008 setHScrollBarMode(QScrollView::Auto); 1020 setHScrollBarMode(Q3ScrollView::Auto);
1009 } 1021 }
1010 } else { 1022 } else {
1011 setVScrollBarMode(QScrollView::Auto); 1023 setVScrollBarMode(Q3ScrollView::Auto);
1012 setHScrollBarMode(QScrollView::Auto); 1024 setHScrollBarMode(Q3ScrollView::Auto);
1013 } 1025 }
1014 } else { 1026 } else {
1015 setVScrollBarMode(QScrollView::AlwaysOff); 1027 setVScrollBarMode(Q3ScrollView::AlwaysOff);
1016 setHScrollBarMode(QScrollView::AlwaysOff); 1028 setHScrollBarMode(Q3ScrollView::AlwaysOff);
1017 } 1029 }
1018} 1030}
1019 1031
@@ -1083,7 +1095,7 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e )
1083 KNoScrollListBox::resizeEvent ( e ); 1095 KNoScrollListBox::resizeEvent ( e );
1084} 1096}
1085 1097
1086void MonthViewCell::defaultAction( QListBoxItem *item ) 1098void MonthViewCell::defaultAction( Q3ListBoxItem *item )
1087{ 1099{
1088 1100
1089 if ( !item ) { 1101 if ( !item ) {
@@ -1105,7 +1117,7 @@ void MonthViewCell::newEvent()
1105 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 1117 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
1106 emit newEventSignal( dt ); 1118 emit newEventSignal( dt );
1107} 1119}
1108void MonthViewCell::cellClicked( QListBoxItem *item ) 1120void MonthViewCell::cellClicked( Q3ListBoxItem *item )
1109{ 1121{
1110 mMonthView->setSelectedCell( this ); 1122 mMonthView->setSelectedCell( this );
1111 if ( item == 0 ) { 1123 if ( item == 0 ) {
@@ -1116,7 +1128,7 @@ void MonthViewCell::cellClicked( QListBoxItem *item )
1116 1128
1117} 1129}
1118 1130
1119void MonthViewCell::contextMenu( QListBoxItem *item ) 1131void MonthViewCell::contextMenu( Q3ListBoxItem *item )
1120{ 1132{
1121 mMonthView->setPopupCell( this ); 1133 mMonthView->setPopupCell( this );
1122 if ( !item ) { 1134 if ( !item ) {
@@ -1133,7 +1145,7 @@ void MonthViewCell::contextMenu( QListBoxItem *item )
1133 } 1145 }
1134} 1146}
1135 1147
1136void MonthViewCell::selection( QListBoxItem *item ) 1148void MonthViewCell::selection( Q3ListBoxItem *item )
1137{ 1149{
1138 if ( !item ) { 1150 if ( !item ) {
1139 emit highlightIncidence( 0 , this, 0 ); 1151 emit highlightIncidence( 0 , this, 0 );
@@ -1185,8 +1197,8 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1185 clPending = true; 1197 clPending = true;
1186 mPopupCell = 0; 1198 mPopupCell = 0;
1187 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); 1199 mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
1188 mWidStack = new QWidgetStack( this ); 1200 mWidStack = new Q3WidgetStack( this );
1189 QVBoxLayout* hb = new QVBoxLayout( this ); 1201 Q3VBoxLayout* hb = new Q3VBoxLayout( this );
1190 mMonthView = new QWidget( mWidStack ); 1202 mMonthView = new QWidget( mWidStack );
1191 mWeekView = new QWidget( mWidStack ); 1203 mWeekView = new QWidget( mWidStack );
1192#if QT_VERSION >= 0x030000 1204#if QT_VERSION >= 0x030000
@@ -1215,15 +1227,15 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1215 for( i = 0; i < mDaysPerWeek; i++ ) { 1227 for( i = 0; i < mDaysPerWeek; i++ ) {
1216 QLabel *label = new QLabel( mMonthView ); 1228 QLabel *label = new QLabel( mMonthView );
1217 label->setFont(bfont); 1229 label->setFont(bfont);
1218 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1230 label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
1219 label->setLineWidth(1); 1231 label->setLineWidth(1);
1220 label->setAlignment(AlignCenter); 1232 label->setAlignment(Qt::AlignCenter);
1221 mDayLabels.insert( i, label ); 1233 mDayLabels.insert( i, label );
1222 label = new QLabel( mWeekView ); 1234 label = new QLabel( mWeekView );
1223 label->setFont(bfont); 1235 label->setFont(bfont);
1224 label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1236 label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
1225 label->setLineWidth(1); 1237 label->setLineWidth(1);
1226 label->setAlignment(AlignCenter); 1238 label->setAlignment(Qt::AlignCenter);
1227 mDayLabelsW.insert( i, label ); 1239 mDayLabelsW.insert( i, label );
1228 } 1240 }
1229 1241
@@ -1232,34 +1244,34 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1232 mWeekLabelsW.resize( 2 ); 1244 mWeekLabelsW.resize( 2 );
1233 for( i = 0; i < mNumWeeks+1; i++ ) { 1245 for( i = 0; i < mNumWeeks+1; i++ ) {
1234 KOWeekButton *label = new KOWeekButton( mMonthView ); 1246 KOWeekButton *label = new KOWeekButton( mMonthView );
1235 label->setFocusPolicy(NoFocus); 1247 label->setFocusPolicy(Qt::NoFocus);
1236 label->setFont(bfont); 1248 label->setFont(bfont);
1237 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 1249 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
1238 label->setFlat(true); 1250 label->setFlat(true);
1239 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 1251 Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
1240 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1252 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
1241 //label->setLineWidth(1); 1253 //label->setLineWidth(1);
1242 //label->setAlignment(AlignCenter); 1254 //label->setAlignment(AlignCenter);
1243 mWeekLabels.insert( i, label ); 1255 mWeekLabels.insert( i, label );
1244 } 1256 }
1245 mWeekLabels[mNumWeeks]->setText( i18n("W")); 1257 mWeekLabels[mNumWeeks]->setText( i18n("W"));
1246 mWeekLabels[mNumWeeks]->setFocusPolicy(WheelFocus); 1258 mWeekLabels[mNumWeeks]->setFocusPolicy(Qt::WheelFocus);
1247 QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); 1259 Q3WhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number"));
1248 1260
1249 for( i = 0; i < 1+1; i++ ) { 1261 for( i = 0; i < 1+1; i++ ) {
1250 KOWeekButton *label = new KOWeekButton( mWeekView ); 1262 KOWeekButton *label = new KOWeekButton( mWeekView );
1251 label->setFocusPolicy(NoFocus); 1263 label->setFocusPolicy(Qt::NoFocus);
1252 label->setFont(bfont); 1264 label->setFont(bfont);
1253 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 1265 connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) );
1254 label->setFlat(true); 1266 label->setFlat(true);
1255 QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); 1267 Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed"));
1256 //label->setFrameStyle(QFrame::Panel|QFrame::Raised); 1268 //label->setFrameStyle(QFrame::Panel|QFrame::Raised);
1257 //label->setLineWidth(1); 1269 //label->setLineWidth(1);
1258 //label->setAlignment(AlignCenter); 1270 //label->setAlignment(AlignCenter);
1259 mWeekLabelsW.insert( i, label ); 1271 mWeekLabelsW.insert( i, label );
1260 } 1272 }
1261 mWeekLabelsW[1]->setText( i18n("W")); 1273 mWeekLabelsW[1]->setText( i18n("W"));
1262 mWeekLabelsW[1]->setFocusPolicy(WheelFocus); 1274 mWeekLabelsW[1]->setFocusPolicy(Qt::WheelFocus);
1263 1275
1264 1276
1265 int row, col; 1277 int row, col;
@@ -1305,13 +1317,13 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1305 1317
1306 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 1318 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
1307 mContextMenu = eventPopup(); 1319 mContextMenu = eventPopup();
1308 mContextMenu->addAdditionalItem(QIconSet(QPixmap()), 1320 mContextMenu->addAdditionalItem(QIcon(QPixmap()),
1309 i18n("New Event..."),this, 1321 i18n("New Event..."),this,
1310 SLOT(slotNewEvent()),false); 1322 SLOT(slotNewEvent()),false);
1311 mContextMenu->addAdditionalItem(QIconSet(QPixmap()), 1323 mContextMenu->addAdditionalItem(QIcon(QPixmap()),
1312 i18n("New Todo..."),this, 1324 i18n("New Todo..."),this,
1313 SLOT(slotNewTodo()),false); 1325 SLOT(slotNewTodo()),false);
1314 mContextMenu->addAdditionalItem(QIconSet(QPixmap()), 1326 mContextMenu->addAdditionalItem(QIcon(QPixmap()),
1315 i18n("Journal"),this, 1327 i18n("Journal"),this,
1316 SLOT(slotEditJournal()),false); 1328 SLOT(slotEditJournal()),false);
1317 1329
@@ -1325,7 +1337,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
1325 pathString += "icons16/"; 1337 pathString += "icons16/";
1326 } else 1338 } else
1327 pathString += "iconsmini/"; 1339 pathString += "iconsmini/";
1328 mNewItemMenu = new QPopupMenu( this ); 1340 mNewItemMenu = new Q3PopupMenu( this );
1329 mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent())); 1341 mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent()));
1330 mNewItemMenu->insertItem( SmallIcon( pathString +"newtodo" ),i18n("New Todo..."),this,SLOT(slotNewTodo()),false); 1342 mNewItemMenu->insertItem( SmallIcon( pathString +"newtodo" ),i18n("New Todo..."),this,SLOT(slotNewTodo()),false);
1331 mNewItemMenu->insertItem( SmallIcon( pathString +"journal" ),i18n("Journal"),this,SLOT(slotEditJournal()),false); 1343 mNewItemMenu->insertItem( SmallIcon( pathString +"journal" ),i18n("Journal"),this,SLOT(slotEditJournal()),false);
@@ -1397,7 +1409,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int
1397 break; 1409 break;
1398 } 1410 }
1399 } 1411 }
1400 QPtrVector<MonthViewCell> *cells; 1412 Q3PtrVector<MonthViewCell> *cells;
1401 if ( weekview ) 1413 if ( weekview )
1402 cells = &mCellsW; 1414 cells = &mCellsW;
1403 else { 1415 else {
@@ -1495,9 +1507,9 @@ int KOMonthView::currentDateCount()
1495 return mNumCells; 1507 return mNumCells;
1496} 1508}
1497 1509
1498QPtrList<Incidence> KOMonthView::selectedIncidences() 1510Q3PtrList<Incidence> KOMonthView::selectedIncidences()
1499{ 1511{
1500 QPtrList<Incidence> selected; 1512 Q3PtrList<Incidence> selected;
1501 1513
1502 if ( mSelectedCell ) { 1514 if ( mSelectedCell ) {
1503 Incidence *incidence = mSelectedCell->selectedIncidence(); 1515 Incidence *incidence = mSelectedCell->selectedIncidence();
@@ -1561,7 +1573,7 @@ void KOMonthView::updateConfig()
1561 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont); 1573 mCellsW[i]->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont);
1562 } 1574 }
1563#ifdef DESKTOP_VERSION 1575#ifdef DESKTOP_VERSION
1564 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 1576 /* TODO:hacker: MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); */
1565#endif 1577#endif
1566 updateView(); 1578 updateView();
1567} 1579}
@@ -1569,7 +1581,7 @@ void KOMonthView::updateConfig()
1569void KOMonthView::updateDayLabels() 1581void KOMonthView::updateDayLabels()
1570{ 1582{
1571 1583
1572 QPtrVector<QLabel> *mDayLabelsT; 1584 Q3PtrVector<QLabel> *mDayLabelsT;
1573 1585
1574 mDayLabelsT = &mDayLabelsW; 1586 mDayLabelsT = &mDayLabelsW;
1575 for (int i = 0; i < 7; i++) { 1587 for (int i = 0; i < 7; i++) {
@@ -1610,9 +1622,9 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1610{ 1622{
1611 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; 1623 // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl;
1612 1624
1613 QPtrVector<MonthViewCell> *cells; 1625 Q3PtrVector<MonthViewCell> *cells;
1614 QPtrVector<QLabel> *dayLabels; 1626 Q3PtrVector<QLabel> *dayLabels;
1615 QPtrVector<KOWeekButton> *weekLabels; 1627 Q3PtrVector<KOWeekButton> *weekLabels;
1616 uint weekNum = 6; 1628 uint weekNum = 6;
1617 mStartDate = start; 1629 mStartDate = start;
1618 if ( mShowWeekView ) { 1630 if ( mShowWeekView ) {
@@ -1668,7 +1680,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
1668 updateView(); 1680 updateView();
1669} 1681}
1670 1682
1671void KOMonthView::showEvents(QPtrList<Event>) 1683void KOMonthView::showEvents(Q3PtrList<Event>)
1672{ 1684{
1673 qDebug("KOMonthView::selectEvents is not implemented yet. "); 1685 qDebug("KOMonthView::selectEvents is not implemented yet. ");
1674} 1686}
@@ -1690,7 +1702,7 @@ void KOMonthView::updateView()
1690 //QTime ti; 1702 //QTime ti;
1691 //ti.start(); 1703 //ti.start();
1692 clearSelection(); 1704 clearSelection();
1693 QPtrVector<MonthViewCell> *cells; 1705 Q3PtrVector<MonthViewCell> *cells;
1694 if ( mShowWeekView ) { 1706 if ( mShowWeekView ) {
1695 cells = &mCellsW; 1707 cells = &mCellsW;
1696 } else { 1708 } else {
@@ -1705,7 +1717,7 @@ void KOMonthView::updateView()
1705 (*cells)[i]->startUpdateCell(); 1717 (*cells)[i]->startUpdateCell();
1706 } 1718 }
1707 1719
1708 QPtrList<Event> events = calendar()->events(); 1720 Q3PtrList<Event> events = calendar()->events();
1709 Event *event; 1721 Event *event;
1710 QDateTime dt; 1722 QDateTime dt;
1711 QDate endDate = mStartDate.addDays( timeSpan ); 1723 QDate endDate = mStartDate.addDays( timeSpan );
@@ -1769,7 +1781,7 @@ void KOMonthView::updateView()
1769 } 1781 }
1770 } 1782 }
1771 // insert due todos 1783 // insert due todos
1772 QPtrList<Todo> todos = calendar()->todos( ); 1784 Q3PtrList<Todo> todos = calendar()->todos( );
1773 Todo *todo; 1785 Todo *todo;
1774 for(todo = todos.first(); todo; todo = todos.next()) { 1786 for(todo = todos.first(); todo; todo = todos.next()) {
1775 //insertTodo( todo ); 1787 //insertTodo( todo );
@@ -2225,7 +2237,7 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell )
2225 2237
2226void KOMonthView::processSelectionChange() 2238void KOMonthView::processSelectionChange()
2227{ 2239{
2228 QPtrList<Incidence> incidences = selectedIncidences(); 2240 Q3PtrList<Incidence> incidences = selectedIncidences();
2229 if (incidences.count() > 0) { 2241 if (incidences.count() > 0) {
2230 emit incidenceSelected( incidences.first() ); 2242 emit incidenceSelected( incidences.first() );
2231 } else { 2243 } else {
@@ -2261,7 +2273,7 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2261 if (! e->isAutoRepeat() ) 2273 if (! e->isAutoRepeat() )
2262 mFlagKeyPressed = true; 2274 mFlagKeyPressed = true;
2263 switch(e->key()) { 2275 switch(e->key()) {
2264 case Key_Up: 2276 case Qt::Key_Up:
2265 { 2277 {
2266 if ( mShowWeekView ) { 2278 if ( mShowWeekView ) {
2267 emit selectWeekNum ( currentWeek() - 1 ); 2279 emit selectWeekNum ( currentWeek() - 1 );
@@ -2272,7 +2284,7 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2272 } 2284 }
2273 e->accept(); 2285 e->accept();
2274 break; 2286 break;
2275 case Key_Down: 2287 case Qt::Key_Down:
2276 { 2288 {
2277 if ( mShowWeekView ) { 2289 if ( mShowWeekView ) {
2278 emit selectWeekNum ( currentWeek() +1); 2290 emit selectWeekNum ( currentWeek() +1);
@@ -2284,14 +2296,14 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e )
2284 } 2296 }
2285 e->accept(); 2297 e->accept();
2286 break; 2298 break;
2287 case Key_Return: 2299 case Qt::Key_Return:
2288 case Key_Enter: 2300 case Qt::Key_Enter:
2289 { 2301 {
2290 selectInternalWeekNum ( currentWeek() ); 2302 selectInternalWeekNum ( currentWeek() );
2291 } 2303 }
2292 e->accept(); 2304 e->accept();
2293 break; 2305 break;
2294 case Key_D: 2306 case Qt::Key_D:
2295 if ( mSelectedCell ) { 2307 if ( mSelectedCell ) {
2296 mSelectedCell->showDay(); 2308 mSelectedCell->showDay();
2297 e->accept(); 2309 e->accept();
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 1a9d16d..bca76e5 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -21,17 +21,24 @@
21#define _KOMONTHVIEW_H 21#define _KOMONTHVIEW_H
22 22
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qframe.h> 24#include <q3frame.h>
25#include <qdatetime.h> 25#include <qdatetime.h>
26#include <qlistbox.h> 26#include <q3listbox.h>
27#include <qpoint.h> 27#include <qpoint.h>
28#include <qwidgetstack.h> 28#include <q3widgetstack.h>
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qintdict.h> 31#include <q3intdict.h>
32#include <qpushbutton.h> 32#include <qpushbutton.h>
33#include <qvaluelist.h> 33#include <q3valuelist.h>
34#include <qptrvector.h> 34#include <q3ptrvector.h>
35//Added by qt3to4:
36#include <QResizeEvent>
37#include <QFocusEvent>
38#include <QMouseEvent>
39#include <Q3PtrList>
40#include <Q3PopupMenu>
41#include <QKeyEvent>
35 42
36#include <libkcal/calendar.h> 43#include <libkcal/calendar.h>
37#include <libkcal/event.h> 44#include <libkcal/event.h>
@@ -72,7 +79,7 @@ private slots :
72 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); } 79 void bottonClicked() { if ( mNumber > 0 ) emit selectWeekNum ( mNumber ); }
73}; 80};
74 81
75class KNoScrollListBox: public QListBox 82class KNoScrollListBox: public Q3ListBox
76{ 83{
77 Q_OBJECT 84 Q_OBJECT
78 public: 85 public:
@@ -103,7 +110,7 @@ class KNoScrollListBox: public QListBox
103}; 110};
104 111
105 112
106class MonthViewItem: public QListBoxItem 113class MonthViewItem: public Q3ListBoxItem
107{ 114{
108 public: 115 public:
109 MonthViewItem( Incidence *,const QString & title ); 116 MonthViewItem( Incidence *,const QString & title );
@@ -126,8 +133,8 @@ class MonthViewItem: public QListBoxItem
126 133
127 protected: 134 protected:
128 virtual void paint(QPainter *); 135 virtual void paint(QPainter *);
129 virtual int height(const QListBox *) const; 136 virtual int height(const Q3ListBox *) const;
130 virtual int width(const QListBox *) const; 137 virtual int width(const Q3ListBox *) const;
131 138
132 private: 139 private:
133 int mdayPos; 140 int mdayPos;
@@ -198,15 +205,15 @@ public slots:
198 void deHighLight(); 205 void deHighLight();
199 void repaintfinishUpdateCell(); 206 void repaintfinishUpdateCell();
200 protected slots: 207 protected slots:
201 void defaultAction( QListBoxItem * ); 208 void defaultAction( Q3ListBoxItem * );
202 void contextMenu( QListBoxItem * ); 209 void contextMenu( Q3ListBoxItem * );
203 void selection( QListBoxItem * ); 210 void selection( Q3ListBoxItem * );
204 void cellClicked( QListBoxItem * ); 211 void cellClicked( Q3ListBoxItem * );
205 void newEvent(); 212 void newEvent();
206 213
207 private: 214 private:
208 int mdayCount; 215 int mdayCount;
209 QPtrList <MonthViewItem> mAvailItemList; 216 Q3PtrList <MonthViewItem> mAvailItemList;
210 KOMonthView *mMonthView; 217 KOMonthView *mMonthView;
211 int currentPalette; 218 int currentPalette;
212 219
@@ -247,7 +254,7 @@ class KOMonthView: public KOEventView
247 virtual int currentDateCount(); 254 virtual int currentDateCount();
248 255
249 /** returns the currently selected events */ 256 /** returns the currently selected events */
250 virtual QPtrList<Incidence> selectedIncidences(); 257 virtual Q3PtrList<Incidence> selectedIncidences();
251 258
252 /** returns dates of the currently selected events */ 259 /** returns dates of the currently selected events */
253 virtual DateList selectedDates(); 260 virtual DateList selectedDates();
@@ -269,7 +276,7 @@ class KOMonthView: public KOEventView
269 virtual void updateView(); 276 virtual void updateView();
270 virtual void updateConfig(); 277 virtual void updateConfig();
271 virtual void showDates(const QDate &start, const QDate &end); 278 virtual void showDates(const QDate &start, const QDate &end);
272 virtual void showEvents(QPtrList<Event> eventList); 279 virtual void showEvents(Q3PtrList<Event> eventList);
273 280
274 void changeEventDisplay(Event *, int); 281 void changeEventDisplay(Event *, int);
275 282
@@ -311,7 +318,7 @@ class KOMonthView: public KOEventView
311 NavigatorBar* mNavigatorBar; 318 NavigatorBar* mNavigatorBar;
312 int currentWeek(); 319 int currentWeek();
313 bool clPending; 320 bool clPending;
314 QWidgetStack * mWidStack; 321 Q3WidgetStack * mWidStack;
315 QWidget* mMonthView; 322 QWidget* mMonthView;
316 QWidget* mWeekView; 323 QWidget* mWeekView;
317 bool mShowWeekView; 324 bool mShowWeekView;
@@ -325,12 +332,12 @@ class KOMonthView: public KOEventView
325 void computeLayoutWeek(); 332 void computeLayoutWeek();
326 void doComputeLayoutWeek(); 333 void doComputeLayoutWeek();
327 334
328 QPtrVector<MonthViewCell> mCells; 335 Q3PtrVector<MonthViewCell> mCells;
329 QPtrVector<QLabel> mDayLabels; 336 Q3PtrVector<QLabel> mDayLabels;
330 QPtrVector<KOWeekButton> mWeekLabels; 337 Q3PtrVector<KOWeekButton> mWeekLabels;
331 QPtrVector<MonthViewCell> mCellsW; 338 Q3PtrVector<MonthViewCell> mCellsW;
332 QPtrVector<QLabel> mDayLabelsW; 339 Q3PtrVector<QLabel> mDayLabelsW;
333 QPtrVector<KOWeekButton> mWeekLabelsW; 340 Q3PtrVector<KOWeekButton> mWeekLabelsW;
334 341
335 bool mShortDayLabelsM; 342 bool mShortDayLabelsM;
336 bool mShortDayLabelsW; 343 bool mShortDayLabelsW;
@@ -342,7 +349,7 @@ class KOMonthView: public KOEventView
342 MonthViewCell *mPopupCell; 349 MonthViewCell *mPopupCell;
343 bool mFlagKeyPressed; 350 bool mFlagKeyPressed;
344 KOEventPopupMenu *mContextMenu; 351 KOEventPopupMenu *mContextMenu;
345 QPopupMenu *mNewItemMenu; 352 Q3PopupMenu *mNewItemMenu;
346 void keyPressEvent ( QKeyEvent * ) ; 353 void keyPressEvent ( QKeyEvent * ) ;
347 void keyReleaseEvent ( QKeyEvent * ) ; 354 void keyReleaseEvent ( QKeyEvent * ) ;
348 355
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 5078c57..0bd46ea 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -26,7 +26,7 @@
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <q3textstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
@@ -305,13 +305,13 @@ KOPrefs::KOPrefs() :
305 305
306 KPrefs::setCurrentGroup("KOrganizer Plugins"); 306 KPrefs::setCurrentGroup("KOrganizer Plugins");
307 307
308 addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); 308 addItemStringList("SelectedPlugins",&mSelectedPlugins,QStringList("holidays"));
309 309
310 KPrefs::setCurrentGroup("Group Scheduling"); 310 KPrefs::setCurrentGroup("Group Scheduling");
311 311
312 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); 312 addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail);
313 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); 313 addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend);
314 addItemStringList("AdditionalMails",&mAdditionalMails,""); 314 addItemStringList("AdditionalMails",&mAdditionalMails,QStringList());
315 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); 315 addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto);
316 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); 316 addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto);
317 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto); 317 addItemInt("IMIP auto insert reply",&mIMIPAutoInsertReply,neverAuto);
@@ -566,7 +566,7 @@ void KOPrefs::usrWriteConfig()
566 config()->writeEntry("user_email",mEmail); 566 config()->writeEntry("user_email",mEmail);
567 567
568 config()->setGroup("Category Colors"); 568 config()->setGroup("Category Colors");
569 QDictIterator<QColor> it(mCategoryColors); 569 Q3DictIterator<QColor> it(mCategoryColors);
570 while (it.current()) { 570 while (it.current()) {
571 config()->writeEntry(it.currentKey(),*(it.current())); 571 config()->writeEntry(it.currentKey(),*(it.current()));
572 ++it; 572 ++it;
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 94bdd33..35c6110 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -25,9 +25,12 @@
25 25
26 26
27#include <libkdepim/kpimprefs.h> 27#include <libkdepim/kpimprefs.h>
28#include <qdict.h> 28#include <q3dict.h>
29#include <qdir.h> 29#include <qdir.h>
30#include <qobject.h> 30#include <qobject.h>
31#include <QDateTime>
32//Added by qt3to4:
33#include <Q3PtrList>
31 34
32class KConfig; 35class KConfig;
33class QFont; 36class QFont;
@@ -347,7 +350,7 @@ class KOPrefs : public KPimPrefs
347 bool mWTshowChanged; 350 bool mWTshowChanged;
348 351
349 int mCurrentDisplayedView; 352 int mCurrentDisplayedView;
350 QPtrList<KopiCalendarFile> mCalendars; 353 Q3PtrList<KopiCalendarFile> mCalendars;
351 int mNextAvailableCalendar; 354 int mNextAvailableCalendar;
352 bool mGlobalUpdateDisabled; 355 bool mGlobalUpdateDisabled;
353 356
@@ -362,8 +365,8 @@ class KOPrefs : public KPimPrefs
362 QString mFilterConflictAllItem; 365 QString mFilterConflictAllItem;
363 366
364 private: 367 private:
365 QDict<QColor> mCategoryColors; 368 Q3Dict<QColor> mCategoryColors;
366 QArray<KopiCalendarFile*> mDefCalColors; 369 QVector<KopiCalendarFile*> mDefCalColors;
367 QColor mDefaultCategoryColor; 370 QColor mDefaultCategoryColor;
368 371
369 QFont mDefaultTimeBarFont; 372 QFont mDefaultTimeBarFont;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index f1a6c3d..43c488f 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -23,24 +23,30 @@
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <q3groupbox.h>
27#include <qbuttongroup.h> 27#include <q3buttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <q3textstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <q3vbox.h>
35#include <qhbox.h> 35#include <q3hbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <q3strlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44#include <QDesktopWidget>
45//Added by qt3to4:
46#include <Q3HBoxLayout>
47#include <Q3GridLayout>
48#include <QPixmap>
49#include <Q3Frame>
44 50
45#include <kcolorbutton.h> 51#include <kcolorbutton.h>
46#include <kdebug.h> 52#include <kdebug.h>
@@ -116,8 +122,8 @@ void KOPrefsDialog::setupGlobalTab()
116void KOPrefsDialog::setupLocaleDateTab() 122void KOPrefsDialog::setupLocaleDateTab()
117{ 123{
118#if 0 124#if 0
119QFrame *topFrame = addPage(i18n("Date Format"),0,0); 125Q3Frame *topFrame = addPage(i18n("Date Format"),0,0);
120 QGridLayout *topLayout = new QGridLayout(topFrame,3,2); 126 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2);
121 topLayout->setSpacing(mSpacingHint); 127 topLayout->setSpacing(mSpacingHint);
122 topLayout->setMargin(mMarginHint); 128 topLayout->setMargin(mMarginHint);
123 int iii = 0; 129 int iii = 0;
@@ -172,8 +178,8 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
172void KOPrefsDialog::setupLocaleTab() 178void KOPrefsDialog::setupLocaleTab()
173{ 179{
174#if 0 180#if 0
175 QFrame *topFrame = addPage(i18n("Locale"),0,0); 181 Q3Frame *topFrame = addPage(i18n("Locale"),0,0);
176 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 182 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
177 topLayout->setSpacing(mSpacingHint); 183 topLayout->setSpacing(mSpacingHint);
178 topLayout->setMargin(mMarginHint); 184 topLayout->setMargin(mMarginHint);
179 int iii = 0; 185 int iii = 0;
@@ -211,7 +217,7 @@ void KOPrefsDialog::setupLocaleTab()
211 } 217 }
212 else { 218 else {
213 QWidget * hb = new QWidget( topFrame ); 219 QWidget * hb = new QWidget( topFrame );
214 QHBoxLayout *hbLayout = new QHBoxLayout(hb); 220 Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb);
215 sb = 221 sb =
216 addWidBool(i18n("Week starts on Sunday"), 222 addWidBool(i18n("Week starts on Sunday"),
217 &(KOPrefs::instance()->mWeekStartsOnSunday),hb); 223 &(KOPrefs::instance()->mWeekStartsOnSunday),hb);
@@ -236,10 +242,10 @@ void KOPrefsDialog::setupLocaleTab()
236 242
237void KOPrefsDialog::setupMainTab() 243void KOPrefsDialog::setupMainTab()
238{ 244{
239 QFrame *topFrame = addPage(i18n("General"),0,0); 245 Q3Frame *topFrame = addPage(i18n("General"),0,0);
240 // DesktopIcon("identity",KIcon::SizeMedium)); 246 // DesktopIcon("identity",KIcon::SizeMedium));
241 247
242 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 248 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
243 topLayout->setSpacing(mSpacingHint); 249 topLayout->setSpacing(mSpacingHint);
244 topLayout->setMargin(mMarginHint); 250 topLayout->setMargin(mMarginHint);
245 251
@@ -287,12 +293,12 @@ void KOPrefsDialog::setupMainTab()
287 ++iii; 293 ++iii;
288 if ( QApplication::desktop()->height() <= 240 ) { 294 if ( QApplication::desktop()->height() <= 240 ) {
289 topFrame = addPage(i18n("General") +" 2",0,0); 295 topFrame = addPage(i18n("General") +" 2",0,0);
290 topLayout = new QGridLayout(topFrame,4,2); 296 topLayout = new Q3GridLayout(topFrame,4,2);
291 topLayout->setSpacing(2); 297 topLayout->setSpacing(2);
292 topLayout->setMargin(3); 298 topLayout->setMargin(3);
293 iii = 0; 299 iii = 0;
294 } 300 }
295 QHBox *dummy = new QHBox(topFrame); 301 Q3HBox *dummy = new Q3HBox(topFrame);
296 new QLabel(i18n("Days in Next-X-Days:"),dummy); 302 new QLabel(i18n("Days in Next-X-Days:"),dummy);
297 mNextXDaysSpin = new QSpinBox(2,14,1,dummy); 303 mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
298 304
@@ -313,7 +319,7 @@ void KOPrefsDialog::setupMainTab()
313 // addWidBool(i18n("Enable automatic saving of calendar"), 319 // addWidBool(i18n("Enable automatic saving of calendar"),
314 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); 320 // &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
315 321
316 QHBox *intervalBox = new QHBox(topFrame); 322 Q3HBox *intervalBox = new Q3HBox(topFrame);
317 // intervalBox->setSpacing(mSpacingHint); 323 // intervalBox->setSpacing(mSpacingHint);
318 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); 324 topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1);
319 ++iii; 325 ++iii;
@@ -402,14 +408,14 @@ void KOPrefsDialog::setupMainTab()
402 408
403void KOPrefsDialog::setupTimeTab() 409void KOPrefsDialog::setupTimeTab()
404{ 410{
405 QFrame *topFrame = addPage(i18n("Time"),0,0); 411 Q3Frame *topFrame = addPage(i18n("Time"),0,0);
406 // DesktopIcon("clock",KIcon::SizeMedium)); 412 // DesktopIcon("clock",KIcon::SizeMedium));
407 413
408 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 414 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
409 topLayout->setSpacing(mSpacingHint); 415 topLayout->setSpacing(mSpacingHint);
410 topLayout->setMargin(mMarginHint); 416 topLayout->setMargin(mMarginHint);
411 417
412 QHBox *dummy = new QHBox(topFrame); 418 Q3HBox *dummy = new Q3HBox(topFrame);
413 KPrefsDialogWidTime *dayBegins = 419 KPrefsDialogWidTime *dayBegins =
414 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), 420 addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
415 dummy); 421 dummy);
@@ -441,28 +447,28 @@ void KOPrefsDialog::setupTimeTab()
441 int iii = 4; 447 int iii = 4;
442 if ( QApplication::desktop()->height() <= 240 ) { 448 if ( QApplication::desktop()->height() <= 240 ) {
443 topFrame = addPage(i18n("Time") +" 2",0,0); 449 topFrame = addPage(i18n("Time") +" 2",0,0);
444 topLayout = new QGridLayout(topFrame,1,2); 450 topLayout = new Q3GridLayout(topFrame,1,2);
445 topLayout->setSpacing(2); 451 topLayout->setSpacing(2);
446 topLayout->setMargin(3); 452 topLayout->setMargin(3);
447 iii = 0; 453 iii = 0;
448 } 454 }
449 455
450 QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, 456 Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal,
451 i18n("Working Hours"), 457 i18n("Working Hours"),
452 topFrame); 458 topFrame);
453 topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1); 459 topLayout->addMultiCellWidget(workingHoursGroup,iii,iii,0,1);
454 workingHoursGroup->layout()->setSpacing( 0 ); 460 workingHoursGroup->layout()->setSpacing( 0 );
455 workingHoursGroup->layout()->setMargin( 4 ); 461 workingHoursGroup->layout()->setMargin( 4 );
456 QHBox *workStartBox = new QHBox(workingHoursGroup); 462 Q3HBox *workStartBox = new Q3HBox(workingHoursGroup);
457 // workStartBox->setMargin( 0 ); 463 // workStartBox->setMargin( 0 );
458 addWidTime(i18n("Daily starting hour:"), 464 addWidTime(i18n("Daily starting hour:"),
459 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); 465 &(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
460 466
461 QHBox *workEndBox = new QHBox(workingHoursGroup); 467 Q3HBox *workEndBox = new Q3HBox(workingHoursGroup);
462 //workEndBox->setMargin( 0 ); 468 //workEndBox->setMargin( 0 );
463 addWidTime(i18n("Daily ending hour:"), 469 addWidTime(i18n("Daily ending hour:"),
464 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); 470 &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
465 QVBox *excludeBox = new QVBox(workingHoursGroup); 471 Q3VBox *excludeBox = new Q3VBox(workingHoursGroup);
466 //excludeBox->setMargin( 0 ); 472 //excludeBox->setMargin( 0 );
467 addWidBool(i18n("Exclude holidays"), 473 addWidBool(i18n("Exclude holidays"),
468 &(KOPrefs::instance()->mExcludeHolidays),excludeBox); 474 &(KOPrefs::instance()->mExcludeHolidays),excludeBox);
@@ -482,10 +488,10 @@ void KOPrefsDialog::setupTimeTab()
482void KOPrefsDialog::setupViewsTab() 488void KOPrefsDialog::setupViewsTab()
483{ 489{
484 490
485 QFrame *topFrame = addPage(i18n("Views"),0,0); 491 Q3Frame *topFrame = addPage(i18n("Views"),0,0);
486 // DesktopIcon("viewmag",KIcon::SizeMedium)); 492 // DesktopIcon("viewmag",KIcon::SizeMedium));
487 493
488 QGridLayout *topLayout = new QGridLayout(topFrame,6,1); 494 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1);
489 topLayout->setSpacing(mSpacingHint); 495 topLayout->setSpacing(mSpacingHint);
490 topLayout->setMargin(mMarginHint); 496 topLayout->setMargin(mMarginHint);
491 497
@@ -530,7 +536,7 @@ void KOPrefsDialog::setupViewsTab()
530 topFrame = addPage(i18n("ViewChange"),0,0); 536 topFrame = addPage(i18n("ViewChange"),0,0);
531 // DesktopIcon("viewmag",KIcon::SizeMedium)); 537 // DesktopIcon("viewmag",KIcon::SizeMedium));
532 538
533 topLayout = new QGridLayout(topFrame,6,1); 539 topLayout = new Q3GridLayout(topFrame,6,1);
534 topLayout->setSpacing(mSpacingHint); 540 topLayout->setSpacing(mSpacingHint);
535 topLayout->setMargin(mMarginHint); 541 topLayout->setMargin(mMarginHint);
536 ii = 0; 542 ii = 0;
@@ -594,7 +600,7 @@ void KOPrefsDialog::setupViewsTab()
594 topFrame = addPage(i18n("Agenda View"),0,0); 600 topFrame = addPage(i18n("Agenda View"),0,0);
595 // DesktopIcon("viewmag",KIcon::SizeMedium)); 601 // DesktopIcon("viewmag",KIcon::SizeMedium));
596 602
597 topLayout = new QGridLayout(topFrame,5,1); 603 topLayout = new Q3GridLayout(topFrame,5,1);
598 topLayout->setSpacing(mSpacingHint); 604 topLayout->setSpacing(mSpacingHint);
599 topLayout->setMargin(mMarginHint); 605 topLayout->setMargin(mMarginHint);
600 ii = 0; 606 ii = 0;
@@ -652,12 +658,12 @@ void KOPrefsDialog::setupViewsTab()
652 topFrame = addPage(i18n("Month View"),0,0); 658 topFrame = addPage(i18n("Month View"),0,0);
653 // DesktopIcon("viewmag",KIcon::SizeMedium)); 659 // DesktopIcon("viewmag",KIcon::SizeMedium));
654 660
655 topLayout = new QGridLayout(topFrame,5,1); 661 topLayout = new Q3GridLayout(topFrame,5,1);
656 topLayout->setSpacing(mSpacingHint); 662 topLayout->setSpacing(mSpacingHint);
657 topLayout->setMargin(mMarginHint); 663 topLayout->setMargin(mMarginHint);
658 ii = 0; 664 ii = 0;
659 QLabel *lab; 665 QLabel *lab;
660 QHBox *habo = new QHBox( topFrame ); 666 Q3HBox *habo = new Q3HBox( topFrame );
661 if ( QApplication::desktop()->width() <= 480 ) { 667 if ( QApplication::desktop()->width() <= 480 ) {
662 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 668 lab = new QLabel ( i18n("Show events that recur "), topFrame );
663 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 669 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
@@ -677,7 +683,7 @@ void KOPrefsDialog::setupViewsTab()
677 ii++; 683 ii++;
678 684
679 685
680 habo = new QHBox( topFrame ); 686 habo = new Q3HBox( topFrame );
681 if ( QApplication::desktop()->width() <= 480 ) { 687 if ( QApplication::desktop()->width() <= 480 ) {
682 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 688 lab = new QLabel (i18n("Show in every cell ") , topFrame );
683 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 689 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
@@ -730,7 +736,7 @@ void KOPrefsDialog::setupViewsTab()
730 736
731 if ( QApplication::desktop()->height() <= 240 ) { 737 if ( QApplication::desktop()->height() <= 240 ) {
732 topFrame = addPage(i18n("Month View") +" 2",0,0); 738 topFrame = addPage(i18n("Month View") +" 2",0,0);
733 topLayout = new QGridLayout(topFrame,4,1); 739 topLayout = new Q3GridLayout(topFrame,4,1);
734 topLayout->setSpacing(2); 740 topLayout->setSpacing(2);
735 topLayout->setMargin(1); 741 topLayout->setMargin(1);
736 ii = 0; 742 ii = 0;
@@ -764,19 +770,19 @@ void KOPrefsDialog::setupViewsTab()
764 topFrame = addPage(i18n("What's Next View"),0,0); 770 topFrame = addPage(i18n("What's Next View"),0,0);
765 // DesktopIcon("viewmag",KIcon::SizeMedium)); 771 // DesktopIcon("viewmag",KIcon::SizeMedium));
766 772
767 topLayout = new QGridLayout(topFrame,4,1); 773 topLayout = new Q3GridLayout(topFrame,4,1);
768 topLayout->setSpacing(mSpacingHint); 774 topLayout->setSpacing(mSpacingHint);
769 topLayout->setMargin(mMarginHint); 775 topLayout->setMargin(mMarginHint);
770 ii = 0; 776 ii = 0;
771 777
772 778
773 QHBox* hdummy = new QHBox(topFrame); 779 Q3HBox* hdummy = new Q3HBox(topFrame);
774 new QLabel(i18n("Days in What's Next:"),hdummy); 780 new QLabel(i18n("Days in What's Next:"),hdummy);
775 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); 781 mWhatsNextSpin = new QSpinBox(1,14,1,hdummy);
776 782
777 topLayout->addWidget(hdummy,ii++,0); 783 topLayout->addWidget(hdummy,ii++,0);
778 784
779 QHBox *prioBox = new QHBox(topFrame); 785 Q3HBox *prioBox = new Q3HBox(topFrame);
780 // intervalBox->setSpacing(mSpacingHint); 786 // intervalBox->setSpacing(mSpacingHint);
781 topLayout->addWidget(prioBox,ii++,0); 787 topLayout->addWidget(prioBox,ii++,0);
782 788
@@ -818,7 +824,7 @@ void KOPrefsDialog::setupViewsTab()
818 topFrame = addPage(i18n("Todo View"),0,0); 824 topFrame = addPage(i18n("Todo View"),0,0);
819 // DesktopIcon("viewmag",KIcon::SizeMedium)); 825 // DesktopIcon("viewmag",KIcon::SizeMedium));
820 826
821 topLayout = new QGridLayout(topFrame,4,1); 827 topLayout = new Q3GridLayout(topFrame,4,1);
822 topLayout->setSpacing(mSpacingHint); 828 topLayout->setSpacing(mSpacingHint);
823 topLayout->setMargin(mMarginHint); 829 topLayout->setMargin(mMarginHint);
824 ii = 0; 830 ii = 0;
@@ -855,7 +861,7 @@ dummy =
855 KPrefsDialogWidColor *todoRunColor = 861 KPrefsDialogWidColor *todoRunColor =
856 addWidColor(i18n("Color for running todos:"), 862 addWidColor(i18n("Color for running todos:"),
857 &(KOPrefs::instance()->mTodoRunColor),wid); 863 &(KOPrefs::instance()->mTodoRunColor),wid);
858 QHBoxLayout *widLayout = new QHBoxLayout(wid); 864 Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid);
859 widLayout->addWidget( todoRunColor->label() ); 865 widLayout->addWidget( todoRunColor->label() );
860 widLayout->addWidget( todoRunColor->button() ); 866 widLayout->addWidget( todoRunColor->button() );
861 topLayout->addWidget(wid,ii++,0); 867 topLayout->addWidget(wid,ii++,0);
@@ -865,7 +871,7 @@ dummy =
865 KPrefsDialogWidColor *todoDueTodayColor = 871 KPrefsDialogWidColor *todoDueTodayColor =
866 addWidColor(i18n("Todo due today color:"), 872 addWidColor(i18n("Todo due today color:"),
867 &(KOPrefs::instance()->mTodoDueTodayColor),wid); 873 &(KOPrefs::instance()->mTodoDueTodayColor),wid);
868 widLayout = new QHBoxLayout(wid); 874 widLayout = new Q3HBoxLayout(wid);
869 widLayout->addWidget( todoDueTodayColor->label() ); 875 widLayout->addWidget( todoDueTodayColor->label() );
870 widLayout->addWidget( todoDueTodayColor->button() ); 876 widLayout->addWidget( todoDueTodayColor->button() );
871 topLayout->addWidget(wid,ii++,0); 877 topLayout->addWidget(wid,ii++,0);
@@ -873,7 +879,7 @@ dummy =
873 879
874 // Todo overdue color 880 // Todo overdue color
875 wid = new QWidget( topFrame ); 881 wid = new QWidget( topFrame );
876 widLayout = new QHBoxLayout(wid); 882 widLayout = new Q3HBoxLayout(wid);
877 KPrefsDialogWidColor *todoOverdueColor = 883 KPrefsDialogWidColor *todoOverdueColor =
878 addWidColor(i18n("Todo overdue color:"), 884 addWidColor(i18n("Todo overdue color:"),
879 &(KOPrefs::instance()->mTodoOverdueColor),wid); 885 &(KOPrefs::instance()->mTodoOverdueColor),wid);
@@ -890,7 +896,7 @@ dummy =
890 896
891 topFrame = addPage(i18n("View Options"),0,0); 897 topFrame = addPage(i18n("View Options"),0,0);
892 898
893 topLayout = new QGridLayout(topFrame,4,1); 899 topLayout = new Q3GridLayout(topFrame,4,1);
894 topLayout->setSpacing(mSpacingHint); 900 topLayout->setSpacing(mSpacingHint);
895 topLayout->setMargin(mMarginHint); 901 topLayout->setMargin(mMarginHint);
896 ii = 0; 902 ii = 0;
@@ -929,16 +935,16 @@ dummy =
929 935
930 topFrame = addPage(i18n("Conflict detection"),0,0); 936 topFrame = addPage(i18n("Conflict detection"),0,0);
931 937
932 topLayout = new QGridLayout(topFrame,2,1); 938 topLayout = new Q3GridLayout(topFrame,2,1);
933 topLayout->setSpacing(mSpacingHint); 939 topLayout->setSpacing(mSpacingHint);
934 topLayout->setMargin(mMarginHint); 940 topLayout->setMargin(mMarginHint);
935 ii = 0; 941 ii = 0;
936 dummy = addWidBool(i18n("Enable conflict detection"), 942 dummy = addWidBool(i18n("Enable conflict detection"),
937 &(KOPrefs::instance()->mDetectConflicts),topFrame); 943 &(KOPrefs::instance()->mDetectConflicts),topFrame);
938 topLayout->addWidget(dummy->checkBox(), ii++,0); 944 topLayout->addWidget(dummy->checkBox(), ii++,0);
939 topFrame = new QFrame( topFrame ); 945 topFrame = new Q3Frame( topFrame );
940 topLayout->addWidget(topFrame ,ii++,0); 946 topLayout->addWidget(topFrame ,ii++,0);
941 topLayout = new QGridLayout(topFrame,4,1); 947 topLayout = new Q3GridLayout(topFrame,4,1);
942 connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); 948 connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) );
943 dummy = addWidBool(i18n("Include events which \"show as free\""), 949 dummy = addWidBool(i18n("Include events which \"show as free\""),
944 &(KOPrefs::instance()->mIncludeFree),topFrame); 950 &(KOPrefs::instance()->mIncludeFree),topFrame);
@@ -970,7 +976,7 @@ dummy =
970 topFrame = addPage(i18n("Alarm"),0,0); 976 topFrame = addPage(i18n("Alarm"),0,0);
971 // DesktopIcon("viewmag",KIcon::SizeMedium)); 977 // DesktopIcon("viewmag",KIcon::SizeMedium));
972 978
973 topLayout = new QGridLayout(topFrame,2,1); 979 topLayout = new Q3GridLayout(topFrame,2,1);
974 topLayout->setSpacing(mSpacingHint); 980 topLayout->setSpacing(mSpacingHint);
975 topLayout->setMargin(mMarginHint); 981 topLayout->setMargin(mMarginHint);
976 int iii = 0; 982 int iii = 0;
@@ -989,33 +995,33 @@ dummy =
989#ifndef DESKTOP_VERSION 995#ifndef DESKTOP_VERSION
990 lab->setAlignment( AlignLeft|WordBreak|AlignTop); 996 lab->setAlignment( AlignLeft|WordBreak|AlignTop);
991#else 997#else
992 lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); 998 lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
993 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); 999 lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
994#endif 1000#endif
995 1001
996 QHBox* dummyBox = new QHBox(topFrame); 1002 Q3HBox* dummyBox = new Q3HBox(topFrame);
997 new QLabel(i18n("Play beeps count:"),dummyBox); 1003 new QLabel(i18n("Play beeps count:"),dummyBox);
998 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); 1004 mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
999 topLayout->addWidget(dummyBox,iii++,0); 1005 topLayout->addWidget(dummyBox,iii++,0);
1000 1006
1001 dummyBox = new QHBox(topFrame); 1007 dummyBox = new Q3HBox(topFrame);
1002 new QLabel(i18n("Beeps interval in sec:"),dummyBox); 1008 new QLabel(i18n("Beeps interval in sec:"),dummyBox);
1003 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); 1009 mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
1004 topLayout->addWidget(dummyBox,iii++,0); 1010 topLayout->addWidget(dummyBox,iii++,0);
1005 1011
1006 dummyBox = new QHBox(topFrame); 1012 dummyBox = new Q3HBox(topFrame);
1007 new QLabel(i18n("Default suspend time in min:"),dummyBox); 1013 new QLabel(i18n("Default suspend time in min:"),dummyBox);
1008 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); 1014 mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
1009 topLayout->addWidget(dummyBox,iii++,0); 1015 topLayout->addWidget(dummyBox,iii++,0);
1010 1016
1011 dummyBox = new QHBox(topFrame); 1017 dummyBox = new Q3HBox(topFrame);
1012 new QLabel(i18n("Auto suspend count:"),dummyBox); 1018 new QLabel(i18n("Auto suspend count:"),dummyBox);
1013 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); 1019 mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
1014 topLayout->addWidget(dummyBox,iii++,0); 1020 topLayout->addWidget(dummyBox,iii++,0);
1015 1021
1016 1022
1017 1023
1018 QHBox* hbo = new QHBox ( topFrame ); 1024 Q3HBox* hbo = new Q3HBox ( topFrame );
1019 mDefaultAlarmFile = new QLineEdit(hbo); 1025 mDefaultAlarmFile = new QLineEdit(hbo);
1020 QPushButton * loadTemplate = new QPushButton(hbo); 1026 QPushButton * loadTemplate = new QPushButton(hbo);
1021 QPixmap icon; 1027 QPixmap icon;
@@ -1055,10 +1061,10 @@ void KOPrefsDialog::selectSoundFile()
1055void KOPrefsDialog::setupFontsTab() 1061void KOPrefsDialog::setupFontsTab()
1056{ 1062{
1057 1063
1058 QFrame *topFrame = addPage(i18n("Fonts"),0,0); 1064 Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
1059 // DesktopIcon("fonts",KIcon::SizeMedium)); 1065 // DesktopIcon("fonts",KIcon::SizeMedium));
1060 1066
1061 QGridLayout *topLayout = new QGridLayout(topFrame,7,3); 1067 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
1062 topLayout->setSpacing(1); 1068 topLayout->setSpacing(1);
1063 topLayout->setMargin(3); 1069 topLayout->setMargin(3);
1064 KPrefsDialogWidFont * tVFont; 1070 KPrefsDialogWidFont * tVFont;
@@ -1125,7 +1131,7 @@ void KOPrefsDialog::setupFontsTab()
1125 topFrame = addPage(i18n("View Fonts"),0, 1131 topFrame = addPage(i18n("View Fonts"),0,
1126 DesktopIcon("fonts",KIcon::SizeMedium)); 1132 DesktopIcon("fonts",KIcon::SizeMedium));
1127 1133
1128 topLayout = new QGridLayout(topFrame,7,3); 1134 topLayout = new Q3GridLayout(topFrame,7,3);
1129 topLayout->setSpacing(1); 1135 topLayout->setSpacing(1);
1130 topLayout->setMargin(3); 1136 topLayout->setMargin(3);
1131 1137
@@ -1193,10 +1199,10 @@ void KOPrefsDialog::setupFontsTab()
1193 1199
1194void KOPrefsDialog::setupColorsTab() 1200void KOPrefsDialog::setupColorsTab()
1195{ 1201{
1196 QFrame *topFrame = addPage(i18n("Colors"),0,0); 1202 Q3Frame *topFrame = addPage(i18n("Colors"),0,0);
1197 // DesktopIcon("colorize",KIcon::SizeMedium)); 1203 // DesktopIcon("colorize",KIcon::SizeMedium));
1198 1204
1199 QGridLayout *topLayout = new QGridLayout(topFrame,5,2); 1205 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
1200 // topLayout->setSpacing(mSpacingHint); 1206 // topLayout->setSpacing(mSpacingHint);
1201 // topLayout->setMargin(mMarginHint); 1207 // topLayout->setMargin(mMarginHint);
1202 1208
@@ -1204,9 +1210,9 @@ void KOPrefsDialog::setupColorsTab()
1204 topLayout->setMargin(3); 1210 topLayout->setMargin(3);
1205 1211
1206 int ii = 1; 1212 int ii = 1;
1207 QGroupBox *categoryGroup ; 1213 Q3GroupBox *categoryGroup ;
1208 1214
1209 categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), 1215 categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"),
1210 topFrame); 1216 topFrame);
1211 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); 1217 topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
1212 1218
@@ -1250,7 +1256,7 @@ void KOPrefsDialog::setupColorsTab()
1250 topFrame = addPage(i18n("Colors") +" 2",0,0); 1256 topFrame = addPage(i18n("Colors") +" 2",0,0);
1251 // DesktopIcon("colorize",KIcon::SizeMedium)); 1257 // DesktopIcon("colorize",KIcon::SizeMedium));
1252 1258
1253 topLayout = new QGridLayout(topFrame,5,2); 1259 topLayout = new Q3GridLayout(topFrame,5,2);
1254 // topLayout->setSpacing(mSpacingHint); 1260 // topLayout->setSpacing(mSpacingHint);
1255 // topLayout->setMargin(mMarginHint); 1261 // topLayout->setMargin(mMarginHint);
1256 1262
@@ -1317,7 +1323,7 @@ void KOPrefsDialog::setupPrinterTab()
1317 mPrinterTab = addPage(i18n("Printing"),0, 1323 mPrinterTab = addPage(i18n("Printing"),0,
1318 DesktopIcon("fileprint",KIcon::SizeMedium)); 1324 DesktopIcon("fileprint",KIcon::SizeMedium));
1319 1325
1320 QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); 1326 Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2);
1321 topLayout->setSpacing(mSpacingHint); 1327 topLayout->setSpacing(mSpacingHint);
1322 topLayout->setMargin(mMarginHint); 1328 topLayout->setMargin(mMarginHint);
1323 1329
@@ -1327,10 +1333,10 @@ void KOPrefsDialog::setupPrinterTab()
1327void KOPrefsDialog::setupGroupSchedulingTab() 1333void KOPrefsDialog::setupGroupSchedulingTab()
1328{ 1334{
1329#if 0 1335#if 0
1330 QFrame *topFrame = addPage(i18n("Group Scheduling"),0, 1336 Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0,
1331 DesktopIcon("personal",KIcon::SizeMedium)); 1337 DesktopIcon("personal",KIcon::SizeMedium));
1332 1338
1333 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 1339 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
1334 topLayout->setSpacing(mSpacingHint); 1340 topLayout->setSpacing(mSpacingHint);
1335 topLayout->setMargin(mMarginHint); 1341 topLayout->setMargin(mMarginHint);
1336 1342
@@ -1353,7 +1359,7 @@ void KOPrefsDialog::setupGroupSchedulingTab()
1353 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); 1359 topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
1354 1360
1355 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); 1361 topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
1356 mAMails = new QListView(topFrame); 1362 mAMails = new Q3ListView(topFrame);
1357 mAMails->addColumn(i18n("Email"),300); 1363 mAMails->addColumn(i18n("Email"),300);
1358 topLayout->addMultiCellWidget(mAMails,3,3,0,1); 1364 topLayout->addMultiCellWidget(mAMails,3,3,0,1);
1359 1365
@@ -1371,17 +1377,17 @@ void KOPrefsDialog::setupGroupSchedulingTab()
1371 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); 1377 connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
1372 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); 1378 connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
1373 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); 1379 connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
1374 connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); 1380 connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput()));
1375#endif 1381#endif
1376} 1382}
1377 1383
1378void KOPrefsDialog::setupGroupAutomationTab() 1384void KOPrefsDialog::setupGroupAutomationTab()
1379{ 1385{
1380 return; 1386 return;
1381 QFrame *topFrame = addPage(i18n("Group Automation"),0, 1387 Q3Frame *topFrame = addPage(i18n("Group Automation"),0,
1382 DesktopIcon("personal",KIcon::SizeMedium)); 1388 DesktopIcon("personal",KIcon::SizeMedium));
1383 1389
1384 QGridLayout *topLayout = new QGridLayout(topFrame,5,1); 1390 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1);
1385 topLayout->setSpacing(mSpacingHint); 1391 topLayout->setSpacing(mSpacingHint);
1386 topLayout->setMargin(mMarginHint); 1392 topLayout->setMargin(mMarginHint);
1387 1393
@@ -1515,7 +1521,7 @@ void KOPrefsDialog::usrWriteConfig()
1515 ++iii; 1521 ++iii;
1516 } 1522 }
1517 } 1523 }
1518 QDictIterator<QColor> it(mCategoryDict); 1524 Q3DictIterator<QColor> it(mCategoryDict);
1519 while (it.current()) { 1525 while (it.current()) {
1520 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); 1526 KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
1521 ++it; 1527 ++it;
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index ee7a7aa..ccc1726 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -23,10 +23,12 @@
23#ifndef _KOPREFSDIALOG_H 23#ifndef _KOPREFSDIALOG_H
24#define _KOPREFSDIALOG_H 24#define _KOPREFSDIALOG_H
25 25
26#include <qframe.h> 26#include <q3frame.h>
27#include <qdict.h> 27#include <q3dict.h>
28#include <qcolor.h> 28#include <qcolor.h>
29#include <qlistview.h> 29#include <q3listview.h>
30//Added by qt3to4:
31#include <QLabel>
30 32
31#include <kdialogbase.h> 33#include <kdialogbase.h>
32 34
@@ -94,7 +96,7 @@ class KOPrefsDialog : public KPrefsDialog
94 KPrefsDialogWidBool *mEnableGroupScheduling; 96 KPrefsDialogWidBool *mEnableGroupScheduling;
95 KPrefsDialogWidBool *mEnableProjectView; 97 KPrefsDialogWidBool *mEnableProjectView;
96 98
97 QFrame *mPrinterTab; 99 Q3Frame *mPrinterTab;
98 100
99 QLineEdit *nameEdit; 101 QLineEdit *nameEdit;
100 QLineEdit *emailEdit; 102 QLineEdit *emailEdit;
@@ -121,7 +123,7 @@ class KOPrefsDialog : public KPrefsDialog
121 123
122 QComboBox *mCategoryCombo; 124 QComboBox *mCategoryCombo;
123 KColorButton *mCategoryButton; 125 KColorButton *mCategoryButton;
124 QDict<QColor> mCategoryDict; 126 Q3Dict<QColor> mCategoryDict;
125 127
126 QSlider *mHourSizeSlider; 128 QSlider *mHourSizeSlider;
127 129
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index df8f8d7..0f3b328 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,5 +1,5 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG = qt warn_on 2 CONFIG += qt warn_on
3 TARGET = kopi 3 TARGET = kopi
4OBJECTS_DIR = _obj/ 4OBJECTS_DIR = _obj/
5MOC_DIR = _moc 5MOC_DIR = _moc
@@ -17,27 +17,27 @@ DEFINES += DESKTOP_VERSION
17unix : { 17unix : {
18staticlib: { 18staticlib: {
19 TARGET = kopi_linux 19 TARGET = kopi_linux
20LIBS += ../bin/libmicrokabc_qtopia.a 20LIBS += ../bin/libxmicrokabc_qtopia.a
21LIBS += ../bin/libmicrokabc_file.a 21LIBS += ../bin/libxmicrokabc_file.a
22LIBS += ../bin/libmicrokabc_dir.a 22LIBS += ../bin/libxmicrokabc_dir.a
23LIBS += ../bin/libmicrokdepim.a 23LIBS += ../bin/libxmicrokdepim.a
24LIBS += ../bin/libmicrokcal.a 24LIBS += ../bin/libxmicrokcal.a
25LIBS += ../bin/libmicrokabc.a 25LIBS += ../bin/libxmicrokabc.a
26LIBS += ../bin/libmicrokde.a 26LIBS += ../bin/libxmicrokde.a
27LIBS += ../bin/libmicrokabc_qtopia.a 27LIBS += ../bin/libxmicrokabc_qtopia.a
28LIBS += ../bin/libmicrokabc_file.a 28LIBS += ../bin/libxmicrokabc_file.a
29LIBS += ../bin/libmicrokabc_dir.a 29LIBS += ../bin/libxmicrokabc_dir.a
30LIBS += ../bin/libmicrokdepim.a 30LIBS += ../bin/libxmicrokdepim.a
31LIBS += ../bin/libmicrokcal.a 31LIBS += ../bin/libxmicrokcal.a
32LIBS += ../bin/libmicrokabc.a 32LIBS += ../bin/libxmicrokabc.a
33LIBS += ../bin/libmicrokde.a 33LIBS += ../bin/libxmicrokde.a
34LIBS += ../libical/lib/libical.a 34LIBS += ../libical/lib/libical.a
35LIBS += ../libical/lib/libicalss.a 35LIBS += ../libical/lib/libicalss.a
36} else { 36} else {
37LIBS += ../bin/libmicrokdepim.so 37LIBS += ../bin/libxmicrokdepim.so
38LIBS += ../bin/libmicrokcal.so 38LIBS += ../bin/libxmicrokcal.so
39LIBS += ../bin/libmicrokde.so 39LIBS += ../bin/libxmicrokde.so
40LIBS += ../bin/libmicrokabc.so 40LIBS += ../bin/libxmicrokabc.so
41#LIBS += -lbluetooth 41#LIBS += -lbluetooth
42#LIBS += -lsdp 42#LIBS += -lsdp
43 43
@@ -49,10 +49,10 @@ MOC_DIR = moc/unix
49win32: { 49win32: {
50RC_FILE = winicons.rc 50RC_FILE = winicons.rc
51DEFINES += _WIN32_ 51DEFINES += _WIN32_
52LIBS += ../bin/microkdepim.lib 52LIBS += ../bin/xmicrokdepim.lib
53LIBS += ../bin/microkcal.lib 53LIBS += ../bin/xmicrokcal.lib
54LIBS += ../bin/microkde.lib 54LIBS += ../bin/xmicrokde.lib
55LIBS += ../bin/microkabc.lib 55LIBS += ../bin/xmicrokabc.lib
56LIBS += ../libical/lib/ical.lib 56LIBS += ../libical/lib/ical.lib
57LIBS += ../libical/lib/icalss.lib 57LIBS += ../libical/lib/icalss.lib
58#LIBS += atls.lib 58#LIBS += atls.lib
@@ -85,7 +85,8 @@ TARGET = kopi_me
85} 85}
86 86
87 87
88INTERFACES = kofilterview_base.ui 88#The following line was changed from INTERFACES to FORMS3 by qt3to4
89FORMS3 = kofilterview_base.ui
89#filteredit_base.ui 90#filteredit_base.ui
90 91
91# kdateedit.h \ 92# kdateedit.h \
@@ -210,9 +211,15 @@ filteredit_base.cpp \
210 ../kalarmd/alarmdialog.cpp 211 ../kalarmd/alarmdialog.cpp
211 212
212HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h 213HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h
213INTERFACES += calprintdayconfig_base.ui \ 214#The following line was changed from INTERFACES to FORMS3 by qt3to4
215FORMS3 += calprintdayconfig_base.ui \
214 calprintmonthconfig_base.ui \ 216 calprintmonthconfig_base.ui \
215 calprinttodoconfig_base.ui \ 217 calprinttodoconfig_base.ui \
216 calprintweekconfig_base.ui 218 calprintweekconfig_base.ui
217SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp 219SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp
218 220
221#The following line was inserted by qt3to4
222QT += xml qt3support
223#The following line was inserted by qt3to4
224CONFIG += uic3
225
diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro
index 553c265..2c1cd42 100644
--- a/korganizer/korganizerE.pro
+++ b/korganizer/korganizerE.pro
@@ -11,9 +11,9 @@ DEFINES += KORG_NODND KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
11DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER 11DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
12DEFINES += KORG_NOLVALTERNATION 12DEFINES += KORG_NOLVALTERNATION
13#KORG_NOKABC 13#KORG_NOKABC
14LIBS += -lmicrokdepim 14LIBS += -lxmicrokdepim
15LIBS += -lmicrokcal 15LIBS += -lxmicrokcal
16LIBS += -lmicrokde 16LIBS += -lxmicrokde
17LIBS += -lmicroqtcompat 17LIBS += -lmicroqtcompat
18 18
19LIBS += $(GCC3EXTRALIB1) 19LIBS += $(GCC3EXTRALIB1)
diff --git a/korganizer/kotimespanview.cpp b/korganizer/kotimespanview.cpp
index 3265a3a..a214720 100644
--- a/korganizer/kotimespanview.cpp
+++ b/korganizer/kotimespanview.cpp
@@ -1,4 +1,8 @@
1#include <qlayout.h> 1#include <qlayout.h>
2//Added by qt3to4:
3#include <Q3VBoxLayout>
4#include <Q3ValueList>
5#include <Q3PtrList>
2 6
3#include <kconfig.h> 7#include <kconfig.h>
4 8
@@ -11,7 +15,7 @@ KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent,
11 const char *name) : 15 const char *name) :
12 KOEventView( calendar, parent, name ) 16 KOEventView( calendar, parent, name )
13{ 17{
14 QBoxLayout *topLayout = new QVBoxLayout( this ); 18 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
15 19
16 mTimeSpanView = new TimeSpanView( this ); 20 mTimeSpanView = new TimeSpanView( this );
17 topLayout->addWidget( mTimeSpanView ); 21 topLayout->addWidget( mTimeSpanView );
@@ -34,7 +38,7 @@ void KOTimeSpanView::readSettings(KConfig *config)
34 38
35 config->setGroup("Views"); 39 config->setGroup("Views");
36 40
37 QValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); 41 Q3ValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView");
38 if (sizes.count() == 2) { 42 if (sizes.count() == 2) {
39 mTimeSpanView->setSplitterSizes(sizes); 43 mTimeSpanView->setSplitterSizes(sizes);
40 } 44 }
@@ -46,7 +50,7 @@ void KOTimeSpanView::writeSettings(KConfig *config)
46 50
47 config->setGroup("Views"); 51 config->setGroup("Views");
48 52
49 QValueList<int> list = mTimeSpanView->splitterSizes(); 53 Q3ValueList<int> list = mTimeSpanView->splitterSizes();
50 config->writeEntry("Separator TimeSpanView",list); 54 config->writeEntry("Separator TimeSpanView",list);
51} 55}
52 56
@@ -60,9 +64,9 @@ int KOTimeSpanView::currentDateCount()
60 return 0; 64 return 0;
61} 65}
62 66
63QPtrList<Incidence> KOTimeSpanView::selectedIncidences() 67Q3PtrList<Incidence> KOTimeSpanView::selectedIncidences()
64{ 68{
65 QPtrList<Incidence> selected; 69 Q3PtrList<Incidence> selected;
66 70
67 return selected; 71 return selected;
68} 72}
@@ -84,9 +88,9 @@ void KOTimeSpanView::showDates(const QDate &start, const QDate &end)
84void KOTimeSpanView::insertItems(const QDate &start, const QDate &end) 88void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
85{ 89{
86 mTimeSpanView->clear(); 90 mTimeSpanView->clear();
87 mTimeSpanView->setDateRange( start, end ); 91 mTimeSpanView->setDateRange( (QDateTime)start, (QDateTime)end );
88 92
89 QPtrList<Event> events = calendar()->events( start, end ); 93 Q3PtrList<Event> events = calendar()->events( start, end );
90 Event *event = events.first(); 94 Event *event = events.first();
91 while( event ) { 95 while( event ) {
92// kdDebug() << "KOTimeSpanView::showDates() add event: " << event->summary() 96// kdDebug() << "KOTimeSpanView::showDates() add event: " << event->summary()
@@ -100,7 +104,7 @@ void KOTimeSpanView::insertItems(const QDate &start, const QDate &end)
100 mTimeSpanView->updateView(); 104 mTimeSpanView->updateView();
101} 105}
102 106
103void KOTimeSpanView::showEvents(QPtrList<Event> eventList) 107void KOTimeSpanView::showEvents(Q3PtrList<Event> eventList)
104{ 108{
105} 109}
106 110
diff --git a/korganizer/kotimespanview.h b/korganizer/kotimespanview.h
index c682ed8..c3e4b41 100644
--- a/korganizer/kotimespanview.h
+++ b/korganizer/kotimespanview.h
@@ -2,6 +2,8 @@
2#define KOTIMESPANVIEW_H 2#define KOTIMESPANVIEW_H
3 3
4#include "koeventview.h" 4#include "koeventview.h"
5//Added by qt3to4:
6#include <Q3PtrList>
5 7
6class KConfig; 8class KConfig;
7class TimeSpanView; 9class TimeSpanView;
@@ -16,7 +18,7 @@ class KOTimeSpanView : public KOEventView
16 18
17 virtual int maxDatesHint(); 19 virtual int maxDatesHint();
18 virtual int currentDateCount(); 20 virtual int currentDateCount();
19 virtual QPtrList<Incidence> selectedIncidences(); 21 virtual Q3PtrList<Incidence> selectedIncidences();
20 DateList selectedDates() 22 DateList selectedDates()
21 {DateList q; 23 {DateList q;
22 return q;} 24 return q;}
@@ -28,7 +30,7 @@ class KOTimeSpanView : public KOEventView
28 public slots: 30 public slots:
29 virtual void updateView(); 31 virtual void updateView();
30 virtual void showDates(const QDate &start, const QDate &end); 32 virtual void showDates(const QDate &start, const QDate &end);
31 virtual void showEvents(QPtrList<Event> eventList); 33 virtual void showEvents(Q3PtrList<Event> eventList);
32 34
33 void changeEventDisplay(Event *, int); 35 void changeEventDisplay(Event *, int);
34 36
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 20a35d2..aeab92a 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -23,15 +23,20 @@
23*/ 23*/
24 24
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qframe.h> 26#include <q3frame.h>
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qhbox.h> 29#include <q3hbox.h>
30#include <qtimer.h> 30#include <qtimer.h>
31#include <qdir.h> 31#include <qdir.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qapplication.h> 33#include <qapplication.h>
34#include <QDesktopWidget>
34#include <qtabwidget.h> 35#include <qtabwidget.h>
36//Added by qt3to4:
37#include <Q3HBoxLayout>
38#include <Q3PtrList>
39#include <Q3VBoxLayout>
35 40
36#include <kiconloader.h> 41#include <kiconloader.h>
37#include <klocale.h> 42#include <klocale.h>
@@ -81,8 +86,8 @@ void KOTodoEditor::init()
81} 86}
82void KOTodoEditor::setupRecurrence() 87void KOTodoEditor::setupRecurrence()
83{ 88{
84 QFrame *topFrame = addPage( i18n("Recurrence") ); 89 Q3Frame *topFrame = addPage( i18n("Recurrence") );
85 QBoxLayout *topLayout = new QVBoxLayout( topFrame ); 90 Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame );
86 91
87 mRecurrence = new KOEditorRecurrence( topFrame ); 92 mRecurrence = new KOEditorRecurrence( topFrame );
88 topLayout->addWidget( mRecurrence ); 93 topLayout->addWidget( mRecurrence );
@@ -111,9 +116,9 @@ void KOTodoEditor::setupGeneral()
111 // mGeneral,SLOT(setCategories(const QString &))); 116 // mGeneral,SLOT(setCategories(const QString &)));
112 117
113 if (KOPrefs::instance()->mCompactDialogs) { 118 if (KOPrefs::instance()->mCompactDialogs) {
114 QFrame *topFrame = addPage(i18n("General")); 119 Q3Frame *topFrame = addPage(i18n("General"));
115 120
116 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 121 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
117 if ( QApplication::desktop()->width() < 480 ) { 122 if ( QApplication::desktop()->width() < 480 ) {
118 topLayout->setMargin(marginHintSmall()); 123 topLayout->setMargin(marginHintSmall());
119 topLayout->setSpacing(spacingHintSmall()); 124 topLayout->setSpacing(spacingHintSmall());
@@ -131,17 +136,17 @@ void KOTodoEditor::setupGeneral()
131 mGeneral->enableAlarm( false ); 136 mGeneral->enableAlarm( false );
132 137
133 138
134 QBoxLayout *priorityLayout; 139 Q3BoxLayout *priorityLayout;
135 if ( QApplication::desktop()->width() < 500 ) 140 if ( QApplication::desktop()->width() < 500 )
136 priorityLayout = new QVBoxLayout( topLayout ); 141 priorityLayout = new Q3VBoxLayout( topLayout );
137 else 142 else
138 priorityLayout = new QHBoxLayout( topLayout ); 143 priorityLayout = new Q3HBoxLayout( topLayout );
139 QWidget* prioWidget = new QWidget (topFrame); 144 QWidget* prioWidget = new QWidget (topFrame);
140 priorityLayout->addWidget( prioWidget ); 145 priorityLayout->addWidget( prioWidget );
141 QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget); 146 Q3HBoxLayout* priorityLayout2 = new Q3HBoxLayout( prioWidget);
142 147
143 148
144 QIconSet icon; 149 QIcon icon;
145 if ( QApplication::desktop()->width() < 321 ) 150 if ( QApplication::desktop()->width() < 321 )
146 icon = SmallIcon("fileimport16"); 151 icon = SmallIcon("fileimport16");
147 else 152 else
@@ -164,13 +169,13 @@ void KOTodoEditor::setupGeneral()
164 mGeneral->initCategories( topFrame, priorityLayout ); 169 mGeneral->initCategories( topFrame, priorityLayout );
165 topLayout->addStretch(1); 170 topLayout->addStretch(1);
166 171
167 QFrame *topFrame2 = addPage(i18n("Details")); 172 Q3Frame *topFrame2 = addPage(i18n("Details"));
168 173
169 QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); 174 Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2);
170 topLayout2->setMargin(marginHint()); 175 topLayout2->setMargin(marginHint());
171 topLayout2->setSpacing(spacingHint()); 176 topLayout2->setSpacing(spacingHint());
172 177
173 QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); 178 Q3HBoxLayout *completionLayout = new Q3HBoxLayout( topLayout2 );
174 mGeneral->initCompletion(topFrame2,completionLayout); 179 mGeneral->initCompletion(topFrame2,completionLayout);
175 180
176 181
@@ -185,18 +190,18 @@ void KOTodoEditor::setupGeneral()
185 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); 190 connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
186 191
187 } else { 192 } else {
188 QFrame *topFrame = addPage(i18n("General")); 193 Q3Frame *topFrame = addPage(i18n("General"));
189 194
190 QBoxLayout *topLayout = new QVBoxLayout(topFrame); 195 Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame);
191 topLayout->setSpacing(spacingHint()); 196 topLayout->setSpacing(spacingHint());
192 197
193 mGeneral->initHeader(topFrame,topLayout); 198 mGeneral->initHeader(topFrame,topLayout);
194 mGeneral->initTime(topFrame,topLayout); 199 mGeneral->initTime(topFrame,topLayout);
195 mGeneral->initStatus(topFrame,topLayout); 200 mGeneral->initStatus(topFrame,topLayout);
196 QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); 201 Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout);
197 mGeneral->initAlarm(topFrame,alarmLineLayout); 202 mGeneral->initAlarm(topFrame,alarmLineLayout);
198 mGeneral->initDescription(topFrame,topLayout); 203 mGeneral->initDescription(topFrame,topLayout);
199 QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); 204 Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout);
200 mGeneral->initCategories( topFrame, detailsLayout ); 205 mGeneral->initCategories( topFrame, detailsLayout );
201 mGeneral->initSecrecy( topFrame, detailsLayout ); 206 mGeneral->initSecrecy( topFrame, detailsLayout );
202 } 207 }
@@ -427,7 +432,7 @@ void KOTodoEditor::slotLoadTemplate()
427 .arg( fileName ) ); 432 .arg( fileName ) );
428 return ; 433 return ;
429 } 434 }
430 QPtrList<Todo> todos = cal.todos(); 435 Q3PtrList<Todo> todos = cal.todos();
431 Todo * todo = todos.first(); 436 Todo * todo = todos.first();
432 if ( !todo ) { 437 if ( !todo ) {
433 KMessageBox::error( this, 438 KMessageBox::error( this,
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index ba94057..2b8fbd3 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -21,17 +21,33 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <QDesktopWidget>
25
24#include <qlayout.h> 26#include <qlayout.h>
25#include <qheader.h> 27#include <q3header.h>
26#include <qcursor.h> 28#include <qcursor.h>
27#include <qwhatsthis.h> 29#include <q3whatsthis.h>
28#include <qdialog.h> 30#include <qdialog.h>
29#include <qlabel.h> 31#include <qlabel.h>
30#include <qpushbutton.h> 32#include <qpushbutton.h>
31 33
32#include <qinputdialog.h> 34#include <qinputdialog.h>
33 35
34#include <qvbox.h> 36#include <q3vbox.h>
37//Added by qt3to4:
38#include <QWheelEvent>
39#include <QFocusEvent>
40#include <QDragLeaveEvent>
41#include <QMouseEvent>
42#include <QDragEnterEvent>
43#include <QKeyEvent>
44#include <Q3HBoxLayout>
45#include <Q3VBoxLayout>
46#include <QDropEvent>
47#include <QDragMoveEvent>
48#include <QPaintEvent>
49#include <Q3PopupMenu>
50#include <Q3PtrList>
35#include <kdebug.h> 51#include <kdebug.h>
36#include "koprefs.h" 52#include "koprefs.h"
37#include <klocale.h> 53#include <klocale.h>
@@ -68,12 +84,12 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na
68{ 84{
69 mStopAll = true; 85 mStopAll = true;
70 setCaption( i18n("Start todo") ); 86 setCaption( i18n("Start todo") );
71 QVBoxLayout* lay = new QVBoxLayout( this ); 87 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
72 lay->setSpacing( 3 ); 88 lay->setSpacing( 3 );
73 lay->setMargin( 3 ); 89 lay->setMargin( 3 );
74 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); 90 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this );
75 lay->addWidget( lab ); 91 lay->addWidget( lab );
76 lab->setAlignment( AlignCenter ); 92 lab->setAlignment( Qt::AlignCenter );
77 93
78 QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); 94 QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this );
79 lay->addWidget( ok ); 95 lay->addWidget( ok );
@@ -98,20 +114,20 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name
98{ 114{
99 mTodo = todo; 115 mTodo = todo;
100 setCaption( i18n("Stop todo") ); 116 setCaption( i18n("Stop todo") );
101 QVBoxLayout* lay = new QVBoxLayout( this ); 117 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
102 lay->setSpacing( 3 ); 118 lay->setSpacing( 3 );
103 lay->setMargin( 3 ); 119 lay->setMargin( 3 );
104 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); 120 QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this );
105 lay->addWidget( lab ); 121 lay->addWidget( lab );
106 lab->setAlignment( AlignHCenter ); 122 lab->setAlignment( Qt::AlignHCenter );
107 lab = new QLabel( i18n("Additional Comment:"), this ); 123 lab = new QLabel( i18n("Additional Comment:"), this );
108 lay->addWidget( lab ); 124 lay->addWidget( lab );
109 mComment = new QLineEdit( this ); 125 mComment = new QLineEdit( this );
110 lay->addWidget( mComment ); 126 lay->addWidget( mComment );
111 QHBox * start = new QHBox ( this ); 127 Q3HBox * start = new Q3HBox ( this );
112 lay->addWidget( start ); 128 lay->addWidget( start );
113 lab = new QLabel( i18n("Start:"), start ); 129 lab = new QLabel( i18n("Start:"), start );
114 QHBox * end = new QHBox ( this ); 130 Q3HBox * end = new Q3HBox ( this );
115 lay->addWidget( end ); 131 lay->addWidget( end );
116 lab = new QLabel( i18n("End:"), end ); 132 lab = new QLabel( i18n("End:"), end );
117 sde = new KDateEdit( start ); 133 sde = new KDateEdit( start );
@@ -173,10 +189,10 @@ void KOStopTodoPrefs::doNotSave()
173} 189}
174 190
175 191
176class KOTodoViewWhatsThis :public QWhatsThis 192class KOTodoViewWhatsThis :public Q3WhatsThis
177{ 193{
178public: 194public:
179 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 195 KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { };
180 196
181protected: 197protected:
182 virtual QString text( const QPoint& p) 198 virtual QString text( const QPoint& p)
@@ -214,7 +230,7 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e)
214#ifndef KORG_NODND 230#ifndef KORG_NODND
215// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; 231// kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl;
216 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 232 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
217 !QTextDrag::canDecode( e ) ) { 233 !Q3TextDrag::canDecode( e ) ) {
218 e->ignore(); 234 e->ignore();
219 return; 235 return;
220 } 236 }
@@ -230,7 +246,7 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e)
230// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; 246// kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl;
231 247
232 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 248 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
233 !QTextDrag::canDecode( e ) ) { 249 !Q3TextDrag::canDecode( e ) ) {
234 e->ignore(); 250 e->ignore();
235 return; 251 return;
236 } 252 }
@@ -255,7 +271,7 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
255// kdDebug() << "KOTodoListView::contentsDropEvent" << endl; 271// kdDebug() << "KOTodoListView::contentsDropEvent" << endl;
256 272
257 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && 273 if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) &&
258 !QTextDrag::canDecode( e ) ) { 274 !Q3TextDrag::canDecode( e ) ) {
259 e->ignore(); 275 e->ignore();
260 return; 276 return;
261 } 277 }
@@ -300,7 +316,7 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
300 } 316 }
301 else { 317 else {
302 QString text; 318 QString text;
303 if (QTextDrag::decode(e,text)) { 319 if (Q3TextDrag::decode(e,text)) {
304 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); 320 //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) );
305 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); 321 KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) ));
306 qDebug("Dropped : " + text); 322 qDebug("Dropped : " + text);
@@ -323,14 +339,14 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e)
323} 339}
324void KOTodoListView::wheelEvent (QWheelEvent *e) 340void KOTodoListView::wheelEvent (QWheelEvent *e)
325{ 341{
326 QListView::wheelEvent (e); 342 Q3ListView::wheelEvent (e);
327} 343}
328 344
329void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) 345void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
330{ 346{
331 347
332 QPoint p(contentsToViewport(e->pos())); 348 QPoint p(contentsToViewport(e->pos()));
333 QListViewItem *i = itemAt(p); 349 Q3ListViewItem *i = itemAt(p);
334 bool rootClicked = true; 350 bool rootClicked = true;
335 if (i) { 351 if (i) {
336 // if the user clicked into the root decoration of the item, don't 352 // if the user clicked into the root decoration of the item, don't
@@ -348,7 +364,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
348 } 364 }
349#ifndef KORG_NODND 365#ifndef KORG_NODND
350 mMousePressed = false; 366 mMousePressed = false;
351 if (! rootClicked && !( e->button() == RightButton) ) { 367 if (! rootClicked && !( e->button() == Qt::RightButton) ) {
352 mPressPos = e->pos(); 368 mPressPos = e->pos();
353 mMousePressed = true; 369 mMousePressed = true;
354 } else { 370 } else {
@@ -358,15 +374,15 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
358 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); 374 //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked);
359#ifndef DESKTOP_VERSION 375#ifndef DESKTOP_VERSION
360 if (!( e->button() == RightButton && rootClicked) ) 376 if (!( e->button() == RightButton && rootClicked) )
361 QListView::contentsMousePressEvent(e); 377 Q3ListView::contentsMousePressEvent(e);
362#else 378#else
363 QListView::contentsMousePressEvent(e); 379 Q3ListView::contentsMousePressEvent(e);
364#endif 380#endif
365} 381}
366void KOTodoListView::paintEvent(QPaintEvent* e) 382void KOTodoListView::paintEvent(QPaintEvent* e)
367{ 383{
368 emit paintNeeded(); 384 emit paintNeeded();
369 QListView::paintEvent( e); 385 Q3ListView::paintEvent( e);
370} 386}
371void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) 387void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
372{ 388{
@@ -376,7 +392,7 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
376 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > 392 if (mMousePressed && (mPressPos - e->pos()).manhattanLength() >
377 QApplication::startDragDistance()*3) { 393 QApplication::startDragDistance()*3) {
378 mMousePressed = false; 394 mMousePressed = false;
379 QListViewItem *item = itemAt(contentsToViewport(mPressPos)); 395 Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos));
380 if (item) { 396 if (item) {
381 DndFactory factory( mCalendar ); 397 DndFactory factory( mCalendar );
382 ICalDrag *vd = factory.createDrag( 398 ICalDrag *vd = factory.createDrag(
@@ -422,13 +438,13 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
422 } 438 }
423 if (! e->isAutoRepeat() ) 439 if (! e->isAutoRepeat() )
424 mFlagKeyPressed = true; 440 mFlagKeyPressed = true;
425 QListViewItem* cn; 441 Q3ListViewItem* cn;
426 if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { 442 if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") {
427 cn = currentItem(); 443 cn = currentItem();
428 if ( cn ) { 444 if ( cn ) {
429 KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); 445 KOTodoViewItem* ci = (KOTodoViewItem*)( cn );
430 if ( ci ){ 446 if ( ci ){
431 if ( e->state() == ShiftButton ) 447 if ( e->state() == Qt::ShiftButton )
432 ci->setOn( false ); 448 ci->setOn( false );
433 else 449 else
434 ci->setOn( true ); 450 ci->setOn( true );
@@ -449,12 +465,12 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
449 switch ( e->key() ) { 465 switch ( e->key() ) {
450 case Qt::Key_Down: 466 case Qt::Key_Down:
451 case Qt::Key_Up: 467 case Qt::Key_Up:
452 QListView::keyPressEvent ( e ); 468 Q3ListView::keyPressEvent ( e );
453 e->accept(); 469 e->accept();
454 break; 470 break;
455 case Qt::Key_Left: 471 case Qt::Key_Left:
456 case Qt::Key_Right: 472 case Qt::Key_Right:
457 QListView::keyPressEvent ( e ); 473 Q3ListView::keyPressEvent ( e );
458 e->accept(); 474 e->accept();
459 return; 475 return;
460 break; 476 break;
@@ -468,7 +484,7 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e )
468} 484}
469void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) 485void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e)
470{ 486{
471 QListView::contentsMouseReleaseEvent(e); 487 Q3ListView::contentsMouseReleaseEvent(e);
472 mMousePressed = false; 488 mMousePressed = false;
473} 489}
474 490
@@ -478,7 +494,7 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e)
478 494
479 QPoint vp = contentsToViewport(e->pos()); 495 QPoint vp = contentsToViewport(e->pos());
480 496
481 QListViewItem *item = itemAt(vp); 497 Q3ListViewItem *item = itemAt(vp);
482 498
483 emit double_Clicked(item); 499 emit double_Clicked(item);
484 if (!item) return; 500 if (!item) return;
@@ -492,7 +508,7 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) :
492 QLineEdit(parent) 508 QLineEdit(parent)
493{ 509{
494 setText(i18n("Click to add new Todo")); 510 setText(i18n("Click to add new Todo"));
495 setFocusPolicy ( QWidget::ClickFocus ); 511 setFocusPolicy ( Qt::ClickFocus );
496} 512}
497 513
498void KOQuickTodo::focusInEvent(QFocusEvent *ev) 514void KOQuickTodo::focusInEvent(QFocusEvent *ev)
@@ -523,14 +539,14 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
523 mPendingUpdateBeforeRepaint = false; 539 mPendingUpdateBeforeRepaint = false;
524 isFlatDisplay = false; 540 isFlatDisplay = false;
525 mNavigator = 0; 541 mNavigator = 0;
526 QBoxLayout *topLayout = new QVBoxLayout(this); 542 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
527 mName = QString ( name ); 543 mName = QString ( name );
528 mBlockUpdate = false; 544 mBlockUpdate = false;
529 mQuickBar = new QWidget( this ); 545 mQuickBar = new QWidget( this );
530 topLayout->addWidget(mQuickBar); 546 topLayout->addWidget(mQuickBar);
531 547
532 mQuickAdd = new KOQuickTodo(mQuickBar); 548 mQuickAdd = new KOQuickTodo(mQuickBar);
533 QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); 549 Q3BoxLayout *quickLayout = new Q3HBoxLayout(mQuickBar);
534 quickLayout->addWidget( mQuickAdd ); 550 quickLayout->addWidget( mQuickAdd );
535 mNewSubBut = new QPushButton( "sub",mQuickBar ); 551 mNewSubBut = new QPushButton( "sub",mQuickBar );
536 QPushButton * s_done = new QPushButton( "D",mQuickBar ); 552 QPushButton * s_done = new QPushButton( "D",mQuickBar );
@@ -568,19 +584,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
568 s_run->setFixedHeight(fixhei ); 584 s_run->setFixedHeight(fixhei );
569 mNewSubBut->setFixedHeight(fixhei ); 585 mNewSubBut->setFixedHeight(fixhei );
570 586
571 flat->setFocusPolicy( NoFocus ); 587 flat->setFocusPolicy( Qt::NoFocus );
572 s_done->setFocusPolicy( NoFocus ); 588 s_done->setFocusPolicy( Qt::NoFocus );
573 allopen->setFocusPolicy( NoFocus ); 589 allopen->setFocusPolicy( Qt::NoFocus );
574 allclose->setFocusPolicy( NoFocus ); 590 allclose->setFocusPolicy( Qt::NoFocus );
575 s_run->setFocusPolicy( NoFocus ); 591 s_run->setFocusPolicy( Qt::NoFocus );
576 mNewSubBut->setFocusPolicy( NoFocus ); 592 mNewSubBut->setFocusPolicy( Qt::NoFocus );
577 593
578 QWhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); 594 Q3WhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) );
579 QWhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); 595 Q3WhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) );
580 QWhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); 596 Q3WhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) );
581 QWhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); 597 Q3WhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) );
582 QWhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); 598 Q3WhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) );
583 QWhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); 599 Q3WhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) );
584 600
585 quickLayout->addWidget( mNewSubBut ); 601 quickLayout->addWidget( mNewSubBut );
586 quickLayout->addWidget( s_done ); 602 quickLayout->addWidget( s_done );
@@ -601,19 +617,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
601 617
602 mTodoListView->addColumn(i18n("Todo")); 618 mTodoListView->addColumn(i18n("Todo"));
603 mTodoListView->addColumn(i18n("Prio")); 619 mTodoListView->addColumn(i18n("Prio"));
604 mTodoListView->setColumnAlignment(1,AlignHCenter); 620 mTodoListView->setColumnAlignment(1,Qt::AlignHCenter);
605 mTodoListView->addColumn(i18n("Complete")); 621 mTodoListView->addColumn(i18n("Complete"));
606 mTodoListView->setColumnAlignment(2,AlignCenter); 622 mTodoListView->setColumnAlignment(2,Qt::AlignCenter);
607 623
608 mTodoListView->addColumn(i18n("Due Date")); 624 mTodoListView->addColumn(i18n("Due Date"));
609 mTodoListView->setColumnAlignment(3,AlignLeft); 625 mTodoListView->setColumnAlignment(3,Qt::AlignLeft);
610 mTodoListView->addColumn(i18n("Due Time")); 626 mTodoListView->addColumn(i18n("Due Time"));
611 mTodoListView->setColumnAlignment(4,AlignHCenter); 627 mTodoListView->setColumnAlignment(4,Qt::AlignHCenter);
612 628
613 mTodoListView->addColumn(i18n("Start Date")); 629 mTodoListView->addColumn(i18n("Start Date"));
614 mTodoListView->setColumnAlignment(5,AlignLeft); 630 mTodoListView->setColumnAlignment(5,Qt::AlignLeft);
615 mTodoListView->addColumn(i18n("Start Time")); 631 mTodoListView->addColumn(i18n("Start Time"));
616 mTodoListView->setColumnAlignment(6,AlignHCenter); 632 mTodoListView->setColumnAlignment(6,Qt::AlignHCenter);
617 633
618 //mTodoListView->addColumn(i18n("Cancelled")); 634 //mTodoListView->addColumn(i18n("Cancelled"));
619 mTodoListView->addColumn(i18n("Categories")); 635 mTodoListView->addColumn(i18n("Categories"));
@@ -623,7 +639,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
623 mTodoListView->addColumn(i18n("Last Modified Sub")); 639 mTodoListView->addColumn(i18n("Last Modified Sub"));
624#if 0 640#if 0
625 mTodoListView->addColumn(i18n("Sort Id")); 641 mTodoListView->addColumn(i18n("Sort Id"));
626 mTodoListView->setColumnAlignment(4,AlignHCenter); 642 mTodoListView->setColumnAlignment(4,Qt::AlignHCenter);
627#endif 643#endif
628 644
629 mTodoListView->setMinimumHeight( 60 ); 645 mTodoListView->setMinimumHeight( 60 );
@@ -632,19 +648,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
632 mTodoListView->setColumnWidth( 0, 120 ); 648 mTodoListView->setColumnWidth( 0, 120 );
633 int iii = 0; 649 int iii = 0;
634 for ( iii = 0; iii< 12 ; ++iii ) 650 for ( iii = 0; iii< 12 ; ++iii )
635 mTodoListView->setColumnWidthMode( iii, QListView::Manual ); 651 mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual );
636 652
637 653
638 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); 654 mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this);
639 655
640 mPriorityPopupMenu = new QPopupMenu(this); 656 mPriorityPopupMenu = new Q3PopupMenu(this);
641 for (int i = 1; i <= 5; i++) { 657 for (int i = 1; i <= 5; i++) {
642 QString label = QString ("%1").arg (i); 658 QString label = QString ("%1").arg (i);
643 mPriority[mPriorityPopupMenu->insertItem (label)] = i; 659 mPriority[mPriorityPopupMenu->insertItem (label)] = i;
644 } 660 }
645 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); 661 connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
646 662
647 mPercentageCompletedPopupMenu = new QPopupMenu(this); 663 mPercentageCompletedPopupMenu = new Q3PopupMenu(this);
648 for (int i = 0; i <= 100; i+=20) { 664 for (int i = 0; i <= 100; i+=20) {
649 QString label = QString ("%1 %").arg (i); 665 QString label = QString ("%1 %").arg (i);
650 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; 666 mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
@@ -652,12 +668,12 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
652 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); 668 connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
653 669
654 670
655 mCategoryPopupMenu = new QPopupMenu (this); 671 mCategoryPopupMenu = new Q3PopupMenu (this);
656 mCategoryPopupMenu->setCheckable (true); 672 mCategoryPopupMenu->setCheckable (true);
657 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); 673 connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int)));
658 connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); 674 connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ()));
659 675
660 mCalPopupMenu = new QPopupMenu (this); 676 mCalPopupMenu = new Q3PopupMenu (this);
661 mCalPopupMenu->setCheckable (true); 677 mCalPopupMenu->setCheckable (true);
662 connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); 678 connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int)));
663 connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); 679 connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ()));
@@ -665,7 +681,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
665 681
666 682
667 683
668 mItemPopupMenu = new QPopupMenu(this); 684 mItemPopupMenu = new Q3PopupMenu(this);
669 mItemPopupMenu->insertItem(i18n("Show"), this, 685 mItemPopupMenu->insertItem(i18n("Show"), this,
670 SLOT (showTodo())); 686 SLOT (showTodo()));
671 mItemPopupMenu->insertItem(i18n("Edit..."), this, 687 mItemPopupMenu->insertItem(i18n("Edit..."), this,
@@ -710,7 +726,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
710 this, SLOT( toggleRunning() ),0, 35 ); 726 this, SLOT( toggleRunning() ),0, 35 );
711 727
712#endif 728#endif
713 mPopupMenu = new QPopupMenu(this); 729 mPopupMenu = new Q3PopupMenu(this);
714 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, 730 mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this,
715 SLOT (newTodo()),0,1); 731 SLOT (newTodo()),0,1);
716 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), 732 mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."),
@@ -746,38 +762,38 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
746 762
747 763
748 // Double clicking conflicts with opening/closing the subtree 764 // Double clicking conflicts with opening/closing the subtree
749 connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), 765 connect( mTodoListView, SIGNAL( doubleClicked( Q3ListViewItem *) ),
750 SLOT( editItem( QListViewItem *) ) ); 766 SLOT( editItem( Q3ListViewItem *) ) );
751 /* 767 /*
752 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, 768 connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *,
753 const QPoint &,int ) ), 769 const QPoint &,int ) ),
754 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 770 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) );
755 */ 771 */
756 connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, 772 connect( mTodoListView, SIGNAL( contextRequest ( Q3ListViewItem *,
757 const QPoint &,int ) ), 773 const QPoint &,int ) ),
758 SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); 774 SLOT( popupMenu( Q3ListViewItem *, const QPoint & ,int) ) );
759 connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), 775 connect( mTodoListView, SIGNAL( clicked( Q3ListViewItem * ) ),
760 SLOT( itemClicked( QListViewItem * ) ) ); 776 SLOT( itemClicked( Q3ListViewItem * ) ) );
761 connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), 777 connect( mTodoListView, SIGNAL( double_Clicked( Q3ListViewItem * ) ),
762 SLOT( itemDoubleClicked( QListViewItem * ) ) ); 778 SLOT( itemDoubleClicked( Q3ListViewItem * ) ) );
763 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 779 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
764 SLOT( updateView() ) ); 780 SLOT( updateView() ) );
765 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 781 connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ),
766 SLOT( todoModified(Todo *, int) ) ); 782 SLOT( todoModified(Todo *, int) ) );
767 connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), 783 connect( mTodoListView, SIGNAL( expanded( Q3ListViewItem * ) ),
768 SLOT( itemStateChanged( QListViewItem * ) ) ); 784 SLOT( itemStateChanged( Q3ListViewItem * ) ) );
769 connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), 785 connect( mTodoListView, SIGNAL( collapsed( Q3ListViewItem * ) ),
770 SLOT( itemStateChanged( QListViewItem * ) ) ); 786 SLOT( itemStateChanged( Q3ListViewItem * ) ) );
771 connect( mTodoListView, SIGNAL( paintNeeded() ), 787 connect( mTodoListView, SIGNAL( paintNeeded() ),
772 SLOT( paintNeeded()) ); 788 SLOT( paintNeeded()) );
773 789
774#if 0 790#if 0
775 connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), 791 connect(mTodoListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
776 SLOT(selectionChanged(QListViewItem *))); 792 SLOT(selectionChanged(Q3ListViewItem *)));
777 connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), 793 connect(mTodoListView,SIGNAL(clicked(Q3ListViewItem *)),
778 SLOT(selectionChanged(QListViewItem *))); 794 SLOT(selectionChanged(Q3ListViewItem *)));
779 connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), 795 connect(mTodoListView,SIGNAL(pressed(Q3ListViewItem *)),
780 SLOT(selectionChanged(QListViewItem *))); 796 SLOT(selectionChanged(Q3ListViewItem *)));
781#endif 797#endif
782 798
783 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); 799 connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) ));
@@ -881,7 +897,7 @@ void KOTodoView::updateView()
881 mTodoListView->setFont( fo ); 897 mTodoListView->setFont( fo );
882 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); 898 // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
883 //mTodoListView->header()->setMaximumHeight(fm.height()); 899 //mTodoListView->header()->setMaximumHeight(fm.height());
884 QPtrList<Todo> todoList = calendar()->todos(); 900 Q3PtrList<Todo> todoList = calendar()->todos();
885 901
886/* 902/*
887 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; 903 kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
@@ -1044,7 +1060,7 @@ bool KOTodoView::checkTodo( Todo * todo )
1044 return true; 1060 return true;
1045} 1061}
1046 1062
1047void KOTodoView::restoreItemState( QListViewItem *item ) 1063void KOTodoView::restoreItemState( Q3ListViewItem *item )
1048{ 1064{
1049 pendingSubtodo = 0; 1065 pendingSubtodo = 0;
1050 while( item ) { 1066 while( item ) {
@@ -1096,9 +1112,9 @@ void KOTodoView::updateConfig()
1096 mTodoListView->repaintContents(); 1112 mTodoListView->repaintContents();
1097} 1113}
1098 1114
1099QPtrList<Incidence> KOTodoView::selectedIncidences() 1115Q3PtrList<Incidence> KOTodoView::selectedIncidences()
1100{ 1116{
1101 QPtrList<Incidence> selected; 1117 Q3PtrList<Incidence> selected;
1102 1118
1103 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 1119 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
1104// if (!item) item = mActiveItem; 1120// if (!item) item = mActiveItem;
@@ -1107,9 +1123,9 @@ QPtrList<Incidence> KOTodoView::selectedIncidences()
1107 return selected; 1123 return selected;
1108} 1124}
1109 1125
1110QPtrList<Todo> KOTodoView::selectedTodos() 1126Q3PtrList<Todo> KOTodoView::selectedTodos()
1111{ 1127{
1112 QPtrList<Todo> selected; 1128 Q3PtrList<Todo> selected;
1113 1129
1114 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); 1130 KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem());
1115// if (!item) item = mActiveItem; 1131// if (!item) item = mActiveItem;
@@ -1127,7 +1143,7 @@ void KOTodoView::showDates(const QDate &, const QDate &)
1127{ 1143{
1128} 1144}
1129 1145
1130void KOTodoView::showEvents(QPtrList<Event>) 1146void KOTodoView::showEvents(Q3PtrList<Event>)
1131{ 1147{
1132 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; 1148 kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl;
1133} 1149}
@@ -1140,19 +1156,19 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1140#endif 1156#endif
1141} 1157}
1142 1158
1143void KOTodoView::editItem(QListViewItem *item ) 1159void KOTodoView::editItem(Q3ListViewItem *item )
1144{ 1160{
1145 if ( item ) 1161 if ( item )
1146 emit editTodoSignal(((KOTodoViewItem *)item)->todo()); 1162 emit editTodoSignal(((KOTodoViewItem *)item)->todo());
1147} 1163}
1148 1164
1149void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) 1165void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int)
1150{ 1166{
1151 if ( item ) 1167 if ( item )
1152 emit showTodoSignal(((KOTodoViewItem *)item)->todo()); 1168 emit showTodoSignal(((KOTodoViewItem *)item)->todo());
1153} 1169}
1154 1170
1155void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) 1171void KOTodoView::popupMenu(Q3ListViewItem *item,const QPoint &p,int column)
1156{ 1172{
1157 pendingSubtodo = 0; 1173 pendingSubtodo = 0;
1158 mActiveItem = (KOTodoViewItem *)item; 1174 mActiveItem = (KOTodoViewItem *)item;
@@ -1361,7 +1377,7 @@ void KOTodoView::toggleRunningItemQuick()
1361 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!")); 1377 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
1362 } 1378 }
1363} 1379}
1364void KOTodoView::itemDoubleClicked(QListViewItem *item) 1380void KOTodoView::itemDoubleClicked(Q3ListViewItem *item)
1365{ 1381{
1366 if ( pendingSubtodo != 0 ) { 1382 if ( pendingSubtodo != 0 ) {
1367 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1383 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
@@ -1428,7 +1444,7 @@ void KOTodoView::toggleRunningItem()
1428 } 1444 }
1429} 1445}
1430 1446
1431void KOTodoView::itemClicked(QListViewItem *item) 1447void KOTodoView::itemClicked(Q3ListViewItem *item)
1432{ 1448{
1433 //qDebug("KOTodoView::itemClicked %d", item); 1449 //qDebug("KOTodoView::itemClicked %d", item);
1434 if (!item) { 1450 if (!item) {
@@ -1441,7 +1457,7 @@ void KOTodoView::itemClicked(QListViewItem *item)
1441 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1457 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1442 if ( pendingSubtodo != 0 ) { 1458 if ( pendingSubtodo != 0 ) {
1443 bool allowReparent = true; 1459 bool allowReparent = true;
1444 QListViewItem *par = item; 1460 Q3ListViewItem *par = item;
1445 while ( par ) { 1461 while ( par ) {
1446 if ( par == pendingSubtodo ) { 1462 if ( par == pendingSubtodo ) {
1447 allowReparent = false; 1463 allowReparent = false;
@@ -1469,7 +1485,7 @@ void KOTodoView::setDocumentId( const QString &id )
1469 mDocPrefs->setDoc( id ); 1485 mDocPrefs->setDoc( id );
1470} 1486}
1471 1487
1472void KOTodoView::itemStateChanged( QListViewItem *item ) 1488void KOTodoView::itemStateChanged( Q3ListViewItem *item )
1473{ 1489{
1474 if (!item) return; 1490 if (!item) return;
1475 1491
@@ -1542,7 +1558,7 @@ void KOTodoView::setAllClose()
1542 setOpen(mTodoListView->firstChild(), false); 1558 setOpen(mTodoListView->firstChild(), false);
1543 resetCurrentItem(); 1559 resetCurrentItem();
1544} 1560}
1545void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) 1561void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI)
1546{ 1562{
1547 1563
1548 while ( item ) { 1564 while ( item ) {
@@ -1563,7 +1579,7 @@ void KOTodoView::displayAllFlat()
1563 clearList (); 1579 clearList ();
1564 mPopupMenu->setItemChecked( 8,true ); 1580 mPopupMenu->setItemChecked( 8,true );
1565 isFlatDisplay = true; 1581 isFlatDisplay = true;
1566 QPtrList<Todo> todoList = calendar()->todos(); 1582 Q3PtrList<Todo> todoList = calendar()->todos();
1567 Todo *todo; 1583 Todo *todo;
1568 for(todo = todoList.first(); todo; todo = todoList.next()) { 1584 for(todo = todoList.first(); todo; todo = todoList.next()) {
1569 if ( checkTodo( todo ) ) { 1585 if ( checkTodo( todo ) ) {
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 0cbc087..a9e7f30 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -26,15 +26,25 @@
26#include <qfont.h> 26#include <qfont.h>
27#include <qfontmetrics.h> 27#include <qfontmetrics.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qptrlist.h> 29#include <q3ptrlist.h>
30#include <qstrlist.h> 30#include <q3strlist.h>
31#include <qlistbox.h> 31#include <q3listbox.h>
32#include <qpopupmenu.h> 32#include <q3popupmenu.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qmap.h> 34#include <qmap.h>
35#include <qdialog.h> 35#include <qdialog.h>
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qlistview.h> 37#include <q3listview.h>
38//Added by qt3to4:
39#include <QDragMoveEvent>
40#include <QDropEvent>
41#include <QDragLeaveEvent>
42#include <QWheelEvent>
43#include <QPaintEvent>
44#include <QFocusEvent>
45#include <QMouseEvent>
46#include <QKeyEvent>
47#include <QDragEnterEvent>
38#include <klistview.h> 48#include <klistview.h>
39 49
40#include <libkcal/calendar.h> 50#include <libkcal/calendar.h>
@@ -101,7 +111,7 @@ class KOTodoListView : public KListView
101 signals: 111 signals:
102 void paintNeeded(); 112 void paintNeeded();
103 void todoDropped(Todo *, int); 113 void todoDropped(Todo *, int);
104 void double_Clicked(QListViewItem *item); 114 void double_Clicked(Q3ListViewItem *item);
105 void reparentTodoSignal( Todo *,Todo * ); 115 void reparentTodoSignal( Todo *,Todo * );
106 void unparentTodoSignal(Todo *); 116 void unparentTodoSignal(Todo *);
107 void deleteTodo( Todo * ); 117 void deleteTodo( Todo * );
@@ -124,7 +134,7 @@ class KOTodoListView : public KListView
124 Calendar *mCalendar; 134 Calendar *mCalendar;
125 QPoint mPressPos; 135 QPoint mPressPos;
126 bool mMousePressed; 136 bool mMousePressed;
127 QListViewItem *mOldCurrent; 137 Q3ListViewItem *mOldCurrent;
128 bool mFlagKeyPressed; 138 bool mFlagKeyPressed;
129 void keyPressEvent ( QKeyEvent * ) ; 139 void keyPressEvent ( QKeyEvent * ) ;
130 void keyReleaseEvent ( QKeyEvent * ) ; 140 void keyReleaseEvent ( QKeyEvent * ) ;
@@ -157,8 +167,8 @@ class KOTodoView : public KOrg::BaseView
157 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); 167 KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 );
158 ~KOTodoView(); 168 ~KOTodoView();
159 169
160 QPtrList<Incidence> selectedIncidences(); 170 Q3PtrList<Incidence> selectedIncidences();
161 QPtrList<Todo> selectedTodos(); 171 Q3PtrList<Todo> selectedTodos();
162 172
163 DateList selectedDates() 173 DateList selectedDates()
164 {DateList q; 174 {DateList q;
@@ -184,14 +194,14 @@ class KOTodoView : public KOrg::BaseView
184 void changeEventDisplay(Event *, int); 194 void changeEventDisplay(Event *, int);
185 195
186 void showDates(const QDate &start, const QDate &end); 196 void showDates(const QDate &start, const QDate &end);
187 void showEvents(QPtrList<Event> eventList); 197 void showEvents(Q3PtrList<Event> eventList);
188 198
189 void clearSelection(); 199 void clearSelection();
190 void jumpToDate (); 200 void jumpToDate ();
191 201
192 void editItem(QListViewItem *item); 202 void editItem(Q3ListViewItem *item);
193 void showItem(QListViewItem *item,const QPoint &,int); 203 void showItem(Q3ListViewItem *item,const QPoint &,int);
194 void popupMenu(QListViewItem *item,const QPoint &,int); 204 void popupMenu(Q3ListViewItem *item,const QPoint &,int);
195 void newTodo(); 205 void newTodo();
196 void newSubTodo(); 206 void newSubTodo();
197 void unparentTodo(); 207 void unparentTodo();
@@ -219,10 +229,10 @@ class KOTodoView : public KOrg::BaseView
219 void toggleQuickTodo(); 229 void toggleQuickTodo();
220 void updateTodo( Todo *, int ); 230 void updateTodo( Todo *, int );
221 231
222 void itemClicked(QListViewItem *); 232 void itemClicked(Q3ListViewItem *);
223 void itemStateChanged(QListViewItem *); 233 void itemStateChanged(Q3ListViewItem *);
224 void modified(bool); 234 void modified(bool);
225 void itemDoubleClicked(QListViewItem *item); 235 void itemDoubleClicked(Q3ListViewItem *item);
226 void resetFocusToList(); 236 void resetFocusToList();
227 void fillCategories (); 237 void fillCategories ();
228 void fillCal (); 238 void fillCal ();
@@ -273,18 +283,18 @@ class KOTodoView : public KOrg::BaseView
273 bool mPendingUpdateBeforeRepaint; 283 bool mPendingUpdateBeforeRepaint;
274 friend class KOTodoViewItem; 284 friend class KOTodoViewItem;
275 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); 285 QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo);
276 void restoreItemState( QListViewItem * ); 286 void restoreItemState( Q3ListViewItem * );
277 287
278 bool checkTodo( Todo * ); 288 bool checkTodo( Todo * );
279 bool isFlatDisplay; 289 bool isFlatDisplay;
280 void setOpen( QListViewItem*, bool setOpen); 290 void setOpen( Q3ListViewItem*, bool setOpen);
281 KOTodoListView *mTodoListView; 291 KOTodoListView *mTodoListView;
282 QPopupMenu *mItemPopupMenu; 292 Q3PopupMenu *mItemPopupMenu;
283 QPopupMenu *mPopupMenu; 293 Q3PopupMenu *mPopupMenu;
284 QPopupMenu *mPriorityPopupMenu; 294 Q3PopupMenu *mPriorityPopupMenu;
285 QPopupMenu *mPercentageCompletedPopupMenu; 295 Q3PopupMenu *mPercentageCompletedPopupMenu;
286 QPopupMenu *mCategoryPopupMenu; 296 Q3PopupMenu *mCategoryPopupMenu;
287 QPopupMenu *mCalPopupMenu; 297 Q3PopupMenu *mCalPopupMenu;
288 298
289 QMap<int, int> mPercentage; 299 QMap<int, int> mPercentage;
290 QMap<int, int> mPriority; 300 QMap<int, int> mPriority;
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 519bb16..c21816d 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -19,7 +19,11 @@
19 19
20#include <klocale.h> 20#include <klocale.h>
21#include <kdebug.h> 21#include <kdebug.h>
22#include <qapp.h> 22#include <qapplication.h>
23#include <QDesktopWidget>
24//Added by qt3to4:
25#include <Q3PointArray>
26#include <QPixmap>
23#include <kglobal.h> 27#include <kglobal.h>
24 28
25#include <kiconloader.h> 29#include <kiconloader.h>
@@ -27,14 +31,14 @@
27#include "kotodoview.h" 31#include "kotodoview.h"
28#include "koprefs.h" 32#include "koprefs.h"
29 33
30KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo) 34KOTodoViewItem::KOTodoViewItem( Q3ListView *parent, Todo *todo, KOTodoView *kotodo)
31 : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 35 : Q3CheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
32{ 36{
33 construct(); 37 construct();
34} 38}
35 39
36KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo ) 40KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
37 : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) 41 : Q3CheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
38{ 42{
39 construct(); 43 construct();
40} 44}
@@ -80,7 +84,7 @@ void KOTodoViewItem::setSortKey(int column,const QString &key)
80void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, 84void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
81 int y,int h) 85 int y,int h)
82{ 86{
83 QListViewItem::paintBranches(p,cg,w,y,h); 87 Q3ListViewItem::paintBranches(p,cg,w,y,h);
84} 88}
85#else 89#else
86#endif 90#endif
@@ -316,7 +320,7 @@ void KOTodoViewItem::stateChange(bool state)
316 else setSortKey(2,QString::number(99)); 320 else setSortKey(2,QString::number(99));
317 } 321 }
318 if ( state ) { 322 if ( state ) {
319 QListViewItem * myChild = firstChild(); 323 Q3ListViewItem * myChild = firstChild();
320 KOTodoViewItem *item; 324 KOTodoViewItem *item;
321 while( myChild ) { 325 while( myChild ) {
322 //qDebug("stateCH "); 326 //qDebug("stateCH ");
@@ -325,7 +329,7 @@ void KOTodoViewItem::stateChange(bool state)
325 myChild = myChild->nextSibling(); 329 myChild = myChild->nextSibling();
326 } 330 }
327 } else { 331 } else {
328 QListViewItem * myChild = parent(); 332 Q3ListViewItem * myChild = parent();
329 if ( myChild ) 333 if ( myChild )
330 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state); 334 (static_cast<KOTodoViewItem*>(myChild))->stateChange(state);
331 } 335 }
@@ -383,12 +387,12 @@ bool KOTodoViewItem::isAlternate()
383 { 387 {
384 KOTodoViewItem *item; 388 KOTodoViewItem *item;
385 bool previous = true; 389 bool previous = true;
386 if (QListViewItem::parent()) 390 if (Q3ListViewItem::parent())
387 { 391 {
388 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()); 392 item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent());
389 if (item) 393 if (item)
390 previous = item->m_odd; 394 previous = item->m_odd;
391 item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); 395 item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent()->firstChild());
392 } 396 }
393 else 397 else
394 { 398 {
@@ -476,13 +480,13 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
476 // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling 480 // p->setBrush( KOPrefs::instance()->mHighlightColorKGlobalSettings::baseColor() ); //filling
477 QColor fc = KOPrefs::instance()->mHighlightColor; 481 QColor fc = KOPrefs::instance()->mHighlightColor;
478 if ( mTodo->percentComplete() == 100 ) 482 if ( mTodo->percentComplete() == 100 )
479 fc = darkGreen; 483 fc = Qt::darkGreen;
480 p->drawRect( 2, 2, width-4, height()-4); 484 p->drawRect( 2, 2, width-4, height()-4);
481 p->fillRect( 3, 3, progress, height()-6, 485 p->fillRect( 3, 3, progress, height()-6,
482 fc ); 486 fc );
483 p->restore(); 487 p->restore();
484 } else { 488 } else {
485 QCheckListItem::paintCell(p, _cg, column, width, alignment); 489 Q3CheckListItem::paintCell(p, _cg, column, width, alignment);
486 } 490 }
487 return; 491 return;
488 } 492 }
@@ -494,12 +498,12 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
494 498
495 p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); 499 p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) );
496 500
497 QListView *lv = listView(); 501 Q3ListView *lv = listView();
498 if ( !lv ) 502 if ( !lv )
499 return; 503 return;
500 int marg = 2;//lv->itemMargin(); 504 int marg = 2;//lv->itemMargin();
501 int r = 0; 505 int r = 0;
502 QCheckListItem::Type myType = QCheckListItem::CheckBox; 506 Q3CheckListItem::Type myType = Q3CheckListItem::CheckBox;
503 int BoxSize = 20; 507 int BoxSize = 20;
504 int boxOffset = 2; 508 int boxOffset = 2;
505 int xOffset = 2; 509 int xOffset = 2;
@@ -522,7 +526,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
522 if ( !pixmap( 0 ) ) 526 if ( !pixmap( 0 ) )
523 r += BoxSize + 4; 527 r += BoxSize + 4;
524 } else { 528 } else {
525 ASSERT( lv ); //### 529 Q_ASSERT( lv ); //###
526 //QFontMetrics fm( lv->font() ); 530 //QFontMetrics fm( lv->font() );
527 //int d = fm.height(); 531 //int d = fm.height();
528 int x = 0; 532 int x = 0;
@@ -539,7 +543,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
539 x++; 543 x++;
540 y++; 544 y++;
541 if ( isOn() ) { 545 if ( isOn() ) {
542 QPointArray a( 7*2 ); 546 Q3PointArray a( 7*2 );
543 int i, xx, yy; 547 int i, xx, yy;
544 xx = x+xOffset+marg+(boxOffset/2); 548 xx = x+xOffset+marg+(boxOffset/2);
545 yy = y+5+boxOffset; 549 yy = y+5+boxOffset;
@@ -555,7 +559,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
555 a.setPoint( 2*i+1, xx, yy+2 ); 559 a.setPoint( 2*i+1, xx, yy+2 );
556 xx++; yy--; 560 xx++; yy--;
557 } 561 }
558 p->setPen( darkGreen ); 562 p->setPen( Qt::darkGreen );
559 p->drawLineSegments( a ); 563 p->drawLineSegments( a );
560 } 564 }
561 //////////////////////// 565 ////////////////////////
@@ -565,9 +569,9 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i
565 569
566 p->translate( r, 0 ); 570 p->translate( r, 0 );
567 p->setPen( QPen( _cg.text() ) ); 571 p->setPen( QPen( _cg.text() ) );
568 QListViewItem::paintCell( p, _cg, column, width - r, align ); 572 Q3ListViewItem::paintCell( p, _cg, column, width - r, align );
569 if ( mTodo->cancelled () ) { 573 if ( mTodo->cancelled () ) {
570 p->setPen( black ); 574 p->setPen( Qt::black );
571 QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() ); 575 QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() );
572 int wid = br.width() +lineStart; 576 int wid = br.width() +lineStart;
573 if ( wid > width-3 ) 577 if ( wid > width-3 )
diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h
index bd024c8..62a635c 100644
--- a/korganizer/kotodoviewitem.h
+++ b/korganizer/kotodoviewitem.h
@@ -22,13 +22,13 @@
22#include <qfont.h> 22#include <qfont.h>
23#include <qfontmetrics.h> 23#include <qfontmetrics.h>
24#include <qlineedit.h> 24#include <qlineedit.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <qstrlist.h> 26#include <q3strlist.h>
27#include <qlistbox.h> 27#include <q3listbox.h>
28#include <qpopupmenu.h> 28#include <q3popupmenu.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qmap.h> 30#include <qmap.h>
31#include <qlistview.h> 31#include <q3listview.h>
32#include <qpainter.h> 32#include <qpainter.h>
33 33
34#include <libkcal/calendar.h> 34#include <libkcal/calendar.h>
@@ -45,7 +45,7 @@ class KOTodoView;
45 @author Cornelius Schumacher <schumacher@kde.org> 45 @author Cornelius Schumacher <schumacher@kde.org>
46 @see KOTodoView 46 @see KOTodoView
47*/ 47*/
48class KOTodoViewItem : public QCheckListItem 48class KOTodoViewItem : public Q3CheckListItem
49{ 49{
50 public: 50 public:
51 /** 51 /**
@@ -54,7 +54,7 @@ class KOTodoViewItem : public QCheckListItem
54 @param parent is the list view to which this item belongs. 54 @param parent is the list view to which this item belongs.
55 @param ev is the event to have the item display information for. 55 @param ev is the event to have the item display information for.
56 */ 56 */
57 KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo); 57 KOTodoViewItem(Q3ListView *parent, Todo *todo, KOTodoView *kotodo);
58 KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo); 58 KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo);
59 //~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );} 59 //~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );}
60 60
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 4057ae0..07c4295 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -23,7 +23,9 @@
23 without including the source code for Qt in the source distribution. 23 without including the source code for Qt in the source distribution.
24*/ 24*/
25 25
26#include <qwidgetstack.h> 26#include <q3widgetstack.h>
27//Added by qt3to4:
28#include <Q3PtrList>
27 29
28#include <kconfig.h> 30#include <kconfig.h>
29#include <kglobal.h> 31#include <kglobal.h>
@@ -457,8 +459,8 @@ void KOViewManager::showListView()
457 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 459 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
458 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 460 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
459 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 461 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
460 connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), 462 connect( mListView, SIGNAL( beamIncidenceList( Q3PtrList<Incidence> ) ),
461 mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); 463 mMainView, SLOT ( beamIncidenceList( Q3PtrList<Incidence> ) ) );
462 } 464 }
463 // bool temp = mFlagShowNextxDays; 465 // bool temp = mFlagShowNextxDays;
464 //globalFlagBlockPainting = true; 466 //globalFlagBlockPainting = true;
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index f88403c..bfe930f 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -18,14 +18,20 @@
18*/ 18*/
19 19
20#include <qlayout.h> 20#include <qlayout.h>
21#include <qtextbrowser.h> 21#include <q3textbrowser.h>
22#include <qtextcodec.h> 22#include <qtextcodec.h>
23#include <qfileinfo.h> 23#include <qfileinfo.h>
24#include <qlabel.h> 24#include <qlabel.h>
25 25
26#include <qapplication.h> 26#include <qapplication.h>
27#include <QDesktopWidget>
27#ifdef DESKTOP_VERSION 28#ifdef DESKTOP_VERSION
28#include <qpaintdevicemetrics.h> 29#include <q3paintdevicemetrics.h>
30//Added by qt3to4:
31#include <Q3PtrList>
32#include <QHideEvent>
33#include <Q3VBoxLayout>
34#include <QShowEvent>
29#endif 35#endif
30#include <kglobal.h> 36#include <kglobal.h>
31#include <klocale.h> 37#include <klocale.h>
@@ -42,7 +48,7 @@
42#include "koprefs.h" 48#include "koprefs.h"
43#include "koeventviewerdialog.h" 49#include "koeventviewerdialog.h"
44#include "koeventviewer.h" 50#include "koeventviewer.h"
45#include <qstylesheet.h> 51#include <q3stylesheet.h>
46#include "kowhatsnextview.h" 52#include "kowhatsnextview.h"
47using namespace KOrg; 53using namespace KOrg;
48 54
@@ -56,7 +62,7 @@ void WhatsNextTextBrowser::setSource(const QString& n)
56 emit showIncidence(n); 62 emit showIncidence(n);
57 return; 63 return;
58 } else { 64 } else {
59 QTextBrowser::setSource(n); 65 Q3TextBrowser::setSource(n);
60 } 66 }
61} 67}
62void WhatsNextTextBrowser::printMe() 68void WhatsNextTextBrowser::printMe()
@@ -72,7 +78,7 @@ void WhatsNextTextBrowser::printMe()
72 return; 78 return;
73 QPainter p; 79 QPainter p;
74 p.begin ( &printer ); 80 p.begin ( &printer );
75 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 81 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
76 float dx, dy; 82 float dx, dy;
77 int wid = (m.width() * 9)/10; 83 int wid = (m.width() * 9)/10;
78 dx = (float) wid/(float)contentsWidth (); 84 dx = (float) wid/(float)contentsWidth ();
@@ -103,19 +109,19 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
103 setFont( KOPrefs::instance()->mWhatsNextFont ); 109 setFont( KOPrefs::instance()->mWhatsNextFont );
104 mView = new WhatsNextTextBrowser(this); 110 mView = new WhatsNextTextBrowser(this);
105 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); 111 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &)));
106 QStyleSheet* stsh = mView->styleSheet(); 112 Q3StyleSheet* stsh = mView->styleSheet();
107 QStyleSheetItem * style ; 113 Q3StyleSheetItem * style ;
108 style = stsh->item ("h2" ); 114 style = stsh->item ("h2" );
109 if ( style ) { 115 if ( style ) {
110 style->setMargin(QStyleSheetItem::MarginAll,0); 116 style->setMargin(Q3StyleSheetItem::MarginAll,0);
111 } 117 }
112 style = stsh->item ("h3" ); 118 style = stsh->item ("h3" );
113 if ( style ) { 119 if ( style ) {
114 style->setMargin(QStyleSheetItem::MarginAll,0); 120 style->setMargin(Q3StyleSheetItem::MarginAll,0);
115 } 121 }
116 mEventViewer = 0; 122 mEventViewer = 0;
117 123
118 QBoxLayout *topLayout = new QVBoxLayout(this); 124 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
119 // topLayout->addWidget(mDateLabel); 125 // topLayout->addWidget(mDateLabel);
120 topLayout->addWidget(mView); 126 topLayout->addWidget(mView);
121 mTimer = new QTimer( this ); 127 mTimer = new QTimer( this );
@@ -144,9 +150,9 @@ void KOWhatsNextView::clearList()
144 mTimer->stop(); 150 mTimer->stop();
145 mView->setText(" "); 151 mView->setText(" ");
146} 152}
147QPtrList<Incidence> KOWhatsNextView::selectedIncidences() 153Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences()
148{ 154{
149 QPtrList<Incidence> eventList; 155 Q3PtrList<Incidence> eventList;
150 156
151 return eventList; 157 return eventList;
152} 158}
@@ -219,8 +225,8 @@ void KOWhatsNextView::updateView()
219 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>"; 225 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
220 int iii; 226 int iii;
221 mTodos.clear(); 227 mTodos.clear();
222 QPtrList<Event> events; 228 Q3PtrList<Event> events;
223 QPtrList<Todo> todos = calendar()->todos(); 229 Q3PtrList<Todo> todos = calendar()->todos();
224 Todo * todo; 230 Todo * todo;
225 //mText += "<h2>" + i18n("Events: ") + "</h2>\n"; 231 //mText += "<h2>" + i18n("Events: ") + "</h2>\n";
226 int daysToShow = KOPrefs::instance()->mWhatsNextDays ; 232 int daysToShow = KOPrefs::instance()->mWhatsNextDays ;
@@ -454,7 +460,7 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &)
454 updateView(); 460 updateView();
455} 461}
456 462
457void KOWhatsNextView::showEvents(QPtrList<Event>) 463void KOWhatsNextView::showEvents(Q3PtrList<Event>)
458{ 464{
459} 465}
460 466
@@ -741,7 +747,7 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
741 ind += "-"; 747 ind += "-";
742 mText += "</li>\n"; 748 mText += "</li>\n";
743 } 749 }
744 QPtrList<Incidence> Relations = ev->relations(); 750 Q3PtrList<Incidence> Relations = ev->relations();
745 Incidence *to; 751 Incidence *to;
746 for (to=Relations.first();to;to=Relations.next()) { 752 for (to=Relations.first();to;to=Relations.next()) {
747 if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) 753 if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio )
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 93574ef..49fc448 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -19,22 +19,28 @@
19#ifndef KOWHATSNEXTVIEW_H 19#ifndef KOWHATSNEXTVIEW_H
20#define KOWHATSNEXTVIEW_H 20#define KOWHATSNEXTVIEW_H
21 21
22#include <qtextbrowser.h> 22#include <q3textbrowser.h>
23#include <qtimer.h> 23#include <qtimer.h>
24//Added by qt3to4:
25#include <QShowEvent>
26#include <QHideEvent>
27#include <QLabel>
28#include <Q3ValueList>
29#include <Q3PtrList>
24 30
25#include <korganizer/baseview.h> 31#include <korganizer/baseview.h>
26 32
27class QListView; 33class Q3ListView;
28class QLabel; 34class QLabel;
29 35
30class KOEventViewerDialog; 36class KOEventViewerDialog;
31 37
32#include <qpainter.h> 38#include <qpainter.h>
33#include <qwidget.h> 39#include <qwidget.h>
34class WhatsNextTextBrowser : public QTextBrowser { 40class WhatsNextTextBrowser : public Q3TextBrowser {
35 Q_OBJECT 41 Q_OBJECT
36 public: 42 public:
37 WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}; 43 WhatsNextTextBrowser(QWidget *parent) : Q3TextBrowser(parent) {};
38 44
39 void setSource(const QString &); 45 void setSource(const QString &);
40 void printMe(); 46 void printMe();
@@ -58,7 +64,7 @@ class KOWhatsNextView : public KOrg::BaseView
58 virtual int maxDatesHint(); 64 virtual int maxDatesHint();
59 virtual int currentDateCount(); 65 virtual int currentDateCount();
60 void setEventViewer(KOEventViewerDialog* v ); 66 void setEventViewer(KOEventViewerDialog* v );
61 virtual QPtrList<Incidence> selectedIncidences(); 67 virtual Q3PtrList<Incidence> selectedIncidences();
62 void clearList(); 68 void clearList();
63 DateList selectedDates() 69 DateList selectedDates()
64 {DateList q; 70 {DateList q;
@@ -70,7 +76,7 @@ class KOWhatsNextView : public KOrg::BaseView
70 virtual void updateView(); 76 virtual void updateView();
71 void printMe(); 77 void printMe();
72 virtual void showDates(const QDate &start, const QDate &end); 78 virtual void showDates(const QDate &start, const QDate &end);
73 virtual void showEvents(QPtrList<Event> eventList); 79 virtual void showEvents(Q3PtrList<Event> eventList);
74 void updateConfig(); 80 void updateConfig();
75 void changeEventDisplay(Event *, int); 81 void changeEventDisplay(Event *, int);
76 82
@@ -96,7 +102,7 @@ class KOWhatsNextView : public KOrg::BaseView
96 // QLabel *mDateLabel; 102 // QLabel *mDateLabel;
97 KOEventViewerDialog *mEventViewer; 103 KOEventViewerDialog *mEventViewer;
98 104
99 QValueList<Incidence *> mTodos; 105 Q3ValueList<Incidence *> mTodos;
100}; 106};
101 107
102#endif 108#endif
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index df9b2fc..e2ae4a6 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -21,12 +21,15 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qkeycode.h> 24#include <qnamespace.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qlistbox.h> 28#include <q3listbox.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#include <QDesktopWidget>
31//Added by qt3to4:
32#include <QKeyEvent>
30 33
31#include <kmessagebox.h> 34#include <kmessagebox.h>
32#include <kglobal.h> 35#include <kglobal.h>
@@ -45,7 +48,7 @@
45// Difficult to get all in one... 48// Difficult to get all in one...
46// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help. 49// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
47KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) 50KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
48 : QComboBox(TRUE, parent, name) 51 : Q3ComboBox(TRUE, parent, name)
49{ 52{
50 setInsertionPolicy(NoInsertion); 53 setInsertionPolicy(NoInsertion);
51 mFlagKeyPressed = false; 54 mFlagKeyPressed = false;
@@ -64,12 +67,12 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
64 do { 67 do {
65 insertItem(KGlobal::locale()->formatTime(timeEntry)); 68 insertItem(KGlobal::locale()->formatTime(timeEntry));
66 timeEntry = timeEntry.addSecs(60*15); 69 timeEntry = timeEntry.addSecs(60*15);
67 } while (!timeEntry.isNull()); 70 } while ( !( timeEntry.hour() || timeEntry.minute() ) );
68 // Add end of day. 71 // Add end of day.
69 insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) ); 72 insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) );
70 73
71 updateText(); 74 updateText();
72 setFocusPolicy(QWidget::StrongFocus); 75 setFocusPolicy(Qt::StrongFocus);
73 76
74 connect(this, SIGNAL(activated(int)), this, SLOT(activ(int))); 77 connect(this, SIGNAL(activated(int)), this, SLOT(activ(int)));
75 connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int))); 78 connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int)));
@@ -208,8 +211,8 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
208 mFlagKeyPressed = true; 211 mFlagKeyPressed = true;
209 } 212 }
210 // Tap -> Focus Next Widget 213 // Tap -> Focus Next Widget
211 if ( e->key() == Key_Tab ) { 214 if ( e->key() == Qt::Key_Tab ) {
212 QComboBox::keyPressEvent(e); 215 Q3ComboBox::keyPressEvent(e);
213 return; 216 return;
214 } 217 }
215 218
@@ -220,12 +223,12 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
220 223
221 // Switch for arrows, backspace and escape 224 // Switch for arrows, backspace and escape
222 switch(e->key()) { 225 switch(e->key()) {
223 case Key_Escape: 226 case Qt::Key_Escape:
224 lineEdit()->deselect(); 227 lineEdit()->deselect();
225 case Key_Tab: 228 case Qt::Key_Tab:
226 QComboBox::keyPressEvent(e); 229 Q3ComboBox::keyPressEvent(e);
227 break; 230 break;
228 case Key_Up: 231 case Qt::Key_Up:
229 if ( e->state () == Qt::ControlButton ) { 232 if ( e->state () == Qt::ControlButton ) {
230 addTime(QTime(0,15,0), false ); 233 addTime(QTime(0,15,0), false );
231 lineEdit()->setCursorPosition(3); 234 lineEdit()->setCursorPosition(3);
@@ -267,7 +270,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
267 break; 270 break;
268 } 271 }
269 break; 272 break;
270 case Key_Down: 273 case Qt::Key_Down:
271 if ( e->state () == Qt::ControlButton ) { 274 if ( e->state () == Qt::ControlButton ) {
272 subTime(QTime(0,15,0), false ); 275 subTime(QTime(0,15,0), false );
273 lineEdit()->setCursorPosition(3); 276 lineEdit()->setCursorPosition(3);
@@ -310,7 +313,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
310 } 313 }
311 break; 314 break;
312 // set cursor to correct place 315 // set cursor to correct place
313 case Key_Left: 316 case Qt::Key_Left:
314 if ( cpos == 3 ) 317 if ( cpos == 3 )
315 --cpos; 318 --cpos;
316 if ( cpos > 0) { 319 if ( cpos > 0) {
@@ -321,7 +324,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
321 setSelect ( 0 , 1 ); 324 setSelect ( 0 , 1 );
322 break; 325 break;
323 // set cursor to correct place 326 // set cursor to correct place
324 case Key_Right: 327 case Qt::Key_Right:
325 if ( cpos == 1 ) 328 if ( cpos == 1 )
326 ++cpos; 329 ++cpos;
327 if ( cpos < maxpos ) { 330 if ( cpos < maxpos ) {
@@ -330,19 +333,19 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
330 } 333 }
331 break; 334 break;
332 // rest 335 // rest
333 case Key_Prior: 336 case Qt::Key_Prior:
334 subTime(QTime(1,0,0)); 337 subTime(QTime(1,0,0));
335 break; 338 break;
336 case Key_Next: 339 case Qt::Key_Next:
337 addTime(QTime(1,0,0)); 340 addTime(QTime(1,0,0));
338 break; 341 break;
339 case Key_Backspace: 342 case Qt::Key_Backspace:
340 if ( cpos > 0) { 343 if ( cpos > 0) {
341 if ( cpos == 3 ) 344 if ( cpos == 3 )
342 --cpos; 345 --cpos;
343 if ( cpos > 5) 346 if ( cpos > 5)
344 cpos = 5; 347 cpos = 5;
345 text.at( cpos-1 ) = '0'; 348 text[ cpos-1 ] = '0';
346 lineEdit()->setText( text ); 349 lineEdit()->setText( text );
347 lineEdit()->setCursorPosition(--cpos); 350 lineEdit()->setCursorPosition(--cpos);
348 setSelect ( cpos , 1 ); 351 setSelect ( cpos , 1 );
@@ -352,7 +355,7 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
352 } // switch arrows 355 } // switch arrows
353 356
354 // if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos 357 // if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos
355 if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) { 358 if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Qt::Key_Left ) {
356 lineEdit()->deselect(); 359 lineEdit()->deselect();
357 cpos = 0; 360 cpos = 0;
358 lineEdit()->setCursorPosition(cpos); 361 lineEdit()->setCursorPosition(cpos);
@@ -367,42 +370,42 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
367 if ( cpos < 5 ) { 370 if ( cpos < 5 ) {
368 // switch another keys 371 // switch another keys
369 switch(e->key()) { 372 switch(e->key()) {
370 case Key_Delete: 373 case Qt::Key_Delete:
371 text.at( cpos ) = '0'; 374 text[ cpos ] = '0';
372 lineEdit()->setText( text ); 375 lineEdit()->setText( text );
373 lineEdit()->setCursorPosition(cpos); 376 lineEdit()->setCursorPosition(cpos);
374 setSelect ( cpos , 1 ); 377 setSelect ( cpos , 1 );
375 changedText(); 378 changedText();
376 break; 379 break;
377 case Key_9: 380 case Qt::Key_9:
378 case Key_8: 381 case Qt::Key_8:
379 case Key_7: 382 case Qt::Key_7:
380 case Key_6: 383 case Qt::Key_6:
381 if ( !(cpos == 1 || cpos == 4) ) 384 if ( !(cpos == 1 || cpos == 4) )
382 return; 385 return;
383 if ( cpos == 1 && text.at( 0 ) > '1') 386 if ( cpos == 1 && text.at( 0 ) > '1')
384 text.at( 0 ) = '1'; 387 text[ 0 ] = '1';
385 case Key_5: 388 case Qt::Key_5:
386 case Key_4: 389 case Qt::Key_4:
387 case Key_3: 390 case Qt::Key_3:
388 if ( cpos < 1 ) 391 if ( cpos < 1 )
389 return; 392 return;
390 if ( hour12Format && cpos == 1 ) 393 if ( hour12Format && cpos == 1 )
391 return; 394 return;
392 case Key_2: 395 case Qt::Key_2:
393 if ( hour12Format && cpos == 0 ) 396 if ( hour12Format && cpos == 0 )
394 return; 397 return;
395 if ( cpos == 0 && text.at( 1 ) > '3') 398 if ( cpos == 0 && text.at( 1 ) > '3')
396 text.at( 1 ) = '3'; 399 text[ 1 ] = '3';
397 case Key_1: 400 case Qt::Key_1:
398 case Key_0: 401 case Qt::Key_0:
399 if ( hour12Format ) { 402 if ( hour12Format ) {
400 if ( e->key() == Key_0 && cpos == 1 && text.at( 0 ) == '0' ) 403 if ( e->key() == Qt::Key_0 && cpos == 1 && text.at( 0 ) == '0' )
401 return; 404 return;
402 if ( e->key() == Key_0 && cpos == 0 && text.at( 1 ) == '0' ) 405 if ( e->key() == Qt::Key_0 && cpos == 0 && text.at( 1 ) == '0' )
403 text.at( 1 ) = '1'; 406 text[ 1 ] = '1';
404 } 407 }
405 text.at( cpos ) = QChar ( e->key() ); 408 text[ cpos ] = QChar ( e->key() );
406 lineEdit()->setText( text ); 409 lineEdit()->setText( text );
407 if ( cpos == 1 ) 410 if ( cpos == 1 )
408 ++cpos; 411 ++cpos;
@@ -411,11 +414,11 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
411 setSelect( cpos , 1 ); 414 setSelect( cpos , 1 );
412 changedText(); 415 changedText();
413 break; 416 break;
414 case Key_Home: 417 case Qt::Key_Home:
415 lineEdit()->setCursorPosition(0); 418 lineEdit()->setCursorPosition(0);
416 setSelect( cpos , 1 ); 419 setSelect( cpos , 1 );
417 break; 420 break;
418 case Key_End: 421 case Qt::Key_End:
419 lineEdit()->setCursorPosition(5); 422 lineEdit()->setCursorPosition(5);
420 lineEdit()->deselect(); 423 lineEdit()->deselect();
421 break; 424 break;
@@ -425,13 +428,13 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e)
425 } // switch num keys 428 } // switch num keys
426 } else if ( cpos == 5 ) {// if cpos < 5 429 } else if ( cpos == 5 ) {// if cpos < 5
427 if ( hour12Format ) { 430 if ( hour12Format ) {
428 if ( e->key() == Key_A ) { 431 if ( e->key() == Qt::Key_A ) {
429 text.at( 5 ) = 'a'; 432 text[ 5 ] = 'a';
430 lineEdit()->setText( text ); 433 lineEdit()->setText( text );
431 lineEdit()->setCursorPosition(5); 434 lineEdit()->setCursorPosition(5);
432 435
433 } else if ( e->key() == Key_P ) { 436 } else if ( e->key() == Qt::Key_P ) {
434 text.at( 5 ) = 'p'; 437 text[ 5 ] = 'p';
435 lineEdit()->setText( text ); 438 lineEdit()->setText( text );
436 lineEdit()->setCursorPosition(5); 439 lineEdit()->setCursorPosition(5);
437 440
diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h
index b3d842d..1c7d18d 100644
--- a/korganizer/ktimeedit.h
+++ b/korganizer/ktimeedit.h
@@ -24,10 +24,13 @@
24#define _KTIMEEDIT_H 24#define _KTIMEEDIT_H
25 25
26#include <qevent.h> 26#include <qevent.h>
27#include <qkeycode.h> 27#include <qnamespace.h>
28#include <qstring.h> 28#include <qstring.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qcombobox.h> 30#include <qcombobox.h>
31#include <Q3ComboBox>
32//Added by qt3to4:
33#include <QKeyEvent>
31 34
32#include <kapplication.h> 35#include <kapplication.h>
33 36
@@ -38,7 +41,7 @@
38 @short Provides a way to edit times in a user-friendly manner. 41 @short Provides a way to edit times in a user-friendly manner.
39 @author Preston Brown, Ian Dawes 42 @author Preston Brown, Ian Dawes
40*/ 43*/
41class KOTimeEdit : public QComboBox 44class KOTimeEdit : public Q3ComboBox
42{ 45{
43 Q_OBJECT 46 Q_OBJECT
44 public: 47 public:
diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp
index e72e41c..012455e 100644
--- a/korganizer/lineview.cpp
+++ b/korganizer/lineview.cpp
@@ -7,7 +7,7 @@
7#include "lineview.h" 7#include "lineview.h"
8 8
9LineView::LineView( QWidget *parent, const char *name ) : 9LineView::LineView( QWidget *parent, const char *name ) :
10 QScrollView( parent, name ) 10 Q3ScrollView( parent, name )
11{ 11{
12 mPixelWidth = 1000; 12 mPixelWidth = 1000;
13 13
diff --git a/korganizer/lineview.h b/korganizer/lineview.h
index aa34dbc..52ae9cf 100644
--- a/korganizer/lineview.h
+++ b/korganizer/lineview.h
@@ -1,10 +1,10 @@
1#ifndef LINEVIEW_H 1#ifndef LINEVIEW_H
2#define LINEVIEW_H 2#define LINEVIEW_H
3 3
4#include <qscrollview.h> 4#include <q3scrollview.h>
5#include <qptrlist.h> 5#include <q3ptrlist.h>
6 6
7class LineView : public QScrollView 7class LineView : public Q3ScrollView
8{ 8{
9 Q_OBJECT 9 Q_OBJECT
10 public: 10 public:
@@ -28,7 +28,7 @@ class LineView : public QScrollView
28 int end; 28 int end;
29 }; 29 };
30 30
31 QPtrList<Line> mLines; 31 Q3PtrList<Line> mLines;
32 int mPixelWidth; 32 int mPixelWidth;
33}; 33};
34 34
diff --git a/korganizer/main.cpp b/korganizer/main.cpp
index 4a0e24f..211fde6 100644
--- a/korganizer/main.cpp
+++ b/korganizer/main.cpp
@@ -4,13 +4,13 @@
4#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
5#include <qcopchannel_qws.h> 5#include <qcopchannel_qws.h>
6#include <qpe/global.h> 6#include <qpe/global.h>
7//Added by qt3to4:
8#include <Q3CString>
7#include <stdlib.h> 9#include <stdlib.h>
8#else 10#else
9#include <qapplication.h> 11#include <qapplication.h>
10#include <qstring.h> 12#include <qstring.h>
11#include <qwindowsstyle.h> 13#include <qwindowsstyle.h>
12#include <qplatinumstyle.h>
13#include <qsgistyle.h>
14#include <stdlib.h> 14#include <stdlib.h>
15#endif 15#endif
16#include <qtextcodec.h> 16#include <qtextcodec.h>
@@ -26,12 +26,12 @@ void dumpMissing();
26 26
27int main( int argc, char **argv ) 27int main( int argc, char **argv )
28{ 28{
29 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
29#ifndef DESKTOP_VERSION 30#ifndef DESKTOP_VERSION
30 QPEApplication a( argc, argv ); 31 QPEApplication a( argc, argv );
31 a.setKeepRunning (); 32 a.setKeepRunning ();
32#else 33#else
33 QApplication a( argc, argv ); 34 QApplication a( argc, argv );
34 QApplication::setStyle( new QPlatinumStyle ());
35#ifdef _WIN32_ 35#ifdef _WIN32_
36 QString hdir ( getenv( "HOME") ); 36 QString hdir ( getenv( "HOME") );
37 if ( hdir.isEmpty() ) { 37 if ( hdir.isEmpty() ) {
@@ -89,7 +89,7 @@ int main( int argc, char **argv )
89 MainWindow m; 89 MainWindow m;
90#ifndef DESKTOP_VERSION 90#ifndef DESKTOP_VERSION
91 91
92 QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(receiveStart( const QCString&, const QByteArray& ))); 92 QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&m, SLOT(receiveStart( const Q3CString&, const QByteArray& )));
93 a.showMainWidget(&m ); 93 a.showMainWidget(&m );
94#else 94#else
95 a.setMainWidget(&m ); 95 a.setMainWidget(&m );
@@ -98,7 +98,7 @@ int main( int argc, char **argv )
98 //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); 98 //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
99#endif 99#endif
100 if ( argc > 1 ) { 100 if ( argc > 1 ) {
101 QCString command = argv[1]; 101 Q3CString command = argv[1];
102 if ( argc > 2 ) 102 if ( argc > 2 )
103 command += argv[2]; 103 command += argv[2];
104 m.recieve(command, QByteArray() ); 104 m.recieve(command, QByteArray() );
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 69ccde1..2004939 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1,24 +1,25 @@
1#include <stdlib.h> 1#include <stdlib.h>
2 2
3#include <qaction.h> 3#include <qaction.h>
4#include <qpopupmenu.h> 4#include <Q3Action>
5#include <q3popupmenu.h>
5#include <qpainter.h> 6#include <qpainter.h>
6#include <qwhatsthis.h> 7#include <q3whatsthis.h>
7#include <qpushbutton.h> 8#include <qpushbutton.h>
8#include <qmessagebox.h> 9#include <qmessagebox.h>
9#include <qlineedit.h> 10#include <qlineedit.h>
10#include <qtextcodec.h> 11#include <qtextcodec.h>
11#include <qfile.h> 12#include <qfile.h>
12#include <qdir.h> 13#include <qdir.h>
13#include <qapp.h> 14#include <qapplication.h>
14#include <qfileinfo.h> 15#include <qfileinfo.h>
15#include <qlabel.h> 16#include <qlabel.h>
16#include <qspinbox.h> 17#include <qspinbox.h>
17#include <qcheckbox.h> 18#include <qcheckbox.h>
18#include <qmap.h> 19#include <qmap.h>
19#include <qwmatrix.h> 20#include <qmatrix.h>
20#include <qtextbrowser.h> 21#include <q3textbrowser.h>
21#include <qtextstream.h> 22#include <q3textstream.h>
22#ifndef DESKTOP_VERSION 23#ifndef DESKTOP_VERSION
23#include <qpe/global.h> 24#include <qpe/global.h>
24#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
@@ -28,8 +29,17 @@
28#include <qtopia/qcopenvelope_qws.h> 29#include <qtopia/qcopenvelope_qws.h>
29//#include <unistd.h> // for sleep 30//#include <unistd.h> // for sleep
30#else 31#else
31#include <qtoolbar.h> 32#include <q3toolbar.h>
32#include <qapplication.h> 33#include <qapplication.h>
34//Added by qt3to4:
35#include <QResizeEvent>
36#include <QPixmap>
37#include <QCloseEvent>
38#include <QKeyEvent>
39#include <Q3VBoxLayout>
40#include <QHideEvent>
41#include <Q3CString>
42#include <Q3PtrList>
33//#include <resource.h> 43//#include <resource.h>
34 44
35#endif 45#endif
@@ -80,35 +90,35 @@ class KOex2phonePrefs : public QDialog
80 QDialog( parent, name, true ) 90 QDialog( parent, name, true )
81 { 91 {
82 setCaption( i18n("Export to phone options") ); 92 setCaption( i18n("Export to phone options") );
83 QVBoxLayout* lay = new QVBoxLayout( this ); 93 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
84 lay->setSpacing( 3 ); 94 lay->setSpacing( 3 );
85 lay->setMargin( 3 ); 95 lay->setMargin( 3 );
86 QLabel *lab; 96 QLabel *lab;
87 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); 97 lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) );
88 lab->setAlignment (AlignHCenter ); 98 lab->setAlignment (Qt::AlignHCenter );
89 QHBox* temphb; 99 Q3HBox* temphb;
90 temphb = new QHBox( this ); 100 temphb = new Q3HBox( this );
91 new QLabel( i18n("I/O device: "), temphb ); 101 new QLabel( i18n("I/O device: "), temphb );
92 mPhoneDevice = new QLineEdit( temphb); 102 mPhoneDevice = new QLineEdit( temphb);
93 lay->addWidget( temphb ); 103 lay->addWidget( temphb );
94 temphb = new QHBox( this ); 104 temphb = new Q3HBox( this );
95 new QLabel( i18n("Connection: "), temphb ); 105 new QLabel( i18n("Connection: "), temphb );
96 mPhoneConnection = new QLineEdit( temphb); 106 mPhoneConnection = new QLineEdit( temphb);
97 lay->addWidget( temphb ); 107 lay->addWidget( temphb );
98 temphb = new QHBox( this ); 108 temphb = new Q3HBox( this );
99 new QLabel( i18n("Model(opt.): "), temphb ); 109 new QLabel( i18n("Model(opt.): "), temphb );
100 mPhoneModel = new QLineEdit( temphb); 110 mPhoneModel = new QLineEdit( temphb);
101 lay->addWidget( temphb ); 111 lay->addWidget( temphb );
102 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 112 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
103 mWriteBackFuture->setChecked( true ); 113 mWriteBackFuture->setChecked( true );
104 lay->addWidget( mWriteBackFuture ); 114 lay->addWidget( mWriteBackFuture );
105 temphb = new QHBox( this ); 115 temphb = new Q3HBox( this );
106 new QLabel( i18n("Max. weeks in future: ") , temphb ); 116 new QLabel( i18n("Max. weeks in future: ") , temphb );
107 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 117 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
108 mWriteBackFutureWeeks->setValue( 8 ); 118 mWriteBackFutureWeeks->setValue( 8 );
109 lay->addWidget( temphb ); 119 lay->addWidget( temphb );
110 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 120 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
111 lab->setAlignment (AlignHCenter ); 121 lab->setAlignment (Qt::AlignHCenter );
112 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 122 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
113 lay->addWidget( ok ); 123 lay->addWidget( ok );
114 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 124 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
@@ -134,7 +144,7 @@ QPixmap* sgListViewJournalPix;
134 144
135int globalFlagBlockStartup; 145int globalFlagBlockStartup;
136MainWindow::MainWindow( QWidget *parent, const char *name ) : 146MainWindow::MainWindow( QWidget *parent, const char *name ) :
137 QMainWindow( parent, name ) 147 Q3MainWindow( parent, name )
138{ 148{
139 sgListViewCompletedPix[5] = &listviewPix; 149 sgListViewCompletedPix[5] = &listviewPix;
140 sgListViewCompletedPix[0] = &listviewPix0; 150 sgListViewCompletedPix[0] = &listviewPix0;
@@ -185,18 +195,18 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
185 p->mCurrentDisplayedView = 0; 195 p->mCurrentDisplayedView = 0;
186 if ( p->mHourSize > 22 ) 196 if ( p->mHourSize > 22 )
187 p->mHourSize = 22; 197 p->mHourSize = 22;
188 QMainWindow::ToolBarDock tbd; 198 Qt::ToolBarDock tbd;
189 if ( p->mToolBarHor ) { 199 if ( p->mToolBarHor ) {
190 if ( p->mToolBarUp ) 200 if ( p->mToolBarUp )
191 tbd = Bottom; 201 tbd = Qt::Bottom;
192 else 202 else
193 tbd = Top; 203 tbd = Qt::Top;
194 } 204 }
195 else { 205 else {
196 if ( p->mToolBarUp ) 206 if ( p->mToolBarUp )
197 tbd = Right; 207 tbd = Qt::Right;
198 else 208 else
199 tbd = Left; 209 tbd = Qt::Left;
200 } 210 }
201 if ( KOPrefs::instance()->mUseAppColors ) 211 if ( KOPrefs::instance()->mUseAppColors )
202 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 212 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
@@ -213,15 +223,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
213{ 223{
214 if ( p->mToolBarHorF ) { 224 if ( p->mToolBarHorF ) {
215 if ( p->mToolBarUpF ) 225 if ( p->mToolBarUpF )
216 tbd = Bottom; 226 tbd = Qt::Bottom;
217 else 227 else
218 tbd = Top; 228 tbd = Qt::Top;
219 } 229 }
220 else { 230 else {
221 if ( p->mToolBarUpF ) 231 if ( p->mToolBarUpF )
222 tbd = Right; 232 tbd = Qt::Right;
223 else 233 else
224 tbd = Left; 234 tbd = Qt::Left;
225 } 235 }
226 filterToolBar = new QPEToolBar ( this ); 236 filterToolBar = new QPEToolBar ( this );
227 filterMenubar = new KMenuBar( 0 ); 237 filterMenubar = new KMenuBar( 0 );
@@ -230,7 +240,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
230 filterToolBar->setFocusPolicy( NoFocus ); 240 filterToolBar->setFocusPolicy( NoFocus );
231 filterMenubar->setFocusPolicy( NoFocus ); 241 filterMenubar->setFocusPolicy( NoFocus );
232#endif 242#endif
233 filterPopupMenu = new QPopupMenu( this ); 243 filterPopupMenu = new Q3PopupMenu( this );
234 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); 244 filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 );
235 QString addTest = "A"; 245 QString addTest = "A";
236 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) ); 246 filterMenubar->setMinimumWidth( fm.width( i18n("No Filter")+addTest ) );
@@ -259,29 +269,29 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
259#endif 269#endif
260 if ( p->mToolBarHorV ) { 270 if ( p->mToolBarHorV ) {
261 if ( p->mToolBarUpV ) 271 if ( p->mToolBarUpV )
262 tbd = Bottom; 272 tbd = Qt::Bottom;
263 else 273 else
264 tbd = Top; 274 tbd = Qt::Top;
265 } 275 }
266 else { 276 else {
267 if ( p->mToolBarUpV ) 277 if ( p->mToolBarUpV )
268 tbd = Right; 278 tbd = Qt::Right;
269 else 279 else
270 tbd = Left; 280 tbd = Qt::Left;
271 } 281 }
272 viewToolBar = new QPEToolBar( this ); 282 viewToolBar = new QPEToolBar( this );
273 addToolBar (viewToolBar , tbd ); 283 addToolBar (viewToolBar , tbd );
274 if ( p->mToolBarHorN ) { 284 if ( p->mToolBarHorN ) {
275 if ( p->mToolBarUpN ) 285 if ( p->mToolBarUpN )
276 tbd = Bottom; 286 tbd = Qt::Bottom;
277 else 287 else
278 tbd = Top; 288 tbd = Qt::Top;
279 } 289 }
280 else { 290 else {
281 if ( p->mToolBarUpN ) 291 if ( p->mToolBarUpN )
282 tbd = Right; 292 tbd = Qt::Right;
283 else 293 else
284 tbd = Left; 294 tbd = Qt::Left;
285 } 295 }
286 navigatorToolBar = new QPEToolBar( this ); 296 navigatorToolBar = new QPEToolBar( this );
287 addToolBar (navigatorToolBar , tbd ); 297 addToolBar (navigatorToolBar , tbd );
@@ -440,9 +450,9 @@ void MainWindow::loadDataAfterStart()
440 connect( mView, SIGNAL( modifiedChanged( bool ) ), 450 connect( mView, SIGNAL( modifiedChanged( bool ) ),
441 SLOT( slotModifiedChanged( bool ) ) ); 451 SLOT( slotModifiedChanged( bool ) ) );
442#ifndef DESKTOP_VERSION 452#ifndef DESKTOP_VERSION
443 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 453 connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & )));
444 connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); 454 connect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(recieve( const Q3CString&, const QByteArray& )));
445 disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); 455 disconnect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(receiveStart( const Q3CString&, const QByteArray& )));
446 if ( !mCStringMess.isEmpty() ) 456 if ( !mCStringMess.isEmpty() )
447 recieve( mCStringMess, mByteData ); 457 recieve( mCStringMess, mByteData );
448#endif 458#endif
@@ -509,7 +519,7 @@ void MainWindow::toggleBeamReceive()
509 qDebug("KO: Enable BeamReceive "); 519 qDebug("KO: Enable BeamReceive ");
510 brAction->setOn(true); 520 brAction->setOn(true);
511 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 521 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
512 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 522 QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(recieve( const Q3CString&, const QByteArray& )));
513#endif 523#endif
514} 524}
515void MainWindow::showMaximized () 525void MainWindow::showMaximized ()
@@ -600,22 +610,22 @@ void MainWindow::closeEvent( QCloseEvent* ce )
600 610
601 611
602} 612}
603void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) 613void MainWindow::receiveStart( const Q3CString& cmsg, const QByteArray& data )
604{ 614{
605 qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 615 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
606 mCStringMess = cmsg; 616 mCStringMess = cmsg;
607 mByteData = data; 617 mByteData = data;
608} 618}
609void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 619void MainWindow::recieve( const Q3CString& cmsg, const QByteArray& data )
610{ 620{
611 QDataStream stream( data, IO_ReadOnly ); 621 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
612 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 622 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
613 //QString datamess; 623 //QString datamess;
614 //qDebug("message "); 624 //qDebug("message ");
615 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 625 qDebug("KO: QCOP message received: %s ", cmsg.data() );
616 626
617 if ( cmsg == "setDocument(QString)" ) { 627 if ( cmsg == "setDocument(QString)" ) {
618 QDataStream stream( data, IO_ReadOnly ); 628 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
619 QString fileName; 629 QString fileName;
620 stream >> fileName; 630 stream >> fileName;
621 //qDebug("filename %s ", fileName.latin1()); 631 //qDebug("filename %s ", fileName.latin1());
@@ -744,21 +754,21 @@ void MainWindow::initActions()
744 KOPrefs *p = KOPrefs::instance(); 754 KOPrefs *p = KOPrefs::instance();
745 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); 755 //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar );
746 756
747 QPopupMenu *viewMenu = new QPopupMenu( this ); 757 Q3PopupMenu *viewMenu = new Q3PopupMenu( this );
748 QPopupMenu *actionMenu = new QPopupMenu( this ); 758 Q3PopupMenu *actionMenu = new Q3PopupMenu( this );
749 mCurrentItemMenu = new QPopupMenu ( this ); 759 mCurrentItemMenu = new Q3PopupMenu ( this );
750 QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); 760 Q3PopupMenu *nextConflictMenu = new Q3PopupMenu ( this );
751 QPopupMenu *importMenu = new QPopupMenu( this ); 761 Q3PopupMenu *importMenu = new Q3PopupMenu( this );
752 QPopupMenu *importMenu_X = new QPopupMenu( this ); 762 Q3PopupMenu *importMenu_X = new Q3PopupMenu( this );
753 QPopupMenu *exportMenu_X = new QPopupMenu( this ); 763 Q3PopupMenu *exportMenu_X = new Q3PopupMenu( this );
754 QPopupMenu *beamMenu_X = new QPopupMenu( this ); 764 Q3PopupMenu *beamMenu_X = new Q3PopupMenu( this );
755 selectFilterMenu = new QPopupMenu( this ); 765 selectFilterMenu = new Q3PopupMenu( this );
756 selectFilterMenu->setCheckable( true ); 766 selectFilterMenu->setCheckable( true );
757 syncMenu = new QPopupMenu( this ); 767 syncMenu = new Q3PopupMenu( this );
758 configureAgendaMenu = new QPopupMenu( this ); 768 configureAgendaMenu = new Q3PopupMenu( this );
759 configureToolBarMenu = new QPopupMenu( this ); 769 configureToolBarMenu = new Q3PopupMenu( this );
760 QPopupMenu *helpMenu = new QPopupMenu( this ); 770 Q3PopupMenu *helpMenu = new Q3PopupMenu( this );
761 QIconSet icon; 771 QIcon icon;
762 int pixWid = 22, pixHei = 22; 772 int pixWid = 22, pixHei = 22;
763 QString pathString = ""; 773 QString pathString = "";
764 if ( !p->mToolBarMiniIcons ) { 774 if ( !p->mToolBarMiniIcons ) {
@@ -791,7 +801,7 @@ void MainWindow::initActions()
791 menuBar1->insertItem( i18n("Help"), helpMenu ); 801 menuBar1->insertItem( i18n("Help"), helpMenu );
792 } else { 802 } else {
793 menuBar1 = new KMenuBar( iconToolBar ); 803 menuBar1 = new KMenuBar( iconToolBar );
794 QPopupMenu *menuBar = new QPopupMenu( this ); 804 Q3PopupMenu *menuBar = new Q3PopupMenu( this );
795 icon = loadPixmap( pathString + "z_menu" ); 805 icon = loadPixmap( pathString + "z_menu" );
796 menuBar1->insertItem( icon.pixmap(), menuBar); 806 menuBar1->insertItem( icon.pixmap(), menuBar);
797 //menuBar1->insertItem( i18n("ME"), menuBar); 807 //menuBar1->insertItem( i18n("ME"), menuBar);
@@ -818,7 +828,7 @@ void MainWindow::initActions()
818 mWeekPixmap.resize( pixWid , pixHei ); 828 mWeekPixmap.resize( pixWid , pixHei );
819 mWeekPixmap.fill( mWeekBgColor ); 829 mWeekPixmap.fill( mWeekBgColor );
820 icon = mWeekPixmap; 830 icon = mWeekPixmap;
821 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 831 mWeekAction = new Q3Action( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
822 if ( p-> mShowIconWeekNum ) 832 if ( p-> mShowIconWeekNum )
823 mWeekAction->addTo( iconToolBar ); 833 mWeekAction->addTo( iconToolBar );
824 mWeekFont = font(); 834 mWeekFont = font();
@@ -840,18 +850,18 @@ void MainWindow::initActions()
840 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); 850 connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) );
841 if ( p->mShowIconFilterview ) { 851 if ( p->mShowIconFilterview ) {
842 icon = loadPixmap( pathString + "filter" ); 852 icon = loadPixmap( pathString + "filter" );
843 actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); 853 actionFilterMenuTB = new Q3Action( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this );
844 connect( actionFilterMenuTB, SIGNAL( activated() ), 854 connect( actionFilterMenuTB, SIGNAL( activated() ),
845 this, SLOT( fillFilterMenuTB() ) ); 855 this, SLOT( fillFilterMenuTB() ) );
846 actionFilterMenuTB->addTo( iconToolBar ); 856 actionFilterMenuTB->addTo( iconToolBar );
847 selectFilterMenuTB = new QPopupMenu( this ); 857 selectFilterMenuTB = new Q3PopupMenu( this );
848 selectFilterMenuTB->setCheckable( true ); 858 selectFilterMenuTB->setCheckable( true );
849 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); 859 connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) );
850 } 860 }
851 861
852 //#endif 862 //#endif
853 // ****************** 863 // ******************
854 QAction *action; 864 Q3Action *action;
855 // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); 865 // QPopupMenu *configureMenu= new QPopupMenu( menuBar );
856 configureToolBarMenu->setCheckable( true ); 866 configureToolBarMenu->setCheckable( true );
857 867
@@ -866,35 +876,35 @@ void MainWindow::initActions()
866 connect( configureAgendaMenu, SIGNAL( aboutToShow()), 876 connect( configureAgendaMenu, SIGNAL( aboutToShow()),
867 this, SLOT( showConfigureAgenda( ) ) ); 877 this, SLOT( showConfigureAgenda( ) ) );
868 icon = loadPixmap( pathString + "today" ); 878 icon = loadPixmap( pathString + "today" );
869 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 879 Q3Action* today_action = new Q3Action( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
870 today_action->addTo( actionMenu ); 880 today_action->addTo( actionMenu );
871 connect( today_action, SIGNAL( activated() ), 881 connect( today_action, SIGNAL( activated() ),
872 mView, SLOT( goToday() ) ); 882 mView, SLOT( goToday() ) );
873 883
874 icon = loadPixmap( pathString + "picker" ); 884 icon = loadPixmap( pathString + "picker" );
875 QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); 885 Q3Action* dPickerAction = new Q3Action( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this );
876 dPickerAction->addTo( actionMenu ); 886 dPickerAction->addTo( actionMenu );
877 connect( dPickerAction, SIGNAL( activated() ), 887 connect( dPickerAction, SIGNAL( activated() ),
878 mView, SLOT( showDatePicker() ) ); 888 mView, SLOT( showDatePicker() ) );
879 889
880 icon = loadPixmap( pathString + "search" ); 890 icon = loadPixmap( pathString + "search" );
881 QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); 891 Q3Action* search_action = new Q3Action( i18n("Search"), icon, i18n("Search..."), 0, this );
882 search_action->addTo( actionMenu ); 892 search_action->addTo( actionMenu );
883 connect( search_action, SIGNAL( activated() ), 893 connect( search_action, SIGNAL( activated() ),
884 mView->dialogManager(), SLOT( showSearchDialog() ) ); 894 mView->dialogManager(), SLOT( showSearchDialog() ) );
885 actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); 895 actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu );
886 896
887 action = new QAction( "Undo Delete", i18n("All events"), 0, this ); 897 action = new Q3Action( "Undo Delete", i18n("All events"), 0, this );
888 action->addTo( nextConflictMenu ); 898 action->addTo( nextConflictMenu );
889 connect( action, SIGNAL( activated() ), 899 connect( action, SIGNAL( activated() ),
890 mView, SLOT( conflictAll() ) ); 900 mView, SLOT( conflictAll() ) );
891 901
892 action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); 902 action = new Q3Action( "Undo Delete", i18n("Allday events"), 0, this );
893 action->addTo( nextConflictMenu ); 903 action->addTo( nextConflictMenu );
894 connect( action, SIGNAL( activated() ), 904 connect( action, SIGNAL( activated() ),
895 mView, SLOT( conflictAllday() ) ); 905 mView, SLOT( conflictAllday() ) );
896 906
897 action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); 907 action = new Q3Action( "Undo Delete", i18n("Events with time"), 0, this );
898 action->addTo( nextConflictMenu ); 908 action->addTo( nextConflictMenu );
899 connect( action, SIGNAL( activated() ), 909 connect( action, SIGNAL( activated() ),
900 mView, SLOT( conflictNotAll() ) ); 910 mView, SLOT( conflictNotAll() ) );
@@ -902,16 +912,16 @@ void MainWindow::initActions()
902 actionMenu->insertSeparator(); 912 actionMenu->insertSeparator();
903 913
904 icon = loadPixmap( pathString + "newevent" ); 914 icon = loadPixmap( pathString + "newevent" );
905 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 915 Q3Action* ne_action = new Q3Action( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
906 ne_action->addTo( mCurrentItemMenu ); 916 ne_action->addTo( mCurrentItemMenu );
907 connect( ne_action, SIGNAL( activated() ), 917 connect( ne_action, SIGNAL( activated() ),
908 mView, SLOT( newEvent() ) ); 918 mView, SLOT( newEvent() ) );
909 icon = loadPixmap( pathString + "newtodo" ); 919 icon = loadPixmap( pathString + "newtodo" );
910 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 920 Q3Action* nt_action = new Q3Action( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
911 nt_action->addTo( mCurrentItemMenu ); 921 nt_action->addTo( mCurrentItemMenu );
912 connect( nt_action, SIGNAL( activated() ), 922 connect( nt_action, SIGNAL( activated() ),
913 mView, SLOT( newTodo() ) ); 923 mView, SLOT( newTodo() ) );
914 mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, 924 mNewSubTodoAction = new Q3Action( "new_subtodo", i18n("New Sub-Todo..."), 0,
915 this ); 925 this );
916 mNewSubTodoAction->addTo( mCurrentItemMenu ); 926 mNewSubTodoAction->addTo( mCurrentItemMenu );
917 connect( mNewSubTodoAction, SIGNAL( activated() ), 927 connect( mNewSubTodoAction, SIGNAL( activated() ),
@@ -930,44 +940,44 @@ void MainWindow::initActions()
930 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 940 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
931 941
932 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); 942 //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu);
933 mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); 943 mShowAction = new Q3Action( "show_incidence", i18n("Show"), 0, this );
934 mShowAction->addTo( mCurrentItemMenu ); 944 mShowAction->addTo( mCurrentItemMenu );
935 connect( mShowAction, SIGNAL( activated() ), 945 connect( mShowAction, SIGNAL( activated() ),
936 mView, SLOT( showIncidence() ) ); 946 mView, SLOT( showIncidence() ) );
937 947
938 mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); 948 mEditAction = new Q3Action( "edit_incidence", i18n("Edit..."), 0, this );
939 mEditAction->addTo( mCurrentItemMenu ); 949 mEditAction->addTo( mCurrentItemMenu );
940 connect( mEditAction, SIGNAL( activated() ), 950 connect( mEditAction, SIGNAL( activated() ),
941 mView, SLOT( editIncidence() ) ); 951 mView, SLOT( editIncidence() ) );
942 952
943 mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); 953 mDeleteAction = new Q3Action( "delete_incidence", i18n("Delete..."), 0, this );
944 mDeleteAction->addTo( mCurrentItemMenu ); 954 mDeleteAction->addTo( mCurrentItemMenu );
945 connect( mDeleteAction, SIGNAL( activated() ), 955 connect( mDeleteAction, SIGNAL( activated() ),
946 mView, SLOT( deleteIncidence() ) ); 956 mView, SLOT( deleteIncidence() ) );
947 957
948 958
949 mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); 959 mCloneAction = new Q3Action( "clone_incidence", i18n("Clone..."), 0, this );
950 mCloneAction->addTo( mCurrentItemMenu ); 960 mCloneAction->addTo( mCurrentItemMenu );
951 connect( mCloneAction, SIGNAL( activated() ), 961 connect( mCloneAction, SIGNAL( activated() ),
952 mView, SLOT( cloneIncidence() ) ); 962 mView, SLOT( cloneIncidence() ) );
953 mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); 963 mMoveAction = new Q3Action( "Move_incidence", i18n("Move..."), 0, this );
954 mMoveAction->addTo( mCurrentItemMenu ); 964 mMoveAction->addTo( mCurrentItemMenu );
955 connect( mMoveAction, SIGNAL( activated() ), 965 connect( mMoveAction, SIGNAL( activated() ),
956 mView, SLOT( moveIncidence() ) ); 966 mView, SLOT( moveIncidence() ) );
957#ifndef DESKTOP_VERSION 967#ifndef DESKTOP_VERSION
958 mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); 968 mBeamAction = new Q3Action( "Beam_incidence", i18n("Beam..."), 0, this );
959 mBeamAction->addTo(mCurrentItemMenu ); 969 mBeamAction->addTo(mCurrentItemMenu );
960 connect( mBeamAction, SIGNAL( activated() ), 970 connect( mBeamAction, SIGNAL( activated() ),
961 mView, SLOT( beamIncidence() ) ); 971 mView, SLOT( beamIncidence() ) );
962#endif 972#endif
963 mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); 973 mCancelAction = new Q3Action( "Cancel_incidence", i18n("Toggle Cancel"), 0, this );
964 mCancelAction->addTo( mCurrentItemMenu ); 974 mCancelAction->addTo( mCurrentItemMenu );
965 connect( mCancelAction, SIGNAL( activated() ), 975 connect( mCancelAction, SIGNAL( activated() ),
966 mView, SLOT( toggleCancelIncidence() ) ); 976 mView, SLOT( toggleCancelIncidence() ) );
967 977
968 978
969 mCurrentItemMenu->insertSeparator(); 979 mCurrentItemMenu->insertSeparator();
970 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 980 action = new Q3Action( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
971 action->addTo( mCurrentItemMenu ); 981 action->addTo( mCurrentItemMenu );
972 connect( action, SIGNAL( activated() ), 982 connect( action, SIGNAL( activated() ),
973 mView, SLOT( undo_delete() ) ); 983 mView, SLOT( undo_delete() ) );
@@ -979,7 +989,7 @@ void MainWindow::initActions()
979 icon = SmallIcon("1leftrightarrow" ); 989 icon = SmallIcon("1leftrightarrow" );
980 } 990 }
981 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); 991 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
982 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); 992 Q3Action* FSaction = new Q3Action( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
983 FSaction->addTo( viewMenu ); 993 FSaction->addTo( viewMenu );
984 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); 994 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
985 995
@@ -987,21 +997,21 @@ void MainWindow::initActions()
987 icon = loadPixmap( pathString + "filter" ); 997 icon = loadPixmap( pathString + "filter" );
988 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 998 configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 );
989 icon = loadPixmap( pathString + "configure" ); 999 icon = loadPixmap( pathString + "configure" );
990 action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); 1000 action = new Q3Action( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this );
991 action->addTo( viewMenu ); 1001 action->addTo( viewMenu );
992 connect( action, SIGNAL( activated() ), 1002 connect( action, SIGNAL( activated() ),
993 mView, SLOT( toggleFilter() ) ); 1003 mView, SLOT( toggleFilter() ) );
994 mToggleFilter = action; 1004 mToggleFilter = action;
995 icon = loadPixmap( pathString + "navi" ); 1005 icon = loadPixmap( pathString + "navi" );
996 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); 1006 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
997 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 1007 action = new Q3Action( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
998 action->addTo( viewMenu ); 1008 action->addTo( viewMenu );
999 connect( action, SIGNAL( activated() ), 1009 connect( action, SIGNAL( activated() ),
1000 mView, SLOT( toggleDateNavigatorWidget() ) ); 1010 mView, SLOT( toggleDateNavigatorWidget() ) );
1001 mToggleNav = action ; 1011 mToggleNav = action ;
1002 icon = loadPixmap( pathString + "allday" ); 1012 icon = loadPixmap( pathString + "allday" );
1003 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); 1013 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
1004 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 1014 action = new Q3Action( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
1005 action->addTo( viewMenu ); 1015 action->addTo( viewMenu );
1006 connect( action, SIGNAL( activated() ), 1016 connect( action, SIGNAL( activated() ),
1007 mView, SLOT( toggleAllDaySize() ) ); 1017 mView, SLOT( toggleAllDaySize() ) );
@@ -1031,14 +1041,14 @@ void MainWindow::initActions()
1031 1041
1032 icon = loadPixmap( pathString + "whatsnext" ); 1042 icon = loadPixmap( pathString + "whatsnext" );
1033 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 1043 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
1034 QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); 1044 Q3Action* whatsnext_action = new Q3Action( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
1035 whatsnext_action->addTo( viewMenu ); 1045 whatsnext_action->addTo( viewMenu );
1036 connect( whatsnext_action, SIGNAL( activated() ), 1046 connect( whatsnext_action, SIGNAL( activated() ),
1037 mView->viewManager(), SLOT( showWhatsNextView() ) ); 1047 mView->viewManager(), SLOT( showWhatsNextView() ) );
1038 1048
1039 icon = loadPixmap( pathString + "xdays" ); 1049 icon = loadPixmap( pathString + "xdays" );
1040 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); 1050 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 );
1041 QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); 1051 Q3Action* xdays_action = new Q3Action( i18n("Next days"), icon, i18n("Next days"), 0, this );
1042 xdays_action->addTo( viewMenu ); 1052 xdays_action->addTo( viewMenu );
1043 connect( xdays_action, SIGNAL( activated() ), 1053 connect( xdays_action, SIGNAL( activated() ),
1044 mView->viewManager(), SLOT( showNextXView() ) ); 1054 mView->viewManager(), SLOT( showNextXView() ) );
@@ -1046,7 +1056,7 @@ void MainWindow::initActions()
1046 1056
1047 icon = loadPixmap( pathString + "journal" ); 1057 icon = loadPixmap( pathString + "journal" );
1048 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 1058 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
1049 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 1059 Q3Action* viewjournal_action = new Q3Action( i18n("Journal"), icon, i18n("Journal"), 0, this );
1050 viewjournal_action->addTo( viewMenu ); 1060 viewjournal_action->addTo( viewMenu );
1051 connect( viewjournal_action, SIGNAL( activated() ), 1061 connect( viewjournal_action, SIGNAL( activated() ),
1052 mView->viewManager(), SLOT( showJournalView() ) ); 1062 mView->viewManager(), SLOT( showJournalView() ) );
@@ -1054,7 +1064,7 @@ void MainWindow::initActions()
1054 1064
1055 icon = loadPixmap( pathString + "day" ); 1065 icon = loadPixmap( pathString + "day" );
1056 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); 1066 configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
1057 QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); 1067 Q3Action* day1_action = new Q3Action( i18n("Day View"), icon, i18n("Day View"), 0, this );
1058 day1_action->addTo( viewMenu ); 1068 day1_action->addTo( viewMenu );
1059 // action->addTo( toolBar ); 1069 // action->addTo( toolBar );
1060 connect( day1_action, SIGNAL( activated() ), 1070 connect( day1_action, SIGNAL( activated() ),
@@ -1062,42 +1072,42 @@ void MainWindow::initActions()
1062 1072
1063 icon = loadPixmap( pathString + "workweek" ); 1073 icon = loadPixmap( pathString + "workweek" );
1064 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 1074 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
1065 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 1075 Q3Action* day5_action = new Q3Action( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
1066 day5_action->addTo( viewMenu ); 1076 day5_action->addTo( viewMenu );
1067 connect( day5_action, SIGNAL( activated() ), 1077 connect( day5_action, SIGNAL( activated() ),
1068 mView->viewManager(), SLOT( showWorkWeekView() ) ); 1078 mView->viewManager(), SLOT( showWorkWeekView() ) );
1069 1079
1070 icon = loadPixmap( pathString + "week" ); 1080 icon = loadPixmap( pathString + "week" );
1071 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 1081 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
1072 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 1082 Q3Action* day7_action = new Q3Action( i18n("Week"), icon, i18n("Week"), 0, this );
1073 day7_action->addTo( viewMenu ); 1083 day7_action->addTo( viewMenu );
1074 connect( day7_action, SIGNAL( activated() ), 1084 connect( day7_action, SIGNAL( activated() ),
1075 mView->viewManager(), SLOT( showWeekView() ) ); 1085 mView->viewManager(), SLOT( showWeekView() ) );
1076 1086
1077 icon = loadPixmap( pathString + "workweek2" ); 1087 icon = loadPixmap( pathString + "workweek2" );
1078 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); 1088 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
1079 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); 1089 Q3Action* day6_action = new Q3Action( i18n("List week"), icon, i18n("List week"), 0, this );
1080 day6_action->addTo( viewMenu ); 1090 day6_action->addTo( viewMenu );
1081 connect( day6_action, SIGNAL( activated() ), 1091 connect( day6_action, SIGNAL( activated() ),
1082 mView->viewManager(), SLOT( showMonthViewWeek() ) ); 1092 mView->viewManager(), SLOT( showMonthViewWeek() ) );
1083 1093
1084 icon = loadPixmap( pathString + "month" ); 1094 icon = loadPixmap( pathString + "month" );
1085 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 1095 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
1086 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 1096 Q3Action* month_action = new Q3Action( i18n("Month"), icon, i18n("Month"), 0, this );
1087 month_action->addTo( viewMenu ); 1097 month_action->addTo( viewMenu );
1088 connect( month_action, SIGNAL( activated() ), 1098 connect( month_action, SIGNAL( activated() ),
1089 mView->viewManager(), SLOT( showMonthView() ) ); 1099 mView->viewManager(), SLOT( showMonthView() ) );
1090 1100
1091 icon = loadPixmap( pathString + "list" ); 1101 icon = loadPixmap( pathString + "list" );
1092 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); 1102 configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
1093 QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); 1103 Q3Action* showlist_action = new Q3Action( i18n("List View"), icon, i18n("List View"), 0, this );
1094 showlist_action->addTo( viewMenu ); 1104 showlist_action->addTo( viewMenu );
1095 connect( showlist_action, SIGNAL( activated() ), 1105 connect( showlist_action, SIGNAL( activated() ),
1096 mView->viewManager(), SLOT( showListView() ) ); 1106 mView->viewManager(), SLOT( showListView() ) );
1097 1107
1098 icon = loadPixmap( pathString + "todo" ); 1108 icon = loadPixmap( pathString + "todo" );
1099 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 1109 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
1100 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 1110 Q3Action* todoview_action = new Q3Action( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
1101 todoview_action->addTo( viewMenu ); 1111 todoview_action->addTo( viewMenu );
1102 connect( todoview_action, SIGNAL( activated() ), 1112 connect( todoview_action, SIGNAL( activated() ),
1103 mView->viewManager(), SLOT( showTodoView() ) ); 1113 mView->viewManager(), SLOT( showTodoView() ) );
@@ -1105,7 +1115,7 @@ void MainWindow::initActions()
1105 1115
1106 1116
1107#if 0 1117#if 0
1108 action = new QAction( "view_timespan", "Time Span", 0, this ); 1118 action = new Q3Action( "view_timespan", "Time Span", 0, this );
1109 action->addTo( viewMenu ); 1119 action->addTo( viewMenu );
1110 connect( action, SIGNAL( activated() ), 1120 connect( action, SIGNAL( activated() ),
1111 mView->viewManager(), SLOT( showTimeSpanView() ) ); 1121 mView->viewManager(), SLOT( showTimeSpanView() ) );
@@ -1113,7 +1123,7 @@ void MainWindow::initActions()
1113 1123
1114 1124
1115 1125
1116 action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, 1126 action = new Q3Action( "purge_completed", i18n("Purge Completed..."), 0,
1117 this ); 1127 this );
1118 action->addTo( actionMenu ); 1128 action->addTo( actionMenu );
1119 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); 1129 connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) );
@@ -1125,12 +1135,12 @@ void MainWindow::initActions()
1125 1135
1126 1136
1127 actionMenu->insertSeparator(); 1137 actionMenu->insertSeparator();
1128 action = new QAction( "manage cat", i18n("Edit category list..."), 0, 1138 action = new Q3Action( "manage cat", i18n("Edit category list..."), 0,
1129 this ); 1139 this );
1130 action->addTo( actionMenu ); 1140 action->addTo( actionMenu );
1131 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); 1141 connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) );
1132 1142
1133 action = new QAction( "manage cat", i18n("Manage new categories..."), 0, 1143 action = new Q3Action( "manage cat", i18n("Manage new categories..."), 0,
1134 this ); 1144 this );
1135 action->addTo( actionMenu ); 1145 action->addTo( actionMenu );
1136 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); 1146 connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) );
@@ -1138,15 +1148,15 @@ void MainWindow::initActions()
1138 1148
1139 actionMenu->insertSeparator(); 1149 actionMenu->insertSeparator();
1140 icon = loadPixmap( pathString + "configure" ); 1150 icon = loadPixmap( pathString + "configure" );
1141 action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); 1151 action = new Q3Action( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this );
1142 action->addTo( actionMenu ); 1152 action->addTo( actionMenu );
1143 connect( action, SIGNAL( activated() ), 1153 connect( action, SIGNAL( activated() ),
1144 mView, SLOT( edit_options() ) ); 1154 mView, SLOT( edit_options() ) );
1145 action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); 1155 action = new Q3Action( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this );
1146 action->addTo( actionMenu ); 1156 action->addTo( actionMenu );
1147 connect( action, SIGNAL( activated() ), 1157 connect( action, SIGNAL( activated() ),
1148 this, SLOT( calHint() ) ); 1158 this, SLOT( calHint() ) );
1149 action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); 1159 action = new Q3Action( i18n("Configure"),icon, i18n("Global Settings..."), 0, this );
1150 action->addTo( actionMenu ); 1160 action->addTo( actionMenu );
1151 connect( action, SIGNAL( activated() ), 1161 connect( action, SIGNAL( activated() ),
1152 mView, SLOT( edit_global_options() ) ); 1162 mView, SLOT( edit_global_options() ) );
@@ -1155,29 +1165,29 @@ void MainWindow::initActions()
1155 1165
1156 } 1166 }
1157 // actionMenu->insertSeparator(); 1167 // actionMenu->insertSeparator();
1158 action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, 1168 action = new Q3Action( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0,
1159 this ); 1169 this );
1160 action->addTo( importMenu_X ); 1170 action->addTo( importMenu_X );
1161 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); 1171 connect( action, SIGNAL( activated() ), SLOT( importIcal() ) );
1162 action = new QAction( "import_quick", i18n("Import last file"), 0, 1172 action = new Q3Action( "import_quick", i18n("Import last file"), 0,
1163 this ); 1173 this );
1164 action->addTo( importMenu_X ); 1174 action->addTo( importMenu_X );
1165 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 1175 connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) );
1166 importMenu_X->insertSeparator(); 1176 importMenu_X->insertSeparator();
1167 action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, 1177 action = new Q3Action( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0,
1168 this ); 1178 this );
1169 action->addTo( importMenu_X ); 1179 action->addTo( importMenu_X );
1170 connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); 1180 connect( action, SIGNAL( activated() ), SLOT( importBday() ) );
1171 //#ifndef DESKTOP_VERSION 1181 //#ifndef DESKTOP_VERSION
1172 importMenu_X->insertSeparator(); 1182 importMenu_X->insertSeparator();
1173 action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, 1183 action = new Q3Action( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0,
1174 this ); 1184 this );
1175 action->addTo( importMenu_X ); 1185 action->addTo( importMenu_X );
1176 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); 1186 connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) );
1177 //#else 1187 //#else
1178#ifdef _OL_IMPORT_ 1188#ifdef _OL_IMPORT_
1179 importMenu_X->insertSeparator(); 1189 importMenu_X->insertSeparator();
1180 action = new QAction( "import_ol", i18n("Import from OL"), 0, 1190 action = new Q3Action( "import_ol", i18n("Import from OL"), 0,
1181 this ); 1191 this );
1182 action->addTo( importMenu_X ); 1192 action->addTo( importMenu_X );
1183 connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); 1193 connect( action, SIGNAL( activated() ), SLOT( importOL() ) );
@@ -1186,30 +1196,30 @@ void MainWindow::initActions()
1186 1196
1187 //importMenu->insertSeparator(); 1197 //importMenu->insertSeparator();
1188#if 0 1198#if 0
1189 action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, 1199 action = new Q3Action( "load_cal", i18n("Load Calendar Backup"), 0,
1190 this ); 1200 this );
1191 action->addTo( importMenu ); 1201 action->addTo( importMenu );
1192 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); 1202 connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) );
1193#endif 1203#endif
1194 action = new QAction( "save_cal", i18n("Save Backup..."), 0, 1204 action = new Q3Action( "save_cal", i18n("Save Backup..."), 0,
1195 this ); 1205 this );
1196 action->addTo( importMenu ); 1206 action->addTo( importMenu );
1197 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); 1207 connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) );
1198 importMenu->insertSeparator(); 1208 importMenu->insertSeparator();
1199 importMenu->insertItem( i18n("Import"), importMenu_X ); 1209 importMenu->insertItem( i18n("Import"), importMenu_X );
1200 //importMenu->insertSeparator(); 1210 //importMenu->insertSeparator();
1201 action = new QAction( "export ical", i18n("Export All Data"), 0, 1211 action = new Q3Action( "export ical", i18n("Export All Data"), 0,
1202 this ); 1212 this );
1203 action->addTo( exportMenu_X ); 1213 action->addTo( exportMenu_X );
1204 connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) ); 1214 connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) );
1205 action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, 1215 action = new Q3Action( "import_qtopia", i18n("Export VCalendar"), 0,
1206 this ); 1216 this );
1207 action->addTo( exportMenu_X ); 1217 action->addTo( exportMenu_X );
1208 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); 1218 connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) );
1209 1219
1210 1220
1211 //LR 1221 //LR
1212 QPopupMenu *ex2phone = new QPopupMenu( this ); 1222 Q3PopupMenu *ex2phone = new Q3PopupMenu( this );
1213 ex2phone->insertItem(i18n("Complete calendar..."), 1 ); 1223 ex2phone->insertItem(i18n("Complete calendar..."), 1 );
1214 ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); 1224 ex2phone->insertItem(i18n("Filtered calendar..."), 2 );
1215 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); 1225 connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) );
@@ -1219,18 +1229,18 @@ void MainWindow::initActions()
1219 mPrintSelAction = 0; 1229 mPrintSelAction = 0;
1220#ifndef DESKTOP_VERSION 1230#ifndef DESKTOP_VERSION
1221 //importMenu->insertSeparator(); 1231 //importMenu->insertSeparator();
1222 brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, 1232 brAction = new Q3Action( "beam toggle", i18n("Beam receive enabled"), 0,
1223 this ); 1233 this );
1224 brAction->addTo( beamMenu_X ); 1234 brAction->addTo( beamMenu_X );
1225 brAction->setToggleAction (true ) ; 1235 brAction->setToggleAction (true ) ;
1226 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); 1236 connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) );
1227 1237
1228 action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, 1238 action = new Q3Action( "beam all", i18n("Beam complete calendar..."), 0,
1229 this ); 1239 this );
1230 action->addTo( beamMenu_X ); 1240 action->addTo( beamMenu_X );
1231 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); 1241 connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
1232 1242
1233 action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, 1243 action = new Q3Action( "beam all", i18n("Beam filtered calendar..."), 0,
1234 this ); 1244 this );
1235 action->addTo( beamMenu_X ); 1245 action->addTo( beamMenu_X );
1236 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); 1246 connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) );
@@ -1238,31 +1248,31 @@ void MainWindow::initActions()
1238#else 1248#else
1239 //importMenu->insertSeparator(); 1249 //importMenu->insertSeparator();
1240 icon = loadPixmap( pathString + "print" ); 1250 icon = loadPixmap( pathString + "print" );
1241 action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); 1251 action = new Q3Action( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
1242 action->addTo( beamMenu_X ); 1252 action->addTo( beamMenu_X );
1243 connect( action, SIGNAL( activated() ), 1253 connect( action, SIGNAL( activated() ),
1244 this, SLOT( printCal() ) ); 1254 this, SLOT( printCal() ) );
1245 1255
1246 icon = loadPixmap( pathString + "week" ); 1256 icon = loadPixmap( pathString + "week" );
1247 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 1257 action = new Q3Action( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
1248 action->addTo( beamMenu_X ); 1258 action->addTo( beamMenu_X );
1249 connect( action, SIGNAL( activated() ), 1259 connect( action, SIGNAL( activated() ),
1250 this, SLOT( printSel() ) ); 1260 this, SLOT( printSel() ) );
1251 icon = loadPixmap( pathString + "whatsnext" ); 1261 icon = loadPixmap( pathString + "whatsnext" );
1252 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); 1262 action = new Q3Action( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
1253 action->addTo( beamMenu_X ); 1263 action->addTo( beamMenu_X );
1254 connect( action, SIGNAL( activated() ), 1264 connect( action, SIGNAL( activated() ),
1255 mView->viewManager(), SLOT( slotprintWNV() ) ); 1265 mView->viewManager(), SLOT( slotprintWNV() ) );
1256 1266
1257 1267
1258 icon = loadPixmap( pathString + "list" ); 1268 icon = loadPixmap( pathString + "list" );
1259 action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); 1269 action = new Q3Action( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this );
1260 action->addTo( beamMenu_X ); 1270 action->addTo( beamMenu_X );
1261 connect( action, SIGNAL( activated() ), 1271 connect( action, SIGNAL( activated() ),
1262 this, SLOT( printListView() ) ); 1272 this, SLOT( printListView() ) );
1263 1273
1264 icon = loadPixmap( pathString + "newevent" ); 1274 icon = loadPixmap( pathString + "newevent" );
1265 action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); 1275 action = new Q3Action( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this );
1266 action->addTo( beamMenu_X ); 1276 action->addTo( beamMenu_X );
1267 connect( action, SIGNAL( activated() ), 1277 connect( action, SIGNAL( activated() ),
1268 mView, SLOT( slotprintSelInc() ) ); 1278 mView, SLOT( slotprintSelInc() ) );
@@ -1271,11 +1281,11 @@ void MainWindow::initActions()
1271#endif 1281#endif
1272 1282
1273 importMenu->insertSeparator(); 1283 importMenu->insertSeparator();
1274 action = new QAction( "beam all", i18n("Save"), 0, 1284 action = new Q3Action( "beam all", i18n("Save"), 0,
1275 this ); 1285 this );
1276 action->addTo( importMenu ); 1286 action->addTo( importMenu );
1277 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 1287 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
1278 action = new QAction( "beam all", i18n("Exit (+save)"), 0, 1288 action = new Q3Action( "beam all", i18n("Exit (+save)"), 0,
1279 this ); 1289 this );
1280 action->addTo( importMenu ); 1290 action->addTo( importMenu );
1281 connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); 1291 connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
@@ -1284,59 +1294,59 @@ void MainWindow::initActions()
1284 //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); 1294 //configureMenu->insertItem( "Toolbar",configureToolBarMenu );
1285 icon = loadPixmap( "korganizer/korganizer" ); 1295 icon = loadPixmap( "korganizer/korganizer" );
1286 1296
1287 action = new QAction( "Whats New", i18n("What's new?"), 0,this ); 1297 action = new Q3Action( "Whats New", i18n("What's new?"), 0,this );
1288 action->addTo( helpMenu ); 1298 action->addTo( helpMenu );
1289 connect( action, SIGNAL( activated() ), 1299 connect( action, SIGNAL( activated() ),
1290 SLOT( whatsNew() ) ); 1300 SLOT( whatsNew() ) );
1291 action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); 1301 action = new Q3Action( "featureHowto", i18n("Features + hints..."), 0,this );
1292 action->addTo( helpMenu ); 1302 action->addTo( helpMenu );
1293 connect( action, SIGNAL( activated() ), 1303 connect( action, SIGNAL( activated() ),
1294 SLOT( features() ) ); 1304 SLOT( features() ) );
1295 action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); 1305 action = new Q3Action( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
1296 action->addTo( helpMenu ); 1306 action->addTo( helpMenu );
1297 connect( action, SIGNAL( activated() ), 1307 connect( action, SIGNAL( activated() ),
1298 SLOT( keyBindings() ) ); 1308 SLOT( keyBindings() ) );
1299 action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); 1309 action = new Q3Action( "Storage Howto", i18n("Storage HowTo..."), 0,this );
1300 action->addTo( helpMenu ); 1310 action->addTo( helpMenu );
1301 connect( action, SIGNAL( activated() ), 1311 connect( action, SIGNAL( activated() ),
1302 SLOT( storagehowto() ) ); 1312 SLOT( storagehowto() ) );
1303 action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); 1313 action = new Q3Action( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this );
1304 action->addTo( helpMenu ); 1314 action->addTo( helpMenu );
1305 connect( action, SIGNAL( activated() ), 1315 connect( action, SIGNAL( activated() ),
1306 SLOT( timetrackinghowto() ) ); 1316 SLOT( timetrackinghowto() ) );
1307 action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); 1317 action = new Q3Action( "Sync Howto", i18n("Sync HowTo..."), 0,this );
1308 action->addTo( helpMenu ); 1318 action->addTo( helpMenu );
1309 connect( action, SIGNAL( activated() ), 1319 connect( action, SIGNAL( activated() ),
1310 SLOT( synchowto() ) ); 1320 SLOT( synchowto() ) );
1311 action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); 1321 action = new Q3Action( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this );
1312 action->addTo( helpMenu ); 1322 action->addTo( helpMenu );
1313 connect( action, SIGNAL( activated() ), 1323 connect( action, SIGNAL( activated() ),
1314 SLOT( kdesynchowto() ) ); 1324 SLOT( kdesynchowto() ) );
1315 action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); 1325 action = new Q3Action( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this );
1316 action->addTo( helpMenu ); 1326 action->addTo( helpMenu );
1317 connect( action, SIGNAL( activated() ), 1327 connect( action, SIGNAL( activated() ),
1318 SLOT( multisynchowto() ) ); 1328 SLOT( multisynchowto() ) );
1319 action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); 1329 action = new Q3Action( "Auto saving", i18n("Auto saving..."), 0, this );
1320 action->addTo( helpMenu ); 1330 action->addTo( helpMenu );
1321 connect( action, SIGNAL( activated() ), 1331 connect( action, SIGNAL( activated() ),
1322 SLOT( aboutAutoSaving() ) ); 1332 SLOT( aboutAutoSaving() ) );
1323 action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); 1333 action = new Q3Action( "Problemd", i18n("Known Problems..."), 0,this );
1324 action->addTo( helpMenu ); 1334 action->addTo( helpMenu );
1325 connect( action, SIGNAL( activated() ), 1335 connect( action, SIGNAL( activated() ),
1326 SLOT( aboutKnownBugs() ) ); 1336 SLOT( aboutKnownBugs() ) );
1327 action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); 1337 action = new Q3Action( "Translate Howto", i18n("User translation..."), 0,this );
1328 action->addTo( helpMenu ); 1338 action->addTo( helpMenu );
1329 connect( action, SIGNAL( activated() ), 1339 connect( action, SIGNAL( activated() ),
1330 SLOT( usertrans() ) ); 1340 SLOT( usertrans() ) );
1331 action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); 1341 action = new Q3Action( "Frequently asked questions", i18n("FAQ..."), 0,this );
1332 action->addTo( helpMenu ); 1342 action->addTo( helpMenu );
1333 connect( action, SIGNAL( activated() ), 1343 connect( action, SIGNAL( activated() ),
1334 SLOT( faq() ) ); 1344 SLOT( faq() ) );
1335 action = new QAction( "licence", i18n("Licence..."), 0, this ); 1345 action = new Q3Action( "licence", i18n("Licence..."), 0, this );
1336 action->addTo( helpMenu ); 1346 action->addTo( helpMenu );
1337 connect( action, SIGNAL( activated() ), 1347 connect( action, SIGNAL( activated() ),
1338 SLOT( licence() ) ); 1348 SLOT( licence() ) );
1339 action = new QAction( "about", i18n("About..."), 0, this ); 1349 action = new Q3Action( "about", i18n("About..."), 0, this );
1340 action->addTo( helpMenu ); 1350 action->addTo( helpMenu );
1341 connect( action, SIGNAL( activated() ), 1351 connect( action, SIGNAL( activated() ),
1342 SLOT( about() ) ); 1352 SLOT( about() ) );
@@ -1356,7 +1366,7 @@ void MainWindow::initActions()
1356 if (p-> mShowIconSearch) 1366 if (p-> mShowIconSearch)
1357 search_action->addTo( iconToolBar ); 1367 search_action->addTo( iconToolBar );
1358 if (p-> mShowIconWhatsThis) 1368 if (p-> mShowIconWhatsThis)
1359 QWhatsThis::whatsThisButton ( iconToolBar ); 1369 Q3WhatsThis::whatsThisButton ( iconToolBar );
1360 if (p-> mShowIconNext) 1370 if (p-> mShowIconNext)
1361 whatsnext_action->addTo( viewToolBar ); 1371 whatsnext_action->addTo( viewToolBar );
1362 if (p-> mShowIconNextDays) 1372 if (p-> mShowIconNextDays)
@@ -1381,7 +1391,7 @@ void MainWindow::initActions()
1381 icon = loadPixmap( pathString + "2leftarrowB" ); 1391 icon = loadPixmap( pathString + "2leftarrowB" );
1382 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 1392 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200);
1383 if (p-> mShowIconBackFast) { 1393 if (p-> mShowIconBackFast) {
1384 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1394 action = new Q3Action( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1385 connect( action, SIGNAL( activated() ), 1395 connect( action, SIGNAL( activated() ),
1386 mView, SLOT( goPreviousMonth() ) ); 1396 mView, SLOT( goPreviousMonth() ) );
1387 action->addTo( navigatorToolBar ); 1397 action->addTo( navigatorToolBar );
@@ -1389,7 +1399,7 @@ void MainWindow::initActions()
1389 icon = loadPixmap( pathString + "1leftarrowB" ); 1399 icon = loadPixmap( pathString + "1leftarrowB" );
1390 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 1400 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210);
1391 if (p-> mShowIconBack) { 1401 if (p-> mShowIconBack) {
1392 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1402 action = new Q3Action( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
1393 connect( action, SIGNAL( activated() ), 1403 connect( action, SIGNAL( activated() ),
1394 mView, SLOT( goPrevious() ) ); 1404 mView, SLOT( goPrevious() ) );
1395 action->addTo( navigatorToolBar ); 1405 action->addTo( navigatorToolBar );
@@ -1401,7 +1411,7 @@ void MainWindow::initActions()
1401 icon = loadPixmap( pathString + "1rightarrowB" ); 1411 icon = loadPixmap( pathString + "1rightarrowB" );
1402 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 1412 configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
1403 if (p-> mShowIconForward) { 1413 if (p-> mShowIconForward) {
1404 action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); 1414 action = new Q3Action( i18n("Go forward"), icon, i18n("Go forward"),0 , this );
1405 connect( action, SIGNAL( activated() ), 1415 connect( action, SIGNAL( activated() ),
1406 mView, SLOT( goNext() ) ); 1416 mView, SLOT( goNext() ) );
1407 action->addTo( navigatorToolBar ); 1417 action->addTo( navigatorToolBar );
@@ -1409,7 +1419,7 @@ void MainWindow::initActions()
1409 icon = loadPixmap( pathString + "2rightarrowB" ); 1419 icon = loadPixmap( pathString + "2rightarrowB" );
1410 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 1420 configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
1411 if (p-> mShowIconForwardFast) { 1421 if (p-> mShowIconForwardFast) {
1412 action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); 1422 action = new Q3Action( i18n("Next month"), icon, i18n("Next month"),0 , this );
1413 connect( action, SIGNAL( activated() ), 1423 connect( action, SIGNAL( activated() ),
1414 mView, SLOT( goNextMonth() ) ); 1424 mView, SLOT( goNextMonth() ) );
1415 action->addTo( navigatorToolBar ); 1425 action->addTo( navigatorToolBar );
@@ -1524,7 +1534,7 @@ void MainWindow::exportToPhone( int mode )
1524 int inFuture = 0; 1534 int inFuture = 0;
1525 if ( ex2phone.mWriteBackFuture->isChecked() ) 1535 if ( ex2phone.mWriteBackFuture->isChecked() )
1526 inFuture = ex2phone.mWriteBackFutureWeeks->value(); 1536 inFuture = ex2phone.mWriteBackFutureWeeks->value();
1527 QPtrList<Incidence> delSel; 1537 Q3PtrList<Incidence> delSel;
1528 if ( mode == 1 ) 1538 if ( mode == 1 )
1529 delSel = mCalendar->rawIncidences(); 1539 delSel = mCalendar->rawIncidences();
1530 if ( mode == 2 ) 1540 if ( mode == 2 )
@@ -1595,10 +1605,10 @@ void MainWindow::displayText( QString text ,QString cap )
1595{ 1605{
1596 QDialog dia( this, "name", true ); ; 1606 QDialog dia( this, "name", true ); ;
1597 dia.setCaption( cap ); 1607 dia.setCaption( cap );
1598 QVBoxLayout* lay = new QVBoxLayout( &dia ); 1608 Q3VBoxLayout* lay = new Q3VBoxLayout( &dia );
1599 lay->setSpacing( 3 ); 1609 lay->setSpacing( 3 );
1600 lay->setMargin( 3 ); 1610 lay->setMargin( 3 );
1601 QTextBrowser tb ( &dia ); 1611 Q3TextBrowser tb ( &dia );
1602 lay->addWidget( &tb ); 1612 lay->addWidget( &tb );
1603 tb.setText( text ); 1613 tb.setText( text );
1604#ifdef DESKTOP_VERSION 1614#ifdef DESKTOP_VERSION
@@ -1777,9 +1787,9 @@ void MainWindow::updateWeek(QDate seda)
1777 mWeekPixmap.fill( mWeekBgColor ); 1787 mWeekPixmap.fill( mWeekBgColor );
1778 QPainter p ( &mWeekPixmap ); 1788 QPainter p ( &mWeekPixmap );
1779 p.setFont( mWeekFont ); 1789 p.setFont( mWeekFont );
1780 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); 1790 p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),Qt::AlignCenter, QString::number( weekNum) );
1781 p.end(); 1791 p.end();
1782 QIconSet icon3 ( mWeekPixmap ); 1792 QIcon icon3 ( mWeekPixmap );
1783 mWeekAction->setIconSet ( icon3 ); 1793 mWeekAction->setIconSet ( icon3 );
1784 1794
1785} 1795}
@@ -1812,7 +1822,7 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1812 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); 1822 "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
1813 if ( incidence->isBirthday() || incidence->isAnniversary() ) { 1823 if ( incidence->isBirthday() || incidence->isAnniversary() ) {
1814 bool ok; 1824 bool ok;
1815 QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); 1825 QDateTime noc = incidence->getNextOccurence( (QDateTime)mView->startDate().addDays(-1), &ok );
1816 if ( ok ) { 1826 if ( ok ) {
1817 int years = noc.date().year() - incidence->dtStart().date().year(); 1827 int years = noc.date().year() - incidence->dtStart().date().year();
1818 startString += i18n(" (%1 y.)"). arg( years ); 1828 startString += i18n(" (%1 y.)"). arg( years );
@@ -1846,13 +1856,13 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
1846 static QPixmap jP = SmallIcon( "journal" ); 1856 static QPixmap jP = SmallIcon( "journal" );
1847 static QPixmap eP = SmallIcon( "newevent" ); 1857 static QPixmap eP = SmallIcon( "newevent" );
1848 static QPixmap tP = SmallIcon( "newtodo" ); 1858 static QPixmap tP = SmallIcon( "newtodo" );
1849 QIconSet icon; 1859 QIcon icon;
1850 if ( incidence->typeID() == todoID ) 1860 if ( incidence->typeID() == todoID )
1851 icon = QIconSet ( tP ); 1861 icon = QIcon ( tP );
1852 else if ( incidence->typeID() == eventID ) 1862 else if ( incidence->typeID() == eventID )
1853 icon = QIconSet ( eP ); 1863 icon = QIcon ( eP );
1854 else if ( incidence->typeID() == journalID ) 1864 else if ( incidence->typeID() == journalID )
1855 icon = QIconSet ( jP ); 1865 icon = QIcon ( jP );
1856 mPrintSelAction->setIconSet ( icon ); 1866 mPrintSelAction->setIconSet ( icon );
1857#endif 1867#endif
1858} 1868}
@@ -2045,7 +2055,7 @@ void MainWindow::backupAllFiles()
2045 } else if ( retval == 1 ){ 2055 } else if ( retval == 1 ){
2046 qDebug("KO: Backup created."); 2056 qDebug("KO: Backup created.");
2047 // backup ok 2057 // backup ok
2048 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2058 Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2049 KopiCalendarFile * cal = calendars.first(); 2059 KopiCalendarFile * cal = calendars.first();
2050 cal = calendars.next(); 2060 cal = calendars.next();
2051 while ( cal ) { 2061 while ( cal ) {
@@ -2341,7 +2351,7 @@ void MainWindow::fillFilterMenuTB()
2341 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 ); 2351 selectFilterMenuTB->insertItem(i18n ( "No Filter" ), 1 );
2342 2352
2343 selectFilterMenuTB->insertSeparator(); 2353 selectFilterMenuTB->insertSeparator();
2344 QPtrList<CalFilter> fili = mView->filters(); 2354 Q3PtrList<CalFilter> fili = mView->filters();
2345 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2355 CalFilter *curfilter = mView->filterView()->selectedFilter();
2346 CalFilter *filter = fili.first(); 2356 CalFilter *filter = fili.first();
2347 int iii = 2; 2357 int iii = 2;
@@ -2386,7 +2396,7 @@ void MainWindow::fillFilterMenu()
2386 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 ); 2396 selectFilterMenu->insertItem(i18n ( "No Filter" ), 1 );
2387 2397
2388 selectFilterMenu->insertSeparator(); 2398 selectFilterMenu->insertSeparator();
2389 QPtrList<CalFilter> fili = mView->filters(); 2399 Q3PtrList<CalFilter> fili = mView->filters();
2390 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2400 CalFilter *curfilter = mView->filterView()->selectedFilter();
2391 CalFilter *filter = fili.first(); 2401 CalFilter *filter = fili.first();
2392 int iii = 2; 2402 int iii = 2;
@@ -2407,7 +2417,7 @@ void MainWindow::fillFilterMenuPopup()
2407 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); 2417 filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 );
2408 2418
2409 filterPopupMenu->insertSeparator(); 2419 filterPopupMenu->insertSeparator();
2410 QPtrList<CalFilter> fili = mView->filters(); 2420 Q3PtrList<CalFilter> fili = mView->filters();
2411 CalFilter *curfilter = mView->filterView()->selectedFilter(); 2421 CalFilter *curfilter = mView->filterView()->selectedFilter();
2412 CalFilter *filter = fili.first(); 2422 CalFilter *filter = fili.first();
2413 int iii = 1; 2423 int iii = 1;
@@ -2819,5 +2829,5 @@ void MainWindow::resizeEvent( QResizeEvent* e)
2819 } 2829 }
2820 } 2830 }
2821#endif 2831#endif
2822 QMainWindow::resizeEvent( e); 2832 Q3MainWindow::resizeEvent( e);
2823} 2833}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index a533d8b..6756216 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -1,13 +1,21 @@
1#ifndef KORGE_MAINWINDOW_H 1#ifndef KORGE_MAINWINDOW_H
2#define KORGE_MAINWINDOW_H 2#define KORGE_MAINWINDOW_H
3 3
4#include <qmainwindow.h> 4#include <q3mainwindow.h>
5#include <qtimer.h> 5#include <qtimer.h>
6#include <qdict.h> 6#include <q3dict.h>
7#include <qfile.h> 7#include <qfile.h>
8#include <qmenubar.h> 8#include <qmenubar.h>
9#include <qtextstream.h> 9#include <q3textstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11//Added by qt3to4:
12#include <Q3CString>
13#include <QCloseEvent>
14#include <QResizeEvent>
15#include <QPixmap>
16#include <Q3PopupMenu>
17#include <QHideEvent>
18#include <QKeyEvent>
11 19
12#include <libkcal/incidence.h> 20#include <libkcal/incidence.h>
13#include <ksyncmanager.h> 21#include <ksyncmanager.h>
@@ -15,12 +23,12 @@
15#ifndef DESKTOP_VERSION 23#ifndef DESKTOP_VERSION
16#include <qcopchannel_qws.h> 24#include <qcopchannel_qws.h>
17#endif 25#endif
18class QAction; 26class Q3Action;
19class CalendarView; 27class CalendarView;
20class KSyncProfile; 28class KSyncProfile;
21#ifdef DESKTOP_VERSION 29#ifdef DESKTOP_VERSION
22 30
23#define QPEToolBar QToolBar 31#define QPEToolBar Q3ToolBar
24#endif 32#endif
25class QPEToolBar; 33class QPEToolBar;
26 34
@@ -31,7 +39,7 @@ class CalendarLocal;
31 39
32using namespace KCal; 40using namespace KCal;
33 41
34class MainWindow : public QMainWindow 42class MainWindow : public Q3MainWindow
35{ 43{
36 Q_OBJECT 44 Q_OBJECT
37 public: 45 public:
@@ -49,8 +57,8 @@ class MainWindow : public QMainWindow
49 void updateFilterToolbar(); 57 void updateFilterToolbar();
50 virtual void showMaximized (); 58 virtual void showMaximized ();
51 void configureAgenda( int ); 59 void configureAgenda( int );
52 void recieve( const QCString& msg, const QByteArray& data ); 60 void recieve( const Q3CString& msg, const QByteArray& data );
53 void receiveStart( const QCString& msg, const QByteArray& data ); 61 void receiveStart( const Q3CString& msg, const QByteArray& data );
54 protected slots: 62 protected slots:
55 void autoSaveWarning(); 63 void autoSaveWarning();
56 void loadDataAfterStart(); 64 void loadDataAfterStart();
@@ -124,7 +132,7 @@ class MainWindow : public QMainWindow
124 private: 132 private:
125 bool mAutoSaveDisabled; 133 bool mAutoSaveDisabled;
126 bool checkAutosave(); 134 bool checkAutosave();
127 QCString mCStringMess; 135 Q3CString mCStringMess;
128 QByteArray mByteData; 136 QByteArray mByteData;
129 137
130 //void setMenuBar( QMenuBar * ); 138 //void setMenuBar( QMenuBar * );
@@ -132,7 +140,7 @@ class MainWindow : public QMainWindow
132#ifndef DESKTOP_VERSION 140#ifndef DESKTOP_VERSION
133 QCopChannel* infrared; 141 QCopChannel* infrared;
134#endif 142#endif
135 QAction* brAction; 143 Q3Action* brAction;
136 KSyncManager* mSyncManager; 144 KSyncManager* mSyncManager;
137 bool mClosed; 145 bool mClosed;
138 void saveOnClose(); 146 void saveOnClose();
@@ -144,38 +152,38 @@ class MainWindow : public QMainWindow
144 QPEToolBar *navigatorToolBar; 152 QPEToolBar *navigatorToolBar;
145 QPEToolBar *filterToolBar; 153 QPEToolBar *filterToolBar;
146 KMenuBar *filterMenubar; 154 KMenuBar *filterMenubar;
147 QPopupMenu * filterPopupMenu; 155 Q3PopupMenu * filterPopupMenu;
148 QPopupMenu * mCurrentItemMenu; 156 Q3PopupMenu * mCurrentItemMenu;
149 void initActions(); 157 void initActions();
150 void setDefaultPreferences(); 158 void setDefaultPreferences();
151 void resizeEvent( QResizeEvent* e); 159 void resizeEvent( QResizeEvent* e);
152 void keyPressEvent ( QKeyEvent * ) ; 160 void keyPressEvent ( QKeyEvent * ) ;
153 void keyReleaseEvent ( QKeyEvent * ) ; 161 void keyReleaseEvent ( QKeyEvent * ) ;
154 QPopupMenu *configureToolBarMenu; 162 Q3PopupMenu *configureToolBarMenu;
155 QPopupMenu *selectFilterMenu; 163 Q3PopupMenu *selectFilterMenu;
156 QPopupMenu *selectFilterMenuTB; 164 Q3PopupMenu *selectFilterMenuTB;
157 QPopupMenu *configureAgendaMenu, *syncMenu; 165 Q3PopupMenu *configureAgendaMenu, *syncMenu;
158 CalendarLocal *mCalendar; 166 CalendarLocal *mCalendar;
159 CalendarView *mView; 167 CalendarView *mView;
160 QAction *mNewSubTodoAction; 168 Q3Action *mNewSubTodoAction;
161 QAction *mWeekAction; 169 Q3Action *mWeekAction;
162 QFont mWeekFont; 170 QFont mWeekFont;
163 QPixmap mWeekPixmap; 171 QPixmap mWeekPixmap;
164 QColor mWeekBgColor; 172 QColor mWeekBgColor;
165 173
166 QAction *mShowAction; 174 Q3Action *mShowAction;
167 QAction *mEditAction; 175 Q3Action *mEditAction;
168 QAction *mDeleteAction; 176 Q3Action *mDeleteAction;
169 QAction *mCloneAction; 177 Q3Action *mCloneAction;
170 QAction *mMoveAction; 178 Q3Action *mMoveAction;
171 QAction *mBeamAction; 179 Q3Action *mBeamAction;
172 QAction *mCancelAction; 180 Q3Action *mCancelAction;
173 QAction *mPrintSelAction; 181 Q3Action *mPrintSelAction;
174 182
175 QAction *mToggleNav; 183 Q3Action *mToggleNav;
176 QAction *mToggleFilter; 184 Q3Action *mToggleFilter;
177 QAction *mToggleAllday; 185 Q3Action *mToggleAllday;
178 QAction *actionFilterMenuTB; 186 Q3Action *actionFilterMenuTB;
179 187
180 void closeEvent( QCloseEvent* ce ); 188 void closeEvent( QCloseEvent* ce );
181 QTimer mSaveTimer; 189 QTimer mSaveTimer;
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f6a1a6a..59c3e45 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -26,10 +26,13 @@
26#include <qtooltip.h> 26#include <qtooltip.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qframe.h> 29#include <q3frame.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qpopupmenu.h> 31#include <q3popupmenu.h>
32#include <qapplication.h> 32#include <qapplication.h>
33#include <QDesktopWidget>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
33 36
34#include <kdebug.h> 37#include <kdebug.h>
35#include <klocale.h> 38#include <klocale.h>
@@ -53,11 +56,11 @@
53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) 56NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name )
54 : QWidget( parent, name ) 57 : QWidget( parent, name )
55{ 58{
56 QBoxLayout *topLayout = new QHBoxLayout( this ); 59 Q3BoxLayout *topLayout = new Q3HBoxLayout( this );
57 60
58 // Set up the control buttons and date label 61 // Set up the control buttons and date label
59 mCtrlFrame = new QFrame( this ); 62 mCtrlFrame = new Q3Frame( this );
60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); 63 mCtrlFrame->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised);
61 mCtrlFrame->setLineWidth(1); 64 mCtrlFrame->setLineWidth(1);
62 65
63 topLayout->addWidget( mCtrlFrame ); 66 topLayout->addWidget( mCtrlFrame );
@@ -129,7 +132,7 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
129 132
130 133
131 // set up control frame layout 134 // set up control frame layout
132 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); 135 Q3BoxLayout *ctrlLayout = new Q3HBoxLayout( mCtrlFrame, 1 );
133 ctrlLayout->addWidget( mPrevYear, 3 ); 136 ctrlLayout->addWidget( mPrevYear, 3 );
134 ctrlLayout->addWidget( mPrevMonth, 3 ); 137 ctrlLayout->addWidget( mPrevMonth, 3 );
135 ctrlLayout->addWidget( mPrevWeek, 3 ); 138 ctrlLayout->addWidget( mPrevWeek, 3 );
@@ -150,13 +153,13 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
150 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) ); 153 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
151 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); 154 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
152 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); 155 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
153 mPrevYear->setFocusPolicy(NoFocus); 156 mPrevYear->setFocusPolicy(Qt::NoFocus);
154 mPrevMonth->setFocusPolicy(NoFocus); 157 mPrevMonth->setFocusPolicy(Qt::NoFocus);
155 mNextMonth->setFocusPolicy(NoFocus); 158 mNextMonth->setFocusPolicy(Qt::NoFocus);
156 mPrevWeek->setFocusPolicy(NoFocus); 159 mPrevWeek->setFocusPolicy(Qt::NoFocus);
157 mNextWeek->setFocusPolicy(NoFocus); 160 mNextWeek->setFocusPolicy(Qt::NoFocus);
158 mNextYear->setFocusPolicy(NoFocus); 161 mNextYear->setFocusPolicy(Qt::NoFocus);
159 mSelectMonth->setFocusPolicy(NoFocus); 162 mSelectMonth->setFocusPolicy(Qt::NoFocus);
160 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); 163 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
161 164
162} 165}
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 9ccef14..a1880f5 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -27,9 +27,12 @@
27#include <libkcal/incidencebase.h> 27#include <libkcal/incidencebase.h>
28 28
29#include <qwidget.h> 29#include <qwidget.h>
30//Added by qt3to4:
31#include <Q3Frame>
32#include <QLabel>
30 33
31class QPushButton; 34class QPushButton;
32class QFrame; 35class Q3Frame;
33class QLabel; 36class QLabel;
34 37
35class NavigatorBar: public QWidget 38class NavigatorBar: public QWidget
@@ -60,7 +63,7 @@ class NavigatorBar: public QWidget
60 int mCurrentHei; 63 int mCurrentHei;
61 int mCurrentMinWid; 64 int mCurrentMinWid;
62 int mCurrentButtonMinWid; 65 int mCurrentButtonMinWid;
63 QFrame *mCtrlFrame; 66 Q3Frame *mCtrlFrame;
64 67
65 QPushButton *mPrevYear; 68 QPushButton *mPrevYear;
66 QPushButton *mPrevMonth; 69 QPushButton *mPrevMonth;
diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp
index 7253c8e..ab31274 100644
--- a/korganizer/outgoingdialog.cpp
+++ b/korganizer/outgoingdialog.cpp
@@ -21,7 +21,7 @@
21 21
22#include <qfile.h> 22#include <qfile.h>
23#include <qdir.h> 23#include <qdir.h>
24#include <qtextstream.h> 24#include <q3textstream.h>
25 25
26#include <kglobal.h> 26#include <kglobal.h>
27#include <klocale.h> 27#include <klocale.h>
@@ -44,10 +44,10 @@
44#include "koeventviewerdialog.h" 44#include "koeventviewerdialog.h"
45#include "docprefs.h" 45#include "docprefs.h"
46 46
47ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev, 47ScheduleItemOut::ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev,
48 Scheduler::Method method, 48 Scheduler::Method method,
49 const QString &recipients) 49 const QString &recipients)
50 : QListViewItem(parent) 50 : Q3ListViewItem(parent)
51{ 51{
52 mIncidence = ev; 52 mIncidence = ev;
53 mMethod = method; 53 mMethod = method;
@@ -123,7 +123,7 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev,
123 123
124OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent, 124OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
125 const char* name,bool modal, 125 const char* name,bool modal,
126 WFlags fl) 126 Qt::WFlags fl)
127 : OutgoingDialog_base(parent,name,modal,fl) 127 : OutgoingDialog_base(parent,name,modal,fl)
128{ 128{
129 mCalendar = calendar; 129 mCalendar = calendar;
@@ -139,12 +139,12 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent,
139 mScheduler = new DummyScheduler(mCalendar); 139 mScheduler = new DummyScheduler(mCalendar);
140#endif 140#endif
141 } 141 }
142 mMessageListView->setColumnAlignment(1,AlignHCenter); 142 mMessageListView->setColumnAlignment(1,Qt::AlignHCenter);
143 mMessageListView->setColumnAlignment(2,AlignHCenter); 143 mMessageListView->setColumnAlignment(2,Qt::AlignHCenter);
144 mMessageListView->setColumnAlignment(3,AlignHCenter); 144 mMessageListView->setColumnAlignment(3,Qt::AlignHCenter);
145 mMessageListView->setColumnAlignment(4,AlignHCenter); 145 mMessageListView->setColumnAlignment(4,Qt::AlignHCenter);
146 QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), 146 QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)),
147 this,SLOT(showEvent(QListViewItem *))); 147 this,SLOT(showEvent(Q3ListViewItem *)));
148 mDocPrefs = new DocPrefs("groupschedule"); 148 mDocPrefs = new DocPrefs("groupschedule");
149 loadMessages(); 149 loadMessages();
150} 150}
@@ -236,7 +236,7 @@ void OutgoingDialog::deleteItem()
236 emit numMessagesChanged(mMessageListView->childCount()); 236 emit numMessagesChanged(mMessageListView->childCount());
237} 237}
238 238
239void OutgoingDialog::showEvent(QListViewItem *qitem) 239void OutgoingDialog::showEvent(Q3ListViewItem *qitem)
240{ 240{
241 ScheduleItemOut *item = (ScheduleItemOut *)qitem; 241 ScheduleItemOut *item = (ScheduleItemOut *)qitem;
242 Event *event = 0; 242 Event *event = 0;
@@ -294,7 +294,7 @@ bool OutgoingDialog::saveMessage(IncidenceBase *incidence,Scheduler::Method meth
294{ 294{
295 KTempFile ktfile(locateLocal("data","korganizer/outgoing/"),"ics"); 295 KTempFile ktfile(locateLocal("data","korganizer/outgoing/"),"ics");
296 QString messageText = mFormat->createScheduleMessage(incidence,method); 296 QString messageText = mFormat->createScheduleMessage(incidence,method);
297 QTextStream *qts = ktfile.textStream(); 297 Q3TextStream *qts = ktfile.textStream();
298 *qts << messageText; 298 *qts << messageText;
299 *qts << "METHOD-BEGIN:" << endl << method << endl << ":METHOD-END" << endl; 299 *qts << "METHOD-BEGIN:" << endl << method << endl << ":METHOD-END" << endl;
300 *qts << "RECIPIENTS-BEGIN:" << endl << recipients << endl << ":RECIPIENTS-END" << endl; 300 *qts << "RECIPIENTS-BEGIN:" << endl << recipients << endl << ":RECIPIENTS-END" << endl;
@@ -330,11 +330,11 @@ void OutgoingDialog::loadMessages()
330 if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true; 330 if (iter.data() == outgoingDirName + "/" + (*it)) inserted = true;
331 } 331 }
332 if (!inserted) { 332 if (!inserted) {
333 if (!f.open(IO_ReadOnly)) { 333 if (!f.open(QIODevice::ReadOnly)) {
334 kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'" 334 kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'"
335 << (*it) << "'" << endl; 335 << (*it) << "'" << endl;
336 } else { 336 } else {
337 QTextStream t(&f); 337 Q3TextStream t(&f);
338 QString messageString = t.read(); 338 QString messageString = t.read();
339 ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar, 339 ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar,
340 messageString); 340 messageString);
diff --git a/korganizer/outgoingdialog.h b/korganizer/outgoingdialog.h
index a3d561a..e727087 100644
--- a/korganizer/outgoingdialog.h
+++ b/korganizer/outgoingdialog.h
@@ -23,7 +23,7 @@
23#ifndef OUTGOINGDIALOG_H 23#ifndef OUTGOINGDIALOG_H
24#define OUTGOINGDIALOG_H 24#define OUTGOINGDIALOG_H
25 25
26#include <qlistview.h> 26#include <q3listview.h>
27#include <qmap.h> 27#include <qmap.h>
28#include <qstring.h> 28#include <qstring.h>
29 29
@@ -34,10 +34,10 @@
34 34
35using namespace KCal; 35using namespace KCal;
36 36
37class ScheduleItemOut : public QListViewItem 37class ScheduleItemOut : public Q3ListViewItem
38{ 38{
39 public: 39 public:
40 ScheduleItemOut(QListView *parent,IncidenceBase *ev, 40 ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev,
41 Scheduler::Method method, const QString &recipients=QString::null); 41 Scheduler::Method method, const QString &recipients=QString::null);
42 virtual ~ScheduleItemOut() {} 42 virtual ~ScheduleItemOut() {}
43 43
@@ -56,7 +56,7 @@ class OutgoingDialog : public OutgoingDialog_base
56 Q_OBJECT 56 Q_OBJECT
57 public: 57 public:
58 OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0, 58 OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0,
59 bool modal=false,WFlags fl=0); 59 bool modal=false,Qt::WFlags fl=0);
60 ~OutgoingDialog(); 60 ~OutgoingDialog();
61 61
62 bool addMessage(IncidenceBase *,Scheduler::Method); 62 bool addMessage(IncidenceBase *,Scheduler::Method);
@@ -72,7 +72,7 @@ class OutgoingDialog : public OutgoingDialog_base
72 protected slots: 72 protected slots:
73 void send(); 73 void send();
74 void deleteItem(); 74 void deleteItem();
75 void showEvent(QListViewItem *); 75 void showEvent(Q3ListViewItem *);
76 76
77 private: 77 private:
78 bool saveMessage(IncidenceBase *,Scheduler::Method,const QString &recipients=0); 78 bool saveMessage(IncidenceBase *,Scheduler::Method,const QString &recipients=0);
diff --git a/korganizer/outgoingdialog_base.cpp b/korganizer/outgoingdialog_base.cpp
index 1873b44..be8a870 100644
--- a/korganizer/outgoingdialog_base.cpp
+++ b/korganizer/outgoingdialog_base.cpp
@@ -11,12 +11,14 @@
11#include "outgoingdialog_base.h" 11#include "outgoingdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlistview.h> 15#include <q3listview.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlayout.h> 17#include <qlayout.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <q3whatsthis.h>
20//Added by qt3to4:
21#include <Q3GridLayout>
20 22
21/* 23/*
22 * Constructs a OutgoingDialog_base as a child of 'parent', with the 24 * Constructs a OutgoingDialog_base as a child of 'parent', with the
@@ -25,23 +27,23 @@
25 * The dialog will by default be modeless, unless you set 'modal' to 27 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog. 28 * TRUE to construct a modal dialog.
27 */ 29 */
28OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 30OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
29 : QDialog( parent, name, modal, fl ) 31 : QDialog( parent, name, modal, fl )
30 32
31{ 33{
32 if ( !name ) 34 if ( !name )
33 setName( "OutgoingDialog_base" ); 35 setName( "OutgoingDialog_base" );
34 OutgoingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout"); 36 OutgoingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout");
35 37
36 mMessageListView = new QListView( this, "mMessageListView" ); 38 mMessageListView = new Q3ListView( this, "mMessageListView" );
37 mMessageListView->addColumn( tr2i18n( "Summary" ) ); 39 mMessageListView->addColumn( tr2i18n( "Summary" ) );
38 mMessageListView->addColumn( tr2i18n( "Start Date" ) ); 40 mMessageListView->addColumn( tr2i18n( "Start Date" ) );
39 mMessageListView->addColumn( tr2i18n( "Start Time" ) ); 41 mMessageListView->addColumn( tr2i18n( "Start Time" ) );
40 mMessageListView->addColumn( tr2i18n( "End Date" ) ); 42 mMessageListView->addColumn( tr2i18n( "End Date" ) );
41 mMessageListView->addColumn( tr2i18n( "End Time" ) ); 43 mMessageListView->addColumn( tr2i18n( "End Time" ) );
42 mMessageListView->addColumn( tr2i18n( "Method" ) ); 44 mMessageListView->addColumn( tr2i18n( "Method" ) );
43 mMessageListView->setFrameShape( QListView::StyledPanel ); 45 mMessageListView->setFrameShape( Q3ListView::StyledPanel );
44 mMessageListView->setFrameShadow( QListView::Sunken ); 46 mMessageListView->setFrameShadow( Q3ListView::Sunken );
45 mMessageListView->setAllColumnsShowFocus( TRUE ); 47 mMessageListView->setAllColumnsShowFocus( TRUE );
46 48
47 OutgoingDialog_baseLayout->addMultiCellWidget( mMessageListView, 0, 3, 0, 0 ); 49 OutgoingDialog_baseLayout->addMultiCellWidget( mMessageListView, 0, 3, 0, 0 );
diff --git a/korganizer/outgoingdialog_base.h b/korganizer/outgoingdialog_base.h
index af71bb1..5e81725 100644
--- a/korganizer/outgoingdialog_base.h
+++ b/korganizer/outgoingdialog_base.h
@@ -12,12 +12,16 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3GridLayout>
17class QHBoxLayout; 17#include <Q3HBoxLayout>
18class QGridLayout; 18#include <Q3VBoxLayout>
19class QListView; 19
20class QListViewItem; 20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
23class Q3ListView;
24class Q3ListViewItem;
21class QPushButton; 25class QPushButton;
22 26
23class OutgoingDialog_base : public QDialog 27class OutgoingDialog_base : public QDialog
@@ -25,16 +29,16 @@ class OutgoingDialog_base : public QDialog
25 Q_OBJECT 29 Q_OBJECT
26 30
27public: 31public:
28 OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 32 OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
29 ~OutgoingDialog_base(); 33 ~OutgoingDialog_base();
30 34
31 QListView* mMessageListView; 35 Q3ListView* mMessageListView;
32 QPushButton* PushButton5; 36 QPushButton* PushButton5;
33 QPushButton* PushButton7; 37 QPushButton* PushButton7;
34 QPushButton* PushButton6; 38 QPushButton* PushButton6;
35 39
36protected: 40protected:
37 QGridLayout* OutgoingDialog_baseLayout; 41 Q3GridLayout* OutgoingDialog_baseLayout;
38 42
39protected slots: 43protected slots:
40 virtual void languageChange(); 44 virtual void languageChange();
diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp
index 2ae6720..ede9840 100644
--- a/korganizer/publishdialog.cpp
+++ b/korganizer/publishdialog.cpp
@@ -35,13 +35,13 @@
35#include "publishdialog.h" 35#include "publishdialog.h"
36 36
37PublishDialog::PublishDialog(QWidget* parent, const char* name, 37PublishDialog::PublishDialog(QWidget* parent, const char* name,
38 bool modal, WFlags fl) 38 bool modal, Qt::WFlags fl)
39 : PublishDialog_base(parent,name,modal,fl) 39 : PublishDialog_base(parent,name,modal,fl)
40{ 40{
41 setCaption(i18n("Select Addresses")); 41 setCaption(i18n("Select Addresses"));
42 mNameLineEdit->setEnabled(false); 42 mNameLineEdit->setEnabled(false);
43 mEmailLineEdit->setEnabled(false); 43 mEmailLineEdit->setEnabled(false);
44 connect(mAddressListView,SIGNAL(selectionChanged(QListViewItem *)), 44 connect(mAddressListView,SIGNAL(selectionChanged(Q3ListViewItem *)),
45 SLOT(updateInput())); 45 SLOT(updateInput()));
46} 46}
47 47
@@ -53,7 +53,7 @@ void PublishDialog::addAttendee(Attendee *attendee)
53{ 53{
54 mNameLineEdit->setEnabled(true); 54 mNameLineEdit->setEnabled(true);
55 mEmailLineEdit->setEnabled(true); 55 mEmailLineEdit->setEnabled(true);
56 QListViewItem *item = new QListViewItem(mAddressListView); 56 Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
57 item->setText(0,attendee->name()); 57 item->setText(0,attendee->name());
58 item->setText(1,attendee->email()); 58 item->setText(1,attendee->email());
59 mAddressListView->insertItem(item); 59 mAddressListView->insertItem(item);
@@ -62,7 +62,7 @@ void PublishDialog::addAttendee(Attendee *attendee)
62QString PublishDialog::addresses() 62QString PublishDialog::addresses()
63{ 63{
64 QString to = ""; 64 QString to = "";
65 QListViewItem *item; 65 Q3ListViewItem *item;
66 int i, count; 66 int i, count;
67 count = mAddressListView->childCount(); 67 count = mAddressListView->childCount();
68 for (i=0;i<count;i++) { 68 for (i=0;i<count;i++) {
@@ -80,7 +80,7 @@ void PublishDialog::addItem()
80{ 80{
81 mNameLineEdit->setEnabled(true); 81 mNameLineEdit->setEnabled(true);
82 mEmailLineEdit->setEnabled(true); 82 mEmailLineEdit->setEnabled(true);
83 QListViewItem *item = new QListViewItem(mAddressListView); 83 Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
84 mAddressListView->insertItem(item); 84 mAddressListView->insertItem(item);
85 mAddressListView->setSelected(item,true); 85 mAddressListView->setSelected(item,true);
86 mNameLineEdit->setText(i18n("(EmptyName)")); 86 mNameLineEdit->setText(i18n("(EmptyName)"));
@@ -89,7 +89,7 @@ void PublishDialog::addItem()
89 89
90void PublishDialog::removeItem() 90void PublishDialog::removeItem()
91{ 91{
92 QListViewItem *item; 92 Q3ListViewItem *item;
93 item = mAddressListView->selectedItem(); 93 item = mAddressListView->selectedItem();
94 if (!item) return; 94 if (!item) return;
95 mAddressListView->takeItem(item); 95 mAddressListView->takeItem(item);
@@ -119,7 +119,7 @@ void PublishDialog::openAddressbook()
119 a = addressList[i]; 119 a = addressList[i];
120 mNameLineEdit->setEnabled(true); 120 mNameLineEdit->setEnabled(true);
121 mEmailLineEdit->setEnabled(true); 121 mEmailLineEdit->setEnabled(true);
122 QListViewItem *item = new QListViewItem(mAddressListView); 122 Q3ListViewItem *item = new Q3ListViewItem(mAddressListView);
123 mAddressListView->setSelected(item,true); 123 mAddressListView->setSelected(item,true);
124 mNameLineEdit->setText(a.realName()); 124 mNameLineEdit->setText(a.realName());
125 mEmailLineEdit->setText(a.preferredEmail()); 125 mEmailLineEdit->setText(a.preferredEmail());
@@ -131,7 +131,7 @@ void PublishDialog::openAddressbook()
131 131
132void PublishDialog::updateItem() 132void PublishDialog::updateItem()
133{ 133{
134 QListViewItem *item; 134 Q3ListViewItem *item;
135 item = mAddressListView->selectedItem(); 135 item = mAddressListView->selectedItem();
136 if (!item) return; 136 if (!item) return;
137 item->setText(0,mNameLineEdit->text()); 137 item->setText(0,mNameLineEdit->text());
@@ -140,7 +140,7 @@ void PublishDialog::updateItem()
140 140
141void PublishDialog::updateInput() 141void PublishDialog::updateInput()
142{ 142{
143 QListViewItem *item; 143 Q3ListViewItem *item;
144 item = mAddressListView->selectedItem(); 144 item = mAddressListView->selectedItem();
145 if (!item) return; 145 if (!item) return;
146 mNameLineEdit->setEnabled(true); 146 mNameLineEdit->setEnabled(true);
diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h
index 338603c..3ffeec4 100644
--- a/korganizer/publishdialog.h
+++ b/korganizer/publishdialog.h
@@ -23,7 +23,7 @@
23#ifndef PUBLISHDIALOG_H 23#ifndef PUBLISHDIALOG_H
24#define PUBLISHDIALOG_H 24#define PUBLISHDIALOG_H
25 25
26#include <qlistview.h> 26#include <q3listview.h>
27#include <libkcal/attendee.h> 27#include <libkcal/attendee.h>
28 28
29#include "publishdialog_base.h" 29#include "publishdialog_base.h"
@@ -35,7 +35,7 @@ class PublishDialog : public PublishDialog_base
35 Q_OBJECT 35 Q_OBJECT
36 public: 36 public:
37 PublishDialog(QWidget* parent=0,const char* name=0, 37 PublishDialog(QWidget* parent=0,const char* name=0,
38 bool modal=true,WFlags fl=0); 38 bool modal=true,Qt::WFlags fl=0);
39 ~PublishDialog(); 39 ~PublishDialog();
40 40
41 void addAttendee(Attendee *attendee); 41 void addAttendee(Attendee *attendee);
diff --git a/korganizer/publishdialog_base.cpp b/korganizer/publishdialog_base.cpp
index 683f7e9..ce5c542 100644
--- a/korganizer/publishdialog_base.cpp
+++ b/korganizer/publishdialog_base.cpp
@@ -11,15 +11,18 @@
11#include "publishdialog_base.h" 11#include "publishdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qframe.h> 14#include <q3frame.h>
15#include <qheader.h> 15#include <q3header.h>
16#include <qlabel.h> 16#include <qlabel.h>
17#include <qlineedit.h> 17#include <qlineedit.h>
18#include <qlistview.h> 18#include <q3listview.h>
19#include <qpushbutton.h> 19#include <qpushbutton.h>
20#include <qlayout.h> 20#include <qlayout.h>
21#include <qtooltip.h> 21#include <qtooltip.h>
22#include <qwhatsthis.h> 22#include <q3whatsthis.h>
23//Added by qt3to4:
24#include <Q3GridLayout>
25#include <Q3HBoxLayout>
23 26
24/* 27/*
25 * Constructs a PublishDialog_base as a child of 'parent', with the 28 * Constructs a PublishDialog_base as a child of 'parent', with the
@@ -28,15 +31,15 @@
28 * The dialog will by default be modeless, unless you set 'modal' to 31 * The dialog will by default be modeless, unless you set 'modal' to
29 * TRUE to construct a modal dialog. 32 * TRUE to construct a modal dialog.
30 */ 33 */
31PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 34PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
32 : QDialog( parent, name, modal, fl ) 35 : QDialog( parent, name, modal, fl )
33 36
34{ 37{
35 if ( !name ) 38 if ( !name )
36 setName( "PublishDialog_base" ); 39 setName( "PublishDialog_base" );
37 PublishDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout"); 40 PublishDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout");
38 41
39 mAddressListView = new QListView( this, "mAddressListView" ); 42 mAddressListView = new Q3ListView( this, "mAddressListView" );
40 mAddressListView->addColumn( tr2i18n( "Name" ) ); 43 mAddressListView->addColumn( tr2i18n( "Name" ) );
41 mAddressListView->addColumn( tr2i18n( "Email" ) ); 44 mAddressListView->addColumn( tr2i18n( "Email" ) );
42 45
@@ -72,14 +75,14 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool
72 QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding ); 75 QSpacerItem* spacer = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding );
73 PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 ); 76 PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 );
74 77
75 Line2 = new QFrame( this, "Line2" ); 78 Line2 = new Q3Frame( this, "Line2" );
76 Line2->setFrameShape( QFrame::HLine ); 79 Line2->setFrameShape( Q3Frame::HLine );
77 Line2->setFrameShadow( QFrame::Sunken ); 80 Line2->setFrameShadow( Q3Frame::Sunken );
78 Line2->setFrameShape( QFrame::HLine ); 81 Line2->setFrameShape( Q3Frame::HLine );
79 82
80 PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 ); 83 PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 );
81 84
82 layout95 = new QHBoxLayout( 0, 0, 6, "layout95"); 85 layout95 = new Q3HBoxLayout( 0, 0, 6, "layout95");
83 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 86 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
84 layout95->addItem( spacer_2 ); 87 layout95->addItem( spacer_2 );
85 88
diff --git a/korganizer/publishdialog_base.h b/korganizer/publishdialog_base.h
index 932474e..d1b40ae 100644
--- a/korganizer/publishdialog_base.h
+++ b/korganizer/publishdialog_base.h
@@ -12,15 +12,21 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15//Added by qt3to4:
16#include <Q3VBoxLayout>
17#include <Q3Frame>
18#include <Q3GridLayout>
19#include <Q3HBoxLayout>
20#include <QLabel>
15 21
16class QVBoxLayout; 22class Q3VBoxLayout;
17class QHBoxLayout; 23class Q3HBoxLayout;
18class QGridLayout; 24class Q3GridLayout;
19class QFrame; 25class Q3Frame;
20class QLabel; 26class QLabel;
21class QLineEdit; 27class QLineEdit;
22class QListView; 28class Q3ListView;
23class QListViewItem; 29class Q3ListViewItem;
24class QPushButton; 30class QPushButton;
25 31
26class PublishDialog_base : public QDialog 32class PublishDialog_base : public QDialog
@@ -28,10 +34,10 @@ class PublishDialog_base : public QDialog
28 Q_OBJECT 34 Q_OBJECT
29 35
30public: 36public:
31 PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 37 PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
32 ~PublishDialog_base(); 38 ~PublishDialog_base();
33 39
34 QListView* mAddressListView; 40 Q3ListView* mAddressListView;
35 QLabel* TextLabel1; 41 QLabel* TextLabel1;
36 QLabel* TextLabel2; 42 QLabel* TextLabel2;
37 QLineEdit* mEmailLineEdit; 43 QLineEdit* mEmailLineEdit;
@@ -39,13 +45,13 @@ public:
39 QPushButton* PushButton10; 45 QPushButton* PushButton10;
40 QPushButton* PushButton12; 46 QPushButton* PushButton12;
41 QPushButton* PushButton11; 47 QPushButton* PushButton11;
42 QFrame* Line2; 48 Q3Frame* Line2;
43 QPushButton* PushButton9; 49 QPushButton* PushButton9;
44 QPushButton* PushButton8; 50 QPushButton* PushButton8;
45 51
46protected: 52protected:
47 QGridLayout* PublishDialog_baseLayout; 53 Q3GridLayout* PublishDialog_baseLayout;
48 QHBoxLayout* layout95; 54 Q3HBoxLayout* layout95;
49 55
50protected slots: 56protected slots:
51 virtual void languageChange(); 57 virtual void languageChange();
diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp
index 3544081..35bedba 100644
--- a/korganizer/savetemplatedialog.cpp
+++ b/korganizer/savetemplatedialog.cpp
@@ -22,6 +22,9 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3VBoxLayout>
27#include <Q3Frame>
25 28
26#include <keditlistbox.h> 29#include <keditlistbox.h>
27#include <klocale.h> 30#include <klocale.h>
@@ -35,8 +38,8 @@ SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent )
35 true, false ), 38 true, false ),
36 mType( type ) 39 mType( type )
37{ 40{
38 QFrame *topFrame = plainPage(); 41 Q3Frame *topFrame = plainPage();
39 QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); 42 Q3VBoxLayout *topLayout = new Q3VBoxLayout( topFrame, 0, spacingHint() );
40 43
41 mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame, 44 mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame,
42 0, false, KEditListBox::Add | 45 0, false, KEditListBox::Add |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 9cfdc35..105b844 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -24,14 +24,21 @@
24 24
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qgroupbox.h> 27#include <q3groupbox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qlabel.h> 30#include <qlabel.h>
30#include <qlistview.h> 31#include <q3listview.h>
31#include <qwhatsthis.h> 32#include <q3whatsthis.h>
32#include <qlineedit.h> 33#include <qlineedit.h>
33#include <qpushbutton.h> 34#include <qpushbutton.h>
34#include <qhbuttongroup.h> 35//#include <qhbuttongroup.h>
36//Added by qt3to4:
37#include <Q3HBoxLayout>
38#include <Q3Frame>
39#include <Q3PtrList>
40#include <QKeyEvent>
41#include <Q3VBoxLayout>
35#include <klocale.h> 42#include <klocale.h>
36#include <kmessagebox.h> 43#include <kmessagebox.h>
37 44
@@ -46,15 +53,15 @@
46#include "searchdialog.h" 53#include "searchdialog.h"
47 54
48SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 55SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
49 : QVBox( 0 ) 56 : Q3VBox( 0 )
50 57
51{ 58{
52 mCalendar = calendar; 59 mCalendar = calendar;
53 QFrame *topFrame = new QFrame( this ) ;//plainPage(); 60 Q3Frame *topFrame = new Q3Frame( this ) ;//plainPage();
54 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); 61 Q3VBoxLayout *layout = new Q3VBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
55 62
56 // Search expression 63 // Search expression
57 QHBoxLayout *subLayout = new QHBoxLayout(); 64 Q3HBoxLayout *subLayout = new Q3HBoxLayout();
58 layout->addLayout(subLayout); 65 layout->addLayout(subLayout);
59 /* 66 /*
60 searchLabel = new QLabel(topFrame); 67 searchLabel = new QLabel(topFrame);
@@ -98,7 +105,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
98 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 105 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
99 // topFrame); 106 // topFrame);
100 107
101 incidenceGroup = new QHBox( topFrame ); 108 incidenceGroup = new Q3HBox( topFrame );
102 layout->addWidget(incidenceGroup); 109 layout->addWidget(incidenceGroup);
103 110
104 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 111 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
@@ -106,7 +113,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
106 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 113 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
107 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 114 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
108 115
109 subjectGroup = new QHBox( topFrame ); 116 subjectGroup = new Q3HBox( topFrame );
110 layout->addWidget(subjectGroup); 117 layout->addWidget(subjectGroup);
111 118
112 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); 119 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
@@ -114,7 +121,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
114 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); 121 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup);
115 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 122 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
116 123
117 attendeeGroup = new QHBox( topFrame ); 124 attendeeGroup = new Q3HBox( topFrame );
118 layout->addWidget(attendeeGroup ); 125 layout->addWidget(attendeeGroup );
119 new QLabel( i18n("Attendee:"),attendeeGroup ); 126 new QLabel( i18n("Attendee:"),attendeeGroup );
120 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 127 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
@@ -127,7 +134,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
127 QWidget *rangeWidget = new QWidget(topFrame); 134 QWidget *rangeWidget = new QWidget(topFrame);
128 int space = KDialog::spacingHint(); 135 int space = KDialog::spacingHint();
129 if ( QApplication::desktop()->width() <= 240 ) space = 1; 136 if ( QApplication::desktop()->width() <= 240 ) space = 1;
130 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,space); 137 Q3HBoxLayout *rangeLayout = new Q3HBoxLayout(rangeWidget,0,space);
131 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); 138 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
132 mStartDate = new KDateEdit(rangeWidget); 139 mStartDate = new KDateEdit(rangeWidget);
133 rangeLayout->addWidget(mStartDate); 140 rangeLayout->addWidget(mStartDate);
@@ -135,7 +142,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
135 mEndDate = new KDateEdit(rangeWidget); 142 mEndDate = new KDateEdit(rangeWidget);
136 mEndDate->setDate(QDate::currentDate().addDays(365)); 143 mEndDate->setDate(QDate::currentDate().addDays(365));
137 rangeLayout->addWidget(mEndDate); 144 rangeLayout->addWidget(mEndDate);
138 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); 145 QToolButton *wt = Q3WhatsThis::whatsThisButton ( rangeWidget );
139 rangeLayout->addWidget( (QWidget*)wt ); 146 rangeLayout->addWidget( (QWidget*)wt );
140 layout->addWidget(rangeWidget); 147 layout->addWidget(rangeWidget);
141 // Results list view 148 // Results list view
@@ -341,7 +348,7 @@ void SearchDialog::updateView()
341 348
342void SearchDialog::search(const QRegExp &re) 349void SearchDialog::search(const QRegExp &re)
343{ 350{
344 QPtrList<Event> events; 351 Q3PtrList<Event> events;
345 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 352 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
346 if ( mRefineItems->isChecked() ) events = mMatchedEvents; 353 if ( mRefineItems->isChecked() ) events = mMatchedEvents;
347 mMatchedEvents.clear(); 354 mMatchedEvents.clear();
@@ -419,7 +426,7 @@ void SearchDialog::search(const QRegExp &re)
419 } 426 }
420 } 427 }
421 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 428 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
422 QPtrList<Attendee> tmpAList = ev->attendees(); 429 Q3PtrList<Attendee> tmpAList = ev->attendees();
423 Attendee *a; 430 Attendee *a;
424 for (a = tmpAList.first(); a; a = tmpAList.next()) { 431 for (a = tmpAList.first(); a; a = tmpAList.next()) {
425 if (mSearchAName->isChecked()) { 432 if (mSearchAName->isChecked()) {
@@ -458,7 +465,7 @@ void SearchDialog::search(const QRegExp &re)
458 } 465 }
459 } 466 }
460 } 467 }
461 QPtrList<Todo> todos; 468 Q3PtrList<Todo> todos;
462 469
463 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 470 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
464 if ( mRefineItems->isChecked() ) todos = mMatchedTodos ; 471 if ( mRefineItems->isChecked() ) todos = mMatchedTodos ;
@@ -512,7 +519,7 @@ void SearchDialog::search(const QRegExp &re)
512 } 519 }
513 } 520 }
514 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { 521 if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) {
515 QPtrList<Attendee> tmpAList = tod->attendees(); 522 Q3PtrList<Attendee> tmpAList = tod->attendees();
516 Attendee *a; 523 Attendee *a;
517 for (a = tmpAList.first(); a; a = tmpAList.next()) { 524 for (a = tmpAList.first(); a; a = tmpAList.next()) {
518 if (mSearchAName->isChecked()) { 525 if (mSearchAName->isChecked()) {
@@ -548,7 +555,7 @@ void SearchDialog::search(const QRegExp &re)
548 } 555 }
549 } 556 }
550 557
551 QPtrList<Journal> journals; 558 Q3PtrList<Journal> journals;
552 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { 559 if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) {
553 if ( mRefineItems->isChecked() ) journals = mMatchedJournals ; 560 if ( mRefineItems->isChecked() ) journals = mMatchedJournals ;
554 mMatchedJournals.clear(); 561 mMatchedJournals.clear();
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index 945ff65..5df6116 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -26,8 +26,12 @@
26 26
27#include <qregexp.h> 27#include <qregexp.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29//Added by qt3to4:
30#include <QLabel>
31#include <QKeyEvent>
32#include <Q3PtrList>
29#include <kdialogbase.h> 33#include <kdialogbase.h>
30#include <qvbox.h> 34#include <q3vbox.h>
31 35
32#include <libkcal/calendar.h> 36#include <libkcal/calendar.h>
33 37
@@ -41,7 +45,7 @@ class QLabel;
41class CalendarView; 45class CalendarView;
42 46
43using namespace KCal; 47using namespace KCal;
44class SearchDialog : public QVBox 48class SearchDialog : public Q3VBox
45{ 49{
46 Q_OBJECT 50 Q_OBJECT
47 public: 51 public:
@@ -72,14 +76,14 @@ class SearchDialog : public QVBox
72 76
73 private: 77 private:
74 78
75 QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; 79 Q3HBox *incidenceGroup ,*subjectGroup ,*attendeeGroup;
76 void search(const QRegExp &); 80 void search(const QRegExp &);
77 81
78 Calendar *mCalendar; 82 Calendar *mCalendar;
79 83
80 QPtrList<Event> mMatchedEvents; 84 Q3PtrList<Event> mMatchedEvents;
81 QPtrList<Todo> mMatchedTodos; 85 Q3PtrList<Todo> mMatchedTodos;
82 QPtrList<Journal> mMatchedJournals; 86 Q3PtrList<Journal> mMatchedJournals;
83 87
84 QLabel *searchLabel; 88 QLabel *searchLabel;
85 KLineEdit *searchEdit; 89 KLineEdit *searchEdit;
diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp
index 7137c49..8186ebb 100644
--- a/korganizer/statusdialog.cpp
+++ b/korganizer/statusdialog.cpp
@@ -21,6 +21,9 @@
21#include <qpushbutton.h> 21#include <qpushbutton.h>
22#include <qstringlist.h> 22#include <qstringlist.h>
23#include <qlayout.h> 23#include <qlayout.h>
24//Added by qt3to4:
25#include <Q3VBoxLayout>
26#include <Q3HBoxLayout>
24 27
25#include <kdebug.h> 28#include <kdebug.h>
26#include <klocale.h> 29#include <klocale.h>
@@ -32,11 +35,11 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) :
32{ 35{
33 setCaption(i18n("Set Your Status")); 36 setCaption(i18n("Set Your Status"));
34 37
35 QBoxLayout *topLayout = new QVBoxLayout( this ); 38 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
36 topLayout->setSpacing( spacingHint() ); 39 topLayout->setSpacing( spacingHint() );
37 topLayout->setMargin( marginHint() ); 40 topLayout->setMargin( marginHint() );
38 41
39 QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); 42 Q3BoxLayout *statusLayout = new Q3HBoxLayout( topLayout );
40 43
41 QLabel *text = new QLabel(i18n("Set your status"),this); 44 QLabel *text = new QLabel(i18n("Set your status"),this);
42 statusLayout->addWidget( text ); 45 statusLayout->addWidget( text );
@@ -45,7 +48,7 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) :
45 mStatus->insertStringList(Attendee::statusList()); 48 mStatus->insertStringList(Attendee::statusList());
46 statusLayout->addWidget( mStatus ); 49 statusLayout->addWidget( mStatus );
47 50
48 QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); 51 Q3BoxLayout *buttonLayout = new Q3HBoxLayout( topLayout );
49 52
50 QPushButton *ok = new QPushButton(i18n("&OK"), this); 53 QPushButton *ok = new QPushButton(i18n("&OK"), this);
51 connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) ); 54 connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) );
diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp
index 11be432..a6c3cdc 100644
--- a/korganizer/timeline.cpp
+++ b/korganizer/timeline.cpp
@@ -5,13 +5,13 @@
5#include "timeline.h" 5#include "timeline.h"
6 6
7TimeLine::TimeLine( QWidget *parent, const char *name ) : 7TimeLine::TimeLine( QWidget *parent, const char *name ) :
8 QScrollView( parent, name ) 8 Q3ScrollView( parent, name )
9{ 9{
10 mPixelWidth = 1000; 10 mPixelWidth = 1000;
11 11
12 resizeContents( mPixelWidth, 20 ); 12 resizeContents( mPixelWidth, 20 );
13 13
14 viewport()->setBackgroundMode( PaletteBackground ); 14 viewport()->setBackgroundMode( Qt::PaletteBackground );
15 15
16 setHScrollBarMode(AlwaysOff); 16 setHScrollBarMode(AlwaysOff);
17 setVScrollBarMode(AlwaysOff); 17 setVScrollBarMode(AlwaysOff);
@@ -58,5 +58,5 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end )
58 58
59void TimeLine::setContentsPos( int pos ) 59void TimeLine::setContentsPos( int pos )
60{ 60{
61 QScrollView::setContentsPos ( pos, 0 ); 61 Q3ScrollView::setContentsPos ( pos, 0 );
62} 62}
diff --git a/korganizer/timeline.h b/korganizer/timeline.h
index ab3e5d3..bf301fa 100644
--- a/korganizer/timeline.h
+++ b/korganizer/timeline.h
@@ -1,10 +1,10 @@
1#ifndef TIMELINE_H 1#ifndef TIMELINE_H
2#define TIMELINE_H 2#define TIMELINE_H
3 3
4#include <qscrollview.h> 4#include <q3scrollview.h>
5#include <qdatetime.h> 5#include <qdatetime.h>
6 6
7class TimeLine : public QScrollView 7class TimeLine : public Q3ScrollView
8{ 8{
9 Q_OBJECT 9 Q_OBJECT
10 public: 10 public:
diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp
index df8ff88..0908056 100644
--- a/korganizer/timespanview.cpp
+++ b/korganizer/timespanview.cpp
@@ -4,10 +4,14 @@
4#else 4#else
5#include <qsplitter.h> 5#include <qsplitter.h>
6#endif 6#endif
7#include <qlistview.h> 7#include <q3listview.h>
8#include <qlayout.h> 8#include <qlayout.h>
9#include <qheader.h> 9#include <q3header.h>
10#include <qpushbutton.h> 10#include <qpushbutton.h>
11//Added by qt3to4:
12#include <Q3HBoxLayout>
13#include <Q3VBoxLayout>
14#include <Q3ValueList>
11 15
12#include <klocale.h> 16#include <klocale.h>
13#include <kdebug.h> 17#include <kdebug.h>
@@ -21,7 +25,7 @@
21TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : 25TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
22 QWidget( parent, name ) 26 QWidget( parent, name )
23{ 27{
24 QBoxLayout *topLayout = new QVBoxLayout( this ); 28 Q3BoxLayout *topLayout = new Q3VBoxLayout( this );
25#ifndef DESKTOP_VERSION 29#ifndef DESKTOP_VERSION
26 mSplitter = new QKSplitter( this ); 30 mSplitter = new QKSplitter( this );
27#else 31#else
@@ -29,11 +33,11 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
29#endif 33#endif
30 topLayout->addWidget( mSplitter ); 34 topLayout->addWidget( mSplitter );
31 35
32 mList = new QListView( mSplitter ); 36 mList = new Q3ListView( mSplitter );
33 mList->addColumn( i18n("Summary") ); 37 mList->addColumn( i18n("Summary") );
34 38
35 QWidget *rightPane = new QWidget( mSplitter ); 39 QWidget *rightPane = new QWidget( mSplitter );
36 QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); 40 Q3BoxLayout *rightPaneLayout = new Q3VBoxLayout( rightPane );
37 41
38 mTimeLine = new TimeLine( rightPane ); 42 mTimeLine = new TimeLine( rightPane );
39 mTimeLine->setFixedHeight( mList->header()->height() ); 43 mTimeLine->setFixedHeight( mList->header()->height() );
@@ -42,7 +46,7 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) :
42 mLineView = new LineView( rightPane ); 46 mLineView = new LineView( rightPane );
43 rightPaneLayout->addWidget( mLineView ); 47 rightPaneLayout->addWidget( mLineView );
44 48
45 QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); 49 Q3BoxLayout *buttonLayout = new Q3HBoxLayout( rightPaneLayout );
46 50
47 QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); 51 QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane );
48 connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) ); 52 connect( zoomInButton, SIGNAL( clicked() ), SLOT( zoomIn() ) );
@@ -64,19 +68,19 @@ TimeSpanView::~TimeSpanView()
64{ 68{
65} 69}
66 70
67QValueList<int> TimeSpanView::splitterSizes() 71Q3ValueList<int> TimeSpanView::splitterSizes()
68{ 72{
69 return mSplitter->sizes(); 73 return mSplitter->sizes();
70} 74}
71 75
72void TimeSpanView::setSplitterSizes( QValueList<int> sizes ) 76void TimeSpanView::setSplitterSizes( Q3ValueList<int> sizes )
73{ 77{
74 mSplitter->setSizes( sizes ); 78 mSplitter->setSizes( sizes );
75} 79}
76 80
77void TimeSpanView::addItem( KCal::Event *event ) 81void TimeSpanView::addItem( KCal::Event *event )
78{ 82{
79 new QListViewItem( mList, event->summary() ); 83 new Q3ListViewItem( mList, event->summary() );
80 84
81 QDateTime startDt = event->dtStart(); 85 QDateTime startDt = event->dtStart();
82 QDateTime endDt = event->dtEnd(); 86 QDateTime endDt = event->dtEnd();
diff --git a/korganizer/timespanview.h b/korganizer/timespanview.h
index 34cb1f7..f652374 100644
--- a/korganizer/timespanview.h
+++ b/korganizer/timespanview.h
@@ -2,6 +2,8 @@
2#define TIMESPANVIEW_H 2#define TIMESPANVIEW_H
3 3
4#include <qwidget.h> 4#include <qwidget.h>
5//Added by qt3to4:
6#include <Q3ValueList>
5 7
6#include <libkcal/event.h> 8#include <libkcal/event.h>
7 9
@@ -12,7 +14,7 @@ class QKSplitter;
12class QSplitter; 14class QSplitter;
13#define QKSplitter QSplitter 15#define QKSplitter QSplitter
14#endif 16#endif
15class QListView; 17class Q3ListView;
16class LineView; 18class LineView;
17class TimeLine; 19class TimeLine;
18 20
@@ -26,8 +28,8 @@ class TimeSpanView : public QWidget
26 28
27 void addItem( KCal::Event * ); 29 void addItem( KCal::Event * );
28 30
29 QValueList<int> splitterSizes(); 31 Q3ValueList<int> splitterSizes();
30 void setSplitterSizes( QValueList<int> ); 32 void setSplitterSizes( Q3ValueList<int> );
31 33
32 void clear(); 34 void clear();
33 35
@@ -48,7 +50,7 @@ class TimeSpanView : public QWidget
48 50
49 private: 51 private:
50 QKSplitter *mSplitter; 52 QKSplitter *mSplitter;
51 QListView *mList; 53 Q3ListView *mList;
52 TimeLine *mTimeLine; 54 TimeLine *mTimeLine;
53 LineView *mLineView; 55 LineView *mLineView;
54 56
diff --git a/libetpan/libetpan.pro b/libetpan/libetpan.pro
index 10f51da..909d064 100644
--- a/libetpan/libetpan.pro
+++ b/libetpan/libetpan.pro
@@ -1,9 +1,10 @@
1include( ../variables.pri )
1###################################################################### 2######################################################################
2# Automatically generated by qmake (1.07a) Fri Mar 18 19:27:39 2005 3# Automatically generated by qmake (1.07a) Fri Mar 18 19:27:39 2005
3###################################################################### 4######################################################################
4 5
5TEMPLATE = lib 6TEMPLATE = lib
6 TARGET = microlibetpan 7 TARGET = xmicrolibetpan
7OBJECTS_DIR = obj 8OBJECTS_DIR = obj
8MOC_DIR = moc 9MOC_DIR = moc
9DESTDIR=../bin 10DESTDIR=../bin
@@ -448,3 +449,5 @@ SOURCES += src/data-types/base64.c \
448 src/driver/implementation/pop3/pop3driver_message.c \ 449 src/driver/implementation/pop3/pop3driver_message.c \
449 src/driver/implementation/pop3/pop3driver_tools.c \ 450 src/driver/implementation/pop3/pop3driver_tools.c \
450 src/driver/implementation/pop3/pop3storage.c 451 src/driver/implementation/pop3/pop3storage.c
452#The following line was inserted by qt3to4
453QT += xml qt3support
diff --git a/libetpan/libetpanE.pro b/libetpan/libetpanE.pro
index 4b82196..9ba1a6d 100644
--- a/libetpan/libetpanE.pro
+++ b/libetpan/libetpanE.pro
@@ -3,7 +3,7 @@
3###################################################################### 3######################################################################
4 4
5TEMPLATE = lib 5TEMPLATE = lib
6 TARGET = microlibetpan 6 TARGET = xmicrolibetpan
7OBJECTS_DIR = obj/$(PLATFORM) 7OBJECTS_DIR = obj/$(PLATFORM)
8MOC_DIR = moc/$(PLATFORM) 8MOC_DIR = moc/$(PLATFORM)
9DESTDIR=$(QPEDIR)/lib 9DESTDIR=$(QPEDIR)/lib
diff --git a/libical/src/libical/libical.pro b/libical/src/libical/libical.pro
index b794f04..24f02af 100644
--- a/libical/src/libical/libical.pro
+++ b/libical/src/libical/libical.pro
@@ -69,3 +69,5 @@ SOURCES += caldate.c \
69 69
70 70
71# vsnprintf.c 71# vsnprintf.c
72#The following line was inserted by qt3to4
73QT += xml qt3support
diff --git a/libical/src/libicalss/libicalss.pro b/libical/src/libicalss/libicalss.pro
index 7fb8a64..27170bf 100644
--- a/libical/src/libicalss/libicalss.pro
+++ b/libical/src/libicalss/libicalss.pro
@@ -42,3 +42,5 @@ SOURCES += icalcalendar.c \
42 icalspanlist.c \ 42 icalspanlist.c \
43 icalsslexer.c \ 43 icalsslexer.c \
44 icalssyacc.c 44 icalssyacc.c
45#The following line was inserted by qt3to4
46QT += xml qt3support
diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp
index 3157214..3c4a81c 100644
--- a/libkcal/alarm.cpp
+++ b/libkcal/alarm.cpp
@@ -26,6 +26,8 @@
26#include "todo.h" 26#include "todo.h"
27 27
28#include "alarm.h" 28#include "alarm.h"
29//Added by qt3to4:
30#include <Q3ValueList>
29 31
30using namespace KCal; 32using namespace KCal;
31#include <qwidget.h> 33#include <qwidget.h>
@@ -212,7 +214,7 @@ QString Alarm::programArguments() const
212} 214}
213 215
214void Alarm::setEmailAlarm(const QString &subject, const QString &text, 216void Alarm::setEmailAlarm(const QString &subject, const QString &text,
215 const QValueList<Person> &addressees, const QStringList &attachments) 217 const Q3ValueList<Person> &addressees, const QStringList &attachments)
216{ 218{
217 mType = Email; 219 mType = Email;
218 mMailSubject = subject; 220 mMailSubject = subject;
@@ -231,7 +233,7 @@ void Alarm::setMailAddress(const Person &mailAddress)
231 } 233 }
232} 234}
233 235
234void Alarm::setMailAddresses(const QValueList<Person> &mailAddresses) 236void Alarm::setMailAddresses(const Q3ValueList<Person> &mailAddresses)
235{ 237{
236 if (mType == Email) { 238 if (mType == Email) {
237 mMailAddresses = mailAddresses; 239 mMailAddresses = mailAddresses;
@@ -247,9 +249,9 @@ void Alarm::addMailAddress(const Person &mailAddress)
247 } 249 }
248} 250}
249 251
250QValueList<Person> Alarm::mailAddresses() const 252Q3ValueList<Person> Alarm::mailAddresses() const
251{ 253{
252 return (mType == Email) ? mMailAddresses : QValueList<Person>(); 254 return (mType == Email) ? mMailAddresses : Q3ValueList<Person>();
253} 255}
254 256
255void Alarm::setMailSubject(const QString &mailAlarmSubject) 257void Alarm::setMailSubject(const QString &mailAlarmSubject)
diff --git a/libkcal/alarm.h b/libkcal/alarm.h
index ac6ea0d..b24f0f7 100644
--- a/libkcal/alarm.h
+++ b/libkcal/alarm.h
@@ -22,7 +22,7 @@
22#define KCAL_ALARM_H 22#define KCAL_ALARM_H
23 23
24#include <qstring.h> 24#include <qstring.h>
25#include <qvaluelist.h> 25#include <q3valuelist.h>
26 26
27#include "customproperties.h" 27#include "customproperties.h"
28#include "duration.h" 28#include "duration.h"
@@ -39,7 +39,7 @@ class Alarm : public CustomProperties
39{ 39{
40 public: 40 public:
41 enum Type { Invalid, Display, Procedure, Email, Audio }; 41 enum Type { Invalid, Display, Procedure, Email, Audio };
42 typedef QValueList<Alarm *> List; 42 typedef Q3ValueList<Alarm *> List;
43 43
44 /** Construct a new alarm with variables initialized to "sane" values. */ 44 /** Construct a new alarm with variables initialized to "sane" values. */
45 explicit Alarm(Incidence *parent); 45 explicit Alarm(Incidence *parent);
@@ -112,7 +112,7 @@ class Alarm : public CustomProperties
112 @param addressees email addresses of recipient(s). 112 @param addressees email addresses of recipient(s).
113 @param attachments optional names of files to attach to the email. 113 @param attachments optional names of files to attach to the email.
114 */ 114 */
115 void setEmailAlarm(const QString &subject, const QString &text, const QValueList<Person> &addressees, 115 void setEmailAlarm(const QString &subject, const QString &text, const Q3ValueList<Person> &addressees,
116 const QStringList &attachments = QStringList()); 116 const QStringList &attachments = QStringList());
117 117
118 /** Send mail to this address when the alarm is triggered. 118 /** Send mail to this address when the alarm is triggered.
@@ -122,13 +122,13 @@ class Alarm : public CustomProperties
122 /** Send mail to these addresses when the alarm is triggered. 122 /** Send mail to these addresses when the alarm is triggered.
123 Ignored if the alarm is not an email alarm. 123 Ignored if the alarm is not an email alarm.
124 */ 124 */
125 void setMailAddresses(const QValueList<Person> &mailAlarmAddresses); 125 void setMailAddresses(const Q3ValueList<Person> &mailAlarmAddresses);
126 /** Add this address to the list of addresses to send mail to when the alarm is triggered. 126 /** Add this address to the list of addresses to send mail to when the alarm is triggered.
127 Ignored if the alarm is not an email alarm. 127 Ignored if the alarm is not an email alarm.
128 */ 128 */
129 void addMailAddress(const Person &mailAlarmAddress); 129 void addMailAddress(const Person &mailAlarmAddress);
130 /** return the addresses to send mail to when an alarm goes off */ 130 /** return the addresses to send mail to when an alarm goes off */
131 QValueList<Person> mailAddresses() const; 131 Q3ValueList<Person> mailAddresses() const;
132 132
133 /** Set the subject line of the mail. 133 /** Set the subject line of the mail.
134 Ignored if the alarm is not an email alarm. 134 Ignored if the alarm is not an email alarm.
@@ -226,7 +226,7 @@ class Alarm : public CustomProperties
226 QString mDescription; // text to display/email body/procedure arguments 226 QString mDescription; // text to display/email body/procedure arguments
227 QString mFile; // procedure program to run/optional audio file to play 227 QString mFile; // procedure program to run/optional audio file to play
228 QStringList mMailAttachFiles; // filenames to attach to email 228 QStringList mMailAttachFiles; // filenames to attach to email
229 QValueList<Person> mMailAddresses; // who to mail for reminder 229 Q3ValueList<Person> mMailAddresses; // who to mail for reminder
230 QString mMailSubject; // subject of email 230 QString mMailSubject; // subject of email
231 231
232 int mAlarmSnoozeTime; // number of minutes after alarm to 232 int mAlarmSnoozeTime; // number of minutes after alarm to
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index 9b38d3f..bf095cf 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -30,6 +30,8 @@
30 30
31#include "calendar.h" 31#include "calendar.h"
32#include "syncdefines.h" 32#include "syncdefines.h"
33//Added by qt3to4:
34#include <Q3PtrList>
33 35
34using namespace KCal; 36using namespace KCal;
35 37
@@ -271,19 +273,19 @@ CalFilter *Calendar::filter()
271 return mFilter; 273 return mFilter;
272} 274}
273 275
274QPtrList<Incidence> Calendar::incidences() 276Q3PtrList<Incidence> Calendar::incidences()
275{ 277{
276 QPtrList<Incidence> incidences; 278 Q3PtrList<Incidence> incidences;
277 279
278 Incidence *i; 280 Incidence *i;
279 281
280 QPtrList<Event> e = events(); 282 Q3PtrList<Event> e = events();
281 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 283 for( i = e.first(); i; i = e.next() ) incidences.append( i );
282 284
283 QPtrList<Todo> t = todos(); 285 Q3PtrList<Todo> t = todos();
284 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 286 for( i = t.first(); i; i = t.next() ) incidences.append( i );
285 287
286 QPtrList<Journal> j = journals(); 288 Q3PtrList<Journal> j = journals();
287 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 289 for( i = j.first(); i; i = j.next() ) incidences.append( i );
288 290
289 return incidences; 291 return incidences;
@@ -291,77 +293,77 @@ QPtrList<Incidence> Calendar::incidences()
291 293
292void Calendar::resetPilotStat(int id ) 294void Calendar::resetPilotStat(int id )
293{ 295{
294 QPtrList<Incidence> incidences; 296 Q3PtrList<Incidence> incidences;
295 297
296 Incidence *i; 298 Incidence *i;
297 299
298 QPtrList<Event> e = rawEvents(); 300 Q3PtrList<Event> e = rawEvents();
299 for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); 301 for( i = e.first(); i; i = e.next() ) i->setPilotId( id );
300 302
301 QPtrList<Todo> t = rawTodos(); 303 Q3PtrList<Todo> t = rawTodos();
302 for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); 304 for( i = t.first(); i; i = t.next() ) i->setPilotId( id );
303 305
304 QPtrList<Journal> j = journals(); 306 Q3PtrList<Journal> j = journals();
305 for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); 307 for( i = j.first(); i; i = j.next() ) i->setPilotId( id );
306} 308}
307void Calendar::resetTempSyncStat() 309void Calendar::resetTempSyncStat()
308{ 310{
309 QPtrList<Incidence> incidences; 311 Q3PtrList<Incidence> incidences;
310 312
311 Incidence *i; 313 Incidence *i;
312 314
313 QPtrList<Event> e = rawEvents(); 315 Q3PtrList<Event> e = rawEvents();
314 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 316 for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
315 317
316 QPtrList<Todo> t = rawTodos(); 318 Q3PtrList<Todo> t = rawTodos();
317 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 319 for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
318 320
319 QPtrList<Journal> j = journals(); 321 Q3PtrList<Journal> j = journals();
320 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 322 for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
321} 323}
322QPtrList<Incidence> Calendar::rawIncidences() 324Q3PtrList<Incidence> Calendar::rawIncidences()
323{ 325{
324 QPtrList<Incidence> incidences; 326 Q3PtrList<Incidence> incidences;
325 327
326 Incidence *i; 328 Incidence *i;
327 329
328 QPtrList<Event> e = rawEvents(); 330 Q3PtrList<Event> e = rawEvents();
329 for( i = e.first(); i; i = e.next() ) incidences.append( i ); 331 for( i = e.first(); i; i = e.next() ) incidences.append( i );
330 332
331 QPtrList<Todo> t = rawTodos(); 333 Q3PtrList<Todo> t = rawTodos();
332 for( i = t.first(); i; i = t.next() ) incidences.append( i ); 334 for( i = t.first(); i; i = t.next() ) incidences.append( i );
333 335
334 QPtrList<Journal> j = journals(); 336 Q3PtrList<Journal> j = journals();
335 for( i = j.first(); i; i = j.next() ) incidences.append( i ); 337 for( i = j.first(); i; i = j.next() ) incidences.append( i );
336 338
337 return incidences; 339 return incidences;
338} 340}
339 341
340QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) 342Q3PtrList<Event> Calendar::events( const QDate &date, bool sorted )
341{ 343{
342 QPtrList<Event> el = rawEventsForDate(date,sorted); 344 Q3PtrList<Event> el = rawEventsForDate(date,sorted);
343 mFilter->apply(&el); 345 mFilter->apply(&el);
344 return el; 346 return el;
345} 347}
346 348
347QPtrList<Event> Calendar::events( const QDateTime &qdt ) 349Q3PtrList<Event> Calendar::events( const QDateTime &qdt )
348{ 350{
349 QPtrList<Event> el = rawEventsForDate(qdt); 351 Q3PtrList<Event> el = rawEventsForDate(qdt);
350 mFilter->apply(&el); 352 mFilter->apply(&el);
351 return el; 353 return el;
352} 354}
353 355
354QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, 356Q3PtrList<Event> Calendar::events( const QDate &start, const QDate &end,
355 bool inclusive) 357 bool inclusive)
356{ 358{
357 QPtrList<Event> el = rawEvents(start,end,inclusive); 359 Q3PtrList<Event> el = rawEvents(start,end,inclusive);
358 mFilter->apply(&el); 360 mFilter->apply(&el);
359 return el; 361 return el;
360} 362}
361 363
362QPtrList<Event> Calendar::events() 364Q3PtrList<Event> Calendar::events()
363{ 365{
364 QPtrList<Event> el = rawEvents(); 366 Q3PtrList<Event> el = rawEvents();
365 mFilter->apply(&el); 367 mFilter->apply(&el);
366 return el; 368 return el;
367} 369}
@@ -369,7 +371,7 @@ void Calendar::addIncidenceBranch(Incidence *i)
369{ 371{
370 addIncidence( i ); 372 addIncidence( i );
371 Incidence * inc; 373 Incidence * inc;
372 QPtrList<Incidence> Relations = i->relations(); 374 Q3PtrList<Incidence> Relations = i->relations();
373 for (inc=Relations.first();inc;inc=Relations.next()) { 375 for (inc=Relations.first();inc;inc=Relations.next()) {
374 addIncidenceBranch( inc ); 376 addIncidenceBranch( inc );
375 } 377 }
@@ -407,9 +409,9 @@ Incidence* Calendar::incidence( const QString& uid )
407 return 0; 409 return 0;
408} 410}
409 411
410QPtrList<Todo> Calendar::todos() 412Q3PtrList<Todo> Calendar::todos()
411{ 413{
412 QPtrList<Todo> tl = rawTodos(); 414 Q3PtrList<Todo> tl = rawTodos();
413 mFilter->apply( &tl ); 415 mFilter->apply( &tl );
414 return tl; 416 return tl;
415} 417}
@@ -455,7 +457,7 @@ void Calendar::removeRelations( Incidence *incidence )
455 // qDebug("Calendar::removeRelations "); 457 // qDebug("Calendar::removeRelations ");
456 QString uid = incidence->uid(); 458 QString uid = incidence->uid();
457 459
458 QPtrList<Incidence> relations = incidence->relations(); 460 Q3PtrList<Incidence> relations = incidence->relations();
459 for( Incidence* i = relations.first(); i; i = relations.next() ) 461 for( Incidence* i = relations.first(); i; i = relations.next() )
460 if( !mOrphanUids.find( i->uid() ) ) { 462 if( !mOrphanUids.find( i->uid() ) ) {
461 mOrphans.insert( uid, i ); 463 mOrphans.insert( uid, i );
@@ -471,7 +473,7 @@ void Calendar::removeRelations( Incidence *incidence )
471 // Remove this one from the orphans list 473 // Remove this one from the orphans list
472 if( mOrphanUids.remove( uid ) ) { 474 if( mOrphanUids.remove( uid ) ) {
473 QString r2uid = incidence->relatedToUid(); 475 QString r2uid = incidence->relatedToUid();
474 QPtrList<Incidence> tempList; 476 Q3PtrList<Incidence> tempList;
475 while( Incidence* i = mOrphans[ r2uid ] ) { 477 while( Incidence* i = mOrphans[ r2uid ] ) {
476 mOrphans.remove( r2uid ); 478 mOrphans.remove( r2uid );
477 if ( i != incidence ) tempList.append( i ); 479 if ( i != incidence ) tempList.append( i );
@@ -487,7 +489,7 @@ void Calendar::removeRelations( Incidence *incidence )
487 // This incidence is located in the orphans list - it should be removed 489 // This incidence is located in the orphans list - it should be removed
488 if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) { 490 if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) {
489 // Removing wasn't that easy 491 // Removing wasn't that easy
490 for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { 492 for( Q3DictIterator<Incidence> it( mOrphans ); it.current(); ++it ) {
491 if( it.current()->uid() == uid ) { 493 if( it.current()->uid() == uid ) {
492 mOrphans.remove( it.currentKey() ); 494 mOrphans.remove( it.currentKey() );
493 break; 495 break;
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index fbc40ad..5845f44 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -25,8 +25,8 @@
25#include <qobject.h> 25#include <qobject.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29#include <qdict.h> 29#include <q3dict.h>
30 30
31#include "customproperties.h" 31#include "customproperties.h"
32#include "event.h" 32#include "event.h"
@@ -88,7 +88,7 @@ public:
88 Sync changes in memory to persistant storage. 88 Sync changes in memory to persistant storage.
89 */ 89 */
90 virtual void save() = 0; 90 virtual void save() = 0;
91 virtual QPtrList<Event> getExternLastSyncEvents() = 0; 91 virtual Q3PtrList<Event> getExternLastSyncEvents() = 0;
92 virtual void removeSyncInfo( QString syncProfile) = 0; 92 virtual void removeSyncInfo( QString syncProfile) = 0;
93 virtual bool isSaving() { return false; } 93 virtual bool isSaving() { return false; }
94 94
@@ -155,12 +155,12 @@ public:
155 /** 155 /**
156 Return filtered list of all incidences of this calendar. 156 Return filtered list of all incidences of this calendar.
157 */ 157 */
158 virtual QPtrList<Incidence> incidences(); 158 virtual Q3PtrList<Incidence> incidences();
159 159
160 /** 160 /**
161 Return unfiltered list of all incidences of this calendar. 161 Return unfiltered list of all incidences of this calendar.
162 */ 162 */
163 virtual QPtrList<Incidence> rawIncidences(); 163 virtual Q3PtrList<Incidence> rawIncidences();
164 164
165 /** 165 /**
166 Adds a Event to this calendar object. 166 Adds a Event to this calendar object.
@@ -185,27 +185,27 @@ public:
185 date specified. useful for dayView, etc. etc. 185 date specified. useful for dayView, etc. etc.
186 The calendar filter is applied. 186 The calendar filter is applied.
187 */ 187 */
188 QPtrList<Event> events( const QDate &date, bool sorted = false); 188 Q3PtrList<Event> events( const QDate &date, bool sorted = false);
189 /** 189 /**
190 Get events, which occur on the given date. 190 Get events, which occur on the given date.
191 The calendar filter is applied. 191 The calendar filter is applied.
192 */ 192 */
193 QPtrList<Event> events( const QDateTime &qdt ); 193 Q3PtrList<Event> events( const QDateTime &qdt );
194 /** 194 /**
195 Get events in a range of dates. If inclusive is set to true, only events 195 Get events in a range of dates. If inclusive is set to true, only events
196 are returned, which are completely included in the range. 196 are returned, which are completely included in the range.
197 The calendar filter is applied. 197 The calendar filter is applied.
198 */ 198 */
199 QPtrList<Event> events( const QDate &start, const QDate &end, 199 Q3PtrList<Event> events( const QDate &start, const QDate &end,
200 bool inclusive = false); 200 bool inclusive = false);
201 /** 201 /**
202 Return filtered list of all events in calendar. 202 Return filtered list of all events in calendar.
203 */ 203 */
204 virtual QPtrList<Event> events(); 204 virtual Q3PtrList<Event> events();
205 /** 205 /**
206 Return unfiltered list of all events in calendar. 206 Return unfiltered list of all events in calendar.
207 */ 207 */
208 virtual QPtrList<Event> rawEvents() = 0; 208 virtual Q3PtrList<Event> rawEvents() = 0;
209 209
210 /** 210 /**
211 Add a todo to the todolist. 211 Add a todo to the todolist.
@@ -222,7 +222,7 @@ public:
222 /** 222 /**
223 Return filterd list of todos. 223 Return filterd list of todos.
224 */ 224 */
225 virtual QPtrList<Todo> todos(); 225 virtual Q3PtrList<Todo> todos();
226 /** 226 /**
227 Searches todolist for an event with this unique string identifier, 227 Searches todolist for an event with this unique string identifier,
228 returns a pointer or null. 228 returns a pointer or null.
@@ -232,11 +232,11 @@ public:
232 /** 232 /**
233 Returns list of todos due on the specified date. 233 Returns list of todos due on the specified date.
234 */ 234 */
235 virtual QPtrList<Todo> todos( const QDate &date ) = 0; 235 virtual Q3PtrList<Todo> todos( const QDate &date ) = 0;
236 /** 236 /**
237 Return unfiltered list of todos. 237 Return unfiltered list of todos.
238 */ 238 */
239 virtual QPtrList<Todo> rawTodos() = 0; 239 virtual Q3PtrList<Todo> rawTodos() = 0;
240 240
241 /** 241 /**
242 Add a Journal entry to calendar. 242 Add a Journal entry to calendar.
@@ -248,7 +248,7 @@ public:
248 Return Journal for given date. 248 Return Journal for given date.
249 */ 249 */
250 virtual Journal *journal( const QDate & ) = 0; 250 virtual Journal *journal( const QDate & ) = 0;
251 virtual QPtrList<Journal> journals4Date( const QDate & ) = 0; 251 virtual Q3PtrList<Journal> journals4Date( const QDate & ) = 0;
252 /** 252 /**
253 Return Journal with given UID. 253 Return Journal with given UID.
254 */ 254 */
@@ -256,7 +256,7 @@ public:
256 /** 256 /**
257 Return list of all Journal entries. 257 Return list of all Journal entries.
258 */ 258 */
259 virtual QPtrList<Journal> journals() = 0; 259 virtual Q3PtrList<Journal> journals() = 0;
260 260
261 /** 261 /**
262 Searches all incidence types for an incidence with this unique 262 Searches all incidence types for an incidence with this unique
@@ -335,17 +335,17 @@ public:
335 /** 335 /**
336 Get unfiltered events, which occur on the given date. 336 Get unfiltered events, which occur on the given date.
337 */ 337 */
338 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; 338 virtual Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0;
339 /** 339 /**
340 Get unfiltered events, which occur on the given date. 340 Get unfiltered events, which occur on the given date.
341 */ 341 */
342 virtual QPtrList<Event> rawEventsForDate( const QDate &date, 342 virtual Q3PtrList<Event> rawEventsForDate( const QDate &date,
343 bool sorted = false ) = 0; 343 bool sorted = false ) = 0;
344 /** 344 /**
345 Get events in a range of dates. If inclusive is set to true, only events 345 Get events in a range of dates. If inclusive is set to true, only events
346 are returned, which are completely included in the range. 346 are returned, which are completely included in the range.
347 */ 347 */
348 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 348 virtual Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end,
349 bool inclusive = false ) = 0; 349 bool inclusive = false ) = 0;
350 350
351 Incidence *mNextAlarmIncidence; 351 Incidence *mNextAlarmIncidence;
@@ -376,8 +376,8 @@ private:
376 QString mLoadedProductId; 376 QString mLoadedProductId;
377 377
378 // This list is used to put together related todos 378 // This list is used to put together related todos
379 QDict<Incidence> mOrphans; 379 Q3Dict<Incidence> mOrphans;
380 QDict<Incidence> mOrphanUids; 380 Q3Dict<Incidence> mOrphanUids;
381}; 381};
382 382
383} 383}
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index ce3cd09..cb52b7c 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -22,7 +22,7 @@
22 22
23#include <qdatetime.h> 23#include <qdatetime.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26 26
27#include <kdebug.h> 27#include <kdebug.h>
28#include <kconfig.h> 28#include <kconfig.h>
@@ -192,7 +192,7 @@ bool CalendarLocal::mergeCalendar( Calendar* remote )
192 // 2 look for raw inc in remote 192 // 2 look for raw inc in remote
193 // if inc in local, replace it 193 // if inc in local, replace it
194 // if not in local, add it to default calendar 194 // if not in local, add it to default calendar
195 QPtrList<Incidence> localInc = rawIncidences(); 195 Q3PtrList<Incidence> localInc = rawIncidences();
196 Incidence* inL = localInc.first(); 196 Incidence* inL = localInc.first();
197 while ( inL ) { 197 while ( inL ) {
198 if ( ! inL->isReadOnly () ) 198 if ( ! inL->isReadOnly () )
@@ -200,7 +200,7 @@ bool CalendarLocal::mergeCalendar( Calendar* remote )
200 deleteIncidence( inL ); 200 deleteIncidence( inL );
201 inL = localInc.next(); 201 inL = localInc.next();
202 } 202 }
203 QPtrList<Incidence> er = remote->rawIncidences(); 203 Q3PtrList<Incidence> er = remote->rawIncidences();
204 Incidence* inR = er.first(); 204 Incidence* inR = er.first();
205 while ( inR ) { 205 while ( inR ) {
206 inL = incidenceForUid( inR->uid(),false ); 206 inL = incidenceForUid( inR->uid(),false );
@@ -259,9 +259,9 @@ void CalendarLocal::addCalendar( Calendar* cal )
259{ 259{
260 cal->setDontDeleteIncidencesOnClose(); 260 cal->setDontDeleteIncidencesOnClose();
261 setSyncEventsEnabled(); 261 setSyncEventsEnabled();
262 QPtrList<Incidence> incList; 262 Q3PtrList<Incidence> incList;
263 { 263 {
264 QPtrList<Event> EventList = cal->rawEvents(); 264 Q3PtrList<Event> EventList = cal->rawEvents();
265 Event * ev = EventList.first(); 265 Event * ev = EventList.first();
266 while ( ev ) { 266 while ( ev ) {
267 if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { 267 if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) {
@@ -279,7 +279,7 @@ void CalendarLocal::addCalendar( Calendar* cal )
279 } 279 }
280 { 280 {
281 281
282 QPtrList<Todo> TodoList = cal->rawTodos(); 282 Q3PtrList<Todo> TodoList = cal->rawTodos();
283 Todo * ev = TodoList.first(); 283 Todo * ev = TodoList.first();
284 while ( ev ) { 284 while ( ev ) {
285 ev->resetRelatedTo(); 285 ev->resetRelatedTo();
@@ -299,7 +299,7 @@ void CalendarLocal::addCalendar( Calendar* cal )
299 } 299 }
300 } 300 }
301 { 301 {
302 QPtrList<Journal> JournalList = cal->journals(); 302 Q3PtrList<Journal> JournalList = cal->journals();
303 Journal * ev = JournalList.first(); 303 Journal * ev = JournalList.first();
304 while ( ev ) { 304 while ( ev ) {
305 Journal * se = journal( ev->uid() ); 305 Journal * se = journal( ev->uid() );
@@ -481,9 +481,9 @@ void CalendarLocal::deleteTodo( Todo *todo )
481 setupRelations( dup ); 481 setupRelations( dup );
482} 482}
483 483
484QPtrList<Todo> CalendarLocal::rawTodos() 484Q3PtrList<Todo> CalendarLocal::rawTodos()
485{ 485{
486 QPtrList<Todo> el; 486 Q3PtrList<Todo> el;
487 for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) 487 for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() )
488 if ( it->calEnabled() ) el.append( it ); 488 if ( it->calEnabled() ) el.append( it );
489 return el; 489 return el;
@@ -499,13 +499,13 @@ Todo *CalendarLocal::todo( QString syncProf, QString id )
499} 499}
500void CalendarLocal::removeSyncInfo( QString syncProfile) 500void CalendarLocal::removeSyncInfo( QString syncProfile)
501{ 501{
502 QPtrList<Incidence> all = rawIncidences() ; 502 Q3PtrList<Incidence> all = rawIncidences() ;
503 Incidence *inc; 503 Incidence *inc;
504 for ( inc = all.first(); inc; inc = all.next() ) { 504 for ( inc = all.first(); inc; inc = all.next() ) {
505 inc->removeID( syncProfile ); 505 inc->removeID( syncProfile );
506 } 506 }
507 if ( syncProfile.isEmpty() ) { 507 if ( syncProfile.isEmpty() ) {
508 QPtrList<Event> el; 508 Q3PtrList<Event> el;
509 Event *todo; 509 Event *todo;
510 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { 510 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
511 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) 511 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") )
@@ -520,9 +520,9 @@ void CalendarLocal::removeSyncInfo( QString syncProfile)
520 deleteIncidence ( lse ); 520 deleteIncidence ( lse );
521 } 521 }
522} 522}
523QPtrList<Event> CalendarLocal::getExternLastSyncEvents() 523Q3PtrList<Event> CalendarLocal::getExternLastSyncEvents()
524{ 524{
525 QPtrList<Event> el; 525 Q3PtrList<Event> el;
526 Event *todo; 526 Event *todo;
527 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { 527 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
528 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) 528 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") )
@@ -685,9 +685,9 @@ void CalendarLocal::deRegisterAlarm()
685// #endif 685// #endif
686} 686}
687 687
688QPtrList<Todo> CalendarLocal::todos( const QDate &date ) 688Q3PtrList<Todo> CalendarLocal::todos( const QDate &date )
689{ 689{
690 QPtrList<Todo> todos; 690 Q3PtrList<Todo> todos;
691 691
692 Todo *todo; 692 Todo *todo;
693 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 693 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
@@ -786,7 +786,7 @@ Alarm::List CalendarLocal::alarms( const QDateTime &from, const QDateTime &to )
786void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, 786void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence,
787 const QDateTime &from, const QDateTime &to ) 787 const QDateTime &from, const QDateTime &to )
788{ 788{
789 QPtrList<Alarm> alarmList = incidence->alarms(); 789 Q3PtrList<Alarm> alarmList = incidence->alarms();
790 Alarm *alarm; 790 Alarm *alarm;
791 for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { 791 for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) {
792// kdDebug(5800) << "CalendarLocal::appendAlarms() '" << alarm->text() 792// kdDebug(5800) << "CalendarLocal::appendAlarms() '" << alarm->text()
@@ -805,7 +805,7 @@ void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms,
805 const QDateTime &to ) 805 const QDateTime &to )
806{ 806{
807 807
808 QPtrList<Alarm> alarmList = incidence->alarms(); 808 Q3PtrList<Alarm> alarmList = incidence->alarms();
809 Alarm *alarm; 809 Alarm *alarm;
810 QDateTime qdt; 810 QDateTime qdt;
811 for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { 811 for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) {
@@ -844,9 +844,9 @@ void CalendarLocal::insertEvent( Event *event )
844} 844}
845 845
846 846
847QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) 847Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted )
848{ 848{
849 QPtrList<Event> eventList; 849 Q3PtrList<Event> eventList;
850 850
851 Event *event; 851 Event *event;
852 for( event = mEventList.first(); event; event = mEventList.next() ) { 852 for( event = mEventList.first(); event; event = mEventList.next() ) {
@@ -878,7 +878,7 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted )
878 878
879 // kdDebug(5800) << "Sorting events for date\n" << endl; 879 // kdDebug(5800) << "Sorting events for date\n" << endl;
880 // now, we have to sort it based on dtStart.time() 880 // now, we have to sort it based on dtStart.time()
881 QPtrList<Event> eventListSorted; 881 Q3PtrList<Event> eventListSorted;
882 Event *sortEvent; 882 Event *sortEvent;
883 for ( event = eventList.first(); event; event = eventList.next() ) { 883 for ( event = eventList.first(); event; event = eventList.next() ) {
884 sortEvent = eventListSorted.first(); 884 sortEvent = eventListSorted.first();
@@ -894,12 +894,12 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted )
894} 894}
895 895
896 896
897QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, 897Q3PtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end,
898 bool inclusive ) 898 bool inclusive )
899{ 899{
900 Event *event = 0; 900 Event *event = 0;
901 901
902 QPtrList<Event> eventList; 902 Q3PtrList<Event> eventList;
903 903
904 // Get non-recurring events 904 // Get non-recurring events
905 for( event = mEventList.first(); event; event = mEventList.next() ) { 905 for( event = mEventList.first(); event; event = mEventList.next() ) {
@@ -923,7 +923,7 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end,
923 } 923 }
924 } else { 924 } else {
925 bool founOne; 925 bool founOne;
926 QDate next = event->getNextOccurence( start, &founOne ).date(); 926 QDate next = event->getNextOccurence( (QDateTime)start, &founOne ).date();
927 if ( founOne ) { 927 if ( founOne ) {
928 if ( next <= end ) { 928 if ( next <= end ) {
929 found = true; 929 found = true;
@@ -972,14 +972,14 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end,
972 return eventList; 972 return eventList;
973} 973}
974 974
975QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) 975Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt )
976{ 976{
977 return rawEventsForDate( qdt.date() ); 977 return rawEventsForDate( qdt.date() );
978} 978}
979 979
980QPtrList<Event> CalendarLocal::rawEvents() 980Q3PtrList<Event> CalendarLocal::rawEvents()
981{ 981{
982 QPtrList<Event> el; 982 Q3PtrList<Event> el;
983 for ( Event *it = mEventList.first(); it; it = mEventList.next() ) 983 for ( Event *it = mEventList.first(); it; it = mEventList.next() )
984 if ( it->calEnabled() ) el.append( it ); 984 if ( it->calEnabled() ) el.append( it );
985 return el; 985 return el;
@@ -1006,9 +1006,9 @@ void CalendarLocal::deleteJournal( Journal *journal )
1006 } 1006 }
1007} 1007}
1008 1008
1009QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) 1009Q3PtrList<Journal> CalendarLocal::journals4Date( const QDate & date )
1010{ 1010{
1011 QPtrList<Journal> el; 1011 Q3PtrList<Journal> el;
1012 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 1012 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
1013 if ( it->calEnabled() && it->dtStart().date() == date) el.append( it ); 1013 if ( it->calEnabled() && it->dtStart().date() == date) el.append( it );
1014 return el; 1014 return el;
@@ -1040,9 +1040,9 @@ Journal *CalendarLocal::journal( const QString &uid )
1040 return retVal; 1040 return retVal;
1041} 1041}
1042 1042
1043QPtrList<Journal> CalendarLocal::journals() 1043Q3PtrList<Journal> CalendarLocal::journals()
1044{ 1044{
1045 QPtrList<Journal> el; 1045 Q3PtrList<Journal> el;
1046 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 1046 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
1047 if ( it->calEnabled() ) el.append( it ); 1047 if ( it->calEnabled() ) el.append( it );
1048 return el; 1048 return el;
@@ -1051,7 +1051,7 @@ void CalendarLocal::setCalendarRemove( int id )
1051{ 1051{
1052 1052
1053 { 1053 {
1054 QPtrList<Event> EventList = mEventList; 1054 Q3PtrList<Event> EventList = mEventList;
1055 Event * ev = EventList.first(); 1055 Event * ev = EventList.first();
1056 while ( ev ) { 1056 while ( ev ) {
1057 if ( ev->calID() == id && ev->uid().left( 15 ) != QString("last-syncEvent-") ) 1057 if ( ev->calID() == id && ev->uid().left( 15 ) != QString("last-syncEvent-") )
@@ -1061,7 +1061,7 @@ void CalendarLocal::setCalendarRemove( int id )
1061 } 1061 }
1062 { 1062 {
1063 1063
1064 QPtrList<Todo> TodoList = mTodoList; 1064 Q3PtrList<Todo> TodoList = mTodoList;
1065 Todo * ev = TodoList.first(); 1065 Todo * ev = TodoList.first();
1066 while ( ev ) { 1066 while ( ev ) {
1067 if ( ev->calID() == id ) 1067 if ( ev->calID() == id )
@@ -1070,7 +1070,7 @@ void CalendarLocal::setCalendarRemove( int id )
1070 } 1070 }
1071 } 1071 }
1072 { 1072 {
1073 QPtrList<Journal> JournalList = mJournalList; 1073 Q3PtrList<Journal> JournalList = mJournalList;
1074 Journal * ev = JournalList.first(); 1074 Journal * ev = JournalList.first();
1075 while ( ev ) { 1075 while ( ev ) {
1076 if ( ev->calID() == id ) 1076 if ( ev->calID() == id )
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index 1ceabce..1df65c7 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -23,6 +23,8 @@
23#define KCAL_CALENDARLOCAL_H 23#define KCAL_CALENDARLOCAL_H
24 24
25#include "calendar.h" 25#include "calendar.h"
26//Added by qt3to4:
27#include <Q3PtrList>
26 28
27namespace KCal { 29namespace KCal {
28 30
@@ -93,8 +95,8 @@ class CalendarLocal : public Calendar
93 /** 95 /**
94 Return unfiltered list of all events in calendar. 96 Return unfiltered list of all events in calendar.
95 */ 97 */
96 QPtrList<Event> rawEvents(); 98 Q3PtrList<Event> rawEvents();
97 QPtrList<Event> getExternLastSyncEvents(); 99 Q3PtrList<Event> getExternLastSyncEvents();
98 /** 100 /**
99 Add a todo to the todolist. 101 Add a todo to the todolist.
100 */ 102 */
@@ -112,17 +114,17 @@ class CalendarLocal : public Calendar
112 /** 114 /**
113 Return list of all todos. 115 Return list of all todos.
114 */ 116 */
115 QPtrList<Todo> rawTodos(); 117 Q3PtrList<Todo> rawTodos();
116 /** 118 /**
117 Returns list of todos due on the specified date. 119 Returns list of todos due on the specified date.
118 */ 120 */
119 QPtrList<Todo> todos( const QDate &date ); 121 Q3PtrList<Todo> todos( const QDate &date );
120 /** 122 /**
121 Return list of all todos. 123 Return list of all todos.
122 124
123 Workaround because compiler does not recognize function of base class. 125 Workaround because compiler does not recognize function of base class.
124 */ 126 */
125 QPtrList<Todo> todos() { return Calendar::todos(); } 127 Q3PtrList<Todo> todos() { return Calendar::todos(); }
126 128
127 /** 129 /**
128 Add a Journal entry to calendar. 130 Add a Journal entry to calendar.
@@ -136,7 +138,7 @@ class CalendarLocal : public Calendar
136 Return Journal for given date. 138 Return Journal for given date.
137 */ 139 */
138 Journal *journal( const QDate & ); 140 Journal *journal( const QDate & );
139 QPtrList<Journal> journals4Date( const QDate & ); 141 Q3PtrList<Journal> journals4Date( const QDate & );
140 /** 142 /**
141 Return Journal with given UID. 143 Return Journal with given UID.
142 */ 144 */
@@ -144,7 +146,7 @@ class CalendarLocal : public Calendar
144 /** 146 /**
145 Return list of all Journals stored in calendar. 147 Return list of all Journals stored in calendar.
146 */ 148 */
147 QPtrList<Journal> journals(); 149 Q3PtrList<Journal> journals();
148 150
149 /** 151 /**
150 Return all alarms, which ocur in the given time interval. 152 Return all alarms, which ocur in the given time interval.
@@ -174,16 +176,16 @@ class CalendarLocal : public Calendar
174 Builds and then returns a list of all events that match for the 176 Builds and then returns a list of all events that match for the
175 date specified. useful for dayView, etc. etc. 177 date specified. useful for dayView, etc. etc.
176 */ 178 */
177 QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); 179 Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false );
178 /** 180 /**
179 Get unfiltered events for date \a qdt. 181 Get unfiltered events for date \a qdt.
180 */ 182 */
181 QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); 183 Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt );
182 /** 184 /**
183 Get unfiltered events in a range of dates. If inclusive is set to true, 185 Get unfiltered events in a range of dates. If inclusive is set to true,
184 only events are returned, which are completely included in the range. 186 only events are returned, which are completely included in the range.
185 */ 187 */
186 QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 188 Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end,
187 bool inclusive = false ); 189 bool inclusive = false );
188 Todo *todo( QString, QString ); 190 Todo *todo( QString, QString );
189 Event *event( QString, QString ); 191 Event *event( QString, QString );
@@ -224,9 +226,9 @@ public slots:
224 private: 226 private:
225 void init(); 227 void init();
226 228
227 QPtrList<Event> mEventList; 229 Q3PtrList<Event> mEventList;
228 QPtrList<Todo> mTodoList; 230 Q3PtrList<Todo> mTodoList;
229 QPtrList<Journal> mJournalList; 231 Q3PtrList<Journal> mJournalList;
230}; 232};
231 233
232} 234}
diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp
index 72f70c2..fa1dbd5 100644
--- a/libkcal/calfilter.cpp
+++ b/libkcal/calfilter.cpp
@@ -21,6 +21,8 @@
21#include <kdebug.h> 21#include <kdebug.h>
22 22
23#include "calfilter.h" 23#include "calfilter.h"
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25using namespace KCal; 27using namespace KCal;
26 28
@@ -41,7 +43,7 @@ CalFilter::~CalFilter()
41{ 43{
42} 44}
43 45
44void CalFilter::apply(QPtrList<Event> *eventlist) 46void CalFilter::apply(Q3PtrList<Event> *eventlist)
45{ 47{
46 if (!mEnabled) return; 48 if (!mEnabled) return;
47 49
@@ -61,7 +63,7 @@ void CalFilter::apply(QPtrList<Event> *eventlist)
61} 63}
62 64
63// TODO: avoid duplicating apply() code 65// TODO: avoid duplicating apply() code
64void CalFilter::apply(QPtrList<Todo> *eventlist) 66void CalFilter::apply(Q3PtrList<Todo> *eventlist)
65{ 67{
66 if (!mEnabled) return; 68 if (!mEnabled) return;
67 Todo *event = eventlist->first(); 69 Todo *event = eventlist->first();
diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h
index e349770..821149f 100644
--- a/libkcal/calfilter.h
+++ b/libkcal/calfilter.h
@@ -22,7 +22,7 @@
22#define _CALFILTER_H 22#define _CALFILTER_H
23 23
24#include <qstring.h> 24#include <qstring.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26 26
27#include "event.h" 27#include "event.h"
28#include "todo.h" 28#include "todo.h"
@@ -55,15 +55,15 @@ class CalFilter {
55 Apply filter to eventlist, all events not matching filter criterias are 55 Apply filter to eventlist, all events not matching filter criterias are
56 removed from the list. 56 removed from the list.
57 */ 57 */
58 void apply(QPtrList<Event> *eventlist); 58 void apply(Q3PtrList<Event> *eventlist);
59 59
60 /** 60 /**
61 Apply filter to todolist, all todos not matching filter criterias are 61 Apply filter to todolist, all todos not matching filter criterias are
62 removed from the list. 62 removed from the list.
63 */ 63 */
64 void apply(QPtrList<Todo> *todolist); 64 void apply(Q3PtrList<Todo> *todolist);
65 bool CalFilter::filterCalendarItem(Incidence *in); 65 bool filterCalendarItem(Incidence *in);
66 bool CalFilter::filterJournal(Journal *in); 66 bool filterJournal(Journal *in);
67 /** 67 /**
68 Apply filter criteria on the specified event. Return true, if event passes 68 Apply filter criteria on the specified event. Return true, if event passes
69 criteria, otherwise return false. 69 criteria, otherwise return false.
diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp
index adc1710..16f4a28 100644
--- a/libkcal/customproperties.cpp
+++ b/libkcal/customproperties.cpp
@@ -19,6 +19,8 @@
19*/ 19*/
20 20
21#include "customproperties.h" 21#include "customproperties.h"
22//Added by qt3to4:
23#include <Q3CString>
22 24
23using namespace KCal; 25using namespace KCal;
24 26
@@ -35,52 +37,52 @@ CustomProperties::~CustomProperties()
35{ 37{
36} 38}
37 39
38void CustomProperties::setCustomProperty(const QCString &app, const QCString &key, 40void CustomProperties::setCustomProperty(const Q3CString &app, const Q3CString &key,
39 const QString &value) 41 const QString &value)
40{ 42{
41 if (value.isNull() || key.isEmpty() || app.isEmpty()) 43 if (value.isNull() || key.isEmpty() || app.isEmpty())
42 return; 44 return;
43 QCString property = "X-KDE-" + app + "-" + key; 45 Q3CString property = "X-KDE-" + app + "-" + key;
44 if (!checkName(property)) 46 if (!checkName(property))
45 return; 47 return;
46 mProperties[property] = value; 48 mProperties[property] = value;
47} 49}
48 50
49void CustomProperties::removeCustomProperty(const QCString &app, const QCString &key) 51void CustomProperties::removeCustomProperty(const Q3CString &app, const Q3CString &key)
50{ 52{
51 removeNonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); 53 removeNonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key));
52} 54}
53 55
54QString CustomProperties::customProperty(const QCString &app, const QCString &key) const 56QString CustomProperties::customProperty(const Q3CString &app, const Q3CString &key) const
55{ 57{
56 return nonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); 58 return nonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key));
57} 59}
58 60
59void CustomProperties::setNonKDECustomProperty(const QCString &name, const QString &value) 61void CustomProperties::setNonKDECustomProperty(const Q3CString &name, const QString &value)
60{ 62{
61 if (value.isNull() || !checkName(name)) 63 if (value.isNull() || !checkName(name))
62 return; 64 return;
63 mProperties[name] = value; 65 mProperties[name] = value;
64} 66}
65 67
66void CustomProperties::removeNonKDECustomProperty(const QCString &name) 68void CustomProperties::removeNonKDECustomProperty(const Q3CString &name)
67{ 69{
68 QMap<QCString, QString>::Iterator it = mProperties.find(name); 70 QMap<Q3CString, QString>::Iterator it = mProperties.find(name);
69 if (it != mProperties.end()) 71 if (it != mProperties.end())
70 mProperties.remove(it); 72 mProperties.remove(it);
71} 73}
72 74
73QString CustomProperties::nonKDECustomProperty(const QCString &name) const 75QString CustomProperties::nonKDECustomProperty(const Q3CString &name) const
74{ 76{
75 QMap<QCString, QString>::ConstIterator it = mProperties.find(name); 77 QMap<Q3CString, QString>::ConstIterator it = mProperties.find(name);
76 if (it == mProperties.end()) 78 if (it == mProperties.end())
77 return QString::null; 79 return QString::null;
78 return it.data(); 80 return it.data();
79} 81}
80 82
81void CustomProperties::setCustomProperties(const QMap<QCString, QString> &properties) 83void CustomProperties::setCustomProperties(const QMap<Q3CString, QString> &properties)
82{ 84{
83 for (QMap<QCString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { 85 for (QMap<Q3CString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) {
84 // Validate the property name and convert any null string to empty string 86 // Validate the property name and convert any null string to empty string
85 if (checkName(it.key())) { 87 if (checkName(it.key())) {
86 mProperties[it.key()] = it.data().isNull() ? QString("") : it.data(); 88 mProperties[it.key()] = it.data().isNull() ? QString("") : it.data();
@@ -88,12 +90,12 @@ void CustomProperties::setCustomProperties(const QMap<QCString, QString> &proper
88 } 90 }
89} 91}
90 92
91QMap<QCString, QString> CustomProperties::customProperties() const 93QMap<Q3CString, QString> CustomProperties::customProperties() const
92{ 94{
93 return mProperties; 95 return mProperties;
94} 96}
95 97
96bool CustomProperties::checkName(const QCString &name) 98bool CustomProperties::checkName(const Q3CString &name)
97{ 99{
98 // Check that the property name starts with 'X-' and contains 100 // Check that the property name starts with 'X-' and contains
99 // only the permitted characters 101 // only the permitted characters
diff --git a/libkcal/customproperties.h b/libkcal/customproperties.h
index 0cbfdcd..75eb3ad 100644
--- a/libkcal/customproperties.h
+++ b/libkcal/customproperties.h
@@ -23,6 +23,8 @@
23 23
24#include <qstring.h> 24#include <qstring.h>
25#include <qmap.h> 25#include <qmap.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27namespace KCal { 29namespace KCal {
28 30
@@ -49,47 +51,47 @@ class CustomProperties
49 @param value The property's value. A call with a value of QString::null 51 @param value The property's value. A call with a value of QString::null
50 will be ignored. 52 will be ignored.
51 */ 53 */
52 void setCustomProperty(const QCString &app, const QCString &key, 54 void setCustomProperty(const Q3CString &app, const Q3CString &key,
53 const QString &value); 55 const QString &value);
54 /** Delete a custom calendar property. 56 /** Delete a custom calendar property.
55 @param app Application name as it appears in the custom property name. 57 @param app Application name as it appears in the custom property name.
56 @param key Property identifier specific to the application. 58 @param key Property identifier specific to the application.
57 */ 59 */
58 void removeCustomProperty(const QCString &app, const QCString &key); 60 void removeCustomProperty(const Q3CString &app, const Q3CString &key);
59 /** Return the value of a custom calendar property. 61 /** Return the value of a custom calendar property.
60 @param app Application name as it appears in the custom property name. 62 @param app Application name as it appears in the custom property name.
61 @param key Property identifier specific to the application. 63 @param key Property identifier specific to the application.
62 @return Property value, or QString::null if (and only if) the property does not exist. 64 @return Property value, or QString::null if (and only if) the property does not exist.
63 */ 65 */
64 QString customProperty(const QCString &app, const QCString &key) const; 66 QString customProperty(const Q3CString &app, const Q3CString &key) const;
65 67
66 /** Create or modify a non-KDE or non-standard custom calendar property. 68 /** Create or modify a non-KDE or non-standard custom calendar property.
67 @param name Full property name 69 @param name Full property name
68 @param value The property's value. A call with a value of QString::null 70 @param value The property's value. A call with a value of QString::null
69 will be ignored. 71 will be ignored.
70 */ 72 */
71 void setNonKDECustomProperty(const QCString &name, const QString &value); 73 void setNonKDECustomProperty(const Q3CString &name, const QString &value);
72 /** Delete a non-KDE or non-standard custom calendar property. 74 /** Delete a non-KDE or non-standard custom calendar property.
73 @param name Full property name 75 @param name Full property name
74 */ 76 */
75 void removeNonKDECustomProperty(const QCString &name); 77 void removeNonKDECustomProperty(const Q3CString &name);
76 /** Return the value of a non-KDE or non-standard custom calendar property. 78 /** Return the value of a non-KDE or non-standard custom calendar property.
77 @param name Full property name 79 @param name Full property name
78 @return Property value, or QString::null if (and only if) the property does not exist. 80 @return Property value, or QString::null if (and only if) the property does not exist.
79 */ 81 */
80 QString nonKDECustomProperty(const QCString& name) const; 82 QString nonKDECustomProperty(const Q3CString& name) const;
81 83
82 /** Initialise the alarm's custom calendar properties to the specified 84 /** Initialise the alarm's custom calendar properties to the specified
83 key/value pairs. 85 key/value pairs.
84 */ 86 */
85 void setCustomProperties(const QMap<QCString, QString> &properties); 87 void setCustomProperties(const QMap<Q3CString, QString> &properties);
86 /** Return all custom calendar property key/value pairs. */ 88 /** Return all custom calendar property key/value pairs. */
87 QMap<QCString, QString> customProperties() const; 89 QMap<Q3CString, QString> customProperties() const;
88 90
89 private: 91 private:
90 static bool checkName(const QCString& name); 92 static bool checkName(const Q3CString& name);
91 93
92 QMap<QCString, QString> mProperties; // custom calendar properties 94 QMap<Q3CString, QString> mProperties; // custom calendar properties
93}; 95};
94 96
95} 97}
diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp
index cdcfae4..ca7e212 100644
--- a/libkcal/dndfactory.cpp
+++ b/libkcal/dndfactory.cpp
@@ -22,6 +22,9 @@
22 22
23#include <qapplication.h> 23#include <qapplication.h>
24#include <qclipboard.h> 24#include <qclipboard.h>
25//Added by qt3to4:
26#include <QDropEvent>
27#include <Q3PtrList>
25 28
26#include <kiconloader.h> 29#include <kiconloader.h>
27#include <kdebug.h> 30#include <kdebug.h>
@@ -68,7 +71,7 @@ Event *DndFactory::createDrop(QDropEvent *de)
68 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) { 71 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) {
69 de->accept(); 72 de->accept();
70 73
71 QPtrList<Event> events = cal.events(); 74 Q3PtrList<Event> events = cal.events();
72 if ( !events.isEmpty() ) { 75 if ( !events.isEmpty() ) {
73 Event *event = new Event( *events.first() ); 76 Event *event = new Event( *events.first() );
74 return event; 77 return event;
@@ -87,7 +90,7 @@ Todo *DndFactory::createDropTodo(QDropEvent *de)
87 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) { 90 if ( ICalDrag::decode( de, &cal ) || VCalDrag::decode( de, &cal ) ) {
88 de->accept(); 91 de->accept();
89 92
90 QPtrList<Todo> todos = cal.todos(); 93 Q3PtrList<Todo> todos = cal.todos();
91 if ( !todos.isEmpty() ) { 94 if ( !todos.isEmpty() ) {
92 Todo *todo = new Todo( *todos.first() ); 95 Todo *todo = new Todo( *todos.first() );
93 return todo; 96 return todo;
@@ -133,7 +136,7 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime
133 return 0; 136 return 0;
134 } 137 }
135 138
136 QPtrList<Incidence> incList = cal.incidences(); 139 Q3PtrList<Incidence> incList = cal.incidences();
137 Incidence *inc = incList.first(); 140 Incidence *inc = incList.first();
138 141
139 if ( !incList.isEmpty() && inc ) { 142 if ( !incList.isEmpty() && inc ) {
diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h
index 2df5259..a873c37 100644
--- a/libkcal/dndfactory.h
+++ b/libkcal/dndfactory.h
@@ -1,3 +1,5 @@
1//Added by qt3to4:
2#include <QDropEvent>
1/* 3/*
2 This file is part of libkcal. 4 This file is part of libkcal.
3 5
diff --git a/libkcal/dndfactory_dummy.h b/libkcal/dndfactory_dummy.h
index 44cc114..3ab6adf 100644
--- a/libkcal/dndfactory_dummy.h
+++ b/libkcal/dndfactory_dummy.h
@@ -25,6 +25,8 @@
25#define KCAL_DNDFACTORY_H 25#define KCAL_DNDFACTORY_H
26 26
27#include "vcalformat.h" 27#include "vcalformat.h"
28//Added by qt3to4:
29#include <QDropEvent>
28 30
29class QDropEvent; 31class QDropEvent;
30 32
diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp
index ae40e6d..73eb3d0 100644
--- a/libkcal/dummyscheduler.cpp
+++ b/libkcal/dummyscheduler.cpp
@@ -23,7 +23,9 @@
23// 23//
24 24
25#include <qfile.h> 25#include <qfile.h>
26#include <qtextstream.h> 26#include <q3textstream.h>
27//Added by qt3to4:
28#include <Q3PtrList>
27 29
28#include <kdebug.h> 30#include <kdebug.h>
29 31
@@ -68,8 +70,8 @@ bool DummyScheduler::performTransaction(IncidenceBase *incidence,Method method)
68bool DummyScheduler::saveMessage(const QString &message) 70bool DummyScheduler::saveMessage(const QString &message)
69{ 71{
70 QFile f("dummyscheduler.store"); 72 QFile f("dummyscheduler.store");
71 if (f.open(IO_WriteOnly | IO_Append)) { 73 if (f.open(QIODevice::WriteOnly | QIODevice::Append)) {
72 QTextStream t(&f); 74 Q3TextStream t(&f);
73 t << message << endl; 75 t << message << endl;
74 f.close(); 76 f.close();
75 return true; 77 return true;
@@ -78,16 +80,16 @@ bool DummyScheduler::saveMessage(const QString &message)
78 } 80 }
79} 81}
80 82
81QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() 83Q3PtrList<ScheduleMessage> DummyScheduler::retrieveTransactions()
82{ 84{
83 QPtrList<ScheduleMessage> messageList; 85 Q3PtrList<ScheduleMessage> messageList;
84 86
85 QFile f("dummyscheduler.store"); 87 QFile f("dummyscheduler.store");
86 if (!f.open(IO_ReadOnly)) { 88 if (!f.open(QIODevice::ReadOnly)) {
87 kdDebug(5800) << "DummyScheduler::retrieveTransactions(): Can't open file" 89 kdDebug(5800) << "DummyScheduler::retrieveTransactions(): Can't open file"
88 << endl; 90 << endl;
89 } else { 91 } else {
90 QTextStream t(&f); 92 Q3TextStream t(&f);
91 QString messageString; 93 QString messageString;
92 QString messageLine = t.readLine(); 94 QString messageLine = t.readLine();
93 while (!messageLine.isNull()) { 95 while (!messageLine.isNull()) {
diff --git a/libkcal/dummyscheduler.h b/libkcal/dummyscheduler.h
index df42153..f86d583 100644
--- a/libkcal/dummyscheduler.h
+++ b/libkcal/dummyscheduler.h
@@ -24,6 +24,8 @@
24// 24//
25 25
26#include "scheduler.h" 26#include "scheduler.h"
27//Added by qt3to4:
28#include <Q3PtrList>
27 29
28namespace KCal { 30namespace KCal {
29 31
@@ -39,7 +41,7 @@ class DummyScheduler : public Scheduler {
39 bool publish (IncidenceBase *incidence,const QString &recipients); 41 bool publish (IncidenceBase *incidence,const QString &recipients);
40 bool performTransaction(IncidenceBase *incidence,Method method); 42 bool performTransaction(IncidenceBase *incidence,Method method);
41 bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients); 43 bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients);
42 QPtrList<ScheduleMessage> retrieveTransactions(); 44 Q3PtrList<ScheduleMessage> retrieveTransactions();
43 45
44 protected: 46 protected:
45 bool saveMessage(const QString &); 47 bool saveMessage(const QString &);
diff --git a/libkcal/event.cpp b/libkcal/event.cpp
index fdf5657..060df81 100644
--- a/libkcal/event.cpp
+++ b/libkcal/event.cpp
@@ -384,7 +384,7 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_
384// *ok = false; 384// *ok = false;
385// return incidenceStart; 385// return incidenceStart;
386// } 386// }
387 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 387 for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
388 if (alarm->enabled()) { 388 if (alarm->enabled()) {
389 if ( alarm->hasTime () ) { 389 if ( alarm->hasTime () ) {
390 if ( alarm->time() < alarmStart ) { 390 if ( alarm->time() < alarmStart ) {
diff --git a/libkcal/event.h b/libkcal/event.h
index 6a58618..da44f81 100644
--- a/libkcal/event.h
+++ b/libkcal/event.h
@@ -25,6 +25,8 @@
25// 25//
26 26
27#include "incidence.h" 27#include "incidence.h"
28//Added by qt3to4:
29#include <Q3CString>
28namespace KCal { 30namespace KCal {
29 31
30/** 32/**
@@ -40,7 +42,7 @@ class Event : public Incidence
40 ~Event(); 42 ~Event();
41 bool matchTime(QDateTime*startDT, QDateTime* endDT); 43 bool matchTime(QDateTime*startDT, QDateTime* endDT);
42 44
43 QCString type() const { return "Event"; } 45 Q3CString type() const { return "Event"; }
44 IncTypeID typeID() const { return eventID; } 46 IncTypeID typeID() const { return eventID; }
45 47
46 Incidence *clone(); 48 Incidence *clone();
diff --git a/libkcal/filestorage.cpp b/libkcal/filestorage.cpp
index a139124..3d1309f 100644
--- a/libkcal/filestorage.cpp
+++ b/libkcal/filestorage.cpp
@@ -22,7 +22,7 @@
22 22
23#include <qdatetime.h> 23#include <qdatetime.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26 26
27#include <kdebug.h> 27#include <kdebug.h>
28 28
diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp
index ba15d6d..e4e9ec9 100644
--- a/libkcal/freebusy.cpp
+++ b/libkcal/freebusy.cpp
@@ -21,6 +21,9 @@
21#include <kdebug.h> 21#include <kdebug.h>
22 22
23#include "freebusy.h" 23#include "freebusy.h"
24//Added by qt3to4:
25#include <Q3ValueList>
26#include <Q3PtrList>
24 27
25using namespace KCal; 28using namespace KCal;
26 29
@@ -43,7 +46,7 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime
43 setDtEnd(end); 46 setDtEnd(end);
44 47
45 //Gets all the events in the calendar 48 //Gets all the events in the calendar
46 QPtrList<Event> eventList = mCalendar->events(); 49 Q3PtrList<Event> eventList = mCalendar->events();
47 Event *event; 50 Event *event;
48 51
49 int extraDays, i, x, duration; 52 int extraDays, i, x, duration;
@@ -113,7 +116,7 @@ QDateTime FreeBusy::dtEnd() const
113 return mDtEnd; 116 return mDtEnd;
114} 117}
115 118
116QValueList<Period> FreeBusy::busyPeriods() const 119Q3ValueList<Period> FreeBusy::busyPeriods() const
117{ 120{
118 return mBusyPeriods; 121 return mBusyPeriods;
119} 122}
@@ -146,14 +149,14 @@ bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &even
146 return true; 149 return true;
147} 150}
148 151
149FreeBusy::FreeBusy(QValueList<Period> busyPeriods) 152FreeBusy::FreeBusy(Q3ValueList<Period> busyPeriods)
150{ 153{
151 mBusyPeriods = busyPeriods; 154 mBusyPeriods = busyPeriods;
152} 155}
153 156
154void FreeBusy::sortList() 157void FreeBusy::sortList()
155{ 158{
156 typedef QValueList<Period> PeriodList; 159 typedef Q3ValueList<Period> PeriodList;
157 160
158 PeriodList::Iterator tmpPeriod, earlyPeriod; 161 PeriodList::Iterator tmpPeriod, earlyPeriod;
159 PeriodList sortedList; 162 PeriodList sortedList;
diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h
index d741c72..bd14cb7 100644
--- a/libkcal/freebusy.h
+++ b/libkcal/freebusy.h
@@ -24,8 +24,10 @@
24// 24//
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qvaluelist.h> 27#include <q3valuelist.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30#include "period.h" 32#include "period.h"
31#include "calendar.h" 33#include "calendar.h"
@@ -43,17 +45,17 @@ class FreeBusy : public IncidenceBase
43 FreeBusy(); 45 FreeBusy();
44 FreeBusy(const QDateTime &start, const QDateTime &end); 46 FreeBusy(const QDateTime &start, const QDateTime &end);
45 FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end); 47 FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end);
46 FreeBusy(QValueList<Period> busyPeriods); 48 FreeBusy(Q3ValueList<Period> busyPeriods);
47 49
48 ~FreeBusy(); 50 ~FreeBusy();
49 51
50 QCString type() const { return "FreeBusy"; } 52 Q3CString type() const { return "FreeBusy"; }
51 IncTypeID typeID() const { return freebusyID; } 53 IncTypeID typeID() const { return freebusyID; }
52 54
53 virtual QDateTime dtEnd() const; 55 virtual QDateTime dtEnd() const;
54 bool setDtEnd( const QDateTime &end ); 56 bool setDtEnd( const QDateTime &end );
55 57
56 QValueList<Period> busyPeriods() const; 58 Q3ValueList<Period> busyPeriods() const;
57 59
58 void addPeriod(const QDateTime &start, const QDateTime &end); 60 void addPeriod(const QDateTime &start, const QDateTime &end);
59 void sortList(); 61 void sortList();
@@ -64,7 +66,7 @@ class FreeBusy : public IncidenceBase
64 bool addLocalPeriod(const QDateTime &start, const QDateTime &end); 66 bool addLocalPeriod(const QDateTime &start, const QDateTime &end);
65 67
66 QDateTime mDtEnd; 68 QDateTime mDtEnd;
67 QValueList<Period> mBusyPeriods; 69 Q3ValueList<Period> mBusyPeriods;
68 Calendar *mCalendar; 70 Calendar *mCalendar;
69}; 71};
70 72
diff --git a/libkcal/icaldrag.cpp b/libkcal/icaldrag.cpp
index 446a115..7f5a796 100644
--- a/libkcal/icaldrag.cpp
+++ b/libkcal/icaldrag.cpp
@@ -28,7 +28,7 @@
28using namespace KCal; 28using namespace KCal;
29 29
30ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) 30ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name )
31 : QStoredDrag( "text/calendar", parent, name ) 31 : Q3StoredDrag( "text/calendar", parent, name )
32{ 32{
33 ICalFormat icf; 33 ICalFormat icf;
34 QString scal = icf.toString( cal ); 34 QString scal = icf.toString( cal );
diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h
index fdf32b7..c1f73f4 100644
--- a/libkcal/icaldrag.h
+++ b/libkcal/icaldrag.h
@@ -22,13 +22,13 @@
22#ifndef ICALDRAG_H 22#ifndef ICALDRAG_H
23#define ICALDRAG_H 23#define ICALDRAG_H
24 24
25#include <qdragobject.h> 25#include <q3dragobject.h>
26#include "calendar.h" 26#include "calendar.h"
27 27
28namespace KCal { 28namespace KCal {
29 29
30/** iCalendar drag&drop class. */ 30/** iCalendar drag&drop class. */
31class ICalDrag : public QStoredDrag 31class ICalDrag : public Q3StoredDrag
32{ 32{
33 public: 33 public:
34 /** Create a drag&drop object for iCalendar component \a ical. */ 34 /** Create a drag&drop object for iCalendar component \a ical. */
diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp
index 6f3a799..3829bc1 100644
--- a/libkcal/icalformat.cpp
+++ b/libkcal/icalformat.cpp
@@ -20,11 +20,11 @@
20 20
21#include <qdatetime.h> 21#include <qdatetime.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qptrlist.h> 23#include <q3ptrlist.h>
24#include <qregexp.h> 24#include <qregexp.h>
25#include <qclipboard.h> 25#include <qclipboard.h>
26#include <qfile.h> 26#include <qfile.h>
27#include <qtextstream.h> 27#include <q3textstream.h>
28#include <qtextcodec.h> 28#include <qtextcodec.h>
29#include <stdlib.h> 29#include <stdlib.h>
30 30
@@ -70,14 +70,14 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName)
70 clearException(); 70 clearException();
71 71
72 QFile file( fileName ); 72 QFile file( fileName );
73 if (!file.open( IO_ReadOnly ) ) { 73 if (!file.open( QIODevice::ReadOnly ) ) {
74 setException(new ErrorFormat(ErrorFormat::LoadError)); 74 setException(new ErrorFormat(ErrorFormat::LoadError));
75 return false; 75 return false;
76 } 76 }
77 QTextStream ts( &file ); 77 Q3TextStream ts( &file );
78 QString text; 78 QString text;
79 79
80 ts.setEncoding( QTextStream::Latin1 ); 80 ts.setEncoding( Q3TextStream::Latin1 );
81 text = ts.read(); 81 text = ts.read();
82 file.close(); 82 file.close();
83 83
@@ -98,14 +98,14 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName )
98 // TODO: write backup file 98 // TODO: write backup file
99 //is.restart(); 99 //is.restart();
100 QFile file( fileName ); 100 QFile file( fileName );
101 if (!file.open( IO_WriteOnly ) ) { 101 if (!file.open( QIODevice::WriteOnly ) ) {
102 setException(new ErrorFormat(ErrorFormat::SaveError, 102 setException(new ErrorFormat(ErrorFormat::SaveError,
103 i18n("Could not open file '%1'").arg(fileName))); 103 i18n("Could not open file '%1'").arg(fileName)));
104 return false; 104 return false;
105 } 105 }
106 QTextStream ts( &file ); 106 Q3TextStream ts( &file );
107 107
108 ts.setEncoding( QTextStream::Latin1 ); 108 ts.setEncoding( Q3TextStream::Latin1 );
109 ts << text; 109 ts << text;
110 file.close(); 110 file.close();
111 //qDebug("saving file takes ms: %d ", is.elapsed() ); 111 //qDebug("saving file takes ms: %d ", is.elapsed() );
@@ -156,15 +156,15 @@ Incidence *ICalFormat::fromString( const QString &text )
156 fromString(&cal, text); 156 fromString(&cal, text);
157 157
158 Incidence *ical = 0; 158 Incidence *ical = 0;
159 QPtrList<Event> elist = cal.events(); 159 Q3PtrList<Event> elist = cal.events();
160 if ( elist.count() > 0 ) { 160 if ( elist.count() > 0 ) {
161 ical = elist.first(); 161 ical = elist.first();
162 } else { 162 } else {
163 QPtrList<Todo> tlist = cal.todos(); 163 Q3PtrList<Todo> tlist = cal.todos();
164 if ( tlist.count() > 0 ) { 164 if ( tlist.count() > 0 ) {
165 ical = tlist.first(); 165 ical = tlist.first();
166 } else { 166 } else {
167 QPtrList<Journal> jlist = cal.journals(); 167 Q3PtrList<Journal> jlist = cal.journals();
168 if ( jlist.count() > 0 ) { 168 if ( jlist.count() > 0 ) {
169 ical = jlist.first(); 169 ical = jlist.first();
170 } 170 }
@@ -172,7 +172,7 @@ Incidence *ICalFormat::fromString( const QString &text )
172 } 172 }
173 return ical; 173 return ical;
174} 174}
175#include <qapp.h> 175#include <qapplication.h>
176 176
177QString ICalFormat::toString( Calendar *cal ) 177QString ICalFormat::toString( Calendar *cal )
178{ 178{
@@ -184,8 +184,8 @@ QString ICalFormat::toString( Calendar *cal )
184 icalcomponent *component; 184 icalcomponent *component;
185 185
186 // todos 186 // todos
187 QPtrList<Todo> todoList = cal->rawTodos(); 187 Q3PtrList<Todo> todoList = cal->rawTodos();
188 QPtrListIterator<Todo> qlt(todoList); 188 Q3PtrListIterator<Todo> qlt(todoList);
189 for (; qlt.current(); ++qlt) { 189 for (; qlt.current(); ++qlt) {
190 component = mImpl->writeTodo(qlt.current()); 190 component = mImpl->writeTodo(qlt.current());
191 icalcomponent_add_component(calendar,component); 191 icalcomponent_add_component(calendar,component);
@@ -196,7 +196,7 @@ QString ICalFormat::toString( Calendar *cal )
196 } 196 }
197 } 197 }
198 // events 198 // events
199 QPtrList<Event> events = cal->rawEvents(); 199 Q3PtrList<Event> events = cal->rawEvents();
200 Event *ev; 200 Event *ev;
201 for(ev=events.first();ev;ev=events.next()) { 201 for(ev=events.first();ev;ev=events.next()) {
202 component = mImpl->writeEvent(ev); 202 component = mImpl->writeEvent(ev);
@@ -207,7 +207,7 @@ QString ICalFormat::toString( Calendar *cal )
207 } 207 }
208 208
209 // journals 209 // journals
210 QPtrList<Journal> journals = cal->journals(); 210 Q3PtrList<Journal> journals = cal->journals();
211 Journal *j; 211 Journal *j;
212 for(j=journals.first();j;j=journals.next()) { 212 for(j=journals.first();j;j=journals.next()) {
213 component = mImpl->writeJournal(j); 213 component = mImpl->writeJournal(j);
diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h
index a770dbb..a454b35 100644
--- a/libkcal/icalformat.h
+++ b/libkcal/icalformat.h
@@ -21,6 +21,8 @@
21#define ICALFORMAT_H 21#define ICALFORMAT_H
22 22
23#include <qstring.h> 23#include <qstring.h>
24//Added by qt3to4:
25#include <Q3CString>
24 26
25#include "scheduler.h" 27#include "scheduler.h"
26 28
@@ -106,7 +108,7 @@ class ICalFormat : public CalFormat {
106 bool mProcessEvents; 108 bool mProcessEvents;
107 ICalFormatImpl *mImpl; 109 ICalFormatImpl *mImpl;
108 QString mTimeZoneId; 110 QString mTimeZoneId;
109 QCString mTzString; 111 Q3CString mTzString;
110 int tzOffsetMin; 112 int tzOffsetMin;
111 bool mUtc; 113 bool mUtc;
112}; 114};
diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp
index 65eabc8..ea144ee 100644
--- a/libkcal/icalformatimpl.cpp
+++ b/libkcal/icalformatimpl.cpp
@@ -20,8 +20,11 @@
20 20
21#include <qdatetime.h> 21#include <qdatetime.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qptrlist.h> 23#include <q3ptrlist.h>
24#include <qfile.h> 24#include <qfile.h>
25//Added by qt3to4:
26#include <Q3ValueList>
27#include <Q3CString>
25 28
26#include <kdebug.h> 29#include <kdebug.h>
27#include <klocale.h> 30#include <klocale.h>
@@ -221,8 +224,8 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy,
221 } 224 }
222 225
223 //Loops through all the periods in the freebusy object 226 //Loops through all the periods in the freebusy object
224 QValueList<Period> list = freebusy->busyPeriods(); 227 Q3ValueList<Period> list = freebusy->busyPeriods();
225 QValueList<Period>::Iterator it; 228 Q3ValueList<Period>::Iterator it;
226 icalperiodtype period; 229 icalperiodtype period;
227 for (it = list.begin(); it!= list.end(); ++it) { 230 for (it = list.begin(); it!= list.end(); ++it) {
228 period.start = writeICalDateTime((*it).start()); 231 period.start = writeICalDateTime((*it).start());
@@ -384,12 +387,12 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence)
384 } 387 }
385 388
386 // attachments 389 // attachments
387 QPtrList<Attachment> attachments = incidence->attachments(); 390 Q3PtrList<Attachment> attachments = incidence->attachments();
388 for (Attachment *at = attachments.first(); at; at = attachments.next()) 391 for (Attachment *at = attachments.first(); at; at = attachments.next())
389 icalcomponent_add_property(parent,writeAttachment(at)); 392 icalcomponent_add_property(parent,writeAttachment(at));
390 393
391 // alarms 394 // alarms
392 QPtrList<Alarm> alarms = incidence->alarms(); 395 Q3PtrList<Alarm> alarms = incidence->alarms();
393 Alarm* alarm; 396 Alarm* alarm;
394 for (alarm = alarms.first(); alarm; alarm = alarms.next()) { 397 for (alarm = alarms.first(); alarm; alarm = alarms.next()) {
395 if (alarm->enabled()) { 398 if (alarm->enabled()) {
@@ -423,8 +426,8 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc
423 426
424 // attendees 427 // attendees
425 if (incidenceBase->attendeeCount() != 0) { 428 if (incidenceBase->attendeeCount() != 0) {
426 QPtrList<Attendee> al = incidenceBase->attendees(); 429 Q3PtrList<Attendee> al = incidenceBase->attendees();
427 QPtrListIterator<Attendee> ai(al); 430 Q3PtrListIterator<Attendee> ai(al);
428 for (; ai.current(); ++ai) { 431 for (; ai.current(); ++ai) {
429 icalcomponent_add_property(parent,writeAttendee(ai.current())); 432 icalcomponent_add_property(parent,writeAttendee(ai.current()));
430 } 433 }
@@ -436,8 +439,8 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc
436 439
437void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties) 440void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties)
438{ 441{
439 QMap<QCString, QString> custom = properties->customProperties(); 442 QMap<Q3CString, QString> custom = properties->customProperties();
440 for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { 443 for (QMap<Q3CString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
441 icalproperty *p = icalproperty_new_x(c.data().utf8()); 444 icalproperty *p = icalproperty_new_x(c.data().utf8());
442 icalproperty_set_x_name(p,c.key()); 445 icalproperty_set_x_name(p,c.key());
443 icalcomponent_add_property(parent,p); 446 icalcomponent_add_property(parent,p);
@@ -546,8 +549,8 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur)
546 int index = 0; 549 int index = 0;
547 int index2 = 0; 550 int index2 = 0;
548 551
549 QPtrList<Recurrence::rMonthPos> tmpPositions; 552 Q3PtrList<Recurrence::rMonthPos> tmpPositions;
550 QPtrList<int> tmpDays; 553 Q3PtrList<int> tmpDays;
551 int *tmpDay; 554 int *tmpDay;
552 Recurrence::rMonthPos *tmpPos; 555 Recurrence::rMonthPos *tmpPos;
553 bool datetime = false; 556 bool datetime = false;
@@ -704,8 +707,8 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
704 break; 707 break;
705 case Alarm::Email: { 708 case Alarm::Email: {
706 action = ICAL_ACTION_EMAIL; 709 action = ICAL_ACTION_EMAIL;
707 QValueList<Person> addresses = alarm->mailAddresses(); 710 Q3ValueList<Person> addresses = alarm->mailAddresses();
708 for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { 711 for (Q3ValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) {
709 icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8()); 712 icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8());
710 if (!(*ad).name().isEmpty()) { 713 if (!(*ad).name().isEmpty()) {
711 icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8())); 714 icalproperty_add_parameter(p,icalparameter_new_cn((*ad).name().utf8()));
@@ -763,8 +766,8 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm)
763 } 766 }
764 767
765 // Custom properties 768 // Custom properties
766 QMap<QCString, QString> custom = alarm->customProperties(); 769 QMap<Q3CString, QString> custom = alarm->customProperties();
767 for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { 770 for (QMap<Q3CString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) {
768 icalproperty *p = icalproperty_new_x(c.data().utf8()); 771 icalproperty *p = icalproperty_new_x(c.data().utf8());
769 icalproperty_set_x_name(p,c.key()); 772 icalproperty_set_x_name(p,c.key());
770 icalcomponent_add_property(a,p); 773 icalcomponent_add_property(a,p);
@@ -1339,7 +1342,7 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci
1339 1342
1340void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties) 1343void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties)
1341{ 1344{
1342 QMap<QCString, QString> customProperties; 1345 QMap<Q3CString, QString> customProperties;
1343 1346
1344 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY); 1347 icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY);
1345 1348
diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h
index 203c302..3a35b4c 100644
--- a/libkcal/icalformatimpl.h
+++ b/libkcal/icalformatimpl.h
@@ -21,6 +21,8 @@
21#define ICALFORMATIMPL_H 21#define ICALFORMATIMPL_H
22 22
23#include <qstring.h> 23#include <qstring.h>
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25#include "scheduler.h" 27#include "scheduler.h"
26#include "freebusy.h" 28#include "freebusy.h"
@@ -93,8 +95,8 @@ class ICalFormatImpl {
93 QString mLoadedProductId; // PRODID string loaded from calendar file 95 QString mLoadedProductId; // PRODID string loaded from calendar file
94 int mCalendarVersion; // determines backward compatibility mode on read 96 int mCalendarVersion; // determines backward compatibility mode on read
95 97
96 QPtrList<Event> mEventsRelate; // events with relations 98 Q3PtrList<Event> mEventsRelate; // events with relations
97 QPtrList<Todo> mTodosRelate; // todos with relations 99 Q3PtrList<Todo> mTodosRelate; // todos with relations
98 100
99 static const int mSecondsPerWeek; 101 static const int mSecondsPerWeek;
100 static const int mSecondsPerDay; 102 static const int mSecondsPerDay;
diff --git a/libkcal/imipscheduler.cpp b/libkcal/imipscheduler.cpp
index e186f8e..e6d56a6 100644
--- a/libkcal/imipscheduler.cpp
+++ b/libkcal/imipscheduler.cpp
@@ -26,6 +26,8 @@
26#include "icalformat.h" 26#include "icalformat.h"
27 27
28#include "imipscheduler.h" 28#include "imipscheduler.h"
29//Added by qt3to4:
30#include <Q3PtrList>
29 31
30using namespace KCal; 32using namespace KCal;
31 33
@@ -50,9 +52,9 @@ bool IMIPScheduler::performTransaction(IncidenceBase *incidence,Method method)
50 return false; 52 return false;
51} 53}
52 54
53QPtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() 55Q3PtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions()
54{ 56{
55 QPtrList<ScheduleMessage> messageList; 57 Q3PtrList<ScheduleMessage> messageList;
56 58
57 return messageList; 59 return messageList;
58} 60}
diff --git a/libkcal/imipscheduler.h b/libkcal/imipscheduler.h
index f142060..5a2d38e 100644
--- a/libkcal/imipscheduler.h
+++ b/libkcal/imipscheduler.h
@@ -23,7 +23,7 @@
23// iMIP implementation of iTIP methods 23// iMIP implementation of iTIP methods
24// 24//
25 25
26#include <qptrlist.h> 26#include <q3ptrlist.h>
27 27
28#include "scheduler.h" 28#include "scheduler.h"
29 29
@@ -40,7 +40,7 @@ class IMIPScheduler : public Scheduler {
40 40
41 bool publish (IncidenceBase *incidence,const QString &recipients); 41 bool publish (IncidenceBase *incidence,const QString &recipients);
42 bool performTransaction(IncidenceBase *incidence,Method method); 42 bool performTransaction(IncidenceBase *incidence,Method method);
43 QPtrList<ScheduleMessage> retrieveTransactions(); 43 Q3PtrList<ScheduleMessage> retrieveTransactions();
44}; 44};
45 45
46} 46}
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index 7dd9bd2..8fcdc69 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -26,6 +26,8 @@
26 26
27#include "incidence.h" 27#include "incidence.h"
28#include "todo.h" 28#include "todo.h"
29//Added by qt3to4:
30#include <Q3PtrList>
29 31
30using namespace KCal; 32using namespace KCal;
31 33
@@ -59,7 +61,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
59 mRelatedToUid = i.mRelatedToUid; 61 mRelatedToUid = i.mRelatedToUid;
60// QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; 62// QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations;
61 mExDates = i.mExDates; 63 mExDates = i.mExDates;
62 QPtrListIterator<Attachment> itat( i.mAttachments ); 64 Q3PtrListIterator<Attachment> itat( i.mAttachments );
63 Attachment *at; 65 Attachment *at;
64 while( (at = itat.current()) ) { 66 while( (at = itat.current()) ) {
65 Attachment *a = new Attachment( *at ); 67 Attachment *a = new Attachment( *at );
@@ -73,7 +75,7 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i )
73 mLocation = i.mLocation; 75 mLocation = i.mLocation;
74 mCancelled = i.mCancelled; 76 mCancelled = i.mCancelled;
75 mHasStartDate = i.mHasStartDate; 77 mHasStartDate = i.mHasStartDate;
76 QPtrListIterator<Alarm> it( i.mAlarms ); 78 Q3PtrListIterator<Alarm> it( i.mAlarms );
77 const Alarm *a; 79 const Alarm *a;
78 while( (a = it.current()) ) { 80 while( (a = it.current()) ) {
79 Alarm *b = new Alarm( *a ); 81 Alarm *b = new Alarm( *a );
@@ -98,7 +100,7 @@ Incidence::~Incidence()
98{ 100{
99 101
100 Incidence *ev; 102 Incidence *ev;
101 QPtrList<Incidence> Relations = relations(); 103 Q3PtrList<Incidence> Relations = relations();
102 for (ev=Relations.first();ev;ev=Relations.next()) { 104 for (ev=Relations.first();ev;ev=Relations.next()) {
103 if (ev->relatedTo() == this) ev->setRelatedTo(0); 105 if (ev->relatedTo() == this) ev->setRelatedTo(0);
104 } 106 }
@@ -216,8 +218,8 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 )
216 } 218 }
217 } 219 }
218#if 0 220#if 0
219 QPtrListIterator<Alarm> a1( i1.alarms() ); 221 Q3PtrListIterator<Alarm> a1( i1.alarms() );
220 QPtrListIterator<Alarm> a2( i2.alarms() ); 222 Q3PtrListIterator<Alarm> a2( i2.alarms() );
221 for( ; a1.current() && a2.current(); ++a1, ++a2 ) { 223 for( ; a1.current() && a2.current(); ++a1, ++a2 ) {
222 if( *a1.current() == *a2.current() ) { 224 if( *a1.current() == *a2.current() ) {
223 continue; 225 continue;
@@ -322,7 +324,7 @@ void Incidence::cloneRelations( Incidence * newInc )
322 // newInc is already a clone of this incidence 324 // newInc is already a clone of this incidence
323 Incidence * inc; 325 Incidence * inc;
324 Incidence * cloneInc; 326 Incidence * cloneInc;
325 QPtrList<Incidence> Relations = relations(); 327 Q3PtrList<Incidence> Relations = relations();
326 for (inc=Relations.first();inc;inc=Relations.next()) { 328 for (inc=Relations.first();inc;inc=Relations.next()) {
327 cloneInc = inc->clone(); 329 cloneInc = inc->clone();
328 cloneInc->recreate(); 330 cloneInc->recreate();
@@ -356,7 +358,7 @@ QDateTime Incidence::lastModifiedSub()
356 return mLastModifiedSub; 358 return mLastModifiedSub;
357 mLastModifiedSub = lastModified(); 359 mLastModifiedSub = lastModified();
358 Incidence * inc; 360 Incidence * inc;
359 QPtrList<Incidence> Relations = relations(); 361 Q3PtrList<Incidence> Relations = relations();
360 for (inc=Relations.first();inc;inc=Relations.next()) { 362 for (inc=Relations.first();inc;inc=Relations.next()) {
361 if ( inc->lastModifiedSub() > mLastModifiedSub ) 363 if ( inc->lastModifiedSub() > mLastModifiedSub )
362 mLastModifiedSub = inc->lastModifiedSub(); 364 mLastModifiedSub = inc->lastModifiedSub();
@@ -447,7 +449,7 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations
447 updated(); 449 updated();
448 if ( addToRelations ) { 450 if ( addToRelations ) {
449 Incidence * inc; 451 Incidence * inc;
450 QPtrList<Incidence> Relations = relations(); 452 Q3PtrList<Incidence> Relations = relations();
451 for (inc=Relations.first();inc;inc=Relations.next()) { 453 for (inc=Relations.first();inc;inc=Relations.next()) {
452 inc->addCategories( categories, true ); 454 inc->addCategories( categories, true );
453 } 455 }
@@ -462,7 +464,7 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation
462 updated(); 464 updated();
463 if ( setForRelations ) { 465 if ( setForRelations ) {
464 Incidence * inc; 466 Incidence * inc;
465 QPtrList<Incidence> Relations = relations(); 467 Q3PtrList<Incidence> Relations = relations();
466 for (inc=Relations.first();inc;inc=Relations.next()) { 468 for (inc=Relations.first();inc;inc=Relations.next()) {
467 inc->setCategories( categories, true ); 469 inc->setCategories( categories, true );
468 } 470 }
@@ -550,15 +552,15 @@ Incidence *Incidence::relatedTo() const
550 return mRelatedTo; 552 return mRelatedTo;
551} 553}
552 554
553QPtrList<Incidence> Incidence::relations() const 555Q3PtrList<Incidence> Incidence::relations() const
554{ 556{
555 return mRelations; 557 return mRelations;
556} 558}
557 559
558void Incidence::addRelationsToList(QPtrList<Incidence> *rel) 560void Incidence::addRelationsToList(Q3PtrList<Incidence> *rel)
559{ 561{
560 Incidence* inc; 562 Incidence* inc;
561 QPtrList<Incidence> Relations = relations(); 563 Q3PtrList<Incidence> Relations = relations();
562 for (inc=Relations.first();inc;inc=Relations.next()) { 564 for (inc=Relations.first();inc;inc=Relations.next()) {
563 inc->addRelationsToList( rel ); 565 inc->addRelationsToList( rel );
564 } 566 }
@@ -647,15 +649,15 @@ void Incidence::deleteAttachments(const QString& mime)
647 } 649 }
648} 650}
649 651
650QPtrList<Attachment> Incidence::attachments() const 652Q3PtrList<Attachment> Incidence::attachments() const
651{ 653{
652 return mAttachments; 654 return mAttachments;
653} 655}
654 656
655QPtrList<Attachment> Incidence::attachments(const QString& mime) const 657Q3PtrList<Attachment> Incidence::attachments(const QString& mime) const
656{ 658{
657 QPtrList<Attachment> attachments; 659 Q3PtrList<Attachment> attachments;
658 QPtrListIterator<Attachment> it( mAttachments ); 660 Q3PtrListIterator<Attachment> it( mAttachments );
659 Attachment *at; 661 Attachment *at;
660 while ( (at = it.current()) ) { 662 while ( (at = it.current()) ) {
661 if (at->mimeType() == mime) 663 if (at->mimeType() == mime)
@@ -737,7 +739,7 @@ QStringList Incidence::secrecyList()
737} 739}
738 740
739 741
740QPtrList<Alarm> Incidence::alarms() const 742Q3PtrList<Alarm> Incidence::alarms() const
741{ 743{
742 return mAlarms; 744 return mAlarms;
743} 745}
@@ -771,7 +773,7 @@ void Incidence::clearAlarms()
771bool Incidence::isAlarmEnabled() const 773bool Incidence::isAlarmEnabled() const
772{ 774{
773 Alarm* alarm; 775 Alarm* alarm;
774 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 776 for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
775 if (alarm->enabled()) 777 if (alarm->enabled())
776 return true; 778 return true;
777 } 779 }
diff --git a/libkcal/incidence.h b/libkcal/incidence.h
index f89942f..2940129 100644
--- a/libkcal/incidence.h
+++ b/libkcal/incidence.h
@@ -25,7 +25,9 @@
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qstringlist.h> 27#include <qstringlist.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29//Added by qt3to4:
30#include <Q3PtrList>
29 31
30#include "recurrence.h" 32#include "recurrence.h"
31#include "alarm.h" 33#include "alarm.h"
@@ -113,7 +115,7 @@ class Incidence : public IncidenceBase
113 115
114 virtual Incidence *clone() = 0; 116 virtual Incidence *clone() = 0;
115 virtual void cloneRelations( Incidence * ); 117 virtual void cloneRelations( Incidence * );
116 void addRelationsToList(QPtrList<Incidence> *rel); 118 void addRelationsToList(Q3PtrList<Incidence> *rel);
117 void clearRelations(); 119 void clearRelations();
118 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; 120 virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0;
119 void setReadOnly( bool ); 121 void setReadOnly( bool );
@@ -177,7 +179,7 @@ class Incidence : public IncidenceBase
177 /** what event does this one relate to? */ 179 /** what event does this one relate to? */
178 Incidence *relatedTo() const; 180 Incidence *relatedTo() const;
179 /** All events that are related to this event */ 181 /** All events that are related to this event */
180 QPtrList<Incidence> relations() const; 182 Q3PtrList<Incidence> relations() const;
181 /** Add an event which is related to this event */ 183 /** Add an event which is related to this event */
182 void addRelation(Incidence *); 184 void addRelation(Incidence *);
183 /** Remove event that is related to this event */ 185 /** Remove event that is related to this event */
@@ -202,9 +204,9 @@ class Incidence : public IncidenceBase
202 /** remove and delete all attachments with this mime type */ 204 /** remove and delete all attachments with this mime type */
203 void deleteAttachments(const QString& mime); 205 void deleteAttachments(const QString& mime);
204 /** return list of all associated attachments */ 206 /** return list of all associated attachments */
205 QPtrList<Attachment> attachments() const; 207 Q3PtrList<Attachment> attachments() const;
206 /** find a list of attachments with this mime type */ 208 /** find a list of attachments with this mime type */
207 QPtrList<Attachment> attachments(const QString& mime) const; 209 Q3PtrList<Attachment> attachments(const QString& mime) const;
208 210
209 /** sets the event's status the value specified. See the enumeration 211 /** sets the event's status the value specified. See the enumeration
210 * above for possible values. */ 212 * above for possible values. */
@@ -235,7 +237,7 @@ class Incidence : public IncidenceBase
235 int priority() const; 237 int priority() const;
236 238
237 /** All alarms that are associated with this incidence */ 239 /** All alarms that are associated with this incidence */
238 QPtrList<Alarm> alarms() const; 240 Q3PtrList<Alarm> alarms() const;
239 /** Create a new alarm which is associated with this incidence */ 241 /** Create a new alarm which is associated with this incidence */
240 Alarm* newAlarm(); 242 Alarm* newAlarm();
241 /** Add an alarm which is associated with this incidence */ 243 /** Add an alarm which is associated with this incidence */
@@ -288,8 +290,8 @@ class Incidence : public IncidenceBase
288 QString durationText4Time( int secs ); 290 QString durationText4Time( int secs );
289 Recurrence *mRecurrence; 291 Recurrence *mRecurrence;
290protected: 292protected:
291 QPtrList<Alarm> mAlarms; 293 Q3PtrList<Alarm> mAlarms;
292 QPtrList<Incidence> mRelations; 294 Q3PtrList<Incidence> mRelations;
293 QDateTime mRecurrenceID; 295 QDateTime mRecurrenceID;
294 bool mHasRecurrenceID; 296 bool mHasRecurrenceID;
295 private: 297 private:
@@ -308,7 +310,7 @@ protected:
308 Incidence *mRelatedTo; 310 Incidence *mRelatedTo;
309 QString mRelatedToUid; 311 QString mRelatedToUid;
310 DateList mExDates; 312 DateList mExDates;
311 QPtrList<Attachment> mAttachments; 313 Q3PtrList<Attachment> mAttachments;
312 QStringList mResources; 314 QStringList mResources;
313 bool mHasStartDate; // if todo has associated start date 315 bool mHasStartDate; // if todo has associated start date
314 316
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index 56c0560..f11ec54 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -27,6 +27,8 @@
27#include "syncdefines.h" 27#include "syncdefines.h"
28 28
29#include "incidencebase.h" 29#include "incidencebase.h"
30//Added by qt3to4:
31#include <Q3PtrList>
30 32
31using namespace KCal; 33using namespace KCal;
32 34
@@ -64,7 +66,7 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) :
64 mCalEnabled = i.mCalEnabled; 66 mCalEnabled = i.mCalEnabled;
65 mAlarmEnabled = i.mAlarmEnabled; 67 mAlarmEnabled = i.mAlarmEnabled;
66 mCalID = i.mCalID; 68 mCalID = i.mCalID;
67 QPtrList<Attendee> attendees = i.attendees(); 69 Q3PtrList<Attendee> attendees = i.attendees();
68 for( Attendee *a = attendees.first(); a; a = attendees.next() ) { 70 for( Attendee *a = attendees.first(); a; a = attendees.next() ) {
69 mAttendees.append( new Attendee( *a ) ); 71 mAttendees.append( new Attendee( *a ) );
70 } 72 }
@@ -300,7 +302,7 @@ bool IncidenceBase::addAttendee(Attendee *a, bool doupdate)
300 if (a->name().left(7).upper() == "MAILTO:") 302 if (a->name().left(7).upper() == "MAILTO:")
301 a->setName(a->name().remove(0,7)); 303 a->setName(a->name().remove(0,7));
302 304
303 QPtrListIterator<Attendee> qli(mAttendees); 305 Q3PtrListIterator<Attendee> qli(mAttendees);
304 306
305 qli.toFirst(); 307 qli.toFirst();
306 while (qli) { 308 while (qli) {
@@ -343,7 +345,7 @@ void IncidenceBase::clearAttendees()
343#if 0 345#if 0
344Attendee *IncidenceBase::getAttendee(const char *n) const 346Attendee *IncidenceBase::getAttendee(const char *n) const
345{ 347{
346 QPtrListIterator<Attendee> qli(mAttendees); 348 Q3PtrListIterator<Attendee> qli(mAttendees);
347 349
348 qli.toFirst(); 350 qli.toFirst();
349 while (qli) { 351 while (qli) {
@@ -357,7 +359,7 @@ Attendee *IncidenceBase::getAttendee(const char *n) const
357 359
358Attendee *IncidenceBase::attendeeByMail(const QString &email) 360Attendee *IncidenceBase::attendeeByMail(const QString &email)
359{ 361{
360 QPtrListIterator<Attendee> qli(mAttendees); 362 Q3PtrListIterator<Attendee> qli(mAttendees);
361 363
362 qli.toFirst(); 364 qli.toFirst();
363 while (qli) { 365 while (qli) {
@@ -370,7 +372,7 @@ Attendee *IncidenceBase::attendeeByMail(const QString &email)
370 372
371Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QString& email) 373Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QString& email)
372{ 374{
373 QPtrListIterator<Attendee> qli(mAttendees); 375 Q3PtrListIterator<Attendee> qli(mAttendees);
374 376
375 QStringList mails = emails; 377 QStringList mails = emails;
376 if (!email.isEmpty()) { 378 if (!email.isEmpty()) {
@@ -491,7 +493,7 @@ void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer )
491 493
492void IncidenceBase::updated() 494void IncidenceBase::updated()
493{ 495{
494 QPtrListIterator<Observer> it(mObservers); 496 Q3PtrListIterator<Observer> it(mObservers);
495 while( it.current() ) { 497 while( it.current() ) {
496 Observer *o = it.current(); 498 Observer *o = it.current();
497 ++it; 499 ++it;
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index 3edc03b..d97f524 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -25,15 +25,17 @@
25 25
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qstringlist.h> 27#include <qstringlist.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29#include <qptrlist.h> 29#include <q3ptrlist.h>
30//Added by qt3to4:
31#include <Q3CString>
30 32
31#include "customproperties.h" 33#include "customproperties.h"
32#include "attendee.h" 34#include "attendee.h"
33 35
34namespace KCal { 36namespace KCal {
35 37
36typedef QValueList<QDate> DateList; 38typedef Q3ValueList<QDate> DateList;
37 enum IncTypeID { eventID,todoID,journalID,freebusyID }; 39 enum IncTypeID { eventID,todoID,journalID,freebusyID };
38 40
39/** 41/**
@@ -51,7 +53,7 @@ class IncidenceBase : public CustomProperties
51 IncidenceBase(const IncidenceBase &); 53 IncidenceBase(const IncidenceBase &);
52 virtual ~IncidenceBase(); 54 virtual ~IncidenceBase();
53 55
54 virtual QCString type() const = 0; 56 virtual Q3CString type() const = 0;
55 virtual IncTypeID typeID() const = 0; 57 virtual IncTypeID typeID() const = 0;
56 58
57 /** Set the unique id for the event */ 59 /** Set the unique id for the event */
@@ -109,7 +111,7 @@ class IncidenceBase : public CustomProperties
109 /** Remove all Attendees. */ 111 /** Remove all Attendees. */
110 void clearAttendees(); 112 void clearAttendees();
111 /** Return list of attendees. */ 113 /** Return list of attendees. */
112 QPtrList<Attendee> attendees() const { return mAttendees; }; 114 Q3PtrList<Attendee> attendees() const { return mAttendees; };
113 /** Return number of attendees. */ 115 /** Return number of attendees. */
114 int attendeeCount() const { return mAttendees.count(); }; 116 int attendeeCount() const { return mAttendees.count(); };
115 /** Return the Attendee with this email */ 117 /** Return the Attendee with this email */
@@ -168,7 +170,7 @@ class IncidenceBase : public CustomProperties
168 bool mCalEnabled; 170 bool mCalEnabled;
169 bool mAlarmEnabled; 171 bool mAlarmEnabled;
170 QDateTime mLastModified; 172 QDateTime mLastModified;
171 QPtrList<Attendee> mAttendees; 173 Q3PtrList<Attendee> mAttendees;
172 174
173 bool mFloats; 175 bool mFloats;
174 176
@@ -181,7 +183,7 @@ class IncidenceBase : public CustomProperties
181 int mPilotId; // unique id for pilot sync 183 int mPilotId; // unique id for pilot sync
182 int mSyncStatus; // status (for sync) 184 int mSyncStatus; // status (for sync)
183 185
184 QPtrList<Observer> mObservers; 186 Q3PtrList<Observer> mObservers;
185}; 187};
186 188
187bool operator==( const IncidenceBase&, const IncidenceBase& ); 189bool operator==( const IncidenceBase&, const IncidenceBase& );
diff --git a/libkcal/journal.h b/libkcal/journal.h
index 1cd0a22..c83356f 100644
--- a/libkcal/journal.h
+++ b/libkcal/journal.h
@@ -24,6 +24,8 @@
24// 24//
25 25
26#include "incidence.h" 26#include "incidence.h"
27//Added by qt3to4:
28#include <Q3CString>
27 29
28namespace KCal { 30namespace KCal {
29 31
@@ -36,7 +38,7 @@ class Journal : public Incidence
36 Journal(); 38 Journal();
37 ~Journal(); 39 ~Journal();
38 40
39 QCString type() const { return "Journal"; } 41 Q3CString type() const { return "Journal"; }
40 IncTypeID typeID() const { return journalID; } 42 IncTypeID typeID() const { return journalID; }
41 43
42 Incidence *clone(); 44 Incidence *clone();
diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp
index 733b897..bce68b0 100644
--- a/libkcal/kincidenceformatter.cpp
+++ b/libkcal/kincidenceformatter.cpp
@@ -4,6 +4,8 @@
4#include <klocale.h> 4#include <klocale.h>
5#ifdef DEKTOP_VERSION 5#ifdef DEKTOP_VERSION
6#include <kabc/stdaddressbook.h> 6#include <kabc/stdaddressbook.h>
7//Added by qt3to4:
8#include <Q3PtrList>
7#define size count 9#define size count
8#endif 10#endif
9 11
@@ -310,7 +312,7 @@ void KIncidenceFormatter::formatCategories(Incidence *event)
310} 312}
311void KIncidenceFormatter::addTag(const QString & tag,const QString & text) 313void KIncidenceFormatter::addTag(const QString & tag,const QString & text)
312{ 314{
313 int number=text.contains("\n"); 315 int number=text.count("\n");
314 QString str = "<" + tag + ">"; 316 QString str = "<" + tag + ">";
315 QString tmpText=text; 317 QString tmpText=text;
316 QString tmpStr=str; 318 QString tmpStr=str;
@@ -339,7 +341,7 @@ void KIncidenceFormatter::addTag(const QString & tag,const QString & text)
339 341
340void KIncidenceFormatter::formatAttendees(Incidence *event) 342void KIncidenceFormatter::formatAttendees(Incidence *event)
341{ 343{
342 QPtrList<Attendee> attendees = event->attendees(); 344 Q3PtrList<Attendee> attendees = event->attendees();
343 if (attendees.count()) { 345 if (attendees.count()) {
344 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 346 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
345 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); 347 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
@@ -362,7 +364,7 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
362#else 364#else
363 mText.append(event->organizer()); 365 mText.append(event->organizer());
364#endif 366#endif
365 if (iconPath) { 367 if (!iconPath.isEmpty()) {
366 mText += " <a href=\"mailto:" + event->organizer() + "\">"; 368 mText += " <a href=\"mailto:" + event->organizer() + "\">";
367 mText += "<IMG src=\"" + iconPath + "\">"; 369 mText += "<IMG src=\"" + iconPath + "\">";
368 mText += "</a>\n"; 370 mText += "</a>\n";
@@ -402,7 +404,7 @@ void KIncidenceFormatter::formatAttendees(Incidence *event)
402#endif 404#endif
403 405
404 if (!a->email().isEmpty()) { 406 if (!a->email().isEmpty()) {
405 if (iconPath) { 407 if (!iconPath.isEmpty()) {
406 mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; 408 mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">";
407 if ( a->RSVP() ) 409 if ( a->RSVP() )
408 mText += "<IMG src=\"" + iconPath + "\">"; 410 mText += "<IMG src=\"" + iconPath + "\">";
diff --git a/libkcal/libkcal.pro b/libkcal/libkcal.pro
index 33c63c3..1f43b10 100644
--- a/libkcal/libkcal.pro
+++ b/libkcal/libkcal.pro
@@ -1,6 +1,6 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3 TARGET = microkcal 3 TARGET = xmicrokcal
4 4
5include( ../variables.pri ) 5include( ../variables.pri )
6 6
@@ -106,3 +106,7 @@ dndfactory.cpp \
106 versit/vobject.c \ 106 versit/vobject.c \
107 phoneformat.cpp \ 107 phoneformat.cpp \
108 108
109#The following line was inserted by qt3to4
110QT += xml qt3support
111#The following line was inserted by qt3to4
112QT +=
diff --git a/libkcal/libkcalE.pro b/libkcal/libkcalE.pro
index 737be53..fe46656 100644
--- a/libkcal/libkcalE.pro
+++ b/libkcal/libkcalE.pro
@@ -1,6 +1,6 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3 TARGET = microkcal 3 TARGET = xmicrokcal
4 4
5INCLUDEPATH += ../libkdepim ../microkde ../qtcompat versit ../microkde/kdecore $(QPEDIR)/include 5INCLUDEPATH += ../libkdepim ../microkde ../qtcompat versit ../microkde/kdecore $(QPEDIR)/include
6INCLUDEPATH += ../libical/src/libical 6INCLUDEPATH += ../libical/src/libical
diff --git a/libkcal/listbase.h b/libkcal/listbase.h
index 085b13d..6c942ef 100644
--- a/libkcal/listbase.h
+++ b/libkcal/listbase.h
@@ -21,7 +21,9 @@
21#ifndef KCAL_LISTBASE_H 21#ifndef KCAL_LISTBASE_H
22#define KCAL_LISTBASE_H 22#define KCAL_LISTBASE_H
23 23
24#include <qvaluelist.h> 24#include <q3valuelist.h>
25//Added by qt3to4:
26#include <Q3PtrList>
25 27
26namespace KCal { 28namespace KCal {
27 class Event; 29 class Event;
@@ -31,24 +33,24 @@ namespace KCal {
31 *> by auto delete funtionality known from QPtrList. 33 *> by auto delete funtionality known from QPtrList.
32*/ 34*/
33template<class T> 35template<class T>
34class ListBase : public QValueList<T *> 36class ListBase : public Q3ValueList<T *>
35{ 37{
36 public: 38 public:
37 ListBase() 39 ListBase()
38 : QValueList<T *>(), mAutoDelete( false ) 40 : Q3ValueList<T *>(), mAutoDelete( false )
39 { 41 {
40 } 42 }
41 43
42 ListBase( const ListBase &l ) 44 ListBase( const ListBase &l )
43 : QValueList<T *>( l ), mAutoDelete( false ) 45 : Q3ValueList<T *>( l ), mAutoDelete( false )
44 { 46 {
45 } 47 }
46 48
47 ~ListBase() 49 ~ListBase()
48 { 50 {
49 if ( mAutoDelete ) { 51 if ( mAutoDelete ) {
50 QValueListIterator<T *> it; 52 Q3ValueListIterator<T *> it;
51 for( it = QValueList<T*>::begin(); it != QValueList<T*>::end(); ++it ) { 53 for( it = Q3ValueList<T*>::begin(); it != Q3ValueList<T*>::end(); ++it ) {
52 delete *it; 54 delete *it;
53 } 55 }
54 } 56 }
@@ -57,7 +59,7 @@ class ListBase : public QValueList<T *>
57 ListBase &operator=( const ListBase &l ) 59 ListBase &operator=( const ListBase &l )
58 { 60 {
59 if ( this == &l ) return *this; 61 if ( this == &l ) return *this;
60 QValueList<T *>::operator=( l ); 62 Q3ValueList<T *>::operator=( l );
61 return *this; 63 return *this;
62 } 64 }
63 65
@@ -68,8 +70,8 @@ class ListBase : public QValueList<T *>
68 70
69 bool removeRef( T *t ) 71 bool removeRef( T *t )
70 { 72 {
71 QValueListIterator<T *> it = find( t ); 73 Q3ValueListIterator<T *> it = find( t );
72 if ( it == QValueList<T*>::end() ) { 74 if ( it == Q3ValueList<T*>::end() ) {
73 return false; 75 return false;
74 } else { 76 } else {
75 if ( mAutoDelete ) delete t; 77 if ( mAutoDelete ) delete t;
@@ -77,8 +79,8 @@ class ListBase : public QValueList<T *>
77 return true; 79 return true;
78 } 80 }
79 } 81 }
80 void fill ( QPtrList<T> list ) { 82 void fill ( Q3PtrList<T> list ) {
81 QPtrListIterator<T> it (list); 83 Q3PtrListIterator<T> it (list);
82 T *item; 84 T *item;
83 while ( (item = it.current()) != 0 ) { 85 while ( (item = it.current()) != 0 ) {
84 append( item ); 86 append( item );
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 900fc04..794e4b4 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -22,15 +22,16 @@
22#include <qdatetime.h> 22#include <qdatetime.h>
23#include <qstring.h> 23#include <qstring.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <qregexp.h> 26#include <qregexp.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qclipboard.h> 28#include <qclipboard.h>
29#include <qfile.h> 29#include <qfile.h>
30#include <qtextstream.h> 30#include <q3textstream.h>
31#include <qtextcodec.h> 31#include <qtextcodec.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <QDesktopWidget>
34 35
35#include <kdebug.h> 36#include <kdebug.h>
36#include <klocale.h> 37#include <klocale.h>
@@ -201,7 +202,7 @@ ulong PhoneFormat::getCsumEvent( Event* event )
201 writeEndDate = true; 202 writeEndDate = true;
202 { 203 {
203 int count = 1; 204 int count = 1;
204 QPtrList<Recurrence::rMonthPos> rmp; 205 Q3PtrList<Recurrence::rMonthPos> rmp;
205 rmp = rec->monthPositions(); 206 rmp = rec->monthPositions();
206 if ( rmp.first()->negative ) 207 if ( rmp.first()->negative )
207 count = 5 - rmp.first()->rPos - 1; 208 count = 5 - rmp.first()->rPos - 1;
@@ -241,7 +242,7 @@ ulong PhoneFormat::getCsumEvent( Event* event )
241 242
242 if ( rec->endDate().isValid() ) { // 15 + 16 243 if ( rec->endDate().isValid() ) { // 15 + 16
243 list.append( "1" ); 244 list.append( "1" );
244 list.append( PhoneParser::dtToString( rec->endDate()) ); 245 list.append( PhoneParser::dtToString( (QDateTime)rec->endDate()) );
245 } else { 246 } else {
246 list.append( "0" ); 247 list.append( "0" );
247 list.append( "20991231T000000" ); 248 list.append( "20991231T000000" );
@@ -305,7 +306,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
305 306
306 if ( ! vfload.load( calendar, fileName ) ) 307 if ( ! vfload.load( calendar, fileName ) )
307 return false; 308 return false;
308 QPtrList<Event> er = calendar->rawEvents(); 309 Q3PtrList<Event> er = calendar->rawEvents();
309 Event* ev = er.first(); 310 Event* ev = er.first();
310 qDebug("reading events... "); 311 qDebug("reading events... ");
311 while ( ev ) { 312 while ( ev ) {
@@ -340,7 +341,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
340 } 341 }
341 { 342 {
342 qDebug("reading todos... "); 343 qDebug("reading todos... ");
343 QPtrList<Todo> tr = calendar->rawTodos(); 344 Q3PtrList<Todo> tr = calendar->rawTodos();
344 Todo* ev = tr.first(); 345 Todo* ev = tr.first();
345 while ( ev ) { 346 while ( ev ) {
346 347
@@ -465,7 +466,7 @@ void PhoneFormat::copyTodo( Todo* to, Todo* from )
465 to->setPriority(from->priority()); 466 to->setPriority(from->priority());
466 467
467} 468}
468#include <qcstring.h> 469#include <q3cstring.h>
469 470
470void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& csum) 471void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& csum)
471{ 472{
@@ -497,7 +498,7 @@ bool PhoneFormat::save( Calendar *calendar)
497 498
498 499
499 // 1 remove events which should be deleted 500 // 1 remove events which should be deleted
500 QPtrList<Event> er = calendar->rawEvents(); 501 Q3PtrList<Event> er = calendar->rawEvents();
501 Event* ev = er.first(); 502 Event* ev = er.first();
502 while ( ev ) { 503 while ( ev ) {
503 if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { 504 if ( ev->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) {
@@ -508,7 +509,7 @@ bool PhoneFormat::save( Calendar *calendar)
508 ev = er.next(); 509 ev = er.next();
509 } 510 }
510 // 2 remove todos which should be deleted 511 // 2 remove todos which should be deleted
511 QPtrList<Todo> tl = calendar->rawTodos(); 512 Q3PtrList<Todo> tl = calendar->rawTodos();
512 Todo* to = tl.first(); 513 Todo* to = tl.first();
513 while ( to ) { 514 while ( to ) {
514 if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) { 515 if ( to->tempSyncStat() == SYNC_TEMPSTATE_DELETE ) {
@@ -552,7 +553,7 @@ bool PhoneFormat::save( Calendar *calendar)
552 er = calendar->rawEvents(); 553 er = calendar->rawEvents();
553 ev = er.first(); 554 ev = er.first();
554 message = i18n(" Comparing event # "); 555 message = i18n(" Comparing event # ");
555 QPtrList<Event> er1 = calendarTemp->rawEvents(); 556 Q3PtrList<Event> er1 = calendarTemp->rawEvents();
556 Event* ev1; 557 Event* ev1;
557 int procCount = 0; 558 int procCount = 0;
558 while ( ev ) { 559 while ( ev ) {
@@ -580,7 +581,7 @@ bool PhoneFormat::save( Calendar *calendar)
580 tl = calendar->rawTodos(); 581 tl = calendar->rawTodos();
581 to = tl.first(); 582 to = tl.first();
582 procCount = 0; 583 procCount = 0;
583 QPtrList<Todo> tl1 = calendarTemp->rawTodos(); 584 Q3PtrList<Todo> tl1 = calendarTemp->rawTodos();
584 Todo* to1 ; 585 Todo* to1 ;
585 message = i18n(" Comparing todo # "); 586 message = i18n(" Comparing todo # ");
586 while ( to ) { 587 while ( to ) {
diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp
index 0a4a031..2dfe1a4 100644
--- a/libkcal/qtopiaformat.cpp
+++ b/libkcal/qtopiaformat.cpp
@@ -21,11 +21,11 @@
21 21
22#include <qdatetime.h> 22#include <qdatetime.h>
23#include <qstring.h> 23#include <qstring.h>
24#include <qptrlist.h> 24#include <q3ptrlist.h>
25#include <qregexp.h> 25#include <qregexp.h>
26#include <qclipboard.h> 26#include <qclipboard.h>
27#include <qfile.h> 27#include <qfile.h>
28#include <qtextstream.h> 28#include <q3textstream.h>
29#include <qxml.h> 29#include <qxml.h>
30 30
31#include <kdebug.h> 31#include <kdebug.h>
@@ -309,12 +309,12 @@ bool QtopiaFormat::save( Calendar *calendar, const QString &fileName )
309 // TODO: write backup file 309 // TODO: write backup file
310 310
311 QFile file( fileName ); 311 QFile file( fileName );
312 if (!file.open( IO_WriteOnly ) ) { 312 if (!file.open( QIODevice::WriteOnly ) ) {
313 setException(new ErrorFormat(ErrorFormat::SaveError, 313 setException(new ErrorFormat(ErrorFormat::SaveError,
314 i18n("Could not open file '%1'").arg(fileName))); 314 i18n("Could not open file '%1'").arg(fileName)));
315 return false; 315 return false;
316 } 316 }
317 QTextStream ts( &file ); 317 Q3TextStream ts( &file );
318 ts << text; 318 ts << text;
319 file.close(); 319 file.close();
320 320
diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp
index 6ee5499..9a4e540 100644
--- a/libkcal/recurrence.cpp
+++ b/libkcal/recurrence.cpp
@@ -29,6 +29,9 @@
29#include "incidence.h" 29#include "incidence.h"
30 30
31#include "recurrence.h" 31#include "recurrence.h"
32//Added by qt3to4:
33#include <Q3ValueList>
34#include <Q3PtrList>
32 35
33using namespace KCal; 36using namespace KCal;
34 37
@@ -56,7 +59,7 @@ Recurrence::Recurrence(Incidence *parent, int compatVersion)
56Recurrence::Recurrence(const Recurrence &r, Incidence *parent) 59Recurrence::Recurrence(const Recurrence &r, Incidence *parent)
57: recurs(r.recurs), 60: recurs(r.recurs),
58 rWeekStart(r.rWeekStart), 61 rWeekStart(r.rWeekStart),
59 rDays(r.rDays.copy()), 62 rDays(r.rDays),
60 rFreq(r.rFreq), 63 rFreq(r.rFreq),
61 rDuration(r.rDuration), 64 rDuration(r.rDuration),
62 rEndDateTime(r.rEndDateTime), 65 rEndDateTime(r.rEndDateTime),
@@ -70,19 +73,19 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent)
70 mCompatDuration(r.mCompatDuration), 73 mCompatDuration(r.mCompatDuration),
71 mParent(parent) 74 mParent(parent)
72{ 75{
73 for (QPtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { 76 for (Q3PtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) {
74 rMonthPos *tmp = new rMonthPos; 77 rMonthPos *tmp = new rMonthPos;
75 tmp->rPos = mp.current()->rPos; 78 tmp->rPos = mp.current()->rPos;
76 tmp->negative = mp.current()->negative; 79 tmp->negative = mp.current()->negative;
77 tmp->rDays = mp.current()->rDays.copy(); 80 tmp->rDays = mp.current()->rDays;
78 rMonthPositions.append(tmp); 81 rMonthPositions.append(tmp);
79 } 82 }
80 for (QPtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { 83 for (Q3PtrListIterator<int> md(r.rMonthDays); md.current(); ++md) {
81 int *tmp = new int; 84 int *tmp = new int;
82 *tmp = *md.current(); 85 *tmp = *md.current();
83 rMonthDays.append(tmp); 86 rMonthDays.append(tmp);
84 } 87 }
85 for (QPtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { 88 for (Q3PtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) {
86 int *tmp = new int; 89 int *tmp = new int;
87 *tmp = *yn.current(); 90 *tmp = *yn.current();
88 rYearNums.append(tmp); 91 rYearNums.append(tmp);
@@ -124,8 +127,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const
124 return rDays == r2.rDays 127 return rDays == r2.rDays
125 && rWeekStart == r2.rWeekStart; 128 && rWeekStart == r2.rWeekStart;
126 case rMonthlyPos: { 129 case rMonthlyPos: {
127 QPtrList<rMonthPos> MonthPositions = rMonthPositions; 130 Q3PtrList<rMonthPos> MonthPositions = rMonthPositions;
128 QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; 131 Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions;
129 if ( !MonthPositions.count() ) 132 if ( !MonthPositions.count() )
130 return false; 133 return false;
131 if ( !MonthPositions2.count() ) 134 if ( !MonthPositions2.count() )
@@ -133,8 +136,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const
133 return MonthPositions.first()->rPos == MonthPositions2.first()->rPos; 136 return MonthPositions.first()->rPos == MonthPositions2.first()->rPos;
134 } 137 }
135 case rMonthlyDay: { 138 case rMonthlyDay: {
136 QPtrList<int> MonthDays = rMonthDays ; 139 Q3PtrList<int> MonthDays = rMonthDays ;
137 QPtrList<int> MonthDays2 = r2.rMonthDays ; 140 Q3PtrList<int> MonthDays2 = r2.rMonthDays ;
138 if ( !MonthDays.count() ) 141 if ( !MonthDays.count() )
139 return false; 142 return false;
140 if ( !MonthDays2.count() ) 143 if ( !MonthDays2.count() )
@@ -143,12 +146,12 @@ bool Recurrence::operator==( const Recurrence& r2 ) const
143 } 146 }
144 case rYearlyPos: { 147 case rYearlyPos: {
145 148
146 QPtrList<int> YearNums = rYearNums; 149 Q3PtrList<int> YearNums = rYearNums;
147 QPtrList<int> YearNums2 = r2.rYearNums; 150 Q3PtrList<int> YearNums2 = r2.rYearNums;
148 if ( *YearNums.first() != *YearNums2.first() ) 151 if ( *YearNums.first() != *YearNums2.first() )
149 return false; 152 return false;
150 QPtrList<rMonthPos> MonthPositions = rMonthPositions; 153 Q3PtrList<rMonthPos> MonthPositions = rMonthPositions;
151 QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; 154 Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions;
152 if ( !MonthPositions.count() ) 155 if ( !MonthPositions.count() )
153 return false; 156 return false;
154 if ( !MonthPositions2.count() ) 157 if ( !MonthPositions2.count() )
@@ -157,13 +160,13 @@ bool Recurrence::operator==( const Recurrence& r2 ) const
157 160
158 } 161 }
159 case rYearlyMonth: { 162 case rYearlyMonth: {
160 QPtrList<int> YearNums = rYearNums; 163 Q3PtrList<int> YearNums = rYearNums;
161 QPtrList<int> YearNums2 = r2.rYearNums; 164 Q3PtrList<int> YearNums2 = r2.rYearNums;
162 return ( *YearNums.first() == *YearNums2.first() && mFeb29YearlyType == r2.mFeb29YearlyType); 165 return ( *YearNums.first() == *YearNums2.first() && mFeb29YearlyType == r2.mFeb29YearlyType);
163 } 166 }
164 case rYearlyDay: { 167 case rYearlyDay: {
165 QPtrList<int> YearNums = rYearNums; 168 Q3PtrList<int> YearNums = rYearNums;
166 QPtrList<int> YearNums2 = r2.rYearNums; 169 Q3PtrList<int> YearNums2 = r2.rYearNums;
167 return ( *YearNums.first() == *YearNums2.first() ); 170 return ( *YearNums.first() == *YearNums2.first() );
168 } 171 }
169 case rNone: 172 case rNone:
@@ -357,7 +360,7 @@ QDateTime Recurrence::endDateTime() const
357 case rHourly: 360 case rHourly:
358 return mRecurStart.addSecs((rDuration-1+mRecurExDatesCount)*rFreq*3600); 361 return mRecurStart.addSecs((rDuration-1+mRecurExDatesCount)*rFreq*3600);
359 case rDaily: 362 case rDaily:
360 return dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); 363 return (QDateTime)dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq);
361 364
362 case rWeekly: 365 case rWeekly:
363 count = weeklyCalc(END_DATE_AND_COUNT, end); 366 count = weeklyCalc(END_DATE_AND_COUNT, end);
@@ -506,17 +509,17 @@ const QBitArray &Recurrence::days() const
506 return rDays; 509 return rDays;
507} 510}
508 511
509const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const 512const Q3PtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const
510{ 513{
511 return rMonthPositions; 514 return rMonthPositions;
512} 515}
513 516
514const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const 517const Q3PtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const
515{ 518{
516 return rMonthPositions; 519 return rMonthPositions;
517} 520}
518 521
519const QPtrList<int> &Recurrence::monthDays() const 522const Q3PtrList<int> &Recurrence::monthDays() const
520{ 523{
521 return rMonthDays; 524 return rMonthDays;
522} 525}
@@ -759,7 +762,7 @@ void Recurrence::addYearlyMonthPos(short _rPos, const QBitArray &_rDays)
759 addMonthlyPos_(_rPos, _rDays); 762 addMonthlyPos_(_rPos, _rDays);
760} 763}
761 764
762const QPtrList<int> &Recurrence::yearNums() const 765const Q3PtrList<int> &Recurrence::yearNums() const
763{ 766{
764 return rYearNums; 767 return rYearNums;
765} 768}
@@ -1047,13 +1050,13 @@ bool Recurrence::recursMonthly(const QDate &qd) const
1047 (rDuration == 0 && qd <= rEndDateTime.date()) || 1050 (rDuration == 0 && qd <= rEndDateTime.date()) ||
1048 rDuration == -1)) { 1051 rDuration == -1)) {
1049 // The date queried falls within the range of the event. 1052 // The date queried falls within the range of the event.
1050 QValueList<int> days; 1053 Q3ValueList<int> days;
1051 int daysInMonth = qd.daysInMonth(); 1054 int daysInMonth = qd.daysInMonth();
1052 if (recurs == rMonthlyDay) 1055 if (recurs == rMonthlyDay)
1053 getMonthlyDayDays(days, daysInMonth); 1056 getMonthlyDayDays(days, daysInMonth);
1054 else if (recurs == rMonthlyPos) 1057 else if (recurs == rMonthlyPos)
1055 getMonthlyPosDays(days, daysInMonth, QDate(year, month, 1).dayOfWeek()); 1058 getMonthlyPosDays(days, daysInMonth, QDate(year, month, 1).dayOfWeek());
1056 for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { 1059 for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) {
1057 if (*it == day) 1060 if (*it == day)
1058 return true; 1061 return true;
1059 } 1062 }
@@ -1101,7 +1104,7 @@ bool Recurrence::recursYearlyByMonth(const QDate &qd) const
1101 rDuration == -1)) { 1104 rDuration == -1)) {
1102 // The date queried falls within the range of the event. 1105 // The date queried falls within the range of the event.
1103 int i = qmonth; 1106 int i = qmonth;
1104 for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { 1107 for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) {
1105 if (i == *qlin.current()) 1108 if (i == *qlin.current())
1106 return true; 1109 return true;
1107 } 1110 }
@@ -1127,12 +1130,12 @@ bool Recurrence::recursYearlyByPos(const QDate &qd) const
1127 (rDuration == 0 && qd <= rEndDateTime.date()) || 1130 (rDuration == 0 && qd <= rEndDateTime.date()) ||
1128 rDuration == -1)) { 1131 rDuration == -1)) {
1129 // The date queried falls within the range of the event. 1132 // The date queried falls within the range of the event.
1130 for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { 1133 for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) {
1131 if (month == *qlin.current()) { 1134 if (month == *qlin.current()) {
1132 // The month recurs 1135 // The month recurs
1133 QValueList<int> days; 1136 Q3ValueList<int> days;
1134 getMonthlyPosDays(days, qd.daysInMonth(), QDate(year, month, 1).dayOfWeek()); 1137 getMonthlyPosDays(days, qd.daysInMonth(), QDate(year, month, 1).dayOfWeek());
1135 for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { 1138 for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) {
1136 if (*it == day) 1139 if (*it == day)
1137 return true; 1140 return true;
1138 } 1141 }
@@ -1157,7 +1160,7 @@ bool Recurrence::recursYearlyByDay(const QDate &qd) const
1157 rDuration == -1)) { 1160 rDuration == -1)) {
1158 // The date queried falls within the range of the event. 1161 // The date queried falls within the range of the event.
1159 int i = qd.dayOfYear(); 1162 int i = qd.dayOfYear();
1160 for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { 1163 for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) {
1161 if (i == *qlin.current()) 1164 if (i == *qlin.current())
1162 return true; 1165 return true;
1163 } 1166 }
@@ -1549,7 +1552,7 @@ int Recurrence::recurCalc(PeriodFunc func, QDate &enddate) const
1549 case END_DATE_AND_COUNT: 1552 case END_DATE_AND_COUNT:
1550 case NEXT_AFTER_DATE: 1553 case NEXT_AFTER_DATE:
1551 if (count == 0) 1554 if (count == 0)
1552 endtime = QDate(); 1555 endtime = QDateTime();
1553 else if (timed) 1556 else if (timed)
1554 enddate = endtime.date(); 1557 enddate = endtime.date();
1555 break; 1558 break;
@@ -1793,8 +1796,8 @@ struct Recurrence::MonthlyData {
1793 int day; // current day of month 1..31 1796 int day; // current day of month 1..31
1794 bool varies; // true if recurring days vary between different months 1797 bool varies; // true if recurring days vary between different months
1795 private: 1798 private:
1796 QValueList<int> days28, days29, days30, days31; // recurring days in months of each length 1799 Q3ValueList<int> days28, days29, days30, days31; // recurring days in months of each length
1797 QValueList<int> *recurDays[4]; 1800 Q3ValueList<int> *recurDays[4];
1798 public: 1801 public:
1799 MonthlyData(const Recurrence* r, const QDate &date) 1802 MonthlyData(const Recurrence* r, const QDate &date)
1800 : recurrence(r), year(date.year()), month(date.month()-1), day(date.day()) 1803 : recurrence(r), year(date.year()), month(date.month()-1), day(date.day())
@@ -1805,12 +1808,12 @@ struct Recurrence::MonthlyData {
1805 varies = (recurrence->recurs == rMonthlyPos) 1808 varies = (recurrence->recurs == rMonthlyPos)
1806 ? true : recurrence->getMonthlyDayDays(days31, 31); 1809 ? true : recurrence->getMonthlyDayDays(days31, 31);
1807 } 1810 }
1808 const QValueList<int>* dayList() const { 1811 const Q3ValueList<int>* dayList() const {
1809 if (!varies) 1812 if (!varies)
1810 return &days31; 1813 return &days31;
1811 QDate startOfMonth(year, month + 1, 1); 1814 QDate startOfMonth(year, month + 1, 1);
1812 int daysInMonth = startOfMonth.daysInMonth(); 1815 int daysInMonth = startOfMonth.daysInMonth();
1813 QValueList<int>* days = recurDays[daysInMonth - 28]; 1816 Q3ValueList<int>* days = recurDays[daysInMonth - 28];
1814 if (recurrence->recurs == rMonthlyPos) 1817 if (recurrence->recurs == rMonthlyPos)
1815 recurrence->getMonthlyPosDays(*days, daysInMonth, startOfMonth.dayOfWeek()); 1818 recurrence->getMonthlyPosDays(*days, daysInMonth, startOfMonth.dayOfWeek());
1816 else if (days->isEmpty()) 1819 else if (days->isEmpty())
@@ -1844,8 +1847,8 @@ int Recurrence::monthlyCalcEndDate(QDate &enddate, MonthlyData &data) const
1844{ 1847{
1845 uint countTogo = rDuration + mRecurExDatesCount; 1848 uint countTogo = rDuration + mRecurExDatesCount;
1846 int countGone = 0; 1849 int countGone = 0;
1847 QValueList<int>::ConstIterator it; 1850 Q3ValueList<int>::ConstIterator it;
1848 const QValueList<int>* days = data.dayList(); 1851 const Q3ValueList<int>* days = data.dayList();
1849 1852
1850 if (data.day > 1) { 1853 if (data.day > 1) {
1851 // Check what remains of the start month 1854 // Check what remains of the start month
@@ -1910,8 +1913,8 @@ int Recurrence::monthlyCalcToDate(const QDate &enddate, MonthlyData &data) const
1910 int endMonth = enddate.month() - 1; // zero-based 1913 int endMonth = enddate.month() - 1; // zero-based
1911 int endDay = enddate.day(); 1914 int endDay = enddate.day();
1912 int endYearMonth = endYear*12 + endMonth; 1915 int endYearMonth = endYear*12 + endMonth;
1913 QValueList<int>::ConstIterator it; 1916 Q3ValueList<int>::ConstIterator it;
1914 const QValueList<int>* days = data.dayList(); 1917 const Q3ValueList<int>* days = data.dayList();
1915 1918
1916 if (data.day > 1) { 1919 if (data.day > 1) {
1917 // Check what remains of the start month 1920 // Check what remains of the start month
@@ -1969,8 +1972,8 @@ int Recurrence::monthlyCalcNextAfter(QDate &enddate, MonthlyData &data) const
1969 int endYear = enddate.year(); 1972 int endYear = enddate.year();
1970 int endDay = enddate.day(); 1973 int endDay = enddate.day();
1971 int endYearMonth = endYear*12 + enddate.month() - 1; 1974 int endYearMonth = endYear*12 + enddate.month() - 1;
1972 QValueList<int>::ConstIterator it; 1975 Q3ValueList<int>::ConstIterator it;
1973 const QValueList<int>* days = data.dayList(); 1976 const Q3ValueList<int>* days = data.dayList();
1974 1977
1975 if (data.day > 1) { 1978 if (data.day > 1) {
1976 // Check what remains of the start month 1979 // Check what remains of the start month
@@ -2052,17 +2055,17 @@ struct Recurrence::YearlyMonthData {
2052 bool leapyear; // true if February 29th recurs and current year is a leap year 2055 bool leapyear; // true if February 29th recurs and current year is a leap year
2053 bool feb29; // true if February 29th recurs 2056 bool feb29; // true if February 29th recurs
2054 private: 2057 private:
2055 QValueList<int> months; // recurring months in non-leap years 1..12 2058 Q3ValueList<int> months; // recurring months in non-leap years 1..12
2056 QValueList<int> leapMonths; // recurring months in leap years 1..12 2059 Q3ValueList<int> leapMonths; // recurring months in leap years 1..12
2057 public: 2060 public:
2058 YearlyMonthData(const Recurrence* r, const QDate &date) 2061 YearlyMonthData(const Recurrence* r, const QDate &date)
2059 : recurrence(r), year(date.year()), month(date.month()), day(date.day()) 2062 : recurrence(r), year(date.year()), month(date.month()), day(date.day())
2060 { feb29 = recurrence->getYearlyMonthMonths(day, months, leapMonths); 2063 { feb29 = recurrence->getYearlyMonthMonths(day, months, leapMonths);
2061 leapyear = feb29 && QDate::leapYear(year); 2064 leapyear = feb29 && QDate::leapYear(year);
2062 } 2065 }
2063 const QValueList<int>* monthList() const 2066 const Q3ValueList<int>* monthList() const
2064 { return leapyear ? &leapMonths : &months; } 2067 { return leapyear ? &leapMonths : &months; }
2065 const QValueList<int>* leapMonthList() const { return &leapMonths; } 2068 const Q3ValueList<int>* leapMonthList() const { return &leapMonths; }
2066 QDate date() const { return QDate(year, month, day); } 2069 QDate date() const { return QDate(year, month, day); }
2067}; 2070};
2068 2071
@@ -2088,8 +2091,8 @@ int Recurrence::yearlyMonthCalcEndDate(QDate &enddate, YearlyMonthData &data) co
2088{ 2091{
2089 uint countTogo = rDuration + mRecurExDatesCount; 2092 uint countTogo = rDuration + mRecurExDatesCount;
2090 int countGone = 0; 2093 int countGone = 0;
2091 QValueList<int>::ConstIterator it; 2094 Q3ValueList<int>::ConstIterator it;
2092 const QValueList<int>* mons = data.monthList(); // get recurring months for this year 2095 const Q3ValueList<int>* mons = data.monthList(); // get recurring months for this year
2093 2096
2094 if (data.month > 1) { 2097 if (data.month > 1) {
2095 // Check what remains of the start year 2098 // Check what remains of the start year
@@ -2199,8 +2202,8 @@ int Recurrence::yearlyMonthCalcToDate(const QDate &enddate, YearlyMonthData &dat
2199 --endYear; 2202 --endYear;
2200 } 2203 }
2201 } 2204 }
2202 QValueList<int>::ConstIterator it; 2205 Q3ValueList<int>::ConstIterator it;
2203 const QValueList<int>* mons = data.monthList(); 2206 const Q3ValueList<int>* mons = data.monthList();
2204 2207
2205 if (data.month > 1) { 2208 if (data.month > 1) {
2206 // Check what remains of the start year 2209 // Check what remains of the start year
@@ -2270,8 +2273,8 @@ int Recurrence::yearlyMonthCalcNextAfter(QDate &enddate, YearlyMonthData &data)
2270 --endYear; 2273 --endYear;
2271 } 2274 }
2272 } 2275 }
2273 QValueList<int>::ConstIterator it; 2276 Q3ValueList<int>::ConstIterator it;
2274 const QValueList<int>* mons = data.monthList(); 2277 const Q3ValueList<int>* mons = data.monthList();
2275 2278
2276 if (data.month > 1) { 2279 if (data.month > 1) {
2277 // Check what remains of the start year 2280 // Check what remains of the start year
@@ -2390,7 +2393,7 @@ struct Recurrence::YearlyPosData {
2390 int count; // number of days which recur each year, or -1 if variable 2393 int count; // number of days which recur each year, or -1 if variable
2391 bool varies; // true if number of days varies from year to year 2394 bool varies; // true if number of days varies from year to year
2392 private: 2395 private:
2393 mutable QValueList<int> days; 2396 mutable Q3ValueList<int> days;
2394 public: 2397 public:
2395 YearlyPosData(const Recurrence* r, const QDate &date) 2398 YearlyPosData(const Recurrence* r, const QDate &date)
2396 : recurrence(r), year(date.year()), month(date.month()), day(date.day()), count(-1) 2399 : recurrence(r), year(date.year()), month(date.month()), day(date.day()), count(-1)
@@ -2398,7 +2401,7 @@ struct Recurrence::YearlyPosData {
2398 count = daysPerMonth * r->rYearNums.count(); 2401 count = daysPerMonth * r->rYearNums.count();
2399 varies = (daysPerMonth < 0); 2402 varies = (daysPerMonth < 0);
2400 } 2403 }
2401 const QValueList<int>* dayList() const { 2404 const Q3ValueList<int>* dayList() const {
2402 QDate startOfMonth(year, month, 1); 2405 QDate startOfMonth(year, month, 1);
2403 recurrence->getMonthlyPosDays(days, startOfMonth.daysInMonth(), startOfMonth.dayOfWeek()); 2406 recurrence->getMonthlyPosDays(days, startOfMonth.daysInMonth(), startOfMonth.dayOfWeek());
2404 return &days; 2407 return &days;
@@ -2428,12 +2431,12 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const
2428{ 2431{
2429 uint countTogo = rDuration + mRecurExDatesCount; 2432 uint countTogo = rDuration + mRecurExDatesCount;
2430 int countGone = 0; 2433 int countGone = 0;
2431 QValueList<int>::ConstIterator id; 2434 Q3ValueList<int>::ConstIterator id;
2432 const QValueList<int>* days; 2435 const Q3ValueList<int>* days;
2433 2436
2434 if (data.month > 1 || data.day > 1) { 2437 if (data.month > 1 || data.day > 1) {
2435 // Check what remains of the start year 2438 // Check what remains of the start year
2436 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2439 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2437 if (*im.current() >= data.month) { 2440 if (*im.current() >= data.month) {
2438 // Check what remains of the start month 2441 // Check what remains of the start month
2439 if (data.day > 1 || data.varies 2442 if (data.day > 1 || data.varies
@@ -2466,7 +2469,7 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const
2466 if (data.varies) { 2469 if (data.varies) {
2467 // The number of recurrences varies from year to year. 2470 // The number of recurrences varies from year to year.
2468 for ( ; ; ) { 2471 for ( ; ; ) {
2469 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2472 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2470 data.month = *im.current(); 2473 data.month = *im.current();
2471 days = data.dayList(); 2474 days = data.dayList();
2472 int n = days->count(); 2475 int n = days->count();
@@ -2496,7 +2499,7 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const
2496 countTogo -= wholeYears * data.count; 2499 countTogo -= wholeYears * data.count;
2497 2500
2498 // Check the last year in the recurrence. 2501 // Check the last year in the recurrence.
2499 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2502 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2500 if (static_cast<uint>(data.daysPerMonth) >= countTogo) { 2503 if (static_cast<uint>(data.daysPerMonth) >= countTogo) {
2501 // Check the last month in the recurrence 2504 // Check the last month in the recurrence
2502 data.month = *im.current(); 2505 data.month = *im.current();
@@ -2531,12 +2534,12 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c
2531 --endYear; 2534 --endYear;
2532 } 2535 }
2533 int endYearMonth = endYear*12 + endMonth; 2536 int endYearMonth = endYear*12 + endMonth;
2534 QValueList<int>::ConstIterator id; 2537 Q3ValueList<int>::ConstIterator id;
2535 const QValueList<int>* days; 2538 const Q3ValueList<int>* days;
2536 2539
2537 if (data.month > 1 || data.day > 1) { 2540 if (data.month > 1 || data.day > 1) {
2538 // Check what remains of the start year 2541 // Check what remains of the start year
2539 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2542 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2540 if (*im.current() >= data.month) { 2543 if (*im.current() >= data.month) {
2541 data.month = *im.current(); 2544 data.month = *im.current();
2542 if (data.yearMonth() > endYearMonth) 2545 if (data.yearMonth() > endYearMonth)
@@ -2576,7 +2579,7 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c
2576 if (data.varies) { 2579 if (data.varies) {
2577 // The number of recurrences varies from year to year. 2580 // The number of recurrences varies from year to year.
2578 for ( ; ; ) { 2581 for ( ; ; ) {
2579 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2582 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2580 data.month = *im.current(); 2583 data.month = *im.current();
2581 days = data.dayList(); 2584 days = data.dayList();
2582 if (data.yearMonth() >= endYearMonth) { 2585 if (data.yearMonth() >= endYearMonth) {
@@ -2611,7 +2614,7 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c
2611 data.year = endYear; 2614 data.year = endYear;
2612 2615
2613 // Check the last year in the recurrence. 2616 // Check the last year in the recurrence.
2614 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2617 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2615 data.month = *im.current(); 2618 data.month = *im.current();
2616 if (data.month >= endMonth) { 2619 if (data.month >= endMonth) {
2617 if (data.month > endMonth) 2620 if (data.month > endMonth)
@@ -2646,14 +2649,14 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons
2646 --endYear; 2649 --endYear;
2647 } 2650 }
2648 int endYearMonth = endYear*12 + endMonth; 2651 int endYearMonth = endYear*12 + endMonth;
2649 QValueList<int>::ConstIterator id; 2652 Q3ValueList<int>::ConstIterator id;
2650 const QValueList<int>* days; 2653 const Q3ValueList<int>* days;
2651 2654
2652 if (data.varies) { 2655 if (data.varies) {
2653 // The number of recurrences varies from year to year. 2656 // The number of recurrences varies from year to year.
2654 for ( ; ; ) { 2657 for ( ; ; ) {
2655 // Check the next year 2658 // Check the next year
2656 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2659 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2657 if (*im.current() >= data.month) { 2660 if (*im.current() >= data.month) {
2658 // Check the next month 2661 // Check the next month
2659 data.month = *im.current(); 2662 data.month = *im.current();
@@ -2689,7 +2692,7 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons
2689 // The number of recurrences is the same every year. 2692 // The number of recurrences is the same every year.
2690 if (data.month > 1 || data.day > 1) { 2693 if (data.month > 1 || data.day > 1) {
2691 // Check what remains of the start year 2694 // Check what remains of the start year
2692 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2695 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2693 if (*im.current() >= data.month) { 2696 if (*im.current() >= data.month) {
2694 // Check what remains of the start month 2697 // Check what remains of the start month
2695 data.month = *im.current(); 2698 data.month = *im.current();
@@ -2734,7 +2737,7 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons
2734 } 2737 }
2735 2738
2736 // Check the last year in the recurrence 2739 // Check the last year in the recurrence
2737 for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { 2740 for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) {
2738 data.month = *im.current(); 2741 data.month = *im.current();
2739 int ended = data.yearMonth() - endYearMonth; 2742 int ended = data.yearMonth() - endYearMonth;
2740 if (ended >= 0) { 2743 if (ended >= 0) {
@@ -2808,7 +2811,7 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const
2808 if (data.day > 1) { 2811 if (data.day > 1) {
2809 // Check what remains of the start year 2812 // Check what remains of the start year
2810 bool leapOK = data.isMaxDayCount(); 2813 bool leapOK = data.isMaxDayCount();
2811 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 2814 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
2812 int d = *it.current(); 2815 int d = *it.current();
2813 if (d >= data.day && (leapOK || d < 366)) { 2816 if (d >= data.day && (leapOK || d < 366)) {
2814 ++countGone; 2817 ++countGone;
@@ -2846,7 +2849,7 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const
2846 } 2849 }
2847 if (countTogo) { 2850 if (countTogo) {
2848 // Check the last year in the recurrence 2851 // Check the last year in the recurrence
2849 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 2852 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
2850 ++countGone; 2853 ++countGone;
2851 if (--countTogo == 0) { 2854 if (--countTogo == 0) {
2852 data.day = *it.current(); 2855 data.day = *it.current();
@@ -2869,7 +2872,7 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c
2869 if (data.day > 1) { 2872 if (data.day > 1) {
2870 // Check what remains of the start year 2873 // Check what remains of the start year
2871 bool leapOK = data.isMaxDayCount(); 2874 bool leapOK = data.isMaxDayCount();
2872 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 2875 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
2873 int d = *it.current(); 2876 int d = *it.current();
2874 if (d >= data.day && (leapOK || d < 366)) { 2877 if (d >= data.day && (leapOK || d < 366)) {
2875 if (data.year == endYear && d > endDay) 2878 if (data.year == endYear && d > endDay)
@@ -2908,7 +2911,7 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c
2908 2911
2909 if (data.year <= endYear) { 2912 if (data.year <= endYear) {
2910 // Check the last year in the recurrence 2913 // Check the last year in the recurrence
2911 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 2914 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
2912 if (*it.current() > endDay) 2915 if (*it.current() > endDay)
2913 return countGone; 2916 return countGone;
2914 if (++countGone >= countMax) 2917 if (++countGone >= countMax)
@@ -2928,7 +2931,7 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons
2928 if (data.day > 1) { 2931 if (data.day > 1) {
2929 // Check what remains of the start year 2932 // Check what remains of the start year
2930 bool leapOK = data.isMaxDayCount(); 2933 bool leapOK = data.isMaxDayCount();
2931 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 2934 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
2932 int d = *it.current(); 2935 int d = *it.current();
2933 if (d >= data.day && (leapOK || d < 366)) { 2936 if (d >= data.day && (leapOK || d < 366)) {
2934 ++countGone; 2937 ++countGone;
@@ -2977,7 +2980,7 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons
2977 } 2980 }
2978 2981
2979 // Check the last year in the recurrence 2982 // Check the last year in the recurrence
2980 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 2983 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
2981 ++countGone; 2984 ++countGone;
2982 int d = *it.current(); 2985 int d = *it.current();
2983 if (data.year > endYear || d > endDay) { 2986 if (data.year > endYear || d > endDay) {
@@ -2995,13 +2998,13 @@ ex:
2995// Get the days in this month which recur, in numerical order. 2998// Get the days in this month which recur, in numerical order.
2996// Parameters: daysInMonth = number of days in this month 2999// Parameters: daysInMonth = number of days in this month
2997// startDayOfWeek = day of week for first day of month. 3000// startDayOfWeek = day of week for first day of month.
2998void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int startDayOfWeek) const 3001void Recurrence::getMonthlyPosDays(Q3ValueList<int> &list, int daysInMonth, int startDayOfWeek) const
2999{ 3002{
3000 list.clear(); 3003 list.clear();
3001 int endDayOfWeek = (startDayOfWeek + daysInMonth - 2) % 7 + 1; 3004 int endDayOfWeek = (startDayOfWeek + daysInMonth - 2) % 7 + 1;
3002 // Go through the list, compiling a bit list of actual day numbers 3005 // Go through the list, compiling a bit list of actual day numbers
3003 Q_UINT32 days = 0; 3006 Q_UINT32 days = 0;
3004 for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { 3007 for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) {
3005 int weeknum = pos.current()->rPos - 1; // get 0-based week number 3008 int weeknum = pos.current()->rPos - 1; // get 0-based week number
3006 QBitArray &rdays = pos.current()->rDays; 3009 QBitArray &rdays = pos.current()->rDays;
3007 if (pos.current()->negative) { 3010 if (pos.current()->negative) {
@@ -3039,7 +3042,7 @@ int Recurrence::countMonthlyPosDays() const
3039 int count = 0; 3042 int count = 0;
3040 Q_UINT8 positive[5] = { 0, 0, 0, 0, 0 }; 3043 Q_UINT8 positive[5] = { 0, 0, 0, 0, 0 };
3041 Q_UINT8 negative[4] = { 0, 0, 0, 0 }; 3044 Q_UINT8 negative[4] = { 0, 0, 0, 0 };
3042 for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { 3045 for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) {
3043 int weeknum = pos.current()->rPos; 3046 int weeknum = pos.current()->rPos;
3044 Q_UINT8* wk; 3047 Q_UINT8* wk;
3045 if (pos.current()->negative) { 3048 if (pos.current()->negative) {
@@ -3072,12 +3075,12 @@ int Recurrence::countMonthlyPosDays() const
3072 3075
3073// Get the days in this month which recur, in numerical order. 3076// Get the days in this month which recur, in numerical order.
3074// Reply = true if day numbers varies from month to month. 3077// Reply = true if day numbers varies from month to month.
3075bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const 3078bool Recurrence::getMonthlyDayDays(Q3ValueList<int> &list, int daysInMonth) const
3076{ 3079{
3077 list.clear(); 3080 list.clear();
3078 bool variable = false; 3081 bool variable = false;
3079 Q_UINT32 days = 0; 3082 Q_UINT32 days = 0;
3080 for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { 3083 for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) {
3081 int day = *it.current(); 3084 int day = *it.current();
3082 if (day > 0) { 3085 if (day > 0) {
3083 // date in the month 3086 // date in the month
@@ -3106,12 +3109,12 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const
3106// N.B. If February 29th recurs on March 1st in non-leap years, February (not March) is 3109// N.B. If February 29th recurs on March 1st in non-leap years, February (not March) is
3107// included in the non-leap year month list. 3110// included in the non-leap year month list.
3108// Reply = true if February 29th also recurs. 3111// Reply = true if February 29th also recurs.
3109bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList<int> &leaplist) const 3112bool Recurrence::getYearlyMonthMonths(int day, Q3ValueList<int> &list, Q3ValueList<int> &leaplist) const
3110{ 3113{
3111 list.clear(); 3114 list.clear();
3112 leaplist.clear(); 3115 leaplist.clear();
3113 bool feb29 = false; 3116 bool feb29 = false;
3114 for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { 3117 for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) {
3115 int month = *it.current(); 3118 int month = *it.current();
3116 if (month == 2) { 3119 if (month == 2) {
3117 if (day <= 28) { 3120 if (day <= 28) {
@@ -3187,7 +3190,7 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const
3187 switch (recurs) { 3190 switch (recurs) {
3188 case rMonthlyDay: { 3191 case rMonthlyDay: {
3189 int minday = daysInMonth + 1; 3192 int minday = daysInMonth + 1;
3190 for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { 3193 for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) {
3191 int day = *it.current(); 3194 int day = *it.current();
3192 if (day < 0) 3195 if (day < 0)
3193 day = daysInMonth + day + 1; 3196 day = daysInMonth + day + 1;
@@ -3201,9 +3204,9 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const
3201 case rMonthlyPos: 3204 case rMonthlyPos:
3202 case rYearlyPos: { 3205 case rYearlyPos: {
3203 QDate monthBegin(earliestDate.addDays(1 - earliestDay)); 3206 QDate monthBegin(earliestDate.addDays(1 - earliestDay));
3204 QValueList<int> dayList; 3207 Q3ValueList<int> dayList;
3205 getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); 3208 getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek());
3206 for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { 3209 for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) {
3207 if (*id >= earliestDay) 3210 if (*id >= earliestDay)
3208 return monthBegin.addDays(*id - 1); 3211 return monthBegin.addDays(*id - 1);
3209 } 3212 }
@@ -3224,7 +3227,7 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const
3224 switch (recurs) { 3227 switch (recurs) {
3225 case rMonthlyDay: { 3228 case rMonthlyDay: {
3226 int maxday = -1; 3229 int maxday = -1;
3227 for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { 3230 for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) {
3228 int day = *it.current(); 3231 int day = *it.current();
3229 if (day < 0) 3232 if (day < 0)
3230 day = daysInMonth + day + 1; 3233 day = daysInMonth + day + 1;
@@ -3238,9 +3241,9 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const
3238 case rMonthlyPos: 3241 case rMonthlyPos:
3239 case rYearlyPos: { 3242 case rYearlyPos: {
3240 QDate monthBegin(latestDate.addDays(1 - latestDay)); 3243 QDate monthBegin(latestDate.addDays(1 - latestDay));
3241 QValueList<int> dayList; 3244 Q3ValueList<int> dayList;
3242 getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); 3245 getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek());
3243 for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { 3246 for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) {
3244 if (*id <= latestDay) 3247 if (*id <= latestDay)
3245 return monthBegin.addDays(*id - 1); 3248 return monthBegin.addDays(*id - 1);
3246 } 3249 }
@@ -3256,7 +3259,7 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const
3256 */ 3259 */
3257QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const 3260QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const
3258{ 3261{
3259 QPtrListIterator<int> it(rYearNums); 3262 Q3PtrListIterator<int> it(rYearNums);
3260 switch (recurs) { 3263 switch (recurs) {
3261 case rYearlyMonth: { 3264 case rYearlyMonth: {
3262 int day = recurStart().date().day(); 3265 int day = recurStart().date().day();
@@ -3292,7 +3295,7 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const
3292 break; 3295 break;
3293 } 3296 }
3294 case rYearlyPos: { 3297 case rYearlyPos: {
3295 QValueList<int> dayList; 3298 Q3ValueList<int> dayList;
3296 int earliestYear = earliestDate.year(); 3299 int earliestYear = earliestDate.year();
3297 int earliestMonth = earliestDate.month(); 3300 int earliestMonth = earliestDate.month();
3298 int earliestDay = earliestDate.day(); 3301 int earliestDay = earliestDate.day();
@@ -3301,7 +3304,7 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const
3301 if (month >= earliestMonth) { 3304 if (month >= earliestMonth) {
3302 QDate monthBegin(earliestYear, month, 1); 3305 QDate monthBegin(earliestYear, month, 1);
3303 getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); 3306 getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek());
3304 for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { 3307 for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) {
3305 if (*id >= earliestDay) 3308 if (*id >= earliestDay)
3306 return monthBegin.addDays(*id - 1); 3309 return monthBegin.addDays(*id - 1);
3307 } 3310 }
@@ -3329,7 +3332,7 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const
3329 */ 3332 */
3330QDate Recurrence::getLastDateInYear(const QDate &latestDate) const 3333QDate Recurrence::getLastDateInYear(const QDate &latestDate) const
3331{ 3334{
3332 QPtrListIterator<int> it(rYearNums); 3335 Q3PtrListIterator<int> it(rYearNums);
3333 switch (recurs) { 3336 switch (recurs) {
3334 case rYearlyMonth: { 3337 case rYearlyMonth: {
3335 int day = recurStart().date().day(); 3338 int day = recurStart().date().day();
@@ -3364,7 +3367,7 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const
3364 break; 3367 break;
3365 } 3368 }
3366 case rYearlyPos: { 3369 case rYearlyPos: {
3367 QValueList<int> dayList; 3370 Q3ValueList<int> dayList;
3368 int latestYear = latestDate.year(); 3371 int latestYear = latestDate.year();
3369 int latestMonth = latestDate.month(); 3372 int latestMonth = latestDate.month();
3370 int latestDay = latestDate.day(); 3373 int latestDay = latestDate.day();
@@ -3373,7 +3376,7 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const
3373 if (month <= latestMonth) { 3376 if (month <= latestMonth) {
3374 QDate monthBegin(latestYear, month, 1); 3377 QDate monthBegin(latestYear, month, 1);
3375 getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); 3378 getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek());
3376 for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { 3379 for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) {
3377 if (*id <= latestDay) 3380 if (*id <= latestDay)
3378 return monthBegin.addDays(*id - 1); 3381 return monthBegin.addDays(*id - 1);
3379 } 3382 }
diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h
index b13d14f..5b5aab1 100644
--- a/libkcal/recurrence.h
+++ b/libkcal/recurrence.h
@@ -24,7 +24,9 @@
24 24
25#include <qstring.h> 25#include <qstring.h>
26#include <qbitarray.h> 26#include <qbitarray.h>
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28//Added by qt3to4:
29#include <Q3ValueList>
28 30
29namespace KCal { 31namespace KCal {
30 32
@@ -248,9 +250,9 @@ class Recurrence
248 */ 250 */
249 void addMonthlyDay(short _rDay); 251 void addMonthlyDay(short _rDay);
250 /** Returns list of day positions in months. */ 252 /** Returns list of day positions in months. */
251 const QPtrList<rMonthPos> &monthPositions() const; 253 const Q3PtrList<rMonthPos> &monthPositions() const;
252 /** Returns list of day numbers of a month. */ 254 /** Returns list of day numbers of a month. */
253 const QPtrList<int> &monthDays() const; 255 const Q3PtrList<int> &monthDays() const;
254 256
255 /** Sets an event to recur yearly. 257 /** Sets an event to recur yearly.
256 * @var type rYearlyMonth, rYearlyPos or rYearlyDay 258 * @var type rYearlyMonth, rYearlyPos or rYearlyDay
@@ -279,9 +281,9 @@ class Recurrence
279 */ 281 */
280 void addYearlyMonthPos(short _rPos, const QBitArray &_rDays); 282 void addYearlyMonthPos(short _rPos, const QBitArray &_rDays);
281 /** Returns positions of days or months in year. */ 283 /** Returns positions of days or months in year. */
282 const QPtrList<int> &yearNums() const; 284 const Q3PtrList<int> &yearNums() const;
283 /** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */ 285 /** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */
284 const QPtrList<rMonthPos> &yearMonthPositions() const; 286 const Q3PtrList<rMonthPos> &yearMonthPositions() const;
285 /** Returns how yearly recurrences of February 29th are handled. */ 287 /** Returns how yearly recurrences of February 29th are handled. */
286 Feb29Type feb29YearlyType() const { return mFeb29YearlyType; } 288 Feb29Type feb29YearlyType() const { return mFeb29YearlyType; }
287 /** Sets the default method for handling yearly recurrences of February 29th. */ 289 /** Sets the default method for handling yearly recurrences of February 29th. */
@@ -294,8 +296,8 @@ class Recurrence
294 */ 296 */
295 void dump() const; 297 void dump() const;
296 QString recurrenceText() const; 298 QString recurrenceText() const;
297 bool getYearlyMonthMonths(int day, QValueList<int>&, 299 bool getYearlyMonthMonths(int day, Q3ValueList<int>&,
298 QValueList<int> &leaplist) const; 300 Q3ValueList<int> &leaplist) const;
299 301
300 protected: 302 protected:
301 enum PeriodFunc { END_DATE_AND_COUNT, COUNT_TO_DATE, NEXT_AFTER_DATE }; 303 enum PeriodFunc { END_DATE_AND_COUNT, COUNT_TO_DATE, NEXT_AFTER_DATE };
@@ -345,9 +347,9 @@ class Recurrence
345 int yearlyDayCalcNextAfter(QDate& enddate, YearlyDayData&) const; 347 int yearlyDayCalcNextAfter(QDate& enddate, YearlyDayData&) const;
346 348
347 int countMonthlyPosDays() const; 349 int countMonthlyPosDays() const;
348 void getMonthlyPosDays(QValueList<int>&, int daysInMonth, 350 void getMonthlyPosDays(Q3ValueList<int>&, int daysInMonth,
349 int startDayOfWeek) const; 351 int startDayOfWeek) const;
350 bool getMonthlyDayDays(QValueList<int>&, int daysInMonth) const; 352 bool getMonthlyDayDays(Q3ValueList<int>&, int daysInMonth) const;
351 353
352 int getFirstDayInWeek(int startDay, bool useWeekStart = true) const; 354 int getFirstDayInWeek(int startDay, bool useWeekStart = true) const;
353 int getLastDayInWeek(int endDay, bool useWeekStart = true) const; 355 int getLastDayInWeek(int endDay, bool useWeekStart = true) const;
@@ -366,13 +368,13 @@ class Recurrence
366 int rWeekStart; // day which starts the week, Monday=1 .. Sunday=7 368 int rWeekStart; // day which starts the week, Monday=1 .. Sunday=7
367 QBitArray rDays; // array of days during week it recurs 369 QBitArray rDays; // array of days during week it recurs
368 370
369 QPtrList<rMonthPos> rMonthPositions; // list of positions during a month 371 Q3PtrList<rMonthPos> rMonthPositions; // list of positions during a month
370 // on which an event recurs 372 // on which an event recurs
371 373
372 QPtrList<int> rMonthDays; // list of days during a month on 374 Q3PtrList<int> rMonthDays; // list of days during a month on
373 // which the event recurs 375 // which the event recurs
374 376
375 QPtrList<int> rYearNums; // either months/days to recur on for rYearly, 377 Q3PtrList<int> rYearNums; // either months/days to recur on for rYearly,
376 // sorted in numerical order 378 // sorted in numerical order
377 379
378 int rFreq; // frequency of period 380 int rFreq; // frequency of period
diff --git a/libkcal/scheduler.cpp b/libkcal/scheduler.cpp
index 253d8b7..234cfcf 100644
--- a/libkcal/scheduler.cpp
+++ b/libkcal/scheduler.cpp
@@ -20,7 +20,9 @@
20 20
21#include <qdir.h> 21#include <qdir.h>
22#include <qfile.h> 22#include <qfile.h>
23#include <qtextstream.h> 23#include <q3textstream.h>
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25#include <klocale.h> 27#include <klocale.h>
26#include <kdebug.h> 28#include <kdebug.h>
@@ -264,8 +266,8 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status sta
264 if (ev || to) { 266 if (ev || to) {
265 //get matching attendee in calendar 267 //get matching attendee in calendar
266 kdDebug(5800) << "Scheduler::acceptTransaction match found!" << endl; 268 kdDebug(5800) << "Scheduler::acceptTransaction match found!" << endl;
267 QPtrList<Attendee> attendeesIn = incidence->attendees(); 269 Q3PtrList<Attendee> attendeesIn = incidence->attendees();
268 QPtrList<Attendee> attendeesEv; 270 Q3PtrList<Attendee> attendeesEv;
269 if (ev) attendeesEv = ev->attendees(); 271 if (ev) attendeesEv = ev->attendees();
270 if (to) attendeesEv = to->attendees(); 272 if (to) attendeesEv = to->attendees();
271 Attendee *attIn; 273 Attendee *attIn;
@@ -342,11 +344,11 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method)
342 344
343 QString messageText = mFormat->createScheduleMessage(freebusy, Publish); 345 QString messageText = mFormat->createScheduleMessage(freebusy, Publish);
344 346
345 if (!f.open(IO_ReadWrite)) { 347 if (!f.open(QIODevice::ReadWrite)) {
346 kdDebug() << "acceptFreeBusy: Can't open:" << filename << " for writing" << endl; 348 kdDebug() << "acceptFreeBusy: Can't open:" << filename << " for writing" << endl;
347 return false; 349 return false;
348 } 350 }
349 QTextStream t(&f); 351 Q3TextStream t(&f);
350 t << messageText; 352 t << messageText;
351 f.close(); 353 f.close();
352 354
diff --git a/libkcal/scheduler.h b/libkcal/scheduler.h
index a9f43b9..357e98e 100644
--- a/libkcal/scheduler.h
+++ b/libkcal/scheduler.h
@@ -23,7 +23,7 @@
23// iTIP transactions base class 23// iTIP transactions base class
24 24
25#include <qstring.h> 25#include <qstring.h>
26#include <qptrlist.h> 26#include <q3ptrlist.h>
27 27
28namespace KCal { 28namespace KCal {
29 29
@@ -95,7 +95,7 @@ class Scheduler {
95 method. */ 95 method. */
96 virtual bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients) = 0; 96 virtual bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients) = 0;
97 /** Retrieve incoming iTIP transactions */ 97 /** Retrieve incoming iTIP transactions */
98 virtual QPtrList<ScheduleMessage> retrieveTransactions() = 0; 98 virtual Q3PtrList<ScheduleMessage> retrieveTransactions() = 0;
99 99
100 /** 100 /**
101 Accept transaction. The incidence argument specifies the iCal compoennt 101 Accept transaction. The incidence argument specifies the iCal compoennt
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index 9b757f7..b8c2aa7 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -22,12 +22,12 @@
22#include <qdatetime.h> 22#include <qdatetime.h>
23#include <qstring.h> 23#include <qstring.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <qregexp.h> 26#include <qregexp.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qclipboard.h> 28#include <qclipboard.h>
29#include <qfile.h> 29#include <qfile.h>
30#include <qtextstream.h> 30#include <q3textstream.h>
31#include <qtextcodec.h> 31#include <qtextcodec.h>
32#include <qxml.h> 32#include <qxml.h>
33#include <qlabel.h> 33#include <qlabel.h>
@@ -366,11 +366,11 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
366 366
367 } 367 }
368 QFile file( fileName ); 368 QFile file( fileName );
369 if (!file.open( IO_ReadOnly ) ) { 369 if (!file.open( QIODevice::ReadOnly ) ) {
370 return false; 370 return false;
371 371
372 } 372 }
373 QTextStream ts( &file ); 373 Q3TextStream ts( &file );
374 ts.setCodec( QTextCodec::codecForName("utf8") ); 374 ts.setCodec( QTextCodec::codecForName("utf8") );
375 text = ts.read(); 375 text = ts.read();
376 file.close(); 376 file.close();
@@ -388,7 +388,7 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal )
388 fileName = "/tmp/todo.txt"; 388 fileName = "/tmp/todo.txt";
389 } 389 }
390 file.setName( fileName ); 390 file.setName( fileName );
391 if (!file.open( IO_ReadOnly ) ) { 391 if (!file.open( QIODevice::ReadOnly ) ) {
392 return false; 392 return false;
393 393
394 } 394 }
@@ -475,7 +475,7 @@ bool SharpFormat::save( Calendar *calendar)
475 QString ePrefix = "CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY\n"; 475 QString ePrefix = "CARDID,CATEGORY,DSRP,PLCE,MEM1,TIM1,TIM2,ADAY,ARON,ARMN,ARSD,RTYP,RFRQ,RPOS,RDYS,REND,REDT,ALSD,ALED,MDAY\n";
476 QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n"; 476 QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n";
477 QString command; 477 QString command;
478 QPtrList<Event> er = calendar->rawEvents(); 478 Q3PtrList<Event> er = calendar->rawEvents();
479 Event* ev = er.first(); 479 Event* ev = er.first();
480 QString fileName = "/tmp/kopitempout"; 480 QString fileName = "/tmp/kopitempout";
481 int i = 0; 481 int i = 0;
@@ -503,10 +503,10 @@ bool SharpFormat::save( Calendar *calendar)
503 else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new 503 else if ( ev->getID("Sharp_DTM").isEmpty() ) { // add new
504 QString fileNameIn = "/tmp/kopitempin"; 504 QString fileNameIn = "/tmp/kopitempin";
505 QFile fileIn( fileNameIn ); 505 QFile fileIn( fileNameIn );
506 if (!fileIn.open( IO_WriteOnly ) ) { 506 if (!fileIn.open( QIODevice::WriteOnly ) ) {
507 return false; 507 return false;
508 } 508 }
509 QTextStream tsIn( &fileIn ); 509 Q3TextStream tsIn( &fileIn );
510 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 510 tsIn.setCodec( QTextCodec::codecForName("utf8") );
511 tsIn << ePrefix << eString ; 511 tsIn << ePrefix << eString ;
512 fileIn.close(); 512 fileIn.close();
@@ -517,11 +517,11 @@ bool SharpFormat::save( Calendar *calendar)
517 //qDebug("command -------- "); 517 //qDebug("command -------- ");
518 system ( command.utf8() ); 518 system ( command.utf8() );
519 QFile file( fileName ); 519 QFile file( fileName );
520 if (!file.open( IO_ReadOnly ) ) { 520 if (!file.open( QIODevice::ReadOnly ) ) {
521 return false; 521 return false;
522 522
523 } 523 }
524 QTextStream ts( &file ); 524 Q3TextStream ts( &file );
525 ts.setCodec( QTextCodec::codecForName("utf8") ); 525 ts.setCodec( QTextCodec::codecForName("utf8") );
526 answer = ts.read(); 526 answer = ts.read();
527 file.close(); 527 file.close();
@@ -544,11 +544,11 @@ bool SharpFormat::save( Calendar *calendar)
544 //qDebug("changing... "); 544 //qDebug("changing... ");
545 if ( changeEnt ) { 545 if ( changeEnt ) {
546 QFile file( fileName ); 546 QFile file( fileName );
547 if (!file.open( IO_WriteOnly ) ) { 547 if (!file.open( QIODevice::WriteOnly ) ) {
548 return false; 548 return false;
549 549
550 } 550 }
551 QTextStream ts( &file ); 551 Q3TextStream ts( &file );
552 ts.setCodec( QTextCodec::codecForName("utf8") ); 552 ts.setCodec( QTextCodec::codecForName("utf8") );
553 ts << changeString ; 553 ts << changeString ;
554 file.close(); 554 file.close();
@@ -562,11 +562,11 @@ bool SharpFormat::save( Calendar *calendar)
562 //qDebug("deleting... "); 562 //qDebug("deleting... ");
563 if ( deleteEnt ) { 563 if ( deleteEnt ) {
564 QFile file( fileName ); 564 QFile file( fileName );
565 if (!file.open( IO_WriteOnly ) ) { 565 if (!file.open( QIODevice::WriteOnly ) ) {
566 return false; 566 return false;
567 567
568 } 568 }
569 QTextStream ts( &file ); 569 Q3TextStream ts( &file );
570 ts.setCodec( QTextCodec::codecForName("utf8") ); 570 ts.setCodec( QTextCodec::codecForName("utf8") );
571 ts << deleteString; 571 ts << deleteString;
572 file.close(); 572 file.close();
@@ -580,7 +580,7 @@ bool SharpFormat::save( Calendar *calendar)
580 deleteString = tPrefix; 580 deleteString = tPrefix;
581 status.setText ( i18n("Processing todos ...") ); 581 status.setText ( i18n("Processing todos ...") );
582 qApp->processEvents(); 582 qApp->processEvents();
583 QPtrList<Todo> tl = calendar->rawTodos(); 583 Q3PtrList<Todo> tl = calendar->rawTodos();
584 Todo* to = tl.first(); 584 Todo* to = tl.first();
585 i = 0; 585 i = 0;
586 message = i18n("Processing todo # "); 586 message = i18n("Processing todo # ");
@@ -605,20 +605,20 @@ bool SharpFormat::save( Calendar *calendar)
605 605
606 QString fileNameIn = "/tmp/kopitempin"; 606 QString fileNameIn = "/tmp/kopitempin";
607 QFile fileIn( fileNameIn ); 607 QFile fileIn( fileNameIn );
608 if (!fileIn.open( IO_WriteOnly ) ) { 608 if (!fileIn.open( QIODevice::WriteOnly ) ) {
609 return false; 609 return false;
610 } 610 }
611 QTextStream tsIn( &fileIn ); 611 Q3TextStream tsIn( &fileIn );
612 tsIn.setCodec( QTextCodec::codecForName("utf8") ); 612 tsIn.setCodec( QTextCodec::codecForName("utf8") );
613 tsIn << tPrefix << eString ; 613 tsIn << tPrefix << eString ;
614 fileIn.close(); 614 fileIn.close();
615 command = "(cat /tmp/kopitempin | db2file todo -w -g -c " + codec+ ") > "+ fileName; 615 command = "(cat /tmp/kopitempin | db2file todo -w -g -c " + codec+ ") > "+ fileName;
616 system ( command.utf8() ); 616 system ( command.utf8() );
617 QFile file( fileName ); 617 QFile file( fileName );
618 if (!file.open( IO_ReadOnly ) ) { 618 if (!file.open( QIODevice::ReadOnly ) ) {
619 return false; 619 return false;
620 } 620 }
621 QTextStream ts( &file ); 621 Q3TextStream ts( &file );
622 ts.setCodec( QTextCodec::codecForName("utf8") ); 622 ts.setCodec( QTextCodec::codecForName("utf8") );
623 answer = ts.read(); 623 answer = ts.read();
624 file.close(); 624 file.close();
@@ -642,11 +642,11 @@ bool SharpFormat::save( Calendar *calendar)
642 //qDebug("changing... "); 642 //qDebug("changing... ");
643 if ( changeEnt ) { 643 if ( changeEnt ) {
644 QFile file( fileName ); 644 QFile file( fileName );
645 if (!file.open( IO_WriteOnly ) ) { 645 if (!file.open( QIODevice::WriteOnly ) ) {
646 return false; 646 return false;
647 647
648 } 648 }
649 QTextStream ts( &file ); 649 Q3TextStream ts( &file );
650 ts.setCodec( QTextCodec::codecForName("utf8") ); 650 ts.setCodec( QTextCodec::codecForName("utf8") );
651 ts << changeString ; 651 ts << changeString ;
652 file.close(); 652 file.close();
@@ -660,11 +660,11 @@ bool SharpFormat::save( Calendar *calendar)
660 //qDebug("deleting... "); 660 //qDebug("deleting... ");
661 if ( deleteEnt ) { 661 if ( deleteEnt ) {
662 QFile file( fileName ); 662 QFile file( fileName );
663 if (!file.open( IO_WriteOnly ) ) { 663 if (!file.open( QIODevice::WriteOnly ) ) {
664 return false; 664 return false;
665 665
666 } 666 }
667 QTextStream ts( &file ); 667 Q3TextStream ts( &file );
668 ts.setCodec( QTextCodec::codecForName("utf8") ); 668 ts.setCodec( QTextCodec::codecForName("utf8") );
669 ts << deleteString; 669 ts << deleteString;
670 file.close(); 670 file.close();
@@ -783,7 +783,7 @@ QString SharpFormat::getEventString( Event* event )
783 writeEndDate = true; 783 writeEndDate = true;
784 { 784 {
785 int count = 1; 785 int count = 1;
786 QPtrList<Recurrence::rMonthPos> rmp; 786 Q3PtrList<Recurrence::rMonthPos> rmp;
787 rmp = rec->monthPositions(); 787 rmp = rec->monthPositions();
788 if ( rmp.first()->negative ) 788 if ( rmp.first()->negative )
789 count = 5 - rmp.first()->rPos - 1; 789 count = 5 - rmp.first()->rPos - 1;
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index cc1c5ae..5a0c32e 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -623,7 +623,7 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d
623// *ok = false; 623// *ok = false;
624// return incidenceStart; 624// return incidenceStart;
625// } 625// }
626 for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { 626 for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
627 if (alarm->enabled()) { 627 if (alarm->enabled()) {
628 if ( alarm->hasTime () ) { 628 if ( alarm->hasTime () ) {
629 if ( alarm->time() < alarmStart ) { 629 if ( alarm->time() < alarmStart ) {
diff --git a/libkcal/todo.h b/libkcal/todo.h
index 2131732..cea976c 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -26,6 +26,8 @@
26#include "incidence.h" 26#include "incidence.h"
27 27
28#include <qtimer.h> 28#include <qtimer.h>
29//Added by qt3to4:
30#include <Q3CString>
29 31
30namespace KCal { 32namespace KCal {
31 33
@@ -40,7 +42,7 @@ namespace KCal {
40 Todo(const Todo &); 42 Todo(const Todo &);
41 ~Todo(); 43 ~Todo();
42 typedef ListBase<Todo> List; 44 typedef ListBase<Todo> List;
43 QCString type() const { return "Todo"; } 45 Q3CString type() const { return "Todo"; }
44 IncTypeID typeID() const { return todoID; } 46 IncTypeID typeID() const { return todoID; }
45 47
46 /** Return an exact copy of this todo. */ 48 /** Return an exact copy of this todo. */
diff --git a/libkcal/vcaldrag.cpp b/libkcal/vcaldrag.cpp
index f01f332..324981e 100644
--- a/libkcal/vcaldrag.cpp
+++ b/libkcal/vcaldrag.cpp
@@ -26,7 +26,7 @@
26using namespace KCal; 26using namespace KCal;
27 27
28VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name ) 28VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name )
29 : QStoredDrag( "text/x-vCalendar", parent, name ) 29 : Q3StoredDrag( "text/x-vCalendar", parent, name )
30{ 30{
31 VCalFormat format; 31 VCalFormat format;
32 setEncodedData( format.toString( cal ).utf8() ); 32 setEncodedData( format.toString( cal ).utf8() );
diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h
index 3048124..68a320d 100644
--- a/libkcal/vcaldrag.h
+++ b/libkcal/vcaldrag.h
@@ -22,7 +22,7 @@
22#ifndef VCALDRAG_H 22#ifndef VCALDRAG_H
23#define VCALDRAG_H 23#define VCALDRAG_H
24 24
25#include <qdragobject.h> 25#include <q3dragobject.h>
26 26
27 27
28namespace KCal { 28namespace KCal {
@@ -30,7 +30,7 @@ namespace KCal {
30class Calendar; 30class Calendar;
31 31
32/** vCalendar drag&drop class. */ 32/** vCalendar drag&drop class. */
33class VCalDrag : public QStoredDrag { 33class VCalDrag : public Q3StoredDrag {
34 public: 34 public:
35 /** Create a drag&drop object for vCalendar component \a vcal. */ 35 /** Create a drag&drop object for vCalendar component \a vcal. */
36 VCalDrag( Calendar *vcal, QWidget *parent = 0, const char *name = 0 ); 36 VCalDrag( Calendar *vcal, QWidget *parent = 0, const char *name = 0 );
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 2e19740..9cbaf16 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -22,11 +22,13 @@
22#include <qapplication.h> 22#include <qapplication.h>
23#include <qdatetime.h> 23#include <qdatetime.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <qregexp.h> 26#include <qregexp.h>
27#include <qclipboard.h> 27#include <qclipboard.h>
28#include <qdialog.h> 28#include <qdialog.h>
29#include <qfile.h> 29#include <qfile.h>
30//Added by qt3to4:
31#include <Q3CString>
30 32
31#include <kdebug.h> 33#include <kdebug.h>
32#include <kglobal.h> 34#include <kglobal.h>
@@ -108,15 +110,15 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName)
108 addPropValue(vcal,VCVersionProp, _VCAL_VERSION); 110 addPropValue(vcal,VCVersionProp, _VCAL_VERSION);
109 111
110 // TODO STUFF 112 // TODO STUFF
111 QPtrList<Todo> todoList = mCalendar->rawTodos(); 113 Q3PtrList<Todo> todoList = mCalendar->rawTodos();
112 QPtrListIterator<Todo> qlt(todoList); 114 Q3PtrListIterator<Todo> qlt(todoList);
113 for (; qlt.current(); ++qlt) { 115 for (; qlt.current(); ++qlt) {
114 vo = eventToVTodo(qlt.current()); 116 vo = eventToVTodo(qlt.current());
115 addVObjectProp(vcal, vo); 117 addVObjectProp(vcal, vo);
116 } 118 }
117 119
118 // EVENT STUFF 120 // EVENT STUFF
119 QPtrList<Event> events = mCalendar->rawEvents(); 121 Q3PtrList<Event> events = mCalendar->rawEvents();
120 Event *ev; 122 Event *ev;
121 for(ev=events.first();ev;ev=events.next()) { 123 for(ev=events.first();ev;ev=events.next()) {
122 vo = eventToVEvent(ev); 124 vo = eventToVEvent(ev);
@@ -138,7 +140,7 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text )
138{ 140{
139 // TODO: Factor out VCalFormat::fromString() 141 // TODO: Factor out VCalFormat::fromString()
140 142
141 QCString data = text.utf8(); 143 Q3CString data = text.utf8();
142 144
143 if ( !data.size() ) return false; 145 if ( !data.size() ) return false;
144 146
@@ -210,7 +212,7 @@ QString VCalFormat::toString( Calendar *calendar )
210 addPropValue( vcal, VCVersionProp, _VCAL_VERSION ); 212 addPropValue( vcal, VCVersionProp, _VCAL_VERSION );
211 213
212 // TODO: Use all data. 214 // TODO: Use all data.
213 QPtrList<Event> events = calendar->events(); 215 Q3PtrList<Event> events = calendar->events();
214 Event *event = events.first(); 216 Event *event = events.first();
215 if ( !event ) return QString::null; 217 if ( !event ) return QString::null;
216 218
@@ -271,8 +273,8 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
271 273
272 // attendees 274 // attendees
273 if (anEvent->attendeeCount() != 0) { 275 if (anEvent->attendeeCount() != 0) {
274 QPtrList<Attendee> al = anEvent->attendees(); 276 Q3PtrList<Attendee> al = anEvent->attendees();
275 QPtrListIterator<Attendee> ai(al); 277 Q3PtrListIterator<Attendee> ai(al);
276 Attendee *curAttendee; 278 Attendee *curAttendee;
277 279
278 for (; ai.current(); ++ai) { 280 for (; ai.current(); ++ai) {
@@ -326,7 +328,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
326 addPropValue(vtodo, VCPriorityProp, tmpStr.local8Bit()); 328 addPropValue(vtodo, VCPriorityProp, tmpStr.local8Bit());
327 329
328 // related event 330 // related event
329 if (anEvent->relatedToUid()) { 331 if (!anEvent->relatedToUid().isEmpty()) {
330 addPropValue(vtodo, VCRelatedToProp, 332 addPropValue(vtodo, VCRelatedToProp,
331 anEvent->relatedToUid().local8Bit()); 333 anEvent->relatedToUid().local8Bit());
332 } 334 }
@@ -355,7 +357,7 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent)
355 357
356 // alarm stuff 358 // alarm stuff
357 kdDebug(5800) << "vcalformat::eventToVTodo was called" << endl; 359 kdDebug(5800) << "vcalformat::eventToVTodo was called" << endl;
358 QPtrList<Alarm> alarms = anEvent->alarms(); 360 Q3PtrList<Alarm> alarms = anEvent->alarms();
359 Alarm* alarm; 361 Alarm* alarm;
360 for (alarm = alarms.first(); alarm; alarm = alarms.next()) { 362 for (alarm = alarms.first(); alarm; alarm = alarms.next()) {
361 if (alarm->enabled()) { 363 if (alarm->enabled()) {
@@ -433,8 +435,8 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent)
433 addPropValue(vevent, ICOrganizerProp, tmpStr.local8Bit()); 435 addPropValue(vevent, ICOrganizerProp, tmpStr.local8Bit());
434 436
435 if (anEvent->attendeeCount() != 0) { 437 if (anEvent->attendeeCount() != 0) {
436 QPtrList<Attendee> al = anEvent->attendees(); 438 Q3PtrList<Attendee> al = anEvent->attendees();
437 QPtrListIterator<Attendee> ai(al); 439 Q3PtrListIterator<Attendee> ai(al);
438 Attendee *curAttendee; 440 Attendee *curAttendee;
439 441
440 // TODO: Put this functionality into Attendee class 442 // TODO: Put this functionality into Attendee class
@@ -461,8 +463,8 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent)
461 // recurrence rule stuff 463 // recurrence rule stuff
462 if (anEvent->doesRecur()) { 464 if (anEvent->doesRecur()) {
463 // some more variables 465 // some more variables
464 QPtrList<Recurrence::rMonthPos> tmpPositions; 466 Q3PtrList<Recurrence::rMonthPos> tmpPositions;
465 QPtrList<int> tmpDays; 467 Q3PtrList<int> tmpDays;
466 int *tmpDay; 468 int *tmpDay;
467 Recurrence::rMonthPos *tmpPos; 469 Recurrence::rMonthPos *tmpPos;
468 QString tmpStr2; 470 QString tmpStr2;
@@ -545,7 +547,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent)
545 } else if (anEvent->recurrence()->duration() == -1) { 547 } else if (anEvent->recurrence()->duration() == -1) {
546 tmpStr += "#0"; // defined as repeat forever 548 tmpStr += "#0"; // defined as repeat forever
547 } else { 549 } else {
548 tmpStr += qDateTimeToISO(anEvent->recurrence()->endDate(), FALSE); 550 tmpStr += qDateTimeToISO((QDateTime)anEvent->recurrence()->endDate(), FALSE);
549 } 551 }
550 addPropValue(vevent,VCRRuleProp, tmpStr.local8Bit()); 552 addPropValue(vevent,VCRRuleProp, tmpStr.local8Bit());
551 553
@@ -625,7 +627,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent)
625 627
626 // attachments 628 // attachments
627 // TODO: handle binary attachments! 629 // TODO: handle binary attachments!
628 QPtrList<Attachment> attachments = anEvent->attachments(); 630 Q3PtrList<Attachment> attachments = anEvent->attachments();
629 for ( Attachment *at = attachments.first(); at; at = attachments.next() ) 631 for ( Attachment *at = attachments.first(); at; at = attachments.next() )
630 addPropValue(vevent, VCAttachProp, at->uri().local8Bit()); 632 addPropValue(vevent, VCAttachProp, at->uri().local8Bit());
631 633
@@ -636,7 +638,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent)
636 addPropValue(vevent, VCResourcesProp, tmpStr.local8Bit()); 638 addPropValue(vevent, VCResourcesProp, tmpStr.local8Bit());
637 639
638 // alarm stuff 640 // alarm stuff
639 QPtrList<Alarm> alarms = anEvent->alarms(); 641 Q3PtrList<Alarm> alarms = anEvent->alarms();
640 Alarm* alarm; 642 Alarm* alarm;
641 for (alarm = alarms.first(); alarm; alarm = alarms.next()) { 643 for (alarm = alarms.first(); alarm; alarm = alarms.next()) {
642 if (alarm->enabled()) { 644 if (alarm->enabled()) {
@@ -672,7 +674,7 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent)
672 addPropValue(vevent, VCTranspProp, tmpStr.local8Bit()); 674 addPropValue(vevent, VCTranspProp, tmpStr.local8Bit());
673 675
674 // related event 676 // related event
675 if (anEvent->relatedToUid()) { 677 if (!anEvent->relatedToUid().isEmpty()) {
676 addPropValue(vevent, VCRelatedToProp, 678 addPropValue(vevent, VCRelatedToProp,
677 anEvent->relatedToUid().local8Bit()); 679 anEvent->relatedToUid().local8Bit());
678 } 680 }
@@ -1408,7 +1410,7 @@ QString VCalFormat::qDateToISO(const QDate &qd)
1408{ 1410{
1409 QString tmpStr; 1411 QString tmpStr;
1410 1412
1411 ASSERT(qd.isValid()); 1413 Q_ASSERT(qd.isValid());
1412 1414
1413 tmpStr.sprintf("%.2d%.2d%.2d", 1415 tmpStr.sprintf("%.2d%.2d%.2d",
1414 qd.year(), qd.month(), qd.day()); 1416 qd.year(), qd.month(), qd.day());
@@ -1420,8 +1422,8 @@ QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu)
1420{ 1422{
1421 QString tmpStr; 1423 QString tmpStr;
1422 1424
1423 ASSERT(qdt.date().isValid()); 1425 Q_ASSERT(qdt.date().isValid());
1424 ASSERT(qdt.time().isValid()); 1426 Q_ASSERT(qdt.time().isValid());
1425 if (zulu && !useLocalTime ) { 1427 if (zulu && !useLocalTime ) {
1426 QDateTime tmpDT = qdt.addSecs ( -KGlobal::locale()->localTimeOffset( qdt )*60); 1428 QDateTime tmpDT = qdt.addSecs ( -KGlobal::locale()->localTimeOffset( qdt )*60);
1427 tmpStr.sprintf("%.2d%.2d%.2dT%.2d%.2d%.2dZ", 1429 tmpStr.sprintf("%.2d%.2d%.2dT%.2d%.2d%.2dZ",
@@ -1454,8 +1456,8 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr)
1454 tmpDate.setYMD(year, month, day); 1456 tmpDate.setYMD(year, month, day);
1455 tmpTime.setHMS(hour, minute, second); 1457 tmpTime.setHMS(hour, minute, second);
1456 1458
1457 ASSERT(tmpDate.isValid()); 1459 Q_ASSERT(tmpDate.isValid());
1458 ASSERT(tmpTime.isValid()); 1460 Q_ASSERT(tmpTime.isValid());
1459 QDateTime tmpDT(tmpDate, tmpTime); 1461 QDateTime tmpDT(tmpDate, tmpTime);
1460 // correct for GMT if string is in Zulu format 1462 // correct for GMT if string is in Zulu format
1461 if (dtStr.at(dtStr.length()-1) == 'Z') 1463 if (dtStr.at(dtStr.length()-1) == 'Z')
@@ -1648,7 +1650,7 @@ Attendee::Role VCalFormat::readRole(const char *s) const
1648 return role; 1650 return role;
1649} 1651}
1650 1652
1651QCString VCalFormat::writeRole(Attendee::Role role) const 1653Q3CString VCalFormat::writeRole(Attendee::Role role) const
1652{ 1654{
1653 if ( role == Attendee::Chair ) 1655 if ( role == Attendee::Chair )
1654 return "OWNER"; 1656 return "OWNER";
@@ -1686,7 +1688,7 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const
1686 return status; 1688 return status;
1687} 1689}
1688 1690
1689QCString VCalFormat::writeStatus(Attendee::PartStat status) const 1691Q3CString VCalFormat::writeStatus(Attendee::PartStat status) const
1690{ 1692{
1691 switch(status) { 1693 switch(status) {
1692 default: 1694 default:
diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h
index 6dae3d2..cac9634 100644
--- a/libkcal/vcalformat.h
+++ b/libkcal/vcalformat.h
@@ -23,6 +23,9 @@
23#define _VCALFORMAT_H 23#define _VCALFORMAT_H
24 24
25#include "calformat.h" 25#include "calformat.h"
26//Added by qt3to4:
27#include <Q3CString>
28#include <Q3PtrList>
26 29
27#define _VCAL_VERSION "1.0" 30#define _VCAL_VERSION "1.0"
28 31
@@ -95,17 +98,17 @@ class VCalFormat : public CalFormat {
95 const char *dayFromNum(int day); 98 const char *dayFromNum(int day);
96 /** the reverse of the above function. */ 99 /** the reverse of the above function. */
97 int numFromDay(const QString &day); 100 int numFromDay(const QString &day);
98 Attendee::Role VCalFormat::readRole(const char *s) const; 101 Attendee::Role readRole(const char *s) const;
99 QCString writeRole(Attendee::Role role) const; 102 Q3CString writeRole(Attendee::Role role) const;
100 Attendee::PartStat readStatus(const char *s) const; 103 Attendee::PartStat readStatus(const char *s) const;
101 QCString writeStatus(Attendee::PartStat status) const; 104 Q3CString writeStatus(Attendee::PartStat status) const;
102 105
103 private: 106 private:
104 Calendar *mCalendar; 107 Calendar *mCalendar;
105 bool useLocalTime; 108 bool useLocalTime;
106 109
107 QPtrList<Event> mEventsRelate; // events with relations 110 Q3PtrList<Event> mEventsRelate; // events with relations
108 QPtrList<Todo> mTodosRelate; // todos with relations 111 Q3PtrList<Todo> mTodosRelate; // todos with relations
109}; 112};
110 113
111} 114}
diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp
index e2325d2..92a1737 100644
--- a/libkdepim/categoryeditdialog.cpp
+++ b/libkdepim/categoryeditdialog.cpp
@@ -23,10 +23,11 @@
23 23
24#include <qstringlist.h> 24#include <qstringlist.h>
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qlistview.h> 26#include <q3listview.h>
27#include <qheader.h> 27#include <q3header.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#include <QDesktopWidget>
30 31
31#include "kpimprefs.h" 32#include "kpimprefs.h"
32 33
@@ -36,7 +37,7 @@ using namespace KPIM;
36 37
37CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, 38CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
38 const char* name, bool modal, 39 const char* name, bool modal,
39 WFlags fl ) 40 Qt::WFlags fl )
40 : CategoryEditDialog_base( parent, name, modal, fl ), 41 : CategoryEditDialog_base( parent, name, modal, fl ),
41 mPrefs( prefs ) 42 mPrefs( prefs )
42{ 43{
@@ -46,12 +47,12 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent,
46 bool categoriesExist=false; 47 bool categoriesExist=false;
47 for (it = mPrefs->mCustomCategories.begin(); 48 for (it = mPrefs->mCustomCategories.begin();
48 it != mPrefs->mCustomCategories.end(); ++it ) { 49 it != mPrefs->mCustomCategories.end(); ++it ) {
49 new QListViewItem(mCategories,*it); 50 new Q3ListViewItem(mCategories,*it);
50 categoriesExist=true; 51 categoriesExist=true;
51 } 52 }
52 53
53 connect(mCategories,SIGNAL(selectionChanged(QListViewItem *)), 54 connect(mCategories,SIGNAL(selectionChanged(Q3ListViewItem *)),
54 SLOT(editItem(QListViewItem *))); 55 SLOT(editItem(Q3ListViewItem *)));
55 connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &))); 56 connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &)));
56 mButtonRemove->setEnabled(categoriesExist); 57 mButtonRemove->setEnabled(categoriesExist);
57 mButtonModify->setEnabled(categoriesExist); 58 mButtonModify->setEnabled(categoriesExist);
@@ -82,7 +83,7 @@ void CategoryEditDialog::slotTextChanged(const QString &text)
82void CategoryEditDialog::add() 83void CategoryEditDialog::add()
83{ 84{
84 if (!mEdit->text().isEmpty()) { 85 if (!mEdit->text().isEmpty()) {
85 new QListViewItem(mCategories,mEdit->text()); 86 new Q3ListViewItem(mCategories,mEdit->text());
86 mEdit->setText(""); 87 mEdit->setText("");
87 mButtonRemove->setEnabled(mCategories->childCount()>0); 88 mButtonRemove->setEnabled(mCategories->childCount()>0);
88 mButtonModify->setEnabled(mCategories->childCount()>0); 89 mButtonModify->setEnabled(mCategories->childCount()>0);
@@ -121,7 +122,7 @@ void CategoryEditDialog::slotApply()
121{ 122{
122 mPrefs->mCustomCategories.clear(); 123 mPrefs->mCustomCategories.clear();
123 124
124 QListViewItem *item = mCategories->firstChild(); 125 Q3ListViewItem *item = mCategories->firstChild();
125 while(item) { 126 while(item) {
126 mPrefs->mCustomCategories.append(item->text(0)); 127 mPrefs->mCustomCategories.append(item->text(0));
127 item = item->nextSibling(); 128 item = item->nextSibling();
@@ -131,7 +132,7 @@ void CategoryEditDialog::slotApply()
131 emit categoryConfigChanged(); 132 emit categoryConfigChanged();
132} 133}
133 134
134void CategoryEditDialog::editItem(QListViewItem *item) 135void CategoryEditDialog::editItem(Q3ListViewItem *item)
135{ 136{
136 mEdit->setText(item->text(0)); 137 mEdit->setText(item->text(0));
137 mButtonRemove->setEnabled(true); 138 mButtonRemove->setEnabled(true);
diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h
index 9bb3201..828894f 100644
--- a/libkdepim/categoryeditdialog.h
+++ b/libkdepim/categoryeditdialog.h
@@ -24,30 +24,30 @@
24#define KPIM_CATEGORYEDITDIALOG_H 24#define KPIM_CATEGORYEDITDIALOG_H
25 25
26#include <categoryeditdialog_base.h> 26#include <categoryeditdialog_base.h>
27#include <qlistview.h> 27#include <q3listview.h>
28 28
29class KPimPrefs; 29class KPimPrefs;
30 30
31namespace KPIM { 31namespace KPIM {
32 32
33 class CategorySelectItem :public QObject, public QCheckListItem 33 class CategorySelectItem :public QObject, public Q3CheckListItem
34{ 34{
35 35
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 38
39 CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ), 39 CategorySelectItem(Q3ListView * parent, const QString & text, Type tt) : QObject( parent ),
40 QCheckListItem (parent, text, tt ) 40 Q3CheckListItem (parent, text, tt )
41 {;} 41 {;}
42 42
43 signals: 43 signals:
44 void stateChanged( QListViewItem*); 44 void stateChanged( Q3ListViewItem*);
45 45
46 protected: 46 protected:
47 47
48 virtual void stateChange(bool b) 48 virtual void stateChange(bool b)
49 { 49 {
50 QCheckListItem::stateChange(b); 50 Q3CheckListItem::stateChange(b);
51 emit stateChanged( this ); 51 emit stateChanged( this );
52 } 52 }
53}; 53};
@@ -59,7 +59,7 @@ class CategoryEditDialog : public CategoryEditDialog_base
59 public: 59 public:
60 CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0, 60 CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0,
61 const char* name = 0, 61 const char* name = 0,
62 bool modal = FALSE, WFlags fl = 0 ); 62 bool modal = FALSE, Qt::WFlags fl = 0 );
63 ~CategoryEditDialog(); 63 ~CategoryEditDialog();
64 64
65 public slots: 65 public slots:
@@ -75,9 +75,9 @@ class CategoryEditDialog : public CategoryEditDialog_base
75 void categoryConfigChanged(); 75 void categoryConfigChanged();
76 76
77 private slots: 77 private slots:
78 void editItem(QListViewItem *item); 78 void editItem(Q3ListViewItem *item);
79 void slotTextChanged(const QString &text); 79 void slotTextChanged(const QString &text);
80 80 private:
81 KPimPrefs *mPrefs; 81 KPimPrefs *mPrefs;
82}; 82};
83 83
diff --git a/libkdepim/categoryeditdialog_base.cpp b/libkdepim/categoryeditdialog_base.cpp
index 1908576..c85f6e5 100644
--- a/libkdepim/categoryeditdialog_base.cpp
+++ b/libkdepim/categoryeditdialog_base.cpp
@@ -11,13 +11,17 @@
11#include "categoryeditdialog_base.h" 11#include "categoryeditdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qlistview.h> 16#include <q3listview.h>
17#include <qpushbutton.h> 17#include <qpushbutton.h>
18#include <qlayout.h> 18#include <qlayout.h>
19#include <qtooltip.h> 19#include <qtooltip.h>
20#include <qwhatsthis.h> 20#include <q3whatsthis.h>
21//Added by qt3to4:
22#include <Q3GridLayout>
23#include <Q3HBoxLayout>
24#include <Q3VBoxLayout>
21 25
22/* 26/*
23 * Constructs a CategoryEditDialog_base as a child of 'parent', with the 27 * Constructs a CategoryEditDialog_base as a child of 'parent', with the
@@ -26,19 +30,19 @@
26 * The dialog will by default be modeless, unless you set 'modal' to 30 * The dialog will by default be modeless, unless you set 'modal' to
27 * TRUE to construct a modal dialog. 31 * TRUE to construct a modal dialog.
28 */ 32 */
29CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 33CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
30 : QDialog( parent, name, true, fl ) 34 : QDialog( parent, name, true, fl )
31 35
32{ 36{
33 if ( !name ) 37 if ( !name )
34 setName( "CategoryEditDialog_base" ); 38 setName( "CategoryEditDialog_base" );
35 CategoryEditDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout"); 39 CategoryEditDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout");
36 40
37 mEdit = new QLineEdit( this, "mEdit" ); 41 mEdit = new QLineEdit( this, "mEdit" );
38 42
39 CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 ); 43 CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 );
40 44
41 Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13"); 45 Layout13 = new Q3HBoxLayout( 0, 0, 6, "Layout13");
42 46
43 // mButtonHelp = new QPushButton( this, "mButtonHelp" ); 47 // mButtonHelp = new QPushButton( this, "mButtonHelp" );
44 //mButtonHelp->setAutoDefault( TRUE ); 48 //mButtonHelp->setAutoDefault( TRUE );
@@ -60,12 +64,12 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n
60 64
61 CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 ); 65 CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 );
62 66
63 mCategories = new QListView( this, "mCategories" ); 67 mCategories = new Q3ListView( this, "mCategories" );
64 mCategories->addColumn( tr2i18n( "Category" ) ); 68 mCategories->addColumn( tr2i18n( "Category" ) );
65 69
66 CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 ); 70 CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 );
67 71
68 layout103 = new QVBoxLayout( 0, 0, 6, "layout103"); 72 layout103 = new Q3VBoxLayout( 0, 0, 6, "layout103");
69 73
70 mButtonAdd = new QPushButton( this, "mButtonAdd" ); 74 mButtonAdd = new QPushButton( this, "mButtonAdd" );
71 CategoryEditDialog_baseLayout->addMultiCellWidget(mButtonAdd , 1, 1, 1, 1 ); 75 CategoryEditDialog_baseLayout->addMultiCellWidget(mButtonAdd , 1, 1, 1, 1 );
diff --git a/libkdepim/categoryeditdialog_base.h b/libkdepim/categoryeditdialog_base.h
index 5557ad0..cd577b0 100644
--- a/libkdepim/categoryeditdialog_base.h
+++ b/libkdepim/categoryeditdialog_base.h
@@ -12,13 +12,17 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3VBoxLayout>
17class QHBoxLayout; 17#include <Q3GridLayout>
18class QGridLayout; 18#include <Q3HBoxLayout>
19
20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
19class QLineEdit; 23class QLineEdit;
20class QListView; 24class Q3ListView;
21class QListViewItem; 25class Q3ListViewItem;
22class QPushButton; 26class QPushButton;
23 27
24class CategoryEditDialog_base : public QDialog 28class CategoryEditDialog_base : public QDialog
@@ -26,7 +30,7 @@ class CategoryEditDialog_base : public QDialog
26 Q_OBJECT 30 Q_OBJECT
27 31
28public: 32public:
29 CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 33 CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
30 ~CategoryEditDialog_base(); 34 ~CategoryEditDialog_base();
31 35
32 QLineEdit* mEdit; 36 QLineEdit* mEdit;
@@ -34,7 +38,7 @@ public:
34 QPushButton* mApply; 38 QPushButton* mApply;
35 QPushButton* mButtonOk; 39 QPushButton* mButtonOk;
36 QPushButton* mButtonCancel; 40 QPushButton* mButtonCancel;
37 QListView* mCategories; 41 Q3ListView* mCategories;
38 QPushButton* mButtonAdd; 42 QPushButton* mButtonAdd;
39 QPushButton* mButtonModify; 43 QPushButton* mButtonModify;
40 QPushButton* mButtonRemove; 44 QPushButton* mButtonRemove;
@@ -47,9 +51,9 @@ public slots:
47 virtual void slotOk(); 51 virtual void slotOk();
48 52
49protected: 53protected:
50 QGridLayout* CategoryEditDialog_baseLayout; 54 Q3GridLayout* CategoryEditDialog_baseLayout;
51 QHBoxLayout* Layout13; 55 Q3HBoxLayout* Layout13;
52 QVBoxLayout* layout103; 56 Q3VBoxLayout* layout103;
53 57
54protected slots: 58protected slots:
55 virtual void languageChange(); 59 virtual void languageChange();
diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp
index 2a9b43e..4f72880 100644
--- a/libkdepim/categoryselectdialog.cpp
+++ b/libkdepim/categoryselectdialog.cpp
@@ -21,11 +21,14 @@
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlistview.h> 24#include <q3listview.h>
25#include <qpushbutton.h> 25#include <qpushbutton.h>
26#include <qheader.h> 26#include <q3header.h>
27#include <qapp.h> 27#include <qapplication.h>
28#include <qmessagebox.h> 28#include <qmessagebox.h>
29//Added by qt3to4:
30#include <QPixmap>
31#include <QDesktopWidget>
29#include <kmessagebox.h> 32#include <kmessagebox.h>
30 33
31 34
@@ -38,7 +41,7 @@ using namespace KPIM;
38 41
39CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, 42CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent,
40 const char* name, 43 const char* name,
41 bool modal, WFlags fl ) 44 bool modal, Qt::WFlags fl )
42 : CategorySelectDialog_base( parent, name, true, fl ), 45 : CategorySelectDialog_base( parent, name, true, fl ),
43 mPrefs( prefs ) 46 mPrefs( prefs )
44{ 47{
@@ -81,8 +84,8 @@ void CategorySelectDialog::setCategories()
81 QStringList::Iterator it; 84 QStringList::Iterator it;
82 for (it = mPrefs->mCustomCategories.begin(); 85 for (it = mPrefs->mCustomCategories.begin();
83 it != mPrefs->mCustomCategories.end(); ++it ) { 86 it != mPrefs->mCustomCategories.end(); ++it ) {
84 CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox); 87 CategorySelectItem * item = new CategorySelectItem(mCategories,*it,Q3CheckListItem::CheckBox);
85 QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); 88 QObject::connect( item, SIGNAL( stateChanged(Q3ListViewItem *) ), this, SLOT( clicked(Q3ListViewItem *) ) );
86 89
87 } 90 }
88} 91}
@@ -100,7 +103,7 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
100 bool found = false; 103 bool found = false;
101 for (it=selList.begin();it!=selList.end();++it) { 104 for (it=selList.begin();it!=selList.end();++it) {
102 //qDebug(" CategorySelectDialog::setSelected("); 105 //qDebug(" CategorySelectDialog::setSelected(");
103 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 106 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
104 while (item) { 107 while (item) {
105 if (item->text() == *it) { 108 if (item->text() == *it) {
106 item->setOn(true); 109 item->setOn(true);
@@ -109,7 +112,7 @@ void CategorySelectDialog::setSelected(const QStringList &selList)
109 found = true; 112 found = true;
110 break; 113 break;
111 } 114 }
112 item = (QCheckListItem *)item->nextSibling(); 115 item = (Q3CheckListItem *)item->nextSibling();
113 } 116 }
114// if ( ! found ) { 117// if ( ! found ) {
115 118
@@ -137,7 +140,7 @@ void CategorySelectDialog::setColorEnabled()
137} 140}
138void CategorySelectDialog::setColorCat() 141void CategorySelectDialog::setColorCat()
139{ 142{
140 QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem (); 143 Q3CheckListItem * newColorItem = (Q3CheckListItem * )mCategories->currentItem ();
141 if ( !newColorItem ) { 144 if ( !newColorItem ) {
142 KMessageBox::error(this,i18n("There is no current item.")); 145 KMessageBox::error(this,i18n("There is no current item."));
143 return; 146 return;
@@ -147,26 +150,26 @@ void CategorySelectDialog::setColorCat()
147 setColorItem( newColorItem ); 150 setColorItem( newColorItem );
148 151
149} 152}
150void CategorySelectDialog::clicked ( QListViewItem * it ) 153void CategorySelectDialog::clicked ( Q3ListViewItem * it )
151{ 154{
152 if ( ! it ) 155 if ( ! it )
153 return; 156 return;
154 QCheckListItem *i = (QCheckListItem *) it; 157 Q3CheckListItem *i = (Q3CheckListItem *) it;
155 if ( !i->isOn() && i==mColorItem) { 158 if ( !i->isOn() && i==mColorItem) {
156 setColorItem( 0); 159 setColorItem( 0);
157 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 160 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
158 while (item) { 161 while (item) {
159 if (item->isOn()) { 162 if (item->isOn()) {
160 setColorItem( item ); 163 setColorItem( item );
161 break; 164 break;
162 } 165 }
163 item = (QCheckListItem *)item->nextSibling(); 166 item = (Q3CheckListItem *)item->nextSibling();
164 } 167 }
165 } else if ( i->isOn() && !mColorItem) { 168 } else if ( i->isOn() && !mColorItem) {
166 setColorItem( i); 169 setColorItem( i);
167 } 170 }
168} 171}
169void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem ) 172void CategorySelectDialog::setColorItem( Q3CheckListItem * newColorItem )
170{ 173{
171 if ( !mColorEnabled ) 174 if ( !mColorEnabled )
172 return; 175 return;
@@ -186,7 +189,7 @@ void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem )
186void CategorySelectDialog::slotApply() 189void CategorySelectDialog::slotApply()
187{ 190{
188 QStringList categories; 191 QStringList categories;
189 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 192 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
190 QString colcat; 193 QString colcat;
191 while (item) { 194 while (item) {
192 if (item->isOn()) { 195 if (item->isOn()) {
@@ -195,7 +198,7 @@ void CategorySelectDialog::slotApply()
195 else 198 else
196 categories.append(item->text()); 199 categories.append(item->text());
197 } 200 }
198 item = (QCheckListItem *)item->nextSibling(); 201 item = (Q3CheckListItem *)item->nextSibling();
199 } 202 }
200 categories.sort(); 203 categories.sort();
201 if ( ! colcat.isEmpty() ) 204 if ( ! colcat.isEmpty() )
@@ -220,22 +223,22 @@ void CategorySelectDialog::slotOk()
220 223
221void CategorySelectDialog::clear() 224void CategorySelectDialog::clear()
222{ 225{
223 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 226 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
224 while (item) { 227 while (item) {
225 item->setOn(false); 228 item->setOn(false);
226 item = (QCheckListItem *)item->nextSibling(); 229 item = (Q3CheckListItem *)item->nextSibling();
227 } 230 }
228} 231}
229 232
230void CategorySelectDialog::updateCategoryConfig() 233void CategorySelectDialog::updateCategoryConfig()
231{ 234{
232 QStringList selected; 235 QStringList selected;
233 QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); 236 Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild();
234 while (item) { 237 while (item) {
235 if (item->isOn()) { 238 if (item->isOn()) {
236 selected.append(item->text()); 239 selected.append(item->text());
237 } 240 }
238 item = (QCheckListItem *)item->nextSibling(); 241 item = (Q3CheckListItem *)item->nextSibling();
239 } 242 }
240 243
241 setCategories(); 244 setCategories();
diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h
index 680a093..ff7ac58 100644
--- a/libkdepim/categoryselectdialog.h
+++ b/libkdepim/categoryselectdialog.h
@@ -26,7 +26,7 @@
26#include <categoryselectdialog_base.h> 26#include <categoryselectdialog_base.h>
27 27
28class KPimPrefs; 28class KPimPrefs;
29class QCheckListItem; 29class Q3CheckListItem;
30 30
31namespace KPIM { 31namespace KPIM {
32 32
@@ -36,7 +36,7 @@ class CategorySelectDialog : public CategorySelectDialog_base
36 public: 36 public:
37 CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0, 37 CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0,
38 const char* name = 0, 38 const char* name = 0,
39 bool modal = FALSE, WFlags fl = 0 ); 39 bool modal = FALSE, Qt::WFlags fl = 0 );
40 ~CategorySelectDialog(); 40 ~CategorySelectDialog();
41 41
42 void setCategories(); 42 void setCategories();
@@ -53,7 +53,7 @@ class CategorySelectDialog : public CategorySelectDialog_base
53 void editCategoriesDialog(); 53 void editCategoriesDialog();
54 void updateCategoryConfig(); 54 void updateCategoryConfig();
55 void setColorCat(); 55 void setColorCat();
56 void clicked ( QListViewItem * ); 56 void clicked ( Q3ListViewItem * );
57 signals: 57 signals:
58 void categoriesSelected(const QString &); 58 void categoriesSelected(const QString &);
59 void categoriesSelected(const QStringList &); 59 void categoriesSelected(const QStringList &);
@@ -63,8 +63,8 @@ class CategorySelectDialog : public CategorySelectDialog_base
63 bool mColorEnabled; 63 bool mColorEnabled;
64 KPimPrefs *mPrefs; 64 KPimPrefs *mPrefs;
65 QStringList mCategoryList; 65 QStringList mCategoryList;
66 QCheckListItem *mColorItem; 66 Q3CheckListItem *mColorItem;
67 void setColorItem( QCheckListItem * ); 67 void setColorItem( Q3CheckListItem * );
68 68
69 class CategorySelectDialogPrivate; 69 class CategorySelectDialogPrivate;
70 CategorySelectDialogPrivate *d; 70 CategorySelectDialogPrivate *d;
diff --git a/libkdepim/categoryselectdialog_base.cpp b/libkdepim/categoryselectdialog_base.cpp
index 4793fd7..5d53ac4 100644
--- a/libkdepim/categoryselectdialog_base.cpp
+++ b/libkdepim/categoryselectdialog_base.cpp
@@ -11,12 +11,15 @@
11#include "categoryselectdialog_base.h" 11#include "categoryselectdialog_base.h"
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qheader.h> 14#include <q3header.h>
15#include <qlistview.h> 15#include <q3listview.h>
16#include <qpushbutton.h> 16#include <qpushbutton.h>
17#include <qlayout.h> 17#include <qlayout.h>
18#include <qtooltip.h> 18#include <qtooltip.h>
19#include <qwhatsthis.h> 19#include <q3whatsthis.h>
20//Added by qt3to4:
21#include <Q3VBoxLayout>
22#include <Q3HBoxLayout>
20 23
21/* 24/*
22 * Constructs a CategorySelectDialog_base as a child of 'parent', with the 25 * Constructs a CategorySelectDialog_base as a child of 'parent', with the
@@ -25,20 +28,20 @@
25 * The dialog will by default be modeless, unless you set 'modal' to 28 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog. 29 * TRUE to construct a modal dialog.
27 */ 30 */
28CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) 31CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl )
29 : QDialog( parent, name, modal, fl ) 32 : QDialog( parent, name, modal, fl )
30 33
31{ 34{
32 if ( !name ) 35 if ( !name )
33 setName( "CategorySelectDialog_base" ); 36 setName( "CategorySelectDialog_base" );
34 CategorySelectDialog_baseLayout = new QVBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout"); 37 CategorySelectDialog_baseLayout = new Q3VBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout");
35 38
36 mCategories = new QListView( this, "mCategories" ); 39 mCategories = new Q3ListView( this, "mCategories" );
37 mCategories->addColumn( i18n( "Category" ) ); 40 mCategories->addColumn( i18n( "Category" ) );
38 CategorySelectDialog_baseLayout->addWidget( mCategories ); 41 CategorySelectDialog_baseLayout->addWidget( mCategories );
39 mSetColorCat = new QPushButton( this, "msetColor" ); 42 mSetColorCat = new QPushButton( this, "msetColor" );
40 CategorySelectDialog_baseLayout->addWidget( mSetColorCat ); 43 CategorySelectDialog_baseLayout->addWidget( mSetColorCat );
41 Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12"); 44 Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12");
42 45
43 mClear = new QPushButton( this, "mClear" ); 46 mClear = new QPushButton( this, "mClear" );
44 Layout12->addWidget( mClear ); 47 Layout12->addWidget( mClear );
@@ -49,7 +52,7 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha
49 Layout12->addWidget( mButtonEdit ); 52 Layout12->addWidget( mButtonEdit );
50 CategorySelectDialog_baseLayout->addLayout( Layout12 ); 53 CategorySelectDialog_baseLayout->addLayout( Layout12 );
51 54
52 Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11"); 55 Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11");
53 56
54 //mButtonHelp = new QPushButton( this, "mButtonHelp" ); 57 //mButtonHelp = new QPushButton( this, "mButtonHelp" );
55 //Layout11->addWidget( mButtonHelp ); 58 //Layout11->addWidget( mButtonHelp );
diff --git a/libkdepim/categoryselectdialog_base.h b/libkdepim/categoryselectdialog_base.h
index 59ffa22..71d4ce9 100644
--- a/libkdepim/categoryselectdialog_base.h
+++ b/libkdepim/categoryselectdialog_base.h
@@ -12,12 +12,16 @@
12 12
13#include <qvariant.h> 13#include <qvariant.h>
14#include <qdialog.h> 14#include <qdialog.h>
15 15//Added by qt3to4:
16class QVBoxLayout; 16#include <Q3VBoxLayout>
17class QHBoxLayout; 17#include <Q3GridLayout>
18class QGridLayout; 18#include <Q3HBoxLayout>
19class QListView; 19
20class QListViewItem; 20class Q3VBoxLayout;
21class Q3HBoxLayout;
22class Q3GridLayout;
23class Q3ListView;
24class Q3ListViewItem;
21class QPushButton; 25class QPushButton;
22 26
23class CategorySelectDialog_base : public QDialog 27class CategorySelectDialog_base : public QDialog
@@ -25,10 +29,10 @@ class CategorySelectDialog_base : public QDialog
25 Q_OBJECT 29 Q_OBJECT
26 30
27public: 31public:
28 CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 32 CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
29 ~CategorySelectDialog_base(); 33 ~CategorySelectDialog_base();
30 34
31 QListView* mCategories; 35 Q3ListView* mCategories;
32 QPushButton* mClear; 36 QPushButton* mClear;
33 QPushButton* mButtonEdit; 37 QPushButton* mButtonEdit;
34 QPushButton* mButtonHelp; 38 QPushButton* mButtonHelp;
@@ -43,9 +47,9 @@ public slots:
43 virtual void slotOk(); 47 virtual void slotOk();
44 48
45protected: 49protected:
46 QVBoxLayout* CategorySelectDialog_baseLayout; 50 Q3VBoxLayout* CategorySelectDialog_baseLayout;
47 QHBoxLayout* Layout12; 51 Q3HBoxLayout* Layout12;
48 QHBoxLayout* Layout11; 52 Q3HBoxLayout* Layout11;
49 53
50protected slots: 54protected slots:
51 virtual void languageChange(); 55 virtual void languageChange();
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index f376e6c..3fc548a 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -39,7 +39,9 @@ $Id$
39#include <qtopia/qcopenvelope_qws.h> 39#include <qtopia/qcopenvelope_qws.h>
40#else 40#else
41#include <qapplication.h> 41#include <qapplication.h>
42#include <qprocess.h> 42#include <q3process.h>
43//Added by qt3to4:
44#include <Q3CString>
43#endif 45#endif
44 46
45#include <kstaticdeleter.h> 47#include <kstaticdeleter.h>
@@ -123,7 +125,7 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel)
123 125
124 126
125/*********************************************************************************/ 127/*********************************************************************************/
126bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 128bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
127{ 129{
128 130
129 // copied from old mail2 131 // copied from old mail2
@@ -146,7 +148,7 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data
146 if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data()) 148 if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data())
147 { 149 {
148 150
149 QDataStream stream( data, IO_ReadOnly ); 151 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
150 152
151 153
152 QString sourceChannel; 154 QString sourceChannel;
@@ -226,13 +228,13 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt
226 228
227 229
228/*********************************************************************************/ 230/*********************************************************************************/
229bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 231bool QCopMapTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
230{ 232{
231 bool res = QCopTransferItem::appMessage( cmsg, data ); 233 bool res = QCopTransferItem::appMessage( cmsg, data );
232 234
233 if (res == false) 235 if (res == false)
234 { 236 {
235 QDataStream stream( data, IO_ReadOnly ); 237 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
236 238
237// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); 239// qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() );
238 240
@@ -305,7 +307,7 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString
305 307
306 308
307/*********************************************************************************/ 309/*********************************************************************************/
308bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) 310bool QCopListTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data )
309{ 311{
310 bool res = QCopTransferItem::appMessage( cmsg, data ); 312 bool res = QCopTransferItem::appMessage( cmsg, data );
311#ifdef DEBUG_EXT_APP_HANDLER 313#ifdef DEBUG_EXT_APP_HANDLER
@@ -314,7 +316,7 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d
314 316
315 if (res == false) 317 if (res == false)
316 { 318 {
317 QDataStream stream( data, IO_ReadOnly ); 319 QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly );
318 320
319#ifdef DEBUG_EXT_APP_HANDLER 321#ifdef DEBUG_EXT_APP_HANDLER
320 qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); 322 qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() );
@@ -518,9 +520,9 @@ void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& la
518} 520}
519 521
520 522
521QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) 523Q3PtrList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type)
522{ 524{
523 QList<DefaultAppItem> list; 525 Q3PtrList<DefaultAppItem> list;
524 526
525 DefaultAppItem* dai; 527 DefaultAppItem* dai;
526 528
@@ -746,7 +748,7 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
746#endif 748#endif
747 qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() ); 749 qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() );
748 //KMessageBox::sorry( 0, message2 ); 750 //KMessageBox::sorry( 0, message2 );
749 QProcess * proc = new QProcess( this ); 751 Q3Process * proc = new Q3Process( this );
750 int i = 0; 752 int i = 0;
751 proc->addArgument( channel ); 753 proc->addArgument( channel );
752 754
@@ -772,7 +774,7 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS
772 //KMessageBox::sorry( 0,arg ); 774 //KMessageBox::sorry( 0,arg );
773 //qDebug("2add%sdd ",arg.latin1() ); 775 //qDebug("2add%sdd ",arg.latin1() );
774 proc->addArgument( arg); 776 proc->addArgument( arg);
775 proc->launch(""); 777 proc->launch(QString());
776#endif 778#endif
777 779
778 return true; 780 return true;
@@ -831,7 +833,7 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
831#else // DESKTOP_VERSION 833#else // DESKTOP_VERSION
832 834
833 //KMessageBox::sorry( 0,channel ); 835 //KMessageBox::sorry( 0,channel );
834 QProcess * proc = new QProcess( this ); 836 Q3Process * proc = new Q3Process( this );
835 proc->addArgument( channel ); 837 proc->addArgument( channel );
836 if ( message.find (" " ) > 0 ) { 838 if ( message.find (" " ) > 0 ) {
837 QStringList list = QStringList::split( " ", message ); 839 QStringList list = QStringList::split( " ", message );
@@ -850,7 +852,7 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
850 852
851 //KMessageBox::information(0,parameters); 853 //KMessageBox::information(0,parameters);
852 proc->addArgument( parameters ); 854 proc->addArgument( parameters );
853 proc->launch(""); 855 proc->launch(QString());
854#endif 856#endif
855 857
856 return true; 858 return true;
@@ -1232,7 +1234,7 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete
1232 * 1234 *
1233 **************************************************************************/ 1235 **************************************************************************/
1234 1236
1235void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) 1237void ExternalAppHandler::appMessage( const Q3CString& cmsg, const QByteArray& data )
1236{ 1238{
1237 qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this); 1239 qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this);
1238 if ( cmsg == "nextView()" ) { 1240 if ( cmsg == "nextView()" ) {
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h
index b899ad7..3247fe4 100644
--- a/libkdepim/externalapphandler.h
+++ b/libkdepim/externalapphandler.h
@@ -34,6 +34,9 @@ $Id$
34#include <qobject.h> 34#include <qobject.h>
35#include <qlist.h> 35#include <qlist.h>
36#include <qmap.h> 36#include <qmap.h>
37#include <Q3PtrList>
38//Added by qt3to4:
39#include <Q3CString>
37 40
38class QCopEnvelope; 41class QCopEnvelope;
39 42
@@ -50,7 +53,7 @@ class QCopTransferItem : public QObject
50 53
51 void setSourceChannel(const QString& sourceChannel); 54 void setSourceChannel(const QString& sourceChannel);
52 55
53 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 56 virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
54 57
55 58
56 signals: 59 signals:
@@ -83,7 +86,7 @@ class QCopMapTransferItem : public QCopTransferItem
83 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap); 86 bool sendMessageToSource(const QString& uid, const QMap<QString,QString>& nameEmailMap);
84 87
85 88
86 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 89 virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
87 90
88 91
89 signals: 92 signals:
@@ -104,7 +107,7 @@ class QCopListTransferItem : public QCopTransferItem
104 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6); 107 bool sendMessageToSource(const QString& uid, const QStringList& list1, const QStringList& list2, const QStringList& list3, const QStringList& list4, const QStringList& list5, const QStringList& list6);
105 108
106 109
107 virtual bool appMessage( const QCString& msg, const QByteArray& data ); 110 virtual bool appMessage( const Q3CString& msg, const QByteArray& data );
108 111
109 112
110 signals: 113 signals:
@@ -225,11 +228,11 @@ class ExternalAppHandler : public QObject
225 //loadConfig clears the cache and checks again if the applications are available or not 228 //loadConfig clears the cache and checks again if the applications are available or not
226 void loadConfig(); 229 void loadConfig();
227 230
228 QList<DefaultAppItem> getAvailableDefaultItems(Types); 231 Q3PtrList<DefaultAppItem> getAvailableDefaultItems(Types);
229 DefaultAppItem* getDefaultItem(Types, int); 232 DefaultAppItem* getDefaultItem(Types, int);
230 233
231 public slots: 234 public slots:
232 void appMessage( const QCString& msg, const QByteArray& data ); 235 void appMessage( const Q3CString& msg, const QByteArray& data );
233 236
234 237
235 signals: 238 signals:
@@ -262,7 +265,7 @@ class ExternalAppHandler : public QObject
262 265
263 private: 266 private:
264 ExternalAppHandler(); 267 ExternalAppHandler();
265 QList<DefaultAppItem> mDefaultItems; 268 Q3PtrList<DefaultAppItem> mDefaultItems;
266 269
267 Availability mEmailAppAvailable; 270 Availability mEmailAppAvailable;
268 Availability mPhoneAppAvailable; 271 Availability mPhoneAppAvailable;
diff --git a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
index 5094830..9f47766 100644
--- a/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
+++ b/libkdepim/kcmconfigs/kcmkdepimconfig.cpp
@@ -30,6 +30,8 @@ $Id$
30 30
31 31
32#include <qlayout.h> 32#include <qlayout.h>
33//Added by qt3to4:
34#include <Q3VBoxLayout>
33 35
34#include <kdebug.h> 36#include <kdebug.h>
35//#include <klocale.h> 37//#include <klocale.h>
@@ -54,7 +56,7 @@ KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name )
54 : KCModule( KPimGlobalPrefs::instance(), parent, name ) 56 : KCModule( KPimGlobalPrefs::instance(), parent, name )
55{ 57{
56 //abort(); 58 //abort();
57 QVBoxLayout *layout = new QVBoxLayout( this ); 59 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
58 mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" ); 60 mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" );
59 layout->addWidget( mConfigWidget ); 61 layout->addWidget( mConfigWidget );
60 layout->setSpacing( 0 ); 62 layout->setSpacing( 0 );
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 292951b..11a2b45 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -31,16 +31,21 @@ $Id$
31#include <qlayout.h> 31#include <qlayout.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qgroupbox.h> 34#include <q3groupbox.h>
35#include <qlabel.h> 35#include <qlabel.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qbuttongroup.h> 37#include <q3buttongroup.h>
38#include <qcheckbox.h> 38#include <qcheckbox.h>
39#include <qfile.h> 39#include <qfile.h>
40#include <qvbox.h> 40#include <q3vbox.h>
41#include <qdir.h> 41#include <qdir.h>
42#include <qregexp.h> 42#include <qregexp.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <QDesktopWidget>
45//Added by qt3to4:
46#include <Q3HBoxLayout>
47#include <Q3GridLayout>
48#include <Q3VBoxLayout>
44 49
45#include <kdialog.h> 50#include <kdialog.h>
46#include <kprefsdialog.h> 51#include <kprefsdialog.h>
@@ -101,7 +106,7 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent,
101 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); 106 mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP"));
102 107
103 108
104 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 109 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
105 KDialog::spacingHint() ); 110 KDialog::spacingHint() );
106 111
107 tabWidget = new QTabWidget( this ); 112 tabWidget = new QTabWidget( this );
@@ -121,17 +126,17 @@ void KDEPIMConfigWidget::showTimeZoneTab()
121} 126}
122void KDEPIMConfigWidget::setupBackupTab() 127void KDEPIMConfigWidget::setupBackupTab()
123{ 128{
124 QVBox *colorPage = new QVBox( this ); 129 Q3VBox *colorPage = new Q3VBox( this );
125 tabWidget->addTab( colorPage, i18n( "Backup" ) ); 130 tabWidget->addTab( colorPage, i18n( "Backup" ) );
126 QWidget* topFrame = new QWidget( colorPage ); 131 QWidget* topFrame = new QWidget( colorPage );
127 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 132 Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame);
128 KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), 133 KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"),
129 &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); 134 &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame);
130 topLayout->addWidget((QWidget*)sb->checkBox()); 135 topLayout->addWidget((QWidget*)sb->checkBox());
131 QWidget* bupFrame = new QWidget( topFrame ); 136 QWidget* bupFrame = new QWidget( topFrame );
132 topLayout->addWidget((bupFrame)); 137 topLayout->addWidget((bupFrame));
133 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); 138 QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) );
134 QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); 139 Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame);
135 sb = addWidBool(i18n("Use standard backup dir"), 140 sb = addWidBool(i18n("Use standard backup dir"),
136 &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); 141 &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame);
137 bupLayout->addWidget((QWidget*)sb->checkBox()); 142 bupLayout->addWidget((QWidget*)sb->checkBox());
@@ -143,13 +148,13 @@ void KDEPIMConfigWidget::setupBackupTab()
143 148
144 mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); 149 mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir );
145 bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); 150 bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled );
146 QHBox *dummy = new QHBox(bupFrame); 151 Q3HBox *dummy = new Q3HBox(bupFrame);
147 new QLabel(i18n("Number of Backups:"),dummy); 152 new QLabel(i18n("Number of Backups:"),dummy);
148 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); 153 mBackupNumbersSpin = new QSpinBox(1,21,1,dummy);
149 new QLabel(i18n(" "),dummy); 154 new QLabel(i18n(" "),dummy);
150 bupLayout->addWidget( dummy ); 155 bupLayout->addWidget( dummy );
151 156
152 dummy = new QHBox(bupFrame); 157 dummy = new Q3HBox(bupFrame);
153 new QLabel(i18n("Make backup every "),dummy); 158 new QLabel(i18n("Make backup every "),dummy);
154 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); 159 mBackupDayCountSpin = new QSpinBox(1,28,1,dummy);
155 new QLabel(i18n(" days"),dummy); 160 new QLabel(i18n(" days"),dummy);
@@ -167,18 +172,18 @@ void KDEPIMConfigWidget::setupBackupTab()
167} 172}
168void KDEPIMConfigWidget::setupStoreTab() 173void KDEPIMConfigWidget::setupStoreTab()
169{ 174{
170 QVBox *colorPage = new QVBox( this ); 175 Q3VBox *colorPage = new Q3VBox( this );
171 tabWidget->addTab( colorPage, i18n( "Colors" ) ); 176 tabWidget->addTab( colorPage, i18n( "Colors" ) );
172 QWidget* cw = new QWidget( colorPage ); 177 QWidget* cw = new QWidget( colorPage );
173 KPrefsWidColor *holidayColor = 178 KPrefsWidColor *holidayColor =
174 addWidColor(i18n("Alternating background of list views"), 179 addWidColor(i18n("Alternating background of list views"),
175 &(KPimGlobalPrefs::instance()->mAlternateColor),cw); 180 &(KPimGlobalPrefs::instance()->mAlternateColor),cw);
176 QHBoxLayout *topLayout = new QHBoxLayout(cw); 181 Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw);
177 topLayout->addWidget(holidayColor->label()); 182 topLayout->addWidget(holidayColor->label());
178 topLayout->addWidget( (QWidget* )holidayColor->button()); 183 topLayout->addWidget( (QWidget* )holidayColor->button());
179 184
180 185
181 QVBox *storePage = new QVBox( this ); 186 Q3VBox *storePage = new Q3VBox( this );
182 if ( QApplication::desktop()->height() > 240 ) 187 if ( QApplication::desktop()->height() > 240 )
183 new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); 188 new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage );
184 new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); 189 new QLabel( i18n("<b>New data storage dir:</b>"), storePage );
@@ -200,7 +205,7 @@ void KDEPIMConfigWidget::setupStoreTab()
200 205
201#endif 206#endif
202 new QLabel( i18n("New dirs are created automatically"), storePage ); 207 new QLabel( i18n("New dirs are created automatically"), storePage );
203 QHBox *bb = new QHBox( storePage ); 208 Q3HBox *bb = new Q3HBox( storePage );
204 QPushButton * pb; 209 QPushButton * pb;
205 if ( QApplication::desktop()->width() < 640 ) 210 if ( QApplication::desktop()->width() < 640 )
206 pb = new QPushButton ( i18n("Save"), bb ); 211 pb = new QPushButton ( i18n("Save"), bb );
@@ -270,7 +275,7 @@ void KDEPIMConfigWidget::saveStoreSettings()
270void KDEPIMConfigWidget::setupExternalAppTab() 275void KDEPIMConfigWidget::setupExternalAppTab()
271{ 276{
272 QWidget *externalAppsPage = new QWidget( this ); 277 QWidget *externalAppsPage = new QWidget( this );
273 QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), 278 Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(),
274 KDialog::spacingHintSmall() ); 279 KDialog::spacingHintSmall() );
275 280
276 mExternalApps = new QComboBox( externalAppsPage ); 281 mExternalApps = new QComboBox( externalAppsPage );
@@ -285,8 +290,8 @@ void KDEPIMConfigWidget::setupExternalAppTab()
285 this, SLOT (externalapp_changed( int ) ) ); 290 this, SLOT (externalapp_changed( int ) ) );
286 291
287 292
288 mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); 293 mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage );
289 QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); 294 Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" );
290 mExternalAppGroupBox->layout()->setMargin(4); 295 mExternalAppGroupBox->layout()->setMargin(4);
291 296
292 mClient = new QComboBox( mExternalAppGroupBox ); 297 mClient = new QComboBox( mExternalAppGroupBox );
@@ -352,7 +357,7 @@ void KDEPIMConfigWidget::setupExternalAppTab()
352void KDEPIMConfigWidget::setupLocaleDateTab() 357void KDEPIMConfigWidget::setupLocaleDateTab()
353{ 358{
354 QWidget *topFrame = new QWidget( this ); 359 QWidget *topFrame = new QWidget( this );
355 QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); 360 Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2);
356 361
357 topLayout->setSpacing(KDialog::spacingHintSmall()); 362 topLayout->setSpacing(KDialog::spacingHintSmall());
358 topLayout->setMargin(KDialog::marginHintSmall()); 363 topLayout->setMargin(KDialog::marginHintSmall());
@@ -420,7 +425,7 @@ void KDEPIMConfigWidget::setupLocaleTab()
420{ 425{
421 426
422 QWidget *topFrame = new QWidget( this ); 427 QWidget *topFrame = new QWidget( this );
423 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 428 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
424 429
425 topLayout->setSpacing(KDialog::spacingHint()); 430 topLayout->setSpacing(KDialog::spacingHint());
426 topLayout->setMargin(KDialog::marginHint()); 431 topLayout->setMargin(KDialog::marginHint());
@@ -442,7 +447,7 @@ void KDEPIMConfigWidget::setupLocaleTab()
442 447
443 tabWidget->addTab( topFrame, i18n( "Language" ) ); 448 tabWidget->addTab( topFrame, i18n( "Language" ) );
444 topFrame = new QWidget( this ); 449 topFrame = new QWidget( this );
445 topLayout = new QGridLayout(topFrame,4,2); 450 topLayout = new Q3GridLayout(topFrame,4,2);
446 451
447 topLayout->setSpacing(KDialog::spacingHint()); 452 topLayout->setSpacing(KDialog::spacingHint());
448 topLayout->setMargin(KDialog::marginHint()); 453 topLayout->setMargin(KDialog::marginHint());
@@ -471,7 +476,7 @@ void KDEPIMConfigWidget::setupLocaleTab()
471void KDEPIMConfigWidget::setupTimeZoneTab() 476void KDEPIMConfigWidget::setupTimeZoneTab()
472{ 477{
473 QWidget *topFrame; 478 QWidget *topFrame;
474 QGridLayout *topLayout ; 479 Q3GridLayout *topLayout ;
475 480
476 481
477 482
@@ -479,11 +484,11 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
479 484
480 485
481 topFrame = new QWidget( this ); 486 topFrame = new QWidget( this );
482 topLayout = new QGridLayout( topFrame, 5, 2); 487 topLayout = new Q3GridLayout( topFrame, 5, 2);
483 topLayout->setSpacing(KDialog::spacingHintSmall()); 488 topLayout->setSpacing(KDialog::spacingHintSmall());
484 topLayout->setMargin(KDialog::marginHintSmall()); 489 topLayout->setMargin(KDialog::marginHintSmall());
485 490
486 QHBox *timeZoneBox = new QHBox( topFrame ); 491 Q3HBox *timeZoneBox = new Q3HBox( topFrame );
487 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); 492 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
488 493
489 new QLabel( i18n("Timezone:"), timeZoneBox ); 494 new QLabel( i18n("Timezone:"), timeZoneBox );
@@ -550,7 +555,7 @@ void KDEPIMConfigWidget::setupTimeZoneTab()
550 555
551 556
552 topFrame = new QWidget( this ); 557 topFrame = new QWidget( this );
553 topLayout = new QGridLayout( topFrame, 3, 2); 558 topLayout = new Q3GridLayout( topFrame, 3, 2);
554 topLayout->setSpacing(KDialog::spacingHintSmall()); 559 topLayout->setSpacing(KDialog::spacingHintSmall());
555 topLayout->setMargin(KDialog::marginHintSmall()); 560 topLayout->setMargin(KDialog::marginHintSmall());
556 tabWidget->addTab( topFrame, i18n( "Fonts" ) ); 561 tabWidget->addTab( topFrame, i18n( "Fonts" ) );
@@ -711,7 +716,7 @@ void KDEPIMConfigWidget::updateClientWidgets()
711 //update the entries in the client combobox 716 //update the entries in the client combobox
712 mClient->clear(); 717 mClient->clear();
713 718
714 QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); 719 Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp);
715 DefaultAppItem* dai; 720 DefaultAppItem* dai;
716 for ( dai=items.first(); dai != 0; dai=items.next() ) 721 for ( dai=items.first(); dai != 0; dai=items.next() )
717 { 722 {
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.h b/libkdepim/kcmconfigs/kdepimconfigwidget.h
index 824ef79..d693015 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.h
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.h
@@ -34,6 +34,8 @@ $Id$
34#include <kprefswidget.h> 34#include <kprefswidget.h>
35#include <kio/kfile/kurlrequester.h> 35#include <kio/kfile/kurlrequester.h>
36#include <qmap.h> 36#include <qmap.h>
37//Added by qt3to4:
38#include <QLabel>
37 39
38#include "externalapphandler.h" 40#include "externalapphandler.h"
39 41
@@ -41,7 +43,7 @@ $Id$
41class QComboBox; 43class QComboBox;
42class QLineEdit; 44class QLineEdit;
43class KPimGlobalPrefs; 45class KPimGlobalPrefs;
44class QGroupBox; 46class Q3GroupBox;
45class QTabWidget; 47class QTabWidget;
46class KDateEdit; 48class KDateEdit;
47 49
@@ -106,7 +108,7 @@ class KDEPIMConfigWidget : public KPrefsWidget
106// QCheckBox *mViewsSingleClickBox; 108// QCheckBox *mViewsSingleClickBox;
107// QPushButton *mConfigureButton; 109// QPushButton *mConfigureButton;
108 QComboBox* mExternalApps; 110 QComboBox* mExternalApps;
109 QGroupBox* mExternalAppGroupBox; 111 Q3GroupBox* mExternalAppGroupBox;
110 112
111 113
112 QComboBox* mClient; 114 QComboBox* mClient;
diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp
index bf38479..28c88d4 100644
--- a/libkdepim/kdateedit.cpp
+++ b/libkdepim/kdateedit.cpp
@@ -27,6 +27,9 @@
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qpixmap.h> 28#include <qpixmap.h>
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30//Added by qt3to4:
31#include <Q3Frame>
32#include <QKeyEvent>
30 33
31#include <kdatepicker.h> 34#include <kdatepicker.h>
32#include <kdebug.h> 35#include <kdebug.h>
@@ -36,12 +39,13 @@
36#include <kmessagebox.h> 39#include <kmessagebox.h>
37#include <knotifyclient.h> 40#include <knotifyclient.h>
38#include <qpalette.h> 41#include <qpalette.h>
42#include <QDesktopWidget>
39 43
40#include "kdateedit.h" 44#include "kdateedit.h"
41//#include "kdateedit.moc" 45//#include "kdateedit.moc"
42 46
43KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) 47KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
44 : QHBox(parent, name) 48 : Q3HBox(parent, name)
45{ 49{
46 dateFormShort = true; 50 dateFormShort = true;
47 withoutDp = withoutDP; 51 withoutDp = withoutDP;
@@ -72,9 +76,9 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
72 QPushButton* nowButton = new QPushButton(this); 76 QPushButton* nowButton = new QPushButton(this);
73 nowButton->setPixmap(pixmap2); 77 nowButton->setPixmap(pixmap2);
74 78
75 mDateFrame = new QVBox(0,0,WType_Popup); 79 mDateFrame = new Q3VBox(0,0,Qt::WType_Popup);
76 // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 80 // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
77 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 81 mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised );
78 mDateFrame->setLineWidth(3); 82 mDateFrame->setLineWidth(3);
79 mDateFrame->hide(); 83 mDateFrame->hide();
80 84
@@ -86,7 +90,7 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP )
86 connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide())); 90 connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide()));
87 connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); 91 connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker()));
88 connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); 92 connect(nowButton,SIGNAL(clicked()),SLOT(goToNow()));
89 mDateButton->setFocusPolicy( QWidget::NoFocus ); 93 mDateButton->setFocusPolicy( Qt::NoFocus );
90 mDateButton->setAutoDefault( false ); 94 mDateButton->setAutoDefault( false );
91 //mDateFrame->resize( 400, 300 ); 95 //mDateFrame->resize( 400, 300 );
92 96
@@ -225,10 +229,10 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
225 case 'd': 229 case 'd':
226 case 'a': 230 case 'a':
227 case 'A': 231 case 'A':
228 if(key == Key_Up) { 232 if(key == Qt::Key_Up) {
229 setDate( date.addDays( 1 ) ); 233 setDate( date.addDays( 1 ) );
230 } 234 }
231 else if(key == Key_Down) { 235 else if(key == Qt::Key_Down) {
232 setDate( date.addDays( -1 ) ); 236 setDate( date.addDays( -1 ) );
233 } 237 }
234 maxDay = readDate().day(); 238 maxDay = readDate().day();
@@ -236,12 +240,12 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
236 case 'm': 240 case 'm':
237 case 'b': 241 case 'b':
238 case 'B': 242 case 'B':
239 if(key == Key_Up) { 243 if(key == Qt::Key_Up) {
240 int year = ((date.month()+1)>12)?date.year()+1:date.year(); 244 int year = ((date.month()+1)>12)?date.year()+1:date.year();
241 int month = ((date.month()+1)>12)?1:date.month()+1; 245 int month = ((date.month()+1)>12)?1:date.month()+1;
242 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay; 246 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
243 setDate( QDate( year, month, day ) ); 247 setDate( QDate( year, month, day ) );
244 } else if(key == Key_Down) { 248 } else if(key == Qt::Key_Down) {
245 int year = ((date.month()-1)<1)?date.year()-1:date.year(); 249 int year = ((date.month()-1)<1)?date.year()-1:date.year();
246 int month = ((date.month()-1)<1)?12:date.month()-1; 250 int month = ((date.month()-1)<1)?12:date.month()-1;
247 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay; 251 int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay;
@@ -250,10 +254,10 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm
250 break; 254 break;
251 case 'y': 255 case 'y':
252 case 'Y': 256 case 'Y':
253 if(key == Key_Up) { 257 if(key == Qt::Key_Up) {
254 setDate( QDate( date.year() + 1, date.month() , date.day()) ); 258 setDate( QDate( date.year() + 1, date.month() , date.day()) );
255 } 259 }
256 else if(key == Key_Down) { 260 else if(key == Qt::Key_Down) {
257 setDate( QDate( date.year() - 1, date.month() , date.day()) ); 261 setDate( QDate( date.year() - 1, date.month() , date.day()) );
258 } 262 }
259 break; 263 break;
@@ -344,12 +348,12 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
344 348
345 switch(e->key()) 349 switch(e->key())
346 { 350 {
347 case Key_Escape: 351 case Qt::Key_Escape:
348 mDateEdit->deselect(); 352 mDateEdit->deselect();
349 case Key_Tab: 353 case Qt::Key_Tab:
350 QHBox::keyPressEvent(e); 354 Q3HBox::keyPressEvent(e);
351 break; 355 break;
352 case Key_Up: 356 case Qt::Key_Up:
353 // when date invalid then set to currend and return 357 // when date invalid then set to currend and return
354 if(!date.isValid()) { 358 if(!date.isValid()) {
355 date = QDate::currentDate(); 359 date = QDate::currentDate();
@@ -360,9 +364,9 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
360 KMessageBox::information( 0, text ); 364 KMessageBox::information( 0, text );
361 return; 365 return;
362 } 366 }
363 setDate(date, &cpos, Key_Up, dateFormShort); 367 setDate(date, &cpos, Qt::Key_Up, dateFormShort);
364 break; 368 break;
365 case Key_Down: 369 case Qt::Key_Down:
366 // when date invalid then set to current and return 370 // when date invalid then set to current and return
367 if(!date.isValid()) { 371 if(!date.isValid()) {
368 date = QDate::currentDate(); 372 date = QDate::currentDate();
@@ -373,10 +377,10 @@ void KDateEdit::keyPressEvent(QKeyEvent *e)
373 KMessageBox::information( 0, text ); 377 KMessageBox::information( 0, text );
374 return; 378 return;
375 } 379 }
376 setDate(date, &cpos, Key_Down, dateFormShort); 380 setDate(date, &cpos, Qt::Key_Down, dateFormShort);
377 break; 381 break;
378 default: 382 default:
379 QHBox::keyPressEvent(e); 383 Q3HBox::keyPressEvent(e);
380 break; 384 break;
381 } // switch 385 } // switch
382 mDateEdit->setCursorPosition(cpos); 386 mDateEdit->setCursorPosition(cpos);
diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h
index 2d8c452..38eacde 100644
--- a/libkdepim/kdateedit.h
+++ b/libkdepim/kdateedit.h
@@ -24,10 +24,13 @@
24#ifndef KDATEEDIT_H 24#ifndef KDATEEDIT_H
25#define KDATEEDIT_H 25#define KDATEEDIT_H
26 26
27#include <qhbox.h> 27#include <q3hbox.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29#include <qdatetime.h> 29#include <qdatetime.h>
30#include <qmap.h> 30#include <qmap.h>
31//Added by qt3to4:
32#include <QKeyEvent>
33#include <QEvent>
31 34
32class QLineEdit; 35class QLineEdit;
33class QPushButton; 36class QPushButton;
@@ -49,7 +52,7 @@ class KDateValidator;
49* @author Cornelius Schumacher <schumacher@kde.org> 52* @author Cornelius Schumacher <schumacher@kde.org>
50* @author Mike Pilone <mpilone@slac.com> 53* @author Mike Pilone <mpilone@slac.com>
51*/ 54*/
52class KDateEdit : public QHBox 55class KDateEdit : public Q3HBox
53{ 56{
54 Q_OBJECT 57 Q_OBJECT
55 public: 58 public:
@@ -128,7 +131,7 @@ class KDateEdit : public QHBox
128 QPushButton *mDateButton; 131 QPushButton *mDateButton;
129 QLineEdit *mDateEdit; 132 QLineEdit *mDateEdit;
130 KDatePicker *mDatePicker; 133 KDatePicker *mDatePicker;
131 QVBox *mDateFrame; 134 Q3VBox *mDateFrame;
132 int maxDay; 135 int maxDay;
133 bool withoutDp; 136 bool withoutDp;
134 137
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp
index 68ef943..28b65cf 100644
--- a/libkdepim/kdatepicker.cpp
+++ b/libkdepim/kdatepicker.cpp
@@ -23,7 +23,7 @@
23#include <kapplication.h> 23#include <kapplication.h>
24#include <klocale.h> 24#include <klocale.h>
25#include <kiconloader.h> 25#include <kiconloader.h>
26#include <qframe.h> 26#include <q3frame.h>
27#include <qpainter.h> 27#include <qpainter.h>
28#include <qdialog.h> 28#include <qdialog.h>
29#include <qtoolbutton.h> 29#include <qtoolbutton.h>
@@ -31,6 +31,10 @@
31#include <qapplication.h> 31#include <qapplication.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qvalidator.h> 33#include <qvalidator.h>
34//Added by qt3to4:
35#include <QResizeEvent>
36#include <QKeyEvent>
37#include <QDesktopWidget>
34#include <kdebug.h> 38#include <kdebug.h>
35#include <knotifyclient.h> 39#include <knotifyclient.h>
36#include <kglobalsettings.h> 40#include <kglobalsettings.h>
@@ -40,7 +44,7 @@
40 44
41 45
42KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) 46KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name)
43 : QFrame(parent,name), 47 : Q3Frame(parent,name),
44 yearForward(new QToolButton(this)), 48 yearForward(new QToolButton(this)),
45 yearBackward(new QToolButton(this)), 49 yearBackward(new QToolButton(this)),
46 monthForward(new QToolButton(this)), 50 monthForward(new QToolButton(this)),
diff --git a/libkdepim/kdatepicker.h b/libkdepim/kdatepicker.h
index 3db9a89..4d904da 100644
--- a/libkdepim/kdatepicker.h
+++ b/libkdepim/kdatepicker.h
@@ -20,8 +20,11 @@
20#ifndef MICROKDE_KDATEPICKER_H 20#ifndef MICROKDE_KDATEPICKER_H
21#define MICROKDE_KDATEPICKER_H 21#define MICROKDE_KDATEPICKER_H
22#include <qdatetime.h> 22#include <qdatetime.h>
23#include <qframe.h> 23#include <q3frame.h>
24#include <qevent.h> 24#include <qevent.h>
25//Added by qt3to4:
26#include <QResizeEvent>
27#include <QKeyEvent>
25 28
26class QLineEdit; 29class QLineEdit;
27class QToolButton; 30class QToolButton;
@@ -48,7 +51,7 @@ class KDateEdit;
48 * 51 *
49 * @short A date selection widget. 52 * @short A date selection widget.
50 **/ 53 **/
51class KDatePicker: public QFrame 54class KDatePicker: public Q3Frame
52{ 55{
53 Q_OBJECT 56 Q_OBJECT
54public: 57public:
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 9c28425..3677e87 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -38,7 +38,7 @@ $Id$
38#include <qregexp.h> 38#include <qregexp.h>
39#include <qfile.h> 39#include <qfile.h>
40#include <stdlib.h> 40#include <stdlib.h>
41#include <qtextstream.h> 41#include <q3textstream.h>
42#include <qapplication.h> 42#include <qapplication.h>
43#include "kpimglobalprefs.h" 43#include "kpimglobalprefs.h"
44 44
@@ -142,9 +142,9 @@ void KPimGlobalPrefs::setGlobalConfig()
142 else if ( mPreferredLanguage == 3 ) 142 else if ( mPreferredLanguage == 3 )
143 fileName = fileName+"italiantranslation.txt"; 143 fileName = fileName+"italiantranslation.txt";
144 QFile file( fileName ); 144 QFile file( fileName );
145 if (file.open( IO_ReadOnly ) ) { 145 if (file.open( QIODevice::ReadOnly ) ) {
146 QTextStream ts( &file ); 146 Q3TextStream ts( &file );
147 ts.setEncoding( QTextStream::Latin1 ); 147 ts.setEncoding( Q3TextStream::Latin1 );
148 //ts.setCodec( QTextCodec::latin1 ); 148 //ts.setCodec( QTextCodec::latin1 );
149 QString text = ts.read(); 149 QString text = ts.read();
150 file.close(); 150 file.close();
@@ -158,7 +158,7 @@ void KPimGlobalPrefs::setGlobalConfig()
158 line = text.mid( br, nbr - br ); 158 line = text.mid( br, nbr - br );
159 br = nbr+1; 159 br = nbr+1;
160 int se, ee, st, et; 160 int se, ee, st, et;
161 mLocaleDict = new QDict<QString>; 161 mLocaleDict = new Q3Dict<QString>;
162 mLocaleDict->setAutoDelete( true ); 162 mLocaleDict->setAutoDelete( true );
163 QString end = "{ \"\",\"\" }"; 163 QString end = "{ \"\",\"\" }";
164 while ( (line != end) && (br > 1) ) { 164 while ( (line != end) && (br > 1) ) {
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index 94ac8ae..01f5ab0 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -32,7 +32,7 @@ $Id$
32#define KPIMGLOBALPREFS_H 32#define KPIMGLOBALPREFS_H
33 33
34#include "kprefs.h" 34#include "kprefs.h"
35#include <qdict.h> 35#include <q3dict.h>
36 36
37class KPimGlobalPrefs : public KPrefs 37class KPimGlobalPrefs : public KPrefs
38{ 38{
@@ -85,7 +85,7 @@ class KPimGlobalPrefs : public KPrefs
85 KPimGlobalPrefs( const QString &name = QString::null ); 85 KPimGlobalPrefs( const QString &name = QString::null );
86 86
87 static KPimGlobalPrefs *sInstance; 87 static KPimGlobalPrefs *sInstance;
88 QDict<QString> *mLocaleDict; 88 Q3Dict<QString> *mLocaleDict;
89 89
90 90
91 public: 91 public:
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index 6dc741d..358acbd 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -25,23 +25,24 @@
25 25
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qgroupbox.h> 28#include <q3groupbox.h>
29#include <qbuttongroup.h> 29#include <q3buttongroup.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qfont.h> 31#include <qfont.h>
32#include <qslider.h> 32#include <qslider.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qframe.h> 39#include <q3frame.h>
40#include <qcombobox.h> 40#include <qcombobox.h>
41#include <qcheckbox.h> 41#include <qcheckbox.h>
42#include <qradiobutton.h> 42#include <qradiobutton.h>
43#include <qpushbutton.h> 43#include <qpushbutton.h>
44#include <qapplication.h> 44#include <qapplication.h>
45#include <QDesktopWidget>
45 46
46#include <kcolorbutton.h> 47#include <kcolorbutton.h>
47#include <kdebug.h> 48#include <kdebug.h>
@@ -128,7 +129,7 @@ KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString
128 mLabel = new QLabel(labelText, parent); 129 mLabel = new QLabel(labelText, parent);
129 130
130 mPreview = new QLabel(sampleText,parent); 131 mPreview = new QLabel(sampleText,parent);
131 mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); 132 mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
132 133
133 mButton = new QPushButton(i18n("Choose..."), parent); 134 mButton = new QPushButton(i18n("Choose..."), parent);
134 connect(mButton,SIGNAL(clicked()),SLOT(selectFont())); 135 connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
@@ -212,7 +213,7 @@ KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference,
212{ 213{
213 mReference = reference; 214 mReference = reference;
214 215
215 mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); 216 mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
216} 217}
217 218
218KPrefsDialogWidRadios::~KPrefsDialogWidRadios() 219KPrefsDialogWidRadios::~KPrefsDialogWidRadios()
@@ -224,7 +225,7 @@ void KPrefsDialogWidRadios::addRadio(const QString &text)
224 new QRadioButton(text,mBox); 225 new QRadioButton(text,mBox);
225} 226}
226 227
227QButtonGroup *KPrefsDialogWidRadios::groupBox() 228Q3ButtonGroup *KPrefsDialogWidRadios::groupBox()
228{ 229{
229 return mBox; 230 return mBox;
230} 231}
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 52ec809..cc95dd4 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -24,8 +24,10 @@
24#define _KPREFSDIALOG_H 24#define _KPREFSDIALOG_H
25// $Id$ 25// $Id$
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29//Added by qt3to4:
30#include <QLabel>
29 31
30#include <kdialogbase.h> 32#include <kdialogbase.h>
31 33
@@ -36,7 +38,7 @@ class KColorButton;
36class QCheckBox; 38class QCheckBox;
37class QLabel; 39class QLabel;
38class QSpinBox; 40class QSpinBox;
39class QButtonGroup; 41class Q3ButtonGroup;
40 42
41/** 43/**
42 @short Base class for widgets used by @ref KPrefsDialog. 44 @short Base class for widgets used by @ref KPrefsDialog.
@@ -258,7 +260,7 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
258 /** 260 /**
259 Return the box widget used by this widget. 261 Return the box widget used by this widget.
260 */ 262 */
261 QButtonGroup *groupBox(); 263 Q3ButtonGroup *groupBox();
262 264
263 void readConfig(); 265 void readConfig();
264 void writeConfig(); 266 void writeConfig();
@@ -266,7 +268,7 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
266 private: 268 private:
267 int *mReference; 269 int *mReference;
268 270
269 QButtonGroup *mBox; 271 Q3ButtonGroup *mBox;
270}; 272};
271 273
272 274
@@ -439,7 +441,7 @@ class KPrefsDialog : public KDialogBase
439 private: 441 private:
440 KPrefs *mPrefs; 442 KPrefs *mPrefs;
441 443
442 QPtrList<KPrefsDialogWid> mPrefsWids; 444 Q3PtrList<KPrefsDialogWid> mPrefsWids;
443}; 445};
444 446
445 447
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp
index f6a0b38..51431e2 100644
--- a/libkdepim/kprefswidget.cpp
+++ b/libkdepim/kprefswidget.cpp
@@ -25,23 +25,24 @@
25 25
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qgroupbox.h> 28#include <q3groupbox.h>
29#include <qbuttongroup.h> 29#include <q3buttongroup.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qfont.h> 31#include <qfont.h>
32#include <qslider.h> 32#include <qslider.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qframe.h> 39#include <q3frame.h>
40#include <qcombobox.h> 40#include <qcombobox.h>
41#include <qcheckbox.h> 41#include <qcheckbox.h>
42#include <qradiobutton.h> 42#include <qradiobutton.h>
43#include <qpushbutton.h> 43#include <qpushbutton.h>
44#include <qapplication.h> 44#include <qapplication.h>
45#include <QDesktopWidget>
45 46
46#include <kcolorbutton.h> 47#include <kcolorbutton.h>
47#include <kdebug.h> 48#include <kdebug.h>
@@ -131,7 +132,7 @@ KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
131 mLabel = new QLabel(labelText, parent); 132 mLabel = new QLabel(labelText, parent);
132 133
133 mPreview = new QLabel(sampleText,parent); 134 mPreview = new QLabel(sampleText,parent);
134 mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); 135 mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
135 136
136 mButton = new QPushButton(i18n("Choose..."), parent); 137 mButton = new QPushButton(i18n("Choose..."), parent);
137 connect(mButton,SIGNAL(clicked()),SLOT(selectFont())); 138 connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
@@ -218,7 +219,7 @@ KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference,
218{ 219{
219 mReference = reference; 220 mReference = reference;
220 221
221 mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); 222 mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
222 connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) ); 223 connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) );
223} 224}
224 225
@@ -231,7 +232,7 @@ void KPrefsWidRadios::addRadio(const QString &text)
231 new QRadioButton(text,mBox); 232 new QRadioButton(text,mBox);
232} 233}
233 234
234QButtonGroup *KPrefsWidRadios::groupBox() 235Q3ButtonGroup *KPrefsWidRadios::groupBox()
235{ 236{
236 return mBox; 237 return mBox;
237} 238}
diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h
index 8543a39..9de1be5 100644
--- a/libkdepim/kprefswidget.h
+++ b/libkdepim/kprefswidget.h
@@ -25,11 +25,13 @@
25#ifndef _KPREFSWIDGET_H 25#ifndef _KPREFSWIDGET_H
26#define _KPREFSWIDGET_H 26#define _KPREFSWIDGET_H
27 27
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29#include <qlineedit.h> 29#include <qlineedit.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31 31
32#include <qwidget.h> 32#include <qwidget.h>
33//Added by qt3to4:
34#include <QLabel>
33 35
34class KPrefs; 36class KPrefs;
35 37
@@ -37,7 +39,7 @@ class KColorButton;
37class QCheckBox; 39class QCheckBox;
38class QLabel; 40class QLabel;
39class QSpinBox; 41class QSpinBox;
40class QButtonGroup; 42class Q3ButtonGroup;
41 43
42/** 44/**
43 @short Base class for widgets used by @ref KPrefsDialog. 45 @short Base class for widgets used by @ref KPrefsDialog.
@@ -265,7 +267,7 @@ class KPrefsWidRadios : public KPrefsWid
265 /** 267 /**
266 Return the box widget used by this widget. 268 Return the box widget used by this widget.
267 */ 269 */
268 QButtonGroup *groupBox(); 270 Q3ButtonGroup *groupBox();
269 271
270 void readConfig(); 272 void readConfig();
271 void writeConfig(); 273 void writeConfig();
@@ -273,7 +275,7 @@ class KPrefsWidRadios : public KPrefsWid
273 private: 275 private:
274 int *mReference; 276 int *mReference;
275 277
276 QButtonGroup *mBox; 278 Q3ButtonGroup *mBox;
277}; 279};
278 280
279 281
@@ -449,7 +451,7 @@ class KPrefsWidget : public QWidget
449 private: 451 private:
450 KPrefs *mPrefs; 452 KPrefs *mPrefs;
451 453
452 QPtrList<KPrefsWid> mPrefsWids; 454 Q3PtrList<KPrefsWid> mPrefsWids;
453}; 455};
454 456
455#endif 457#endif
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 5708dfc..c844627 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -35,11 +35,11 @@
35#include <kmessagebox.h> 35#include <kmessagebox.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qprogressbar.h> 38#include <q3progressbar.h>
39#include <qpopupmenu.h> 39#include <q3popupmenu.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qbuttongroup.h> 42#include <q3buttongroup.h>
43#include <qtimer.h> 43#include <qtimer.h>
44#include <qmessagebox.h> 44#include <qmessagebox.h>
45#include <qapplication.h> 45#include <qapplication.h>
@@ -50,6 +50,9 @@
50#include <qlabel.h> 50#include <qlabel.h>
51#include <qcheckbox.h> 51#include <qcheckbox.h>
52#include <qapplication.h> 52#include <qapplication.h>
53#include <QDesktopWidget>
54//Added by qt3to4:
55#include <Q3VBoxLayout>
53 56
54#include <klocale.h> 57#include <klocale.h>
55#include <kglobal.h> 58#include <kglobal.h>
@@ -59,11 +62,11 @@
59QDateTime KSyncManager::mRequestedSyncEvent; 62QDateTime KSyncManager::mRequestedSyncEvent;
60 63
61 64
62KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) 65KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu)
63 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) 66 : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
64{ 67{
65 mServerSocket = 0; 68 mServerSocket = 0;
66 bar = new QProgressBar ( 1, 0 ); 69 bar = new Q3ProgressBar ( 1, 0 );
67 bar->setCaption (""); 70 bar->setCaption ("");
68 mWriteBackInPast = 2; 71 mWriteBackInPast = 2;
69 72
@@ -89,7 +92,7 @@ void KSyncManager::fillSyncMenu()
89 92
90 mSyncMenu->insertItem( i18n("Configure..."), 0 ); 93 mSyncMenu->insertItem( i18n("Configure..."), 0 );
91 mSyncMenu->insertSeparator(); 94 mSyncMenu->insertSeparator();
92 QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); 95 Q3PopupMenu *clearMenu = new Q3PopupMenu ( mSyncMenu );
93 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); 96 mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
94 clearMenu->insertItem( i18n("For all profiles"), 1 ); 97 clearMenu->insertItem( i18n("For all profiles"), 1 );
95 clearMenu->insertSeparator(); 98 clearMenu->insertSeparator();
@@ -355,7 +358,7 @@ void KSyncManager::enableQuick( bool ask )
355 if ( ask ) { 358 if ( ask ) {
356 QDialog dia ( 0, "input-dialog", true ); 359 QDialog dia ( 0, "input-dialog", true );
357 QLineEdit lab ( &dia ); 360 QLineEdit lab ( &dia );
358 QVBoxLayout lay( &dia ); 361 Q3VBoxLayout lay( &dia );
359 lab.setText( mPrefs->mPassiveSyncPort ); 362 lab.setText( mPrefs->mPassiveSyncPort );
360 lay.setMargin(7); 363 lay.setMargin(7);
361 lay.setSpacing(7); 364 lay.setSpacing(7);
@@ -804,7 +807,7 @@ bool KSyncManager::edit_pisync_options()
804{ 807{
805 QDialog dia( mParent, "dia", true ); 808 QDialog dia( mParent, "dia", true );
806 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); 809 dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice );
807 QVBoxLayout lay ( &dia ); 810 Q3VBoxLayout lay ( &dia );
808 lay.setSpacing( 5 ); 811 lay.setSpacing( 5 );
809 lay.setMargin( 3 ); 812 lay.setMargin( 3 );
810 QLabel lab1 ( i18n("Password for remote access:"), &dia); 813 QLabel lab1 ( i18n("Password for remote access:"), &dia);
@@ -838,8 +841,8 @@ bool KSyncManager::edit_sync_options()
838 841
839 QDialog dia( mParent, "dia", true ); 842 QDialog dia( mParent, "dia", true );
840 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice ); 843 dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice );
841 QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia); 844 Q3ButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia);
842 QVBoxLayout lay ( &dia ); 845 Q3VBoxLayout lay ( &dia );
843 lay.setSpacing( 2 ); 846 lay.setSpacing( 2 );
844 lay.setMargin( 3 ); 847 lay.setMargin( 3 );
845 lay.addWidget(&gr); 848 lay.addWidget(&gr);
@@ -891,7 +894,7 @@ QString KSyncManager::getPassword( )
891 QDialog dia ( mParent, "input-dialog", true ); 894 QDialog dia ( mParent, "input-dialog", true );
892 QLineEdit lab ( &dia ); 895 QLineEdit lab ( &dia );
893 lab.setEchoMode( QLineEdit::Password ); 896 lab.setEchoMode( QLineEdit::Password );
894 QVBoxLayout lay( &dia ); 897 Q3VBoxLayout lay( &dia );
895 lay.setMargin(7); 898 lay.setMargin(7);
896 lay.setSpacing(7); 899 lay.setSpacing(7);
897 lay.addWidget( &lab); 900 lay.addWidget( &lab);
@@ -1334,7 +1337,7 @@ void KSyncManager::readFileFromSocket()
1334 } 1337 }
1335} 1338}
1336 1339
1337KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) 1340KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : Q3ServerSocket( port, backlog, parent, name )
1338{ 1341{
1339 mPendingConnect = 0; 1342 mPendingConnect = 0;
1340 mPassWord = pw; 1343 mPassWord = pw;
@@ -1350,7 +1353,7 @@ void KServerSocket::waitForSocketFinish()
1350 QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish())); 1353 QTimer::singleShot( 250, this , SLOT ( waitForSocketFinish()));
1351 return; 1354 return;
1352 } 1355 }
1353 mSocket = new QSocket( this ); 1356 mSocket = new Q3Socket( this );
1354 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1357 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1355 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1358 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1356 mSocket->setSocket( mPendingConnect ); 1359 mSocket->setSocket( mPendingConnect );
@@ -1372,7 +1375,7 @@ void KServerSocket::newConnection ( int socket )
1372 mSocket = 0; 1375 mSocket = 0;
1373 } 1376 }
1374 mPendingConnect = 0; 1377 mPendingConnect = 0;
1375 mSocket = new QSocket( this ); 1378 mSocket = new Q3Socket( this );
1376 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1379 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1377 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1380 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1378 mSocket->setSocket( socket ); 1381 mSocket->setSocket( socket );
@@ -1462,11 +1465,11 @@ void KServerSocket::displayErrorMessage()
1462} 1465}
1463void KServerSocket::error_connect( QString errmess ) 1466void KServerSocket::error_connect( QString errmess )
1464{ 1467{
1465 QTextStream os( mSocket ); 1468 Q3TextStream os( mSocket );
1466 os.setEncoding( QTextStream::Latin1 ); 1469 os.setEncoding( Q3TextStream::Latin1 );
1467 os << errmess ; 1470 os << errmess ;
1468 mSocket->close(); 1471 mSocket->close();
1469 if ( mSocket->state() == QSocket::Idle ) { 1472 if ( mSocket->state() == Q3Socket::Idle ) {
1470 QTimer::singleShot( 0, this , SLOT ( discardClient())); 1473 QTimer::singleShot( 0, this , SLOT ( discardClient()));
1471 } 1474 }
1472} 1475}
@@ -1484,7 +1487,7 @@ void KServerSocket::send_file()
1484 mSyncActionDialog->setCaption(i18n("Received sync request")); 1487 mSyncActionDialog->setCaption(i18n("Received sync request"));
1485 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); 1488 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
1486 label->setAlignment ( Qt::AlignHCenter ); 1489 label->setAlignment ( Qt::AlignHCenter );
1487 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 1490 Q3VBoxLayout* lay = new Q3VBoxLayout( mSyncActionDialog );
1488 lay->addWidget( label); 1491 lay->addWidget( label);
1489 lay->setMargin(7); 1492 lay->setMargin(7);
1490 lay->setSpacing(7); 1493 lay->setSpacing(7);
@@ -1536,18 +1539,18 @@ void KServerSocket::send_file()
1536 qApp->processEvents(); 1539 qApp->processEvents();
1537 QString fileName = mFileName; 1540 QString fileName = mFileName;
1538 QFile file( fileName ); 1541 QFile file( fileName );
1539 if (!file.open( IO_ReadOnly ) ) { 1542 if (!file.open( QIODevice::ReadOnly ) ) {
1540 mErrorMessage = 0; 1543 mErrorMessage = 0;
1541 end_connect(); 1544 end_connect();
1542 error_connect("ERROR_FI\r\n\r\n"); 1545 error_connect("ERROR_FI\r\n\r\n");
1543 return ; 1546 return ;
1544 } 1547 }
1545 mSyncActionDialog->setCaption( i18n("Sending file...") ); 1548 mSyncActionDialog->setCaption( i18n("Sending file...") );
1546 QTextStream ts( &file ); 1549 Q3TextStream ts( &file );
1547 ts.setEncoding( QTextStream::Latin1 ); 1550 ts.setEncoding( Q3TextStream::Latin1 );
1548 1551
1549 QTextStream os( mSocket ); 1552 Q3TextStream os( mSocket );
1550 os.setEncoding( QTextStream::Latin1 ); 1553 os.setEncoding( Q3TextStream::Latin1 );
1551 while ( ! ts.atEnd() ) { 1554 while ( ! ts.atEnd() ) {
1552 os << ts.readLine() << "\r\n"; 1555 os << ts.readLine() << "\r\n";
1553 } 1556 }
@@ -1556,7 +1559,7 @@ void KServerSocket::send_file()
1556 file.close(); 1559 file.close();
1557 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") ); 1560 mSyncActionDialog->setCaption( i18n("Waiting for synced file...") );
1558 mSocket->close(); 1561 mSocket->close();
1559 if ( mSocket->state() == QSocket::Idle ) 1562 if ( mSocket->state() == Q3Socket::Idle )
1560 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1563 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1561} 1564}
1562void KServerSocket::get_file() 1565void KServerSocket::get_file()
@@ -1588,7 +1591,7 @@ void KServerSocket::readBackFileFromSocket()
1588 } 1591 }
1589 QString fileName = mFileName; 1592 QString fileName = mFileName;
1590 QFile file ( fileName ); 1593 QFile file ( fileName );
1591 if (!file.open( IO_WriteOnly ) ) { 1594 if (!file.open( QIODevice::WriteOnly ) ) {
1592 delete mSyncActionDialog; 1595 delete mSyncActionDialog;
1593 mSyncActionDialog = 0; 1596 mSyncActionDialog = 0;
1594 qDebug("KSS:Error open read back file "); 1597 qDebug("KSS:Error open read back file ");
@@ -1601,12 +1604,12 @@ void KServerSocket::readBackFileFromSocket()
1601 } 1604 }
1602 1605
1603 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1606 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1604 QTextStream ts ( &file ); 1607 Q3TextStream ts ( &file );
1605 ts.setEncoding( QTextStream::Latin1 ); 1608 ts.setEncoding( Q3TextStream::Latin1 );
1606 mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); 1609 mSyncActionDialog->setCaption( i18n("Writing file to disk...") );
1607 ts << piFileString; 1610 ts << piFileString;
1608 mSocket->close(); 1611 mSocket->close();
1609 if ( mSocket->state() == QSocket::Idle ) 1612 if ( mSocket->state() == Q3Socket::Idle )
1610 QTimer::singleShot( 10, this , SLOT ( discardClient())); 1613 QTimer::singleShot( 10, this , SLOT ( discardClient()));
1611 file.close(); 1614 file.close();
1612 piFileString = ""; 1615 piFileString = "";
@@ -1648,8 +1651,8 @@ void KCommandSocket::sendFileRequest()
1648 mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") ); 1651 mConnectProgress.setCaption( i18n("Pi-Sync: Connected!") );
1649 mConnectProgress.setLabelText( i18n("Waiting for remote file...") ); 1652 mConnectProgress.setLabelText( i18n("Waiting for remote file...") );
1650 mTimerSocket->start( 100, true ); 1653 mTimerSocket->start( 100, true );
1651 QTextStream os( mSocket ); 1654 Q3TextStream os( mSocket );
1652 os.setEncoding( QTextStream::Latin1 ); 1655 os.setEncoding( Q3TextStream::Latin1 );
1653 1656
1654 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); 1657 QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate );
1655 os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n"; 1658 os << "GET " << mPassWord << curDt << " " << mRemoteResource << "\r\n\r\n";
@@ -1658,7 +1661,7 @@ void KCommandSocket::sendFileRequest()
1658void KCommandSocket::readFile( QString fn ) 1661void KCommandSocket::readFile( QString fn )
1659{ 1662{
1660 if ( !mSocket ) { 1663 if ( !mSocket ) {
1661 mSocket = new QSocket( this ); 1664 mSocket = new Q3Socket( this );
1662 //qDebug("KCS: read file - new socket"); 1665 //qDebug("KCS: read file - new socket");
1663 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); 1666 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
1664 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1667 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
@@ -1696,7 +1699,7 @@ void KCommandSocket::updateConnectDialog()
1696void KCommandSocket::writeFile( QString fileName ) 1699void KCommandSocket::writeFile( QString fileName )
1697{ 1700{
1698 if ( !mSocket ) { 1701 if ( !mSocket ) {
1699 mSocket = new QSocket( this ); 1702 mSocket = new Q3Socket( this );
1700 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1703 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1701 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) ); 1704 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
1702 } 1705 }
@@ -1709,12 +1712,12 @@ void KCommandSocket::writeFileToSocket()
1709{ 1712{
1710 mTimerSocket->stop(); 1713 mTimerSocket->stop();
1711 QFile file2( mFileName ); 1714 QFile file2( mFileName );
1712 if (!file2.open( IO_ReadOnly ) ) { 1715 if (!file2.open( QIODevice::ReadOnly ) ) {
1713 mConnectProgress.hide(); 1716 mConnectProgress.hide();
1714 mConnectCount = -1; 1717 mConnectCount = -1;
1715 mRetVal= errorW; 1718 mRetVal= errorW;
1716 mSocket->close(); 1719 mSocket->close();
1717 if ( mSocket->state() == QSocket::Idle ) 1720 if ( mSocket->state() == Q3Socket::Idle )
1718 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1721 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1719 return ; 1722 return ;
1720 } 1723 }
@@ -1724,10 +1727,10 @@ void KCommandSocket::writeFileToSocket()
1724 mConnectProgress.setLabelText( i18n("Sending back synced file...") ); 1727 mConnectProgress.setLabelText( i18n("Sending back synced file...") );
1725 mConnectProgress.setProgress( count ); 1728 mConnectProgress.setProgress( count );
1726 mConnectProgress.blockSignals( true ); 1729 mConnectProgress.blockSignals( true );
1727 QTextStream ts2( &file2 ); 1730 Q3TextStream ts2( &file2 );
1728 ts2.setEncoding( QTextStream::Latin1 ); 1731 ts2.setEncoding( Q3TextStream::Latin1 );
1729 QTextStream os2( mSocket ); 1732 Q3TextStream os2( mSocket );
1730 os2.setEncoding( QTextStream::Latin1 ); 1733 os2.setEncoding( Q3TextStream::Latin1 );
1731 os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";; 1734 os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";;
1732 int byteCount = 0; 1735 int byteCount = 0;
1733 int byteMax = file2.size()/53; 1736 int byteMax = file2.size()/53;
@@ -1748,22 +1751,22 @@ void KCommandSocket::writeFileToSocket()
1748 os2 << "\r\n"; 1751 os2 << "\r\n";
1749 mRetVal= successW; 1752 mRetVal= successW;
1750 mSocket->close(); 1753 mSocket->close();
1751 if ( mSocket->state() == QSocket::Idle ) 1754 if ( mSocket->state() == Q3Socket::Idle )
1752 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1755 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1753 mConnectProgress.blockSignals( false ); 1756 mConnectProgress.blockSignals( false );
1754} 1757}
1755void KCommandSocket::sendStop() 1758void KCommandSocket::sendStop()
1756{ 1759{
1757 if ( !mSocket ) { 1760 if ( !mSocket ) {
1758 mSocket = new QSocket( this ); 1761 mSocket = new Q3Socket( this );
1759 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1762 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1760 } 1763 }
1761 mSocket->connectToHost( mHost, mPort ); 1764 mSocket->connectToHost( mHost, mPort );
1762 QTextStream os2( mSocket ); 1765 Q3TextStream os2( mSocket );
1763 os2.setEncoding( QTextStream::Latin1 ); 1766 os2.setEncoding( Q3TextStream::Latin1 );
1764 os2 << "STOP\r\n\r\n"; 1767 os2 << "STOP\r\n\r\n";
1765 mSocket->close(); 1768 mSocket->close();
1766 if ( mSocket->state() == QSocket::Idle ) 1769 if ( mSocket->state() == Q3Socket::Idle )
1767 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1770 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1768} 1771}
1769 1772
@@ -1829,7 +1832,7 @@ void KCommandSocket::readFileFromSocket()
1829 mConnectProgress.hide(); 1832 mConnectProgress.hide();
1830 QString fileName = mFileName; 1833 QString fileName = mFileName;
1831 QFile file ( fileName ); 1834 QFile file ( fileName );
1832 if (!file.open( IO_WriteOnly ) ) { 1835 if (!file.open( QIODevice::WriteOnly ) ) {
1833 mFileString = ""; 1836 mFileString = "";
1834 mRetVal = errorR; 1837 mRetVal = errorR;
1835 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() ); 1838 qDebug("KSS:Error open temp sync file for writing: %s",fileName.latin1() );
@@ -1838,8 +1841,8 @@ void KCommandSocket::readFileFromSocket()
1838 1841
1839 } 1842 }
1840 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); 1843 // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1841 QTextStream ts ( &file ); 1844 Q3TextStream ts ( &file );
1842 ts.setEncoding( QTextStream::Latin1 ); 1845 ts.setEncoding( Q3TextStream::Latin1 );
1843 ts << mFileString; 1846 ts << mFileString;
1844 file.close(); 1847 file.close();
1845 mFileString = ""; 1848 mFileString = "";
@@ -1847,7 +1850,7 @@ void KCommandSocket::readFileFromSocket()
1847 mSocket->close(); 1850 mSocket->close();
1848 // if state is not idle, deleteSocket(); is called via 1851 // if state is not idle, deleteSocket(); is called via
1849 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1852 // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1850 if ( mSocket->state() == QSocket::Idle ) 1853 if ( mSocket->state() == Q3Socket::Idle )
1851 deleteSocket(); 1854 deleteSocket();
1852} 1855}
1853 1856
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 71d17e9..32c6557 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -24,24 +24,26 @@
24 24
25#include <qobject.h> 25#include <qobject.h>
26#include <qstring.h> 26#include <qstring.h>
27#include <qsocket.h> 27#include <q3socket.h>
28#include <qdatetime.h> 28#include <qdatetime.h>
29#include <qserversocket.h> 29#include <q3serversocket.h>
30#include <qtextstream.h> 30#include <q3textstream.h>
31#include <qregexp.h> 31#include <qregexp.h>
32#include <qprogressdialog.h> 32#include <q3progressdialog.h>
33//Added by qt3to4:
34#include <Q3PopupMenu>
33#include <kdialog.h> 35#include <kdialog.h>
34 36
35class QPopupMenu; 37class Q3PopupMenu;
36class KSyncProfile; 38class KSyncProfile;
37class KPimPrefs; 39class KPimPrefs;
38class QWidget; 40class QWidget;
39class KSyncManager; 41class KSyncManager;
40class KSyncInterface; 42class KSyncInterface;
41class QProgressBar; 43class Q3ProgressBar;
42 44
43 45
44class KServerSocket : public QServerSocket 46class KServerSocket : public Q3ServerSocket
45{ 47{
46 Q_OBJECT 48 Q_OBJECT
47 49
@@ -74,7 +76,7 @@ class KServerSocket : public QServerSocket
74 void end_connect(); 76 void end_connect();
75 void error_connect( QString ); 77 void error_connect( QString );
76 QDialog* mSyncActionDialog; 78 QDialog* mSyncActionDialog;
77 QSocket* mSocket; 79 Q3Socket* mSocket;
78 QString mPassWord; 80 QString mPassWord;
79 QString mFileName; 81 QString mFileName;
80 QTime piTime; 82 QTime piTime;
@@ -108,7 +110,7 @@ class KCommandSocket : public QObject
108 int mConnectMax; 110 int mConnectMax;
109 KProgressDialog mConnectProgress; 111 KProgressDialog mConnectProgress;
110 QWidget* tlw; 112 QWidget* tlw;
111 QSocket* mSocket; 113 Q3Socket* mSocket;
112 QString mPassWord; 114 QString mPassWord;
113 Q_UINT16 mPort; 115 Q_UINT16 mPort;
114 QString mHost; 116 QString mHost;
@@ -132,7 +134,7 @@ class KSyncManager : public QObject
132 KAPI = 1, 134 KAPI = 1,
133 PWMPI = 2 }; 135 PWMPI = 2 };
134 136
135 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); 137 KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu);
136 ~KSyncManager() ; 138 ~KSyncManager() ;
137 139
138 void multiSync( bool askforPrefs ); 140 void multiSync( bool askforPrefs );
@@ -219,8 +221,8 @@ class KSyncManager : public QObject
219 QWidget* mParent; 221 QWidget* mParent;
220 KSyncInterface* mImplementation; 222 KSyncInterface* mImplementation;
221 TargetApp mTargetApp; 223 TargetApp mTargetApp;
222 QPopupMenu* mSyncMenu; 224 Q3PopupMenu* mSyncMenu;
223 QProgressBar* bar; 225 Q3ProgressBar* bar;
224 bool mSyncWithDesktop; 226 bool mSyncWithDesktop;
225 227
226private slots: 228private slots:
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2b87298..fd5bbca 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -23,28 +23,32 @@
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <q3groupbox.h>
27#include <qbuttongroup.h> 27#include <q3buttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qtextstream.h> 33#include <q3textstream.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <q3strlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44#include <qlayout.h> 44#include <qlayout.h>
45#include <qscrollview.h> 45#include <q3scrollview.h>
46#include <qvgroupbox.h> 46#include <q3vgroupbox.h>
47#include <qhgroupbox.h> 47#include <q3hgroupbox.h>
48//Added by qt3to4:
49#include <Q3HBoxLayout>
50#include <Q3GridLayout>
51#include <Q3Frame>
48 52
49#include <kcolorbutton.h> 53#include <kcolorbutton.h>
50#include <kdebug.h> 54#include <kdebug.h>
@@ -89,11 +93,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
89{ 93{
90 QLabel * lab; 94 QLabel * lab;
91 //QFrame *page = addPage(i18n("Sync Prefs"),0,0); 95 //QFrame *page = addPage(i18n("Sync Prefs"),0,0);
92 QVBox * mainbox = new QVBox( this ); 96 Q3VBox * mainbox = new Q3VBox( this );
93 QScrollView* sv = new QScrollView( mainbox ); 97 Q3ScrollView* sv = new Q3ScrollView( mainbox );
94 QHBoxLayout * lay = new QHBoxLayout( this ); 98 Q3HBoxLayout * lay = new Q3HBoxLayout( this );
95 lay->addWidget( mainbox ); 99 lay->addWidget( mainbox );
96 QHBox * b_box = new QHBox( mainbox ); 100 Q3HBox * b_box = new Q3HBox( mainbox );
97 101
98 QPushButton* button = new QPushButton( i18n("Ok"), b_box ); 102 QPushButton* button = new QPushButton( i18n("Ok"), b_box );
99 connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) ); 103 connect ( button, SIGNAL( clicked()), this, SLOT (slotOK() ) );
@@ -101,11 +105,11 @@ void KSyncPrefsDialog::setupSyncAlgTab()
101 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) ); 105 connect ( button, SIGNAL( clicked()), this, SLOT (reject() ) );
102 //QBoxLayout * sl = new QVBoxLayout(this ); 106 //QBoxLayout * sl = new QVBoxLayout(this );
103 //sl->addWidget ( sv ); 107 //sl->addWidget ( sv );
104 sv->setResizePolicy ( QScrollView::AutoOneFit ); 108 sv->setResizePolicy ( Q3ScrollView::AutoOneFit );
105 QFrame *topFrame = new QFrame ( sv ); 109 Q3Frame *topFrame = new Q3Frame ( sv );
106 sv->addChild( topFrame ); 110 sv->addChild( topFrame );
107 mSetupSyncAlgTab = topFrame; 111 mSetupSyncAlgTab = topFrame;
108 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 112 Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
109 topLayout->setSpacing(spacingHint()); 113 topLayout->setSpacing(spacingHint());
110 topLayout->setMargin(marginHint()); 114 topLayout->setMargin(marginHint());
111 115
@@ -120,7 +124,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
120 topLayout->addWidget(mMyMachineName,iii,1); 124 topLayout->addWidget(mMyMachineName,iii,1);
121 ++iii; 125 ++iii;
122 126
123 QHBox* buttonbox = new QHBox( topFrame); 127 Q3HBox* buttonbox = new Q3HBox( topFrame);
124 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); 128 topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1);
125 ++iii; 129 ++iii;
126 button = new QPushButton( i18n("New profile"), buttonbox ); 130 button = new QPushButton( i18n("New profile"), buttonbox );
@@ -145,7 +149,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
145 149
146 150
147 151
148 QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); 152 Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame);
149 new QLabel( i18n("Include in multiple "), iims ); 153 new QLabel( i18n("Include in multiple "), iims );
150 mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); 154 mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
151 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); 155 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
@@ -153,19 +157,19 @@ void KSyncPrefsDialog::setupSyncAlgTab()
153 new QLabel( i18n(" sync"), iims ); 157 new QLabel( i18n(" sync"), iims );
154 topLayout->addMultiCellWidget(iims, iii,iii,0,1); 158 topLayout->addMultiCellWidget(iims, iii,iii,0,1);
155 ++iii; 159 ++iii;
156 QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); 160 Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame);
157 topLayout->addMultiCellWidget(gb0, iii,iii,0,1); 161 topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
158 ++iii; 162 ++iii;
159 QButtonGroup* gr; 163 Q3ButtonGroup* gr;
160 { 164 {
161 QVGroupBox* topFrame = gb0; 165 Q3VGroupBox* topFrame = gb0;
162 166
163 167
164 168
165 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 169 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
166 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); 170 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
167 //++iii; 171 //++iii;
168 gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); 172 gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
169 //topLayout->addMultiCellWidget(gr, iii,iii,0,1); 173 //topLayout->addMultiCellWidget(gr, iii,iii,0,1);
170 //++iii; 174 //++iii;
171 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); 175 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
@@ -181,21 +185,21 @@ void KSyncPrefsDialog::setupSyncAlgTab()
181 //++iii; 185 //++iii;
182 186
183#if 0 187#if 0
184 QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame); 188 Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame);
185 { 189 {
186 QVBox * fibo2 = new QVBox ( gb51 ); 190 Q3VBox * fibo2 = new Q3VBox ( gb51 );
187 new QLabel ( i18n("Calendar resources:"), fibo2 ); 191 new QLabel ( i18n("Calendar resources:"), fibo2 );
188 //mFilterInCal = new QComboBox( fibo2 ); 192 //mFilterInCal = new QComboBox( fibo2 );
189 fibo2 = new QVBox ( gb51 ); 193 fibo2 = new Q3VBox ( gb51 );
190 new QLabel ( i18n("Addressbook resources:"), fibo2 ); 194 new QLabel ( i18n("Addressbook resources:"), fibo2 );
191 //mFilterInAB = new QComboBox( fibo2 ); 195 //mFilterInAB = new QComboBox( fibo2 );
192 } 196 }
193#endif 197#endif
194 QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame); 198 Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
195 QVBox * fibo2 = new QVBox ( gb5 ); 199 Q3VBox * fibo2 = new Q3VBox ( gb5 );
196 new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); 200 new QLabel ( i18n("Incoming calendar filter:"), fibo2 );
197 mFilterInCal = new QComboBox( fibo2 ); 201 mFilterInCal = new QComboBox( fibo2 );
198 fibo2 = new QVBox ( gb5 ); 202 fibo2 = new Q3VBox ( gb5 );
199 new QLabel ( i18n("Incoming addressbook filter:"), fibo2 ); 203 new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
200 mFilterInAB = new QComboBox( fibo2 ); 204 mFilterInAB = new QComboBox( fibo2 );
201 205
@@ -203,17 +207,17 @@ void KSyncPrefsDialog::setupSyncAlgTab()
203 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 207 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
204 // ++iii; 208 // ++iii;
205 209
206 QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); 210 Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame);
207 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); 211 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
208 //++iii; 212 //++iii;
209 { 213 {
210 QVGroupBox*topFrame = gb2; 214 Q3VGroupBox*topFrame = gb2;
211 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); 215 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
212 QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); 216 Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
213 QVBox * fibo = new QVBox ( gb4 ); 217 Q3VBox * fibo = new Q3VBox ( gb4 );
214 new QLabel ( i18n("Outgoing calendar filter:"), fibo ); 218 new QLabel ( i18n("Outgoing calendar filter:"), fibo );
215 mFilterOutCal = new QComboBox( fibo ); 219 mFilterOutCal = new QComboBox( fibo );
216 fibo = new QVBox ( gb4 ); 220 fibo = new Q3VBox ( gb4 );
217 new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); 221 new QLabel ( i18n("Outgoing addressbook filter:"), fibo );
218 mFilterOutAB = new QComboBox( fibo ); 222 mFilterOutAB = new QComboBox( fibo );
219 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 223 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
@@ -221,15 +225,15 @@ void KSyncPrefsDialog::setupSyncAlgTab()
221 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); 225 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
222 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 226 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
223 //++iii; 227 //++iii;
224 QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame); 228 Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame);
225 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); 229 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
226 230
227 new QLabel( i18n("From ") , gb3 ); 231 new QLabel( i18n("From ") , gb3 );
228 QHBox * tf1 = new QHBox ( gb3 ); 232 Q3HBox * tf1 = new Q3HBox ( gb3 );
229 mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 ); 233 mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 );
230 mWriteBackPastWeeks->setMaximumWidth( 100 ); 234 mWriteBackPastWeeks->setMaximumWidth( 100 );
231 new QLabel( i18n(" weeks in the past to ") ,tf1 ); 235 new QLabel( i18n(" weeks in the past to ") ,tf1 );
232 QHBox * tf2 = new QHBox ( gb3 ); 236 Q3HBox * tf2 = new Q3HBox ( gb3 );
233 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2); 237 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2);
234 mWriteBackFutureWeeks->setMaximumWidth( 100 ); 238 mWriteBackFutureWeeks->setMaximumWidth( 100 );
235 new QLabel( i18n(" weeks in the future ") , tf2 ); 239 new QLabel( i18n(" weeks in the future ") , tf2 );
@@ -241,7 +245,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
241 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); 245 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
242 246
243 } 247 }
244 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 248 proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
245 gr = proGr; 249 gr = proGr;
246 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 250 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
247 ++iii; 251 ++iii;
@@ -255,7 +259,7 @@ void KSyncPrefsDialog::setupSyncAlgTab()
255 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 259 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
256 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 260 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
257 261
258 QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame); 262 Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame);
259 topLayout->addMultiCellWidget(gb1, iii,iii,0,1); 263 topLayout->addMultiCellWidget(gb1, iii,iii,0,1);
260 ++iii; 264 ++iii;
261 265
@@ -263,48 +267,48 @@ void KSyncPrefsDialog::setupSyncAlgTab()
263 // Profile kind specific settings 267 // Profile kind specific settings
264 { 268 {
265 // *** phone ******************************* 269 // *** phone *******************************
266 QVGroupBox* topFrame = gb1; 270 Q3VGroupBox* topFrame = gb1;
267 phoneWidget = new QVBox( topFrame); 271 phoneWidget = new Q3VBox( topFrame);
268 //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 272 //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
269 //++iii; 273 //++iii;
270 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); 274 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
271 QHBox* temphb = new QHBox( phoneWidget ); 275 Q3HBox* temphb = new Q3HBox( phoneWidget );
272 new QLabel( i18n("I/O device: "), temphb ); 276 new QLabel( i18n("I/O device: "), temphb );
273 mPhoneDevice = new QLineEdit( temphb); 277 mPhoneDevice = new QLineEdit( temphb);
274 button = new QPushButton( i18n("Help..."), temphb ); 278 button = new QPushButton( i18n("Help..."), temphb );
275 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); 279 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
276 280
277 281
278 temphb = new QHBox( phoneWidget ); 282 temphb = new Q3HBox( phoneWidget );
279 new QLabel( i18n("Connection: "), temphb ); 283 new QLabel( i18n("Connection: "), temphb );
280 mPhoneConnection = new QLineEdit( temphb); 284 mPhoneConnection = new QLineEdit( temphb);
281 button = new QPushButton( i18n("Help..."), temphb ); 285 button = new QPushButton( i18n("Help..."), temphb );
282 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); 286 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
283 287
284 288
285 temphb = new QHBox( phoneWidget ); 289 temphb = new Q3HBox( phoneWidget );
286 new QLabel( i18n("Model(opt.): "), temphb ); 290 new QLabel( i18n("Model(opt.): "), temphb );
287 mPhoneModel = new QLineEdit( temphb); 291 mPhoneModel = new QLineEdit( temphb);
288 button = new QPushButton( i18n("Help..."), temphb ); 292 button = new QPushButton( i18n("Help..."), temphb );
289 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); 293 connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) );
290 294
291 // *** local******************************* 295 // *** local*******************************
292 localFileWidget = new QVBox( topFrame); 296 localFileWidget = new Q3VBox( topFrame);
293 //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); 297 //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1);
294 //++iii; 298 //++iii;
295 temphb = new QHBox( localFileWidget ); 299 temphb = new Q3HBox( localFileWidget );
296 300
297 lab = new QLabel( i18n("Local file Cal:"), temphb ); 301 lab = new QLabel( i18n("Local file Cal:"), temphb );
298 lab = new QLabel( i18n("Local file ABook:"), temphb ); 302 lab = new QLabel( i18n("Local file ABook:"), temphb );
299 lab = new QLabel( i18n("Local file PWMgr:"), temphb ); 303 lab = new QLabel( i18n("Local file PWMgr:"), temphb );
300 temphb = new QHBox( localFileWidget ); 304 temphb = new Q3HBox( localFileWidget );
301 button = new QPushButton( i18n("Choose..."), temphb ); 305 button = new QPushButton( i18n("Choose..."), temphb );
302 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); 306 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) );
303 button = new QPushButton( i18n("Choose..."), temphb ); 307 button = new QPushButton( i18n("Choose..."), temphb );
304 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); 308 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) );
305 button = new QPushButton( i18n("Choose..."), temphb ); 309 button = new QPushButton( i18n("Choose..."), temphb );
306 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); 310 connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) );
307 temphb = new QHBox( localFileWidget ); 311 temphb = new Q3HBox( localFileWidget );
308 312
309 mRemoteFile = new QLineEdit( temphb); 313 mRemoteFile = new QLineEdit( temphb);
310 mRemoteFileAB = new QLineEdit( temphb); 314 mRemoteFileAB = new QLineEdit( temphb);
@@ -313,34 +317,34 @@ void KSyncPrefsDialog::setupSyncAlgTab()
313 317
314 318
315 // *** remote******************************* 319 // *** remote*******************************
316 remoteFileWidget = new QVBox( topFrame); 320 remoteFileWidget = new Q3VBox( topFrame);
317 //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); 321 //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1);
318 //++iii; 322 //++iii;
319 temphb = new QHBox( remoteFileWidget ); 323 temphb = new Q3HBox( remoteFileWidget );
320 new QLabel( i18n("Calendar:"), temphb); 324 new QLabel( i18n("Calendar:"), temphb);
321 new QLabel( i18n("AddressBook:"), temphb); 325 new QLabel( i18n("AddressBook:"), temphb);
322 new QLabel( i18n("PWManager:"), temphb); 326 new QLabel( i18n("PWManager:"), temphb);
323 327
324 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); 328 lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget);
325 temphb = new QHBox( remoteFileWidget ); 329 temphb = new Q3HBox( remoteFileWidget );
326 mRemotePrecommand = new QLineEdit(temphb); 330 mRemotePrecommand = new QLineEdit(temphb);
327 mRemotePrecommandAB = new QLineEdit(temphb); 331 mRemotePrecommandAB = new QLineEdit(temphb);
328 mRemotePrecommandPWM = new QLineEdit(temphb); 332 mRemotePrecommandPWM = new QLineEdit(temphb);
329 333
330 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); 334 lab = new QLabel( i18n("Local temp file:"), remoteFileWidget);
331 temphb = new QHBox( remoteFileWidget ); 335 temphb = new Q3HBox( remoteFileWidget );
332 mLocalTempFile = new QLineEdit(temphb); 336 mLocalTempFile = new QLineEdit(temphb);
333 mLocalTempFileAB = new QLineEdit(temphb); 337 mLocalTempFileAB = new QLineEdit(temphb);
334 mLocalTempFilePWM = new QLineEdit(temphb); 338 mLocalTempFilePWM = new QLineEdit(temphb);
335 339
336 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); 340 lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget);
337 temphb = new QHBox( remoteFileWidget ); 341 temphb = new Q3HBox( remoteFileWidget );
338 mRemotePostcommand = new QLineEdit(temphb ); 342 mRemotePostcommand = new QLineEdit(temphb );
339 mRemotePostcommandAB = new QLineEdit(temphb ); 343 mRemotePostcommandAB = new QLineEdit(temphb );
340 mRemotePostcommandPWM = new QLineEdit(temphb ); 344 mRemotePostcommandPWM = new QLineEdit(temphb );
341 mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); 345 mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget );
342 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); 346 lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget);
343 temphb = new QHBox( remoteFileWidget ); 347 temphb = new Q3HBox( remoteFileWidget );
344 button = new QPushButton( i18n("ssh/scp"), temphb ); 348 button = new QPushButton( i18n("ssh/scp"), temphb );
345 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); 349 connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) );
346 button = new QPushButton( i18n("ftp"), temphb ); 350 button = new QPushButton( i18n("ftp"), temphb );
@@ -348,37 +352,37 @@ void KSyncPrefsDialog::setupSyncAlgTab()
348 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); 352 lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget);
349 353
350 // *** pi-sync******************************* 354 // *** pi-sync*******************************
351 piWidget = new QVBox( topFrame); 355 piWidget = new Q3VBox( topFrame);
352 //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); 356 //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1);
353 //++iii; 357 //++iii;
354 temphb = new QHBox( piWidget ); 358 temphb = new Q3HBox( piWidget );
355 new QLabel( i18n("Calendar:"), temphb); 359 new QLabel( i18n("Calendar:"), temphb);
356 new QLabel( i18n("AddressBook:"), temphb); 360 new QLabel( i18n("AddressBook:"), temphb);
357 new QLabel( i18n("PWManager:"), temphb); 361 new QLabel( i18n("PWManager:"), temphb);
358 362
359 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); 363 lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget);
360 temphb = new QHBox( piWidget ); 364 temphb = new Q3HBox( piWidget );
361 mRemotePw = new QLineEdit(temphb); 365 mRemotePw = new QLineEdit(temphb);
362 mRemotePwAB = new QLineEdit(temphb); 366 mRemotePwAB = new QLineEdit(temphb);
363 mRemotePwPWM = new QLineEdit(temphb); 367 mRemotePwPWM = new QLineEdit(temphb);
364 368
365 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); 369 lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget);
366 temphb = new QHBox( piWidget ); 370 temphb = new Q3HBox( piWidget );
367 mRemoteIP = new QLineEdit(temphb); 371 mRemoteIP = new QLineEdit(temphb);
368 mRemoteIPAB = new QLineEdit(temphb); 372 mRemoteIPAB = new QLineEdit(temphb);
369 mRemoteIPPWM = new QLineEdit(temphb); 373 mRemoteIPPWM = new QLineEdit(temphb);
370 374
371 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); 375 lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget);
372 temphb = new QHBox( piWidget ); 376 temphb = new Q3HBox( piWidget );
373 mRemotePort = new QLineEdit(temphb); 377 mRemotePort = new QLineEdit(temphb);
374 mRemotePortAB = new QLineEdit(temphb); 378 mRemotePortAB = new QLineEdit(temphb);
375 mRemotePortPWM = new QLineEdit(temphb); 379 mRemotePortPWM = new QLineEdit(temphb);
376 380
377 lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); 381 lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget);
378 mTableBox = new QHBox( piWidget ); 382 mTableBox = new Q3HBox( piWidget );
379 mResTableKopi = new QTable( 1, 1, mTableBox ); 383 mResTableKopi = new Q3Table( 1, 1, mTableBox );
380 mResTableKapi = new QTable( 1, 1, mTableBox ); 384 mResTableKapi = new Q3Table( 1, 1, mTableBox );
381 mResTablePwmpi = new QTable( 1, 1, mTableBox ); 385 mResTablePwmpi = new Q3Table( 1, 1, mTableBox );
382 mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") ); 386 mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") );
383 mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") ); 387 mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") );
384 mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") ); 388 mResTablePwmpi->horizontalHeader()->setLabel( 0, i18n("Remote") );
@@ -468,7 +472,7 @@ void KSyncPrefsDialog::slotOK()
468 } 472 }
469 int i; 473 int i;
470 for (i = 0; i < mSyncProfileNames.count(); ++ i) { 474 for (i = 0; i < mSyncProfileNames.count(); ++ i) {
471 if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { 475 if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) {
472 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); 476 KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error"));
473 return; 477 return;
474 } 478 }
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h
index d8c02de..1d7503e 100644
--- a/libkdepim/ksyncprefsdialog.h
+++ b/libkdepim/ksyncprefsdialog.h
@@ -25,9 +25,9 @@
25 25
26 26
27#include <kdialogbase.h> 27#include <kdialogbase.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29#include <qtable.h> 29#include <q3table.h>
30#include <qhbox.h> 30#include <q3hbox.h>
31 31
32//#include <libkdepim/kprefsdialog.h> 32//#include <libkdepim/kprefsdialog.h>
33 33
@@ -38,9 +38,9 @@ class QCheckBox;
38class QSlider; 38class QSlider;
39class KURLRequester; 39class KURLRequester;
40class QComboBox; 40class QComboBox;
41class QButtonGroup; 41class Q3ButtonGroup;
42class QLineEdit; 42class QLineEdit;
43class QVBox; 43class Q3VBox;
44class QStringList; 44class QStringList;
45class KSyncProfile; 45class KSyncProfile;
46 46
@@ -86,7 +86,7 @@ class KSyncPrefsDialog : public KDialog
86 private: 86 private:
87 void updateMyCaption(); 87 void updateMyCaption();
88 int currentSelection; 88 int currentSelection;
89 QPtrList<KSyncProfile> mSyncProfiles; 89 Q3PtrList<KSyncProfile> mSyncProfiles;
90 QStringList mSyncProfileNames; 90 QStringList mSyncProfileNames;
91 QStringList mFilterKapi; 91 QStringList mFilterKapi;
92 QStringList mFilterKopi; 92 QStringList mFilterKopi;
@@ -105,11 +105,11 @@ class KSyncPrefsDialog : public KDialog
105 void addProfile ( KSyncProfile* ); 105 void addProfile ( KSyncProfile* );
106 void insertProfiles(); 106 void insertProfiles();
107 void saveProfile(); 107 void saveProfile();
108 QButtonGroup* proGr; 108 Q3ButtonGroup* proGr;
109 QHBox * mTableBox; 109 Q3HBox * mTableBox;
110 QTable* mResTableKopi; 110 Q3Table* mResTableKopi;
111 QTable* mResTableKapi; 111 Q3Table* mResTableKapi;
112 QTable* mResTablePwmpi; 112 Q3Table* mResTablePwmpi;
113 113
114 QComboBox * mFilterOutCal; 114 QComboBox * mFilterOutCal;
115 QComboBox * mFilterInCal; 115 QComboBox * mFilterInCal;
@@ -152,10 +152,10 @@ class KSyncPrefsDialog : public KDialog
152 QLineEdit * mPhoneModel; 152 QLineEdit * mPhoneModel;
153 153
154 QWidget* mSetupSyncAlgTab; 154 QWidget* mSetupSyncAlgTab;
155 QVBox* localFileWidget; 155 Q3VBox* localFileWidget;
156 QVBox* remoteFileWidget; 156 Q3VBox* remoteFileWidget;
157 QVBox* phoneWidget; 157 Q3VBox* phoneWidget;
158 QVBox* piWidget; 158 Q3VBox* piWidget;
159 QCheckBox* mWriteBackFile; 159 QCheckBox* mWriteBackFile;
160 QCheckBox* mWriteBackFuture; 160 QCheckBox* mWriteBackFuture;
161 QSpinBox* mWriteBackFutureWeeks; 161 QSpinBox* mWriteBackFutureWeeks;
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h
index 91fcfc5..1e41662 100644
--- a/libkdepim/ksyncprofile.h
+++ b/libkdepim/ksyncprofile.h
@@ -20,7 +20,7 @@
20#ifndef _KSYNCPROFILE_H 20#ifndef _KSYNCPROFILE_H
21#define _KSYNCPROFILE_H 21#define _KSYNCPROFILE_H
22 22
23#include <qptrlist.h> 23#include <q3ptrlist.h>
24#include <qcolor.h> 24#include <qcolor.h>
25#include <qfont.h> 25#include <qfont.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 7160d0e..fb27311 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -1,7 +1,7 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG = qt warn_on 2 CONFIG = qt warn_on
3DEFINES +=KORG_NOKABC 3DEFINES +=KORG_NOKABC
4TARGET = microkdepim 4TARGET = xmicrokdepim
5INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . .. 5INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . ..
6DESTDIR=../bin 6DESTDIR=../bin
7 7
@@ -74,3 +74,5 @@ SOURCES += ol_access.cpp
74#olimport section end 74#olimport section end
75} 75}
76} 76}
77#The following line was inserted by qt3to4
78QT += xml qt3support
diff --git a/libkdepim/libkdepimE.pro b/libkdepim/libkdepimE.pro
index f3db68e..4b42184 100644
--- a/libkdepim/libkdepimE.pro
+++ b/libkdepim/libkdepimE.pro
@@ -1,9 +1,9 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2 CONFIG += qt warn_on 2 CONFIG += qt warn_on
3TARGET = microkdepim 3TARGET = xmicrokdepim
4INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include 4INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include
5LIBS += -lmicrokde 5LIBS += -lxmicrokde
6#LIBS += -lmicrokcal 6#LIBS += -lxmicrokcal
7LIBS += -L$(QPEDIR)/lib 7LIBS += -L$(QPEDIR)/lib
8OBJECTS_DIR = obj/$(PLATFORM) 8OBJECTS_DIR = obj/$(PLATFORM)
9MOC_DIR = moc/$(PLATFORM) 9MOC_DIR = moc/$(PLATFORM)
diff --git a/libkdepim/ol_access.cpp b/libkdepim/ol_access.cpp
index 1b05693..821f148 100755
--- a/libkdepim/ol_access.cpp
+++ b/libkdepim/ol_access.cpp
@@ -22,21 +22,21 @@
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qprogressbar.h> 28#include <q3progressbar.h>
29#include <qprogressdialog.h> 29#include <q3progressdialog.h>
30#include <qwidgetstack.h> 30#include <q3widgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qdir.h> 32#include <qdir.h>
33#include <qpushbutton.h> 33#include <qpushbutton.h>
34#include <qregexp.h> 34#include <qregexp.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qheader.h> 37#include <q3header.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qlistview.h> 39#include <q3listview.h>
40 40
41#include <kdebug.h> 41#include <kdebug.h>
42#include <klocale.h> 42#include <klocale.h>
@@ -54,13 +54,13 @@
54#include <comutil.h> 54#include <comutil.h>
55 55
56 56
57class OLEListViewItem : public QCheckListItem 57class OLEListViewItem : public Q3CheckListItem
58{ 58{
59public: 59public:
60 OLEListViewItem( QListView *parent, QString text ) : 60 OLEListViewItem( Q3ListView *parent, QString text ) :
61 QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; 61 Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
62 OLEListViewItem( QListViewItem *after, QString text ) : 62 OLEListViewItem( Q3ListViewItem *after, QString text ) :
63 QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; 63 Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
64 ~OLEListViewItem() {}; 64 ~OLEListViewItem() {};
65 void setData( DWORD data ) {mData= data; }; 65 void setData( DWORD data ) {mData= data; };
66 void setDataID( QString data ){ mDataID = data ;} 66 void setDataID( QString data ){ mDataID = data ;}
@@ -78,15 +78,15 @@ class OLEFolderSelect : public KDialogBase
78 KDialogBase( Plain, "", Ok | Cancel, Ok, 78 KDialogBase( Plain, "", Ok | Cancel, Ok,
79 0, "", true, false, i18n("Import!") ) 79 0, "", true, false, i18n("Import!") )
80 { 80 {
81 QHBox * mw = new QHBox( this ); 81 Q3HBox * mw = new Q3HBox( this );
82 setMainWidget( mw ); 82 setMainWidget( mw );
83 mListView = new QListView( mw ); 83 mListView = new Q3ListView( mw );
84 mListView->addColumn(i18n("Select Folder")); 84 mListView->addColumn(i18n("Select Folder"));
85 mListView->addColumn(i18n("Content Type")); 85 mListView->addColumn(i18n("Content Type"));
86 } 86 }
87 QListView* listView() { return mListView;} 87 Q3ListView* listView() { return mListView;}
88private: 88private:
89 QListView* mListView; 89 Q3ListView* mListView;
90}; 90};
91 91
92OL_access *OL_access::sInstance = 0; 92OL_access *OL_access::sInstance = 0;
@@ -149,7 +149,7 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
149 if ( syncMode ) { 149 if ( syncMode ) {
150 cap = i18n("Reading contact data..."); 150 cap = i18n("Reading contact data...");
151 } 151 }
152 QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 ); 152 Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 );
153 bar.setCaption (i18n("Accessing OL") ); 153 bar.setCaption (i18n("Accessing OL") );
154 int h = bar.sizeHint().height() ; 154 int h = bar.sizeHint().height() ;
155 int w = 300; 155 int w = 300;
@@ -173,7 +173,7 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li
173QStringList OL_access::getFolderSelection( int type , QString caption ) 173QStringList OL_access::getFolderSelection( int type , QString caption )
174{ 174{
175 OLEFolderSelect folder_dialog; 175 OLEFolderSelect folder_dialog;
176 QListView * listView = folder_dialog.listView(); 176 Q3ListView * listView = folder_dialog.listView();
177 MAPIFolder mfInbox; 177 MAPIFolder mfInbox;
178 MAPIFolder mfRoot; 178 MAPIFolder mfRoot;
179 CString szName; 179 CString szName;
@@ -1135,13 +1135,13 @@ DATE Qdt2date( QDateTime dt )
1135 return ddd; 1135 return ddd;
1136} 1136}
1137 1137
1138class OLEListViewItem : public QCheckListItem 1138class OLEListViewItem : public Q3CheckListItem
1139{ 1139{
1140 public: 1140 public:
1141 OLEListViewItem( QListView *parent, QString text ) : 1141 OLEListViewItem( Q3ListView *parent, QString text ) :
1142 QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; 1142 Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; };
1143 OLEListViewItem( QListViewItem *after, QString text ) : 1143 OLEListViewItem( Q3ListViewItem *after, QString text ) :
1144 QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; 1144 Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; };
1145 ~OLEListViewItem() {}; 1145 ~OLEListViewItem() {};
1146 void setData( DWORD data ) {mData= data; }; 1146 void setData( DWORD data ) {mData= data; };
1147 void setDataID( QString data ){ mDataID = data ;} 1147 void setDataID( QString data ){ mDataID = data ;}
@@ -1159,9 +1159,9 @@ KAImportOLdialog::KAImportOLdialog( const QString &caption,
1159 parent, caption, true, false, i18n("Import!") ) 1159 parent, caption, true, false, i18n("Import!") )
1160{ 1160{
1161 mSyncMode = false; 1161 mSyncMode = false;
1162 QHBox * mw = new QHBox( this ); 1162 Q3HBox * mw = new Q3HBox( this );
1163 setMainWidget( mw ); 1163 setMainWidget( mw );
1164 mListView = new QListView( mw ); 1164 mListView = new Q3ListView( mw );
1165 mListView->addColumn(i18n("Select Folder")); 1165 mListView->addColumn(i18n("Select Folder"));
1166 mListView->addColumn(i18n("Content Type")); 1166 mListView->addColumn(i18n("Content Type"));
1167 mABook = aBook; 1167 mABook = aBook;
@@ -1303,7 +1303,7 @@ void KAImportOLdialog::readContactData( DWORD folder )
1303 if ( mSyncMode ) { 1303 if ( mSyncMode ) {
1304 cap = i18n("Reading contact data..."); 1304 cap = i18n("Reading contact data...");
1305 } 1305 }
1306 QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this); 1306 Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this);
1307 bar.setCaption (i18n("Accessing OL") ); 1307 bar.setCaption (i18n("Accessing OL") );
1308 int h = bar.sizeHint().height() ; 1308 int h = bar.sizeHint().height() ;
1309 int w = 300; 1309 int w = 300;
diff --git a/libkdepim/ol_access.h b/libkdepim/ol_access.h
index 85dbc6c..3422f65 100755
--- a/libkdepim/ol_access.h
+++ b/libkdepim/ol_access.h
@@ -37,7 +37,7 @@
37#define OL_CALENDAR_DATA 1 //pending is this the right number 37#define OL_CALENDAR_DATA 1 //pending is this the right number
38 38
39class QDateTime; 39class QDateTime;
40class QListView; 40class Q3ListView;
41class OLEListViewItem; 41class OLEListViewItem;
42class _ContactItem; 42class _ContactItem;
43class OL_access : public QObject 43class OL_access : public QObject
@@ -132,7 +132,7 @@ class KAImportOLdialog : public KDialogBase
132 void readContactData( DWORD folder ); 132 void readContactData( DWORD folder );
133 133
134 KABC::AddressBook * mABook; 134 KABC::AddressBook * mABook;
135 QListView * mListView; 135 Q3ListView * mListView;
136 KABC::Addressee::List mAList; 136 KABC::Addressee::List mAList;
137 bool addAddressee( KABC::Addressee a ); 137 bool addAddressee( KABC::Addressee a );
138 private: 138 private:
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index 89db22b..0ea73f5 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -22,11 +22,12 @@
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qapplication.h> 24#include <qapplication.h>
25#include <qptrlist.h> 25#include <QDesktopWidget>
26#include <q3ptrlist.h>
26#include <qregexp.h> 27#include <qregexp.h>
27#include <qfile.h> 28#include <qfile.h>
28#include <qlabel.h> 29#include <qlabel.h>
29#include <qtextstream.h> 30#include <q3textstream.h>
30#include <qtextcodec.h> 31#include <qtextcodec.h>
31#include <qdir.h> 32#include <qdir.h>
32#include <kmessagebox.h> 33#include <kmessagebox.h>
@@ -46,12 +47,14 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
46 bool addPort = true, addConnection = true, addModel = true; 47 bool addPort = true, addConnection = true, addModel = true;
47 QFile file( fileName ); 48 QFile file( fileName );
48 if ( QFile::exists( fileName) ) { 49 if ( QFile::exists( fileName) ) {
49 if (!file.open( IO_ReadOnly ) ) { 50 if (!file.open( QIODevice::ReadOnly ) ) {
50 qDebug("Error: cannot open %s ", fileName.latin1() ); 51 qDebug("Error: cannot open %s ", fileName.latin1() );
51 return; 52 return;
52 } 53 }
53 QString line; 54 QString line;
54 while ( file.readLine( line, 1024 ) > 0 ) { 55 char tmp[1024];
56 while ( file.readLine( tmp, 1024 ) > 0 ) {
57 line = tmp;
55 //qDebug("*%s* ", line.latin1() ); 58 //qDebug("*%s* ", line.latin1() );
56 if ( line.left(7 ) == "[gammu]" ) { 59 if ( line.left(7 ) == "[gammu]" ) {
57 ; 60 ;
@@ -115,12 +118,12 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
115 content += "\n"; 118 content += "\n";
116 } 119 }
117 if ( write ) { 120 if ( write ) {
118 if (!file.open( IO_WriteOnly ) ) { 121 if (!file.open( QIODevice::WriteOnly ) ) {
119 qDebug("Error: cannot write file %s ", fileName.latin1() ); 122 qDebug("Error: cannot write file %s ", fileName.latin1() );
120 return; 123 return;
121 } 124 }
122 qDebug("Writing file %s ", fileName.latin1() ); 125 qDebug("Writing file %s ", fileName.latin1() );
123 QTextStream ts( &file ); 126 Q3TextStream ts( &file );
124 ts << content ; 127 ts << content ;
125 file.close(); 128 file.close();
126 } 129 }
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 72c4e60..4172cd0 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -38,21 +38,30 @@
38#include "qdrawutil.h" 38#include "qdrawutil.h"
39#include "qbitmap.h" 39#include "qbitmap.h"
40#if QT_VERSION >= 0x030000 40#if QT_VERSION >= 0x030000
41#include "qptrlist.h" 41#include "q3ptrlist.h"
42#include "qmemarray.h" 42#include "q3memarray.h"
43#else 43#else
44#include <qlist.h> 44#include <qlist.h>
45#include <qarray.h> 45#include <qarray.h>
46#define QPtrList QList 46#define Q3PtrList QList
47#define QMemArray QArray 47#define Q3MemArray QArray
48#endif 48#endif
49#include "qlayoutengine_p.h" 49#include "qlayoutengine_p.h"
50#include "qobjectlist.h" 50#include "qobject.h"
51#include "qstyle.h" 51#include "qstyle.h"
52#include "qapplication.h" //sendPostedEvents 52#include "qapplication.h" //sendPostedEvents
53#include <qvaluelist.h> 53#include <q3valuelist.h>
54#include <qcursor.h> 54#include <qcursor.h>
55#include <qframe.h> 55#include <q3frame.h>
56#include <QDesktopWidget>
57//Added by qt3to4:
58#include <Q3PointArray>
59#include <QPixmap>
60#include <QResizeEvent>
61#include <QMouseEvent>
62#include <QChildEvent>
63#include <QEvent>
64#include <QPaintEvent>
56#ifndef KDGANTT_MASTER_CVS 65#ifndef KDGANTT_MASTER_CVS
57//#include "KDGanttMinimizeSplitter.moc" 66//#include "KDGanttMinimizeSplitter.moc"
58#endif 67#endif
@@ -65,10 +74,10 @@
65static int mouseOffset; 74static int mouseOffset;
66static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky 75static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky
67 76
68class KDRubberBand: public QFrame 77class KDRubberBand: public Q3Frame
69{ 78{
70public: 79public:
71 KDRubberBand( QWidget *parent, const char * name, WFlags f ) :QFrame ( parent, name, f ) {;} 80 KDRubberBand( QWidget *parent, const char * name, Qt::WFlags f ) :Q3Frame ( parent, name, f ) {;}
72 81
73protected: 82protected:
74 virtual void mousePressEvent ( QMouseEvent * ) 83 virtual void mousePressEvent ( QMouseEvent * )
@@ -80,9 +89,10 @@ protected:
80 89
81KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o, 90KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o,
82 KDGanttMinimizeSplitter *parent, const char * name ) 91 KDGanttMinimizeSplitter *parent, const char * name )
83 : QWidget( parent, name ), _activeButton( 0 ), _collapsed( false ) 92 : _activeButton( 0 ), _collapsed( false )
84{ 93{
85 94 setObjectName(name);
95 setParent(parent);
86 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) { 96 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) {
87 mSizeHint = QSize(7,7); 97 mSizeHint = QSize(7,7);
88 mUseOffset = true; 98 mUseOffset = true;
@@ -106,10 +116,10 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
106{ 116{
107 orient = o; 117 orient = o;
108#ifndef QT_NO_CURSOR 118#ifndef QT_NO_CURSOR
109 if ( o == KDGanttMinimizeSplitter::Horizontal ) 119 if ( o == Qt::Horizontal )
110 setCursor( splitHCursor ); 120 setCursor( Qt::splitHCursor );
111 else 121 else
112 setCursor( splitVCursor ); 122 setCursor( Qt::splitVCursor );
113#endif 123#endif
114} 124}
115 125
@@ -117,7 +127,7 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o )
117void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) 127void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
118{ 128{
119 updateCursor( e->pos() ); 129 updateCursor( e->pos() );
120 if ( !(e->state()&LeftButton) ) 130 if ( !(e->state()&Qt::LeftButton) )
121 return; 131 return;
122 132
123 if ( _activeButton != 0) 133 if ( _activeButton != 0)
@@ -137,7 +147,7 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e )
137 147
138void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e ) 148void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
139{ 149{
140 if ( e->button() == LeftButton ) { 150 if ( e->button() == Qt::LeftButton ) {
141 _activeButton = onButton( e->pos() ); 151 _activeButton = onButton( e->pos() );
142 mouseOffset = s->pick(e->pos()); 152 mouseOffset = s->pick(e->pos());
143 mMouseDown = true; 153 mMouseDown = true;
@@ -149,13 +159,13 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e )
149void KDGanttSplitterHandle::updateCursor( const QPoint& p) 159void KDGanttSplitterHandle::updateCursor( const QPoint& p)
150{ 160{
151 if ( onButton( p ) != 0 ) { 161 if ( onButton( p ) != 0 ) {
152 setCursor( arrowCursor ); 162 setCursor( Qt::arrowCursor );
153 } 163 }
154 else { 164 else {
155 if ( orient == KDGanttMinimizeSplitter::Horizontal ) 165 if ( orient == Qt::Horizontal )
156 setCursor( splitHCursor ); 166 setCursor( Qt::splitHCursor );
157 else 167 else
158 setCursor( splitVCursor ); 168 setCursor( Qt::splitVCursor );
159 } 169 }
160} 170}
161void KDGanttSplitterHandle::toggle() 171void KDGanttSplitterHandle::toggle()
@@ -195,7 +205,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
195 updateCursor( e->pos() ); 205 updateCursor( e->pos() );
196 } 206 }
197 else { 207 else {
198 if ( !opaque() && e->button() == LeftButton ) { 208 if ( !opaque() && e->button() == Qt::LeftButton ) {
199 QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) 209 QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos()))
200 - mouseOffset; 210 - mouseOffset;
201 s->setRubberband( -1 ); 211 s->setRubberband( -1 );
@@ -211,10 +221,10 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
211 221
212int KDGanttSplitterHandle::onButton( const QPoint& p ) 222int KDGanttSplitterHandle::onButton( const QPoint& p )
213{ 223{
214 QValueList<QPointArray> list = buttonRegions(); 224 Q3ValueList<Q3PointArray> list = buttonRegions();
215 int index = 1; 225 int index = 1;
216 int add = 12; 226 int add = 12;
217 for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { 227 for( Q3ValueList<Q3PointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
218 QRect rect = (*it).boundingRect(); 228 QRect rect = (*it).boundingRect();
219 rect.setLeft( rect.left()- add ); 229 rect.setLeft( rect.left()- add );
220 rect.setRight( rect.right() + add); 230 rect.setRight( rect.right() + add);
@@ -229,16 +239,16 @@ int KDGanttSplitterHandle::onButton( const QPoint& p )
229} 239}
230 240
231 241
232QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() 242Q3ValueList<Q3PointArray> KDGanttSplitterHandle::buttonRegions()
233{ 243{
234 QValueList<QPointArray> list; 244 Q3ValueList<Q3PointArray> list;
235 245
236 int sw = 8; 246 int sw = 8;
237 int yyy = 1; 247 int yyy = 1;
238 int xxx = 1; 248 int xxx = 1;
239 int voffset[] = { (int) -sw*3, (int) sw*3 }; 249 int voffset[] = { (int) -sw*3, (int) sw*3 };
240 for ( int i = 0; i < 2; i++ ) { 250 for ( int i = 0; i < 2; i++ ) {
241 QPointArray arr; 251 Q3PointArray arr;
242 if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right || 252 if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right ||
243 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) { 253 _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) {
244 int mid = height()/2 + voffset[i]; 254 int mid = height()/2 + voffset[i];
@@ -311,11 +321,11 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * )
311 p.setBrush( col ); 321 p.setBrush( col );
312 p.setPen( col ); 322 p.setPen( col );
313 323
314 QValueList<QPointArray> list = buttonRegions(); 324 Q3ValueList<Q3PointArray> list = buttonRegions();
315 int index = 1; 325 int index = 1;
316 if ( mUseOffset ) 326 if ( mUseOffset )
317 p.translate( 0, 1 ); 327 p.translate( 0, 1 );
318 for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { 328 for ( Q3ValueList<Q3PointArray>::Iterator it = list.begin(); it != list.end(); ++it ) {
319 if ( index == _activeButton ) { 329 if ( index == _activeButton ) {
320 330
321 /* 331 /*
@@ -377,12 +387,12 @@ class QSplitterData
377public: 387public:
378 QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} 388 QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {}
379 389
380 QPtrList<QSplitterLayoutStruct> list; 390 Q3PtrList<QSplitterLayoutStruct> list;
381 bool opaque; 391 bool opaque;
382 bool firstShow; 392 bool firstShow;
383}; 393};
384 394
385void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, 395void kdganttGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
386 int space, int spacer ); 396 int space, int spacer );
387#endif // DOXYGEN_SKIP_INTERNAL 397#endif // DOXYGEN_SKIP_INTERNAL
388 398
@@ -461,12 +471,13 @@ static QSize minSizeHint( const QWidget* w )
461 name arguments being passed on to the QFrame constructor. 471 name arguments being passed on to the QFrame constructor.
462*/ 472*/
463KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name ) 473KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name )
464 :QFrame(parent,name,WPaintUnclipped) 474 :Q3Frame(parent,name)
465{ 475{
476 setAttribute(Qt::WA_PaintUnclipped);
466 mRubberBand = 0; 477 mRubberBand = 0;
467 mFirstHandle = 0; 478 mFirstHandle = 0;
468#if QT_VERSION >= 232 479#if QT_VERSION >= 232
469 orient = Horizontal; 480 orient = Qt::Horizontal;
470 init(); 481 init();
471#endif 482#endif
472} 483}
@@ -475,10 +486,10 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n
475 Constructs a splitter with orientation \a o with the \a parent 486 Constructs a splitter with orientation \a o with the \a parent
476 and \a name arguments being passed on to the QFrame constructor. 487 and \a name arguments being passed on to the QFrame constructor.
477*/ 488*/
478KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name ) 489KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, QWidget *parent, const char *name )
479 :QFrame(parent,name,WPaintUnclipped) 490 :Q3Frame(parent,name)
480{ 491{
481 492 setAttribute(Qt::WA_PaintUnclipped);
482 mRubberBand = 0; 493 mRubberBand = 0;
483 mFirstHandle = 0; 494 mFirstHandle = 0;
484#if QT_VERSION >= 232 495#if QT_VERSION >= 232
@@ -505,7 +516,7 @@ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
505void KDGanttMinimizeSplitter::init() 516void KDGanttMinimizeSplitter::init()
506{ 517{
507 data = new QSplitterData; 518 data = new QSplitterData;
508 if ( orient == Horizontal ) 519 if ( orient == Qt::Horizontal )
509 setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) ); 520 setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) );
510 else 521 else
511 setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) ); 522 setSizePolicy( QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Expanding) );
@@ -534,14 +545,14 @@ void KDGanttMinimizeSplitter::toggle()
534 By default the orientation is horizontal (the widgets are side by side). 545 By default the orientation is horizontal (the widgets are side by side).
535 The possible orientations are Qt:Vertical and Qt::Horizontal (the default). 546 The possible orientations are Qt:Vertical and Qt::Horizontal (the default).
536*/ 547*/
537void KDGanttMinimizeSplitter::setOrientation( Orientation o ) 548void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o )
538{ 549{
539#if QT_VERSION >= 232 550#if QT_VERSION >= 232
540 if ( orient == o ) 551 if ( orient == o )
541 return; 552 return;
542 orient = o; 553 orient = o;
543 554
544 if ( orient == Horizontal ) 555 if ( orient == Qt::Horizontal )
545 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); 556 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) );
546 else 557 else
547 setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); 558 setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
@@ -586,8 +597,8 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
586 QString tmp = "qt_splithandle_"; 597 QString tmp = "qt_splithandle_";
587 tmp += w->name(); 598 tmp += w->name();
588 newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() ); 599 newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() );
589 if ( ! mFirstHandle ) 600 if ( ! mFirstHandle )
590 mFirstHandle = newHandle; 601 mFirstHandle = newHandle;
591 s->wid = newHandle; 602 s->wid = newHandle;
592 newHandle->setId(data->list.count()); 603 newHandle->setId(data->list.count());
593 s->isSplitter = TRUE; 604 s->isSplitter = TRUE;
@@ -600,7 +611,7 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
600 s = new QSplitterLayoutStruct; 611 s = new QSplitterLayoutStruct;
601 s->mode = Stretch; 612 s->mode = Stretch;
602 s->wid = w; 613 s->wid = w;
603 if ( !testWState( WState_Resized ) && w->sizeHint().isValid() ) 614 if ( !testAttribute( Qt::WA_Resized ) && w->sizeHint().isValid() )
604 s->sizer = pick( w->sizeHint() ); 615 s->sizer = pick( w->sizeHint() );
605 else 616 else
606 s->sizer = pick( w->size() ); 617 s->sizer = pick( w->size() );
@@ -621,20 +632,26 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs
621*/ 632*/
622void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) 633void KDGanttMinimizeSplitter::childEvent( QChildEvent *c )
623{ 634{
624 if ( c->type() == QEvent::ChildInserted ) { 635 if ( c->type() == QEvent::ChildAdded ) {
625 if ( !c->child()->isWidgetType() ) 636 if ( !c->child()->isWidgetType() )
626 return; 637 return;
627 638
628 if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) ) 639 QWidget *cw = (QWidget*)c->child();
640
641 if ( (cw->windowFlags())&Qt::Window )
642 return;
643
644 // avoid infinite recursion
645 if(cw->objectName().startsWith("qt_splithandle_"))
629 return; 646 return;
630 647
631 QSplitterLayoutStruct *s = data->list.first(); 648 QSplitterLayoutStruct *s = data->list.first();
632 while ( s ) { 649 while ( s ) {
633 if ( s->wid == c->child() ) 650 if ( s->wid == cw )
634 return; 651 return;
635 s = data->list.next(); 652 s = data->list.next();
636 } 653 }
637 addWidget( (QWidget*)c->child() ); 654 addWidget( cw );
638 recalc( isVisible() ); 655 recalc( isVisible() );
639 656
640 } else if ( c->type() == QEvent::ChildRemoved ) { 657 } else if ( c->type() == QEvent::ChildRemoved ) {
@@ -670,17 +687,17 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
670{ 687{
671#ifdef DESKTOP_VERSION 688#ifdef DESKTOP_VERSION
672 QPainter paint( this ); 689 QPainter paint( this );
673 paint.setPen( gray ); 690 paint.setPen( Qt::gray );
674 paint.setBrush( gray ); 691 paint.setBrush( Qt::gray );
675 paint.setRasterOp( XorROP ); 692 paint.setCompositionMode( QPainter::CompositionMode_Xor );
676 QRect r = contentsRect(); 693 QRect r = contentsRect();
677 const int rBord = 3; //Themable???? 694 const int rBord = 3; //Themable????
678#if QT_VERSION >= 0x030000 695#if QT_VERSION >= 0x030000
679 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); 696 int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this);
680#else 697#else
681 int sw = style().splitterWidth(); 698 int sw = style().splitterWidth();
682#endif 699#endif
683 if ( orient == Horizontal ) { 700 if ( orient == Qt::Horizontal ) {
684 if ( opaqueOldPos >= 0 ) 701 if ( opaqueOldPos >= 0 )
685 paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), 702 paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(),
686 2*rBord, r.height() ); 703 2*rBord, r.height() );
@@ -696,7 +713,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
696 opaqueOldPos = p; 713 opaqueOldPos = p;
697#else 714#else
698 if ( !mRubberBand ) { 715 if ( !mRubberBand ) {
699 mRubberBand = new KDRubberBand( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); 716 mRubberBand = new KDRubberBand( 0, "rubber", Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop);
700 mRubberBand->setFrameStyle( Box | Raised ); 717 mRubberBand->setFrameStyle( Box | Raised );
701 //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) ); 718 //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) );
702 mRubberBand->setPalette( QPalette ( colorGroup().background().light(), colorGroup().background().dark() )); 719 mRubberBand->setPalette( QPalette ( colorGroup().background().light(), colorGroup().background().dark() ));
@@ -710,7 +727,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
710 rBord = 4; 727 rBord = 4;
711 } 728 }
712 int sw = style().splitterWidth(); 729 int sw = style().splitterWidth();
713 if ( orient == Horizontal ) { 730 if ( orient == Qt::Horizontal ) {
714 if ( p >= 0 ) { 731 if ( p >= 0 ) {
715 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y())); 732 QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y()));
716 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() ); 733 mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() );
@@ -732,7 +749,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
732/*! \reimp */ 749/*! \reimp */
733bool KDGanttMinimizeSplitter::event( QEvent *e ) 750bool KDGanttMinimizeSplitter::event( QEvent *e )
734{ 751{
735 if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) { 752 if ( e->type() == QEvent::LayoutRequest || ( e->type() == QEvent::Show && data->firstShow ) ) {
736 recalc( isVisible() ); 753 recalc( isVisible() );
737 if ( e->type() == QEvent::Show ) 754 if ( e->type() == QEvent::Show )
738 data->firstShow = FALSE; 755 data->firstShow = FALSE;
@@ -755,7 +772,7 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p,
755 // LR 772 // LR
756 style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(), 773 style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(),
757 (orientation() == Qt::Horizontal ? 774 (orientation() == Qt::Horizontal ?
758 QStyle::Style_Horizontal : 0)); 775 QStyle::State_Horizontal : 0));
759#endif 776#endif
760} 777}
761 778
@@ -796,9 +813,9 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
796{ 813{
797 p = adjustPos( p, id ); 814 p = adjustPos( p, id );
798 QSplitterLayoutStruct *s = data->list.at(id); 815 QSplitterLayoutStruct *s = data->list.at(id);
799 int oldP = orient == Horizontal ? s->wid->x() : s->wid->y(); 816 int oldP = orient == Qt::Horizontal ? s->wid->x() : s->wid->y();
800 bool upLeft; 817 bool upLeft;
801 if ( false && orient == Horizontal ) { 818 if ( false && orient == Qt::Horizontal ) {
802 p += s->wid->width(); 819 p += s->wid->width();
803 upLeft = p > oldP; 820 upLeft = p > oldP;
804 } else 821 } else
@@ -813,8 +830,8 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id )
813 830
814void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter ) 831void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter )
815{ 832{
816 if ( orient == Horizontal ) { 833 if ( orient == Qt::Horizontal ) {
817 if ( false && orient == Horizontal && !isSplitter ) 834 if ( false && orient == Qt::Horizontal && !isSplitter )
818 p = contentsRect().width() - p - s; 835 p = contentsRect().width() - p - s;
819 w->setGeometry( p, contentsRect().y(), s, contentsRect().height() ); 836 w->setGeometry( p, contentsRect().y(), s, contentsRect().height() );
820 } else 837 } else
@@ -840,7 +857,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
840 } else if ( s->isSplitter ) { 857 } else if ( s->isSplitter ) {
841 int pos1, pos2; 858 int pos1, pos2;
842 int dd = s->sizer; 859 int dd = s->sizer;
843 if( false && orient == Horizontal ) { 860 if( false && orient == Qt::Horizontal ) {
844 pos1 = pos; 861 pos1 = pos;
845 pos2 = pos + dd; 862 pos2 = pos + dd;
846 } else { 863 } else {
@@ -856,7 +873,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft )
856 } 873 }
857 } else { 874 } else {
858 int dd, newLeft, nextPos; 875 int dd, newLeft, nextPos;
859 if( false && orient == Horizontal ) { 876 if( false && orient == Qt::Horizontal ) {
860 dd = w->geometry().right() - pos; 877 dd = w->geometry().right() - pos;
861 dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); 878 dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
862 newLeft = pos+1; 879 newLeft = pos+1;
@@ -893,7 +910,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
893 } else if ( s->isSplitter ) { 910 } else if ( s->isSplitter ) {
894 int dd = s->sizer; 911 int dd = s->sizer;
895 int pos1, pos2; 912 int pos1, pos2;
896 if( false && orient == Horizontal ) { 913 if( false && orient == Qt::Horizontal ) {
897 pos2 = pos - dd; 914 pos2 = pos - dd;
898 pos1 = pos2 + 1; 915 pos1 = pos2 + 1;
899 } else { 916 } else {
@@ -910,7 +927,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft )
910 } else { 927 } else {
911 int left = pick( w->pos() ); 928 int left = pick( w->pos() );
912 int right, dd,/* newRight,*/ newLeft, nextPos; 929 int right, dd,/* newRight,*/ newLeft, nextPos;
913 if ( false && orient == Horizontal ) { 930 if ( false && orient == Qt::Horizontal ) {
914 dd = pos - left + 1; 931 dd = pos - left + 1;
915 dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); 932 dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize())));
916 newLeft = pos-dd+1; 933 newLeft = pos-dd+1;
@@ -988,9 +1005,9 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max )
988 } 1005 }
989 } 1006 }
990 QRect r = contentsRect(); 1007 QRect r = contentsRect();
991 if ( orient == Horizontal && false ) { 1008 if ( orient == Qt::Horizontal && false ) {
992#if QT_VERSION >= 0x030000 1009#if QT_VERSION >= 0x030000
993 int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this); 1010 int splitterWidth = style()->pixelMetric(QStyle::PM_SplitterWidth, 0,this);
994#else 1011#else
995 int splitterWidth = style().splitterWidth(); 1012 int splitterWidth = style().splitterWidth();
996#endif 1013#endif
@@ -1030,7 +1047,7 @@ void KDGanttMinimizeSplitter::doResize()
1030 QRect r = contentsRect(); 1047 QRect r = contentsRect();
1031 int i; 1048 int i;
1032 int n = data->list.count(); 1049 int n = data->list.count();
1033 QMemArray<QLayoutStruct> a( n ); 1050 Q3MemArray<QLayoutStruct> a( n );
1034 for ( i = 0; i< n; i++ ) { 1051 for ( i = 0; i< n; i++ ) {
1035 a[i].init(); 1052 a[i].init();
1036 QSplitterLayoutStruct *s = data->list.at(i); 1053 QSplitterLayoutStruct *s = data->list.at(i);
@@ -1132,7 +1149,7 @@ void KDGanttMinimizeSplitter::recalc( bool update )
1132 if ( maxt < mint ) 1149 if ( maxt < mint )
1133 maxt = mint; 1150 maxt = mint;
1134 1151
1135 if ( orient == Horizontal ) { 1152 if ( orient == Qt::Horizontal ) {
1136 setMaximumSize( maxl, maxt ); 1153 setMaximumSize( maxl, maxt );
1137 setMinimumSize( minl, mint ); 1154 setMinimumSize( minl, mint );
1138 } else { 1155 } else {
@@ -1267,13 +1284,10 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
1267 constPolish(); 1284 constPolish();
1268 int l = 0; 1285 int l = 0;
1269 int t = 0; 1286 int t = 0;
1270 if ( children() ) { 1287 if ( !children().empty() ) {
1271 const QObjectList * c = children(); 1288 const QObjectList c = children();
1272 QObjectListIt it( *c ); 1289 for(QObjectList::const_iterator i=c.begin();i!=c.end();++i) {
1273 QObject * o; 1290 QObject * o = *i;
1274
1275 while( (o=it.current()) != 0 ) {
1276 ++it;
1277 if ( o->isWidgetType() && 1291 if ( o->isWidgetType() &&
1278 !((QWidget*)o)->isHidden() ) { 1292 !((QWidget*)o)->isHidden() ) {
1279 QSize s = ((QWidget*)o)->sizeHint(); 1293 QSize s = ((QWidget*)o)->sizeHint();
@@ -1284,7 +1298,7 @@ QSize KDGanttMinimizeSplitter::sizeHint() const
1284 } 1298 }
1285 } 1299 }
1286 } 1300 }
1287 return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); 1301 return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l );
1288} 1302}
1289 1303
1290 1304
@@ -1297,13 +1311,10 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const
1297 constPolish(); 1311 constPolish();
1298 int l = 0; 1312 int l = 0;
1299 int t = 0; 1313 int t = 0;
1300 if ( children() ) { 1314 if ( !children().empty() ) {
1301 const QObjectList * c = children(); 1315 const QObjectList c = children();
1302 QObjectListIt it( *c ); 1316 for(QObjectList::const_iterator i=c.begin();i!=c.end();++i) {
1303 QObject * o; 1317 QObject * o = *i;
1304
1305 while( (o=it.current()) != 0 ) {
1306 ++it;
1307 if ( o->isWidgetType() && 1318 if ( o->isWidgetType() &&
1308 !((QWidget*)o)->isHidden() ) { 1319 !((QWidget*)o)->isHidden() ) {
1309 QSize s = minSizeHint((QWidget*)o); 1320 QSize s = minSizeHint((QWidget*)o);
@@ -1314,7 +1325,7 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const
1314 } 1325 }
1315 } 1326 }
1316 } 1327 }
1317 return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); 1328 return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l );
1318} 1329}
1319 1330
1320 1331
@@ -1402,13 +1413,14 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const
1402 \sa setSizes() 1413 \sa setSizes()
1403*/ 1414*/
1404 1415
1405QValueList<int> KDGanttMinimizeSplitter::sizes() const 1416Q3ValueList<int> KDGanttMinimizeSplitter::sizes() const
1406{ 1417{
1418 /* TODO: hacker
1407 if ( !testWState(WState_Polished) ) { 1419 if ( !testWState(WState_Polished) ) {
1408 QWidget* that = (QWidget*) this; 1420 QWidget* that = (QWidget*) this;
1409 that->polish(); 1421 that->polish();
1410 } 1422 } */
1411 QValueList<int> list; 1423 Q3ValueList<int> list;
1412 QSplitterLayoutStruct *s = data->list.first(); 1424 QSplitterLayoutStruct *s = data->list.first();
1413 while ( s ) { 1425 while ( s ) {
1414 if ( !s->isSplitter ) 1426 if ( !s->isSplitter )
@@ -1433,10 +1445,10 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const
1433 \sa sizes() 1445 \sa sizes()
1434*/ 1446*/
1435 1447
1436void KDGanttMinimizeSplitter::setSizes( QValueList<int> list ) 1448void KDGanttMinimizeSplitter::setSizes( Q3ValueList<int> list )
1437{ 1449{
1438 processChildEvents(); 1450 processChildEvents();
1439 QValueList<int>::Iterator it = list.begin(); 1451 Q3ValueList<int>::Iterator it = list.begin();
1440 QSplitterLayoutStruct *s = data->list.first(); 1452 QSplitterLayoutStruct *s = data->list.first();
1441 while ( s && it != list.end() ) { 1453 while ( s && it != list.end() ) {
1442 if ( !s->isSplitter ) { 1454 if ( !s->isSplitter ) {
@@ -1456,7 +1468,7 @@ void KDGanttMinimizeSplitter::setSizes( QValueList<int> list )
1456 1468
1457void KDGanttMinimizeSplitter::processChildEvents() 1469void KDGanttMinimizeSplitter::processChildEvents()
1458{ 1470{
1459 QApplication::sendPostedEvents( this, QEvent::ChildInserted ); 1471 QApplication::sendPostedEvents( this, QEvent::ChildAdded );
1460} 1472}
1461 1473
1462 1474
@@ -1468,7 +1480,7 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old )
1468{ 1480{
1469 1481
1470#if QT_VERSION >= 0x030000 1482#if QT_VERSION >= 0x030000
1471 int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); 1483 int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this);
1472#else 1484#else
1473 int sw = style().splitterWidth(); 1485 int sw = style().splitterWidth();
1474#endif 1486#endif
@@ -1479,7 +1491,7 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old )
1479 s = data->list.next(); 1491 s = data->list.next();
1480 } 1492 }
1481 doResize(); 1493 doResize();
1482 QFrame::styleChange( old ); 1494 Q3Frame::styleChange( old );
1483} 1495}
1484 1496
1485#endif 1497#endif
@@ -1512,7 +1524,7 @@ static inline int toFixed( int i ) { return i * 256; }
1512static inline int fRound( int i ) { 1524static inline int fRound( int i ) {
1513 return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256; 1525 return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256;
1514} 1526}
1515void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, 1527void kdganttGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
1516 int space, int spacer ) 1528 int space, int spacer )
1517{ 1529{
1518 typedef int fixed; 1530 typedef int fixed;
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 3042e0a..338d965 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -1,3 +1,10 @@
1//Added by qt3to4:
2#include <Q3PointArray>
3#include <QPaintEvent>
4#include <QResizeEvent>
5#include <QChildEvent>
6#include <QMouseEvent>
7#include <QEvent>
1/* -*- Mode: C++ -*- 8/* -*- Mode: C++ -*-
2 $Id$ 9 $Id$
3*/ 10*/
@@ -35,8 +42,8 @@
35#define KDGANTTMINIMIZESPLITTER_H 42#define KDGANTTMINIMIZESPLITTER_H
36 43
37#ifndef QT_H 44#ifndef QT_H
38#include "qframe.h" 45#include "q3frame.h"
39#include "qvaluelist.h" 46#include "q3valuelist.h"
40#endif // QT_H 47#endif // QT_H
41 48
42#ifndef QT_NO_SPLITTER___ 49#ifndef QT_NO_SPLITTER___
@@ -44,7 +51,7 @@ class QSplitterData;
44class QSplitterLayoutStruct; 51class QSplitterLayoutStruct;
45class KDGanttSplitterHandle; 52class KDGanttSplitterHandle;
46class KDRubberBand; 53class KDRubberBand;
47class KDGanttMinimizeSplitter : public QFrame 54class KDGanttMinimizeSplitter : public Q3Frame
48{ 55{
49 Q_OBJECT 56 Q_OBJECT
50 // Q_ENUMS( Direction ) 57 // Q_ENUMS( Direction )
@@ -56,11 +63,11 @@ public:
56 enum Direction { Left, Right, Up, Down }; 63 enum Direction { Left, Right, Up, Down };
57 64
58 KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 ); 65 KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
59 KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 ); 66 KDGanttMinimizeSplitter( Qt::Orientation, QWidget* parent=0, const char* name=0 );
60 ~KDGanttMinimizeSplitter(); 67 ~KDGanttMinimizeSplitter();
61 68
62 virtual void setOrientation( Orientation ); 69 virtual void setOrientation( Qt::Orientation );
63 Orientation orientation() const { return orient; } 70 Qt::Orientation orientation() const { return orient; }
64 71
65 void setMinimizeDirection( Direction ); 72 void setMinimizeDirection( Direction );
66 Direction minimizeDirection() const; 73 Direction minimizeDirection() const;
@@ -77,8 +84,8 @@ public:
77 QSize sizeHint() const; 84 QSize sizeHint() const;
78 QSize minimumSizeHint() const; 85 QSize minimumSizeHint() const;
79 86
80 QValueList<int> sizes() const; 87 Q3ValueList<int> sizes() const;
81 void setSizes( QValueList<int> ); 88 void setSizes( Q3ValueList<int> );
82 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} 89 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;}
83 void expandPos( int id, int* min, int* max ); 90 void expandPos( int id, int* min, int* max );
84 KDRubberBand* rubberBand() { return mRubberBand ;} 91 KDRubberBand* rubberBand() { return mRubberBand ;}
@@ -114,20 +121,20 @@ private:
114 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE ); 121 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
115 122
116 QCOORD pick( const QPoint &p ) const 123 QCOORD pick( const QPoint &p ) const
117 { return orient == Horizontal ? p.x() : p.y(); } 124 { return orient == Qt::Horizontal ? p.x() : p.y(); }
118 QCOORD pick( const QSize &s ) const 125 QCOORD pick( const QSize &s ) const
119 { return orient == Horizontal ? s.width() : s.height(); } 126 { return orient == Qt::Horizontal ? s.width() : s.height(); }
120 127
121 QCOORD trans( const QPoint &p ) const 128 QCOORD trans( const QPoint &p ) const
122 { return orient == Vertical ? p.x() : p.y(); } 129 { return orient == Qt::Vertical ? p.x() : p.y(); }
123 QCOORD trans( const QSize &s ) const 130 QCOORD trans( const QSize &s ) const
124 { return orient == Vertical ? s.width() : s.height(); } 131 { return orient == Qt::Vertical ? s.width() : s.height(); }
125 KDGanttSplitterHandle* mFirstHandle; 132 KDGanttSplitterHandle* mFirstHandle;
126 QSplitterData *data; 133 QSplitterData *data;
127#endif 134#endif
128 135
129private: 136private:
130 Orientation orient; 137 Qt::Orientation orient;
131 Direction _direction; 138 Direction _direction;
132#ifndef DOXYGEN_SKIP_INTERNAL 139#ifndef DOXYGEN_SKIP_INTERNAL
133 friend class KDGanttSplitterHandle; 140 friend class KDGanttSplitterHandle;
@@ -163,7 +170,7 @@ public:
163 void setId( int i ) { myId = i; } 170 void setId( int i ) { myId = i; }
164 171
165protected: 172protected:
166 QValueList<QPointArray> buttonRegions(); 173 Q3ValueList<Q3PointArray> buttonRegions();
167 void paintEvent( QPaintEvent * ); 174 void paintEvent( QPaintEvent * );
168 void mouseMoveEvent( QMouseEvent * ); 175 void mouseMoveEvent( QMouseEvent * );
169 void mousePressEvent( QMouseEvent * ); 176 void mousePressEvent( QMouseEvent * );
diff --git a/microkde/fncolordialog.h b/microkde/fncolordialog.h
index 615d2ed..52356be 100755
--- a/microkde/fncolordialog.h
+++ b/microkde/fncolordialog.h
@@ -35,12 +35,12 @@
35//----------------------------------------------------------------------------- 35//-----------------------------------------------------------------------------
36// FNPaletteBase 36// FNPaletteBase
37//----------------------------------------------------------------------------- 37//-----------------------------------------------------------------------------
38class Q_EXPORT FNPaletteBase : public QWidget 38class /* Q_EXPORT */ FNPaletteBase : public QWidget
39{ 39{
40 Q_OBJECT 40 Q_OBJECT
41public: 41public:
42 42
43 FNPaletteBase(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 43 FNPaletteBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
44 44
45 45
46 virtual ~FNPaletteBase(); 46 virtual ~FNPaletteBase();
@@ -78,11 +78,11 @@ signals:
78//----------------------------------------------------------------------------- 78//-----------------------------------------------------------------------------
79// FNColorPalette 79// FNColorPalette
80//----------------------------------------------------------------------------- 80//-----------------------------------------------------------------------------
81class Q_EXPORT FNColorPalette : public FNPaletteBase 81class /* Q_EXPORT */ FNColorPalette : public FNPaletteBase
82{ 82{
83 Q_OBJECT 83 Q_OBJECT
84public: 84public:
85 FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 85 FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
86 virtual ~FNColorPalette(); 86 virtual ~FNColorPalette();
87}; 87};
88 88
@@ -92,11 +92,11 @@ public:
92//----------------------------------------------------------------------------- 92//-----------------------------------------------------------------------------
93// FNHSVPalette 93// FNHSVPalette
94//----------------------------------------------------------------------------- 94//-----------------------------------------------------------------------------
95class Q_EXPORT FNHSVPalette : public FNPaletteBase 95class /*Q_EXPORT */ FNHSVPalette : public FNPaletteBase
96{ 96{
97 Q_OBJECT 97 Q_OBJECT
98public: 98public:
99 FNHSVPalette(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); 99 FNHSVPalette(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
100 virtual ~FNHSVPalette(); 100 virtual ~FNHSVPalette();
101public slots: 101public slots:
102 void hueChanged(int v); 102 void hueChanged(int v);
@@ -111,11 +111,11 @@ protected:
111//----------------------------------------------------------------------------- 111//-----------------------------------------------------------------------------
112// FNColorDialog 112// FNColorDialog
113//----------------------------------------------------------------------------- 113//-----------------------------------------------------------------------------
114class Q_EXPORT FNColorDialog : public QDialog 114class /*Q_EXPORT */FNColorDialog : public QDialog
115{ 115{
116 Q_OBJECT 116 Q_OBJECT
117public: 117public:
118 FNColorDialog(QWidget* parent=0, const char* name=0, WFlags f=0); 118 FNColorDialog(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
119 virtual ~FNColorDialog(); 119 virtual ~FNColorDialog();
120 void setColor(QColor c); 120 void setColor(QColor c);
121 QColor color() const; 121 QColor color() const;
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp
index d7c12bb..b058d54 100644
--- a/microkde/kapplication.cpp
+++ b/microkde/kapplication.cpp
@@ -6,11 +6,14 @@
6#include <qapplication.h> 6#include <qapplication.h>
7#include <qstring.h> 7#include <qstring.h>
8#include <qfile.h> 8#include <qfile.h>
9#include <qtextstream.h> 9#include <q3textstream.h>
10#include <qdialog.h> 10#include <qdialog.h>
11#include <qlayout.h> 11#include <qlayout.h>
12#include <qtextbrowser.h> 12#include <q3textbrowser.h>
13#include <qregexp.h> 13#include <qregexp.h>
14#include <QDesktopWidget>
15//Added by qt3to4:
16#include <Q3VBoxLayout>
14 17
15int KApplication::random() 18int KApplication::random()
16{ 19{
@@ -75,10 +78,10 @@ void KApplication::showFile(QString caption, QString fn)
75 fileName = qApp->applicationDirPath () + "/" + fn; 78 fileName = qApp->applicationDirPath () + "/" + fn;
76#endif 79#endif
77 QFile file( fileName ); 80 QFile file( fileName );
78 if (!file.open( IO_ReadOnly ) ) { 81 if (!file.open( QIODevice::ReadOnly ) ) {
79 return ; 82 return ;
80 } 83 }
81 QTextStream ts( &file ); 84 Q3TextStream ts( &file );
82 text = ts.read(); 85 text = ts.read();
83 file.close(); 86 file.close();
84 KApplication::showText( caption, text ); 87 KApplication::showText( caption, text );
@@ -89,19 +92,19 @@ bool KApplication::convert2latin1(QString fileName)
89{ 92{
90 QString text; 93 QString text;
91 QFile file( fileName ); 94 QFile file( fileName );
92 if (!file.open( IO_ReadOnly ) ) { 95 if (!file.open( QIODevice::ReadOnly ) ) {
93 return false; 96 return false;
94 97
95 } 98 }
96 QTextStream ts( &file ); 99 Q3TextStream ts( &file );
97 ts.setEncoding( QTextStream::UnicodeUTF8 ); 100 ts.setEncoding( Q3TextStream::UnicodeUTF8 );
98 text = ts.read(); 101 text = ts.read();
99 file.close(); 102 file.close();
100 if (!file.open( IO_WriteOnly ) ) { 103 if (!file.open( QIODevice::WriteOnly ) ) {
101 return false; 104 return false;
102 } 105 }
103 QTextStream tsIn( &file ); 106 Q3TextStream tsIn( &file );
104 tsIn.setEncoding( QTextStream::Latin1 ); 107 tsIn.setEncoding( Q3TextStream::Latin1 );
105 tsIn << text.latin1(); 108 tsIn << text.latin1();
106 file.close(); 109 file.close();
107 return true; 110 return true;
@@ -112,11 +115,11 @@ void KApplication::showText(QString caption, QString text)
112{ 115{
113 QDialog dia( 0, "name", true ); ; 116 QDialog dia( 0, "name", true ); ;
114 dia.setCaption( caption ); 117 dia.setCaption( caption );
115 QVBoxLayout* lay = new QVBoxLayout( &dia ); 118 Q3VBoxLayout* lay = new Q3VBoxLayout( &dia );
116 lay->setSpacing( 3 ); 119 lay->setSpacing( 3 );
117 lay->setMargin( 3 ); 120 lay->setMargin( 3 );
118 KTextEdit tb ( &dia ); 121 KTextEdit tb ( &dia );
119 tb.setWordWrap( QMultiLineEdit::WidgetWidth ); 122 tb.setWordWrap( Q3MultiLineEdit::WidgetWidth );
120 lay->addWidget( &tb ); 123 lay->addWidget( &tb );
121 tb.setText( text ); 124 tb.setText( text );
122#ifdef DESKTOP_VERSION 125#ifdef DESKTOP_VERSION
@@ -133,7 +136,7 @@ void KApplication::showText(QString caption, QString text)
133#include <qlayout.h> 136#include <qlayout.h>
134#include <qdir.h> 137#include <qdir.h>
135#include <qradiobutton.h> 138#include <qradiobutton.h>
136#include <qbuttongroup.h> 139#include <q3buttongroup.h>
137#include "kglobal.h" 140#include "kglobal.h"
138#include "klocale.h" 141#include "klocale.h"
139 142
@@ -144,12 +147,12 @@ class KBackupPrefs : public QDialog
144 QDialog( parent, name, true ) 147 QDialog( parent, name, true )
145 { 148 {
146 setCaption( i18n("Backup Failed!") ); 149 setCaption( i18n("Backup Failed!") );
147 QVBoxLayout* lay = new QVBoxLayout( this ); 150 Q3VBoxLayout* lay = new Q3VBoxLayout( this );
148 lay->setSpacing( 3 ); 151 lay->setSpacing( 3 );
149 lay->setMargin( 3 ); 152 lay->setMargin( 3 );
150 QLabel * lab = new QLabel( message, this ); 153 QLabel * lab = new QLabel( message, this );
151 lay->addWidget( lab ); 154 lay->addWidget( lab );
152 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Choose action"), this ); 155 Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Choose action"), this );
153 lay->addWidget( format ); 156 lay->addWidget( format );
154 format->setExclusive ( true ) ; 157 format->setExclusive ( true ) ;
155 vcal = new QRadioButton(i18n("Try again now"), format ); 158 vcal = new QRadioButton(i18n("Try again now"), format );
diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp
index 197bea2..16618fc 100644
--- a/microkde/kcolorbutton.cpp
+++ b/microkde/kcolorbutton.cpp
@@ -1,11 +1,14 @@
1#include "kcolorbutton.h" 1#include "kcolorbutton.h"
2#include "kcolordialog.h" 2#include "kcolordialog.h"
3#include "qapplication.h" 3#include "qapplication.h"
4#include <QDesktopWidget>
4 5
5 6
6#include "qlayout.h" 7#include "qlayout.h"
7#ifdef DESKTOP_VERSION 8#ifdef DESKTOP_VERSION
8#include <qcolordialog.h> 9#include <qcolordialog.h>
10//Added by qt3to4:
11#include <QPixmap>
9#endif 12#endif
10void KColorButton:: edit() 13void KColorButton:: edit()
11{ 14{
diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp
index 940196e..12063ca 100644
--- a/microkde/kconfig.cpp
+++ b/microkde/kconfig.cpp
@@ -1,6 +1,8 @@
1#include <qfile.h> 1#include <qfile.h>
2#include <qtextstream.h> 2#include <q3textstream.h>
3#include <qwidget.h> 3#include <qwidget.h>
4//Added by qt3to4:
5#include <Q3ValueList>
4 6
5#include "kdebug.h" 7#include "kdebug.h"
6 8
@@ -53,11 +55,11 @@ QString KConfig::group() const {
53} 55}
54 56
55//US added method 57//US added method
56QValueList<int> KConfig::readIntListEntry( const QString & key) 58Q3ValueList<int> KConfig::readIntListEntry( const QString & key)
57{ 59{
58// qDebug("KConfig::readIntListEntry key=%s:", key.latin1()); 60// qDebug("KConfig::readIntListEntry key=%s:", key.latin1());
59 61
60 QValueList<int> result; 62 Q3ValueList<int> result;
61 63
62 QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key ); 64 QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key );
63 65
@@ -111,7 +113,7 @@ QString KConfig::readEntry( const QString &key, const QString &def )
111 113
112QSize KConfig::readSizeEntry( const QString &key, QSize* def ) 114QSize KConfig::readSizeEntry( const QString &key, QSize* def )
113{ 115{
114 QValueList<int> intlist = readIntListEntry(key); 116 Q3ValueList<int> intlist = readIntListEntry(key);
115 117
116 if (intlist.count() < 2) 118 if (intlist.count() < 2)
117 { 119 {
@@ -194,11 +196,11 @@ QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def )
194} 196}
195 197
196//US added method 198//US added method
197void KConfig::writeEntry( const QString &key, const QValueList<int> &value) 199void KConfig::writeEntry( const QString &key, const Q3ValueList<int> &value)
198{ 200{
199 QStringList valuesAsStrings; 201 QStringList valuesAsStrings;
200 202
201 QValueList<int>::ConstIterator it; 203 Q3ValueList<int>::ConstIterator it;
202 204
203 for( it = value.begin(); it != value.end(); ++it ) 205 for( it = value.begin(); it != value.end(); ++it )
204 { 206 {
@@ -246,7 +248,7 @@ void KConfig::writeEntry( const QString & e, const QColor & c )
246 248
247void KConfig::writeEntry( const QString & e, const QSize & s ) 249void KConfig::writeEntry( const QString & e, const QSize & s )
248{ 250{
249 QValueList<int> intlist; 251 Q3ValueList<int> intlist;
250 intlist << s.width() << s.height(); 252 intlist << s.width() << s.height();
251 writeEntry( e, intlist ); 253 writeEntry( e, intlist );
252} 254}
@@ -271,7 +273,7 @@ void KConfig::load()
271 273
272 274
273 QFile f( mFileName ); 275 QFile f( mFileName );
274 if ( !f.open( IO_ReadOnly ) ) { 276 if ( !f.open( QIODevice::ReadOnly ) ) {
275 //qDebug("KConfig: could not open file %s ",mFileName.latin1() ); 277 //qDebug("KConfig: could not open file %s ",mFileName.latin1() );
276 return; 278 return;
277 } 279 }
@@ -279,12 +281,12 @@ void KConfig::load()
279 mBoolMap.clear(); 281 mBoolMap.clear();
280 mStringMap.clear(); 282 mStringMap.clear();
281 283
282 QTextStream t( &f ); 284 Q3TextStream t( &f );
283 t.setEncoding( QTextStream::Latin1 ); 285 t.setEncoding( Q3TextStream::Latin1 );
284 QString line = t.readLine(); 286 QString line = t.readLine();
285 287
286 while ( !line.isNull() ) { 288 while ( !line.isNull() ) {
287 QStringList tokens = QStringList::split( ",", line ); 289 QStringList tokens = line.split(',');
288 if ( tokens[0] == "bool" ) { 290 if ( tokens[0] == "bool" ) {
289 bool value = false; 291 bool value = false;
290 if ( tokens[2] == "1" ) value = true; 292 if ( tokens[2] == "1" ) value = true;
@@ -323,15 +325,15 @@ void KConfig::sync()
323 KStandardDirs::makeDir(dir); 325 KStandardDirs::makeDir(dir);
324 326
325 QFile f( mFileName ); 327 QFile f( mFileName );
326 if ( !f.open( IO_WriteOnly ) ) { 328 if ( !f.open( QIODevice::WriteOnly ) ) {
327 329
328 qDebug("KConfig::sync() Can't open file %s ",mFileName.latin1() ); 330 qDebug("KConfig::sync() Can't open file %s ",mFileName.latin1() );
329 331
330 return; 332 return;
331 } 333 }
332 334
333 QTextStream t( &f ); 335 Q3TextStream t( &f );
334 t.setEncoding( QTextStream::Latin1 ); 336 t.setEncoding( Q3TextStream::Latin1 );
335 QMap<QString,bool>::ConstIterator itBool; 337 QMap<QString,bool>::ConstIterator itBool;
336 for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) { 338 for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) {
337 t << "bool," << itBool.key() << "," << ( *itBool ? "1" : "0" ) << endl; 339 t << "bool," << itBool.key() << "," << ( *itBool ? "1" : "0" ) << endl;
diff --git a/microkde/kconfig.h b/microkde/kconfig.h
index 1a1038f..7b91e44 100644
--- a/microkde/kconfig.h
+++ b/microkde/kconfig.h
@@ -3,7 +3,7 @@
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qstringlist.h> 5#include <qstringlist.h>
6#include <qvaluelist.h> 6#include <q3valuelist.h>
7#include <qcolor.h> 7#include <qcolor.h>
8#include <qfont.h> 8#include <qfont.h>
9#include <qmap.h> 9#include <qmap.h>
@@ -57,7 +57,7 @@ class KConfig
57 QString getFileName(); 57 QString getFileName();
58 58
59//US added method readIntListEntry 59//US added method readIntListEntry
60 QValueList<int> readIntListEntry( const QString &); 60 Q3ValueList<int> readIntListEntry( const QString &);
61 61
62 int readNumEntry( const QString &, int def=0 ); 62 int readNumEntry( const QString &, int def=0 );
63 QString readEntry( const QString &, const QString &def=QString::null ); 63 QString readEntry( const QString &, const QString &def=QString::null );
@@ -69,7 +69,7 @@ class KConfig
69 QSize readSizeEntry(const QString &, QSize* ); 69 QSize readSizeEntry(const QString &, QSize* );
70 bool hasKey( const QString &); 70 bool hasKey( const QString &);
71 71
72 void writeEntry( const QString &, const QValueList<int>& ); 72 void writeEntry( const QString &, const Q3ValueList<int>& );
73 void writeEntry( const QString &, int ); 73 void writeEntry( const QString &, int );
74 void writeEntry( const QString &key , unsigned int value) { writeEntry( key, int( value ) ); } 74 void writeEntry( const QString &key , unsigned int value) { writeEntry( key, int( value ) ); }
75 void writeEntry( const char *key , unsigned int value) { writeEntry( QString( key ), value ); } 75 void writeEntry( const char *key , unsigned int value) { writeEntry( QString( key ), value ); }
diff --git a/microkde/kdatepickernew.cpp b/microkde/kdatepickernew.cpp
index f60a422..8f8001e 100644
--- a/microkde/kdatepickernew.cpp
+++ b/microkde/kdatepickernew.cpp
@@ -313,7 +313,7 @@ KDatePicker::selectMonthClicked()
313 QDate date = table->getDate(); 313 QDate date = table->getDate();
314 int i, month, months = calendar->monthsInYear(date); 314 int i, month, months = calendar->monthsInYear(date);
315 315
316 QPopupMenu popup(selectMonth); 316 Q3PopupMenu popup(selectMonth);
317 317
318 for (i = 1; i <= months; i++) 318 for (i = 1; i <= months; i++)
319 popup.insertItem(calendar->monthName(i, calendar->year(date)), i); 319 popup.insertItem(calendar->monthName(i, calendar->year(date)), i);
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp
index 353f78d..10dc449 100644
--- a/microkde/kdatetbl.cpp
+++ b/microkde/kdatetbl.cpp
@@ -44,6 +44,14 @@
44#include <qpen.h> 44#include <qpen.h>
45#include <qpainter.h> 45#include <qpainter.h>
46#include <qdialog.h> 46#include <qdialog.h>
47#include <QDesktopWidget>
48//Added by qt3to4:
49#include <QResizeEvent>
50#include <QFocusEvent>
51#include <Q3Frame>
52#include <QMouseEvent>
53#include <QKeyEvent>
54#include <QEvent>
47#include <assert.h> 55#include <assert.h>
48#include <qapplication.h> 56#include <qapplication.h>
49 57
@@ -69,7 +77,7 @@ KDateValidator::date(const QString& text, QDate& d) const
69 d = tmp; 77 d = tmp;
70 return Acceptable; 78 return Acceptable;
71 } else 79 } else
72 return Valid; 80 return QValidator::Intermediate;
73} 81}
74 82
75void 83void
@@ -78,22 +86,22 @@ KDateValidator::fixup( QString& ) const
78 86
79} 87}
80 88
81KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) 89KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, Qt::WFlags f)
82 : QGridView(parent, name, f) 90 : Q3GridView(parent, name, f)
83{ 91{
84 setFont( KGlobalSettings::generalFont() ); 92 setFont( KGlobalSettings::generalFont() );
85 if(!date_.isValid()) 93 if(!date_.isValid())
86 { 94 {
87 date_=QDate::currentDate(); 95 date_=QDate::currentDate();
88 } 96 }
89 setFocusPolicy( QWidget::StrongFocus ); 97 setFocusPolicy( Qt::StrongFocus );
90 setNumRows(7); // 6 weeks max + headline 98 setNumRows(7); // 6 weeks max + headline
91 setNumCols(7); // 7 days a week 99 setNumCols(7); // 7 days a week
92 setHScrollBarMode(AlwaysOff); 100 setHScrollBarMode(AlwaysOff);
93 setVScrollBarMode(AlwaysOff); 101 setVScrollBarMode(AlwaysOff);
94 viewport()->setBackgroundColor(QColor(220,245,255)); 102 viewport()->setBackgroundColor(QColor(220,245,255));
95#if 0 103#if 0
96 viewport()->setEraseColor(lightGray); 104 viewport()->setEraseColor(Qt::lightGray);
97#endif 105#endif
98 mMarkCurrent = false; 106 mMarkCurrent = false;
99 setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth 107 setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth
@@ -108,7 +116,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
108 int w=cellWidth(); 116 int w=cellWidth();
109 int h=cellHeight(); 117 int h=cellHeight();
110 int pos; 118 int pos;
111 QBrush brushBlue(blue); 119 QBrush brushBlue(Qt::blue);
112 QBrush brushLightblue(QColor(220,245,255)); 120 QBrush brushLightblue(QColor(220,245,255));
113 QFont _font=font(); 121 QFont _font=font();
114 // ----- 122 // -----
@@ -133,18 +141,17 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
133 painter->setPen(QColor(220,245,255)); 141 painter->setPen(QColor(220,245,255));
134 painter->setBrush(brushLightblue); 142 painter->setBrush(brushLightblue);
135 painter->drawRect(0, 0, w, h); 143 painter->drawRect(0, 0, w, h);
136 painter->setPen(blue); 144 painter->setPen(Qt::blue);
137 } else { 145 } else {
138 painter->setPen(blue); 146 painter->setPen(Qt::blue);
139 painter->setBrush(brushBlue); 147 painter->setBrush(brushBlue);
140 painter->drawRect(0, 0, w, h); 148 painter->drawRect(0, 0, w, h);
141 painter->setPen(white); 149 painter->setPen(Qt::white);
142 } 150 }
143 painter->drawText(0, 0, w, h-1, AlignCenter, 151 painter->drawText(0, 0, w, h-1, Qt::AlignCenter,
144 daystr, -1, &rect); 152 daystr, -1, &rect);
145 painter->setPen(black); 153 painter->setPen(Qt::black);
146 painter->moveTo(0, h-1); 154 painter->drawLine(0, h-1, w-1, h-1);
147 painter->lineTo(w-1, h-1);
148 // ----- draw the weekday: 155 // ----- draw the weekday:
149 } else { 156 } else {
150 painter->setFont(_font); 157 painter->setFont(_font);
@@ -161,33 +168,33 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
161 } else { // following month 168 } else { // following month
162 text.setNum(pos-firstday-numdays+1); 169 text.setNum(pos-firstday-numdays+1);
163 } 170 }
164 painter->setPen(gray); 171 painter->setPen(Qt::gray);
165 } else { // paint a day of the current month 172 } else { // paint a day of the current month
166 text.setNum(pos-firstday+1); 173 text.setNum(pos-firstday+1);
167 painter->setPen(black); 174 painter->setPen(Qt::black);
168 } 175 }
169 176
170 pen=painter->pen(); 177 pen=painter->pen();
171 if(firstday+date.day()-1==pos) 178 if(firstday+date.day()-1==pos)
172 { 179 {
173 if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos) 180 if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos)
174 painter->setPen(green); 181 painter->setPen(Qt::green);
175 else 182 else
176 painter->setPen(red); 183 painter->setPen(Qt::red);
177 if(hasFocus()) 184 if(hasFocus())
178 { 185 {
179 painter->setBrush(darkRed); 186 painter->setBrush(Qt::darkRed);
180 pen=white; 187 pen=QColor(Qt::white);
181 } else { 188 } else {
182 painter->setBrush(darkGray); 189 painter->setBrush(Qt::darkGray);
183 pen=white; 190 pen=QColor(Qt::white);
184 } 191 }
185 } else { 192 } else {
186 if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos) 193 if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos)
187 { 194 {
188 painter->setPen(green); 195 painter->setPen(Qt::green);
189 painter->setBrush(darkGreen); 196 painter->setBrush(Qt::darkGreen);
190 pen=white; 197 pen=QColor(Qt::white);
191 } else { 198 } else {
192 painter->setBrush(QColor(220,245,255)); 199 painter->setBrush(QColor(220,245,255));
193 painter->setPen(QColor(220,245,255)); 200 painter->setPen(QColor(220,245,255));
@@ -195,7 +202,7 @@ KDateTable::paintCell(QPainter *painter, int row, int col)
195 } 202 }
196 painter->drawRect(0, 0, w, h); 203 painter->drawRect(0, 0, w, h);
197 painter->setPen(pen); 204 painter->setPen(pen);
198 painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect); 205 painter->drawText(0, 0, w, h, Qt::AlignCenter, text, -1, &rect);
199 } 206 }
200 /* 207 /*
201 if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width()); 208 if(rect.width()>maxCell.width()) maxCell.setWidth(rect.width());
@@ -274,7 +281,7 @@ KDateTable::keyPressEvent( QKeyEvent *e )
274void 281void
275KDateTable::viewportResizeEvent(QResizeEvent * e) 282KDateTable::viewportResizeEvent(QResizeEvent * e)
276{ 283{
277 QGridView::viewportResizeEvent(e); 284 Q3GridView::viewportResizeEvent(e);
278 285
279 setCellWidth(viewport()->width()/7); 286 setCellWidth(viewport()->width()/7);
280 setCellHeight(viewport()->height()/7); 287 setCellHeight(viewport()->height()/7);
@@ -409,13 +416,13 @@ KDateTable::getDate() const
409void KDateTable::focusInEvent( QFocusEvent *e ) 416void KDateTable::focusInEvent( QFocusEvent *e )
410{ 417{
411 repaintContents(false); 418 repaintContents(false);
412 QGridView::focusInEvent( e ); 419 Q3GridView::focusInEvent( e );
413} 420}
414 421
415void KDateTable::focusOutEvent( QFocusEvent *e ) 422void KDateTable::focusOutEvent( QFocusEvent *e )
416{ 423{
417 repaintContents(false); 424 repaintContents(false);
418 QGridView::focusOutEvent( e ); 425 Q3GridView::focusOutEvent( e );
419} 426}
420 427
421QSize 428QSize
@@ -432,7 +439,7 @@ KDateTable::sizeHint() const
432 439
433KDateInternalMonthPicker::KDateInternalMonthPicker 440KDateInternalMonthPicker::KDateInternalMonthPicker
434(QWidget* parent, const char* name) 441(QWidget* parent, const char* name)
435 : QGridView(parent, name), 442 : Q3GridView(parent, name),
436 result(0) // invalid 443 result(0) // invalid
437{ 444{
438 QRect rect; 445 QRect rect;
@@ -451,13 +458,13 @@ KDateInternalMonthPicker::KDateInternalMonthPicker
451 setFont(font); 458 setFont(font);
452 setHScrollBarMode(AlwaysOff); 459 setHScrollBarMode(AlwaysOff);
453 setVScrollBarMode(AlwaysOff); 460 setVScrollBarMode(AlwaysOff);
454 setFrameStyle(QFrame::NoFrame); 461 setFrameStyle(Q3Frame::NoFrame);
455 setNumRows(4); 462 setNumRows(4);
456 setNumCols(3); 463 setNumCols(3);
457 // enable to find drawing failures: 464 // enable to find drawing failures:
458 // setTableFlags(Tbl_clipCellPainting); 465 // setTableFlags(Tbl_clipCellPainting);
459#if 0 466#if 0
460 viewport()->setEraseColor(lightGray); // for consistency with the datepicker 467 viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker
461#endif 468#endif
462 // ----- find the preferred size 469 // ----- find the preferred size
463 // (this is slow, possibly, but unfortunatly it is needed here): 470 // (this is slow, possibly, but unfortunatly it is needed here):
@@ -487,7 +494,7 @@ KDateInternalMonthPicker::getResult() const
487void 494void
488KDateInternalMonthPicker::setupPainter(QPainter *p) 495KDateInternalMonthPicker::setupPainter(QPainter *p)
489{ 496{
490 p->setPen(black); 497 p->setPen(Qt::black);
491} 498}
492 499
493void 500void
@@ -505,7 +512,7 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
505 // ----- find the number of the cell: 512 // ----- find the number of the cell:
506 index=3*row+col+1; 513 index=3*row+col+1;
507 text=KGlobal::locale()->monthName(index, false); 514 text=KGlobal::locale()->monthName(index, false);
508 painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text); 515 painter->drawText(0, 0, cellWidth(), cellHeight(), Qt::AlignCenter, text);
509 if ( activeCol == col && activeRow == row ) 516 if ( activeCol == col && activeRow == row )
510 painter->drawRect( 0, 0, cellWidth(), cellHeight() ); 517 painter->drawRect( 0, 0, cellWidth(), cellHeight() );
511} 518}
@@ -513,7 +520,7 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col)
513void 520void
514KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e) 521KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
515{ 522{
516 if(!isEnabled() || e->button() != LeftButton) 523 if(!isEnabled() || e->button() != Qt::LeftButton)
517 { 524 {
518 KNotifyClient::beep(); 525 KNotifyClient::beep();
519 return; 526 return;
@@ -540,7 +547,7 @@ KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e)
540void 547void
541KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e) 548KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e)
542{ 549{
543 if (e->state() & LeftButton) 550 if (e->state() & Qt::LeftButton)
544 { 551 {
545 int row, col; 552 int row, col;
546 QPoint mouseCoord; 553 QPoint mouseCoord;
@@ -614,7 +621,7 @@ KDateInternalYearSelector::KDateInternalYearSelector
614 font.setPointSize(fontsize); 621 font.setPointSize(fontsize);
615 setFont(font); 622 setFont(font);
616#if 0 623#if 0
617 setFrameStyle(QFrame::NoFrame); 624 setFrameStyle(Q3Frame::NoFrame);
618#endif 625#endif
619 // we have to respect the limits of QDate here, I fear: 626 // we have to respect the limits of QDate here, I fear:
620 val->setRange(0, 8000); 627 val->setRange(0, 8000);
@@ -661,18 +668,18 @@ KDateInternalYearSelector::setYear(int year)
661} 668}
662 669
663KPopupFrame::KPopupFrame(QWidget* parent, const char* name) 670KPopupFrame::KPopupFrame(QWidget* parent, const char* name)
664 : QFrame(parent, name, WType_Popup), 671 : Q3Frame(parent, name, Qt::WType_Popup),
665 result(0), // rejected 672 result(0), // rejected
666 main(0) 673 main(0)
667{ 674{
668 setFrameStyle(QFrame::Box|QFrame::Raised); 675 setFrameStyle(Q3Frame::Box|Q3Frame::Raised);
669 setMidLineWidth(2); 676 setMidLineWidth(2);
670} 677}
671 678
672void 679void
673KPopupFrame::keyPressEvent(QKeyEvent* e) 680KPopupFrame::keyPressEvent(QKeyEvent* e)
674{ 681{
675 if(e->key()==Key_Escape) 682 if(e->key()==Qt::Key_Escape)
676 { 683 {
677 result=0; // rejected 684 result=0; // rejected
678 qApp->exit_loop(); 685 qApp->exit_loop();
@@ -756,7 +763,7 @@ void KDateTable::virtual_hook( int, void* )
756 763
757KDateInternalWeekPicker::KDateInternalWeekPicker 764KDateInternalWeekPicker::KDateInternalWeekPicker
758(QWidget* parent, const char* name) 765(QWidget* parent, const char* name)
759 : QGridView(parent, name), 766 : Q3GridView(parent, name),
760 result(0) // invalid 767 result(0) // invalid
761{ 768{
762 QRect rect; 769 QRect rect;
@@ -773,7 +780,7 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
773 setFont(font); 780 setFont(font);
774 setHScrollBarMode(AlwaysOff); 781 setHScrollBarMode(AlwaysOff);
775 setVScrollBarMode(AlwaysOff); 782 setVScrollBarMode(AlwaysOff);
776 setFrameStyle(QFrame::NoFrame); 783 setFrameStyle(Q3Frame::NoFrame);
777 if ( QApplication::desktop()->height() > 240 ) { 784 if ( QApplication::desktop()->height() > 240 ) {
778 setNumRows(13); 785 setNumRows(13);
779 setNumCols(4); 786 setNumCols(4);
@@ -784,7 +791,7 @@ KDateInternalWeekPicker::KDateInternalWeekPicker
784 // enable to find drawing failures: 791 // enable to find drawing failures:
785 // setTableFlags(Tbl_clipCellPainting); 792 // setTableFlags(Tbl_clipCellPainting);
786#if 0 793#if 0
787 viewport()->setEraseColor(lightGray); // for consistency with the datepicker 794 viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker
788#endif 795#endif
789 // ----- find the preferred size 796 // ----- find the preferred size
790 // (this is slow, possibly, but unfortunatly it is needed here): 797 // (this is slow, possibly, but unfortunatly it is needed here):
@@ -818,7 +825,7 @@ KDateInternalWeekPicker::getResult() const
818void 825void
819KDateInternalWeekPicker::setupPainter(QPainter *p) 826KDateInternalWeekPicker::setupPainter(QPainter *p)
820{ 827{
821 p->setPen(black); 828 p->setPen(Qt::black);
822} 829}
823 830
824void 831void
@@ -836,7 +843,7 @@ KDateInternalWeekPicker::paintCell(QPainter* painter, int row, int col)
836 // ----- find the number of the cell: 843 // ----- find the number of the cell:
837 index=numCols()*row+col+1; 844 index=numCols()*row+col+1;
838 text=QString::number( index ); 845 text=QString::number( index );
839 painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text); 846 painter->drawText(0, 0, cellWidth(), cellHeight(), Qt::AlignCenter, text);
840 if ( activeCol == col && activeRow == row ) 847 if ( activeCol == col && activeRow == row )
841 painter->drawRect( 0, 0, cellWidth(), cellHeight() ); 848 painter->drawRect( 0, 0, cellWidth(), cellHeight() );
842} 849}
@@ -844,7 +851,7 @@ KDateInternalWeekPicker::paintCell(QPainter* painter, int row, int col)
844void 851void
845KDateInternalWeekPicker::contentsMousePressEvent(QMouseEvent *e) 852KDateInternalWeekPicker::contentsMousePressEvent(QMouseEvent *e)
846{ 853{
847 if(!isEnabled() || e->button() != LeftButton) 854 if(!isEnabled() || e->button() != Qt::LeftButton)
848 { 855 {
849 KNotifyClient::beep(); 856 KNotifyClient::beep();
850 return; 857 return;
@@ -871,7 +878,7 @@ KDateInternalWeekPicker::contentsMousePressEvent(QMouseEvent *e)
871void 878void
872KDateInternalWeekPicker::contentsMouseMoveEvent(QMouseEvent *e) 879KDateInternalWeekPicker::contentsMouseMoveEvent(QMouseEvent *e)
873{ 880{
874 if (e->state() & LeftButton) 881 if (e->state() & Qt::LeftButton)
875 { 882 {
876 int row, col; 883 int row, col;
877 QPoint mouseCoord; 884 QPoint mouseCoord;
diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h
index 87808df..2d3d2cf 100644
--- a/microkde/kdatetbl.h
+++ b/microkde/kdatetbl.h
@@ -21,9 +21,15 @@
21#define KDATETBL_H 21#define KDATETBL_H
22 22
23#include <qvalidator.h> 23#include <qvalidator.h>
24#include <qgridview.h> 24#include <q3gridview.h>
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qdatetime.h> 26#include <qdatetime.h>
27//Added by qt3to4:
28#include <QResizeEvent>
29#include <QMouseEvent>
30#include <Q3Frame>
31#include <QKeyEvent>
32#include <QFocusEvent>
27 33
28/** 34/**
29* A table containing month names. It is used to pick a month directly. 35* A table containing month names. It is used to pick a month directly.
@@ -31,7 +37,7 @@
31* @version $Id$ 37* @version $Id$
32* @author Tim Gilman, Mirko Boehm 38* @author Tim Gilman, Mirko Boehm
33*/ 39*/
34class KDateInternalMonthPicker : public QGridView 40class KDateInternalMonthPicker : public Q3GridView
35{ 41{
36 Q_OBJECT 42 Q_OBJECT
37protected: 43protected:
@@ -127,7 +133,7 @@ private:
127 * @author Tim Gilman, Mirko Boehm 133 * @author Tim Gilman, Mirko Boehm
128 * @version $Id$ 134 * @version $Id$
129 */ 135 */
130class KPopupFrame : public QFrame 136class KPopupFrame : public Q3Frame
131{ 137{
132 Q_OBJECT 138 Q_OBJECT
133protected: 139protected:
@@ -182,7 +188,7 @@ public:
182 188
183private: 189private:
184 190
185 virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); } 191 virtual bool close(bool alsoDelete) { return Q3Frame::close(alsoDelete); }
186protected: 192protected:
187 virtual void virtual_hook( int id, void* data ); 193 virtual void virtual_hook( int id, void* data );
188private: 194private:
@@ -215,7 +221,7 @@ public:
215 * @version $Id$ 221 * @version $Id$
216 * @author Tim Gilman, Mirko Boehm 222 * @author Tim Gilman, Mirko Boehm
217 */ 223 */
218class KDateTable : public QGridView 224class KDateTable : public Q3GridView
219{ 225{
220 Q_OBJECT 226 Q_OBJECT
221public: 227public:
@@ -224,7 +230,7 @@ public:
224 */ 230 */
225 KDateTable(QWidget *parent=0, 231 KDateTable(QWidget *parent=0,
226 QDate date=QDate::currentDate(), 232 QDate date=QDate::currentDate(),
227 const char* name=0, WFlags f=0); 233 const char* name=0, Qt::WFlags f=0);
228 /** 234 /**
229 * Returns a recommended size for the widget. 235 * Returns a recommended size for the widget.
230 * To save some time, the size of the largest used cell content is 236 * To save some time, the size of the largest used cell content is
@@ -307,7 +313,7 @@ private:
307}; 313};
308 314
309#endif // KDATETBL_H 315#endif // KDATETBL_H
310class KDateInternalWeekPicker : public QGridView 316class KDateInternalWeekPicker : public Q3GridView
311{ 317{
312 Q_OBJECT 318 Q_OBJECT
313protected: 319protected:
diff --git a/microkde/kdebug.h b/microkde/kdebug.h
index bb9cfe3..534943c 100644
--- a/microkde/kdebug.h
+++ b/microkde/kdebug.h
@@ -4,6 +4,8 @@
4#include <stdio.h> 4#include <stdio.h>
5 5
6#include <qstring.h> 6#include <qstring.h>
7//Added by qt3to4:
8#include <Q3CString>
7 9
8 10
9 11
@@ -64,7 +66,7 @@ class kdbgstream {
64 kdbgstream &operator<<(const char*) { 66 kdbgstream &operator<<(const char*) {
65 return *this; 67 return *this;
66 } 68 }
67 kdbgstream &operator<<(const QCString&) { 69 kdbgstream &operator<<(const Q3CString&) {
68 return *this; 70 return *this;
69 } 71 }
70 kdbgstream& operator<<(KDBGFUNC f) { 72 kdbgstream& operator<<(KDBGFUNC f) {
diff --git a/microkde/kdecore/kcatalogue.cpp b/microkde/kdecore/kcatalogue.cpp
index 97ac326..1600b08 100644
--- a/microkde/kdecore/kcatalogue.cpp
+++ b/microkde/kdecore/kcatalogue.cpp
@@ -20,6 +20,8 @@
20//US #include <config.h> 20//US #include <config.h>
21 21
22#include <qfile.h> 22#include <qfile.h>
23//Added by qt3to4:
24#include <Q3CString>
23 25
24#include <kdebug.h> 26#include <kdebug.h>
25 27
@@ -88,7 +90,7 @@ void KCatalogue::setFileName( const QString & fileName )
88 90
89 doUnload(); 91 doUnload();
90 92
91 QCString newFileName = QFile::encodeName( fileName ); 93 Q3CString newFileName = QFile::encodeName( fileName );
92 94
93 if ( !fileName.isEmpty() ) 95 if ( !fileName.isEmpty() )
94 { 96 {
diff --git a/microkde/kdecore/kconfigbase.h b/microkde/kdecore/kconfigbase.h
index 7e56d11..1ef6a04 100644
--- a/microkde/kdecore/kconfigbase.h
+++ b/microkde/kdecore/kconfigbase.h
@@ -26,6 +26,8 @@
26#define _KCONFIGBASE_H 26#define _KCONFIGBASE_H
27 27
28#include "kconfig.h" 28#include "kconfig.h"
29//Added by qt3to4:
30#include <Q3CString>
29 31
30/** 32/**
31 * Helper class to facilitate working with @ref KConfig / @ref KSimpleConfig 33 * Helper class to facilitate working with @ref KConfig / @ref KSimpleConfig
@@ -82,7 +84,7 @@ public:
82 : _config(config), _oldgroup(config->group()) 84 : _config(config), _oldgroup(config->group())
83 { _config->setGroup( group ); } 85 { _config->setGroup( group ); }
84 86
85 KConfigGroupSaver( KConfig* config, const QCString &group ) 87 KConfigGroupSaver( KConfig* config, const Q3CString &group )
86 : _config(config), _oldgroup(config->group()) 88 : _config(config), _oldgroup(config->group())
87 { _config->setGroup( group ); } 89 { _config->setGroup( group ); }
88 90
diff --git a/microkde/kdecore/klibloader.cpp b/microkde/kdecore/klibloader.cpp
index 6d0475a..0b54eb6 100644
--- a/microkde/kdecore/klibloader.cpp
+++ b/microkde/kdecore/klibloader.cpp
@@ -20,9 +20,12 @@
20#include <qclipboard.h> 20#include <qclipboard.h>
21#include <qfile.h> 21#include <qfile.h>
22#include <qtimer.h> 22#include <qtimer.h>
23#include <qobjectdict.h> 23#include <q3objectdict.h>
24#include <qwidgetlist.h>
25#include <qwidget.h> 24#include <qwidget.h>
25#include <qwidget.h>
26//Added by qt3to4:
27#include <Q3CString>
28#include <Q3PtrList>
26 29
27#include "kapplication.h" 30#include "kapplication.h"
28#include "klibloader.h" 31#include "klibloader.h"
@@ -45,7 +48,7 @@
45#endif 48#endif
46 49
47 50
48template class QAsciiDict<KLibrary>; 51template class Q3AsciiDict<KLibrary>;
49 52
50#include <stdlib.h> //getenv 53#include <stdlib.h> //getenv
51 54
@@ -120,7 +123,7 @@ KLibrary::~KLibrary()
120 // If any object is remaining, delete 123 // If any object is remaining, delete
121 if ( m_objs.count() > 0 ) 124 if ( m_objs.count() > 0 )
122 { 125 {
123 QPtrListIterator<QObject> it( m_objs ); 126 Q3PtrListIterator<QObject> it( m_objs );
124 for ( ; it.current() ; ++it ) 127 for ( ; it.current() ; ++it )
125 { 128 {
126 kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl; 129 kdDebug(150) << "Factory still has object " << it.current() << " " << it.current()->name () << " Library = " << m_libname << endl;
@@ -152,7 +155,7 @@ KLibFactory* KLibrary::factory()
152 if ( m_factory ) 155 if ( m_factory )
153 return m_factory; 156 return m_factory;
154 157
155 QCString symname; 158 Q3CString symname;
156 symname.sprintf("init_%s", name().latin1() ); 159 symname.sprintf("init_%s", name().latin1() );
157 160
158 void* sym = symbol( symname ); 161 void* sym = symbol( symname );
@@ -305,8 +308,8 @@ KLibWrapPrivate::KLibWrapPrivate(KLibrary *l, QLibrary* h)
305class KLibLoaderPrivate 308class KLibLoaderPrivate
306{ 309{
307public: 310public:
308 QPtrList<KLibWrapPrivate> loaded_stack; 311 Q3PtrList<KLibWrapPrivate> loaded_stack;
309 QPtrList<KLibWrapPrivate> pending_close; 312 Q3PtrList<KLibWrapPrivate> pending_close;
310 enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode; 313 enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode;
311 314
312 QString errorMessage; 315 QString errorMessage;
@@ -348,7 +351,7 @@ KLibLoader::~KLibLoader()
348{ 351{
349// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl; 352// kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl;
350 353
351 QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); 354 Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
352 for (; it.current(); ++it ) 355 for (; it.current(); ++it )
353 { 356 {
354 kdDebug(150) << "The KLibLoader contains the library " << it.current()->name 357 kdDebug(150) << "The KLibLoader contains the library " << it.current()->name
@@ -364,7 +367,7 @@ KLibLoader::~KLibLoader()
364//static 367//static
365QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ ) 368QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ )
366{ 369{
367 QCString libname( name ); 370 Q3CString libname( name );
368 371
369 // only append ".la" if there is no extension 372 // only append ".la" if there is no extension
370 // this allows to load non-libtool libraries as well 373 // this allows to load non-libtool libraries as well
@@ -421,7 +424,7 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta
421 { 424 {
422#ifndef NDEBUG 425#ifndef NDEBUG
423 kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; 426 kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl;
424 self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); 427 self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(QString(libname));
425 428
426 qDebug("KLibLoader::library could not find library: %s", libname.data()); 429 qDebug("KLibLoader::library could not find library: %s", libname.data());
427#endif 430#endif
@@ -469,7 +472,7 @@ KLibrary* KLibLoader::library( const char *name )
469 472
470 /* Test if this library was loaded at some time, but got 473 /* Test if this library was loaded at some time, but got
471 unloaded meanwhile, whithout being dlclose()'ed. */ 474 unloaded meanwhile, whithout being dlclose()'ed. */
472 QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); 475 Q3PtrListIterator<KLibWrapPrivate> it(d->loaded_stack);
473 for (; it.current(); ++it) { 476 for (; it.current(); ++it) {
474 if (it.current()->name == name) 477 if (it.current()->name == name)
475 wrap = it.current(); 478 wrap = it.current();
@@ -550,7 +553,7 @@ void KLibLoader::slotLibraryDestroyed()
550{ 553{
551 const KLibrary *lib = static_cast<const KLibrary *>( sender() ); 554 const KLibrary *lib = static_cast<const KLibrary *>( sender() );
552 555
553 QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); 556 Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs );
554 for (; it.current(); ++it ) 557 for (; it.current(); ++it )
555 if ( it.current()->lib == lib ) 558 if ( it.current()->lib == lib )
556 { 559 {
@@ -569,7 +572,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap)
569 572
570 /* First delete all KLibrary objects in pending_close, but _don't_ unload 573 /* First delete all KLibrary objects in pending_close, but _don't_ unload
571 the DSO behind it. */ 574 the DSO behind it. */
572 QPtrListIterator<KLibWrapPrivate> it(d->pending_close); 575 Q3PtrListIterator<KLibWrapPrivate> it(d->pending_close);
573 for (; it.current(); ++it) { 576 for (; it.current(); ++it) {
574 wrap = it.current(); 577 wrap = it.current();
575 if (wrap->lib) { 578 if (wrap->lib) {
diff --git a/microkde/kdecore/klibloader.h b/microkde/kdecore/klibloader.h
index ed57109..53d146e 100644
--- a/microkde/kdecore/klibloader.h
+++ b/microkde/kdecore/klibloader.h
@@ -21,8 +21,8 @@
21#include <qobject.h> 21#include <qobject.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qstringlist.h> 23#include <qstringlist.h>
24#include <qasciidict.h> 24#include <q3asciidict.h>
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <kglobal.h> 26#include <kglobal.h>
27 27
28#include <stdlib.h> // For backwards compatibility 28#include <stdlib.h> // For backwards compatibility
@@ -52,7 +52,7 @@ class QLibrary;
52class KLibrary : public QObject 52class KLibrary : public QObject
53{ 53{
54 friend class KLibLoader; 54 friend class KLibLoader;
55 friend class QAsciiDict<KLibrary>; 55 friend class Q3AsciiDict<KLibrary>;
56 56
57 Q_OBJECT 57 Q_OBJECT
58public: 58public:
@@ -127,7 +127,7 @@ private:
127 KLibFactory* m_factory; 127 KLibFactory* m_factory;
128//US void * m_handle; 128//US void * m_handle;
129 QLibrary* m_handle; 129 QLibrary* m_handle;
130 QPtrList<QObject> m_objs; 130 Q3PtrList<QObject> m_objs;
131 QTimer *m_timer; 131 QTimer *m_timer;
132 KLibraryPrivate *d; 132 KLibraryPrivate *d;
133}; 133};
@@ -287,7 +287,7 @@ private slots:
287 void slotLibraryDestroyed(); 287 void slotLibraryDestroyed();
288private: 288private:
289 void close_pending( KLibWrapPrivate * ); 289 void close_pending( KLibWrapPrivate * );
290 QAsciiDict<KLibWrapPrivate> m_libs; 290 Q3AsciiDict<KLibWrapPrivate> m_libs;
291 291
292 static KLibLoader* s_self; 292 static KLibLoader* s_self;
293 293
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp
index 1d8ae9f..dd310fa 100644
--- a/microkde/kdecore/klocale.cpp
+++ b/microkde/kdecore/klocale.cpp
@@ -1,5 +1,6 @@
1#include <qregexp.h> 1#include <qregexp.h>
2#include <qapplication.h> 2#include <qapplication.h>
3#include <QDesktopWidget>
3 4
4#include "kdebug.h" 5#include "kdebug.h"
5#include "kcalendarsystemgregorian.h" 6#include "kcalendarsystemgregorian.h"
@@ -11,8 +12,8 @@
11//#define COLLECT_TRANSLATION 12//#define COLLECT_TRANSLATION
12 13
13 14
14QDict<QString> *mLocaleDict = 0; 15Q3Dict<QString> *mLocaleDict = 0;
15void setLocaleDict( QDict<QString> * dict ) 16void setLocaleDict( Q3Dict<QString> * dict )
16{ 17{
17 mLocaleDict = dict; 18 mLocaleDict = dict;
18 19
@@ -45,7 +46,7 @@ void addExist(const char *text,QString trans )
45} 46}
46 47
47#include <qfile.h> 48#include <qfile.h>
48#include <qtextstream.h> 49#include <q3textstream.h>
49#include <qtextcodec.h> 50#include <qtextcodec.h>
50#endif 51#endif
51void dumpMissing() 52void dumpMissing()
@@ -53,10 +54,10 @@ void dumpMissing()
53#ifdef COLLECT_TRANSLATION 54#ifdef COLLECT_TRANSLATION
54 QString fileName = "/tmp/usernewtrans.txt"; 55 QString fileName = "/tmp/usernewtrans.txt";
55 QFile file( fileName ); 56 QFile file( fileName );
56 if (!file.open( IO_WriteOnly ) ) { 57 if (!file.open( QIODevice::WriteOnly ) ) {
57 return ; 58 return ;
58 } 59 }
59 QTextStream ts( &file ); 60 Q3TextStream ts( &file );
60 ts.setCodec( QTextCodec::codecForName("utf8") ); 61 ts.setCodec( QTextCodec::codecForName("utf8") );
61 62
62 int i; 63 int i;
@@ -70,10 +71,10 @@ void dumpMissing()
70 { 71 {
71 QString fileName = "/tmp/usertrans.txt"; 72 QString fileName = "/tmp/usertrans.txt";
72 QFile file( fileName ); 73 QFile file( fileName );
73 if (!file.open( IO_WriteOnly ) ) { 74 if (!file.open( QIODevice::WriteOnly ) ) {
74 return ; 75 return ;
75 } 76 }
76 QTextStream ts( &file ); 77 Q3TextStream ts( &file );
77 ts.setCodec( QTextCodec::codecForName("utf8") ); 78 ts.setCodec( QTextCodec::codecForName("utf8") );
78 79
79 int i; 80 int i;
@@ -467,7 +468,7 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime,
467 format = "%1 %2"; 468 format = "%1 %2";
468 else if ( intIntDateFormat == Format1 ) 469 else if ( intIntDateFormat == Format1 )
469 format = "%1 %2"; 470 format = "%1 %2";
470 else if ( intIntDateFormat == ISODate ) 471 else if ( intIntDateFormat == Qt::ISODate )
471 format = "%1T%2"; 472 format = "%1T%2";
472 473
473 QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat )) 474 QString res = format.arg(formatDate( pDateTime.date(), shortFormat, intIntDateFormat ))
@@ -527,7 +528,7 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con
527 strpos++; 528 strpos++;
528 529
529 c = fmt.at(fmtpos++); 530 c = fmt.at(fmtpos++);
530 switch (c) 531 switch (c.unicode())
531 { 532 {
532 case 'a': 533 case 'a':
533 case 'A': 534 case 'A':
@@ -638,7 +639,7 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const
638 strpos++; 639 strpos++;
639 640
640 c = Format.at(Formatpos++); 641 c = Format.at(Formatpos++);
641 switch (c) 642 switch (c.unicode())
642 { 643 {
643 case 'p': 644 case 'p':
644 { 645 {
@@ -734,7 +735,7 @@ QDateTime KLocale::readDateTime(const QString &intstr,
734 QString tformat = timeFormat(intIntDateFormat); 735 QString tformat = timeFormat(intIntDateFormat);
735 736
736 QDate m_date = readDate(date, dformat, &ok1); 737 QDate m_date = readDate(date, dformat, &ok1);
737 QTime m_time = readTime(time, tformat, &ok2); 738 QTime m_time = readTime(time, !tformat.isEmpty(), &ok2);
738 739
739 QDateTime m_dt; 740 QDateTime m_dt;
740 741
diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h
index 58e0b39..840fc9d 100644
--- a/microkde/kdecore/klocale.h
+++ b/microkde/kdecore/klocale.h
@@ -4,14 +4,14 @@
4#include <qstring.h> 4#include <qstring.h>
5#include <qstringlist.h> 5#include <qstringlist.h>
6#include <qdatetime.h> 6#include <qdatetime.h>
7#include <qdict.h> 7#include <q3dict.h>
8 8
9#ifndef I18N_NOOP 9#ifndef I18N_NOOP
10#define I18N_NOOP(x) (x) 10#define I18N_NOOP(x) (x)
11#endif 11#endif
12 12
13class KCalendarSystem; 13class KCalendarSystem;
14void setLocaleDict( QDict<QString> * dict ); 14void setLocaleDict( Q3Dict<QString> * dict );
15QString i18n(const char *text); 15QString i18n(const char *text);
16QString i18n(const char *hint, const char *text); 16QString i18n(const char *hint, const char *text);
17QString i18n(const char *text1, const char *textn, int num); 17QString i18n(const char *text1, const char *textn, int num);
diff --git a/microkde/kdecore/kmdcodec.cpp b/microkde/kdecore/kmdcodec.cpp
index bc03569..db11e52 100644
--- a/microkde/kdecore/kmdcodec.cpp
+++ b/microkde/kdecore/kmdcodec.cpp
@@ -39,6 +39,8 @@
39 39
40#include <kdebug.h> 40#include <kdebug.h>
41#include "kmdcodec.h" 41#include "kmdcodec.h"
42//Added by qt3to4:
43#include <Q3CString>
42 44
43#define KMD5_S11 7 45#define KMD5_S11 7
44#define KMD5_S12 12 46#define KMD5_S12 12
@@ -147,14 +149,14 @@ static int rikFindChar(register const char * _s, const char c)
147 return s - _s; 149 return s - _s;
148} 150}
149 151
150QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) 152Q3CString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF)
151{ 153{
152 QByteArray out; 154 QByteArray out;
153 quotedPrintableEncode (in, out, useCRLF); 155 quotedPrintableEncode (in, out, useCRLF);
154 return QCString (out.data(), out.size()+1); 156 return Q3CString (out.data(), out.size()+1);
155} 157}
156 158
157QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF) 159Q3CString KCodecs::quotedPrintableEncode(const Q3CString& str, bool useCRLF)
158{ 160{
159 if (str.isEmpty()) 161 if (str.isEmpty())
160 return ""; 162 return "";
@@ -280,14 +282,14 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool
280 out.truncate(cursor - out.data()); 282 out.truncate(cursor - out.data());
281} 283}
282 284
283QCString KCodecs::quotedPrintableDecode(const QByteArray & in) 285Q3CString KCodecs::quotedPrintableDecode(const QByteArray & in)
284{ 286{
285 QByteArray out; 287 QByteArray out;
286 quotedPrintableDecode (in, out); 288 quotedPrintableDecode (in, out);
287 return QCString (out.data(), out.size()+1); 289 return Q3CString (out.data(), out.size()+1);
288} 290}
289 291
290QCString KCodecs::quotedPrintableDecode(const QCString & str) 292Q3CString KCodecs::quotedPrintableDecode(const Q3CString & str)
291{ 293{
292 if (str.isEmpty()) 294 if (str.isEmpty())
293 return ""; 295 return "";
@@ -355,7 +357,7 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out)
355 out.truncate(cursor - out.data()); 357 out.truncate(cursor - out.data());
356} 358}
357 359
358QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) 360Q3CString KCodecs::base64Encode( const Q3CString& str, bool insertLFs )
359{ 361{
360 if ( str.isEmpty() ) 362 if ( str.isEmpty() )
361 return ""; 363 return "";
@@ -365,11 +367,11 @@ QCString KCodecs::base64Encode( const QCString& str, bool insertLFs )
365 return base64Encode( in, insertLFs ); 367 return base64Encode( in, insertLFs );
366} 368}
367 369
368QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) 370Q3CString KCodecs::base64Encode( const QByteArray& in, bool insertLFs )
369{ 371{
370 QByteArray out; 372 QByteArray out;
371 base64Encode( in, out, insertLFs ); 373 base64Encode( in, out, insertLFs );
372 return QCString( out.data(), out.size()+1 ); 374 return Q3CString( out.data(), out.size()+1 );
373} 375}
374 376
375void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, 377void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
@@ -405,15 +407,15 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
405 if ( insertLFs ) 407 if ( insertLFs )
406 { 408 {
407 if ( count && (count%76) == 0 ) 409 if ( count && (count%76) == 0 )
408 out.at(didx++) = '\n'; 410 out[didx++] = '\n';
409 count += 4; 411 count += 4;
410 } 412 }
411 out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; 413 out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077];
412 out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | 414 out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 |
413 (data[sidx] << 4) & 077]; 415 (data[sidx] << 4) & 077];
414 out.at(didx++) = Base64EncMap[(data[sidx+2] >> 6) & 003 | 416 out[didx++] = Base64EncMap[(data[sidx+2] >> 6) & 003 |
415 (data[sidx+1] << 2) & 077]; 417 (data[sidx+1] << 2) & 077];
416 out.at(didx++) = Base64EncMap[data[sidx+2] & 077]; 418 out[didx++] = Base64EncMap[data[sidx+2] & 077];
417 sidx += 3; 419 sidx += 3;
418 } 420 }
419 } 421 }
@@ -421,30 +423,27 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out,
421 if (sidx < len) 423 if (sidx < len)
422 { 424 {
423 if ( insertLFs && (count > 0) && (count%76) == 0 ) 425 if ( insertLFs && (count > 0) && (count%76) == 0 )
424 out.at(didx++) = '\n'; 426 out[didx++] = '\n';
425 427
426 out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; 428 out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077];
427 if (sidx < len-1) 429 if (sidx < len-1)
428 { 430 {
429 out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | 431 out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 |
430 (data[sidx] << 4) & 077]; 432 (data[sidx] << 4) & 077];
431 out.at(didx++) = Base64EncMap[(data[sidx+1] << 2) & 077]; 433 out[didx++] = Base64EncMap[(data[sidx+1] << 2) & 077];
432 } 434 }
433 else 435 else
434 { 436 {
435 out.at(didx++) = Base64EncMap[(data[sidx] << 4) & 077]; 437 out[didx++] = Base64EncMap[(data[sidx] << 4) & 077];
436 } 438 }
437 } 439 }
438 440
439 // Add padding 441 // Add padding
440 while (didx < out.size()) 442 while (didx < out.size())
441 { 443 out[didx++] = '=';
442 out.at(didx) = '=';
443 didx++;
444 }
445} 444}
446 445
447QCString KCodecs::base64Decode( const QCString& str ) 446Q3CString KCodecs::base64Decode( const Q3CString& str )
448{ 447{
449 if ( str.isEmpty() ) 448 if ( str.isEmpty() )
450 return ""; 449 return "";
@@ -454,11 +453,11 @@ QCString KCodecs::base64Decode( const QCString& str )
454 return base64Decode( in ); 453 return base64Decode( in );
455} 454}
456 455
457QCString KCodecs::base64Decode( const QByteArray& in ) 456Q3CString KCodecs::base64Decode( const QByteArray& in )
458{ 457{
459 QByteArray out; 458 QByteArray out;
460 base64Decode( in, out ); 459 base64Decode( in, out );
461 return QCString( out.data(), out.size()+1 ); 460 return Q3CString( out.data(), out.size()+1 );
462} 461}
463 462
464void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) 463void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
@@ -505,7 +504,7 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
505 if ((ch > 47 && ch < 58) || (ch > 64 && ch < 91) || 504 if ((ch > 47 && ch < 58) || (ch > 64 && ch < 91) ||
506 (ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=') 505 (ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=')
507 { 506 {
508 out.at(outIdx++) = Base64DecMap[ch]; 507 out[outIdx++] = Base64DecMap[ch];
509 } 508 }
510 else 509 else
511 { 510 {
@@ -523,26 +522,26 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out )
523 { 522 {
524 while (didx < len-2) 523 while (didx < len-2)
525 { 524 {
526 out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); 525 out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003));
527 out.at(didx+1) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); 526 out[didx+1] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017));
528 out.at(didx+2) = (((out.at(sidx+2) << 6) & 255) | (out.at(sidx+3) & 077)); 527 out[didx+2] = (((out[sidx+2] << 6) & 255) | (out[sidx+3] & 077));
529 sidx += 4; 528 sidx += 4;
530 didx += 3; 529 didx += 3;
531 } 530 }
532 } 531 }
533 532
534 if (didx < len) 533 if (didx < len)
535 out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); 534 out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003));
536 535
537 if (++didx < len ) 536 if (++didx < len )
538 out.at(didx) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); 537 out[didx] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017));
539 538
540 // Resize the output buffer 539 // Resize the output buffer
541 if ( len == 0 || len < out.size() ) 540 if ( len == 0 || len < out.size() )
542 out.resize(len); 541 out.resize(len);
543} 542}
544 543
545QCString KCodecs::uuencode( const QCString& str ) 544Q3CString KCodecs::uuencode( const Q3CString& str )
546{ 545{
547 if ( str.isEmpty() ) 546 if ( str.isEmpty() )
548 return ""; 547 return "";
@@ -553,11 +552,11 @@ QCString KCodecs::uuencode( const QCString& str )
553 return uuencode( in ); 552 return uuencode( in );
554} 553}
555 554
556QCString KCodecs::uuencode( const QByteArray& in ) 555Q3CString KCodecs::uuencode( const QByteArray& in )
557{ 556{
558 QByteArray out; 557 QByteArray out;
559 uuencode( in, out ); 558 uuencode( in, out );
560 return QCString( out.data(), out.size()+1 ); 559 return Q3CString( out.data(), out.size()+1 );
561} 560}
562 561
563void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) 562void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
@@ -580,54 +579,54 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
580 while (sidx+line_len < len) 579 while (sidx+line_len < len)
581 { 580 {
582 // line length 581 // line length
583 out.at(didx++) = UUEncMap[line_len]; 582 out[didx++] = UUEncMap[line_len];
584 583
585 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion 584 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion
586 for (unsigned int end = sidx+line_len; sidx < end; sidx += 3) 585 for (unsigned int end = sidx+line_len; sidx < end; sidx += 3)
587 { 586 {
588 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 587 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
589 out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | 588 out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
590 (data[sidx] << 4) & 077]; 589 (data[sidx] << 4) & 077];
591 out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | 590 out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 |
592 (data[sidx+1] << 2) & 077]; 591 (data[sidx+1] << 2) & 077];
593 out.at(didx++) = UUEncMap[data[sidx+2] & 077]; 592 out[didx++] = UUEncMap[data[sidx+2] & 077];
594 } 593 }
595 594
596 // line terminator 595 // line terminator
597 //for (unsigned int idx=0; idx < nl_len; idx++) 596 //for (unsigned int idx=0; idx < nl_len; idx++)
598 //out.at(didx++) = nl[idx]; 597 //out[didx++] = nl[idx];
599 memcpy(out.data()+didx, nl, nl_len); 598 memcpy(out.data()+didx, nl, nl_len);
600 didx += nl_len; 599 didx += nl_len;
601 } 600 }
602 601
603 // line length 602 // line length
604 out.at(didx++) = UUEncMap[len-sidx]; 603 out[didx++] = UUEncMap[len-sidx];
605 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion 604 // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion
606 while (sidx+2 < len) 605 while (sidx+2 < len)
607 { 606 {
608 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 607 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
609 out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | 608 out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
610 (data[sidx] << 4) & 077]; 609 (data[sidx] << 4) & 077];
611 out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | 610 out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 |
612 (data[sidx+1] << 2) & 077]; 611 (data[sidx+1] << 2) & 077];
613 out.at(didx++) = UUEncMap[data[sidx+2] & 077]; 612 out[didx++] = UUEncMap[data[sidx+2] & 077];
614 sidx += 3; 613 sidx += 3;
615 } 614 }
616 615
617 if (sidx < len-1) 616 if (sidx < len-1)
618 { 617 {
619 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 618 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
620 out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | 619 out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 |
621 (data[sidx] << 4) & 077]; 620 (data[sidx] << 4) & 077];
622 out.at(didx++) = UUEncMap[(data[sidx+1] << 2) & 077]; 621 out[didx++] = UUEncMap[(data[sidx+1] << 2) & 077];
623 out.at(didx++) = UUEncMap[0]; 622 out[didx++] = UUEncMap[0];
624 } 623 }
625 else if (sidx < len) 624 else if (sidx < len)
626 { 625 {
627 out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; 626 out[didx++] = UUEncMap[(data[sidx] >> 2) & 077];
628 out.at(didx++) = UUEncMap[(data[sidx] << 4) & 077]; 627 out[didx++] = UUEncMap[(data[sidx] << 4) & 077];
629 out.at(didx++) = UUEncMap[0]; 628 out[didx++] = UUEncMap[0];
630 out.at(didx++) = UUEncMap[0]; 629 out[didx++] = UUEncMap[0];
631 } 630 }
632 631
633 // line terminator 632 // line terminator
@@ -639,7 +638,7 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out )
639 out.resize( 0 ); 638 out.resize( 0 );
640} 639}
641 640
642QCString KCodecs::uudecode( const QCString& str ) 641Q3CString KCodecs::uudecode( const Q3CString& str )
643{ 642{
644 if ( str.isEmpty() ) 643 if ( str.isEmpty() )
645 return ""; 644 return "";
@@ -650,11 +649,11 @@ QCString KCodecs::uudecode( const QCString& str )
650 return uudecode( in ); 649 return uudecode( in );
651} 650}
652 651
653QCString KCodecs::uudecode( const QByteArray& in ) 652Q3CString KCodecs::uudecode( const QByteArray& in )
654{ 653{
655 QByteArray out; 654 QByteArray out;
656 uudecode( in, out ); 655 uudecode( in, out );
657 return QCString( out.data(), out.size()+1 ); 656 return Q3CString( out.data(), out.size()+1 );
658} 657}
659 658
660void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) 659void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
@@ -705,9 +704,9 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
705 B = UUDecMap[(unsigned char) data[sidx+1]]; 704 B = UUDecMap[(unsigned char) data[sidx+1]];
706 C = UUDecMap[(unsigned char) data[sidx+2]]; 705 C = UUDecMap[(unsigned char) data[sidx+2]];
707 D = UUDecMap[(unsigned char) data[sidx+3]]; 706 D = UUDecMap[(unsigned char) data[sidx+3]];
708 out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); 707 out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) );
709 out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); 708 out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) );
710 out.at(didx++) = ( ((C << 6) & 255) | (D & 077) ); 709 out[didx++] = ( ((C << 6) & 255) | (D & 077) );
711 sidx += 4; 710 sidx += 4;
712 } 711 }
713 } 712 }
@@ -716,14 +715,14 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out )
716 { 715 {
717 A = UUDecMap[(unsigned char) data[sidx]]; 716 A = UUDecMap[(unsigned char) data[sidx]];
718 B = UUDecMap[(unsigned char) data[sidx+1]]; 717 B = UUDecMap[(unsigned char) data[sidx+1]];
719 out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); 718 out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) );
720 } 719 }
721 720
722 if (didx < end) 721 if (didx < end)
723 { 722 {
724 B = UUDecMap[(unsigned char) data[sidx+1]]; 723 B = UUDecMap[(unsigned char) data[sidx+1]];
725 C = UUDecMap[(unsigned char) data[sidx+2]]; 724 C = UUDecMap[(unsigned char) data[sidx+2]];
726 out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); 725 out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) );
727 } 726 }
728 727
729 // skip padding 728 // skip padding
@@ -761,7 +760,7 @@ KMD5::KMD5(const QByteArray& in)
761 update( in ); 760 update( in );
762} 761}
763 762
764KMD5::KMD5(const QCString& in) 763KMD5::KMD5(const Q3CString& in)
765{ 764{
766 init(); 765 init();
767 update( in ); 766 update( in );
@@ -772,7 +771,7 @@ void KMD5::update(const QByteArray& in)
772 update(in.data(), int(in.size())); 771 update(in.data(), int(in.size()));
773} 772}
774 773
775void KMD5::update(const QCString& in) 774void KMD5::update(const Q3CString& in)
776{ 775{
777 update(in.data(), int(in.length())); 776 update(in.data(), int(in.length()));
778} 777}
@@ -873,7 +872,7 @@ bool KMD5::verify( const KMD5::Digest& digest)
873 return (0 == memcmp(rawDigest(), digest, sizeof(KMD5::Digest))); 872 return (0 == memcmp(rawDigest(), digest, sizeof(KMD5::Digest)));
874} 873}
875 874
876bool KMD5::verify( const QCString& hexdigest) 875bool KMD5::verify( const Q3CString& hexdigest)
877{ 876{
878 finalize(); 877 finalize();
879 return (0 == strcmp(hexDigest().data(), hexdigest)); 878 return (0 == strcmp(hexDigest().data(), hexdigest));
@@ -892,9 +891,9 @@ void KMD5::rawDigest( KMD5::Digest& bin )
892} 891}
893 892
894 893
895QCString KMD5::hexDigest() 894Q3CString KMD5::hexDigest()
896{ 895{
897 QCString s(33); 896 Q3CString s(33);
898 897
899 finalize(); 898 finalize();
900 sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", 899 sprintf(s.data(), "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
@@ -905,7 +904,7 @@ QCString KMD5::hexDigest()
905 return s; 904 return s;
906} 905}
907 906
908void KMD5::hexDigest(QCString& s) 907void KMD5::hexDigest(Q3CString& s)
909{ 908{
910 finalize(); 909 finalize();
911 s.resize(33); 910 s.resize(33);
@@ -915,7 +914,7 @@ void KMD5::hexDigest(QCString& s)
915 m_digest[12], m_digest[13], m_digest[14], m_digest[15]); 914 m_digest[12], m_digest[13], m_digest[14], m_digest[15]);
916} 915}
917 916
918QCString KMD5::base64Digest() 917Q3CString KMD5::base64Digest()
919{ 918{
920 QByteArray ba(16); 919 QByteArray ba(16);
921 920
@@ -956,7 +955,7 @@ void KMD5::transform( const unsigned char block[64] )
956 //memcpy( x, block, 64 ); 955 //memcpy( x, block, 64 );
957 956
958//US Q_ASSERT(!m_finalized); // not just a user error, since the method is private 957//US Q_ASSERT(!m_finalized); // not just a user error, since the method is private
959 ASSERT(!m_finalized); // not just a user error, since the method is private 958 Q_ASSERT(!m_finalized); // not just a user error, since the method is private
960 959
961 /* Round 1 */ 960 /* Round 1 */
962 FF (a, b, c, d, x[ 0], KMD5_S11, 0xd76aa478); /* 1 */ 961 FF (a, b, c, d, x[ 0], KMD5_S11, 0xd76aa478); /* 1 */
diff --git a/microkde/kdecore/kmdcodec.h b/microkde/kdecore/kmdcodec.h
index 2c4d611..616b683 100644
--- a/microkde/kdecore/kmdcodec.h
+++ b/microkde/kdecore/kmdcodec.h
@@ -39,6 +39,8 @@
39#include <qglobal.h> 39#include <qglobal.h>
40#include <qstring.h> 40#include <qstring.h>
41#include <qiodevice.h> 41#include <qiodevice.h>
42//Added by qt3to4:
43#include <Q3CString>
42 44
43/** 45/**
44 * A wrapper class for the most commonly used encoding and 46 * A wrapper class for the most commonly used encoding and
@@ -81,7 +83,7 @@ public:
81 * breaks, too. 83 * breaks, too.
82 * @return quoted-printable encoded data. 84 * @return quoted-printable encoded data.
83 */ 85 */
84 static QCString quotedPrintableEncode(const QByteArray & in, 86 static Q3CString quotedPrintableEncode(const QByteArray & in,
85 bool useCRLF = true); 87 bool useCRLF = true);
86 88
87 /** 89 /**
@@ -96,7 +98,7 @@ public:
96 * breaks, too. 98 * breaks, too.
97 * @return quoted-printable encoded data. 99 * @return quoted-printable encoded data.
98 */ 100 */
99 static QCString quotedPrintableEncode(const QCString & str, 101 static Q3CString quotedPrintableEncode(const Q3CString & str,
100 bool useCRLF = true); 102 bool useCRLF = true);
101 103
102 /** 104 /**
@@ -129,7 +131,7 @@ public:
129 * @param in the data to be decoded. 131 * @param in the data to be decoded.
130 * @return decoded data. 132 * @return decoded data.
131 */ 133 */
132 static QCString quotedPrintableDecode(const QByteArray & in); 134 static Q3CString quotedPrintableDecode(const QByteArray & in);
133 135
134 /** 136 /**
135 * @overload 137 * @overload
@@ -140,7 +142,7 @@ public:
140 * @param str the data to be decoded. 142 * @param str the data to be decoded.
141 * @return decoded data. 143 * @return decoded data.
142 */ 144 */
143 static QCString quotedPrintableDecode(const QCString & str); 145 static Q3CString quotedPrintableDecode(const Q3CString & str);
144 146
145 /** 147 /**
146 * Decodes a quoted-printable encoded data. 148 * Decodes a quoted-printable encoded data.
@@ -175,7 +177,7 @@ public:
175 * @param in the data to be uuencoded 177 * @param in the data to be uuencoded
176 * @return a uuencoded data. 178 * @return a uuencoded data.
177 */ 179 */
178 static QCString uuencode( const QByteArray& in ); 180 static Q3CString uuencode( const QByteArray& in );
179 181
180 /** 182 /**
181 * @overload 183 * @overload
@@ -186,7 +188,7 @@ public:
186 * @param str the string to be uuencoded. 188 * @param str the string to be uuencoded.
187 * @return the encoded string. 189 * @return the encoded string.
188 */ 190 */
189 static QCString uuencode( const QCString& str ); 191 static Q3CString uuencode( const Q3CString& str );
190 192
191 /** 193 /**
192 * Encodes the given data using the uuencode algorithm. 194 * Encodes the given data using the uuencode algorithm.
@@ -215,7 +217,7 @@ public:
215 * @param in the data uuencoded data to be decoded. 217 * @param in the data uuencoded data to be decoded.
216 * @return a decoded string. 218 * @return a decoded string.
217 */ 219 */
218 static QCString uudecode( const QByteArray& in ); 220 static Q3CString uudecode( const QByteArray& in );
219 221
220 /** 222 /**
221 * @overload 223 * @overload
@@ -226,7 +228,7 @@ public:
226 * @param str the string to be decoded. 228 * @param str the string to be decoded.
227 * @return a uudecoded string. 229 * @return a uudecoded string.
228 */ 230 */
229 static QCString uudecode( const QCString& str ); 231 static Q3CString uudecode( const Q3CString& str );
230 232
231 /** 233 /**
232 * Decodes the given data using the uudecode algorithm. 234 * Decodes the given data using the uudecode algorithm.
@@ -263,7 +265,7 @@ public:
263 * 265 *
264 * @return a base64 encoded string. 266 * @return a base64 encoded string.
265 */ 267 */
266 static QCString base64Encode( const QByteArray& in, bool insertLFs = false); 268 static Q3CString base64Encode( const QByteArray& in, bool insertLFs = false);
267 269
268 /** 270 /**
269 * @overload 271 * @overload
@@ -275,7 +277,7 @@ public:
275 * @param insertLFs limit the number of characters per line. 277 * @param insertLFs limit the number of characters per line.
276 * @return the decoded string. 278 * @return the decoded string.
277 */ 279 */
278 static QCString base64Encode( const QCString& str, bool insertLFs = false ); 280 static Q3CString base64Encode( const Q3CString& str, bool insertLFs = false );
279 281
280 /** 282 /**
281 * Encodes the given data using the base64 algorithm. 283 * Encodes the given data using the base64 algorithm.
@@ -308,7 +310,7 @@ public:
308 * @param in the base64-encoded data to be decoded. 310 * @param in the base64-encoded data to be decoded.
309 * @return the decoded data. 311 * @return the decoded data.
310 */ 312 */
311 static QCString base64Decode( const QByteArray& in ); 313 static Q3CString base64Decode( const QByteArray& in );
312 314
313 /** 315 /**
314 * @overload 316 * @overload
@@ -319,7 +321,7 @@ public:
319 * @param str the base64-encoded string. 321 * @param str the base64-encoded string.
320 * @return the decoded string. 322 * @return the decoded string.
321 */ 323 */
322 static QCString base64Decode( const QCString& str ); 324 static Q3CString base64Decode( const Q3CString& str );
323 325
324 /** 326 /**
325 * Decodes the given data that was encoded with the base64 327 * Decodes the given data that was encoded with the base64
@@ -431,7 +433,7 @@ public:
431 * 433 *
432 * Same as above except it accepts a QByteArray as its argument. 434 * Same as above except it accepts a QByteArray as its argument.
433 */ 435 */
434 KMD5(const QCString& a ); 436 KMD5(const Q3CString& a );
435 437
436 /** 438 /**
437 * Updates the message to be digested. Be sure to add all data 439 * Updates the message to be digested. Be sure to add all data
@@ -460,7 +462,7 @@ public:
460 * 462 *
461 * @param in message to be added to the digest (QByteArray). 463 * @param in message to be added to the digest (QByteArray).
462 */ 464 */
463 void update(const QCString& in ); 465 void update(const Q3CString& in );
464 466
465 /** 467 /**
466 * @overload 468 * @overload
@@ -502,18 +504,18 @@ public:
502 * Returns the value of the calculated message digest in 504 * Returns the value of the calculated message digest in
503 * a hexadecimal representation. 505 * a hexadecimal representation.
504 */ 506 */
505 QCString hexDigest (); 507 Q3CString hexDigest ();
506 508
507 /** 509 /**
508 * @overload 510 * @overload
509 */ 511 */
510 void hexDigest(QCString&); 512 void hexDigest(Q3CString&);
511 513
512 /** 514 /**
513 * Returns the value of the calculated message digest in 515 * Returns the value of the calculated message digest in
514 * a base64-encoded representation. 516 * a base64-encoded representation.
515 */ 517 */
516 QCString base64Digest (); 518 Q3CString base64Digest ();
517 519
518 /** 520 /**
519 * returns true if the calculated digest for the given 521 * returns true if the calculated digest for the given
@@ -524,7 +526,7 @@ public:
524 /** 526 /**
525 * @overload 527 * @overload
526 */ 528 */
527 bool verify(const QCString&); 529 bool verify(const Q3CString&);
528 530
529protected: 531protected:
530 /** 532 /**
diff --git a/microkde/kdecore/kprefs.cpp b/microkde/kdecore/kprefs.cpp
index 0220a34..d4010fa 100644
--- a/microkde/kdecore/kprefs.cpp
+++ b/microkde/kdecore/kprefs.cpp
@@ -21,6 +21,8 @@
21// $Id$ 21// $Id$
22 22
23#include <qcolor.h> 23#include <qcolor.h>
24//Added by qt3to4:
25#include <Q3ValueList>
24 26
25#include <kconfig.h> 27#include <kconfig.h>
26#include <kstandarddirs.h> 28#include <kstandarddirs.h>
@@ -140,8 +142,8 @@ class KPrefsItemStringList : public KPrefsItem {
140 142
141class KPrefsItemIntList : public KPrefsItem { 143class KPrefsItemIntList : public KPrefsItem {
142 public: 144 public:
143 KPrefsItemIntList(const QString &group,const QString &name,QValueList<int> *, 145 KPrefsItemIntList(const QString &group,const QString &name,Q3ValueList<int> *,
144 const QValueList<int> &defaultValue=QValueList<int>()); 146 const Q3ValueList<int> &defaultValue=Q3ValueList<int>());
145 virtual ~KPrefsItemIntList() {} 147 virtual ~KPrefsItemIntList() {}
146 148
147 void setDefault(); 149 void setDefault();
@@ -149,8 +151,8 @@ class KPrefsItemIntList : public KPrefsItem {
149 void writeConfig(KConfig *); 151 void writeConfig(KConfig *);
150 152
151 private: 153 private:
152 QValueList<int> *mReference; 154 Q3ValueList<int> *mReference;
153 QValueList<int> mDefault; 155 Q3ValueList<int> mDefault;
154}; 156};
155 157
156 158
@@ -364,7 +366,7 @@ void KPrefsItemStringList::readConfig(KConfig *config)
364 366
365 367
366KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name, 368KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name,
367 QValueList<int> *reference,const QValueList<int> &defaultValue) : 369 Q3ValueList<int> *reference,const Q3ValueList<int> &defaultValue) :
368 KPrefsItem(group,name) 370 KPrefsItem(group,name)
369{ 371{
370 mReference = reference; 372 mReference = reference;
@@ -505,8 +507,8 @@ void KPrefs::addItemStringList(const QString &key,QStringList *reference,
505 addItem(new KPrefsItemStringList(*mCurrentGroup,key,reference,defaultValue)); 507 addItem(new KPrefsItemStringList(*mCurrentGroup,key,reference,defaultValue));
506} 508}
507 509
508void KPrefs::addItemIntList(const QString &key,QValueList<int> *reference, 510void KPrefs::addItemIntList(const QString &key,Q3ValueList<int> *reference,
509 const QValueList<int> &defaultValue) 511 const Q3ValueList<int> &defaultValue)
510{ 512{
511 addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,defaultValue)); 513 addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,defaultValue));
512} 514}
diff --git a/microkde/kdecore/kprefs.h b/microkde/kdecore/kprefs.h
index 95d2724..d9d1572 100644
--- a/microkde/kdecore/kprefs.h
+++ b/microkde/kdecore/kprefs.h
@@ -21,11 +21,13 @@
21#define _KPREFS_H 21#define _KPREFS_H
22// $Id$ 22// $Id$
23 23
24#include <qptrlist.h> 24#include <q3ptrlist.h>
25#include <qcolor.h> 25#include <qcolor.h>
26#include <qfont.h> 26#include <qfont.h>
27#include <qsize.h> 27#include <qsize.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29//Added by qt3to4:
30#include <Q3ValueList>
29 31
30class KConfig; 32class KConfig;
31 33
@@ -283,8 +285,8 @@ class KPrefs {
283 when the config file does not yet contain the key of 285 when the config file does not yet contain the key of
284 this item. 286 this item.
285 */ 287 */
286 void addItemIntList(const QString &key,QValueList<int> *reference, 288 void addItemIntList(const QString &key,Q3ValueList<int> *reference,
287 const QValueList<int> &defaultValue=QValueList<int>()); 289 const Q3ValueList<int> &defaultValue=Q3ValueList<int>());
288 290
289 protected: 291 protected:
290 /** 292 /**
@@ -310,7 +312,7 @@ class KPrefs {
310 312
311 KConfig *mConfig; // pointer to KConfig object 313 KConfig *mConfig; // pointer to KConfig object
312 314
313 QPtrList<KPrefsItem> mItems; 315 Q3PtrList<KPrefsItem> mItems;
314}; 316};
315 317
316#endif 318#endif
diff --git a/microkde/kdecore/kshortcut.h b/microkde/kdecore/kshortcut.h
index 4813734..244d590 100644
--- a/microkde/kdecore/kshortcut.h
+++ b/microkde/kdecore/kshortcut.h
@@ -563,7 +563,7 @@ class KShortcut
563 * @param keyQt the qt keycode 563 * @param keyQt the qt keycode
564 * @see Qt::Key 564 * @see Qt::Key
565 */ 565 */
566 KShortcut( int keyQt ) {} 566 KShortcut( int /*keyQt */) {}
567 567
568 /** 568 /**
569 * Creates a new shortcut that contains only the given qt key 569 * Creates a new shortcut that contains only the given qt key
@@ -599,7 +599,7 @@ class KShortcut
599 * @param shortcut the description of the key 599 * @param shortcut the description of the key
600 * @see KKeySequence::KKeySequence(const QString&) 600 * @see KKeySequence::KKeySequence(const QString&)
601 */ 601 */
602 KShortcut( const char* shortcut ) {} 602 KShortcut( const char* /*shortcut */) {}
603 603
604 /** 604 /**
605 * Creates a new key sequence that contains the given key sequence. 605 * Creates a new key sequence that contains the given key sequence.
@@ -608,7 +608,7 @@ class KShortcut
608 * @param shortcut the description of the key 608 * @param shortcut the description of the key
609 * @see KKeySequence::KKeySequence(const QString&) 609 * @see KKeySequence::KKeySequence(const QString&)
610 */ 610 */
611 KShortcut( const QString& shortcut ) {} 611 KShortcut( const QString& /*shortcut */) {}
612 ~KShortcut() {} 612 ~KShortcut() {}
613 613
614 /** 614 /**
@@ -816,7 +816,7 @@ class KShortcut
816 /** 816 /**
817 * @internal 817 * @internal
818 */ 818 */
819 QString toStringInternal( const KShortcut* pcutDefault = 0 ) const 819 QString toStringInternal( const KShortcut* /*pcutDefault*/ = 0 ) const
820 { 820 {
821 return "EMPTY IMPL."; 821 return "EMPTY IMPL.";
822 } 822 }
diff --git a/microkde/kdecore/kstandarddirs.cpp b/microkde/kdecore/kstandarddirs.cpp
index d5bfefd..f10934b 100644
--- a/microkde/kdecore/kstandarddirs.cpp
+++ b/microkde/kdecore/kstandarddirs.cpp
@@ -37,8 +37,8 @@
37//US#include <pwd.h> 37//US#include <pwd.h>
38 38
39#include <qregexp.h> 39#include <qregexp.h>
40#include <qasciidict.h> 40#include <q3asciidict.h>
41#include <qdict.h> 41#include <q3dict.h>
42#include <qdir.h> 42#include <qdir.h>
43#include <qfileinfo.h> 43#include <qfileinfo.h>
44#include <qstring.h> 44#include <qstring.h>
@@ -46,6 +46,8 @@
46#include <qapplication.h> 46#include <qapplication.h>
47 47
48#include <qstringlist.h> 48#include <qstringlist.h>
49//Added by qt3to4:
50#include <Q3CString>
49 51
50#include "kstandarddirs.h" 52#include "kstandarddirs.h"
51#include "kconfig.h" 53#include "kconfig.h"
@@ -59,15 +61,15 @@
59QString KStandardDirs::mAppDir = QString::null; 61QString KStandardDirs::mAppDir = QString::null;
60 62
61 63
62template class QDict<QStringList>; 64template class Q3Dict<QStringList>;
63 65
64#if 0 66#if 0
65#include <qtextedit.h> 67#include <q3textedit.h>
66void ddd( QString op ) 68void ddd( QString op )
67{ 69{
68 static QTextEdit * dot = 0; 70 static Q3TextEdit * dot = 0;
69 if ( ! dot ) 71 if ( ! dot )
70 dot = new QTextEdit(); 72 dot = new Q3TextEdit();
71 73
72 dot->show(); 74 dot->show();
73 75
@@ -85,7 +87,7 @@ public:
85 87
86 bool restrictionsActive; 88 bool restrictionsActive;
87 bool dataRestrictionActive; 89 bool dataRestrictionActive;
88 QAsciiDict<bool> restrictions; 90 Q3AsciiDict<bool> restrictions;
89 QStringList xdgdata_prefixes; 91 QStringList xdgdata_prefixes;
90 QStringList xdgconf_prefixes; 92 QStringList xdgconf_prefixes;
91}; 93};
@@ -445,7 +447,7 @@ static void lookupDirectory(const QString& path, const QString &relPart,
445 continue; // No match 447 continue; // No match
446*/ 448*/
447//US this should do the same: 449//US this should do the same:
448 int pos = regexp.match(fn); 450 int pos = regexp.exactMatch(fn);
449 if (!recursive && !pos == 0) 451 if (!recursive && !pos == 0)
450 continue; // No match 452 continue; // No match
451 453
@@ -482,7 +484,7 @@ static void lookupDirectory(const QString& path, const QString &relPart,
482 continue; // No match 484 continue; // No match
483*/ 485*/
484//US this should do the same: 486//US this should do the same:
485 pos = regexp.match(fn); 487 pos = regexp.exactMatch(fn);
486 if (!pos == 0) 488 if (!pos == 0)
487 continue; // No match 489 continue; // No match
488 } 490 }
@@ -1108,7 +1110,7 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode)
1108//US struct stat st; 1110//US struct stat st;
1109 int pos = target.find('/', i); 1111 int pos = target.find('/', i);
1110 base += target.mid(i - 1, pos - i + 1); 1112 base += target.mid(i - 1, pos - i + 1);
1111 QCString baseEncoded = QFile::encodeName(base); 1113 Q3CString baseEncoded = QFile::encodeName(base);
1112 // bail out if we encountered a problem 1114 // bail out if we encountered a problem
1113//US if (stat(baseEncoded, &st) != 0) 1115//US if (stat(baseEncoded, &st) != 0)
1114 QFileInfo baseEncodedInfo(baseEncoded); 1116 QFileInfo baseEncodedInfo(baseEncoded);
@@ -1208,7 +1210,7 @@ QString readEnvPath(const char *env)
1208 //#ifdef _WIN32_ 1210 //#ifdef _WIN32_
1209 // return ""; 1211 // return "";
1210 //#else 1212 //#else
1211 QCString c_path; 1213 Q3CString c_path;
1212 if ( getenv(env) != NULL ) 1214 if ( getenv(env) != NULL )
1213 c_path = QString ( getenv(env) ); 1215 c_path = QString ( getenv(env) );
1214 if (c_path.isEmpty()) 1216 if (c_path.isEmpty())
diff --git a/microkde/kdecore/kstandarddirs.h b/microkde/kdecore/kstandarddirs.h
index 901384e..f0e28fc 100644
--- a/microkde/kdecore/kstandarddirs.h
+++ b/microkde/kdecore/kstandarddirs.h
@@ -24,7 +24,7 @@
24#define SSK_KSTDDIRS_H 24#define SSK_KSTDDIRS_H
25 25
26#include <qstring.h> 26#include <qstring.h>
27#include <qdict.h> 27#include <q3dict.h>
28#include <qstringlist.h> 28#include <qstringlist.h>
29#include <kglobal.h> 29#include <kglobal.h>
30 30
@@ -574,11 +574,11 @@ public:
574 QStringList prefixes; 574 QStringList prefixes;
575 575
576 // Directory dictionaries 576 // Directory dictionaries
577 QDict<QStringList> absolutes; 577 Q3Dict<QStringList> absolutes;
578 QDict<QStringList> relatives; 578 Q3Dict<QStringList> relatives;
579 579
580 mutable QDict<QStringList> dircache; 580 mutable Q3Dict<QStringList> dircache;
581 mutable QDict<QString> savelocations; 581 mutable Q3Dict<QString> savelocations;
582 582
583 // Disallow assignment and copy-construction 583 // Disallow assignment and copy-construction
584 KStandardDirs( const KStandardDirs& ); 584 KStandardDirs( const KStandardDirs& );
diff --git a/microkde/kdeui/kaction.cpp b/microkde/kdeui/kaction.cpp
index d38a6d5..c2df381 100644
--- a/microkde/kdeui/kaction.cpp
+++ b/microkde/kdeui/kaction.cpp
@@ -28,6 +28,9 @@
28#include <assert.h> 28#include <assert.h>
29 29
30#include <qtooltip.h> 30#include <qtooltip.h>
31//Added by qt3to4:
32#include <Q3CString>
33#include <Q3ValueList>
31//US#include <qwhatsthis.h> 34//US#include <qwhatsthis.h>
32//US#include <kaccel.h> 35//US#include <kaccel.h>
33//US#include <kaccelbase.h> 36//US#include <kaccelbase.h>
@@ -42,9 +45,9 @@
42 45
43//US added this includefiles 46//US added this includefiles
44#include <qmenubar.h> 47#include <qmenubar.h>
45#include <qtoolbar.h> 48#include <q3toolbar.h>
46#include <qpopupmenu.h> 49#include <q3popupmenu.h>
47#include <qiconset.h> 50#include <qicon.h>
48 51
49/** 52/**
50* How it works. 53* How it works.
@@ -87,7 +90,7 @@ public:
87 } 90 }
88 91
89 KAccel *m_kaccel; 92 KAccel *m_kaccel;
90 QValueList<KAccel*> m_kaccelList; 93 Q3ValueList<KAccel*> m_kaccelList;
91 94
92 QString m_groupText; 95 QString m_groupText;
93 QString m_group; 96 QString m_group;
@@ -107,7 +110,7 @@ public:
107 QWidget* m_representative; 110 QWidget* m_representative;
108 }; 111 };
109 112
110 QValueList<Container> m_containers; 113 Q3ValueList<Container> m_containers;
111}; 114};
112 115
113//--------------------------------------------------------------------- 116//---------------------------------------------------------------------
@@ -130,7 +133,7 @@ KAction::KAction( const QString& text, const QString& sIconName, const KShortcut
130 d->setIconName( sIconName ); 133 d->setIconName( sIconName );
131} 134}
132 135
133KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 136KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
134 const QObject* receiver, const char* slot, 137 const QObject* receiver, const char* slot,
135 KActionCollection* parent, const char* name ) 138 KActionCollection* parent, const char* name )
136: QObject( parent, name ) 139: QObject( parent, name )
@@ -164,7 +167,7 @@ KAction::KAction( const QString& text, const KShortcut& cut,
164{ 167{
165 initPrivate( text, cut, receiver, slot ); 168 initPrivate( text, cut, receiver, slot );
166} 169}
167KAction::KAction( const QString& text, const QIconSet& pix, 170KAction::KAction( const QString& text, const QIcon& pix,
168 const KShortcut& cut, 171 const KShortcut& cut,
169 QObject* parent, const char* name ) 172 QObject* parent, const char* name )
170 : QObject( parent, name ) 173 : QObject( parent, name )
@@ -182,7 +185,7 @@ KAction::KAction( const QString& text, const QString& pix,
182 d->setIconName( pix ); 185 d->setIconName( pix );
183} 186}
184 187
185KAction::KAction( const QString& text, const QIconSet& pix, 188KAction::KAction( const QString& text, const QIcon& pix,
186 const KShortcut& cut, 189 const KShortcut& cut,
187 const QObject* receiver, const char* slot, QObject* parent, 190 const QObject* receiver, const char* slot, QObject* parent,
188 const char* name ) 191 const char* name )
@@ -506,8 +509,8 @@ void KAction::updateShortcut( int i )
506 int id = itemId( i ); 509 int id = itemId( i );
507 510
508 QWidget* w = container( i ); 511 QWidget* w = container( i );
509 if ( w->inherits( "QPopupMenu" ) ) { 512 if ( w->inherits( "Q3PopupMenu" ) ) {
510 QPopupMenu* menu = static_cast<QPopupMenu*>(w); 513 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>(w);
511 updateShortcut( menu, id ); 514 updateShortcut( menu, id );
512 } 515 }
513 else if ( w->inherits( "QMenuBar" ) ) 516 else if ( w->inherits( "QMenuBar" ) )
@@ -518,7 +521,7 @@ void KAction::updateShortcut( int i )
518 521
519} 522}
520 523
521void KAction::updateShortcut( QPopupMenu* menu, int id ) 524void KAction::updateShortcut( Q3PopupMenu* menu, int id )
522{ 525{
523/*US 526/*US
524 //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl; 527 //kdDebug(129) << "KAction::updateShortcut(): this = " << this << " d->m_kaccelList.count() = " << d->m_kaccelList.count() << endl;
@@ -621,7 +624,7 @@ void KAction::updateToolTip( int i )
621 624
622 if ( w->inherits( "KToolBar" ) ) 625 if ( w->inherits( "KToolBar" ) )
623 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); 626 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
624 else if ( w->inherits( "QToolBar" ) ) 627 else if ( w->inherits( "Q3ToolBar" ) )
625 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); 628 QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() );
626} 629}
627 630
@@ -646,9 +649,9 @@ int KAction::plug( QWidget *w, int index )
646 649
647 plugShortcut(); 650 plugShortcut();
648 651
649 if ( w->inherits("QPopupMenu") ) 652 if ( w->inherits("Q3PopupMenu") )
650 { 653 {
651 QPopupMenu* menu = static_cast<QPopupMenu*>( w ); 654 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( w );
652 int id; 655 int id;
653 // Don't insert shortcut into menu if it's already in a KAccel object. 656 // Don't insert shortcut into menu if it's already in a KAccel object.
654 //qDebug("KAction::plug warning: real shortcuts not available yet. "); 657 //qDebug("KAction::plug warning: real shortcuts not available yet. ");
@@ -721,7 +724,7 @@ int KAction::plug( QWidget *w, int index )
721 SLOT( slotActivated() ), 724 SLOT( slotActivated() ),
722 d->isEnabled(), d->plainText(), index/*US, instance*/ ); 725 d->isEnabled(), d->plainText(), index/*US, instance*/ );
723 } 726 }
724 bar->getButton( id_ )->setName( QCString("toolbutton_")+name() ); 727 bar->getButton( id_ )->setName( Q3CString("toolbutton_")+name() );
725 728
726//US if ( !d->whatsThis().isEmpty() ) 729//US if ( !d->whatsThis().isEmpty() )
727//US QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() ); 730//US QWhatsThis::add( bar->getButton(id_), whatsThisWithIcon() );
@@ -749,9 +752,9 @@ void KAction::unplug( QWidget *w )
749 return; 752 return;
750 int id = itemId( i ); 753 int id = itemId( i );
751 754
752 if ( w->inherits( "QPopupMenu" ) ) 755 if ( w->inherits( "Q3PopupMenu" ) )
753 { 756 {
754 QPopupMenu *menu = static_cast<QPopupMenu *>( w ); 757 Q3PopupMenu *menu = static_cast<Q3PopupMenu *>( w );
755 menu->removeItem( id ); 758 menu->removeItem( id );
756 } 759 }
757 else if ( w->inherits( "KToolBar" ) ) 760 else if ( w->inherits( "KToolBar" ) )
@@ -862,8 +865,8 @@ void KAction::updateEnabled( int i )
862{ 865{
863 QWidget *w = container( i ); 866 QWidget *w = container( i );
864 867
865 if ( w->inherits("QPopupMenu") ) 868 if ( w->inherits("Q3PopupMenu") )
866 static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); 869 static_cast<Q3PopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
867 else if ( w->inherits("QMenuBar") ) 870 else if ( w->inherits("QMenuBar") )
868 static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); 871 static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() );
869 else if ( w->inherits( "KToolBar" ) ) 872 else if ( w->inherits( "KToolBar" ) )
@@ -906,10 +909,10 @@ void KAction::updateText( int i )
906{ 909{
907 QWidget *w = container( i ); 910 QWidget *w = container( i );
908 911
909 if ( w->inherits( "QPopupMenu" ) ) { 912 if ( w->inherits( "Q3PopupMenu" ) ) {
910 int id = itemId( i ); 913 int id = itemId( i );
911 static_cast<QPopupMenu*>(w)->changeItem( id, d->text() ); 914 static_cast<Q3PopupMenu*>(w)->changeItem( id, d->text() );
912 updateShortcut( static_cast<QPopupMenu*>(w), id ); 915 updateShortcut( static_cast<Q3PopupMenu*>(w), id );
913 } 916 }
914 else if ( w->inherits( "QMenuBar" ) ) 917 else if ( w->inherits( "QMenuBar" ) )
915 static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() ); 918 static_cast<QMenuBar*>(w)->changeItem( itemId( i ), d->text() );
@@ -947,16 +950,16 @@ void KAction::updateIcon( int id )
947{ 950{
948 QWidget* w = container( id ); 951 QWidget* w = container( id );
949 952
950 if ( w->inherits( "QPopupMenu" ) ) { 953 if ( w->inherits( "Q3PopupMenu" ) ) {
951 int itemId_ = itemId( id ); 954 int itemId_ = itemId( id );
952 static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() ); 955 static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() );
953 updateShortcut( static_cast<QPopupMenu*>(w), itemId_ ); 956 updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
954 } 957 }
955 else if ( w->inherits( "QMenuBar" ) ) 958 else if ( w->inherits( "QMenuBar" ) )
956 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); 959 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() );
957 else if ( w->inherits( "KToolBar" ) ) 960 else if ( w->inherits( "KToolBar" ) )
958 static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); 961 static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
959 else if ( w->inherits( "QToolBar" ) ) 962 else if ( w->inherits( "Q3ToolBar" ) )
960 { 963 {
961 qDebug("KAction::updateIcon has top be fixed"); 964 qDebug("KAction::updateIcon has top be fixed");
962//US static_cast<QToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); 965//US static_cast<QToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
@@ -968,7 +971,7 @@ QString KAction::icon() const
968 return d->iconName( ); 971 return d->iconName( );
969} 972}
970 973
971void KAction::setIconSet( const QIconSet &iconset ) 974void KAction::setIconSet( const QIcon &iconset )
972{ 975{
973 d->setIconSet( iconset ); 976 d->setIconSet( iconset );
974 977
@@ -982,11 +985,11 @@ void KAction::updateIconSet( int id )
982{ 985{
983 QWidget *w = container( id ); 986 QWidget *w = container( id );
984 987
985 if ( w->inherits( "QPopupMenu" ) ) 988 if ( w->inherits( "Q3PopupMenu" ) )
986 { 989 {
987 int itemId_ = itemId( id ); 990 int itemId_ = itemId( id );
988 static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() ); 991 static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() );
989 updateShortcut( static_cast<QPopupMenu*>(w), itemId_ ); 992 updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ );
990 } 993 }
991 else if ( w->inherits( "QMenuBar" ) ) 994 else if ( w->inherits( "QMenuBar" ) )
992 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); 995 static_cast<QMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() );
@@ -999,7 +1002,7 @@ void KAction::updateIconSet( int id )
999 } 1002 }
1000} 1003}
1001 1004
1002QIconSet KAction::iconSet( KIcon::Group group, int size ) const 1005QIcon KAction::iconSet( KIcon::Group group, int size ) const
1003{ 1006{
1004 return d->iconSet( group, size ); 1007 return d->iconSet( group, size );
1005} 1008}
@@ -1022,7 +1025,7 @@ void KAction::setWhatsThis( const QString& text )
1022void KAction::updateWhatsThis( int i ) 1025void KAction::updateWhatsThis( int i )
1023{ 1026{
1024 qDebug("KAction::updateWhatsThis ...1 has top be fixed"); 1027 qDebug("KAction::updateWhatsThis ...1 has top be fixed");
1025 QPopupMenu* pm = popupMenu( i ); 1028 Q3PopupMenu* pm = popupMenu( i );
1026 if ( pm ) 1029 if ( pm )
1027 { 1030 {
1028 pm->setWhatsThis( itemId( i ), d->whatsThis() ); 1031 pm->setWhatsThis( itemId( i ), d->whatsThis() );
@@ -1064,10 +1067,10 @@ KToolBar* KAction::toolBar( int index ) const
1064 return (KToolBar *)( d->m_containers[ index ].m_container ); 1067 return (KToolBar *)( d->m_containers[ index ].m_container );
1065} 1068}
1066 1069
1067QPopupMenu* KAction::popupMenu( int index ) const 1070Q3PopupMenu* KAction::popupMenu( int index ) const
1068{ 1071{
1069//US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container ); 1072//US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container );
1070 return (QPopupMenu *)( d->m_containers[ index ].m_container ); 1073 return (Q3PopupMenu *)( d->m_containers[ index ].m_container );
1071} 1074}
1072 1075
1073QWidget* KAction::representative( int index ) const 1076QWidget* KAction::representative( int index ) const
@@ -1155,7 +1158,7 @@ void KAction::slotDestroyed()
1155int KAction::findContainer( const QWidget* widget ) const 1158int KAction::findContainer( const QWidget* widget ) const
1156{ 1159{
1157 int pos = 0; 1160 int pos = 0;
1158 QValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin(); 1161 Q3ValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin();
1159 while( it != d->m_containers.end() ) 1162 while( it != d->m_containers.end() )
1160 { 1163 {
1161 if ( (*it).m_representative == widget || (*it).m_container == widget ) 1164 if ( (*it).m_representative == widget || (*it).m_container == widget )
@@ -1170,7 +1173,7 @@ int KAction::findContainer( const QWidget* widget ) const
1170void KAction::removeContainer( int index ) 1173void KAction::removeContainer( int index )
1171{ 1174{
1172 int i = 0; 1175 int i = 0;
1173 QValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin(); 1176 Q3ValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin();
1174 while( it != d->m_containers.end() ) 1177 while( it != d->m_containers.end() )
1175 { 1178 {
1176 if ( i == index ) 1179 if ( i == index )
diff --git a/microkde/kdeui/kaction.h b/microkde/kdeui/kaction.h
index 13e2e1e..5c690ec 100644
--- a/microkde/kdeui/kaction.h
+++ b/microkde/kdeui/kaction.h
@@ -29,8 +29,10 @@
29 29
30//US #include <qkeysequence.h> 30//US #include <qkeysequence.h>
31#include <qobject.h> 31#include <qobject.h>
32#include <qvaluelist.h> 32#include <q3valuelist.h>
33#include <qguardedptr.h> 33#include <qpointer.h>
34//Added by qt3to4:
35#include <Q3PopupMenu>
34#include <kguiitem.h> 36#include <kguiitem.h>
35#include <kshortcut.h> 37#include <kshortcut.h>
36#include <kstdaction.h> 38#include <kstdaction.h>
@@ -40,10 +42,10 @@
40#include <kiconloader.h> 42#include <kiconloader.h>
41 43
42class QMenuBar; 44class QMenuBar;
43class QPopupMenu; 45class Q3PopupMenu;
44//USclass QComboBox; 46//USclass QComboBox;
45//USclass QPoint; 47//USclass QPoint;
46class QIconSet; 48class QIcon;
47class QString; 49class QString;
48class KToolBar; 50class KToolBar;
49 51
@@ -259,7 +261,7 @@ public:
259 * @param name An internal name for this action. 261 * @param name An internal name for this action.
260 */ 262 */
261 263
262 KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 264 KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
263 const QObject* receiver, const char* slot, 265 const QObject* receiver, const char* slot,
264 KActionCollection* parent, const char* name ); 266 KActionCollection* parent, const char* name );
265 267
@@ -308,7 +310,7 @@ public:
308 /** 310 /**
309 * @obsolete 311 * @obsolete
310 */ 312 */
311 KAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 313 KAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
312 QObject* parent = 0, const char* name = 0 ); 314 QObject* parent = 0, const char* name = 0 );
313 /** 315 /**
314 * @obsolete 316 * @obsolete
@@ -318,7 +320,7 @@ public:
318 /** 320 /**
319 * @obsolete 321 * @obsolete
320 */ 322 */
321 KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 323 KAction( const QString& text, const QIcon& pix, const KShortcut& cut,
322 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); 324 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
323 /** 325 /**
324 * @obsolete 326 * @obsolete
@@ -461,10 +463,10 @@ public:
461 * Get the QIconSet from which the icons used to display this action will 463 * Get the QIconSet from which the icons used to display this action will
462 * be chosen. 464 * be chosen.
463 */ 465 */
464 virtual QIconSet iconSet( KIcon::Group group, int size=0 ) const; 466 virtual QIcon iconSet( KIcon::Group group, int size=0 ) const;
465 467
466#ifndef KDE_NO_COMPAT 468#ifndef KDE_NO_COMPAT
467 QIconSet iconSet() const 469 QIcon iconSet() const
468 { 470 {
469 return iconSet( KIcon::Small ); 471 return iconSet( KIcon::Small );
470 } 472 }
@@ -518,7 +520,7 @@ public slots:
518 * Sets the QIconSet from which the icons used to display this action will 520 * Sets the QIconSet from which the icons used to display this action will
519 * be chosen. 521 * be chosen.
520 */ 522 */
521 virtual void setIconSet( const QIconSet &iconSet ); 523 virtual void setIconSet( const QIcon &iconSet );
522 524
523 virtual void setIcon( const QString& icon ); 525 virtual void setIcon( const QString& icon );
524 526
@@ -546,7 +548,7 @@ protected slots:
546 548
547protected: 549protected:
548 KToolBar* toolBar( int index ) const; 550 KToolBar* toolBar( int index ) const;
549 QPopupMenu* popupMenu( int index ) const; 551 Q3PopupMenu* popupMenu( int index ) const;
550 void removeContainer( int index ); 552 void removeContainer( int index );
551 int findContainer( const QWidget* widget ) const; 553 int findContainer( const QWidget* widget ) const;
552 void plugMainWindowAccel( QWidget *w ); 554 void plugMainWindowAccel( QWidget *w );
@@ -555,7 +557,7 @@ protected:
555 void addContainer( QWidget* parent, QWidget* representative ); 557 void addContainer( QWidget* parent, QWidget* representative );
556 558
557 virtual void updateShortcut( int i ); 559 virtual void updateShortcut( int i );
558 virtual void updateShortcut( QPopupMenu* menu, int id ); 560 virtual void updateShortcut( Q3PopupMenu* menu, int id );
559 virtual void updateGroup( int id ); 561 virtual void updateGroup( int id );
560 virtual void updateText(int i ); 562 virtual void updateText(int i );
561 virtual void updateEnabled(int i); 563 virtual void updateEnabled(int i);
diff --git a/microkde/kdeui/kactionclasses.cpp b/microkde/kdeui/kactionclasses.cpp
index 82e6c8b..c611865 100644
--- a/microkde/kdeui/kactionclasses.cpp
+++ b/microkde/kdeui/kactionclasses.cpp
@@ -28,9 +28,11 @@
28#include <assert.h> 28#include <assert.h>
29 29
30#include <qfontdatabase.h> 30#include <qfontdatabase.h>
31#include <qobjectlist.h> 31#include <qobject.h>
32//US#include <qwhatsthis.h> 32//US#include <qwhatsthis.h>
33#include <qtimer.h> 33#include <qtimer.h>
34//Added by qt3to4:
35#include <Q3ValueList>
34 36
35//US#include <kaccel.h> 37//US#include <kaccel.h>
36//US#include <kapplication.h> 38//US#include <kapplication.h>
@@ -48,13 +50,13 @@
48//US added the following includefiles 50//US added the following includefiles
49#include <kconfigbase.h> 51#include <kconfigbase.h>
50#include <qwidget.h> 52#include <qwidget.h>
51#include <qpopupmenu.h> 53#include <q3popupmenu.h>
52#include <qmenubar.h> 54#include <qmenubar.h>
53#include <qmainwindow.h> 55#include <q3mainwindow.h>
54#include <qtoolbar.h> 56#include <q3toolbar.h>
55#include <qcombobox.h> 57#include <qcombobox.h>
56#include <qmainwindow.h> 58#include <q3mainwindow.h>
57 59#include <qcoreapplication.h>
58 60
59static QFontDatabase *fontDataBase = 0; 61static QFontDatabase *fontDataBase = 0;
60 62
@@ -83,7 +85,7 @@ static void get_fonts( QStringList &lst )
83 lst.sort(); 85 lst.sort();
84} 86}
85 87
86static QValueList<int> get_standard_font_sizes() 88static Q3ValueList<int> get_standard_font_sizes()
87{ 89{
88 if ( !fontDataBase ) { 90 if ( !fontDataBase ) {
89 fontDataBase = new QFontDatabase(); 91 fontDataBase = new QFontDatabase();
@@ -120,7 +122,7 @@ KToggleAction::KToggleAction( const QString& text, const KShortcut& cut,
120 d = new KToggleActionPrivate; 122 d = new KToggleActionPrivate;
121} 123}
122 124
123KToggleAction::KToggleAction( const QString& text, const QIconSet& pix, 125KToggleAction::KToggleAction( const QString& text, const QIcon& pix,
124 const KShortcut& cut, 126 const KShortcut& cut,
125 QObject* parent, const char* name ) 127 QObject* parent, const char* name )
126 : KAction( text, pix, cut, parent, name ) 128 : KAction( text, pix, cut, parent, name )
@@ -136,7 +138,7 @@ KToggleAction::KToggleAction( const QString& text, const QString& pix,
136 d = new KToggleActionPrivate; 138 d = new KToggleActionPrivate;
137} 139}
138 140
139KToggleAction::KToggleAction( const QString& text, const QIconSet& pix, 141KToggleAction::KToggleAction( const QString& text, const QIcon& pix,
140 const KShortcut& cut, 142 const KShortcut& cut,
141 const QObject* receiver, 143 const QObject* receiver,
142 const char* slot, QObject* parent, 144 const char* slot, QObject* parent,
@@ -169,7 +171,7 @@ KToggleAction::~KToggleAction()
169 171
170int KToggleAction::plug( QWidget* widget, int index ) 172int KToggleAction::plug( QWidget* widget, int index )
171{ 173{
172 if ( !widget->inherits("QPopupMenu") && !widget->inherits("KToolBar") ) 174 if ( !widget->inherits("Q3PopupMenu") && !widget->inherits("KToolBar") )
173 { 175 {
174 kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; 176 kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl;
175 return -1; 177 return -1;
@@ -184,11 +186,11 @@ int KToggleAction::plug( QWidget* widget, int index )
184 if ( _index == -1 ) 186 if ( _index == -1 )
185 return _index; 187 return _index;
186 188
187 if ( widget->inherits("QPopupMenu") ) 189 if ( widget->inherits("Q3PopupMenu") )
188 { 190 {
189 int id = itemId( _index ); 191 int id = itemId( _index );
190 192
191 static_cast<QPopupMenu*>(widget)->setItemChecked( id, d->m_checked ); 193 static_cast<Q3PopupMenu*>(widget)->setItemChecked( id, d->m_checked );
192 } else if ( widget->inherits( "KToolBar" ) ) { 194 } else if ( widget->inherits( "KToolBar" ) ) {
193 195
194 KToolBar *bar = static_cast<KToolBar *>( widget ); 196 KToolBar *bar = static_cast<KToolBar *>( widget );
@@ -214,13 +216,12 @@ void KToggleAction::setChecked( bool c )
214 updateChecked( i ); 216 updateChecked( i );
215 217
216 if ( c && parent() && !exclusiveGroup().isEmpty() ) { 218 if ( c && parent() && !exclusiveGroup().isEmpty() ) {
217 const QObjectList *list = parent()->children(); 219 const QObjectList list = parent()->children();
218 if ( list ) { 220 if ( !list.empty() ) {
219 QObjectListIt it( *list ); 221 for(QObjectList::const_iterator it=list.begin();it!=list.end();++it) {
220 for( ; it.current(); ++it ) { 222 if ( (*it)->inherits( "KToggleAction" ) && (*it) != this &&
221 if ( it.current()->inherits( "KToggleAction" ) && it.current() != this && 223 static_cast<KToggleAction*>((*it))->exclusiveGroup() == exclusiveGroup() ) {
222 static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { 224 KToggleAction *a = static_cast<KToggleAction*>(*it);
223 KToggleAction *a = static_cast<KToggleAction*>(it.current());
224 if( a->isChecked() ) { 225 if( a->isChecked() ) {
225 a->setChecked( false ); 226 a->setChecked( false );
226 emit a->toggled( false ); 227 emit a->toggled( false );
@@ -235,8 +236,8 @@ void KToggleAction::updateChecked( int id )
235{ 236{
236 QWidget *w = container( id ); 237 QWidget *w = container( id );
237 238
238 if ( w->inherits( "QPopupMenu" ) ) 239 if ( w->inherits( "Q3PopupMenu" ) )
239 static_cast<QPopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked ); 240 static_cast<Q3PopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked );
240 else if ( w->inherits( "QMenuBar" ) ) 241 else if ( w->inherits( "QMenuBar" ) )
241 static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); 242 static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked );
242 else if ( w->inherits( "KToolBar" ) ) 243 else if ( w->inherits( "KToolBar" ) )
@@ -283,7 +284,7 @@ KRadioAction::KRadioAction( const QString& text, const KShortcut& cut,
283{ 284{
284} 285}
285 286
286KRadioAction::KRadioAction( const QString& text, const QIconSet& pix, 287KRadioAction::KRadioAction( const QString& text, const QIcon& pix,
287 const KShortcut& cut, 288 const KShortcut& cut,
288 QObject* parent, const char* name ) 289 QObject* parent, const char* name )
289: KToggleAction( text, pix, cut, parent, name ) 290: KToggleAction( text, pix, cut, parent, name )
@@ -297,7 +298,7 @@ KRadioAction::KRadioAction( const QString& text, const QString& pix,
297{ 298{
298} 299}
299 300
300KRadioAction::KRadioAction( const QString& text, const QIconSet& pix, 301KRadioAction::KRadioAction( const QString& text, const QIcon& pix,
301 const KShortcut& cut, 302 const KShortcut& cut,
302 const QObject* receiver, const char* slot, 303 const QObject* receiver, const char* slot,
303 QObject* parent, const char* name ) 304 QObject* parent, const char* name )
@@ -349,7 +350,7 @@ public:
349 } 350 }
350 bool m_edit; 351 bool m_edit;
351 bool m_menuAccelsEnabled; 352 bool m_menuAccelsEnabled;
352 QPopupMenu *m_menu; 353 Q3PopupMenu *m_menu;
353 int m_current; 354 int m_current;
354 int m_comboWidth; 355 int m_comboWidth;
355 QStringList m_list; 356 QStringList m_list;
@@ -387,7 +388,7 @@ KSelectAction::KSelectAction( const QString& text, const KShortcut& cut,
387 d = new KSelectActionPrivate; 388 d = new KSelectActionPrivate;
388} 389}
389 390
390KSelectAction::KSelectAction( const QString& text, const QIconSet& pix, 391KSelectAction::KSelectAction( const QString& text, const QIcon& pix,
391 const KShortcut& cut, 392 const KShortcut& cut,
392 QObject* parent, const char* name ) 393 QObject* parent, const char* name )
393 : KAction( text, pix, cut, parent, name ) 394 : KAction( text, pix, cut, parent, name )
@@ -403,7 +404,7 @@ KSelectAction::KSelectAction( const QString& text, const QString& pix,
403 d = new KSelectActionPrivate; 404 d = new KSelectActionPrivate;
404} 405}
405 406
406KSelectAction::KSelectAction( const QString& text, const QIconSet& pix, 407KSelectAction::KSelectAction( const QString& text, const QIcon& pix,
407 const KShortcut& cut, 408 const KShortcut& cut,
408 const QObject* receiver, 409 const QObject* receiver,
409 const char* slot, QObject* parent, 410 const char* slot, QObject* parent,
@@ -439,7 +440,7 @@ KSelectAction::~KSelectAction()
439void KSelectAction::setCurrentItem( int id ) 440void KSelectAction::setCurrentItem( int id )
440{ 441{
441 if ( id >= (int)d->m_list.count() ) { 442 if ( id >= (int)d->m_list.count() ) {
442 ASSERT(id < (int)d->m_list.count()); 443 Q_ASSERT(id < (int)d->m_list.count());
443 return; 444 return;
444 } 445 }
445 446
@@ -479,13 +480,13 @@ void KSelectAction::setComboWidth( int width )
479 updateComboWidth( i ); 480 updateComboWidth( i );
480 481
481} 482}
482QPopupMenu* KSelectAction::popupMenu() const 483Q3PopupMenu* KSelectAction::popupMenu() const
483{ 484{
484 kdDebug(129) << "KSelectAction::popupMenu()" << endl; // remove -- ellis 485 kdDebug(129) << "KSelectAction::popupMenu()" << endl; // remove -- ellis
485 if ( !d->m_menu ) 486 if ( !d->m_menu )
486 { 487 {
487//US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); 488//US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()");
488 d->m_menu = new QPopupMenu(0L, "QSelectAction::popupMenu()"); 489 d->m_menu = new Q3PopupMenu(0L, "QSelectAction::popupMenu()");
489 setupMenu(); 490 setupMenu();
490 if ( d->m_current >= 0 ) 491 if ( d->m_current >= 0 )
491 d->m_menu->setItemChecked( d->m_current, true ); 492 d->m_menu->setItemChecked( d->m_current, true );
@@ -643,12 +644,12 @@ int KSelectAction::plug( QWidget *widget, int index )
643//US return -1; 644//US return -1;
644 645
645 kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis 646 kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
646 if ( widget->inherits("QPopupMenu") ) 647 if ( widget->inherits("Q3PopupMenu") )
647 { 648 {
648 // Create the PopupMenu and store it in m_menu 649 // Create the PopupMenu and store it in m_menu
649 (void)popupMenu(); 650 (void)popupMenu();
650 651
651 QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); 652 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
652 int id; 653 int id;
653 654
654 if ( hasIconSet() ) 655 if ( hasIconSet() )
@@ -682,7 +683,7 @@ int KSelectAction::plug( QWidget *widget, int index )
682 if ( cb ) 683 if ( cb )
683 { 684 {
684 cb->setMaximumHeight( 34 ); 685 cb->setMaximumHeight( 34 );
685 if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus); 686 if (!isEditable()) cb->setFocusPolicy(Qt::NoFocus);
686 cb->setMinimumWidth( cb->sizeHint().width() ); 687 cb->setMinimumWidth( cb->sizeHint().width() );
687 if ( d->m_comboWidth > 0 ) 688 if ( d->m_comboWidth > 0 )
688 { 689 {
@@ -852,7 +853,7 @@ KListAction::KListAction( const QString& text, const KShortcut& cut,
852 connect( this, SIGNAL( activated( int ) ), receiver, slot ); 853 connect( this, SIGNAL( activated( int ) ), receiver, slot );
853} 854}
854 855
855KListAction::KListAction( const QString& text, const QIconSet& pix, 856KListAction::KListAction( const QString& text, const QIcon& pix,
856 const KShortcut& cut, 857 const KShortcut& cut,
857 QObject* parent, const char* name ) 858 QObject* parent, const char* name )
858 : KSelectAction( text, pix, cut, parent, name ) 859 : KSelectAction( text, pix, cut, parent, name )
@@ -868,7 +869,7 @@ KListAction::KListAction( const QString& text, const QString& pix,
868 d = new KListActionPrivate; 869 d = new KListActionPrivate;
869} 870}
870 871
871KListAction::KListAction( const QString& text, const QIconSet& pix, 872KListAction::KListAction( const QString& text, const QIcon& pix,
872 const KShortcut& cut, const QObject* receiver, 873 const KShortcut& cut, const QObject* receiver,
873 const char* slot, QObject* parent, 874 const char* slot, QObject* parent,
874 const char* name ) 875 const char* name )
@@ -965,7 +966,7 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
965} 966}
966 967
967KRecentFilesAction::KRecentFilesAction( const QString& text, 968KRecentFilesAction::KRecentFilesAction( const QString& text,
968 const QIconSet& pix, 969 const QIcon& pix,
969 const KShortcut& cut, 970 const KShortcut& cut,
970 QObject* parent, const char* name, 971 QObject* parent, const char* name,
971 uint maxItems ) 972 uint maxItems )
@@ -991,7 +992,7 @@ KRecentFilesAction::KRecentFilesAction( const QString& text,
991} 992}
992 993
993KRecentFilesAction::KRecentFilesAction( const QString& text, 994KRecentFilesAction::KRecentFilesAction( const QString& text,
994 const QIconSet& pix, 995 const QIcon& pix,
995 const KShortcut& cut, 996 const KShortcut& cut,
996 const QObject* receiver, 997 const QObject* receiver,
997 const char* slot, 998 const char* slot,
@@ -1201,7 +1202,7 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut,
1201 setEditable( true ); 1202 setEditable( true );
1202} 1203}
1203 1204
1204KFontAction::KFontAction( const QString& text, const QIconSet& pix, 1205KFontAction::KFontAction( const QString& text, const QIcon& pix,
1205 const KShortcut& cut, 1206 const KShortcut& cut,
1206 QObject* parent, const char* name ) 1207 QObject* parent, const char* name )
1207 : KSelectAction( text, pix, cut, parent, name ) 1208 : KSelectAction( text, pix, cut, parent, name )
@@ -1223,7 +1224,7 @@ KFontAction::KFontAction( const QString& text, const QString& pix,
1223 setEditable( true ); 1224 setEditable( true );
1224} 1225}
1225 1226
1226KFontAction::KFontAction( const QString& text, const QIconSet& pix, 1227KFontAction::KFontAction( const QString& text, const QIcon& pix,
1227 const KShortcut& cut, 1228 const KShortcut& cut,
1228 const QObject* receiver, const char* slot, 1229 const QObject* receiver, const char* slot,
1229 QObject* parent, const char* name ) 1230 QObject* parent, const char* name )
@@ -1361,7 +1362,7 @@ KFontSizeAction::KFontSizeAction( const QString& text,
1361 init(); 1362 init();
1362} 1363}
1363 1364
1364KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, 1365KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix,
1365 const KShortcut& cut, 1366 const KShortcut& cut,
1366 QObject* parent, const char* name ) 1367 QObject* parent, const char* name )
1367 : KSelectAction( text, pix, cut, parent, name ) 1368 : KSelectAction( text, pix, cut, parent, name )
@@ -1377,7 +1378,7 @@ KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix,
1377 init(); 1378 init();
1378} 1379}
1379 1380
1380KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, 1381KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix,
1381 const KShortcut& cut, 1382 const KShortcut& cut,
1382 const QObject* receiver, 1383 const QObject* receiver,
1383 const char* slot, QObject* parent, 1384 const char* slot, QObject* parent,
@@ -1414,9 +1415,9 @@ void KFontSizeAction::init()
1414 d = new KFontSizeActionPrivate; 1415 d = new KFontSizeActionPrivate;
1415 1416
1416 setEditable( true ); 1417 setEditable( true );
1417 QValueList<int> sizes = get_standard_font_sizes(); 1418 Q3ValueList<int> sizes = get_standard_font_sizes();
1418 QStringList lst; 1419 QStringList lst;
1419 for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) 1420 for ( Q3ValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it )
1420 lst.append( QString::number( *it ) ); 1421 lst.append( QString::number( *it ) );
1421 1422
1422 setItems( lst ); 1423 setItems( lst );
@@ -1437,7 +1438,7 @@ void KFontSizeAction::setFontSize( int size )
1437 int index = items().findIndex( QString::number( size ) ); 1438 int index = items().findIndex( QString::number( size ) );
1438 if ( index == -1 ) { 1439 if ( index == -1 ) {
1439 // Insert at the correct position in the list (to keep sorting) 1440 // Insert at the correct position in the list (to keep sorting)
1440 QValueList<int> lst; 1441 Q3ValueList<int> lst;
1441 // Convert to list of ints 1442 // Convert to list of ints
1442 QStringList itemsList = items(); 1443 QStringList itemsList = items();
1443 for (QStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it) 1444 for (QStringList::Iterator it = itemsList.begin() ; it != itemsList.end() ; ++it)
@@ -1450,7 +1451,7 @@ qDebug("KFontSizeAction::setFontSize heapsort not found.");
1450//US qHeapSort( lst ); 1451//US qHeapSort( lst );
1451 // Convert back to string list 1452 // Convert back to string list
1452 QStringList strLst; 1453 QStringList strLst;
1453 for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it) 1454 for (Q3ValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it)
1454 strLst.append( QString::number(*it) ); 1455 strLst.append( QString::number(*it) );
1455 KSelectAction::setItems( strLst ); 1456 KSelectAction::setItems( strLst );
1456 // Find new current item 1457 // Find new current item
@@ -1492,7 +1493,7 @@ public:
1492 KActionMenuPrivate() 1493 KActionMenuPrivate()
1493 { 1494 {
1494//US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); 1495//US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate");
1495 m_popup = new QPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); 1496 m_popup = new Q3PopupMenu(0L,"KActionMenu::KActionMenuPrivate");
1496 m_delayed = true; 1497 m_delayed = true;
1497 m_stickyMenu = true; 1498 m_stickyMenu = true;
1498 } 1499 }
@@ -1502,7 +1503,7 @@ public:
1502 } 1503 }
1503 1504
1504//US KPopupMenu *m_popup; 1505//US KPopupMenu *m_popup;
1505 QPopupMenu *m_popup; 1506 Q3PopupMenu *m_popup;
1506 bool m_delayed; 1507 bool m_delayed;
1507 bool m_stickyMenu; 1508 bool m_stickyMenu;
1508}; 1509};
@@ -1522,7 +1523,7 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent,
1522 setShortcutConfigurable( false ); 1523 setShortcutConfigurable( false );
1523} 1524}
1524 1525
1525KActionMenu::KActionMenu( const QString& text, const QIconSet& icon, 1526KActionMenu::KActionMenu( const QString& text, const QIcon& icon,
1526 QObject* parent, const char* name ) 1527 QObject* parent, const char* name )
1527 : KAction( text, icon, 0, parent, name ) 1528 : KAction( text, icon, 0, parent, name )
1528{ 1529{
@@ -1552,7 +1553,7 @@ void KActionMenu::popup( const QPoint& global )
1552 1553
1553 1554
1554//US KPopupMenu* KActionMenu::popupMenu() const 1555//US KPopupMenu* KActionMenu::popupMenu() const
1555QPopupMenu* KActionMenu::popupMenu() const 1556Q3PopupMenu* KActionMenu::popupMenu() const
1556{ 1557{
1557 return d->m_popup; 1558 return d->m_popup;
1558} 1559}
@@ -1592,9 +1593,9 @@ int KActionMenu::plug( QWidget* widget, int index )
1592 return -1; 1593 return -1;
1593*/ 1594*/
1594 kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis 1595 kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis
1595 if ( widget->inherits("QPopupMenu") ) 1596 if ( widget->inherits("Q3PopupMenu") )
1596 { 1597 {
1597 QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); 1598 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
1598 int id; 1599 int id;
1599 if ( hasIconSet() ) 1600 if ( hasIconSet() )
1600 id = menu->insertItem( iconSet(), text(), d->m_popup, -1, index ); 1601 id = menu->insertItem( iconSet(), text(), d->m_popup, -1, index );
@@ -1781,12 +1782,12 @@ int KToolBarPopupAction::plug( QWidget *widget, int index )
1781} 1782}
1782 1783
1783//US KPopupMenu *KToolBarPopupAction::popupMenu() const 1784//US KPopupMenu *KToolBarPopupAction::popupMenu() const
1784QPopupMenu *KToolBarPopupAction::popupMenu() const 1785Q3PopupMenu *KToolBarPopupAction::popupMenu() const
1785{ 1786{
1786 if ( !m_popup ) { 1787 if ( !m_popup ) {
1787 KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this); 1788 KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this);
1788//US that->m_popup = new KPopupMenu; 1789//US that->m_popup = new KPopupMenu;
1789 that->m_popup = new QPopupMenu; 1790 that->m_popup = new Q3PopupMenu;
1790 } 1791 }
1791 return m_popup; 1792 return m_popup;
1792} 1793}
@@ -1953,7 +1954,7 @@ void KWidgetAction::slotToolbarDestroyed()
1953{ 1954{
1954 //Q_ASSERT( m_widget ); // When exiting the app the widget could be destroyed before the toolbar. 1955 //Q_ASSERT( m_widget ); // When exiting the app the widget could be destroyed before the toolbar.
1955 1956
1956 ASSERT( isPlugged() ); 1957 Q_ASSERT( isPlugged() );
1957 if( !m_widget || !isPlugged() ) 1958 if( !m_widget || !isPlugged() )
1958 return; 1959 return;
1959 1960
@@ -1974,9 +1975,9 @@ KActionSeparator::~KActionSeparator()
1974 1975
1975int KActionSeparator::plug( QWidget *widget, int index ) 1976int KActionSeparator::plug( QWidget *widget, int index )
1976{ 1977{
1977 if ( widget->inherits("QPopupMenu") ) 1978 if ( widget->inherits("Q3PopupMenu") )
1978 { 1979 {
1979 QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); 1980 Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget );
1980 1981
1981 int id = menu->insertSeparator( index ); 1982 int id = menu->insertSeparator( index );
1982 1983
diff --git a/microkde/kdeui/kactionclasses.h b/microkde/kdeui/kactionclasses.h
index f6e7a0f..a9b9104 100644
--- a/microkde/kdeui/kactionclasses.h
+++ b/microkde/kdeui/kactionclasses.h
@@ -34,11 +34,14 @@
34//US#include <qguardedptr.h> 34//US#include <qguardedptr.h>
35//US#include <kguiitem.h> 35//US#include <kguiitem.h>
36#include <kshortcut.h> 36#include <kshortcut.h>
37//Added by qt3to4:
38#include <Q3CString>
39#include <Q3PopupMenu>
37//US#include <kstdaction.h> 40//US#include <kstdaction.h>
38//US#include <kicontheme.h> 41//US#include <kicontheme.h>
39 42
40class QMenuBar; 43class QMenuBar;
41class QPopupMenu; 44class Q3PopupMenu;
42//USclass QComboBox; 45//USclass QComboBox;
43//USclass QPoint; 46//USclass QPoint;
44//USclass QIconSet; 47//USclass QIconSet;
@@ -54,7 +57,7 @@ class KURL;
54 57
55 58
56//US class KToolBar needs to be replaced 59//US class KToolBar needs to be replaced
57class KToolBar; 60#include "ktoolbar.h"
58class KActionCollection; 61class KActionCollection;
59 62
60//US class KPopupMenu needs to be replaced 63//US class KPopupMenu needs to be replaced
@@ -105,7 +108,7 @@ public:
105 * @param parent This action's parent. 108 * @param parent This action's parent.
106 * @param name An internal name for this action. 109 * @param name An internal name for this action.
107 */ 110 */
108 KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 111 KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
109 QObject* parent = 0, const char* name = 0 ); 112 QObject* parent = 0, const char* name = 0 );
110 113
111 /** 114 /**
@@ -127,7 +130,7 @@ public:
127 * @param parent This action's parent. 130 * @param parent This action's parent.
128 * @param name An internal name for this action. 131 * @param name An internal name for this action.
129 */ 132 */
130 KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 133 KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut,
131 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); 134 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
132 135
133 /** 136 /**
@@ -246,7 +249,7 @@ public:
246 * @param parent This action's parent. 249 * @param parent This action's parent.
247 * @param name An internal name for this action. 250 * @param name An internal name for this action.
248 */ 251 */
249 KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 252 KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
250 QObject* parent = 0, const char* name = 0 ); 253 QObject* parent = 0, const char* name = 0 );
251 254
252 /** 255 /**
@@ -268,7 +271,7 @@ public:
268 * @param parent This action's parent. 271 * @param parent This action's parent.
269 * @param name An internal name for this action. 272 * @param name An internal name for this action.
270 */ 273 */
271 KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 274 KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut,
272 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); 275 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
273 276
274 /** 277 /**
@@ -352,7 +355,7 @@ public:
352 * @param parent This action's parent. 355 * @param parent This action's parent.
353 * @param name An internal name for this action. 356 * @param name An internal name for this action.
354 */ 357 */
355 KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 358 KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
356 QObject* parent = 0, const char* name = 0 ); 359 QObject* parent = 0, const char* name = 0 );
357 360
358 /** 361 /**
@@ -374,7 +377,7 @@ public:
374 * @param parent This action's parent. 377 * @param parent This action's parent.
375 * @param name An internal name for this action. 378 * @param name An internal name for this action.
376 */ 379 */
377 KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 380 KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut,
378 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); 381 const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
379 382
380 /** 383 /**
@@ -438,7 +441,7 @@ public:
438 */ 441 */
439 virtual int comboWidth() const; 442 virtual int comboWidth() const;
440 443
441 QPopupMenu* popupMenu() const; 444 Q3PopupMenu* popupMenu() const;
442 445
443 /** 446 /**
444 * Deprecated. See @ref setMenuAccelsEnabled . 447 * Deprecated. See @ref setMenuAccelsEnabled .
@@ -567,7 +570,7 @@ public:
567 * @param parent This action's parent. 570 * @param parent This action's parent.
568 * @param name An internal name for this action. 571 * @param name An internal name for this action.
569 */ 572 */
570 KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 573 KListAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
571 QObject* parent = 0, const char* name = 0 ); 574 QObject* parent = 0, const char* name = 0 );
572 575
573 /** 576 /**
@@ -589,7 +592,7 @@ public:
589 * @param parent This action's parent. 592 * @param parent This action's parent.
590 * @param name An internal name for this action. 593 * @param name An internal name for this action.
591 */ 594 */
592 KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 595 KListAction( const QString& text, const QIcon& pix, const KShortcut& cut,
593 const QObject* receiver, const char* slot, QObject* parent, 596 const QObject* receiver, const char* slot, QObject* parent,
594 const char* name = 0 ); 597 const char* name = 0 );
595 598
@@ -685,7 +688,7 @@ public:
685 * @param name An internal name for this action. 688 * @param name An internal name for this action.
686 * @param maxItems The maximum number of files to display 689 * @param maxItems The maximum number of files to display
687 */ 690 */
688 KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 691 KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut,
689 QObject* parent, const char* name = 0, 692 QObject* parent, const char* name = 0,
690 uint maxItems = 10 ); 693 uint maxItems = 10 );
691 694
@@ -712,7 +715,7 @@ public:
712 * @param name An internal name for this action. 715 * @param name An internal name for this action.
713 * @param maxItems The maximum number of files to display 716 * @param maxItems The maximum number of files to display
714 */ 717 */
715 KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 718 KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut,
716 const QObject* receiver, const char* slot, 719 const QObject* receiver, const char* slot,
717 QObject* parent, const char* name = 0, 720 QObject* parent, const char* name = 0,
718 uint maxItems = 10 ); 721 uint maxItems = 10 );
@@ -834,11 +837,11 @@ public:
834 KFontAction( const QString& text, const KShortcut& cut, 837 KFontAction( const QString& text, const KShortcut& cut,
835 const QObject* receiver, const char* slot, QObject* parent, 838 const QObject* receiver, const char* slot, QObject* parent,
836 const char* name = 0 ); 839 const char* name = 0 );
837 KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 840 KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
838 QObject* parent = 0, const char* name = 0 ); 841 QObject* parent = 0, const char* name = 0 );
839 KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), 842 KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
840 QObject* parent = 0, const char* name = 0 ); 843 QObject* parent = 0, const char* name = 0 );
841 KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 844 KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut,
842 const QObject* receiver, const char* slot, QObject* parent, 845 const QObject* receiver, const char* slot, QObject* parent,
843 const char* name = 0 ); 846 const char* name = 0 );
844 KFontAction( const QString& text, const QString& pix, const KShortcut& cut, 847 KFontAction( const QString& text, const QString& pix, const KShortcut& cut,
@@ -873,11 +876,11 @@ public:
873 const char* name = 0 ); 876 const char* name = 0 );
874 KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver, 877 KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver,
875 const char* slot, QObject* parent, const char* name = 0 ); 878 const char* slot, QObject* parent, const char* name = 0 );
876 KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), 879 KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(),
877 QObject* parent = 0, const char* name = 0 ); 880 QObject* parent = 0, const char* name = 0 );
878 KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), 881 KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
879 QObject* parent = 0, const char* name = 0 ); 882 QObject* parent = 0, const char* name = 0 );
880 KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut, 883 KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut,
881 const QObject* receiver, const char* slot, 884 const QObject* receiver, const char* slot,
882 QObject* parent, const char* name = 0 ); 885 QObject* parent, const char* name = 0 );
883 KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut, 886 KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut,
@@ -931,7 +934,7 @@ class KActionMenu : public KAction
931public: 934public:
932 KActionMenu( const QString& text, QObject* parent = 0, 935 KActionMenu( const QString& text, QObject* parent = 0,
933 const char* name = 0 ); 936 const char* name = 0 );
934 KActionMenu( const QString& text, const QIconSet& icon, 937 KActionMenu( const QString& text, const QIcon& icon,
935 QObject* parent = 0, const char* name = 0 ); 938 QObject* parent = 0, const char* name = 0 );
936 KActionMenu( const QString& text, const QString& icon, 939 KActionMenu( const QString& text, const QString& icon,
937 QObject* parent = 0, const char* name = 0 ); 940 QObject* parent = 0, const char* name = 0 );
@@ -942,7 +945,7 @@ public:
942 virtual void remove( KAction* ); 945 virtual void remove( KAction* );
943 946
944//US KPopupMenu* popupMenu() const; 947//US KPopupMenu* popupMenu() const;
945 QPopupMenu* popupMenu() const; 948 Q3PopupMenu* popupMenu() const;
946 void popup( const QPoint& global ); 949 void popup( const QPoint& global );
947 950
948 /** 951 /**
@@ -1067,7 +1070,7 @@ public:
1067 * aboutToShow for a more dynamic menu. 1070 * aboutToShow for a more dynamic menu.
1068 */ 1071 */
1069//US KPopupMenu *popupMenu() const; 1072//US KPopupMenu *popupMenu() const;
1070 QPopupMenu *popupMenu() const; 1073 Q3PopupMenu *popupMenu() const;
1071 1074
1072 /** 1075 /**
1073 * Returns true if this action creates a delayed popup menu 1076 * Returns true if this action creates a delayed popup menu
@@ -1098,7 +1101,7 @@ public:
1098 1101
1099private: 1102private:
1100//US KPopupMenu *m_popup; 1103//US KPopupMenu *m_popup;
1101 QPopupMenu *m_popup; 1104 Q3PopupMenu *m_popup;
1102 bool m_delayed:1; 1105 bool m_delayed:1;
1103 bool m_stickyMenu:1; 1106 bool m_stickyMenu:1;
1104protected: 1107protected:
@@ -1147,8 +1150,8 @@ public slots:
1147 virtual void setChecked( bool ); 1150 virtual void setChecked( bool );
1148 1151
1149private: 1152private:
1150 QCString m_toolBarName; 1153 Q3CString m_toolBarName;
1151 QGuardedPtr<KToolBar> m_toolBar; 1154 QPointer<KToolBar> m_toolBar;
1152protected: 1155protected:
1153 virtual void virtual_hook( int id, void* data ); 1156 virtual void virtual_hook( int id, void* data );
1154private: 1157private:
@@ -1195,7 +1198,7 @@ public:
1195protected slots: 1198protected slots:
1196 void slotToolbarDestroyed(); 1199 void slotToolbarDestroyed();
1197private: 1200private:
1198 QGuardedPtr<QWidget> m_widget; 1201 QPointer<QWidget> m_widget;
1199 bool m_autoSized; 1202 bool m_autoSized;
1200protected: 1203protected:
1201 virtual void virtual_hook( int id, void* data ); 1204 virtual void virtual_hook( int id, void* data );
diff --git a/microkde/kdeui/kactioncollection.cpp b/microkde/kdeui/kactioncollection.cpp
index 69e5d02..4d66c7f 100644
--- a/microkde/kdeui/kactioncollection.cpp
+++ b/microkde/kdeui/kactioncollection.cpp
@@ -26,7 +26,9 @@
26#include "kactioncollection.h" 26#include "kactioncollection.h"
27//US#include "kactionshortcutlist.h" 27//US#include "kactionshortcutlist.h"
28 28
29#include <qptrdict.h> 29#include <q3ptrdict.h>
30//Added by qt3to4:
31#include <Q3ValueList>
30//US#include <qvariant.h> 32//US#include <qvariant.h>
31 33
32//US#include <kaccel.h> 34//US#include <kaccel.h>
@@ -36,8 +38,8 @@
36//US#include <kxmlguifactory.h> 38//US#include <kxmlguifactory.h>
37 39
38//US I included the following files 40//US I included the following files
39#include <qasciidict.h> 41#include <q3asciidict.h>
40#include <qptrlist.h> 42#include <q3ptrlist.h>
41#include "kaction.h" 43#include "kaction.h"
42#include <kglobal.h> 44#include <kglobal.h>
43#include <qobject.h> 45#include <qobject.h>
@@ -67,13 +69,13 @@ public:
67 //int m_iWidgetCurrent; 69 //int m_iWidgetCurrent;
68 //QValueList<QWidget*> m_widgetList; 70 //QValueList<QWidget*> m_widgetList;
69 //QValueList<KAccel*> m_kaccelList; 71 //QValueList<KAccel*> m_kaccelList;
70 QValueList<KActionCollection*> m_docList; 72 Q3ValueList<KActionCollection*> m_docList;
71 QWidget *m_widget; 73 QWidget *m_widget;
72 KAccel *m_kaccel; 74 KAccel *m_kaccel;
73 KAccel *m_builderKAccel; 75 KAccel *m_builderKAccel;
74 76
75 QAsciiDict<KAction> m_actionDict; 77 Q3AsciiDict<KAction> m_actionDict;
76 QPtrDict< QPtrList<KAction> > m_dctHighlightContainers; 78 Q3PtrDict< Q3PtrList<KAction> > m_dctHighlightContainers;
77 bool m_highlight; 79 bool m_highlight;
78 KAction *m_currentHighlightAction; 80 KAction *m_currentHighlightAction;
79 bool m_statusCleared; 81 bool m_statusCleared;
@@ -133,7 +135,7 @@ KActionCollection::KActionCollection( const KActionCollection &copy )
133KActionCollection::~KActionCollection() 135KActionCollection::~KActionCollection()
134{ 136{
135 kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; 137 kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl;
136 for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { 138 for ( Q3AsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) {
137 KAction* pAction = it.current(); 139 KAction* pAction = it.current();
138 if ( pAction->m_parentCollection == this ) 140 if ( pAction->m_parentCollection == this )
139 pAction->m_parentCollection = 0L; 141 pAction->m_parentCollection = 0L;
@@ -365,7 +367,7 @@ KAction* KActionCollection::_take( KAction* action )
365 367
366void KActionCollection::_clear() 368void KActionCollection::_clear()
367{ 369{
368 QAsciiDictIterator<KAction> it( d->m_actionDict ); 370 Q3AsciiDictIterator<KAction> it( d->m_actionDict );
369 while ( it.current() ) 371 while ( it.current() )
370 _remove( it.current() ); 372 _remove( it.current() );
371} 373}
@@ -386,7 +388,7 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
386 pAction = d->m_actionDict[ name ]; 388 pAction = d->m_actionDict[ name ];
387 389
388 else { 390 else {
389 QAsciiDictIterator<KAction> it( d->m_actionDict ); 391 Q3AsciiDictIterator<KAction> it( d->m_actionDict );
390 for( ; it.current(); ++it ) 392 for( ; it.current(); ++it )
391 { 393 {
392 if ( ( !name || strcmp( it.current()->name(), name ) == 0 ) && 394 if ( ( !name || strcmp( it.current()->name(), name ) == 0 ) &&
@@ -407,7 +409,7 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co
407 409
408KAction* KActionCollection::action( int index ) const 410KAction* KActionCollection::action( int index ) const
409{ 411{
410 QAsciiDictIterator<KAction> it( d->m_actionDict ); 412 Q3AsciiDictIterator<KAction> it( d->m_actionDict );
411 it += index; 413 it += index;
412 return it.current(); 414 return it.current();
413// return d->m_actions.at( index ); 415// return d->m_actions.at( index );
@@ -432,7 +434,7 @@ QStringList KActionCollection::groups() const
432{ 434{
433 QStringList lst; 435 QStringList lst;
434 436
435 QAsciiDictIterator<KAction> it( d->m_actionDict ); 437 Q3AsciiDictIterator<KAction> it( d->m_actionDict );
436 for( ; it.current(); ++it ) 438 for( ; it.current(); ++it )
437 if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) 439 if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) )
438 lst.append( it.current()->group() ); 440 lst.append( it.current()->group() );
@@ -444,7 +446,7 @@ KActionPtrList KActionCollection::actions( const QString& group ) const
444{ 446{
445 KActionPtrList lst; 447 KActionPtrList lst;
446 448
447 QAsciiDictIterator<KAction> it( d->m_actionDict ); 449 Q3AsciiDictIterator<KAction> it( d->m_actionDict );
448 for( ; it.current(); ++it ) 450 for( ; it.current(); ++it )
449 if ( it.current()->group() == group ) 451 if ( it.current()->group() == group )
450 lst.append( it.current() ); 452 lst.append( it.current() );
@@ -458,7 +460,7 @@ KActionPtrList KActionCollection::actions() const
458{ 460{
459 KActionPtrList lst; 461 KActionPtrList lst;
460 462
461 QAsciiDictIterator<KAction> it( d->m_actionDict ); 463 Q3AsciiDictIterator<KAction> it( d->m_actionDict );
462 for( ; it.current(); ++it ) 464 for( ; it.current(); ++it )
463 lst.append( it.current() ); 465 lst.append( it.current() );
464 466
@@ -508,13 +510,13 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
508 if ( !d->m_highlight ) 510 if ( !d->m_highlight )
509 return; 511 return;
510 512
511 QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; 513 Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
512 514
513 if ( !actionList ) 515 if ( !actionList )
514 { 516 {
515 actionList = new QPtrList<KAction>; 517 actionList = new Q3PtrList<KAction>;
516 518
517 if ( container->inherits( "QPopupMenu" ) ) 519 if ( container->inherits( "Q3PopupMenu" ) )
518 { 520 {
519 connect( container, SIGNAL( highlighted( int ) ), 521 connect( container, SIGNAL( highlighted( int ) ),
520 this, SLOT( slotMenuItemHighlighted( int ) ) ); 522 this, SLOT( slotMenuItemHighlighted( int ) ) );
@@ -522,7 +524,7 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action )
522 this, SLOT( slotMenuAboutToHide() ) ); 524 this, SLOT( slotMenuAboutToHide() ) );
523 } 525 }
524//US else if ( container->inherits( "KToolBar" ) ) 526//US else if ( container->inherits( "KToolBar" ) )
525 else if ( container->inherits( "QToolBar" ) ) 527 else if ( container->inherits( "Q3ToolBar" ) )
526 { 528 {
527 connect( container, SIGNAL( highlighted( int, bool ) ), 529 connect( container, SIGNAL( highlighted( int, bool ) ),
528 this, SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); 530 this, SLOT( slotToolBarButtonHighlighted( int, bool ) ) );
@@ -542,7 +544,7 @@ void KActionCollection::disconnectHighlight( QWidget *container, KAction *action
542 if ( !d->m_highlight ) 544 if ( !d->m_highlight )
543 return; 545 return;
544 546
545 QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; 547 Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ];
546 548
547 if ( !actionList ) 549 if ( !actionList )
548 return; 550 return;
@@ -625,12 +627,12 @@ void KActionCollection::slotDestroyed()
625 627
626KAction *KActionCollection::findAction( QWidget *container, int id ) 628KAction *KActionCollection::findAction( QWidget *container, int id )
627{ 629{
628 QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; 630 Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ];
629 631
630 if ( !actionList ) 632 if ( !actionList )
631 return 0; 633 return 0;
632 634
633 QPtrListIterator<KAction> it( *actionList ); 635 Q3PtrListIterator<KAction> it( *actionList );
634 for (; it.current(); ++it ) 636 for (; it.current(); ++it )
635 if ( it.current()->isPlugged( container, id ) ) 637 if ( it.current()->isPlugged( container, id ) )
636 return it.current(); 638 return it.current();
@@ -644,9 +646,9 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons
644 kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl; 646 kdWarning(129) << "KActionCollection::operator+(): function is severely deprecated." << endl;
645 KActionCollection ret( *this ); 647 KActionCollection ret( *this );
646 648
647 QValueList<KAction *> actions = c.actions(); 649 Q3ValueList<KAction *> actions = c.actions();
648 QValueList<KAction *>::ConstIterator it = actions.begin(); 650 Q3ValueList<KAction *>::ConstIterator it = actions.begin();
649 QValueList<KAction *>::ConstIterator end = actions.end(); 651 Q3ValueList<KAction *>::ConstIterator end = actions.end();
650 for (; it != end; ++it ) 652 for (; it != end; ++it )
651 ret.insert( *it ); 653 ret.insert( *it );
652 654
@@ -670,7 +672,7 @@ KActionCollection &KActionCollection::operator=( const KActionCollection &copy )
670KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) 672KActionCollection &KActionCollection::operator+=( const KActionCollection &c )
671{ 673{
672 kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl; 674 kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl;
673 QAsciiDictIterator<KAction> it(c.d->m_actionDict); 675 Q3AsciiDictIterator<KAction> it(c.d->m_actionDict);
674 for ( ; it.current(); ++it ) 676 for ( ; it.current(); ++it )
675 insert( it.current() ); 677 insert( it.current() );
676 678
diff --git a/microkde/kdeui/kactioncollection.h b/microkde/kdeui/kactioncollection.h
index b9466d0..50cb02a 100644
--- a/microkde/kdeui/kactioncollection.h
+++ b/microkde/kdeui/kactioncollection.h
@@ -30,6 +30,8 @@
30 30
31//US #include <qkeysequence.h> 31//US #include <qkeysequence.h>
32#include <qobject.h> 32#include <qobject.h>
33//Added by qt3to4:
34#include <Q3ValueList>
33//US#include <qvaluelist.h> 35//US#include <qvaluelist.h>
34//US#include <qguardedptr.h> 36//US#include <qguardedptr.h>
35//US #include <kguiitem.h> 37//US #include <kguiitem.h>
@@ -60,7 +62,7 @@
60class QWidget; 62class QWidget;
61 63
62 64
63typedef QValueList<KAction *> KActionPtrList; 65typedef Q3ValueList<KAction *> KActionPtrList;
64 66
65/** 67/**
66 * A managed set of KAction objects. 68 * A managed set of KAction objects.
diff --git a/microkde/kdeui/kbuttonbox.cpp b/microkde/kdeui/kbuttonbox.cpp
index 83d622a..3ea6703 100644
--- a/microkde/kdeui/kbuttonbox.cpp
+++ b/microkde/kdeui/kbuttonbox.cpp
@@ -49,7 +49,9 @@
49 49
50#include <kbuttonbox.h> 50#include <kbuttonbox.h>
51#include <qpushbutton.h> 51#include <qpushbutton.h>
52#include <qptrlist.h> 52#include <q3ptrlist.h>
53//Added by qt3to4:
54#include <QResizeEvent>
53#include <assert.h> 55#include <assert.h>
54 56
55#define minButtonWidth 50 57#define minButtonWidth 50
@@ -62,7 +64,7 @@ public:
62 unsigned short actual_size; 64 unsigned short actual_size;
63}; 65};
64 66
65template class QPtrList<KButtonBox::Item>; 67template class Q3PtrList<KButtonBox::Item>;
66 68
67class KButtonBoxPrivate { 69class KButtonBoxPrivate {
68public: 70public:
@@ -70,10 +72,10 @@ public:
70 unsigned short autoborder; 72 unsigned short autoborder;
71 unsigned short orientation; 73 unsigned short orientation;
72 bool activated; 74 bool activated;
73 QPtrList<KButtonBox::Item> buttons; 75 Q3PtrList<KButtonBox::Item> buttons;
74}; 76};
75 77
76KButtonBox::KButtonBox(QWidget *parent, Orientation _orientation, 78KButtonBox::KButtonBox(QWidget *parent, Qt::Orientation _orientation,
77 int border, int autoborder) 79 int border, int autoborder)
78 : QWidget(parent) 80 : QWidget(parent)
79{ 81{
@@ -149,7 +151,7 @@ void KButtonBox::layout() {
149void KButtonBox::placeButtons() { 151void KButtonBox::placeButtons() {
150 unsigned int i; 152 unsigned int i;
151 153
152 if(data->orientation == Horizontal) { 154 if(data->orientation == Qt::Horizontal) {
153 // calculate free size and stretches 155 // calculate free size and stretches
154 int fs = width() - 2 * data->border; 156 int fs = width() - 2 * data->border;
155 int stretch = 0; 157 int stretch = 0;
@@ -251,7 +253,7 @@ QSize KButtonBox::sizeHint() const {
251 else 253 else
252 s = bs; 254 s = bs;
253 255
254 if(data->orientation == Horizontal) 256 if(data->orientation == Qt::Horizontal)
255 dw += s.width(); 257 dw += s.width();
256 else 258 else
257 dw += s.height(); 259 dw += s.height();
@@ -261,7 +263,7 @@ QSize KButtonBox::sizeHint() const {
261 } 263 }
262 } 264 }
263 265
264 if(data->orientation == Horizontal) 266 if(data->orientation == Qt::Horizontal)
265 return QSize(dw, bs.height() + 2 * data->border); 267 return QSize(dw, bs.height() + 2 * data->border);
266 else 268 else
267 return QSize(bs.width() + 2 * data->border, dw); 269 return QSize(bs.width() + 2 * data->border, dw);
@@ -270,7 +272,7 @@ QSize KButtonBox::sizeHint() const {
270 272
271QSizePolicy KButtonBox::sizePolicy() const 273QSizePolicy KButtonBox::sizePolicy() const
272{ 274{
273 return data->orientation == Horizontal? 275 return data->orientation == Qt::Horizontal?
274 QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) : 276 QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) :
275 QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ); 277 QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum );
276} 278}
diff --git a/microkde/kdeui/kbuttonbox.h b/microkde/kdeui/kbuttonbox.h
index 1104366..2e0f41d 100644
--- a/microkde/kdeui/kbuttonbox.h
+++ b/microkde/kdeui/kbuttonbox.h
@@ -21,6 +21,8 @@
21#define __KBUTTONBOX__H__ 21#define __KBUTTONBOX__H__
22 22
23#include <qwidget.h> 23#include <qwidget.h>
24//Added by qt3to4:
25#include <QResizeEvent>
24class QPushButton; 26class QPushButton;
25 27
26class KButtonBoxPrivate; 28class KButtonBoxPrivate;
@@ -48,7 +50,7 @@ public:
48 * @ref addButton() are laid out from top to bottom, otherwise they 50 * @ref addButton() are laid out from top to bottom, otherwise they
49 * are laid out from left to right. 51 * are laid out from left to right.
50 */ 52 */
51 KButtonBox(QWidget *parent, Orientation _orientation = Horizontal, 53 KButtonBox(QWidget *parent, Qt::Orientation _orientation = Qt::Horizontal,
52 int border = 0, int _autoborder = 6); 54 int border = 0, int _autoborder = 6);
53 55
54 /** 56 /**
diff --git a/microkde/kdeui/kguiitem.cpp b/microkde/kdeui/kguiitem.cpp
index 828c5e6..c91ffb7 100644
--- a/microkde/kdeui/kguiitem.cpp
+++ b/microkde/kdeui/kguiitem.cpp
@@ -20,7 +20,7 @@
20 20
21#include <qregexp.h> 21#include <qregexp.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qiconset.h> 23#include <qicon.h>
24#include <qpixmap.h> 24#include <qpixmap.h>
25 25
26#include <assert.h> 26#include <assert.h>
@@ -62,7 +62,7 @@ public:
62 QString m_whatsThis; 62 QString m_whatsThis;
63 QString m_statusText; 63 QString m_statusText;
64 QString m_iconName; 64 QString m_iconName;
65 QIconSet m_iconSet; 65 QIcon m_iconSet;
66 bool m_hasIcon : 1; 66 bool m_hasIcon : 1;
67 bool m_enabled : 1; 67 bool m_enabled : 1;
68}; 68};
@@ -82,7 +82,7 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName,
82 setIconName( iconName ); 82 setIconName( iconName );
83} 83}
84 84
85KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet, 85KGuiItem::KGuiItem( const QString &text, const QIcon &iconSet,
86 const QString &toolTip, const QString &whatsThis ) 86 const QString &toolTip, const QString &whatsThis )
87{ 87{
88 d = new KGuiItemPrivate; 88 d = new KGuiItemPrivate;
@@ -124,7 +124,7 @@ QString KGuiItem::plainText() const {
124 return stripped; 124 return stripped;
125} 125}
126 126
127QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const 127QIcon KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const
128{ 128{
129 if( d->m_hasIcon ) 129 if( d->m_hasIcon )
130 { 130 {
@@ -148,7 +148,7 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instan
148 } 148 }
149 } 149 }
150 else 150 else
151 return QIconSet(); 151 return QIcon();
152} 152}
153 153
154QString KGuiItem::iconName() const 154QString KGuiItem::iconName() const
@@ -177,7 +177,7 @@ void KGuiItem::setText( const QString &text ) {
177 d->m_text=text; 177 d->m_text=text;
178} 178}
179 179
180void KGuiItem::setIconSet( const QIconSet &iconset ) 180void KGuiItem::setIconSet( const QIcon &iconset )
181{ 181{
182 d->m_iconSet = iconset; 182 d->m_iconSet = iconset;
183 d->m_iconName = QString::null; 183 d->m_iconName = QString::null;
@@ -187,7 +187,7 @@ void KGuiItem::setIconSet( const QIconSet &iconset )
187void KGuiItem::setIconName( const QString &iconName ) 187void KGuiItem::setIconName( const QString &iconName )
188{ 188{
189 d->m_iconName = iconName; 189 d->m_iconName = iconName;
190 d->m_iconSet = QIconSet(); 190 d->m_iconSet = QIcon();
191 d->m_hasIcon = !iconName.isEmpty(); 191 d->m_hasIcon = !iconName.isEmpty();
192} 192}
193 193
diff --git a/microkde/kdeui/kguiitem.h b/microkde/kdeui/kguiitem.h
index 0079bb4..6f92137 100644
--- a/microkde/kdeui/kguiitem.h
+++ b/microkde/kdeui/kguiitem.h
@@ -23,9 +23,9 @@
23#define __kguiitem_h__ 23#define __kguiitem_h__
24 24
25#include <qstring.h> 25#include <qstring.h>
26#include <qiconset.h> 26#include <qicon.h>
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qvaluelist.h> 28#include <q3valuelist.h>
29//US#include <kicontheme.h> 29//US#include <kicontheme.h>
30#include <kglobal.h> 30#include <kglobal.h>
31 31
@@ -42,7 +42,7 @@ public:
42 const QString &toolTip = QString::null, 42 const QString &toolTip = QString::null,
43 const QString &whatsThis = QString::null ); 43 const QString &whatsThis = QString::null );
44 44
45 KGuiItem( const QString &text, const QIconSet &iconSet, 45 KGuiItem( const QString &text, const QIcon &iconSet,
46 const QString &toolTip = QString::null, 46 const QString &toolTip = QString::null,
47 const QString &whatsThis = QString::null ); 47 const QString &whatsThis = QString::null );
48 48
@@ -53,10 +53,10 @@ public:
53 53
54 QString text() const; 54 QString text() const;
55 QString plainText() const; 55 QString plainText() const;
56 QIconSet iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const; 56 QIcon iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const;
57 57
58#ifndef KDE_NO_COMPAT 58#ifndef KDE_NO_COMPAT
59 QIconSet iconSet() const { return iconSet( KIcon::Small); } 59 QIcon iconSet() const { return iconSet( KIcon::Small); }
60#endif 60#endif
61 61
62 QString iconName() const; 62 QString iconName() const;
@@ -69,7 +69,7 @@ public:
69#endif 69#endif
70 70
71 void setText( const QString &text ); 71 void setText( const QString &text );
72 void setIconSet( const QIconSet &iconset ); 72 void setIconSet( const QIcon &iconset );
73 void setIconName( const QString &iconName ); 73 void setIconName( const QString &iconName );
74 void setToolTip( const QString &tooltip ); 74 void setToolTip( const QString &tooltip );
75 void setWhatsThis( const QString &whatsThis ); 75 void setWhatsThis( const QString &whatsThis );
diff --git a/microkde/kdeui/kjanuswidget.cpp b/microkde/kdeui/kjanuswidget.cpp
index 462c44f..3d9173d 100644
--- a/microkde/kdeui/kjanuswidget.cpp
+++ b/microkde/kdeui/kjanuswidget.cpp
@@ -22,15 +22,23 @@
22#include <qbitmap.h> 22#include <qbitmap.h>
23#include <qlayout.h> 23#include <qlayout.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qwidgetstack.h> 25#include <q3widgetstack.h>
26#include <qtabwidget.h> 26#include <qtabwidget.h>
27#include <qlistview.h> 27#include <q3listview.h>
28#include <qhbox.h> 28#include <q3hbox.h>
29#include <qvbox.h> 29#include <q3vbox.h>
30#include <qgrid.h> 30#include <q3grid.h>
31#include <qpainter.h> 31#include <qpainter.h>
32#include <qobjectlist.h> 32#include <qobject.h>
33#include <qstringlist.h> 33#include <qstringlist.h>
34//Added by qt3to4:
35#include <Q3HBoxLayout>
36#include <Q3GridLayout>
37#include <Q3PtrList>
38#include <Q3Frame>
39#include <QEvent>
40#include <Q3VBoxLayout>
41#include <QShowEvent>
34/*US 42/*US
35#include <qbitmap.h> 43#include <qbitmap.h>
36#include <qgrid.h> 44#include <qgrid.h>
@@ -65,13 +73,13 @@
65 73
66#include "kjanuswidget.h" 74#include "kjanuswidget.h"
67 75
68class KJanusWidget::IconListItem : public QListBoxItem 76class KJanusWidget::IconListItem : public Q3ListBoxItem
69{ 77{
70 public: 78 public:
71 IconListItem( QListBox *listbox, const QPixmap &pixmap, 79 IconListItem( Q3ListBox *listbox, const QPixmap &pixmap,
72 const QString &text ); 80 const QString &text );
73 virtual int height( const QListBox *lb ) const; 81 virtual int height( const Q3ListBox *lb ) const;
74 virtual int width( const QListBox *lb ) const; 82 virtual int width( const Q3ListBox *lb ) const;
75 int expandMinimumWidth( int width ); 83 int expandMinimumWidth( int width );
76 84
77 protected: 85 protected:
@@ -98,7 +106,7 @@ public:
98 QMap<int, QString> mIntToTitle; 106 QMap<int, QString> mIntToTitle;
99}; 107};
100 108
101template class QPtrList<QListViewItem>; 109template class Q3PtrList<Q3ListViewItem>;
102 110
103 111
104KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) 112KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
@@ -107,12 +115,12 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
107 mTitleList(0), mFace(face), mTitleLabel(0), mActivePageWidget(0), 115 mTitleList(0), mFace(face), mTitleLabel(0), mActivePageWidget(0),
108 mShowIconsInTreeList(false), d(0) 116 mShowIconsInTreeList(false), d(0)
109{ 117{
110 QVBoxLayout *topLayout = new QVBoxLayout( this ); 118 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this );
111 if( mFace == TreeList || mFace == IconList ) 119 if( mFace == TreeList || mFace == IconList )
112 { 120 {
113 d = new KJanusWidgetPrivate; 121 d = new KJanusWidgetPrivate;
114 122
115 QFrame *page = 0; 123 Q3Frame *page = 0;
116 if( mFace == TreeList ) 124 if( mFace == TreeList )
117 { 125 {
118 //US 126 //US
@@ -145,7 +153,7 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
145 } 153 }
146 else 154 else
147 { 155 {
148 QHBoxLayout *hbox = new QHBoxLayout( topLayout ); 156 Q3HBoxLayout *hbox = new Q3HBoxLayout( topLayout );
149 mIconList = new IconListBox( this ); 157 mIconList = new IconListBox( this );
150 158
151 QFont listFont( mIconList->font() ); 159 QFont listFont( mIconList->font() );
@@ -156,7 +164,7 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
156 hbox->addWidget( mIconList ); 164 hbox->addWidget( mIconList );
157 connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage())); 165 connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage()));
158 hbox->addSpacing( KDialog::marginHint() ); 166 hbox->addSpacing( KDialog::marginHint() );
159 page = new QFrame( this ); 167 page = new Q3Frame( this );
160 hbox->addWidget( page, 10 ); 168 hbox->addWidget( page, 10 );
161 } 169 }
162 170
@@ -165,7 +173,7 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
165 // pagestack using all available space at bottom. 173 // pagestack using all available space at bottom.
166 // 174 //
167 175
168 QVBoxLayout *vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() ); 176 Q3VBoxLayout *vbox = new Q3VBoxLayout( page, 0, KDialog::spacingHint() );
169 177
170 mTitleLabel = new QLabel( QString::fromLatin1("Empty page"), page, "KJanusWidgetTitleLabel" ); 178 mTitleLabel = new QLabel( QString::fromLatin1("Empty page"), page, "KJanusWidgetTitleLabel" );
171 vbox->addWidget( mTitleLabel ); 179 vbox->addWidget( mTitleLabel );
@@ -175,10 +183,10 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
175 mTitleLabel->setFont( titleFont ); 183 mTitleLabel->setFont( titleFont );
176 184
177 mTitleSep = new KSeparator( page ); 185 mTitleSep = new KSeparator( page );
178 mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain ); 186 mTitleSep->setFrameStyle( Q3Frame::HLine|Q3Frame::Plain );
179 vbox->addWidget( mTitleSep ); 187 vbox->addWidget( mTitleSep );
180 188
181 mPageStack = new QWidgetStack( page ); 189 mPageStack = new Q3WidgetStack( page );
182 connect(mPageStack, SIGNAL(aboutToShow(QWidget *)), 190 connect(mPageStack, SIGNAL(aboutToShow(QWidget *)),
183 SIGNAL(aboutToShowPage(QWidget *))); 191 SIGNAL(aboutToShowPage(QWidget *)));
184 vbox->addWidget( mPageStack, 10 ); 192 vbox->addWidget( mPageStack, 10 );
@@ -199,7 +207,7 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face )
199 else 207 else
200 { 208 {
201 mFace = Plain; 209 mFace = Plain;
202 mPlainPage = new QFrame( this ); 210 mPlainPage = new Q3Frame( this );
203 topLayout->addWidget( mPlainPage, 10 ); 211 topLayout->addWidget( mPlainPage, 10 );
204 } 212 }
205/*US 213/*US
@@ -245,7 +253,7 @@ bool KJanusWidget::isValid() const
245} 253}
246 254
247 255
248QFrame *KJanusWidget::plainPage() 256Q3Frame *KJanusWidget::plainPage()
249{ 257{
250 return( mPlainPage ); 258 return( mPlainPage );
251} 259}
@@ -266,7 +274,7 @@ QWidget *KJanusWidget::FindParent()
266 } 274 }
267} 275}
268 276
269QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header, 277Q3Frame *KJanusWidget::addPage( const QStringList &items, const QString &header,
270 const QPixmap &pixmap ) 278 const QPixmap &pixmap )
271{ 279{
272 if( mValid == false ) 280 if( mValid == false )
@@ -275,7 +283,7 @@ QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header,
275 return( 0 ); 283 return( 0 );
276 } 284 }
277 285
278 QFrame *page = new QFrame( FindParent(), "page" ); 286 Q3Frame *page = new Q3Frame( FindParent(), "page" );
279 addPageWidget( page, items, header, pixmap ); 287 addPageWidget( page, items, header, pixmap );
280 288
281 return page; 289 return page;
@@ -287,13 +295,13 @@ void KJanusWidget::pageGone( QObject *obj )
287 removePage( static_cast<QWidget*>( obj ) ); 295 removePage( static_cast<QWidget*>( obj ) );
288} 296}
289 297
290void KJanusWidget::slotReopen( QListViewItem * item ) 298void KJanusWidget::slotReopen( Q3ListViewItem * item )
291{ 299{
292 if( item ) 300 if( item )
293 item->setOpen( true ); 301 item->setOpen( true );
294} 302}
295 303
296QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header, 304Q3Frame *KJanusWidget::addPage( const QString &itemName, const QString &header,
297 const QPixmap &pixmap ) 305 const QPixmap &pixmap )
298{ 306{
299 307
@@ -304,7 +312,7 @@ QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header,
304 312
305 313
306 314
307QVBox *KJanusWidget::addVBoxPage( const QStringList &items, 315Q3VBox *KJanusWidget::addVBoxPage( const QStringList &items,
308 const QString &header, 316 const QString &header,
309 const QPixmap &pixmap ) 317 const QPixmap &pixmap )
310{ 318{
@@ -315,14 +323,14 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items,
315 return( 0 ); 323 return( 0 );
316 } 324 }
317 325
318 QVBox *page = new QVBox(FindParent() , "vbox_page" ); 326 Q3VBox *page = new Q3VBox(FindParent() , "vbox_page" );
319 page->setSpacing( KDialog::spacingHintSmall() ); 327 page->setSpacing( KDialog::spacingHintSmall() );
320 addPageWidget( page, items, header, pixmap ); 328 addPageWidget( page, items, header, pixmap );
321 329
322 return page; 330 return page;
323} 331}
324 332
325QVBox *KJanusWidget::addVBoxPage( const QString &itemName, 333Q3VBox *KJanusWidget::addVBoxPage( const QString &itemName,
326 const QString &header, 334 const QString &header,
327 const QPixmap &pixmap ) 335 const QPixmap &pixmap )
328{ 336{
@@ -331,7 +339,7 @@ QVBox *KJanusWidget::addVBoxPage( const QString &itemName,
331 return addVBoxPage(items, header, pixmap); 339 return addVBoxPage(items, header, pixmap);
332} 340}
333 341
334QHBox *KJanusWidget::addHBoxPage( const QStringList &items, 342Q3HBox *KJanusWidget::addHBoxPage( const QStringList &items,
335 const QString &header, 343 const QString &header,
336 const QPixmap &pixmap ) 344 const QPixmap &pixmap )
337{ 345{
@@ -340,14 +348,14 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items,
340 return( 0 ); 348 return( 0 );
341 } 349 }
342 350
343 QHBox *page = new QHBox(FindParent(), "hbox_page"); 351 Q3HBox *page = new Q3HBox(FindParent(), "hbox_page");
344 page->setSpacing( KDialog::spacingHint() ); 352 page->setSpacing( KDialog::spacingHint() );
345 addPageWidget( page, items, header, pixmap ); 353 addPageWidget( page, items, header, pixmap );
346 354
347 return page; 355 return page;
348} 356}
349 357
350QHBox *KJanusWidget::addHBoxPage( const QString &itemName, 358Q3HBox *KJanusWidget::addHBoxPage( const QString &itemName,
351 const QString &header, 359 const QString &header,
352 const QPixmap &pixmap ) 360 const QPixmap &pixmap )
353{ 361{
@@ -356,7 +364,7 @@ QHBox *KJanusWidget::addHBoxPage( const QString &itemName,
356 return addHBoxPage(items, header, pixmap); 364 return addHBoxPage(items, header, pixmap);
357} 365}
358 366
359QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, 367Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir,
360 const QStringList &items, 368 const QStringList &items,
361 const QString &header, 369 const QString &header,
362 const QPixmap &pixmap ) 370 const QPixmap &pixmap )
@@ -367,7 +375,7 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
367 return( 0 ); 375 return( 0 );
368 } 376 }
369 377
370 QGrid *page = new QGrid( n, dir, FindParent(), "page" ); 378 Q3Grid *page = new Q3Grid( n, dir, FindParent(), "page" );
371 page->setSpacing( KDialog::spacingHint() ); 379 page->setSpacing( KDialog::spacingHint() );
372 addPageWidget( page, items, header, pixmap ); 380 addPageWidget( page, items, header, pixmap );
373 381
@@ -375,7 +383,7 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
375} 383}
376 384
377 385
378QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, 386Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir,
379 const QString &itemName, 387 const QString &itemName,
380 const QString &header, 388 const QString &header,
381 const QPixmap &pixmap ) 389 const QPixmap &pixmap )
@@ -385,10 +393,10 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir,
385 return addGridPage(n, dir, items, header, pixmap); 393 return addGridPage(n, dir, items, header, pixmap);
386} 394}
387 395
388void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page) 396void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page)
389{ 397{
390 bool isTop = true; 398 bool isTop = true;
391 QListViewItem *curTop = 0, *child, *last, *newChild; 399 Q3ListViewItem *curTop = 0, *child, *last, *newChild;
392 unsigned int index = 1; 400 unsigned int index = 1;
393 QStringList curPath; 401 QStringList curPath;
394 402
@@ -412,9 +420,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
412 // This node didn't have any children at all, lets just insert the 420 // This node didn't have any children at all, lets just insert the
413 // new child. 421 // new child.
414 if (isTop) 422 if (isTop)
415 newChild = new QListViewItem(mTreeList, name); 423 newChild = new Q3ListViewItem(mTreeList, name);
416 else 424 else
417 newChild = new QListViewItem(curTop, name); 425 newChild = new Q3ListViewItem(curTop, name);
418 426
419 } 427 }
420 else if (child != 0) { 428 else if (child != 0) {
@@ -431,9 +439,9 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
431 else { 439 else {
432 // the node had some children, but we didn't find the given name 440 // the node had some children, but we didn't find the given name
433 if (isTop) 441 if (isTop)
434 newChild = new QListViewItem(mTreeList, last, name); 442 newChild = new Q3ListViewItem(mTreeList, last, name);
435 else 443 else
436 newChild = new QListViewItem(curTop, last, name); 444 newChild = new Q3ListViewItem(curTop, last, name);
437 } 445 }
438 446
439 // Now make the element expandable if it is a path component, and make 447 // Now make the element expandable if it is a path component, and make
@@ -459,7 +467,7 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p
459 } 467 }
460} 468}
461 469
462void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items, 470void KJanusWidget::addPageWidget( Q3Frame *page, const QStringList &items,
463 const QString &header,const QPixmap &pixmap ) 471 const QString &header,const QPixmap &pixmap )
464{ 472{
465/*US the following signal causes a segmentation fault while closing the dialog. 473/*US the following signal causes a segmentation fault while closing the dialog.
@@ -550,15 +558,15 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget )
550 { 558 {
551 delete mSwallowPage->layout(); 559 delete mSwallowPage->layout();
552 } 560 }
553 QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 ); 561 Q3GridLayout *gbox = new Q3GridLayout( mSwallowPage, 1, 1, 0 );
554 562
555 // 563 //
556 // Hide old children 564 // Hide old children
557 // 565 //
558 QObjectList *l = (QObjectList*)mSwallowPage->children(); // silence please 566 QObjectList l = mSwallowPage->children(); // silence please
559 for( uint i=0; i < l->count(); i++ ) 567 for( uint i=0; i < l.count(); i++ )
560 { 568 {
561 QObject *o = l->at(i); 569 QObject *o = l.at(i);
562 if( o->isWidgetType() ) 570 if( o->isWidgetType() )
563 { 571 {
564 ((QWidget*)o)->hide(); 572 ((QWidget*)o)->hide();
@@ -597,7 +605,7 @@ bool KJanusWidget::slotShowPage()
597 605
598 if( mFace == TreeList ) 606 if( mFace == TreeList )
599 { 607 {
600 QListViewItem *node = mTreeList->selectedItem(); 608 Q3ListViewItem *node = mTreeList->selectedItem();
601 if( node == 0 ) { return( false ); } 609 if( node == 0 ) { return( false ); }
602 610
603 QWidget *stackItem = mTreeListToPageStack[node]; 611 QWidget *stackItem = mTreeListToPageStack[node];
@@ -606,7 +614,7 @@ bool KJanusWidget::slotShowPage()
606 } 614 }
607 else if( mFace == IconList ) 615 else if( mFace == IconList )
608 { 616 {
609 QListBoxItem *node = mIconList->item( mIconList->currentItem() ); 617 Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() );
610 if( node == 0 ) { return( false ); } 618 if( node == 0 ) { return( false ); }
611 QWidget *stackItem = mIconListToPageStack[node]; 619 QWidget *stackItem = mIconListToPageStack[node];
612 // Make sure to call through the virtual function showPage(int) 620 // Make sure to call through the virtual function showPage(int)
@@ -646,9 +654,9 @@ bool KJanusWidget::showPage( QWidget *w )
646 mTitleLabel->setText( d->mIntToTitle[index] ); 654 mTitleLabel->setText( d->mIntToTitle[index] );
647 if( mFace == TreeList ) 655 if( mFace == TreeList )
648 { 656 {
649 QMap<QListViewItem *, QWidget *>::Iterator it; 657 QMap<Q3ListViewItem *, QWidget *>::Iterator it;
650 for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){ 658 for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){
651 QListViewItem *key = it.key(); 659 Q3ListViewItem *key = it.key();
652 QWidget *val = it.data(); 660 QWidget *val = it.data();
653 if (val == w) { 661 if (val == w) {
654 mTreeList->setSelected(key, true ); 662 mTreeList->setSelected(key, true );
@@ -658,9 +666,9 @@ bool KJanusWidget::showPage( QWidget *w )
658 } 666 }
659 else 667 else
660 { 668 {
661 QMap<QListBoxItem *, QWidget *>::Iterator it; 669 QMap<Q3ListBoxItem *, QWidget *>::Iterator it;
662 for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){ 670 for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){
663 QListBoxItem *key = it.key(); 671 Q3ListBoxItem *key = it.key();
664 QWidget *val = it.data(); 672 QWidget *val = it.data();
665 if (val == w) { 673 if (val == w) {
666 mIconList->setSelected( key, true ); 674 mIconList->setSelected( key, true );
@@ -686,13 +694,13 @@ bool KJanusWidget::showPage( QWidget *w )
686int KJanusWidget::activePageIndex() const 694int KJanusWidget::activePageIndex() const
687{ 695{
688 if( mFace == TreeList) { 696 if( mFace == TreeList) {
689 QListViewItem *node = mTreeList->selectedItem(); 697 Q3ListViewItem *node = mTreeList->selectedItem();
690 if( node == 0 ) { return -1; } 698 if( node == 0 ) { return -1; }
691 QWidget *stackItem = mTreeListToPageStack[node]; 699 QWidget *stackItem = mTreeListToPageStack[node];
692 return d->mPageToInt[stackItem]; 700 return d->mPageToInt[stackItem];
693 } 701 }
694 else if (mFace == IconList) { 702 else if (mFace == IconList) {
695 QListBoxItem *node = mIconList->item( mIconList->currentItem() ); 703 Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() );
696 if( node == 0 ) { return( false ); } 704 if( node == 0 ) { return( false ); }
697 QWidget *stackItem = mIconListToPageStack[node]; 705 QWidget *stackItem = mIconListToPageStack[node];
698 return d->mPageToInt[stackItem]; 706 return d->mPageToInt[stackItem];
@@ -761,7 +769,7 @@ void KJanusWidget::slotFontChanged()
761*/ 769*/
762 770
763// makes the treelist behave like the list of kcontrol 771// makes the treelist behave like the list of kcontrol
764void KJanusWidget::slotItemClicked(QListViewItem *it) 772void KJanusWidget::slotItemClicked(Q3ListViewItem *it)
765{ 773{
766 if(it && (it->childCount()>0)) 774 if(it && (it->childCount()>0))
767 it->setOpen(!it->isOpen()); 775 it->setOpen(!it->isOpen());
@@ -895,11 +903,11 @@ void KJanusWidget::unfoldTreeList( bool persist )
895 if( mFace == TreeList ) 903 if( mFace == TreeList )
896 { 904 {
897 if( persist ) 905 if( persist )
898 connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); 906 connect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) );
899 else 907 else
900 disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); 908 disconnect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) );
901 909
902 for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() ) 910 for( Q3ListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
903 item->setOpen( true ); 911 item->setOpen( true );
904 } 912 }
905} 913}
@@ -953,7 +961,7 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e )
953 961
954 962
955KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name, 963KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name,
956 WFlags f ) 964 Qt::WFlags f )
957 :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false), 965 :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
958 mWidthValid(false) 966 mWidthValid(false)
959{ 967{
@@ -965,7 +973,7 @@ void KJanusWidget::IconListBox::updateMinimumHeight()
965 if( mShowAll == true && mHeightValid == false ) 973 if( mShowAll == true && mHeightValid == false )
966 { 974 {
967 int h = frameWidth()*2; 975 int h = frameWidth()*2;
968 for( QListBoxItem *i = item(0); i != 0; i = i->next() ) 976 for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
969 { 977 {
970 h += i->height( this ); 978 h += i->height( this );
971 } 979 }
@@ -980,13 +988,13 @@ void KJanusWidget::IconListBox::updateWidth()
980 if( mWidthValid == false ) 988 if( mWidthValid == false )
981 { 989 {
982 int maxWidth = 10; 990 int maxWidth = 10;
983 for( QListBoxItem *i = item(0); i != 0; i = i->next() ) 991 for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
984 { 992 {
985 int w = ((IconListItem *)i)->width(this); 993 int w = ((IconListItem *)i)->width(this);
986 maxWidth = QMAX( w, maxWidth ); 994 maxWidth = QMAX( w, maxWidth );
987 } 995 }
988 996
989 for( QListBoxItem *i = item(0); i != 0; i = i->next() ) 997 for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() )
990 { 998 {
991 ((IconListItem *)i)->expandMinimumWidth( maxWidth ); 999 ((IconListItem *)i)->expandMinimumWidth( maxWidth );
992 } 1000 }
@@ -1022,9 +1030,9 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll )
1022 1030
1023 1031
1024 1032
1025KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap, 1033KJanusWidget::IconListItem::IconListItem( Q3ListBox *listbox, const QPixmap &pixmap,
1026 const QString &text ) 1034 const QString &text )
1027 : QListBoxItem( listbox ) 1035 : Q3ListBoxItem( listbox )
1028{ 1036{
1029 mPixmap = pixmap; 1037 mPixmap = pixmap;
1030 if( mPixmap.isNull() == true ) 1038 if( mPixmap.isNull() == true )
@@ -1083,7 +1091,7 @@ void KJanusWidget::IconListItem::paint( QPainter *painter )
1083 } 1091 }
1084} 1092}
1085 1093
1086int KJanusWidget::IconListItem::height( const QListBox *lb ) const 1094int KJanusWidget::IconListItem::height( const Q3ListBox *lb ) const
1087{ 1095{
1088 if( text().isEmpty() == true ) 1096 if( text().isEmpty() == true )
1089 { 1097 {
@@ -1096,7 +1104,7 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const
1096} 1104}
1097 1105
1098 1106
1099int KJanusWidget::IconListItem::width( const QListBox *lb ) const 1107int KJanusWidget::IconListItem::width( const Q3ListBox *lb ) const
1100{ 1108{
1101 int wt = lb->fontMetrics().boundingRect(text()).width()+10; 1109 int wt = lb->fontMetrics().boundingRect(text()).width()+10;
1102 int wp = mPixmap.width() + 10; 1110 int wp = mPixmap.width() + 10;
@@ -1122,7 +1130,7 @@ void KJanusWidget::removePage( QWidget *page )
1122 1130
1123 if ( mFace == TreeList ) 1131 if ( mFace == TreeList )
1124 { 1132 {
1125 QMap<QListViewItem*, QWidget *>::Iterator i; 1133 QMap<Q3ListViewItem*, QWidget *>::Iterator i;
1126 for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i ) 1134 for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i )
1127 if (i.data()==page) 1135 if (i.data()==page)
1128 { 1136 {
@@ -1137,7 +1145,7 @@ void KJanusWidget::removePage( QWidget *page )
1137 } 1145 }
1138 else if ( mFace == IconList ) 1146 else if ( mFace == IconList )
1139 { 1147 {
1140 QMap<QListBoxItem*, QWidget *>::Iterator i; 1148 QMap<Q3ListBoxItem*, QWidget *>::Iterator i;
1141 for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i ) 1149 for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i )
1142 if (i.data()==page) 1150 if (i.data()==page)
1143 { 1151 {
diff --git a/microkde/kdeui/kjanuswidget.h b/microkde/kdeui/kjanuswidget.h
index 6d3f23d..72465ea 100644
--- a/microkde/kdeui/kjanuswidget.h
+++ b/microkde/kdeui/kjanuswidget.h
@@ -20,10 +20,16 @@
20#ifndef _KJANUS_WIDGET_H_ 20#ifndef _KJANUS_WIDGET_H_
21#define _KJANUS_WIDGET_H_ 21#define _KJANUS_WIDGET_H_
22 22
23#include <qptrlist.h> 23#include <q3ptrlist.h>
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qmap.h> 25#include <qmap.h>
26#include <qgrid.h> 26#include <q3grid.h>
27//Added by qt3to4:
28#include <QShowEvent>
29#include <Q3Frame>
30#include <QPixmap>
31#include <QLabel>
32#include <QEvent>
27#include <klistbox.h> 33#include <klistbox.h>
28 34
29/*US 35/*US
@@ -38,12 +44,12 @@
38 44
39class KSeparator; 45class KSeparator;
40class KListView; 46class KListView;
41class QWidgetStack; 47class Q3WidgetStack;
42class QLabel; 48class QLabel;
43class QTabWidget; 49class QTabWidget;
44class QListViewItem; 50class Q3ListViewItem;
45class QVBox; 51class Q3VBox;
46class QHBox; 52class Q3HBox;
47 53
48/** 54/**
49 * Provides a number of ready to use layouts (faces). It is used 55 * Provides a number of ready to use layouts (faces). It is used
@@ -102,7 +108,7 @@ class KJanusWidget : public QWidget
102 class IconListBox : public KListBox 108 class IconListBox : public KListBox
103 { 109 {
104 public: 110 public:
105 IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 ); 111 IconListBox( QWidget *parent=0, const char *name=0, Qt::WFlags f=0 );
106 void updateMinimumHeight(); 112 void updateMinimumHeight();
107 void updateWidth(); 113 void updateWidth();
108 void invalidateHeight(); 114 void invalidateHeight();
@@ -193,7 +199,7 @@ class KJanusWidget : public QWidget
193 * 199 *
194 * @return The widget or 0 if the face in not Plain. 200 * @return The widget or 0 if the face in not Plain.
195 */ 201 */
196 virtual QFrame *plainPage(); 202 virtual Q3Frame *plainPage();
197 203
198 /** 204 /**
199 * Add a new page when the class is used in TreeList, IconList or Tabbed 205 * Add a new page when the class is used in TreeList, IconList or Tabbed
@@ -214,7 +220,7 @@ class KJanusWidget : public QWidget
214 * @return The empty page or 0 if the face is not TreeList, IconList or 220 * @return The empty page or 0 if the face is not TreeList, IconList or
215 * Tabbed. 221 * Tabbed.
216 */ 222 */
217 virtual QFrame *addPage(const QString &item,const QString &header=QString::null, 223 virtual Q3Frame *addPage(const QString &item,const QString &header=QString::null,
218 const QPixmap &pixmap=QPixmap() ); 224 const QPixmap &pixmap=QPixmap() );
219 225
220 /** 226 /**
@@ -231,7 +237,7 @@ class KJanusWidget : public QWidget
231 * Deleting the returned frame will cause the listitem or tab to be 237 * Deleting the returned frame will cause the listitem or tab to be
232 * removed (you can re-add a page with the same name later. 238 * removed (you can re-add a page with the same name later.
233 **/ 239 **/
234 virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null, 240 virtual Q3Frame *addPage(const QStringList &items, const QString &header=QString::null,
235 const QPixmap &pixmap=QPixmap() ); 241 const QPixmap &pixmap=QPixmap() );
236 242
237 /** 243 /**
@@ -253,7 +259,7 @@ class KJanusWidget : public QWidget
253 * 259 *
254 * @return The empty page or 0 if the face is not TreeList, IconList or 260 * @return The empty page or 0 if the face is not TreeList, IconList or
255 * Tabbed. */ 261 * Tabbed. */
256 virtual QVBox *addVBoxPage( const QString &item, 262 virtual Q3VBox *addVBoxPage( const QString &item,
257 const QString &header=QString::null, 263 const QString &header=QString::null,
258 const QPixmap &pixmap=QPixmap() ); 264 const QPixmap &pixmap=QPixmap() );
259 265
@@ -269,7 +275,7 @@ class KJanusWidget : public QWidget
269 * Deleting the returned frame will cause the listitem or tab to be 275 * Deleting the returned frame will cause the listitem or tab to be
270 * removed (you can re-add a page with the same name later. 276 * removed (you can re-add a page with the same name later.
271 **/ 277 **/
272 virtual QVBox *addVBoxPage( const QStringList &items, 278 virtual Q3VBox *addVBoxPage( const QStringList &items,
273 const QString &header=QString::null, 279 const QString &header=QString::null,
274 const QPixmap &pixmap=QPixmap() ); 280 const QPixmap &pixmap=QPixmap() );
275 281
@@ -293,7 +299,7 @@ class KJanusWidget : public QWidget
293 * @return The empty page or 0 if the face is not TreeList, IconList or 299 * @return The empty page or 0 if the face is not TreeList, IconList or
294 * Tabbed. 300 * Tabbed.
295 */ 301 */
296 virtual QHBox *addHBoxPage( const QString &itemName, 302 virtual Q3HBox *addHBoxPage( const QString &itemName,
297 const QString &header=QString::null, 303 const QString &header=QString::null,
298 const QPixmap &pixmap=QPixmap() ); 304 const QPixmap &pixmap=QPixmap() );
299 305
@@ -309,7 +315,7 @@ class KJanusWidget : public QWidget
309 * Deleting the returned frame will cause the listitem or tab to be 315 * Deleting the returned frame will cause the listitem or tab to be
310 * removed (you can re-add a page with the same name later. 316 * removed (you can re-add a page with the same name later.
311 **/ 317 **/
312 virtual QHBox *addHBoxPage( const QStringList &items, 318 virtual Q3HBox *addHBoxPage( const QStringList &items,
313 const QString &header=QString::null, 319 const QString &header=QString::null,
314 const QPixmap &pixmap=QPixmap() ); 320 const QPixmap &pixmap=QPixmap() );
315 321
@@ -337,7 +343,7 @@ class KJanusWidget : public QWidget
337 * Tabbed. 343 * Tabbed.
338 */ 344 */
339//US changed Orientation into Direction for compatibility 345//US changed Orientation into Direction for compatibility
340 virtual QGrid *addGridPage( int n, QGrid::Direction dir, 346 virtual Q3Grid *addGridPage( int n, Qt::Orientation dir,
341 const QString &itemName, 347 const QString &itemName,
342 const QString &header=QString::null, 348 const QString &header=QString::null,
343 const QPixmap &pixmap=QPixmap() ); 349 const QPixmap &pixmap=QPixmap() );
@@ -355,7 +361,7 @@ class KJanusWidget : public QWidget
355 * removed (you can re-add a page with the same name later. 361 * removed (you can re-add a page with the same name later.
356 **/ 362 **/
357//US changed Orientation into Direction for compatibility 363//US changed Orientation into Direction for compatibility
358 virtual QGrid *addGridPage( int n, QGrid::Direction dir, 364 virtual Q3Grid *addGridPage( int n, Qt::Orientation dir,
359 const QStringList &items, 365 const QStringList &items,
360 const QString &header=QString::null, 366 const QString &header=QString::null,
361 const QPixmap &pixmap=QPixmap() ); 367 const QPixmap &pixmap=QPixmap() );
@@ -517,38 +523,38 @@ class KJanusWidget : public QWidget
517 private slots: 523 private slots:
518 bool slotShowPage(); 524 bool slotShowPage();
519//US not yet implemented void slotFontChanged(); 525//US not yet implemented void slotFontChanged();
520 void slotItemClicked(QListViewItem *it); 526 void slotItemClicked(Q3ListViewItem *it);
521 void pageGone( QObject *obj); // signal from the added page's "destroyed" signal 527 void pageGone( QObject *obj); // signal from the added page's "destroyed" signal
522 void slotReopen(QListViewItem *item); 528 void slotReopen(Q3ListViewItem *item);
523 529
524 protected: 530 protected:
525 bool showPage( QWidget *w ); 531 bool showPage( QWidget *w );
526 void addPageWidget( QFrame *page, const QStringList &items, 532 void addPageWidget( Q3Frame *page, const QStringList &items,
527 const QString &header, const QPixmap &pixmap ); 533 const QString &header, const QPixmap &pixmap );
528 void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page); 534 void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page);
529 QWidget *FindParent(); 535 QWidget *FindParent();
530 536
531 private: 537 private:
532 bool mValid; 538 bool mValid;
533 539
534 // Obsolete members. Remove in KDE 4. 540 // Obsolete members. Remove in KDE 4.
535 QPtrList<QWidget> *mPageList; 541 Q3PtrList<QWidget> *mPageList;
536 QStringList *mTitleList; 542 QStringList *mTitleList;
537 543
538 int mFace; 544 int mFace;
539 KListView *mTreeList; 545 KListView *mTreeList;
540 IconListBox *mIconList; 546 IconListBox *mIconList;
541 QWidgetStack *mPageStack; 547 Q3WidgetStack *mPageStack;
542 QLabel *mTitleLabel; 548 QLabel *mTitleLabel;
543 QTabWidget *mTabControl; 549 QTabWidget *mTabControl;
544 QFrame *mPlainPage; 550 Q3Frame *mPlainPage;
545 QWidget *mSwallowPage; 551 QWidget *mSwallowPage;
546 QWidget *mActivePageWidget; 552 QWidget *mActivePageWidget;
547 KSeparator *mTitleSep; 553 KSeparator *mTitleSep;
548//US QSplitter::ResizeMode mTreeListResizeMode; 554//US QSplitter::ResizeMode mTreeListResizeMode;
549 bool mShowIconsInTreeList; 555 bool mShowIconsInTreeList;
550 QMap<QListViewItem *, QWidget *> mTreeListToPageStack; 556 QMap<Q3ListViewItem *, QWidget *> mTreeListToPageStack;
551 QMap<QListBoxItem *, QWidget *> mIconListToPageStack; 557 QMap<Q3ListBoxItem *, QWidget *> mIconListToPageStack;
552 QMap<QString, QPixmap> mFolderIconMap; 558 QMap<QString, QPixmap> mFolderIconMap;
553 QMap<QString, QStringList> mChildrenNames; 559 QMap<QString, QStringList> mChildrenNames;
554 QMap<QString, QWidget *> mChildPages; 560 QMap<QString, QWidget *> mChildPages;
diff --git a/microkde/kdeui/klistbox.cpp b/microkde/kdeui/klistbox.cpp
index c65b892..71020b3 100644
--- a/microkde/kdeui/klistbox.cpp
+++ b/microkde/kdeui/klistbox.cpp
@@ -16,6 +16,11 @@
16 Boston, MA 02111-1307, USA. 16 Boston, MA 02111-1307, USA.
17*/ 17*/
18#include <qtimer.h> 18#include <qtimer.h>
19//Added by qt3to4:
20#include <QEvent>
21#include <QMouseEvent>
22#include <QKeyEvent>
23#include <QFocusEvent>
19 24
20#include <kglobalsettings.h> 25#include <kglobalsettings.h>
21//US#include <kcursor.h> 26//US#include <kcursor.h>
@@ -26,22 +31,23 @@
26#include "klistbox.h" 31#include "klistbox.h"
27 32
28#ifdef Q_WS_X11 33#ifdef Q_WS_X11
34#include <QX11Info>
29#include <X11/Xlib.h> 35#include <X11/Xlib.h>
30#endif 36#endif
31#ifdef _WIN32_ 37#ifdef _WIN32_
32#define Q_WS_QWS 38#define Q_WS_QWS
33#endif 39#endif
34KListBox::KListBox( QWidget *parent, const char *name, WFlags f ) 40KListBox::KListBox( QWidget *parent, const char *name, Qt::WFlags f )
35 : QListBox( parent, name, f ) 41 : Q3ListBox( parent, name, f )
36{ 42{
37 connect( this, SIGNAL( onViewport() ), 43 connect( this, SIGNAL( onViewport() ),
38 this, SLOT( slotOnViewport() ) ); 44 this, SLOT( slotOnViewport() ) );
39 connect( this, SIGNAL( onItem( QListBoxItem * ) ), 45 connect( this, SIGNAL( onItem( Q3ListBoxItem * ) ),
40 this, SLOT( slotOnItem( QListBoxItem * ) ) ); 46 this, SLOT( slotOnItem( Q3ListBoxItem * ) ) );
41 47
42 connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *, 48 connect( this, SIGNAL( mouseButtonClicked( int, Q3ListBoxItem *,
43 const QPoint & ) ), 49 const QPoint & ) ),
44 this, SLOT( slotMouseButtonClicked( int, QListBoxItem *, 50 this, SLOT( slotMouseButtonClicked( int, Q3ListBoxItem *,
45 const QPoint & ) ) ); 51 const QPoint & ) ) );
46/*US 52/*US
47 53
@@ -60,7 +66,7 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
60 this, SLOT( slotAutoSelect() ) ); 66 this, SLOT( slotAutoSelect() ) );
61} 67}
62 68
63void KListBox::slotOnItem( QListBoxItem *item ) 69void KListBox::slotOnItem( Q3ListBoxItem *item )
64{ 70{
65/*US 71/*US
66 if ( item && m_bChangeCursorOverItem && m_bUseSingle ) 72 if ( item && m_bChangeCursorOverItem && m_bUseSingle )
@@ -139,11 +145,11 @@ void KListBox::slotAutoSelect()
139 Window child; 145 Window child;
140 int root_x, root_y, win_x, win_y; 146 int root_x, root_y, win_x, win_y;
141 uint keybstate; 147 uint keybstate;
142 XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, 148 XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
143 &root_x, &root_y, &win_x, &win_y, &keybstate ); 149 &root_x, &root_y, &win_x, &win_y, &keybstate );
144#endif 150#endif
145 151
146 QListBoxItem* previousItem = item( currentItem() ); 152 Q3ListBoxItem* previousItem = item( currentItem() );
147 setCurrentItem( m_pCurrentItem ); 153 setCurrentItem( m_pCurrentItem );
148 154
149 if( m_pCurrentItem ) { 155 if( m_pCurrentItem ) {
@@ -167,7 +173,7 @@ void KListBox::slotAutoSelect()
167 viewport()->setUpdatesEnabled( false ); 173 viewport()->setUpdatesEnabled( false );
168 174
169 bool down = index( previousItem ) < index( m_pCurrentItem ); 175 bool down = index( previousItem ) < index( m_pCurrentItem );
170 QListBoxItem* it = down ? previousItem : m_pCurrentItem; 176 Q3ListBoxItem* it = down ? previousItem : m_pCurrentItem;
171 for (;it ; it = it->next() ) { 177 for (;it ; it = it->next() ) {
172 if ( down && it == m_pCurrentItem ) { 178 if ( down && it == m_pCurrentItem ) {
173 setSelected( m_pCurrentItem, select ); 179 setSelected( m_pCurrentItem, select );
@@ -186,7 +192,7 @@ void KListBox::slotAutoSelect()
186 192
187 emit selectionChanged(); 193 emit selectionChanged();
188 194
189 if( selectionMode() == QListBox::Single ) 195 if( selectionMode() == Q3ListBox::Single )
190 emit selectionChanged( m_pCurrentItem ); 196 emit selectionChanged( m_pCurrentItem );
191 } 197 }
192#ifndef Q_WS_QWS //FIXME 198#ifndef Q_WS_QWS //FIXME
@@ -213,14 +219,14 @@ void KListBox::slotAutoSelect()
213#endif 219#endif
214} 220}
215 221
216void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos ) 222void KListBox::emitExecute( Q3ListBoxItem *item, const QPoint &pos )
217{ 223{
218#ifdef Q_WS_X11 //FIXME 224#ifdef Q_WS_X11 //FIXME
219 Window root; 225 Window root;
220 Window child; 226 Window child;
221 int root_x, root_y, win_x, win_y; 227 int root_x, root_y, win_x, win_y;
222 uint keybstate; 228 uint keybstate;
223 XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, 229 XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
224 &root_x, &root_y, &win_x, &win_y, &keybstate ); 230 &root_x, &root_y, &win_x, &win_y, &keybstate );
225#endif 231#endif
226 232
@@ -246,17 +252,17 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
246// 252//
247void KListBox::keyPressEvent(QKeyEvent *e) 253void KListBox::keyPressEvent(QKeyEvent *e)
248{ 254{
249 if( e->key() == Key_Escape ) 255 if( e->key() == Qt::Key_Escape )
250 { 256 {
251 e->ignore(); 257 e->ignore();
252 } 258 }
253 else if( e->key() == Key_F1 ) 259 else if( e->key() == Qt::Key_F1 )
254 { 260 {
255 e->ignore(); 261 e->ignore();
256 } 262 }
257 else 263 else
258 { 264 {
259 QListBox::keyPressEvent(e); 265 Q3ListBox::keyPressEvent(e);
260 } 266 }
261} 267}
262 268
@@ -264,19 +270,19 @@ void KListBox::focusOutEvent( QFocusEvent *fe )
264{ 270{
265 m_pAutoSelect->stop(); 271 m_pAutoSelect->stop();
266 272
267 QListBox::focusOutEvent( fe ); 273 Q3ListBox::focusOutEvent( fe );
268} 274}
269 275
270void KListBox::leaveEvent( QEvent *e ) 276void KListBox::leaveEvent( QEvent *e )
271{ 277{
272 m_pAutoSelect->stop(); 278 m_pAutoSelect->stop();
273 279
274 QListBox::leaveEvent( e ); 280 Q3ListBox::leaveEvent( e );
275} 281}
276 282
277void KListBox::contentsMousePressEvent( QMouseEvent *e ) 283void KListBox::contentsMousePressEvent( QMouseEvent *e )
278{ 284{
279 if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { 285 if( (selectionMode() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) ) {
280 bool block = signalsBlocked(); 286 bool block = signalsBlocked();
281 blockSignals( true ); 287 blockSignals( true );
282 288
@@ -285,26 +291,26 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
285 blockSignals( block ); 291 blockSignals( block );
286 } 292 }
287 293
288 QListBox::contentsMousePressEvent( e ); 294 Q3ListBox::contentsMousePressEvent( e );
289} 295}
290 296
291void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e ) 297void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
292{ 298{
293 QListBox::contentsMouseDoubleClickEvent( e ); 299 Q3ListBox::contentsMouseDoubleClickEvent( e );
294 300
295 QListBoxItem* item = itemAt( e->pos() ); 301 Q3ListBoxItem* item = itemAt( e->pos() );
296 302
297 if( item ) { 303 if( item ) {
298 emit doubleClicked( item, e->globalPos() ); 304 emit doubleClicked( item, e->globalPos() );
299 305
300 if( (e->button() == LeftButton) && !m_bUseSingle ) 306 if( (e->button() == Qt::LeftButton) && !m_bUseSingle )
301 emitExecute( item, e->globalPos() ); 307 emitExecute( item, e->globalPos() );
302 } 308 }
303} 309}
304 310
305void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos ) 311void KListBox::slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos )
306{ 312{
307 if( (btn == LeftButton) && item ) 313 if( (btn == Qt::LeftButton) && item )
308 emitExecute( item, pos ); 314 emitExecute( item, pos );
309} 315}
310 316
diff --git a/microkde/kdeui/klistbox.h b/microkde/kdeui/klistbox.h
index 8023780..5ec514b 100644
--- a/microkde/kdeui/klistbox.h
+++ b/microkde/kdeui/klistbox.h
@@ -18,7 +18,12 @@
18#ifndef KLISTBOX_H 18#ifndef KLISTBOX_H
19#define KLISTBOX_H 19#define KLISTBOX_H
20 20
21#include <qlistbox.h> 21#include <q3listbox.h>
22//Added by qt3to4:
23#include <QMouseEvent>
24#include <QFocusEvent>
25#include <QKeyEvent>
26#include <QEvent>
22 27
23/** 28/**
24 * Extends the functionality of @ref QListBox to honor the system 29 * Extends the functionality of @ref QListBox to honor the system
@@ -35,12 +40,12 @@
35 * 40 *
36 * @short A variant of @ref QListBox that honors KDE's system-wide settings. 41 * @short A variant of @ref QListBox that honors KDE's system-wide settings.
37 **/ 42 **/
38class KListBox : public QListBox 43class KListBox : public Q3ListBox
39{ 44{
40 Q_OBJECT 45 Q_OBJECT
41 46
42public: 47public:
43 KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 48 KListBox( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
44 49
45signals: 50signals:
46 51
@@ -54,7 +59,7 @@ signals:
54 * Note that you may not delete any @ref QListBoxItem objects in slots 59 * Note that you may not delete any @ref QListBoxItem objects in slots
55 * connected to this signal. 60 * connected to this signal.
56 */ 61 */
57 void executed( QListBoxItem *item ); 62 void executed( Q3ListBoxItem *item );
58 63
59 /** 64 /**
60 * Emitted whenever the user executes an listbox item. 65 * Emitted whenever the user executes an listbox item.
@@ -67,7 +72,7 @@ signals:
67 * Note that you may not delete any @ref QListBoxItem objects in slots 72 * Note that you may not delete any @ref QListBoxItem objects in slots
68 * connected to this signal. 73 * connected to this signal.
69 */ 74 */
70 void executed( QListBoxItem *item, const QPoint &pos ); 75 void executed( Q3ListBoxItem *item, const QPoint &pos );
71 76
72 /** 77 /**
73 * This signal gets emitted whenever the user double clicks into the 78 * This signal gets emitted whenever the user double clicks into the
@@ -83,10 +88,10 @@ signals:
83 * You should normally not need to use this. In most cases it's better 88 * You should normally not need to use this. In most cases it's better
84 * to use @ref executed() instead. 89 * to use @ref executed() instead.
85 */ 90 */
86 void doubleClicked( QListBoxItem *item, const QPoint &pos ); 91 void doubleClicked( Q3ListBoxItem *item, const QPoint &pos );
87 92
88protected slots: 93protected slots:
89 void slotOnItem( QListBoxItem *item ); 94 void slotOnItem( Q3ListBoxItem *item );
90 void slotOnViewport(); 95 void slotOnViewport();
91 96
92//US void slotSettingsChanged(int); 97//US void slotSettingsChanged(int);
@@ -97,7 +102,7 @@ protected slots:
97 void slotAutoSelect(); 102 void slotAutoSelect();
98 103
99protected: 104protected:
100 void emitExecute( QListBoxItem *item, const QPoint &pos ); 105 void emitExecute( Q3ListBoxItem *item, const QPoint &pos );
101 106
102 /** 107 /**
103 * @reimplemented 108 * @reimplemented
@@ -123,13 +128,13 @@ protected:
123 bool m_bUseSingle; 128 bool m_bUseSingle;
124//US bool m_bChangeCursorOverItem; 129//US bool m_bChangeCursorOverItem;
125 130
126 QListBoxItem* m_pCurrentItem; 131 Q3ListBoxItem* m_pCurrentItem;
127 132
128 QTimer* m_pAutoSelect; 133 QTimer* m_pAutoSelect;
129 int m_autoSelectDelay; 134 int m_autoSelectDelay;
130 135
131private slots: 136private slots:
132 void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos ); 137 void slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos );
133 138
134protected: 139protected:
135 virtual void virtual_hook( int id, void* data ); 140 virtual void virtual_hook( int id, void* data );
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 60f3084..0e98160 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -18,13 +18,27 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qdragobject.h> 21#include <q3dragobject.h>
22#include <qtimer.h> 22#include <qtimer.h>
23#include <qheader.h> 23#include <q3header.h>
24#include <qcursor.h> 24#include <qcursor.h>
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qstyle.h> 26#include <qstyle.h>
27#include <qpainter.h> 27#include <qpainter.h>
28//Added by qt3to4:
29#include <QDragLeaveEvent>
30#include <QKeyEvent>
31#include <Q3ValueList>
32#include <Q3PtrList>
33#include <QPixmap>
34#include <QDragEnterEvent>
35#include <QDragMoveEvent>
36#include <QDropEvent>
37#include <QResizeEvent>
38#include <QFocusEvent>
39#include <QMouseEvent>
40#include <QEvent>
41#include <QPaintEvent>
28 42
29#include <kglobalsettings.h> 43#include <kglobalsettings.h>
30#include <kconfig.h> 44#include <kconfig.h>
@@ -38,7 +52,7 @@
38#endif 52#endif
39#ifndef _WIN32_ 53#ifndef _WIN32_
40#define private public 54#define private public
41#include <qlistview.h> 55#include <q3listview.h>
42#undef private 56#undef private
43#endif 57#endif
44#include "klistview.h" 58#include "klistview.h"
@@ -46,9 +60,10 @@
46#ifndef DESKTOP_VERSION 60#ifndef DESKTOP_VERSION
47#include <qpe/qpeapplication.h> 61#include <qpe/qpeapplication.h>
48#endif 62#endif
63#include <Q3Action>
49 64
50// /*US 65// /*US
51class KListView::Tooltip : public QToolTip 66class KListView::Tooltip /* TODO:hacker:TODO: : public QToolTip */
52{ 67{
53public: 68public:
54 Tooltip (KListView* parent, QToolTipGroup* group = 0L); 69 Tooltip (KListView* parent, QToolTipGroup* group = 0L);
@@ -67,7 +82,7 @@ private:
67}; 82};
68 83
69KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group) 84KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group)
70 : QToolTip (parent, group), 85 : /* XXX:hacker:XXX: QToolTip (parent, group), */
71 mParent (parent) 86 mParent (parent)
72{ 87{
73} 88}
@@ -123,20 +138,20 @@ public:
123//US delete editor; 138//US delete editor;
124 } 139 }
125 140
126 QListViewItem* pCurrentItem; 141 Q3ListViewItem* pCurrentItem;
127 142
128 QTimer autoSelect; 143 QTimer autoSelect;
129 int autoSelectDelay; 144 int autoSelectDelay;
130 145
131 QTimer dragExpand; 146 QTimer dragExpand;
132 QListViewItem* dragOverItem; 147 Q3ListViewItem* dragOverItem;
133 QPoint dragOverPoint; 148 QPoint dragOverPoint;
134 149
135 QPoint startDragPos; 150 QPoint startDragPos;
136 int dragDelay; 151 int dragDelay;
137 152
138//US KListViewLineEdit *editor; 153//US KListViewLineEdit *editor;
139 QValueList<int> renameable; 154 Q3ValueList<int> renameable;
140 155
141 bool cursorInExecuteArea:1; 156 bool cursorInExecuteArea:1;
142 bool bUseSingle:1; 157 bool bUseSingle:1;
@@ -170,8 +185,8 @@ public:
170 QRect mOldDropVisualizer; 185 QRect mOldDropVisualizer;
171 int mDropVisualizerWidth; 186 int mDropVisualizerWidth;
172 QRect mOldDropHighlighter; 187 QRect mOldDropHighlighter;
173 QListViewItem *afterItemDrop; 188 Q3ListViewItem *afterItemDrop;
174 QListViewItem *parentItemDrop; 189 Q3ListViewItem *parentItemDrop;
175 190
176 QColor alternateBackground; 191 QColor alternateBackground;
177}; 192};
@@ -226,7 +241,7 @@ void KListViewLineEdit::load(QListViewItem *i, int c)
226 *tabOrderedRename functionality. 241 *tabOrderedRename functionality.
227 */ 242 */
228 243
229static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir) 244static int nextCol (KListView *pl, Q3ListViewItem *pi, int start, int dir)
230{ 245{
231 if (pi) 246 if (pi)
232 { 247 {
@@ -239,9 +254,9 @@ static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir)
239 return -1; 254 return -1;
240} 255}
241 256
242static QListViewItem *prevItem (QListViewItem *pi) 257static Q3ListViewItem *prevItem (Q3ListViewItem *pi)
243{ 258{
244 QListViewItem *pa = pi->itemAbove(); 259 Q3ListViewItem *pa = pi->itemAbove();
245 260
246 /*Does what the QListViewItem::previousSibling() 261 /*Does what the QListViewItem::previousSibling()
247 *of my dreams would do. 262 *of my dreams would do.
@@ -252,7 +267,7 @@ static QListViewItem *prevItem (QListViewItem *pi)
252 return NULL; 267 return NULL;
253} 268}
254 269
255static QListViewItem *lastQChild (QListViewItem *pi) 270static Q3ListViewItem *lastQChild (Q3ListViewItem *pi)
256{ 271{
257 if (pi) 272 if (pi)
258 { 273 {
@@ -260,7 +275,7 @@ static QListViewItem *lastQChild (QListViewItem *pi)
260 *This finds the last sibling for the given 275 *This finds the last sibling for the given
261 *item. 276 *item.
262 */ 277 */
263 for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling()) 278 for (Q3ListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling())
264 pi = pt; 279 pi = pt;
265 } 280 }
266 281
@@ -328,10 +343,10 @@ bool KListViewLineEdit::event (QEvent *pe)
328 343
329 if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) && 344 if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) &&
330 p->tabOrderedRenaming() && p->itemsRenameable() && 345 p->tabOrderedRenaming() && p->itemsRenameable() &&
331 !(k->state() & ControlButton || k->state() & AltButton)) 346 !(k->state() & Qt::ControlButton || k->state() & AltButton))
332 { 347 {
333 selectNextCell(item, col, 348 selectNextCell(item, col,
334 (k->key() == Key_Tab && !(k->state() & ShiftButton))); 349 (k->key() == Key_Tab && !(k->state() & Qt::ShiftButton)));
335 return true; 350 return true;
336 } 351 }
337 } 352 }
@@ -406,7 +421,7 @@ void KListViewLineEdit::slotSelectionChanged()
406*/ 421*/
407 422
408KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse ) 423KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse )
409 : QListView( parent, name ), 424 : Q3ListView( parent, name ),
410 d (new KListViewPrivate (this)) 425 d (new KListViewPrivate (this))
411{ 426{
412#ifndef DESKTOP_VERSION 427#ifndef DESKTOP_VERSION
@@ -417,8 +432,8 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
417 432
418 connect( this, SIGNAL( onViewport() ), 433 connect( this, SIGNAL( onViewport() ),
419 this, SLOT( slotOnViewport() ) ); 434 this, SLOT( slotOnViewport() ) );
420 connect( this, SIGNAL( onItem( QListViewItem * ) ), 435 connect( this, SIGNAL( onItem( Q3ListViewItem * ) ),
421 this, SLOT( slotOnItem( QListViewItem * ) ) ); 436 this, SLOT( slotOnItem( Q3ListViewItem * ) ) );
422 437
423 connect (this, SIGNAL(contentsMoving(int,int)), 438 connect (this, SIGNAL(contentsMoving(int,int)),
424 this, SLOT(cleanDropVisualizer())); 439 this, SLOT(cleanDropVisualizer()));
@@ -445,17 +460,17 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse
445 // context menu handling 460 // context menu handling
446 if (d->showContextMenusOnPress) 461 if (d->showContextMenusOnPress)
447 { 462 {
448 connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)), 463 connect (this, SIGNAL (rightButtonPressed (Q3ListViewItem*, const QPoint&, int)),
449 this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int))); 464 this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int)));
450 } 465 }
451 else 466 else
452 { 467 {
453 connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)), 468 connect (this, SIGNAL (rightButtonClicked (Q3ListViewItem*, const QPoint&, int)),
454 this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int))); 469 this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int)));
455 } 470 }
456 471
457 connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)), 472 connect (this, SIGNAL (menuShortCutPressed (KListView*, Q3ListViewItem*)),
458 this, SLOT (emitContextMenu (KListView*, QListViewItem*))); 473 this, SLOT (emitContextMenu (KListView*, Q3ListViewItem*)));
459 474
460 475
461 //qDebug("KListView::KListView make alternate color configurable"); 476 //qDebug("KListView::KListView make alternate color configurable");
@@ -480,7 +495,7 @@ QSize KListView::sizeHint() const
480{ 495{
481 //qDebug("KListView::QSize sizeHint() "); 496 //qDebug("KListView::QSize sizeHint() ");
482#ifdef DESKTOP_VERSION 497#ifdef DESKTOP_VERSION
483 return QListView::sizeHint(); 498 return Q3ListView::sizeHint();
484#else 499#else
485 return QSize ( 40, 40 ); 500 return QSize ( 40, 40 );
486#endif 501#endif
@@ -503,7 +518,7 @@ bool KListView::isExecuteArea( int x )
503 } 518 }
504} 519}
505 520
506void KListView::slotOnItem( QListViewItem *item ) 521void KListView::slotOnItem( Q3ListViewItem *item )
507{ 522{
508 QPoint vp = viewport()->mapFromGlobal( QCursor::pos() ); 523 QPoint vp = viewport()->mapFromGlobal( QCursor::pos() );
509 if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) { 524 if ( item && isExecuteArea( vp.x() ) && (d->autoSelectDelay > -1) && d->bUseSingle ) {
@@ -534,12 +549,12 @@ void KListView::slotSettingsChanged(int category)
534 //US set explicitly d->bUseSingle = KGlobalSettings::singleClick(); 549 //US set explicitly d->bUseSingle = KGlobalSettings::singleClick();
535 // qDebug("KListView::slotSettingsChanged: single%i", d->bUseSingle); 550 // qDebug("KListView::slotSettingsChanged: single%i", d->bUseSingle);
536 551
537 disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), 552 disconnect(this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)),
538 this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int))); 553 this, SLOT (slotMouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)));
539 554
540 if( d->bUseSingle ) 555 if( d->bUseSingle )
541 connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), 556 connect (this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)),
542 this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int))); 557 this, SLOT (slotMouseButtonClicked( int, Q3ListViewItem*, const QPoint &, int)));
543 558
544 //US d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); 559 //US d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon();
545 //US d->autoSelectDelay = KGlobalSettings::autoSelectDelay(); 560 //US d->autoSelectDelay = KGlobalSettings::autoSelectDelay();
@@ -611,7 +626,7 @@ void KListView::slotAutoSelect()
611 if( !hasFocus() ) 626 if( !hasFocus() )
612 setFocus(); 627 setFocus();
613 628
614 QListViewItem* previousItem = currentItem(); 629 Q3ListViewItem* previousItem = currentItem();
615 setCurrentItem( d->pCurrentItem ); 630 setCurrentItem( d->pCurrentItem );
616 631
617#if 0 632#if 0
@@ -632,7 +647,7 @@ void KListView::slotAutoSelect()
632 viewport()->setUpdatesEnabled( false ); 647 viewport()->setUpdatesEnabled( false );
633 648
634 bool down = previousItem->itemPos() < d->pCurrentItem->itemPos(); 649 bool down = previousItem->itemPos() < d->pCurrentItem->itemPos();
635 QListViewItemIterator lit( down ? previousItem : d->pCurrentItem ); 650 Q3ListViewItemIterator lit( down ? previousItem : d->pCurrentItem );
636 for ( ; lit.current(); ++lit ) { 651 for ( ; lit.current(); ++lit ) {
637 if ( down && lit.current() == d->pCurrentItem ) { 652 if ( down && lit.current() == d->pCurrentItem ) {
638 d->pCurrentItem->setSelected( select ); 653 d->pCurrentItem->setSelected( select );
@@ -651,7 +666,7 @@ void KListView::slotAutoSelect()
651 666
652 emit selectionChanged(); 667 emit selectionChanged();
653 668
654 if( selectionMode() == QListView::Single ) 669 if( selectionMode() == Q3ListView::Single )
655 emit selectionChanged( d->pCurrentItem ); 670 emit selectionChanged( d->pCurrentItem );
656 } 671 }
657 else if( (keybstate & ControlMask) ) 672 else if( (keybstate & ControlMask) )
@@ -684,7 +699,7 @@ void KListView::slotHeaderChanged()
684 } 699 }
685} 700}
686 701
687void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c) 702void KListView::emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c)
688{ 703{
689 // qDebug("KListView::emitExecute buttonstate=%i", buttonstate); 704 // qDebug("KListView::emitExecute buttonstate=%i", buttonstate);
690 if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) { 705 if( isExecuteArea( viewport()->mapFromGlobal(pos) ) ) {
@@ -701,7 +716,7 @@ void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint
701 d->autoSelect.stop(); 716 d->autoSelect.stop();
702 717
703 //Dont emit executed if in SC mode and Shift or Ctrl are pressed 718 //Dont emit executed if in SC mode and Shift or Ctrl are pressed
704 if( !( (buttonstate==ShiftButton) || (buttonstate==ControlButton) )) { 719 if( !( (buttonstate==Qt::ShiftButton) || (buttonstate==Qt::ControlButton) )) {
705 // if( !( ((keybstate & ShiftMask) || (keybstate & ControlMask)) ) ) { 720 // if( !( ((keybstate & ShiftMask) || (keybstate & ControlMask)) ) ) {
706 721
707 emit executed( item ); 722 emit executed( item );
@@ -714,7 +729,7 @@ void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint
714void KListView::focusInEvent( QFocusEvent *fe ) 729void KListView::focusInEvent( QFocusEvent *fe )
715{ 730{
716 // kdDebug()<<"KListView::focusInEvent()"<<endl; 731 // kdDebug()<<"KListView::focusInEvent()"<<endl;
717 QListView::focusInEvent( fe ); 732 Q3ListView::focusInEvent( fe );
718 if ((d->selectedBySimpleMove) 733 if ((d->selectedBySimpleMove)
719 && (d->selectionMode == FileManager) 734 && (d->selectionMode == FileManager)
720 && (fe->reason()!=QFocusEvent::Popup) 735 && (fe->reason()!=QFocusEvent::Popup)
@@ -747,14 +762,14 @@ void KListView::focusOutEvent( QFocusEvent *fe )
747 emit selectionChanged(); 762 emit selectionChanged();
748 }; 763 };
749 764
750 QListView::focusOutEvent( fe ); 765 Q3ListView::focusOutEvent( fe );
751} 766}
752 767
753void KListView::leaveEvent( QEvent *e ) 768void KListView::leaveEvent( QEvent *e )
754{ 769{
755 d->autoSelect.stop(); 770 d->autoSelect.stop();
756 771
757 QListView::leaveEvent( e ); 772 Q3ListView::leaveEvent( e );
758} 773}
759 774
760bool KListView::event( QEvent *e ) 775bool KListView::event( QEvent *e )
@@ -765,13 +780,13 @@ bool KListView::event( QEvent *e )
765 d->alternateBackground = QColor(240, 240, 240); 780 d->alternateBackground = QColor(240, 240, 240);
766 } 781 }
767 782
768 return QListView::event(e); 783 return Q3ListView::event(e);
769} 784}
770 785
771void KListView::contentsMousePressEvent( QMouseEvent *e ) 786void KListView::contentsMousePressEvent( QMouseEvent *e )
772{ 787{
773 //qDebug("KListView::contentsMousePressEvent"); 788 //qDebug("KListView::contentsMousePressEvent");
774 if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) 789 if( (selectionModeExt() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) )
775 { 790 {
776 bool block = signalsBlocked(); 791 bool block = signalsBlocked();
777 blockSignals( true ); 792 blockSignals( true );
@@ -793,7 +808,7 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
793 }; 808 };
794 809
795 QPoint p( contentsToViewport( e->pos() ) ); 810 QPoint p( contentsToViewport( e->pos() ) );
796 QListViewItem *at = itemAt (p); 811 Q3ListViewItem *at = itemAt (p);
797 812
798 // true if the root decoration of the item "at" was clicked (i.e. the +/- sign) 813 // true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
799 bool rootDecoClicked = at 814 bool rootDecoClicked = at
@@ -801,7 +816,7 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
801 treeStepSize() * ( at->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() ) 816 treeStepSize() * ( at->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() )
802 && ( p.x() >= header()->cellPos( header()->mapToActual( 0 ) ) ); 817 && ( p.x() >= header()->cellPos( header()->mapToActual( 0 ) ) );
803 818
804 if (e->button() == LeftButton && !rootDecoClicked) 819 if (e->button() == Qt::LeftButton && !rootDecoClicked)
805 { 820 {
806 //Start a drag 821 //Start a drag
807 d->startDragPos = e->pos(); 822 d->startDragPos = e->pos();
@@ -813,18 +828,18 @@ void KListView::contentsMousePressEvent( QMouseEvent *e )
813 } 828 }
814 } 829 }
815 830
816 QListView::contentsMousePressEvent( e ); 831 Q3ListView::contentsMousePressEvent( e );
817} 832}
818 833
819void KListView::contentsMouseMoveEvent( QMouseEvent *e ) 834void KListView::contentsMouseMoveEvent( QMouseEvent *e )
820{ 835{
821 if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) { 836 if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) {
822 QListView::contentsMouseMoveEvent (e); 837 Q3ListView::contentsMouseMoveEvent (e);
823 return; 838 return;
824 } 839 }
825 840
826 QPoint vp = contentsToViewport(e->pos()); 841 QPoint vp = contentsToViewport(e->pos());
827 QListViewItem *item = itemAt( vp ); 842 Q3ListViewItem *item = itemAt( vp );
828 843
829 //do we process cursor changes at all? 844 //do we process cursor changes at all?
830 if ( item && d->bChangeCursorOverItem && d->bUseSingle ) 845 if ( item && d->bChangeCursorOverItem && d->bUseSingle )
@@ -853,7 +868,7 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
853 newPos.y() < d->startDragPos.y()-d->dragDelay)) 868 newPos.y() < d->startDragPos.y()-d->dragDelay))
854 //(d->startDragPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) 869 //(d->startDragPos - e->pos()).manhattanLength() > QApplication::startDragDistance())
855 { 870 {
856 QListView::contentsMouseReleaseEvent( 0 ); 871 Q3ListView::contentsMouseReleaseEvent( 0 );
857 startDrag(); 872 startDrag();
858 d->startDragPos = QPoint(); 873 d->startDragPos = QPoint();
859 d->validDrag = false; 874 d->validDrag = false;
@@ -862,13 +877,13 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e )
862 877
863void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) 878void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
864{ 879{
865 if (e->button() == LeftButton) 880 if (e->button() == Qt::LeftButton)
866 { 881 {
867 // If the row was already selected, maybe we want to start an in-place editing 882 // If the row was already selected, maybe we want to start an in-place editing
868 if ( d->pressedOnSelected && itemsRenameable() ) 883 if ( d->pressedOnSelected && itemsRenameable() )
869 { 884 {
870 QPoint p( contentsToViewport( e->pos() ) ); 885 QPoint p( contentsToViewport( e->pos() ) );
871 QListViewItem *at = itemAt (p); 886 Q3ListViewItem *at = itemAt (p);
872 if ( at ) 887 if ( at )
873 { 888 {
874 // true if the root decoration of the item "at" was clicked (i.e. the +/- sign) 889 // true if the root decoration of the item "at" was clicked (i.e. the +/- sign)
@@ -890,7 +905,7 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e )
890 d->validDrag = false; 905 d->validDrag = false;
891 d->startDragPos = QPoint(); 906 d->startDragPos = QPoint();
892 } 907 }
893 QListView::contentsMouseReleaseEvent( e ); 908 Q3ListView::contentsMouseReleaseEvent( e );
894} 909}
895 910
896void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e ) 911void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
@@ -901,8 +916,8 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
901 //QListView::contentsMouseDoubleClickEvent( e ); 916 //QListView::contentsMouseDoubleClickEvent( e );
902 917
903 QPoint vp = contentsToViewport(e->pos()); 918 QPoint vp = contentsToViewport(e->pos());
904 QListViewItem *item = itemAt( vp ); 919 Q3ListViewItem *item = itemAt( vp );
905 emit QListView::doubleClicked( item ); // we do it now 920 emit Q3ListView::doubleClicked( item ); // we do it now
906 921
907 int col = item ? header()->mapToLogical( header()->cellAt( vp.x() ) ) : -1; 922 int col = item ? header()->mapToLogical( header()->cellAt( vp.x() ) ) : -1;
908 923
@@ -911,7 +926,7 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
911 926
912 emit doubleClicked( item, e->globalPos(), col ); 927 emit doubleClicked( item, e->globalPos(), col );
913 928
914 if( (e->button() == LeftButton) && !d->bUseSingle ) { 929 if( (e->button() == Qt::LeftButton) && !d->bUseSingle ) {
915 //qDebug("KListView::contentsMouseDoubleClickEvent: emitExecute"); 930 //qDebug("KListView::contentsMouseDoubleClickEvent: emitExecute");
916 931
917 emitExecute( e->button(), item, e->globalPos(), col); 932 emitExecute( e->button(), item, e->globalPos(), col);
@@ -919,11 +934,11 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e )
919 } 934 }
920} 935}
921 936
922void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c ) 937void KListView::slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c )
923{ 938{
924 //qDebug("KListView::slotMouseButtonClicked"); 939 //qDebug("KListView::slotMouseButtonClicked");
925 940
926 if( (btn == LeftButton) && item ) { 941 if( (btn == Qt::LeftButton) && item ) {
927 //qDebug("KListView::slotMouseButtonClicked: emitExecute"); 942 //qDebug("KListView::slotMouseButtonClicked: emitExecute");
928 943
929 emitExecute(btn, item, pos, c); 944 emitExecute(btn, item, pos, c);
@@ -961,12 +976,12 @@ qDebug("KListView::contentsDropEvent drag&drop not supported yet");
961 976
962} 977}
963 978
964void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme) 979void KListView::movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme)
965{ 980{
966 QPtrList<QListViewItem> items, afterFirsts, afterNows; 981 Q3PtrList<Q3ListViewItem> items, afterFirsts, afterNows;
967 QListViewItem *current=currentItem(); 982 Q3ListViewItem *current=currentItem();
968 bool hasMoved=false; 983 bool hasMoved=false;
969 for (QListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext) 984 for (Q3ListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext)
970 { 985 {
971 iNext=i->itemBelow(); 986 iNext=i->itemBelow();
972 if (!i->isSelected()) 987 if (!i->isSelected())
@@ -979,7 +994,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
979 994
980 i->setSelected(false); 995 i->setSelected(false);
981 996
982 QListViewItem *afterFirst = i->itemAbove(); 997 Q3ListViewItem *afterFirst = i->itemAbove();
983 998
984 if (!hasMoved) 999 if (!hasMoved)
985 { 1000 {
@@ -1000,7 +1015,7 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
1000 afterme = i; 1015 afterme = i;
1001 } 1016 }
1002 clearSelection(); 1017 clearSelection();
1003 for (QListViewItem *i=items.first(); i != 0; i=items.next() ) 1018 for (Q3ListViewItem *i=items.first(); i != 0; i=items.next() )
1004 i->setSelected(true); 1019 i->setSelected(true);
1005 if (current) 1020 if (current)
1006 setCurrentItem(current); 1021 setCurrentItem(current);
@@ -1086,14 +1101,14 @@ int KListView::depthToPixels( int depth )
1086 return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin(); 1101 return treeStepSize() * ( depth + (rootIsDecorated() ? 1 : 0) ) + itemMargin();
1087} 1102}
1088 1103
1089void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after) 1104void KListView::findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after)
1090{ 1105{
1091 QPoint p (contentsToViewport(pos)); 1106 QPoint p (contentsToViewport(pos));
1092 1107
1093 // Get the position to put it in 1108 // Get the position to put it in
1094 QListViewItem *atpos = itemAt(p); 1109 Q3ListViewItem *atpos = itemAt(p);
1095 1110
1096 QListViewItem *above; 1111 Q3ListViewItem *above;
1097 if (!atpos) // put it at the end 1112 if (!atpos) // put it at the end
1098 above = lastItem(); 1113 above = lastItem();
1099 else 1114 else
@@ -1123,8 +1138,8 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
1123 1138
1124 // Ok, there's one more level of complexity. We may want to become a new 1139 // Ok, there's one more level of complexity. We may want to become a new
1125 // sibling, but of an upper-level group, rather than the "above" item 1140 // sibling, but of an upper-level group, rather than the "above" item
1126 QListViewItem * betterAbove = above->parent(); 1141 Q3ListViewItem * betterAbove = above->parent();
1127 QListViewItem * last = above; 1142 Q3ListViewItem * last = above;
1128 while ( betterAbove ) 1143 while ( betterAbove )
1129 { 1144 {
1130 // We are allowed to become a sibling of "betterAbove" only if we are 1145 // We are allowed to become a sibling of "betterAbove" only if we are
@@ -1146,9 +1161,9 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte
1146 parent = after ? after->parent() : 0L ; 1161 parent = after ? after->parent() : 0L ;
1147} 1162}
1148 1163
1149QListViewItem* KListView::lastChild () const 1164Q3ListViewItem* KListView::lastChild () const
1150{ 1165{
1151 QListViewItem* lastchild = firstChild(); 1166 Q3ListViewItem* lastchild = firstChild();
1152 1167
1153 if (lastchild) 1168 if (lastchild)
1154 for (; lastchild->nextSibling(); lastchild = lastchild->nextSibling()); 1169 for (; lastchild->nextSibling(); lastchild = lastchild->nextSibling());
@@ -1156,11 +1171,11 @@ QListViewItem* KListView::lastChild () const
1156 return lastchild; 1171 return lastchild;
1157} 1172}
1158 1173
1159QListViewItem *KListView::lastItem() const 1174Q3ListViewItem *KListView::lastItem() const
1160{ 1175{
1161 QListViewItem* last = lastChild(); 1176 Q3ListViewItem* last = lastChild();
1162 1177
1163 for (QListViewItemIterator it (last); it.current(); ++it) 1178 for (Q3ListViewItemIterator it (last); it.current(); ++it)
1164 last = it.current(); 1179 last = it.current();
1165 1180
1166 return last; 1181 return last;
@@ -1187,12 +1202,12 @@ qDebug("KListView::startDrag drag&drop not supported yet.");
1187*/ 1202*/
1188} 1203}
1189 1204
1190QDragObject *KListView::dragObject() 1205Q3DragObject *KListView::dragObject()
1191{ 1206{
1192 if (!currentItem()) 1207 if (!currentItem())
1193 return 0; 1208 return 0;
1194 1209
1195 return new QStoredDrag("application/x-qlistviewitem", viewport()); 1210 return new Q3StoredDrag("application/x-qlistviewitem", viewport());
1196} 1211}
1197 1212
1198void KListView::setItemsMovable(bool b) 1213void KListView::setItemsMovable(bool b)
@@ -1246,19 +1261,19 @@ void KListView::setDropVisualizer(bool b)
1246 d->dropVisualizer=b; 1261 d->dropVisualizer=b;
1247} 1262}
1248 1263
1249QPtrList<QListViewItem> KListView::selectedItems() const 1264Q3PtrList<Q3ListViewItem> KListView::selectedItems() const
1250{ 1265{
1251 QPtrList<QListViewItem> list; 1266 Q3PtrList<Q3ListViewItem> list;
1252 for (QListViewItem *i=firstChild(); i!=0; i=i->itemBelow()) 1267 for (Q3ListViewItem *i=firstChild(); i!=0; i=i->itemBelow())
1253 if (i->isSelected()) list.append(i); 1268 if (i->isSelected()) list.append(i);
1254 return list; 1269 return list;
1255} 1270}
1256 1271
1257 1272
1258void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after) 1273void KListView::moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after)
1259{ 1274{
1260 // sanity check - don't move a item into it's own child structure 1275 // sanity check - don't move a item into it's own child structure
1261 QListViewItem *i = parent; 1276 Q3ListViewItem *i = parent;
1262 while(i) 1277 while(i)
1263 { 1278 {
1264 if(i == item) 1279 if(i == item)
@@ -1296,8 +1311,8 @@ void KListView::setDropVisualizerWidth (int w)
1296 d->mDropVisualizerWidth = w > 0 ? w : 1; 1311 d->mDropVisualizerWidth = w > 0 ? w : 1;
1297} 1312}
1298 1313
1299QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, 1314QRect KListView::drawDropVisualizer(QPainter *p, Q3ListViewItem *parent,
1300 QListViewItem *after) 1315 Q3ListViewItem *after)
1301{ 1316{
1302 QRect insertmarker; 1317 QRect insertmarker;
1303 1318
@@ -1308,7 +1323,7 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
1308 int level = 0; 1323 int level = 0;
1309 if (after) 1324 if (after)
1310 { 1325 {
1311 QListViewItem* it = 0L; 1326 Q3ListViewItem* it = 0L;
1312 if (after->isOpen()) 1327 if (after->isOpen())
1313 { 1328 {
1314 // Look for the last child (recursively) 1329 // Look for the last child (recursively)
@@ -1338,12 +1353,12 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent,
1338 // This is not used anymore, at least by KListView itself (see viewportPaintEvent) 1353 // This is not used anymore, at least by KListView itself (see viewportPaintEvent)
1339 // Remove for KDE 3.0. 1354 // Remove for KDE 3.0.
1340 if (p) 1355 if (p)
1341 p->fillRect(insertmarker, Dense4Pattern); 1356 p->fillRect(insertmarker, Qt::Dense4Pattern);
1342 1357
1343 return insertmarker; 1358 return insertmarker;
1344} 1359}
1345 1360
1346QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item) 1361QRect KListView::drawItemHighlighter(QPainter *painter, Q3ListViewItem *item)
1347{ 1362{
1348 QRect r; 1363 QRect r;
1349 1364
@@ -1376,7 +1391,7 @@ void KListView::cleanItemHighlighter ()
1376 } 1391 }
1377} 1392}
1378 1393
1379void KListView::rename(QListViewItem *item, int c) 1394void KListView::rename(Q3ListViewItem *item, int c)
1380{ 1395{
1381 if (d->renameable.contains(c)) 1396 if (d->renameable.contains(c))
1382 { 1397 {
@@ -1403,7 +1418,7 @@ void KListView::setRenameable (int col, bool yesno)
1403 d->renameable.remove(col); 1418 d->renameable.remove(col);
1404} 1419}
1405 1420
1406void KListView::doneEditing(QListViewItem *item, int row) 1421void KListView::doneEditing(Q3ListViewItem *item, int row)
1407{ 1422{
1408 emit itemRenamed(item, item->text(row), row); 1423 emit itemRenamed(item, item->text(row), row);
1409 emit itemRenamed(item); 1424 emit itemRenamed(item);
@@ -1447,12 +1462,12 @@ bool KListView::dropHighlighter() const
1447 return d->dropHighlighter; 1462 return d->dropHighlighter;
1448} 1463}
1449 1464
1450bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const 1465bool KListView::showTooltip(Q3ListViewItem *item, const QPoint &, int column) const
1451{ 1466{
1452 return ((tooltip(item, column).length()>0) && (column==tooltipColumn())); 1467 return ((tooltip(item, column).length()>0) && (column==tooltipColumn()));
1453} 1468}
1454 1469
1455QString KListView::tooltip(QListViewItem *item, int column) const 1470QString KListView::tooltip(Q3ListViewItem *item, int column) const
1456{ 1471{
1457 return item->text(column); 1472 return item->text(column);
1458} 1473}
@@ -1482,7 +1497,7 @@ void KListView::keyPressEvent (QKeyEvent* e)
1482 } 1497 }
1483 1498
1484 if (d->selectionMode != FileManager) 1499 if (d->selectionMode != FileManager)
1485 QListView::keyPressEvent (e); 1500 Q3ListView::keyPressEvent (e);
1486 else 1501 else
1487 fileManagerKeyPressEvent (e); 1502 fileManagerKeyPressEvent (e);
1488} 1503}
@@ -1513,45 +1528,45 @@ bool KListView::automaticSelection() const
1513void KListView::fileManagerKeyPressEvent (QKeyEvent* e) 1528void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1514{ 1529{
1515 //don't care whether it's on the keypad or not 1530 //don't care whether it's on the keypad or not
1516 int e_state=(e->state() & ~Keypad); 1531 int e_state=(e->state() & ~Qt::Keypad);
1517 1532
1518 int oldSelectionDirection(d->selectionDirection); 1533 int oldSelectionDirection(d->selectionDirection);
1519 1534
1520 if ((e->key()!=Key_Shift) && (e->key()!=Key_Control) 1535 if ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control)
1521 && (e->key()!=Key_Meta) && (e->key()!=Key_Alt)) 1536 && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt))
1522 { 1537 {
1523 if ((e_state==ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove)) 1538 if ((e_state==Qt::ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove))
1524 selectAll(FALSE); 1539 selectAll(FALSE);
1525 d->selectionDirection=0; 1540 d->selectionDirection=0;
1526 d->wasShiftEvent = (e_state == ShiftButton); 1541 d->wasShiftEvent = (e_state == Qt::ShiftButton);
1527 }; 1542 };
1528 1543
1529 //d->wasShiftEvent = (e_state == ShiftButton); 1544 //d->wasShiftEvent = (e_state == Qt::ShiftButton);
1530 1545
1531 1546
1532 QListViewItem* item = currentItem(); 1547 Q3ListViewItem* item = currentItem();
1533 if (item==0) return; 1548 if (item==0) return;
1534 1549
1535 QListViewItem* repaintItem1 = item; 1550 Q3ListViewItem* repaintItem1 = item;
1536 QListViewItem* repaintItem2 = 0L; 1551 Q3ListViewItem* repaintItem2 = 0L;
1537 QListViewItem* visItem = 0L; 1552 Q3ListViewItem* visItem = 0L;
1538 1553
1539 QListViewItem* nextItem = 0L; 1554 Q3ListViewItem* nextItem = 0L;
1540 int items = 0; 1555 int items = 0;
1541 1556
1542 bool shiftOrCtrl((e_state==ControlButton) || (e_state==ShiftButton)); 1557 bool shiftOrCtrl((e_state==Qt::ControlButton) || (e_state==Qt::ShiftButton));
1543 int selectedItems(0); 1558 int selectedItems(0);
1544 for (QListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling()) 1559 for (Q3ListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling())
1545 if (tmpItem->isSelected()) selectedItems++; 1560 if (tmpItem->isSelected()) selectedItems++;
1546 1561
1547 if (((selectedItems==0) || ((selectedItems==1) && (d->selectedUsingMouse))) 1562 if (((selectedItems==0) || ((selectedItems==1) && (d->selectedUsingMouse)))
1548 && (e_state==NoButton) 1563 && (e_state==Qt::NoButton)
1549 && ((e->key()==Key_Down) 1564 && ((e->key()==Qt::Key_Down)
1550 || (e->key()==Key_Up) 1565 || (e->key()==Qt::Key_Up)
1551 || (e->key()==Key_Next) 1566 || (e->key()==Qt::Key_Next)
1552 || (e->key()==Key_Prior) 1567 || (e->key()==Qt::Key_Prior)
1553 || (e->key()==Key_Home) 1568 || (e->key()==Qt::Key_Home)
1554 || (e->key()==Key_End))) 1569 || (e->key()==Qt::Key_End)))
1555 { 1570 {
1556 d->selectedBySimpleMove=true; 1571 d->selectedBySimpleMove=true;
1557 d->selectedUsingMouse=false; 1572 d->selectedUsingMouse=false;
@@ -1563,12 +1578,12 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1563 1578
1564 switch (e->key()) 1579 switch (e->key())
1565 { 1580 {
1566 case Key_Escape: 1581 case Qt::Key_Escape:
1567 selectAll(FALSE); 1582 selectAll(FALSE);
1568 emitSelectionChanged=TRUE; 1583 emitSelectionChanged=TRUE;
1569 break; 1584 break;
1570 1585
1571 case Key_Space: 1586 case Qt::Key_Space:
1572 //toggle selection of current item 1587 //toggle selection of current item
1573 if (d->selectedBySimpleMove) 1588 if (d->selectedBySimpleMove)
1574 d->selectedBySimpleMove=false; 1589 d->selectedBySimpleMove=false;
@@ -1576,7 +1591,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1576 emitSelectionChanged=TRUE; 1591 emitSelectionChanged=TRUE;
1577 break; 1592 break;
1578 1593
1579 case Key_Insert: 1594 case Qt::Key_Insert:
1580 //toggle selection of current item and move to the next item 1595 //toggle selection of current item and move to the next item
1581 if (d->selectedBySimpleMove) 1596 if (d->selectedBySimpleMove)
1582 { 1597 {
@@ -1600,7 +1615,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1600 emitSelectionChanged=TRUE; 1615 emitSelectionChanged=TRUE;
1601 break; 1616 break;
1602 1617
1603 case Key_Down: 1618 case Qt::Key_Down:
1604 nextItem=item->itemBelow(); 1619 nextItem=item->itemBelow();
1605 //toggle selection of current item and move to the next item 1620 //toggle selection of current item and move to the next item
1606 if (shiftOrCtrl) 1621 if (shiftOrCtrl)
@@ -1633,7 +1648,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1633 }; 1648 };
1634 break; 1649 break;
1635 1650
1636 case Key_Up: 1651 case Qt::Key_Up:
1637 nextItem=item->itemAbove(); 1652 nextItem=item->itemAbove();
1638 d->selectionDirection=-1; 1653 d->selectionDirection=-1;
1639 //move to the prev. item and toggle selection of this one 1654 //move to the prev. item and toggle selection of this one
@@ -1668,7 +1683,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1668 }; 1683 };
1669 break; 1684 break;
1670 1685
1671 case Key_End: 1686 case Qt::Key_End:
1672 //move to the last item and toggle selection of all items inbetween 1687 //move to the last item and toggle selection of all items inbetween
1673 nextItem=item; 1688 nextItem=item;
1674 if (d->selectedBySimpleMove) 1689 if (d->selectedBySimpleMove)
@@ -1693,7 +1708,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1693 emitSelectionChanged=TRUE; 1708 emitSelectionChanged=TRUE;
1694 break; 1709 break;
1695 1710
1696 case Key_Home: 1711 case Qt::Key_Home:
1697 // move to the first item and toggle selection of all items inbetween 1712 // move to the first item and toggle selection of all items inbetween
1698 nextItem = firstChild(); 1713 nextItem = firstChild();
1699 visItem = nextItem; 1714 visItem = nextItem;
@@ -1715,7 +1730,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1715 emitSelectionChanged=TRUE; 1730 emitSelectionChanged=TRUE;
1716 break; 1731 break;
1717 1732
1718 case Key_Next: 1733 case Qt::Key_Next:
1719 items=visibleHeight()/item->height(); 1734 items=visibleHeight()/item->height();
1720 nextItem=item; 1735 nextItem=item;
1721 if (d->selectedBySimpleMove) 1736 if (d->selectedBySimpleMove)
@@ -1751,7 +1766,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1751 } 1766 }
1752 break; 1767 break;
1753 1768
1754 case Key_Prior: 1769 case Qt::Key_Prior:
1755 items=visibleHeight()/item->height(); 1770 items=visibleHeight()/item->height();
1756 nextItem=item; 1771 nextItem=item;
1757 if (d->selectedBySimpleMove) 1772 if (d->selectedBySimpleMove)
@@ -1785,25 +1800,25 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e)
1785 } 1800 }
1786 break; 1801 break;
1787 1802
1788 case Key_Minus: 1803 case Qt::Key_Minus:
1789 if ( item->isOpen() ) 1804 if ( item->isOpen() )
1790 setOpen( item, FALSE ); 1805 setOpen( item, FALSE );
1791 break; 1806 break;
1792 case Key_Plus: 1807 case Qt::Key_Plus:
1793 if ( !item->isOpen() && (item->isExpandable() || item->childCount()) ) 1808 if ( !item->isOpen() && (item->isExpandable() || item->childCount()) )
1794 setOpen( item, TRUE ); 1809 setOpen( item, TRUE );
1795 break; 1810 break;
1796 default: 1811 default:
1797 bool realKey = ((e->key()!=Key_Shift) && (e->key()!=Key_Control) 1812 bool realKey = ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control)
1798 && (e->key()!=Key_Meta) && (e->key()!=Key_Alt)); 1813 && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt));
1799 1814
1800 bool selectCurrentItem = (d->selectedBySimpleMove) && (item->isSelected()); 1815 bool selectCurrentItem = (d->selectedBySimpleMove) && (item->isSelected());
1801 if (realKey && selectCurrentItem) 1816 if (realKey && selectCurrentItem)
1802 item->setSelected(false); 1817 item->setSelected(false);
1803 //this is mainly for the "goto filename beginning with pressed char" feature (aleXXX) 1818 //this is mainly for the "goto filename beginning with pressed char" feature (aleXXX)
1804 QListView::SelectionMode oldSelectionMode = selectionMode(); 1819 Q3ListView::SelectionMode oldSelectionMode = selectionMode();
1805 setSelectionMode (QListView::Multi); 1820 setSelectionMode (Q3ListView::Multi);
1806 QListView::keyPressEvent (e); 1821 Q3ListView::keyPressEvent (e);
1807 setSelectionMode (oldSelectionMode); 1822 setSelectionMode (oldSelectionMode);
1808 if (realKey && selectCurrentItem) 1823 if (realKey && selectCurrentItem)
1809 { 1824 {
@@ -1850,11 +1865,11 @@ void KListView::setSelectionModeExt (SelectionModeExt mode)
1850 case Multi: 1865 case Multi:
1851 case Extended: 1866 case Extended:
1852 case NoSelection: 1867 case NoSelection:
1853 setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode))); 1868 setSelectionMode (static_cast<Q3ListView::SelectionMode>(static_cast<int>(mode)));
1854 break; 1869 break;
1855 1870
1856 case FileManager: 1871 case FileManager:
1857 setSelectionMode (QListView::Extended); 1872 setSelectionMode (Q3ListView::Extended);
1858 break; 1873 break;
1859 1874
1860 default: 1875 default:
@@ -1868,7 +1883,7 @@ KListView::SelectionModeExt KListView::selectionModeExt () const
1868 return d->selectionMode; 1883 return d->selectionMode;
1869} 1884}
1870 1885
1871int KListView::itemIndex( const QListViewItem *item ) const 1886int KListView::itemIndex( const Q3ListViewItem *item ) const
1872{ 1887{
1873 if ( !item ) 1888 if ( !item )
1874 return -1; 1889 return -1;
@@ -1876,7 +1891,7 @@ int KListView::itemIndex( const QListViewItem *item ) const
1876 if ( item == firstChild() ) 1891 if ( item == firstChild() )
1877 return 0; 1892 return 0;
1878 else { 1893 else {
1879 QListViewItemIterator it(firstChild()); 1894 Q3ListViewItemIterator it(firstChild());
1880 uint j = 0; 1895 uint j = 0;
1881 for (; it.current() && it.current() != item; ++it, ++j ); 1896 for (; it.current() && it.current() != item; ++it, ++j );
1882 1897
@@ -1887,13 +1902,13 @@ int KListView::itemIndex( const QListViewItem *item ) const
1887 } 1902 }
1888} 1903}
1889 1904
1890QListViewItem* KListView::itemAtIndex(int index) 1905Q3ListViewItem* KListView::itemAtIndex(int index)
1891{ 1906{
1892 if (index<0) 1907 if (index<0)
1893 return 0; 1908 return 0;
1894 1909
1895 int j(0); 1910 int j(0);
1896 for (QListViewItemIterator it=firstChild(); it.current(); it++) 1911 for (Q3ListViewItemIterator it=firstChild(); it.current(); it++)
1897 { 1912 {
1898 if (j==index) 1913 if (j==index)
1899 return it.current(); 1914 return it.current();
@@ -1903,7 +1918,7 @@ QListViewItem* KListView::itemAtIndex(int index)
1903} 1918}
1904 1919
1905 1920
1906void KListView::emitContextMenu (KListView*, QListViewItem* i) 1921void KListView::emitContextMenu (KListView*, Q3ListViewItem* i)
1907{ 1922{
1908 QPoint p; 1923 QPoint p;
1909 // qDebug("KListView::emitContextMenu "); 1924 // qDebug("KListView::emitContextMenu ");
@@ -1916,9 +1931,9 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i)
1916 emit contextMenu (this, i, p); 1931 emit contextMenu (this, i, p);
1917} 1932}
1918 1933
1919void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) 1934void KListView::emitContextMenu (Q3ListViewItem* i, const QPoint& p, int col)
1920{ 1935{
1921 QListViewItem* item = i; 1936 Q3ListViewItem* item = i;
1922 int c = col; 1937 int c = col;
1923 // do not trust the values for QListViewItem* i and int col; 1938 // do not trust the values for QListViewItem* i and int col;
1924 // qDebug("KListView::emitContextMenu col"); 1939 // qDebug("KListView::emitContextMenu col");
@@ -1933,7 +1948,7 @@ void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
1933 1948
1934void KListView::setAcceptDrops (bool val) 1949void KListView::setAcceptDrops (bool val)
1935{ 1950{
1936 QListView::setAcceptDrops (val); 1951 Q3ListView::setAcceptDrops (val);
1937 viewport()->setAcceptDrops (val); 1952 viewport()->setAcceptDrops (val);
1938} 1953}
1939 1954
@@ -1945,14 +1960,14 @@ int KListView::dropVisualizerWidth () const
1945 1960
1946void KListView::viewportPaintEvent(QPaintEvent *e) 1961void KListView::viewportPaintEvent(QPaintEvent *e)
1947{ 1962{
1948 QListView::viewportPaintEvent(e); 1963 Q3ListView::viewportPaintEvent(e);
1949 1964
1950 if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer)) 1965 if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer))
1951 { 1966 {
1952 QPainter painter(viewport()); 1967 QPainter painter(viewport());
1953 1968
1954 // This is where we actually draw the drop-visualizer 1969 // This is where we actually draw the drop-visualizer
1955 painter.fillRect(d->mOldDropVisualizer, Dense4Pattern); 1970 painter.fillRect(d->mOldDropVisualizer, Qt::Dense4Pattern);
1956 } 1971 }
1957 if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter)) 1972 if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter))
1958 { 1973 {
@@ -1988,7 +2003,7 @@ bool KListView::fullWidth() const
1988 2003
1989int KListView::addColumn(const QString& label, int width) 2004int KListView::addColumn(const QString& label, int width)
1990{ 2005{
1991 int result = QListView::addColumn(label, width); 2006 int result = Q3ListView::addColumn(label, width);
1992 if (d->fullWidth) { 2007 if (d->fullWidth) {
1993//US header()->setStretchEnabled(false, columns()-2); 2008//US header()->setStretchEnabled(false, columns()-2);
1994//US header()->setStretchEnabled(true, columns()-1); 2009//US header()->setStretchEnabled(true, columns()-1);
@@ -1996,9 +2011,9 @@ int KListView::addColumn(const QString& label, int width)
1996 return result; 2011 return result;
1997} 2012}
1998 2013
1999int KListView::addColumn(const QIconSet& iconset, const QString& label, int width) 2014int KListView::addColumn(const QIcon& iconset, const QString& label, int width)
2000{ 2015{
2001 int result = QListView::addColumn(iconset, label, width); 2016 int result = Q3ListView::addColumn(iconset, label, width);
2002 if (d->fullWidth) { 2017 if (d->fullWidth) {
2003//US header()->setStretchEnabled(false, columns()-2); 2018//US header()->setStretchEnabled(false, columns()-2);
2004//US header()->setStretchEnabled(true, columns()-1); 2019//US header()->setStretchEnabled(true, columns()-1);
@@ -2008,13 +2023,13 @@ int KListView::addColumn(const QIconSet& iconset, const QString& label, int widt
2008 2023
2009void KListView::removeColumn(int index) 2024void KListView::removeColumn(int index)
2010{ 2025{
2011 QListView::removeColumn(index); 2026 Q3ListView::removeColumn(index);
2012//US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1); 2027//US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1);
2013} 2028}
2014 2029
2015void KListView::viewportResizeEvent(QResizeEvent* e) 2030void KListView::viewportResizeEvent(QResizeEvent* e)
2016{ 2031{
2017 QListView::viewportResizeEvent(e); 2032 Q3ListView::viewportResizeEvent(e);
2018} 2033}
2019 2034
2020const QColor &KListView::alternateBackground() const 2035const QColor &KListView::alternateBackground() const
@@ -2070,7 +2085,7 @@ void KListView::setSorting(int column, bool ascending)
2070{ 2085{
2071 d->sortColumn = column; 2086 d->sortColumn = column;
2072 d->sortAscending = ascending; 2087 d->sortAscending = ascending;
2073 QListView::setSorting(column, ascending); 2088 Q3ListView::setSorting(column, ascending);
2074} 2089}
2075 2090
2076int KListView::columnSorted(void) const 2091int KListView::columnSorted(void) const
@@ -2083,58 +2098,58 @@ bool KListView::ascendingSort(void) const
2083 return d->sortAscending; 2098 return d->sortAscending;
2084} 2099}
2085 2100
2086KListViewItem::KListViewItem(QListView *parent) 2101KListViewItem::KListViewItem(Q3ListView *parent)
2087 : QListViewItem(parent) 2102 : Q3ListViewItem(parent)
2088{ 2103{
2089 init(); 2104 init();
2090} 2105}
2091 2106
2092KListViewItem::KListViewItem(QListViewItem *parent) 2107KListViewItem::KListViewItem(Q3ListViewItem *parent)
2093 : QListViewItem(parent) 2108 : Q3ListViewItem(parent)
2094{ 2109{
2095 init(); 2110 init();
2096} 2111}
2097 2112
2098KListViewItem::KListViewItem(QListView *parent, QListViewItem *after) 2113KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after)
2099 : QListViewItem(parent, after) 2114 : Q3ListViewItem(parent, after)
2100{ 2115{
2101 init(); 2116 init();
2102} 2117}
2103 2118
2104KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after) 2119KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after)
2105 : QListViewItem(parent, after) 2120 : Q3ListViewItem(parent, after)
2106{ 2121{
2107 init(); 2122 init();
2108} 2123}
2109 2124
2110KListViewItem::KListViewItem(QListView *parent, 2125KListViewItem::KListViewItem(Q3ListView *parent,
2111 QString label1, QString label2, QString label3, QString label4, 2126 QString label1, QString label2, QString label3, QString label4,
2112 QString label5, QString label6, QString label7, QString label8) 2127 QString label5, QString label6, QString label7, QString label8)
2113 : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) 2128 : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
2114{ 2129{
2115 init(); 2130 init();
2116} 2131}
2117 2132
2118KListViewItem::KListViewItem(QListViewItem *parent, 2133KListViewItem::KListViewItem(Q3ListViewItem *parent,
2119 QString label1, QString label2, QString label3, QString label4, 2134 QString label1, QString label2, QString label3, QString label4,
2120 QString label5, QString label6, QString label7, QString label8) 2135 QString label5, QString label6, QString label7, QString label8)
2121 : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) 2136 : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
2122{ 2137{
2123 init(); 2138 init();
2124} 2139}
2125 2140
2126KListViewItem::KListViewItem(QListView *parent, QListViewItem *after, 2141KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
2127 QString label1, QString label2, QString label3, QString label4, 2142 QString label1, QString label2, QString label3, QString label4,
2128 QString label5, QString label6, QString label7, QString label8) 2143 QString label5, QString label6, QString label7, QString label8)
2129 : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) 2144 : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
2130{ 2145{
2131 init(); 2146 init();
2132} 2147}
2133 2148
2134KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after, 2149KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
2135 QString label1, QString label2, QString label3, QString label4, 2150 QString label1, QString label2, QString label3, QString label4,
2136 QString label5, QString label6, QString label7, QString label8) 2151 QString label5, QString label6, QString label7, QString label8)
2137 : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) 2152 : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
2138{ 2153{
2139 init(); 2154 init();
2140} 2155}
@@ -2212,12 +2227,12 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in
2212 } 2227 }
2213 else if (isAlternate()) { 2228 else if (isAlternate()) {
2214//US if (listView()->viewport()->backgroundMode()==Qt::FixedColor) 2229//US if (listView()->viewport()->backgroundMode()==Qt::FixedColor)
2215 if (listView()->viewport()->backgroundMode()==QWidget::PaletteBackground) 2230 if (listView()->viewport()->backgroundMode()==Qt::PaletteBackground)
2216 _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); 2231 _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground());
2217 else 2232 else
2218 _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); 2233 _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground());
2219 } 2234 }
2220 QListViewItem::paintCell(p, _cg, column, width, alignment); 2235 Q3ListViewItem::paintCell(p, _cg, column, width, alignment);
2221} 2236}
2222 2237
2223//US we do not have a "global KDE" variable to setup singleClick functionality 2238//US we do not have a "global KDE" variable to setup singleClick functionality
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h
index 9f0d9fd..2176525 100644
--- a/microkde/kdeui/klistview.h
+++ b/microkde/kdeui/klistview.h
@@ -20,9 +20,20 @@
20#ifndef KLISTVIEW_H 20#ifndef KLISTVIEW_H
21#define KLISTVIEW_H 21#define KLISTVIEW_H
22 22
23#include <qlistview.h> 23#include <q3listview.h>
24 24
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26//Added by qt3to4:
27#include <QDragMoveEvent>
28#include <QDropEvent>
29#include <QDragLeaveEvent>
30#include <QPaintEvent>
31#include <QResizeEvent>
32#include <QFocusEvent>
33#include <QMouseEvent>
34#include <QKeyEvent>
35#include <QEvent>
36#include <QDragEnterEvent>
26 37
27//US 38//US
28class QDropEvent; 39class QDropEvent;
@@ -30,7 +41,7 @@ class QDragLeaveEvent;
30class QDragMoveEvent; 41class QDragMoveEvent;
31class QDragEnterEvent; 42class QDragEnterEvent;
32 43
33class QDragObject; 44class Q3DragObject;
34class KConfig; 45class KConfig;
35class KLineEdit; 46class KLineEdit;
36/** 47/**
@@ -57,7 +68,7 @@ class KLineEdit;
57 * 68 *
58 * @version $Id$ 69 * @version $Id$
59 */ 70 */
60class KListView : public QListView 71class KListView : public Q3ListView
61{ 72{
62 Q_OBJECT 73 Q_OBJECT
63 Q_ENUMS( SelectionModeExt ) 74 Q_ENUMS( SelectionModeExt )
@@ -106,15 +117,15 @@ public:
106 * This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected 117 * This way e.g. SHIFT+up/PgUp then SHIFT+down/PgDn leaves no item selected
107 */ 118 */
108 enum SelectionModeExt { 119 enum SelectionModeExt {
109 Single = QListView::Single, 120 Single = Q3ListView::Single,
110 Multi = QListView::Multi, 121 Multi = Q3ListView::Multi,
111 Extended = QListView::Extended, 122 Extended = Q3ListView::Extended,
112 NoSelection = QListView::NoSelection, 123 NoSelection = Q3ListView::NoSelection,
113 FileManager 124 FileManager
114 }; 125 };
115 void repaintContents( bool erase = true ) 126 void repaintContents( bool erase = true )
116 { 127 {
117 QScrollView::repaintContents( contentsX(), contentsY(), 128 Q3ScrollView::repaintContents( contentsX(), contentsY(),
118 visibleWidth(), visibleHeight(), erase ); 129 visibleWidth(), visibleHeight(), erase );
119 }; 130 };
120 /** 131 /**
@@ -161,26 +172,26 @@ public:
161 /** 172 /**
162 * @return a list containing the currently selected items. 173 * @return a list containing the currently selected items.
163 */ 174 */
164 QPtrList<QListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?) 175 Q3PtrList<Q3ListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?)
165 176
166 /** 177 /**
167 * Arbitrarily move @p item to @p parent, positioned immediately after item @p after. 178 * Arbitrarily move @p item to @p parent, positioned immediately after item @p after.
168 */ 179 */
169 void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after); 180 void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after);
170 181
171 /** 182 /**
172 * @return the last item (not child!) of this listview. 183 * @return the last item (not child!) of this listview.
173 * 184 *
174 * @see lastChild() 185 * @see lastChild()
175 */ 186 */
176 QListViewItem *lastItem() const; 187 Q3ListViewItem *lastItem() const;
177 188
178 /** 189 /**
179 * @return the last child of this listview. 190 * @return the last child of this listview.
180 * 191 *
181 * @see lastItem() 192 * @see lastItem()
182 */ 193 */
183 QListViewItem* lastChild () const; 194 Q3ListViewItem* lastChild () const;
184 195
185 /** 196 /**
186 * @return the lineedit used for inline renaming. 197 * @return the lineedit used for inline renaming.
@@ -276,14 +287,14 @@ public:
276 * @p item doesn't exist in this list view. This function takes 287 * @p item doesn't exist in this list view. This function takes
277 * all items into account not only the visible ones. 288 * all items into account not only the visible ones.
278 */ 289 */
279 int itemIndex( const QListViewItem *item ) const; 290 int itemIndex( const Q3ListViewItem *item ) const;
280 291
281 /** 292 /**
282 * Returns the item of @p index within the item tree or 0 if 293 * Returns the item of @p index within the item tree or 0 if
283 * @p index doesn't exist in this list view. This function takes 294 * @p index doesn't exist in this list view. This function takes
284 * all items into account not only the visible ones. 295 * all items into account not only the visible ones.
285 */ 296 */
286 QListViewItem* itemAtIndex(int index); 297 Q3ListViewItem* itemAtIndex(int index);
287 298
288 /** 299 /**
289 * @deprecated 300 * @deprecated
@@ -314,7 +325,7 @@ public:
314 /** 325 /**
315 * Reimplemented for full width support 326 * Reimplemented for full width support
316 */ 327 */
317 virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1); 328 virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1);
318 /** 329 /**
319 * Reimplemented for full width support 330 * Reimplemented for full width support
320 * 331 *
@@ -388,7 +399,7 @@ signals:
388 * Note that you may not delete any @ref QListViewItem objects in slots 399 * Note that you may not delete any @ref QListViewItem objects in slots
389 * connected to this signal. 400 * connected to this signal.
390 */ 401 */
391 void executed( QListViewItem *item ); 402 void executed( Q3ListViewItem *item );
392 403
393 /** 404 /**
394 * This signal is emitted whenever the user executes an listview item. 405 * This signal is emitted whenever the user executes an listview item.
@@ -401,7 +412,7 @@ signals:
401 * Note that you may not delete any @ref QListViewItem objects in slots 412 * Note that you may not delete any @ref QListViewItem objects in slots
402 * connected to this signal. 413 * connected to this signal.
403 */ 414 */
404 void executed( QListViewItem *item, const QPoint &pos, int c ); 415 void executed( Q3ListViewItem *item, const QPoint &pos, int c );
405 416
406 /** 417 /**
407 * This signal gets emitted whenever the user double clicks into the 418 * This signal gets emitted whenever the user double clicks into the
@@ -417,8 +428,8 @@ signals:
417 * You should normally not need to use this. In most cases its better 428 * You should normally not need to use this. In most cases its better
418 * to use @ref #executed() instead. 429 * to use @ref #executed() instead.
419 */ 430 */
420 void doubleClicked( QListViewItem *item, const QPoint &pos, int c ); 431 void doubleClicked( Q3ListViewItem *item, const QPoint &pos, int c );
421 void contextRequest( QListViewItem *item, const QPoint &pos, int c ); 432 void contextRequest( Q3ListViewItem *item, const QPoint &pos, int c );
422 433
423 /** 434 /**
424 * This signal gets emitted whenever something acceptable is 435 * This signal gets emitted whenever something acceptable is
@@ -430,7 +441,7 @@ signals:
430 * 441 *
431 * @see #acceptDrop() 442 * @see #acceptDrop()
432 */ 443 */
433 void dropped (QDropEvent * e, QListViewItem *after); 444 void dropped (QDropEvent * e, Q3ListViewItem *after);
434 445
435 /** 446 /**
436 * This signal gets emitted whenever something acceptable is 447 * This signal gets emitted whenever something acceptable is
@@ -444,7 +455,7 @@ signals:
444 * @param after is the item after which the drop occured (or 0L, if 455 * @param after is the item after which the drop occured (or 0L, if
445 * the drop was above all items 456 * the drop was above all items
446 */ 457 */
447 void dropped (KListView* list, QDropEvent* e, QListViewItem* after); 458 void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after);
448 459
449 /** 460 /**
450 * This signal gets emitted whenever something acceptable is 461 * This signal gets emitted whenever something acceptable is
@@ -458,7 +469,7 @@ signals:
458 * @param after is the item after which the drop occured (or 0L, if 469 * @param after is the item after which the drop occured (or 0L, if
459 * the drop was above all items 470 * the drop was above all items
460 */ 471 */
461 void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after); 472 void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
462 473
463 /** 474 /**
464 * This signal gets emitted whenever something acceptable is 475 * This signal gets emitted whenever something acceptable is
@@ -471,7 +482,7 @@ signals:
471 * @param after is the item after which the drop occured (or 0L, if 482 * @param after is the item after which the drop occured (or 0L, if
472 * the drop was above all items 483 * the drop was above all items
473 */ 484 */
474 void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after); 485 void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after);
475 486
476 /** 487 /**
477 * This signal is emitted when ever the user moves an item in the list via 488 * This signal is emitted when ever the user moves an item in the list via
@@ -502,7 +513,7 @@ signals:
502 * @param afterFirst the item that parameter item was in before the move, in the list 513 * @param afterFirst the item that parameter item was in before the move, in the list
503 * @param afterNow the item it's currently after. 514 * @param afterNow the item it's currently after.
504 */ 515 */
505 void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow); 516 void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow);
506 517
507 518
508 /** 519 /**
@@ -510,7 +521,7 @@ signals:
510 * each and every item moved, in order. The first element in @p items associates 521 * each and every item moved, in order. The first element in @p items associates
511 * with the first of afterFirst and afterNow. 522 * with the first of afterFirst and afterNow.
512 */ 523 */
513 void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow); 524 void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow);
514 525
515 /** 526 /**
516 * This signal gets emitted when an item is renamed via in-place renaming. 527 * This signal gets emitted when an item is renamed via in-place renaming.
@@ -519,12 +530,12 @@ signals:
519 * @param str is the new value of column @p col. 530 * @param str is the new value of column @p col.
520 * @param col is the renamed column. 531 * @param col is the renamed column.
521 */ 532 */
522 void itemRenamed(QListViewItem* item, const QString &str, int col); 533 void itemRenamed(Q3ListViewItem* item, const QString &str, int col);
523 534
524 /** 535 /**
525 * Same as above, but without the extra information. 536 * Same as above, but without the extra information.
526 */ 537 */
527 void itemRenamed(QListViewItem* item); 538 void itemRenamed(Q3ListViewItem* item);
528 void signalDelete(); 539 void signalDelete();
529 540
530 /** 541 /**
@@ -537,7 +548,7 @@ signals:
537 * @param list is this listview. 548 * @param list is this listview.
538 * @param item is the @ref currentItem() at the time the key was pressed. May be 0L. 549 * @param item is the @ref currentItem() at the time the key was pressed. May be 0L.
539 */ 550 */
540 void menuShortCutPressed (KListView* list, QListViewItem* item); 551 void menuShortCutPressed (KListView* list, Q3ListViewItem* item);
541 552
542 /** 553 /**
543 * This signal is emitted whenever a context-menu should be shown for item @p i. 554 * This signal is emitted whenever a context-menu should be shown for item @p i.
@@ -547,13 +558,13 @@ signals:
547 * @param i is the item for which the menu should be shown. May be 0L. 558 * @param i is the item for which the menu should be shown. May be 0L.
548 * @param p is the point at which the menu should be shown. 559 * @param p is the point at which the menu should be shown.
549 */ 560 */
550 void contextMenu (KListView* l, QListViewItem* i, const QPoint& p); 561 void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p);
551 562
552public slots: 563public slots:
553 /** 564 /**
554 * Rename column @p c of @p item. 565 * Rename column @p c of @p item.
555 */ 566 */
556 virtual void rename(QListViewItem *item, int c); 567 virtual void rename(Q3ListViewItem *item, int c);
557 568
558 /** 569 /**
559 * By default, if you called setItemsRenameable(true), 570 * By default, if you called setItemsRenameable(true),
@@ -673,7 +684,7 @@ protected:
673 * @param p is translated from contents coordinates to viewport coordinates 684 * @param p is translated from contents coordinates to viewport coordinates
674 * before being passed to the above function. 685 * before being passed to the above function.
675 */ 686 */
676 inline bool below (QListViewItem* i, const QPoint& p) 687 inline bool below (Q3ListViewItem* i, const QPoint& p)
677 { 688 {
678 return below (itemRect(i), contentsToViewport(p)); 689 return below (itemRect(i), contentsToViewport(p));
679 } 690 }
@@ -689,7 +700,7 @@ protected:
689 * @internal 700 * @internal
690 */ 701 */
691 //US I added buttonstate to pass the current keyboard status 702 //US I added buttonstate to pass the current keyboard status
692 void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c); 703 void emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c);
693 704
694 /** 705 /**
695 * Reimplemented for internal reasons. 706 * Reimplemented for internal reasons.
@@ -721,12 +732,12 @@ protected:
721 /** 732 /**
722 * @return the tooltip for @p column of @p item. 733 * @return the tooltip for @p column of @p item.
723 */ 734 */
724 virtual QString tooltip(QListViewItem* item, int column) const; 735 virtual QString tooltip(Q3ListViewItem* item, int column) const;
725 736
726 /** 737 /**
727 * @return whether the tooltip for @p column of @p item shall be shown at point @p pos. 738 * @return whether the tooltip for @p column of @p item shall be shown at point @p pos.
728 */ 739 */
729 virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const; 740 virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const;
730 741
731 /** 742 /**
732 * Reimplemented for internal reasons. 743 * Reimplemented for internal reasons.
@@ -805,7 +816,7 @@ protected:
805 * 816 *
806 * @see setDragEnabled() 817 * @see setDragEnabled()
807 */ 818 */
808 virtual QDragObject *dragObject(); 819 virtual Q3DragObject *dragObject();
809 820
810 /** 821 /**
811 * @return true if the @p event provides some acceptable 822 * @return true if the @p event provides some acceptable
@@ -821,7 +832,7 @@ protected:
821 * 832 *
822 * @return the rectangle that you painted to. 833 * @return the rectangle that you painted to.
823 */ 834 */
824 virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after); 835 virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after);
825 836
826 /** 837 /**
827 * Paint the drag rectangle. If painter is null, don't try to :) 838 * Paint the drag rectangle. If painter is null, don't try to :)
@@ -829,7 +840,7 @@ protected:
829 * 840 *
830 * @return the rectangle that you painted to. 841 * @return the rectangle that you painted to.
831 */ 842 */
832 virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item); 843 virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item);
833 844
834 /** 845 /**
835 * This method calls @ref dragObject() and starts the drag. 846 * This method calls @ref dragObject() and starts the drag.
@@ -886,8 +897,8 @@ protected slots:
886 */ 897 */
887 void slotSettingsChanged(int); 898 void slotSettingsChanged(int);
888 899
889 void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c ); 900 void slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c );
890 void doneEditing(QListViewItem *item, int row); 901 void doneEditing(Q3ListViewItem *item, int row);
891 902
892 /** 903 /**
893 * Repaint the rect where I was drawing the drop line. 904 * Repaint the rect where I was drawing the drop line.
@@ -902,18 +913,18 @@ protected slots:
902 /** 913 /**
903 * Emit the @ref contextMenu signal. This slot is for mouse actions. 914 * Emit the @ref contextMenu signal. This slot is for mouse actions.
904 */ 915 */
905 void emitContextMenu (QListViewItem*, const QPoint&, int); 916 void emitContextMenu (Q3ListViewItem*, const QPoint&, int);
906 917
907 /** 918 /**
908 * Emit the @ref #contextMenu signal. This slot is for key presses. 919 * Emit the @ref #contextMenu signal. This slot is for key presses.
909 */ 920 */
910 void emitContextMenu (KListView*, QListViewItem*); 921 void emitContextMenu (KListView*, Q3ListViewItem*);
911 922
912 /** 923 /**
913 * Accessory slot for AutoSelect 924 * Accessory slot for AutoSelect
914 * @internal 925 * @internal
915 */ 926 */
916 void slotOnItem( QListViewItem *item ); 927 void slotOnItem( Q3ListViewItem *item );
917 928
918 /** 929 /**
919 * Accessory slot for AutoSelect/ChangeCursorOverItem 930 * Accessory slot for AutoSelect/ChangeCursorOverItem
@@ -939,7 +950,7 @@ protected:
939 /** 950 /**
940 * Handle dropEvent when itemsMovable() is set to true. 951 * Handle dropEvent when itemsMovable() is set to true.
941 */ 952 */
942 virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme); 953 virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme);
943 954
944 /** 955 /**
945 * Where is the nearest QListViewItem that I'm going to drop? 956 * Where is the nearest QListViewItem that I'm going to drop?
@@ -947,7 +958,7 @@ protected:
947 * FIXME KDE 4.0: Make this method const so it can be called from an 958 * FIXME KDE 4.0: Make this method const so it can be called from an
948 * acceptDrag method without ugly casts 959 * acceptDrag method without ugly casts
949 */ 960 */
950 virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after); 961 virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after);
951 962
952 /** 963 /**
953 * A special keyPressEvent (for FileManager selection mode). 964 * A special keyPressEvent (for FileManager selection mode).
@@ -974,7 +985,7 @@ private:
974 * 985 *
975 * @short listview item with alternate background colour support 986 * @short listview item with alternate background colour support
976 */ 987 */
977class KListViewItem : public QListViewItem 988class KListViewItem : public Q3ListViewItem
978{ 989{
979public: 990public:
980 /** 991 /**
@@ -983,30 +994,30 @@ public:
983 * don't mix KListViewItem (or subclasses) with QListViewItem 994 * don't mix KListViewItem (or subclasses) with QListViewItem
984 * (or subclasses). 995 * (or subclasses).
985 */ 996 */
986 KListViewItem(QListView *parent); 997 KListViewItem(Q3ListView *parent);
987 KListViewItem(QListViewItem *parent); 998 KListViewItem(Q3ListViewItem *parent);
988 KListViewItem(QListView *parent, QListViewItem *after); 999 KListViewItem(Q3ListView *parent, Q3ListViewItem *after);
989 KListViewItem(QListViewItem *parent, QListViewItem *after); 1000 KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after);
990 1001
991 KListViewItem(QListView *parent, 1002 KListViewItem(Q3ListView *parent,
992 QString, QString = QString::null, 1003 QString, QString = QString::null,
993 QString = QString::null, QString = QString::null, 1004 QString = QString::null, QString = QString::null,
994 QString = QString::null, QString = QString::null, 1005 QString = QString::null, QString = QString::null,
995 QString = QString::null, QString = QString::null); 1006 QString = QString::null, QString = QString::null);
996 1007
997 KListViewItem(QListViewItem *parent, 1008 KListViewItem(Q3ListViewItem *parent,
998 QString, QString = QString::null, 1009 QString, QString = QString::null,
999 QString = QString::null, QString = QString::null, 1010 QString = QString::null, QString = QString::null,
1000 QString = QString::null, QString = QString::null, 1011 QString = QString::null, QString = QString::null,
1001 QString = QString::null, QString = QString::null); 1012 QString = QString::null, QString = QString::null);
1002 1013
1003 KListViewItem(QListView *parent, QListViewItem *after, 1014 KListViewItem(Q3ListView *parent, Q3ListViewItem *after,
1004 QString, QString = QString::null, 1015 QString, QString = QString::null,
1005 QString = QString::null, QString = QString::null, 1016 QString = QString::null, QString = QString::null,
1006 QString = QString::null, QString = QString::null, 1017 QString = QString::null, QString = QString::null,
1007 QString = QString::null, QString = QString::null); 1018 QString = QString::null, QString = QString::null);
1008 1019
1009 KListViewItem(QListViewItem *parent, QListViewItem *after, 1020 KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after,
1010 QString, QString = QString::null, 1021 QString, QString = QString::null,
1011 QString = QString::null, QString = QString::null, 1022 QString = QString::null, QString = QString::null,
1012 QString = QString::null, QString = QString::null, 1023 QString = QString::null, QString = QString::null,
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index fa678f2..bac0db8 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -21,12 +21,18 @@
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. 22 Boston, MA 02111-1307, USA.
23 */ 23 */
24#include <qobjectlist.h> 24#include <qobject.h>
25#include <qstringlist.h> 25#include <qstringlist.h>
26#include <qtimer.h> 26#include <qtimer.h>
27#include <qmenubar.h> 27#include <qmenubar.h>
28#include <qstatusbar.h> 28#include <qstatusbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30//Added by qt3to4:
31#include <QCloseEvent>
32#include <QPaintEvent>
33#include <QResizeEvent>
34#include <QChildEvent>
35#include <Q3PtrList>
30 36
31 37
32#include "kdebug.h" 38#include "kdebug.h"
@@ -54,7 +60,7 @@ public:
54static bool no_query_exit = false; 60static bool no_query_exit = false;
55 61
56KMainWindow::KMainWindow( QWidget* parent, const char *name ) 62KMainWindow::KMainWindow( QWidget* parent, const char *name )
57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ 63 : Q3MainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
58{ 64{
59 mQToolBar = 0; 65 mQToolBar = 0;
60 initKMainWindow(name); 66 initKMainWindow(name);
@@ -276,7 +282,7 @@ void KMainWindow::setCaption( const QString &caption, bool modified )
276 282
277void KMainWindow::setPlainCaption( const QString &caption ) 283void KMainWindow::setPlainCaption( const QString &caption )
278{ 284{
279 QMainWindow::setCaption( caption ); 285 Q3MainWindow::setCaption( caption );
280#ifndef Q_WS_QWS 286#ifndef Q_WS_QWS
281//US the following is disabled for the embedded version 287//US the following is disabled for the embedded version
282//US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 ); 288//US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
@@ -421,10 +427,10 @@ void KMainWindow::createStandardStatusBarAction(){
421 } 427 }
422} 428}
423 429
424QToolBar *KMainWindow::tBar( ) 430Q3ToolBar *KMainWindow::tBar( )
425{ 431{
426 if ( ! mQToolBar ) 432 if ( ! mQToolBar )
427 mQToolBar = new QToolBar( this ); 433 mQToolBar = new Q3ToolBar( this );
428 return mQToolBar; 434 return mQToolBar;
429} 435}
430 436
@@ -443,22 +449,23 @@ KToolBar *KMainWindow::toolBar( const char * name )
443 return new KToolBar(this, name, honor_mode); // XMLGUI constructor 449 return new KToolBar(this, name, honor_mode); // XMLGUI constructor
444 else 450 else
445*/ 451*/
446 return new KToolBar(this, Top, false, name, honor_mode ); // non-XMLGUI 452 return new KToolBar(this, Qt::Top, false, name, honor_mode ); // non-XMLGUI
447} 453}
448 454
449QPtrListIterator<KToolBar> KMainWindow::toolBarIterator() 455Q3PtrListIterator<KToolBar> KMainWindow::toolBarIterator()
450{ 456{
451 toolbarList.clear(); 457 toolbarList.clear();
452 QPtrList<QToolBar> lst; 458 QList<Q3ToolBar*> lst;
453 for ( int i = (int)QMainWindow::Unmanaged; i <= (int)Minimized; ++i ) { 459 for ( int i = (int)Qt::Unmanaged; i <= (int)Qt::Minimized; ++i ) {
454 lst = toolBars( (ToolBarDock)i ); 460 lst = toolBars( (Qt::ToolBarDock)i );
455 for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) { 461 for(QList<Q3ToolBar*>::iterator i=lst.begin();i!=lst.end();++i) {
462 Q3ToolBar *tb = *i;
456 if ( !tb->inherits( "KToolBar" ) ) 463 if ( !tb->inherits( "KToolBar" ) )
457 continue; 464 continue;
458 toolbarList.append( (KToolBar*)tb ); 465 toolbarList.append( (KToolBar*)tb );
459 } 466 }
460 } 467 }
461 return QPtrListIterator<KToolBar>( toolbarList ); 468 return Q3PtrListIterator<KToolBar>( toolbarList );
462} 469}
463 470
464void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindowSize ) 471void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindowSize )
@@ -469,7 +476,7 @@ void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindo
469 // Get notified when the user moves a toolbar around 476 // Get notified when the user moves a toolbar around
470//US connect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ), 477//US connect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ),
471//US this, SLOT( setSettingsDirty() ) ); 478//US this, SLOT( setSettingsDirty() ) );
472 connect( this, SIGNAL( toolBarPositionChanged(QToolBar *) ), 479 connect( this, SIGNAL( toolBarPositionChanged(Q3ToolBar *) ),
473 this, SLOT( setSettingsDirty() ) ); 480 this, SLOT( setSettingsDirty() ) );
474 481
475 482
@@ -503,7 +510,7 @@ QString KMainWindow::autoSaveGroup() const
503 510
504void KMainWindow::saveAutoSaveSettings() 511void KMainWindow::saveAutoSaveSettings()
505{ 512{
506 ASSERT( d->autoSaveSettings ); 513 Q_ASSERT( d->autoSaveSettings );
507 //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl; 514 //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl;
508 saveMainWindowSettings( KGlobal::config(), d->autoSaveGroup ); 515 saveMainWindowSettings( KGlobal::config(), d->autoSaveGroup );
509 KGlobal::config()->sync(); 516 KGlobal::config()->sync();
@@ -639,7 +646,7 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG
639 646
640 int n = 1; // Toolbar counter. toolbars are counted from 1, 647 int n = 1; // Toolbar counter. toolbars are counted from 1,
641 KToolBar *toolbar = 0; 648 KToolBar *toolbar = 0;
642 QPtrListIterator<KToolBar> it( toolBarIterator() ); 649 Q3PtrListIterator<KToolBar> it( toolBarIterator() );
643 while ( ( toolbar = it.current() ) ) { 650 while ( ( toolbar = it.current() ) ) {
644 ++it; 651 ++it;
645 QString group; 652 QString group;
@@ -714,19 +721,21 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config
714 entryList.clear(); 721 entryList.clear();
715//US i = config->readListEntry (QString::fromLatin1("MenuBar"), entryList, ';'); 722//US i = config->readListEntry (QString::fromLatin1("MenuBar"), entryList, ';');
716 entryList = config->readListEntry (QString::fromLatin1("MenuBar")); 723 entryList = config->readListEntry (QString::fromLatin1("MenuBar"));
717 entry = entryList.first(); 724 if(!entryList.empty()) {
718 if (entry==QString::fromLatin1("Disabled")) 725 entry = entryList.first();
719 { 726 if (entry==QString::fromLatin1("Disabled"))
720 mb->hide(); 727 {
721 } else 728 mb->hide();
722 { 729 } else
723 mb->show(); 730 {
724 } 731 mb->show();
732 }
733 }
725 } 734 }
726 735
727 int n = 1; // Toolbar counter. toolbars are counted from 1, 736 int n = 1; // Toolbar counter. toolbars are counted from 1,
728 KToolBar *toolbar; 737 KToolBar *toolbar;
729 QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator 738 Q3PtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator
730 739
731 for ( ; it.current(); ++it) { 740 for ( ; it.current(); ++it) {
732 toolbar= it.current(); 741 toolbar= it.current();
@@ -756,7 +765,7 @@ void KMainWindow::finalizeGUI( bool force )
756 // we call positionYourself again for each of them, but this time 765 // we call positionYourself again for each of them, but this time
757 // the toolbariterator should give them in the proper order. 766 // the toolbariterator should give them in the proper order.
758 // Both the XMLGUI and applySettings call this, hence "force" for the latter. 767 // Both the XMLGUI and applySettings call this, hence "force" for the latter.
759 QPtrListIterator<KToolBar> it( toolBarIterator() ); 768 Q3PtrListIterator<KToolBar> it( toolBarIterator() );
760 for ( ; it.current() ; ++ it ) 769 for ( ; it.current() ; ++ it )
761 it.current()->positionYourself( force ); 770 it.current()->positionYourself( force );
762 771
@@ -851,7 +860,7 @@ void KMainWindow::resizeEvent( QResizeEvent * e)
851{ 860{
852 if ( d->autoSaveWindowSize ) 861 if ( d->autoSaveWindowSize )
853 setSettingsDirty(); 862 setSettingsDirty();
854 QMainWindow::resizeEvent( e ); 863 Q3MainWindow::resizeEvent( e );
855} 864}
856 865
857bool KMainWindow::hasMenuBar() 866bool KMainWindow::hasMenuBar()
@@ -869,7 +878,7 @@ QMenuBar *KMainWindow::menuBar()
869 mb = new QMenuBar( this ); 878 mb = new QMenuBar( this );
870 // trigger a re-layout and trigger a call to the private 879 // trigger a re-layout and trigger a call to the private
871 // setMenuBar method. 880 // setMenuBar method.
872 QMainWindow::menuBar(); 881 Q3MainWindow::menuBar();
873 } 882 }
874 return mb; 883 return mb;
875} 884}
@@ -884,7 +893,7 @@ QStatusBar *KMainWindow::statusBar()
884 sb = new QStatusBar( this ); 893 sb = new QStatusBar( this );
885 // trigger a re-layout and trigger a call to the private 894 // trigger a re-layout and trigger a call to the private
886 // setStatusBar method. 895 // setStatusBar method.
887 QMainWindow::statusBar(); 896 Q3MainWindow::statusBar();
888 } 897 }
889 return sb; 898 return sb;
890} 899}
@@ -908,42 +917,30 @@ void KMainWindow::shuttingDown()
908QMenuBar *KMainWindow::internalMenuBar() 917QMenuBar *KMainWindow::internalMenuBar()
909{ 918{
910//US QObjectList *l = queryList( "KMenuBar", 0, false, false ); 919//US QObjectList *l = queryList( "KMenuBar", 0, false, false );
911 QObjectList *l = queryList( "QMenuBar", 0, false, false ); 920 QObjectList l = queryList( "QMenuBar", 0, false, false );
912 if ( !l || !l->first() ) { 921 if(l.empty())
913 delete l; 922 return 0;
914 return 0; 923 return (QMenuBar*)l.front();
915 }
916
917//US KMenuBar *m = (KMenuBar*)l->first();
918 QMenuBar *m = (QMenuBar*)l->first();
919 delete l;
920 return m;
921} 924}
922 925
923//US KStatusBar *KMainWindow::internalStatusBar() 926//US KStatusBar *KMainWindow::internalStatusBar()
924QStatusBar *KMainWindow::internalStatusBar() 927QStatusBar *KMainWindow::internalStatusBar()
925{ 928{
926//US QObjectList *l = queryList( "KStatusBar", 0, false, false ); 929//US QObjectList *l = queryList( "KStatusBar", 0, false, false );
927 QObjectList *l = queryList( "QStatusBar", 0, false, false ); 930 QObjectList l = queryList( "QStatusBar", 0, false, false );
928 if ( !l || !l->first() ) { 931 if(l.empty())
929 delete l; 932 return 0;
930 return 0; 933 return (QStatusBar*)l.front();
931 }
932
933//US KStatusBar *s = (KStatusBar*)l->first();
934 QStatusBar *s = (QStatusBar*)l->first();
935 delete l;
936 return s;
937} 934}
938 935
939void KMainWindow::childEvent( QChildEvent* e) 936void KMainWindow::childEvent( QChildEvent* e)
940{ 937{
941 QMainWindow::childEvent( e ); 938 Q3MainWindow::childEvent( e );
942} 939}
943 940
944void KMainWindow::paintEvent( QPaintEvent * e) 941void KMainWindow::paintEvent( QPaintEvent * e)
945{ 942{
946 QMainWindow::paintEvent( e ); 943 Q3MainWindow::paintEvent( e );
947} 944}
948 945
949QSize KMainWindow::sizeForCentralWidgetSize(QSize size) 946QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2dc8033..a3ac82f 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -1,3 +1,8 @@
1//Added by qt3to4:
2#include <QResizeEvent>
3#include <QChildEvent>
4#include <QCloseEvent>
5#include <QPaintEvent>
1/* 6/*
2 This file is part of the KDE libraries 7 This file is part of the KDE libraries
3 8
@@ -50,12 +55,12 @@ class KAction;
50#include <ktoolbar.h> 55#include <ktoolbar.h>
51#include <ktoolbarhandler.h> 56#include <ktoolbarhandler.h>
52#include <kxmlguiclient.h> 57#include <kxmlguiclient.h>
53#include <qmainwindow.h> 58#include <q3mainwindow.h>
54#include <qptrlist.h> 59#include <q3ptrlist.h>
55 60
56class KActionCollection; 61class KActionCollection;
57 62
58class KMainWindow : public QMainWindow, virtual public KXMLGUIClient 63class KMainWindow : public Q3MainWindow, virtual public KXMLGUIClient
59{ 64{
60 Q_OBJECT 65 Q_OBJECT
61 66
@@ -320,12 +325,12 @@ public:
320 **/ 325 **/
321 KToolBar *toolBar( const char *name=0 ); 326 KToolBar *toolBar( const char *name=0 );
322 // method for getting rid of KDE-Crap 327 // method for getting rid of KDE-Crap
323 QToolBar *tBar( ); 328 Q3ToolBar *tBar( );
324 329
325 /** 330 /**
326 * @return An iterator over the list of all toolbars for this window. 331 * @return An iterator over the list of all toolbars for this window.
327 */ 332 */
328 QPtrListIterator<KToolBar> toolBarIterator(); 333 Q3PtrListIterator<KToolBar> toolBarIterator();
329 334
330 /** 335 /**
331 * @return A KAccel instance bound to this mainwindow. Used automatically 336 * @return A KAccel instance bound to this mainwindow. Used automatically
@@ -758,7 +763,7 @@ private slots:
758 void saveAutoSaveSettings(); 763 void saveAutoSaveSettings();
759 764
760private: 765private:
761 QToolBar * mQToolBar; 766 Q3ToolBar * mQToolBar;
762//US KMenuBar *internalMenuBar(); 767//US KMenuBar *internalMenuBar();
763 QMenuBar *internalMenuBar(); 768 QMenuBar *internalMenuBar();
764//US KStatusBar *internalStatusBar(); 769//US KStatusBar *internalStatusBar();
@@ -767,7 +772,7 @@ private:
767 KMainWindowPrivate *d; 772 KMainWindowPrivate *d;
768 void initKMainWindow(const char *name); 773 void initKMainWindow(const char *name);
769 774
770 QPtrList<KToolBar> toolbarList; 775 Q3PtrList<KToolBar> toolbarList;
771 776
772protected: 777protected:
773 virtual void virtual_hook( int id, void* data ); 778 virtual void virtual_hook( int id, void* data );
diff --git a/microkde/kdeui/knuminput.cpp b/microkde/kdeui/knuminput.cpp
index 335d6f4..da01a20 100644
--- a/microkde/kdeui/knuminput.cpp
+++ b/microkde/kdeui/knuminput.cpp
@@ -42,6 +42,9 @@
42#include <qslider.h> 42#include <qslider.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <qstyle.h> 44#include <qstyle.h>
45//Added by qt3to4:
46#include <QResizeEvent>
47#include <QEvent>
45 48
46#include <kglobal.h> 49#include <kglobal.h>
47#include <klocale.h> 50#include <klocale.h>
@@ -106,11 +109,11 @@ void KNumInput::setLabel(const QString & label, int a)
106 else { 109 else {
107 if (m_label) m_label->setText(label); 110 if (m_label) m_label->setText(label);
108 else m_label = new QLabel(label, this, "KNumInput::QLabel"); 111 else m_label = new QLabel(label, this, "KNumInput::QLabel");
109 m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter))) 112 m_label->setAlignment((a & (~(Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter)))
110 | AlignVCenter); 113 | Qt::AlignVCenter);
111 // if no vertical alignment set, use Top alignment 114 // if no vertical alignment set, use Top alignment
112 if(!(a & (AlignTop|AlignBottom|AlignVCenter))) 115 if(!(a & (Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter)))
113 a |= AlignTop; 116 a |= Qt::AlignTop;
114 m_alignment = a; 117 m_alignment = a;
115 } 118 }
116 119
@@ -131,7 +134,7 @@ void KNumInput::layout(bool deep)
131 // label sizeHint 134 // label sizeHint
132 m_sizeLabel = (m_label ? m_label->sizeHint() : QSize(0,0)); 135 m_sizeLabel = (m_label ? m_label->sizeHint() : QSize(0,0));
133 136
134 if(m_label && (m_alignment & AlignVCenter)) 137 if(m_label && (m_alignment & Qt::AlignVCenter))
135 m_colw1 = m_sizeLabel.width() + 4; 138 m_colw1 = m_sizeLabel.width() + 4;
136 else 139 else
137 m_colw1 = 0; 140 m_colw1 = 0;
@@ -202,7 +205,7 @@ void KNumInput::setSteps(int minor, int major)
202KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name) 205KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name)
203 : QSpinBox(0, 99, 1, parent, name) 206 : QSpinBox(0, 99, 1, parent, name)
204{ 207{
205 editor()->setAlignment(AlignRight); 208 setAlignment(Qt::AlignRight);
206 val_base = 10; 209 val_base = 10;
207 setValue(0); 210 setValue(0);
208} 211}
@@ -215,7 +218,7 @@ KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base,
215 QWidget* parent, const char* name) 218 QWidget* parent, const char* name)
216 : QSpinBox(lower, upper, step, parent, name) 219 : QSpinBox(lower, upper, step, parent, name)
217{ 220{
218 editor()->setAlignment(AlignRight); 221 setAlignment(Qt::AlignRight);
219 val_base = base; 222 val_base = base;
220 setValue(value); 223 setValue(value);
221} 224}
@@ -243,9 +246,9 @@ int KIntSpinBox::mapTextToValue(bool* ok)
243 246
244void KIntSpinBox::setEditFocus(bool mark) 247void KIntSpinBox::setEditFocus(bool mark)
245{ 248{
246 editor()->setFocus(); 249 setFocus();
247 if(mark) 250 if(mark)
248 editor()->selectAll(); 251 selectAll();
249} 252}
250 253
251 254
@@ -325,14 +328,14 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
325 m_spin->setMaxValue(upper); 328 m_spin->setMaxValue(upper);
326 m_spin->setLineStep(step); 329 m_spin->setLineStep(step);
327 330
328 step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep? 331 step = m_spin->singleStep(); // maybe QRangeControl didn't like out lineStep?
329 332
330 if(slider) { 333 if(slider) {
331 if (m_slider) 334 if (m_slider)
332 m_slider->setRange(lower, upper); 335 m_slider->setRange(lower, upper);
333 else { 336 else {
334 m_slider = new QSlider(lower, upper, step, m_spin->value(), 337 m_slider = new QSlider(lower, upper, step, m_spin->value(),
335 QSlider::Horizontal, this); 338 Qt::Horizontal, this);
336 m_slider->setTickmarks(QSlider::Below); 339 m_slider->setTickmarks(QSlider::Below);
337 connect(m_slider, SIGNAL(valueChanged(int)), 340 connect(m_slider, SIGNAL(valueChanged(int)),
338 m_spin, SLOT(setValue(int))); 341 m_spin, SLOT(setValue(int)));
@@ -358,7 +361,7 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider)
358 361
359void KIntNumInput::setMinValue(int min) 362void KIntNumInput::setMinValue(int min)
360{ 363{
361 setRange(min, m_spin->maxValue(), m_spin->lineStep(), m_slider); 364 setRange(min, m_spin->maxValue(), m_spin->singleStep(), m_slider);
362} 365}
363 366
364int KIntNumInput::minValue() const 367int KIntNumInput::minValue() const
@@ -368,7 +371,7 @@ int KIntNumInput::minValue() const
368 371
369void KIntNumInput::setMaxValue(int max) 372void KIntNumInput::setMaxValue(int max)
370{ 373{
371 setRange(m_spin->minValue(), max, m_spin->lineStep(), m_slider); 374 setRange(m_spin->minValue(), max, m_spin->singleStep(), m_slider);
372} 375}
373 376
374int KIntNumInput::maxValue() const 377int KIntNumInput::maxValue() const
@@ -415,7 +418,7 @@ QSize KIntNumInput::minimumSizeHint() const
415 h = 2 + QMAX(m_sizeSpin.height(), m_sizeSlider.height()); 418 h = 2 + QMAX(m_sizeSpin.height(), m_sizeSlider.height());
416 419
417 // if in extra row, then count it here 420 // if in extra row, then count it here
418 if(m_label && (m_alignment & (AlignBottom|AlignTop))) 421 if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop)))
419 h += 4 + m_sizeLabel.height(); 422 h += 4 + m_sizeLabel.height();
420 else 423 else
421 // label is in the same row as the other widgets 424 // label is in the same row as the other widgets
@@ -424,7 +427,7 @@ QSize KIntNumInput::minimumSizeHint() const
424 w = m_slider ? m_slider->sizeHint().width() + 8 : 0; 427 w = m_slider ? m_slider->sizeHint().width() + 8 : 0;
425 w += m_colw1 + m_colw2; 428 w += m_colw1 + m_colw2;
426 429
427 if(m_alignment & (AlignTop|AlignBottom)) 430 if(m_alignment & (Qt::AlignTop|Qt::AlignBottom))
428 w = QMAX(w, m_sizeLabel.width() + 4); 431 w = QMAX(w, m_sizeLabel.width() + 4);
429 432
430 return QSize(w, h); 433 return QSize(w, h);
@@ -444,12 +447,12 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
444 int w = m_colw1; 447 int w = m_colw1;
445 int h = 0; 448 int h = 0;
446 449
447 if(m_label && (m_alignment & AlignTop)) { 450 if(m_label && (m_alignment & Qt::AlignTop)) {
448 m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); 451 m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height());
449 h += m_sizeLabel.height() + 4; 452 h += m_sizeLabel.height() + 4;
450 } 453 }
451 454
452 if(m_label && (m_alignment & AlignVCenter)) 455 if(m_label && (m_alignment & Qt::AlignVCenter))
453 m_label->setGeometry(0, 0, w, m_sizeSpin.height()); 456 m_label->setGeometry(0, 0, w, m_sizeSpin.height());
454 457
455 m_spin->setGeometry(w, h, m_slider ? m_colw2 : QMAX(m_colw2, e->size().width() - w), m_sizeSpin.height()); 458 m_spin->setGeometry(w, h, m_slider ? m_colw2 : QMAX(m_colw2, e->size().width() - w), m_sizeSpin.height());
@@ -460,7 +463,7 @@ void KIntNumInput::resizeEvent(QResizeEvent* e)
460 463
461 h += m_sizeSpin.height() + 2; 464 h += m_sizeSpin.height() + 2;
462 465
463 if(m_label && (m_alignment & AlignBottom)) 466 if(m_label && (m_alignment & Qt::AlignBottom))
464 m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); 467 m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height());
465} 468}
466 469
@@ -646,7 +649,7 @@ QSize KDoubleNumInput::minimumSizeHint() const
646 h = 2 + QMAX(m_sizeEdit.height(), m_sizeSlider.height()); 649 h = 2 + QMAX(m_sizeEdit.height(), m_sizeSlider.height());
647 650
648 // if in extra row, then count it here 651 // if in extra row, then count it here
649 if(m_label && (m_alignment & (AlignBottom|AlignTop))) 652 if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop)))
650 h += 4 + m_sizeLabel.height(); 653 h += 4 + m_sizeLabel.height();
651 else 654 else
652 // label is in the same row as the other widgets 655 // label is in the same row as the other widgets
@@ -655,7 +658,7 @@ QSize KDoubleNumInput::minimumSizeHint() const
655 w = m_slider ? m_slider->sizeHint().width() + 8 : 0; 658 w = m_slider ? m_slider->sizeHint().width() + 8 : 0;
656 w += m_colw1 + m_colw2; 659 w += m_colw1 + m_colw2;
657 660
658 if(m_alignment & (AlignTop|AlignBottom)) 661 if(m_alignment & (Qt::AlignTop|Qt::AlignBottom))
659 w = QMAX(w, m_sizeLabel.width() + 4); 662 w = QMAX(w, m_sizeLabel.width() + 4);
660 663
661 return QSize(w, h); 664 return QSize(w, h);
@@ -666,12 +669,12 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
666 int w = m_colw1; 669 int w = m_colw1;
667 int h = 0; 670 int h = 0;
668 671
669 if(m_label && (m_alignment & AlignTop)) { 672 if(m_label && (m_alignment & Qt::AlignTop)) {
670 m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); 673 m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height());
671 h += m_sizeLabel.height() + 4; 674 h += m_sizeLabel.height() + 4;
672 } 675 }
673 676
674 if(m_label && (m_alignment & AlignVCenter)) 677 if(m_label && (m_alignment & Qt::AlignVCenter))
675 m_label->setGeometry(0, 0, w, m_sizeEdit.height()); 678 m_label->setGeometry(0, 0, w, m_sizeEdit.height());
676 679
677 d->spin->setGeometry(w, h, m_slider ? m_colw2 680 d->spin->setGeometry(w, h, m_slider ? m_colw2
@@ -683,7 +686,7 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e)
683 686
684 h += m_sizeEdit.height() + 2; 687 h += m_sizeEdit.height() + 2;
685 688
686 if(m_label && (m_alignment & AlignBottom)) 689 if(m_label && (m_alignment & Qt::AlignBottom))
687 m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); 690 m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height());
688} 691}
689 692
@@ -730,14 +733,14 @@ void KDoubleNumInput::setRange(double lower, double upper, double step,
730 int slmax = spin->maxValue(); 733 int slmax = spin->maxValue();
731 int slmin = spin->minValue(); 734 int slmin = spin->minValue();
732 int slvalue = spin->value(); 735 int slvalue = spin->value();
733 int slstep = spin->lineStep(); 736 int slstep = spin->singleStep();
734 if (m_slider) { 737 if (m_slider) {
735 m_slider->setRange(slmin, slmax); 738 m_slider->setRange(slmin, slmax);
736 m_slider->setLineStep(slstep); 739 m_slider->setLineStep(slstep);
737 m_slider->setValue(slvalue); 740 m_slider->setValue(slvalue);
738 } else { 741 } else {
739 m_slider = new QSlider(slmin, slmax, slstep, slvalue, 742 m_slider = new QSlider(slmin, slmax, slstep, slvalue,
740 QSlider::Horizontal, this); 743 Qt::Horizontal, this);
741 m_slider->setTickmarks(QSlider::Below); 744 m_slider->setTickmarks(QSlider::Below);
742 // feedback line: when one moves, the other moves, too: 745 // feedback line: when one moves, the other moves, too:
743 connect(m_slider, SIGNAL(valueChanged(int)), 746 connect(m_slider, SIGNAL(valueChanged(int)),
@@ -912,7 +915,7 @@ public:
912KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name ) 915KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name )
913 : QSpinBox( parent, name ) 916 : QSpinBox( parent, name )
914{ 917{
915 editor()->setAlignment( Qt::AlignRight ); 918 setAlignment( Qt::AlignRight );
916 d = new Private(); 919 d = new Private();
917 updateValidator(); 920 updateValidator();
918} 921}
@@ -922,7 +925,7 @@ KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step,
922 QWidget * parent, const char * name ) 925 QWidget * parent, const char * name )
923 : QSpinBox( parent, name ) 926 : QSpinBox( parent, name )
924{ 927{
925 editor()->setAlignment( Qt::AlignRight ); 928 setAlignment( Qt::AlignRight );
926 d = new Private(); 929 d = new Private();
927 setRange( lower, upper, step, precision ); 930 setRange( lower, upper, step, precision );
928 setValue( value ); 931 setValue( value );
@@ -1027,7 +1030,7 @@ void KDoubleSpinBox::setMaxValue( double value ) {
1027} 1030}
1028 1031
1029double KDoubleSpinBox::lineStep() const { 1032double KDoubleSpinBox::lineStep() const {
1030 return d->mapToDouble( base::lineStep() ); 1033 return d->mapToDouble( base::singleStep() );
1031} 1034}
1032 1035
1033void KDoubleSpinBox::setLineStep( double step ) { 1036void KDoubleSpinBox::setLineStep( double step ) {
@@ -1072,7 +1075,7 @@ void KDoubleSpinBox::updateValidator() {
1072 if ( !d->mValidator ) { 1075 if ( !d->mValidator ) {
1073 d->mValidator = new KDoubleValidator( minValue(), maxValue(), precision(), 1076 d->mValidator = new KDoubleValidator( minValue(), maxValue(), precision(),
1074 this, "d->mValidator" ); 1077 this, "d->mValidator" );
1075 base::setValidator( d->mValidator ); 1078 lineEdit()->setValidator( d->mValidator );
1076 } else 1079 } else
1077 d->mValidator->setRange( minValue(), maxValue(), precision() ); 1080 d->mValidator->setRange( minValue(), maxValue(), precision() );
1078} 1081}
diff --git a/microkde/kdeui/knuminput.h b/microkde/kdeui/knuminput.h
index 123fefa..9f9e200 100644
--- a/microkde/kdeui/knuminput.h
+++ b/microkde/kdeui/knuminput.h
@@ -29,6 +29,11 @@
29 29
30#include <qwidget.h> 30#include <qwidget.h>
31#include <qspinbox.h> 31#include <qspinbox.h>
32#include <QLineEdit>
33//Added by qt3to4:
34#include <QResizeEvent>
35#include <QLabel>
36#include <QEvent>
32 37
33class QLabel; 38class QLabel;
34class QSlider; 39class QSlider;
@@ -81,7 +86,7 @@ public:
81 * @li @p AlignBottom The label is placed below the edit/slider 86 * @li @p AlignBottom The label is placed below the edit/slider
82 * 87 *
83 */ 88 */
84 virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); 89 virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
85 90
86 /** 91 /**
87 * @return the text of the label. 92 * @return the text of the label.
@@ -302,7 +307,7 @@ public:
302 /** 307 /**
303 * @reimplemented 308 * @reimplemented
304 */ 309 */
305 virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); 310 virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
306 311
307 /** 312 /**
308 * This method returns the minimum size necessary to display the 313 * This method returns the minimum size necessary to display the
@@ -588,7 +593,7 @@ public:
588 /** 593 /**
589 * @reimplemented 594 * @reimplemented
590 */ 595 */
591 virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); 596 virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop);
592 /** 597 /**
593 * @reimplemented 598 * @reimplemented
594 */ 599 */
@@ -758,6 +763,10 @@ public:
758 */ 763 */
759 void setEditFocus(bool mark); 764 void setEditFocus(bool mark);
760 765
766 void setValidator(const QValidator *v) {
767 lineEdit()->setValidator(v);
768 }
769
761protected: 770protected:
762 771
763 /** 772 /**
diff --git a/microkde/kdeui/kpopupmenu.cpp b/microkde/kdeui/kpopupmenu.cpp
index 96d2a87..7e1503c 100644
--- a/microkde/kdeui/kpopupmenu.cpp
+++ b/microkde/kdeui/kpopupmenu.cpp
@@ -1,10 +1,13 @@
1 1
2#include <kpopupmenu.h> 2#include <kpopupmenu.h>
3#include <qtimer.h> 3#include <qtimer.h>
4//Added by qt3to4:
5#include <QFocusEvent>
6#include <Q3PopupMenu>
4 7
5 8
6KPopupMenu::KPopupMenu ( QWidget * parent, const char * name ) 9KPopupMenu::KPopupMenu ( QWidget * parent, const char * name )
7 : QPopupMenu ( parent, name ) {;} 10 : Q3PopupMenu ( parent, name ) {;}
8 11
9 12
10 13
diff --git a/microkde/kdeui/kpopupmenu.h b/microkde/kdeui/kpopupmenu.h
index fd00f36..1c903ad 100644
--- a/microkde/kdeui/kpopupmenu.h
+++ b/microkde/kdeui/kpopupmenu.h
@@ -1,7 +1,9 @@
1#ifndef KPOPUPMENU_H 1#ifndef KPOPUPMENU_H
2#define KPOPUPMENU_H 2#define KPOPUPMENU_H
3 3
4#include <qpopupmenu.h> 4#include <q3popupmenu.h>
5//Added by qt3to4:
6#include <QFocusEvent>
5#ifdef DESKTOP_VERSION 7#ifdef DESKTOP_VERSION
6#include <qmenubar.h> 8#include <qmenubar.h>
7#define QPEMenuBar QMenuBar 9#define QPEMenuBar QMenuBar
@@ -9,7 +11,7 @@
9#include <qpe/qpemenubar.h> 11#include <qpe/qpemenubar.h>
10#endif 12#endif
11 13
12class KPopupMenu : public QPopupMenu 14class KPopupMenu : public Q3PopupMenu
13{ 15{
14Q_OBJECT 16Q_OBJECT
15 public: 17 public:
diff --git a/microkde/kdeui/kseparator.cpp b/microkde/kdeui/kseparator.cpp
index d028420..66000f0 100644
--- a/microkde/kdeui/kseparator.cpp
+++ b/microkde/kdeui/kseparator.cpp
@@ -18,6 +18,8 @@
18 */ 18 */
19 19
20#include <qstyle.h> 20#include <qstyle.h>
21//Added by qt3to4:
22#include <Q3Frame>
21 23
22#include <kdebug.h> 24#include <kdebug.h>
23//US #include <kapplication.h> 25//US #include <kapplication.h>
@@ -26,8 +28,8 @@
26 28
27#include "kseparator.h" 29#include "kseparator.h"
28 30
29KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f) 31KSeparator::KSeparator(QWidget* parent, const char* name, Qt::WFlags f)
30 : QFrame(parent, name, f) 32 : Q3Frame(parent, name, f)
31{ 33{
32 setLineWidth(1); 34 setLineWidth(1);
33 setMidLineWidth(0); 35 setMidLineWidth(0);
@@ -36,8 +38,8 @@ KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f)
36 38
37 39
38 40
39KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f) 41KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, Qt::WFlags f)
40 : QFrame(parent, name, f) 42 : Q3Frame(parent, name, f)
41{ 43{
42 setLineWidth(1); 44 setLineWidth(1);
43 setMidLineWidth(0); 45 setMidLineWidth(0);
@@ -50,18 +52,18 @@ void KSeparator::setOrientation(int orientation)
50{ 52{
51 switch(orientation) 53 switch(orientation)
52 { 54 {
53 case Vertical: 55 case Qt::Vertical:
54 case VLine: 56 case VLine:
55 setFrameStyle( QFrame::VLine | QFrame::Sunken ); 57 setFrameStyle( Q3Frame::VLine | Q3Frame::Sunken );
56 setMinimumSize(2, 0); 58 setMinimumSize(2, 0);
57 break; 59 break;
58 60
59 default: 61 default:
60 kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl; 62 kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl;
61 63
62 case Horizontal: 64 case Qt::Horizontal:
63 case HLine: 65 case HLine:
64 setFrameStyle( QFrame::HLine | QFrame::Sunken ); 66 setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken );
65 setMinimumSize(0, 2); 67 setMinimumSize(0, 2);
66 break; 68 break;
67 } 69 }
diff --git a/microkde/kdeui/kseparator.h b/microkde/kdeui/kseparator.h
index 6d2712a..c673475 100644
--- a/microkde/kdeui/kseparator.h
+++ b/microkde/kdeui/kseparator.h
@@ -20,7 +20,7 @@
20#ifndef __KSEPARATOR_H__ 20#ifndef __KSEPARATOR_H__
21#define __KSEPARATOR_H__ 21#define __KSEPARATOR_H__
22 22
23#include <qframe.h> 23#include <q3frame.h>
24 24
25/** 25/**
26 * Standard horizontal or vertical separator. 26 * Standard horizontal or vertical separator.
@@ -28,7 +28,7 @@
28 * @author Michael Roth <mroth@wirlweb.de> 28 * @author Michael Roth <mroth@wirlweb.de>
29 * @version $Id$ 29 * @version $Id$
30*/ 30*/
31class KSeparator : public QFrame 31class KSeparator : public Q3Frame
32{ 32{
33 Q_OBJECT 33 Q_OBJECT
34 Q_PROPERTY( int orientation READ orientation WRITE setOrientation ) 34 Q_PROPERTY( int orientation READ orientation WRITE setOrientation )
@@ -36,7 +36,7 @@ class KSeparator : public QFrame
36 /** 36 /**
37 * Constructor. 37 * Constructor.
38 **/ 38 **/
39 KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0); 39 KSeparator(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
40 /** 40 /**
41 * Constructor. 41 * Constructor.
42 * 42 *
@@ -44,7 +44,7 @@ class KSeparator : public QFrame
44 * Possible values are HLine or Horizontal and VLine or Vertical. 44 * Possible values are HLine or Horizontal and VLine or Vertical.
45 **/ 45 **/
46 KSeparator(int orientation, QWidget* parent=0, const char* name=0, 46 KSeparator(int orientation, QWidget* parent=0, const char* name=0,
47 WFlags f=0); 47 Qt::WFlags f=0);
48 48
49 /** 49 /**
50 * Returns the orientation of the separator. 50 * Returns the orientation of the separator.
diff --git a/microkde/kdeui/ksqueezedtextlabel.cpp b/microkde/kdeui/ksqueezedtextlabel.cpp
index 37fa29a..e2c61fd 100644
--- a/microkde/kdeui/ksqueezedtextlabel.cpp
+++ b/microkde/kdeui/ksqueezedtextlabel.cpp
@@ -18,6 +18,9 @@
18 18
19#include "ksqueezedtextlabel.h" 19#include "ksqueezedtextlabel.h"
20#include <qtooltip.h> 20#include <qtooltip.h>
21//Added by qt3to4:
22#include <QResizeEvent>
23#include <QLabel>
21 24
22KSqueezedTextLabel::KSqueezedTextLabel( const QString &text , QWidget *parent, const char *name ) 25KSqueezedTextLabel::KSqueezedTextLabel( const QString &text , QWidget *parent, const char *name )
23 : QLabel ( parent, name ) { 26 : QLabel ( parent, name ) {
diff --git a/microkde/kdeui/ksqueezedtextlabel.h b/microkde/kdeui/ksqueezedtextlabel.h
index 1634adc..487d0b0 100644
--- a/microkde/kdeui/ksqueezedtextlabel.h
+++ b/microkde/kdeui/ksqueezedtextlabel.h
@@ -20,6 +20,8 @@
20#define KSQUEEZEDTEXTLABEL_H 20#define KSQUEEZEDTEXTLABEL_H
21 21
22#include <qlabel.h> 22#include <qlabel.h>
23//Added by qt3to4:
24#include <QResizeEvent>
23 25
24/** 26/**
25 * A label class that squeezes its text into the label 27 * A label class that squeezes its text into the label
diff --git a/microkde/kdeui/kstdaction.cpp b/microkde/kdeui/kstdaction.cpp
index cfd7b54..f0d162d 100644
--- a/microkde/kdeui/kstdaction.cpp
+++ b/microkde/kdeui/kstdaction.cpp
@@ -19,7 +19,7 @@
19#include "kstdaction.h" 19#include "kstdaction.h"
20 20
21#include <qtoolbutton.h> 21#include <qtoolbutton.h>
22#include <qwhatsthis.h> 22#include <q3whatsthis.h>
23 23
24//US #include <kaboutdata.h> 24//US #include <kaboutdata.h>
25#include <kaction.h> 25#include <kaction.h>
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 027e5e9..02db316 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -25,9 +25,20 @@
25 25
26#ifdef KDE_USE_FINAL 26#ifdef KDE_USE_FINAL
27#undef Always 27#undef Always
28#include <qdockwindow.h> 28#include <q3dockwindow.h>
29#endif 29#endif
30 30//Added by qt3to4:
31#include <Q3ValueList>
32#include <Q3PtrList>
33#include <QPixmap>
34#include <Q3Frame>
35#include <QResizeEvent>
36#include <QMouseEvent>
37#include <QChildEvent>
38#include <QEvent>
39#include <QShowEvent>
40#include <QDesktopWidget>
41#include <QBoxLayout>
31 42
32 43
33#include "ktoolbar.h" 44#include "ktoolbar.h"
@@ -40,7 +51,7 @@
40#include <qdrawutil.h> 51#include <qdrawutil.h>
41#include <qstring.h> 52#include <qstring.h>
42#include <qrect.h> 53#include <qrect.h>
43#include <qobjectlist.h> 54#include <qobject.h>
44#include <qtimer.h> 55#include <qtimer.h>
45#include <qstyle.h> 56#include <qstyle.h>
46#include <qapplication.h> 57#include <qapplication.h>
@@ -69,8 +80,8 @@
69//US 80//US
70#include "kconfigbase.h" 81#include "kconfigbase.h"
71 82
72#include <qpopupmenu.h> 83#include <q3popupmenu.h>
73#include <qmainwindow.h> 84#include <q3mainwindow.h>
74 85
75enum { 86enum {
76 CONTEXT_TOP = 0, 87 CONTEXT_TOP = 0,
@@ -102,7 +113,7 @@ public:
102 m_configurePlugged = false; 113 m_configurePlugged = false;
103 114
104//US oldPos = Qt::DockUnmanaged; 115//US oldPos = Qt::DockUnmanaged;
105 oldPos = QMainWindow::Unmanaged; 116 oldPos = Qt::Unmanaged;
106 117
107 modified = m_isHorizontal = positioned = FALSE; 118 modified = m_isHorizontal = positioned = FALSE;
108 119
@@ -129,24 +140,24 @@ public:
129 140
130 QWidget *m_parent; 141 QWidget *m_parent;
131 142
132 QMainWindow::ToolBarDock oldPos; 143 Qt::ToolBarDock oldPos;
133 144
134 KXMLGUIClient *m_xmlguiClient; 145 KXMLGUIClient *m_xmlguiClient;
135 146
136 struct ToolBarInfo 147 struct ToolBarInfo
137 { 148 {
138//US ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {} 149//US ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {}
139 ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( QMainWindow::Top ) {} 150 ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {}
140//US ToolBarInfo( Qt::Dock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {} 151//US ToolBarInfo( Qt::Dock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
141 ToolBarInfo( QMainWindow::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {} 152 ToolBarInfo( Qt::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {}
142 int index, offset; 153 int index, offset;
143 bool newline; 154 bool newline;
144//US Qt::Dock dock; 155//US Qt::Dock dock;
145 QMainWindow::ToolBarDock dock; 156 Qt::ToolBarDock dock;
146 }; 157 };
147 158
148 ToolBarInfo toolBarInfo; 159 ToolBarInfo toolBarInfo;
149 QValueList<int> iconSizes; 160 Q3ValueList<int> iconSizes;
150 QTimer repaintTimer; 161 QTimer repaintTimer;
151 162
152 // Default Values. 163 // Default Values.
@@ -158,25 +169,25 @@ public:
158 int OffsetDefault; 169 int OffsetDefault;
159 QString PositionDefault; 170 QString PositionDefault;
160 171
161 QPtrList<QWidget> idleButtons; 172 Q3PtrList<QWidget> idleButtons;
162}; 173};
163 174
164KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent, 175KToolBarSeparator::KToolBarSeparator(Qt::Orientation o , bool l, Q3ToolBar *parent,
165 const char* name ) 176 const char* name )
166 :QFrame( parent, name ), line( l ) 177 :Q3Frame( parent, name ), line( l )
167{ 178{
168 connect( parent, SIGNAL(orientationChanged(Orientation)), 179 connect( parent, SIGNAL(orientationChanged(Qt::Orientation)),
169 this, SLOT(setOrientation(Orientation)) ); 180 this, SLOT(setOrientation(Qt::Orientation)) );
170 setOrientation( o ); 181 setOrientation( o );
171 setBackgroundMode( parent->backgroundMode() ); 182 setBackgroundMode( parent->backgroundMode() );
172 setBackgroundOrigin( ParentOrigin ); 183 setBackgroundOrigin( ParentOrigin );
173} 184}
174 185
175void KToolBarSeparator::setOrientation( Orientation o ) 186void KToolBarSeparator::setOrientation( Qt::Orientation o )
176{ 187{
177 orient = o; 188 orient = o;
178 if ( line ) { 189 if ( line ) {
179 if ( orientation() == Vertical ) 190 if ( orientation() == Qt::Vertical )
180 setFrameStyle( HLine + Sunken ); 191 setFrameStyle( HLine + Sunken );
181 else 192 else
182 setFrameStyle( VLine + Sunken ); 193 setFrameStyle( VLine + Sunken );
@@ -192,7 +203,7 @@ void KToolBarSeparator::styleChange( QStyle& )
192 203
193QSize KToolBarSeparator::sizeHint() const 204QSize KToolBarSeparator::sizeHint() const
194{ 205{
195 return orientation() == Vertical ? QSize( 0, 6 ) : QSize( 6, 0 ); 206 return orientation() == Qt::Vertical ? QSize( 0, 6 ) : QSize( 6, 0 );
196} 207}
197 208
198QSizePolicy KToolBarSeparator::sizePolicy() const 209QSizePolicy KToolBarSeparator::sizePolicy() const
@@ -202,12 +213,12 @@ QSizePolicy KToolBarSeparator::sizePolicy() const
202 213
203KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool readConfig ) 214KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool readConfig )
204#ifdef DESKTOP_VERSION 215#ifdef DESKTOP_VERSION
205 : QToolBar( QString::fromLatin1( name ), 216 : Q3ToolBar( QString::fromLatin1( name ),
206 parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0, 217 parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0,
207 parent, FALSE, 218 parent, FALSE,
208 name ? name : "mainToolBar") 219 name ? name : "mainToolBar")
209#else 220#else
210 : QPEToolBar( parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0, 221 : QPEToolBar( parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0,
211 QString::fromLatin1( name )) 222 QString::fromLatin1( name ))
212 223
213 224
@@ -216,9 +227,9 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea
216 init( readConfig, honorStyle ); 227 init( readConfig, honorStyle );
217} 228}
218 229
219KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) 230KToolBar::KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
220#ifdef DESKTOP_VERSION 231#ifdef DESKTOP_VERSION
221 : QToolBar( QString::fromLatin1( name ), 232 : Q3ToolBar( QString::fromLatin1( name ),
222 parentWindow, dock, newLine, 233 parentWindow, dock, newLine,
223 name ? name : "mainToolBar") 234 name ? name : "mainToolBar")
224#else 235#else
@@ -231,9 +242,9 @@ KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bo
231 init( readConfig, honorStyle ); 242 init( readConfig, honorStyle );
232} 243}
233 244
234KToolBar::KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) 245KToolBar::KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig )
235#ifdef DESKTOP_VERSION 246#ifdef DESKTOP_VERSION
236 : QToolBar( QString::fromLatin1( name ), 247 : Q3ToolBar( QString::fromLatin1( name ),
237 parentWindow, dock, newLine, 248 parentWindow, dock, newLine,
238 name ? name : "mainToolBar") 249 name ? name : "mainToolBar")
239#else 250#else
@@ -280,8 +291,8 @@ void KToolBar::init( bool readConfig, bool honorStyle )
280 slotReadConfig(); 291 slotReadConfig();
281 292
282 if ( mainWindow() ) 293 if ( mainWindow() )
283 connect( mainWindow(), SIGNAL( toolBarPositionChanged( QToolBar * ) ), 294 connect( mainWindow(), SIGNAL( toolBarPositionChanged( Q3ToolBar * ) ),
284 this, SLOT( toolBarPosChanged( QToolBar * ) ) ); 295 this, SLOT( toolBarPosChanged( Q3ToolBar * ) ) );
285 296
286 // Hack to make sure we recalculate our size when we dock. 297 // Hack to make sure we recalculate our size when we dock.
287//US connect( this, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(rebuildLayout()) ); 298//US connect( this, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(rebuildLayout()) );
@@ -341,7 +352,7 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal,
341} 352}
342 353
343 354
344int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup, 355int KToolBar::insertButton(const QString& icon, int id, Q3PopupMenu *popup,
345 bool enabled, const QString &text, int index ) 356 bool enabled, const QString &text, int index )
346{ 357{
347 KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text ); 358 KToolBarButton *button = new KToolBarButton( icon, id, this, 0, text );
@@ -353,7 +364,7 @@ int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup,
353} 364}
354 365
355 366
356int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup, 367int KToolBar::insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup,
357 bool enabled, const QString &text, int index ) 368 bool enabled, const QString &text, int index )
358{ 369{
359 KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text ); 370 KToolBarButton *button = new KToolBarButton( pixmap, id, this, 0, text );
@@ -540,7 +551,7 @@ void KToolBar::setButtonIcon( int id, const QString& _icon )
540 button->setIcon( _icon ); 551 button->setIcon( _icon );
541} 552}
542 553
543void KToolBar::setButtonIconSet( int id, const QIconSet& iconset ) 554void KToolBar::setButtonIconSet( int id, const QIcon& iconset )
544{ 555{
545 Id2WidgetMap::Iterator it = id2widget.find( id ); 556 Id2WidgetMap::Iterator it = id2widget.find( id );
546 if ( it == id2widget.end() ) 557 if ( it == id2widget.end() )
@@ -552,7 +563,7 @@ void KToolBar::setButtonIconSet( int id, const QIconSet& iconset )
552} 563}
553 564
554 565
555void KToolBar::setDelayedPopup (int id , QPopupMenu *_popup, bool toggle ) 566void KToolBar::setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle )
556{ 567{
557 Id2WidgetMap::Iterator it = id2widget.find( id ); 568 Id2WidgetMap::Iterator it = id2widget.find( id );
558 if ( it == id2widget.end() ) 569 if ( it == id2widget.end() )
@@ -787,7 +798,7 @@ void KToolBar::setItemAutoSized (int id, bool yes )
787 798
788void KToolBar::clear () 799void KToolBar::clear ()
789{ 800{
790 QToolBar::clear(); 801 Q3ToolBar::clear();
791 widget2id.clear(); 802 widget2id.clear();
792 id2widget.clear(); 803 id2widget.clear();
793} 804}
@@ -876,21 +887,21 @@ void KToolBar::setBarPos (BarPosition bpos)
876 if ( !mainWindow() ) 887 if ( !mainWindow() )
877 return; 888 return;
878//US mainWindow()->moveDockWindow( this, (Dock)bpos ); 889//US mainWindow()->moveDockWindow( this, (Dock)bpos );
879 mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos ); 890 mainWindow()->moveToolBar( this, (Qt::ToolBarDock)bpos );
880} 891}
881 892
882 893
883const KToolBar::BarPosition KToolBar::barPos() 894const KToolBar::BarPosition KToolBar::barPos()
884{ 895{
885 if ( !(QMainWindow*)mainWindow() ) 896 if ( !(Q3MainWindow*)mainWindow() )
886 return KToolBar::Top; 897 return KToolBar::Top;
887//US Dock dock; 898//US Dock dock;
888 QMainWindow::ToolBarDock dock; 899 Qt::ToolBarDock dock;
889 int dm1, dm2; 900 int dm1, dm2;
890 bool dm3; 901 bool dm3;
891 ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 ); 902 ((Q3MainWindow*)mainWindow())->getLocation( (Q3ToolBar*)this, dock, dm1, dm3, dm2 );
892//US if ( dock == DockUnmanaged ) { 903//US if ( dock == DockUnmanaged ) {
893 if ( dock == QMainWindow::Unmanaged ) { 904 if ( dock == Qt::Unmanaged ) {
894 return (KToolBar::BarPosition)Top; 905 return (KToolBar::BarPosition)Top;
895 } 906 }
896 return (BarPosition)dock; 907 return (BarPosition)dock;
@@ -967,7 +978,7 @@ void KToolBar::setIconText(IconText icontext, bool update)
967 978
968 // ugly hack to force a QMainWindow::triggerLayout( TRUE ) 979 // ugly hack to force a QMainWindow::triggerLayout( TRUE )
969 if ( mainWindow() ) { 980 if ( mainWindow() ) {
970 QMainWindow *mw = mainWindow(); 981 Q3MainWindow *mw = mainWindow();
971 mw->setUpdatesEnabled( FALSE ); 982 mw->setUpdatesEnabled( FALSE );
972 mw->setToolBarsMovable( !mw->toolBarsMovable() ); 983 mw->setToolBarsMovable( !mw->toolBarsMovable() );
973 mw->setToolBarsMovable( !mw->toolBarsMovable() ); 984 mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -1004,7 +1015,7 @@ void KToolBar::setIconSize(int size, bool update)
1004 1015
1005 // ugly hack to force a QMainWindow::triggerLayout( TRUE ) 1016 // ugly hack to force a QMainWindow::triggerLayout( TRUE )
1006 if ( mainWindow() ) { 1017 if ( mainWindow() ) {
1007 QMainWindow *mw = mainWindow(); 1018 Q3MainWindow *mw = mainWindow();
1008 mw->setUpdatesEnabled( FALSE ); 1019 mw->setUpdatesEnabled( FALSE );
1009 mw->setToolBarsMovable( !mw->toolBarsMovable() ); 1020 mw->setToolBarsMovable( !mw->toolBarsMovable() );
1010 mw->setToolBarsMovable( !mw->toolBarsMovable() ); 1021 mw->setToolBarsMovable( !mw->toolBarsMovable() );
@@ -1062,10 +1073,10 @@ void KToolBar::setFlat (bool flag)
1062 return; 1073 return;
1063 if ( flag ) 1074 if ( flag )
1064//US mainWindow()->moveDockWindow( this, DockMinimized ); 1075//US mainWindow()->moveDockWindow( this, DockMinimized );
1065 mainWindow()->moveToolBar( this, QMainWindow::Minimized ); 1076 mainWindow()->moveToolBar( this, Qt::Minimized );
1066 else 1077 else
1067//US mainWindow()->moveDockWindow( this, DockTop ); 1078//US mainWindow()->moveDockWindow( this, DockTop );
1068 mainWindow()->moveToolBar( this, QMainWindow::Top ); 1079 mainWindow()->moveToolBar( this, Qt::Top );
1069 // And remember to save the new look later 1080 // And remember to save the new look later
1070/*US 1081/*US
1071 if ( mainWindow()->inherits( "KMainWindow" ) ) 1082 if ( mainWindow()->inherits( "KMainWindow" ) )
@@ -1249,34 +1260,34 @@ void KToolBar::mousePressEvent ( QMouseEvent *m )
1249{ 1260{
1250 if ( !mainWindow() ) 1261 if ( !mainWindow() )
1251 return; 1262 return;
1252 QMainWindow *mw = mainWindow(); 1263 Q3MainWindow *mw = mainWindow();
1253 if ( mw->toolBarsMovable() && d->m_enableContext ) { 1264 if ( mw->toolBarsMovable() && d->m_enableContext ) {
1254 if ( m->button() == RightButton ) { 1265 if ( m->button() == Qt::RightButton ) {
1255 int i = contextMenu()->exec( m->globalPos(), 0 ); 1266 int i = contextMenu()->exec( m->globalPos(), 0 );
1256 switch ( i ) { 1267 switch ( i ) {
1257 case -1: 1268 case -1:
1258 return; // popup cancelled 1269 return; // popup cancelled
1259 case CONTEXT_LEFT: 1270 case CONTEXT_LEFT:
1260//US mw->moveDockWindow( this, DockLeft ); 1271//US mw->moveDockWindow( this, DockLeft );
1261 mw->moveToolBar( this, QMainWindow::Left ); 1272 mw->moveToolBar( this, Qt::Left );
1262 break; 1273 break;
1263 case CONTEXT_RIGHT: 1274 case CONTEXT_RIGHT:
1264//US mw->moveDockWindow( this, DockRight ); 1275//US mw->moveDockWindow( this, DockRight );
1265 mw->moveToolBar( this, QMainWindow::Right ); 1276 mw->moveToolBar( this, Qt::Right );
1266 break; 1277 break;
1267 case CONTEXT_TOP: 1278 case CONTEXT_TOP:
1268//US mw->moveDockWindow( this, DockTop ); 1279//US mw->moveDockWindow( this, DockTop );
1269 mw->moveToolBar( this, QMainWindow::Top ); 1280 mw->moveToolBar( this, Qt::Top );
1270 break; 1281 break;
1271 case CONTEXT_BOTTOM: 1282 case CONTEXT_BOTTOM:
1272//US mw->moveDockWindow( this, DockBottom ); 1283//US mw->moveDockWindow( this, DockBottom );
1273 mw->moveToolBar( this, QMainWindow::Bottom ); 1284 mw->moveToolBar( this, Qt::Bottom );
1274 break; 1285 break;
1275 case CONTEXT_FLOAT: 1286 case CONTEXT_FLOAT:
1276 break; 1287 break;
1277 case CONTEXT_FLAT: 1288 case CONTEXT_FLAT:
1278//US mw->moveDockWindow( this, DockMinimized ); 1289//US mw->moveDockWindow( this, DockMinimized );
1279 mw->moveToolBar( this, QMainWindow::Minimized ); 1290 mw->moveToolBar( this, Qt::Minimized );
1280 break; 1291 break;
1281 case CONTEXT_ICONS: 1292 case CONTEXT_ICONS:
1282 setIconText( IconOnly ); 1293 setIconText( IconOnly );
@@ -1332,7 +1343,7 @@ void KToolBar::rebuildLayout()
1332 w->hide(); 1343 w->hide();
1333 continue; 1344 continue;
1334 } 1345 }
1335 if ( w->inherits( "QPopupMenu" ) ) 1346 if ( w->inherits( "Q3PopupMenu" ) )
1336 continue; 1347 continue;
1337 l->addWidget( w ); 1348 l->addWidget( w );
1338 w->show(); 1349 w->show();
@@ -1364,7 +1375,7 @@ void KToolBar::childEvent( QChildEvent *e )
1364 if ( e->child()->isWidgetType() ) { 1375 if ( e->child()->isWidgetType() ) {
1365 QWidget * w = (QWidget*)e->child(); 1376 QWidget * w = (QWidget*)e->child();
1366 if ( e->type() == QEvent::ChildInserted ) { 1377 if ( e->type() == QEvent::ChildInserted ) {
1367 if ( !e->child()->inherits( "QPopupMenu" ) && 1378 if ( !e->child()->inherits( "Q3PopupMenu" ) &&
1368 ::qstrcmp( "qt_dockwidget_internal", e->child()->name() ) != 0 ) { 1379 ::qstrcmp( "qt_dockwidget_internal", e->child()->name() ) != 0 ) {
1369 1380
1370 // prevent items that have been explicitly inserted by insert*() from 1381 // prevent items that have been explicitly inserted by insert*() from
@@ -1375,10 +1386,10 @@ void KToolBar::childEvent( QChildEvent *e )
1375 insertWidgetInternal( w, dummy, -1 ); 1386 insertWidgetInternal( w, dummy, -1 );
1376 } 1387 }
1377 } 1388 }
1378 } else { 1389 } else if( e->type() == QEvent::ChildRemoved ) {
1379 removeWidgetInternal( w ); 1390 removeWidgetInternal( w );
1380 } 1391 }
1381 if ( isVisibleTo( 0 ) ) 1392 /* TODO:hacker: if ( isVisibleTo( 0 ) )
1382 { 1393 {
1383 QBoxLayout *l = boxLayout(); 1394 QBoxLayout *l = boxLayout();
1384 // QLayout *l = layout(); 1395 // QLayout *l = layout();
@@ -1390,9 +1401,9 @@ void KToolBar::childEvent( QChildEvent *e )
1390 it.deleteCurrent(); 1401 it.deleteCurrent();
1391 } 1402 }
1392 layoutTimer->start( 50, TRUE ); 1403 layoutTimer->start( 50, TRUE );
1393 } 1404 } */
1394 } 1405 }
1395 QToolBar::childEvent( e ); 1406 Q3ToolBar::childEvent( e );
1396} 1407}
1397 1408
1398void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id ) 1409void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
@@ -1416,25 +1427,25 @@ void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
1416void KToolBar::repaintMe() 1427void KToolBar::repaintMe()
1417{ 1428{
1418 setUpdatesEnabled( true ); 1429 setUpdatesEnabled( true );
1419 QToolBar::repaint( true ); 1430 Q3ToolBar::repaint( true );
1420 qDebug(" KToolBar::repaintMe() "); 1431 qDebug(" KToolBar::repaintMe() ");
1421} 1432}
1422 1433
1423void KToolBar::showEvent( QShowEvent *e ) 1434void KToolBar::showEvent( QShowEvent *e )
1424{ 1435{
1425 rebuildLayout(); 1436 rebuildLayout();
1426 QToolBar::showEvent( e ); 1437 Q3ToolBar::showEvent( e );
1427} 1438}
1428 1439
1429void KToolBar::setStretchableWidget( QWidget *w ) 1440void KToolBar::setStretchableWidget( QWidget *w )
1430{ 1441{
1431 QToolBar::setStretchableWidget( w ); 1442 Q3ToolBar::setStretchableWidget( w );
1432 stretchableWidget = w; 1443 stretchableWidget = w;
1433} 1444}
1434 1445
1435QSizePolicy KToolBar::sizePolicy() const 1446QSizePolicy KToolBar::sizePolicy() const
1436{ 1447{
1437 if ( orientation() == Horizontal ) 1448 if ( orientation() == Qt::Horizontal )
1438 return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); 1449 return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
1439 else 1450 else
1440 return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding ); 1451 return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding );
@@ -1442,7 +1453,7 @@ QSizePolicy KToolBar::sizePolicy() const
1442 1453
1443QSize KToolBar::sizeHint() const 1454QSize KToolBar::sizeHint() const
1444{ 1455{
1445 QSize sh = QToolBar::sizeHint(); 1456 QSize sh = Q3ToolBar::sizeHint();
1446 //qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() ); 1457 //qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() );
1447 if ( sh.height() <= 20 || sh.width() < 60 ) 1458 if ( sh.height() <= 20 || sh.width() < 60 )
1448 return QSize( sizeHintW, sizeHintH ); 1459 return QSize( sizeHintW, sizeHintH );
@@ -1508,7 +1519,7 @@ QSize KToolBar::sizeHint() const
1508 break; 1519 break;
1509 1520
1510 default: 1521 default:
1511 minSize = QToolBar::sizeHint(); 1522 minSize = Q3ToolBar::sizeHint();
1512 break; 1523 break;
1513 } 1524 }
1514 return minSize; 1525 return minSize;
@@ -1532,19 +1543,19 @@ bool KToolBar::highlight() const
1532 1543
1533void KToolBar::hide() 1544void KToolBar::hide()
1534{ 1545{
1535 QToolBar::hide(); 1546 Q3ToolBar::hide();
1536} 1547}
1537 1548
1538void KToolBar::show() 1549void KToolBar::show()
1539{ 1550{
1540 QToolBar::show(); 1551 Q3ToolBar::show();
1541} 1552}
1542 1553
1543void KToolBar::resizeEvent( QResizeEvent *e ) 1554void KToolBar::resizeEvent( QResizeEvent *e )
1544{ 1555{
1545 bool b = isUpdatesEnabled(); 1556 bool b = isUpdatesEnabled();
1546 setUpdatesEnabled( FALSE ); 1557 setUpdatesEnabled( FALSE );
1547 QToolBar::resizeEvent( e ); 1558 Q3ToolBar::resizeEvent( e );
1548 if (b) 1559 if (b)
1549 d->repaintTimer.start( 100, true ); 1560 d->repaintTimer.start( 100, true );
1550} 1561}
@@ -1726,7 +1737,7 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr
1726 doUpdate = true; 1737 doUpdate = true;
1727 } 1738 }
1728 1739
1729 QMainWindow *mw = mainWindow(); 1740 Q3MainWindow *mw = mainWindow();
1730 1741
1731 // ...and if we should highlight 1742 // ...and if we should highlight
1732 if ( highlight != d->m_highlight ) { 1743 if ( highlight != d->m_highlight ) {
@@ -1805,19 +1816,19 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
1805 else if ( position == "Flat" ) 1816 else if ( position == "Flat" )
1806 pos = DockMinimized; 1817 pos = DockMinimized;
1807*/ 1818*/
1808 QMainWindow::ToolBarDock pos(QMainWindow::Top); 1819 Qt::ToolBarDock pos(Qt::DockTop);
1809 if ( position == "Top" ) 1820 if ( position == "Top" )
1810 pos = QMainWindow::Top; 1821 pos = Qt::Top;
1811 else if ( position == "Bottom" ) 1822 else if ( position == "Bottom" )
1812 pos = QMainWindow::Bottom; 1823 pos = Qt::Bottom;
1813 else if ( position == "Left" ) 1824 else if ( position == "Left" )
1814 pos = QMainWindow::Left; 1825 pos = Qt::Left;
1815 else if ( position == "Right" ) 1826 else if ( position == "Right" )
1816 pos = QMainWindow::Right; 1827 pos = Qt::Right;
1817 else if ( position == "Floating" ) 1828 else if ( position == "Floating" )
1818 pos = QMainWindow::TornOff; 1829 pos = Qt::TornOff;
1819 else if ( position == "Flat" ) 1830 else if ( position == "Flat" )
1820 pos = QMainWindow::Minimized; 1831 pos = Qt::Minimized;
1821 1832
1822 //kdDebug(220) << "KToolBar::applySettings hidden=" << hidden << endl; 1833 //kdDebug(220) << "KToolBar::applySettings hidden=" << hidden << endl;
1823 if (hidden) 1834 if (hidden)
@@ -1827,7 +1838,7 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup)
1827 1838
1828 if ( mainWindow() ) 1839 if ( mainWindow() )
1829 { 1840 {
1830 QMainWindow *mw = mainWindow(); 1841 Q3MainWindow *mw = mainWindow();
1831 1842
1832 //kdDebug(220) << "KToolBar::applySettings updating ToolbarInfo" << endl; 1843 //kdDebug(220) << "KToolBar::applySettings updating ToolbarInfo" << endl;
1833 d->toolBarInfo = KToolBarPrivate::ToolBarInfo( pos, index, newLine, offset ); 1844 d->toolBarInfo = KToolBarPrivate::ToolBarInfo( pos, index, newLine, offset );
@@ -1862,7 +1873,7 @@ bool KToolBar::event( QEvent *e )
1862 return true; 1873 return true;
1863 } 1874 }
1864 1875
1865 return QToolBar::event( e ); 1876 return Q3ToolBar::event( e );
1866} 1877}
1867 1878
1868void KToolBar::slotRepaint() 1879void KToolBar::slotRepaint()
@@ -1880,14 +1891,14 @@ void KToolBar::slotRepaint()
1880 repaint( TRUE ); 1891 repaint( TRUE );
1881} 1892}
1882 1893
1883void KToolBar::toolBarPosChanged( QToolBar *tb ) 1894void KToolBar::toolBarPosChanged( Q3ToolBar *tb )
1884{ 1895{
1885 if ( tb != this ) 1896 if ( tb != this )
1886 return; 1897 return;
1887//US if ( d->oldPos == DockMinimized ) 1898//US if ( d->oldPos == DockMinimized )
1888 if ( d->oldPos == QMainWindow::Minimized ) 1899 if ( d->oldPos == Qt::Minimized )
1889 rebuildLayout(); 1900 rebuildLayout();
1890 d->oldPos = (QMainWindow::ToolBarDock)barPos(); 1901 d->oldPos = (Qt::ToolBarDock)barPos();
1891/*US 1902/*US
1892 if ( mainWindow() && mainWindow()->inherits( "KMainWindow" ) ) 1903 if ( mainWindow() && mainWindow()->inherits( "KMainWindow" ) )
1893 static_cast<KMainWindow *>(mainWindow())->setSettingsDirty(); 1904 static_cast<KMainWindow *>(mainWindow())->setSettingsDirty();
@@ -2031,7 +2042,7 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index )
2031 } 2042 }
2032 2043
2033 if ( mainWindow() ) { 2044 if ( mainWindow() ) {
2034 QMainWindow::ToolBarDock dock; 2045 Qt::ToolBarDock dock;
2035 bool newLine; 2046 bool newLine;
2036 int offset; 2047 int offset;
2037 mainWindow()->getLocation( this, dock, index, newLine, offset ); 2048 mainWindow()->getLocation( this, dock, index, newLine, offset );
@@ -2100,7 +2111,7 @@ void KToolBar::positionYourself( bool force )
2100} 2111}
2101 2112
2102//US KPopupMenu *KToolBar::contextMenu() 2113//US KPopupMenu *KToolBar::contextMenu()
2103QPopupMenu *KToolBar::contextMenu() 2114Q3PopupMenu *KToolBar::contextMenu()
2104{ 2115{
2105 if ( context ) 2116 if ( context )
2106 return context; 2117 return context;
@@ -2108,11 +2119,11 @@ QPopupMenu *KToolBar::contextMenu()
2108 // Construct our context popup menu. Name it qt_dockwidget_internal so it 2119 // Construct our context popup menu. Name it qt_dockwidget_internal so it
2109 // won't be deleted by QToolBar::clear(). 2120 // won't be deleted by QToolBar::clear().
2110//US context = new KPopupMenu( this, "qt_dockwidget_internal" ); 2121//US context = new KPopupMenu( this, "qt_dockwidget_internal" );
2111 context = new QPopupMenu( this, "qt_dockwidget_internal" ); 2122 context = new Q3PopupMenu( this, "qt_dockwidget_internal" );
2112//US context->insertTitle(i18n("Toolbar Menu")); 2123//US context->insertTitle(i18n("Toolbar Menu"));
2113 2124
2114//US KPopupMenu *orient = new KPopupMenu( context, "orient" ); 2125//US KPopupMenu *orient = new KPopupMenu( context, "orient" );
2115 QPopupMenu *orient = new QPopupMenu( context, "orient" ); 2126 Q3PopupMenu *orient = new Q3PopupMenu( context, "orient" );
2116 orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP ); 2127 orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP );
2117 orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT ); 2128 orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT );
2118 orient->insertItem( i18n("toolbar position string","Right"), CONTEXT_RIGHT ); 2129 orient->insertItem( i18n("toolbar position string","Right"), CONTEXT_RIGHT );
@@ -2122,17 +2133,17 @@ QPopupMenu *KToolBar::contextMenu()
2122 orient->insertItem( i18n("min toolbar", "Flat"), CONTEXT_FLAT ); 2133 orient->insertItem( i18n("min toolbar", "Flat"), CONTEXT_FLAT );
2123 2134
2124//US KPopupMenu *mode = new KPopupMenu( context, "mode" ); 2135//US KPopupMenu *mode = new KPopupMenu( context, "mode" );
2125 QPopupMenu *mode = new QPopupMenu( context, "mode" ); 2136 Q3PopupMenu *mode = new Q3PopupMenu( context, "mode" );
2126 mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS ); 2137 mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS );
2127 mode->insertItem( i18n("Text Only"), CONTEXT_TEXT ); 2138 mode->insertItem( i18n("Text Only"), CONTEXT_TEXT );
2128 mode->insertItem( i18n("Text Alongside Icons"), CONTEXT_TEXTRIGHT ); 2139 mode->insertItem( i18n("Text Alongside Icons"), CONTEXT_TEXTRIGHT );
2129 mode->insertItem( i18n("Text Under Icons"), CONTEXT_TEXTUNDER ); 2140 mode->insertItem( i18n("Text Under Icons"), CONTEXT_TEXTUNDER );
2130 2141
2131//US KPopupMenu *size = new KPopupMenu( context, "size" ); 2142//US KPopupMenu *size = new KPopupMenu( context, "size" );
2132 QPopupMenu *size = new QPopupMenu( context, "size" ); 2143 Q3PopupMenu *size = new Q3PopupMenu( context, "size" );
2133 size->insertItem( i18n("Default"), CONTEXT_ICONSIZES ); 2144 size->insertItem( i18n("Default"), CONTEXT_ICONSIZES );
2134 // Query the current theme for available sizes 2145 // Query the current theme for available sizes
2135 QValueList<int> avSizes; 2146 Q3ValueList<int> avSizes;
2136/*US 2147/*US
2137 KIconTheme *theme = KGlobal::instance()->iconLoader()->theme(); 2148 KIconTheme *theme = KGlobal::instance()->iconLoader()->theme();
2138 if (!::qstrcmp(QObject::name(), "mainToolBar")) 2149 if (!::qstrcmp(QObject::name(), "mainToolBar"))
@@ -2145,7 +2156,7 @@ QPopupMenu *KToolBar::contextMenu()
2145 2156
2146 d->iconSizes = avSizes; 2157 d->iconSizes = avSizes;
2147 2158
2148 QValueList<int>::Iterator it; 2159 Q3ValueList<int>::Iterator it;
2149 for (it=avSizes.begin(); it!=avSizes.end(); it++) { 2160 for (it=avSizes.begin(); it!=avSizes.end(); it++) {
2150 QString text; 2161 QString text;
2151 if ( *it < 19 ) 2162 if ( *it < 19 )
@@ -2218,8 +2229,8 @@ void KToolBar::slotContextAboutToShow()
2218 break; 2229 break;
2219 } 2230 }
2220 2231
2221 QValueList<int>::ConstIterator iIt = d->iconSizes.begin(); 2232 Q3ValueList<int>::ConstIterator iIt = d->iconSizes.begin();
2222 QValueList<int>::ConstIterator iEnd = d->iconSizes.end(); 2233 Q3ValueList<int>::ConstIterator iEnd = d->iconSizes.end();
2223 for (; iIt != iEnd; ++iIt ) 2234 for (; iIt != iEnd; ++iIt )
2224 context->setItemChecked( CONTEXT_ICONSIZES + *iIt, false ); 2235 context->setItemChecked( CONTEXT_ICONSIZES + *iIt, false );
2225 2236
diff --git a/microkde/kdeui/ktoolbar.h b/microkde/kdeui/ktoolbar.h
index 3319fa8..4e00abd 100644
--- a/microkde/kdeui/ktoolbar.h
+++ b/microkde/kdeui/ktoolbar.h
@@ -26,27 +26,35 @@
26 26
27#ifndef DESKTOP_VERSION 27#ifndef DESKTOP_VERSION
28#define private public 28#define private public
29#include <qtoolbar.h> 29#include <q3toolbar.h>
30#undef private 30#undef private
31#include <qpe/qpetoolbar.h> 31#include <qpe/qpetoolbar.h>
32#else 32#else
33#include <qtoolbar.h> 33#include <q3toolbar.h>
34#endif 34#endif
35 35
36 36
37#include <qmainwindow.h> 37#include <q3mainwindow.h>
38#include <qcombobox.h> 38#include <qcombobox.h>
39#include <qmap.h> 39#include <qmap.h>
40#include <qptrlist.h> 40#include <q3ptrlist.h>
41//Added by qt3to4:
42#include <QPixmap>
43#include <QResizeEvent>
44#include <Q3PopupMenu>
45#include <QMouseEvent>
46#include <QChildEvent>
47#include <QEvent>
48#include <QShowEvent>
41#include <kglobal.h> 49#include <kglobal.h>
42#include <qguardedptr.h> 50#include <qpointer.h>
43#include <qframe.h> 51#include <q3frame.h>
44#include <qiconset.h> 52#include <qicon.h>
45 53
46class QDomElement; 54class QDomElement;
47class QSize; 55class QSize;
48class QPixmap; 56class QPixmap;
49class QPopupMenu; 57class Q3PopupMenu;
50class QStringList; 58class QStringList;
51class QDomDocument; 59class QDomDocument;
52class QTimer; 60class QTimer;
@@ -63,22 +71,22 @@ class KXMLGUIClient;
63 71
64class KToolBarPrivate; 72class KToolBarPrivate;
65 73
66class KToolBarSeparator : public QFrame 74class KToolBarSeparator : public Q3Frame
67{ 75{
68 Q_OBJECT 76 Q_OBJECT
69public: 77public:
70 KToolBarSeparator( Orientation, bool l, QToolBar *parent, const char* name=0 ); 78 KToolBarSeparator( Qt::Orientation, bool l, Q3ToolBar *parent, const char* name=0 );
71 79
72 QSize sizeHint() const; 80 QSize sizeHint() const;
73 Orientation orientation() const { return orient; } 81 Qt::Orientation orientation() const { return orient; }
74 QSizePolicy sizePolicy() const; 82 QSizePolicy sizePolicy() const;
75 bool showLine() const { return line; } 83 bool showLine() const { return line; }
76public slots: 84public slots:
77 void setOrientation( Orientation ); 85 void setOrientation( Qt::Orientation );
78protected: 86protected:
79 void styleChange( QStyle& ); 87 void styleChange( QStyle& );
80private: 88private:
81 Orientation orient; 89 Qt::Orientation orient;
82 bool line; 90 bool line;
83}; 91};
84 92
@@ -111,10 +119,10 @@ private:
111// porting KToolBar back to Qt2 really needs some strange hacks 119// porting KToolBar back to Qt2 really needs some strange hacks
112 120
113#ifndef DESKTOP_VERSION 121#ifndef DESKTOP_VERSION
114#define QToolBar QPEToolBar 122#define Q3ToolBar QPEToolBar
115#endif 123#endif
116 124
117 class KToolBar : public QToolBar 125 class KToolBar : public Q3ToolBar
118{ 126{
119 Q_OBJECT 127 Q_OBJECT
120 128
@@ -127,7 +135,7 @@ private:
127 Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize ) 135 Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize )
128 Q_PROPERTY( QString text READ text WRITE setText ) 136 Q_PROPERTY( QString text READ text WRITE setText )
129#ifndef DESKTOP_VERSION 137#ifndef DESKTOP_VERSION
130#undef QToolBar 138#undef Q3ToolBar
131#endif 139#endif
132public: 140public:
133 enum IconText{IconOnly = 0, IconTextRight, TextOnly, IconTextBottom}; 141 enum IconText{IconOnly = 0, IconTextRight, TextOnly, IconTextBottom};
@@ -175,7 +183,7 @@ public:
175 * @param honor_style If true, then global settings for IconSize and IconText will be honored 183 * @param honor_style If true, then global settings for IconSize and IconText will be honored
176 * @param readConfig whether to apply the configuration (global and application-specific) 184 * @param readConfig whether to apply the configuration (global and application-specific)
177 */ 185 */
178 KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false, 186 KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false,
179 const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE ); 187 const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE );
180 188
181 /** 189 /**
@@ -193,7 +201,7 @@ public:
193 * @param honor_style If true, then global settings for IconSize and IconText will be honored 201 * @param honor_style If true, then global settings for IconSize and IconText will be honored
194 * @param readConfig whether to apply the configuration (global and application-specific) 202 * @param readConfig whether to apply the configuration (global and application-specific)
195 */ 203 */
196 KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine = false, 204 KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine = false,
197 const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE ); 205 const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE );
198 206
199 virtual ~KToolBar(); 207 virtual ~KToolBar();
@@ -303,7 +311,7 @@ public:
303 * You can add custom popups which inherit @ref QPopupMenu to get popups 311 * You can add custom popups which inherit @ref QPopupMenu to get popups
304 * with tables, drawings etc. Just don't fiddle with events there. 312 * with tables, drawings etc. Just don't fiddle with events there.
305 */ 313 */
306 int insertButton(const QString& icon, int id, QPopupMenu *popup, 314 int insertButton(const QString& icon, int id, Q3PopupMenu *popup,
307 bool enabled, const QString&_text, int index=-1); 315 bool enabled, const QString&_text, int index=-1);
308 316
309 /** 317 /**
@@ -318,7 +326,7 @@ public:
318 * You can add custom popups which inherit @ref QPopupMenu to get popups 326 * You can add custom popups which inherit @ref QPopupMenu to get popups
319 * with tables, drawings etc. Just don't fiddle with events there. 327 * with tables, drawings etc. Just don't fiddle with events there.
320 */ 328 */
321 int insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup, 329 int insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup,
322 bool enabled, const QString&_text, int index=-1); 330 bool enabled, const QString&_text, int index=-1);
323 331
324 /** 332 /**
@@ -359,7 +367,7 @@ public:
359 const char *slot, bool enabled=true, 367 const char *slot, bool enabled=true,
360 const QString& tooltiptext=QString::null, 368 const QString& tooltiptext=QString::null,
361 int size=70, int index=-1, 369 int size=70, int index=-1,
362 QComboBox::Policy policy = QComboBox::AtBottom); 370 QComboBox::Policy policy = QComboBox::InsertAtBottom);
363 371
364 /** 372 /**
365 * Insert a @ref KComboBox with text. 373 * Insert a @ref KComboBox with text.
@@ -375,7 +383,7 @@ public:
375 const char *slot, bool enabled=true, 383 const char *slot, bool enabled=true,
376 const QString& tooltiptext=QString::null, 384 const QString& tooltiptext=QString::null,
377 int size=70, int index=-1, 385 int size=70, int index=-1,
378 QComboBox::Policy policy = QComboBox::AtBottom); 386 QComboBox::Policy policy = QComboBox::InsertAtBottom);
379 387
380 /** 388 /**
381 * Inserts a separator into the toolbar with the given id. 389 * Inserts a separator into the toolbar with the given id.
@@ -465,7 +473,7 @@ public:
465 * 473 *
466 * Can be used while button is visible. 474 * Can be used while button is visible.
467 */ 475 */
468 void setButtonIconSet( int id, const QIconSet& iconset ); 476 void setButtonIconSet( int id, const QIcon& iconset );
469 477
470 /** 478 /**
471 * Sets a delayed popup for a button. 479 * Sets a delayed popup for a button.
@@ -491,7 +499,7 @@ public:
491 * add popups that are already in the menu bar or are submenus of 499 * add popups that are already in the menu bar or are submenus of
492 * other popups. 500 * other popups.
493 */ 501 */
494 void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false); 502 void setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle = false);
495 503
496 /** 504 /**
497 * Turns a button into an autorepeat button. 505 * Turns a button into an autorepeat button.
@@ -1060,7 +1068,7 @@ public:
1060 1068
1061public slots: 1069public slots:
1062 virtual void setIconText( const QString &txt ) 1070 virtual void setIconText( const QString &txt )
1063 { QToolBar::setIconText( txt ); } 1071 { Q3ToolBar::setIconText( txt ); }
1064 void slotRepaint(); 1072 void slotRepaint();
1065 1073
1066protected: 1074protected:
@@ -1077,7 +1085,7 @@ private slots:
1077 void slotReadConfig (); 1085 void slotReadConfig ();
1078 void slotAppearanceChanged(); 1086 void slotAppearanceChanged();
1079 void slotIconChanged(int); 1087 void slotIconChanged(int);
1080 void toolBarPosChanged( QToolBar *tb ); 1088 void toolBarPosChanged( Q3ToolBar *tb );
1081 void slotContextAboutToShow(); 1089 void slotContextAboutToShow();
1082 void widgetDestroyed(); 1090 void widgetDestroyed();
1083 1091
@@ -1090,16 +1098,16 @@ private:
1090 void removeWidgetInternal( QWidget *w ); 1098 void removeWidgetInternal( QWidget *w );
1091 void getAttributes( QString &position, QString &icontext, int &index ); 1099 void getAttributes( QString &position, QString &icontext, int &index );
1092//US KPopupMenu *contextMenu(); 1100//US KPopupMenu *contextMenu();
1093 QPopupMenu *contextMenu(); 1101 Q3PopupMenu *contextMenu();
1094 1102
1095 QMap<QWidget*, int > widget2id; 1103 QMap<QWidget*, int > widget2id;
1096 typedef QMap<int, QWidget* > Id2WidgetMap; 1104 typedef QMap<int, QWidget* > Id2WidgetMap;
1097 Id2WidgetMap id2widget; 1105 Id2WidgetMap id2widget;
1098//US KPopupMenu *context; 1106//US KPopupMenu *context;
1099 QPopupMenu *context; 1107 Q3PopupMenu *context;
1100 QPtrList<QWidget> widgets; 1108 Q3PtrList<QWidget> widgets;
1101 QTimer *layoutTimer; 1109 QTimer *layoutTimer;
1102 QGuardedPtr<QWidget> stretchableWidget, rightAligned; 1110 QPointer<QWidget> stretchableWidget, rightAligned;
1103protected: 1111protected:
1104 virtual void virtual_hook( int id, void* data ); 1112 virtual void virtual_hook( int id, void* data );
1105private: 1113private:
diff --git a/microkde/kdeui/ktoolbarbutton.cpp b/microkde/kdeui/ktoolbarbutton.cpp
index 1d5d0e5..7b98b32 100644
--- a/microkde/kdeui/ktoolbarbutton.cpp
+++ b/microkde/kdeui/ktoolbarbutton.cpp
@@ -33,10 +33,14 @@
33#include <qdrawutil.h> 33#include <qdrawutil.h>
34#include <qtooltip.h> 34#include <qtooltip.h>
35#include <qbitmap.h> 35#include <qbitmap.h>
36#include <qpopupmenu.h> 36#include <q3popupmenu.h>
37#include <qcursor.h> 37#include <qcursor.h>
38#include <qpainter.h> 38#include <qpainter.h>
39#include <qlayout.h> 39#include <qlayout.h>
40//Added by qt3to4:
41#include <QPixmap>
42#include <QMouseEvent>
43#include <QEvent>
40 44
41#include <kapplication.h> 45#include <kapplication.h>
42#include <kdebug.h> 46#include <kdebug.h>
@@ -48,7 +52,7 @@
48// needed to get our instance 52// needed to get our instance
49#include <kmainwindow.h> 53#include <kmainwindow.h>
50 54
51template class QIntDict<KToolBarButton>; 55template class Q3IntDict<KToolBarButton>;
52 56
53class KToolBarButtonPrivate 57class KToolBarButtonPrivate
54{ 58{
@@ -115,7 +119,7 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id,
115 QToolButton::setTextLabel(_txt); 119 QToolButton::setTextLabel(_txt);
116//US d->m_instance = _instance; 120//US d->m_instance = _instance;
117 121
118 setFocusPolicy( NoFocus ); 122 setFocusPolicy( Qt::NoFocus );
119 123
120 // connect all of our slots and start trapping events 124 // connect all of our slots and start trapping events
121 connect(d->m_parent, SIGNAL( modechange() ), 125 connect(d->m_parent, SIGNAL( modechange() ),
@@ -146,7 +150,7 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
146 d->m_parent = (KToolBar *) _parent; 150 d->m_parent = (KToolBar *) _parent;
147 QToolButton::setTextLabel(txt); 151 QToolButton::setTextLabel(txt);
148 152
149 setFocusPolicy( NoFocus ); 153 setFocusPolicy( Qt::NoFocus );
150 154
151 // connect all of our slots and start trapping events 155 // connect all of our slots and start trapping events
152 connect(d->m_parent, SIGNAL( modechange()), 156 connect(d->m_parent, SIGNAL( modechange()),
@@ -161,7 +165,7 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id,
161 installEventFilter(this); 165 installEventFilter(this);
162 166
163 // set our pixmap and do our initial setup 167 // set our pixmap and do our initial setup
164 setIconSet( QIconSet( pixmap )); 168 setIconSet( QIcon( pixmap ));
165 modeChange(); 169 modeChange();
166} 170}
167 171
@@ -292,7 +296,7 @@ void KToolBarButton::setIcon( const QString &icon )
292 QToolButton::setIconSet(KGlobal::iconLoader()->loadIconSet(d->m_iconName)); 296 QToolButton::setIconSet(KGlobal::iconLoader()->loadIconSet(d->m_iconName));
293} 297}
294 298
295void KToolBarButton::setIconSet( const QIconSet &iconset ) 299void KToolBarButton::setIconSet( const QIcon &iconset )
296{ 300{
297 QToolButton::setIconSet( iconset ); 301 QToolButton::setIconSet( iconset );
298} 302}
@@ -305,28 +309,28 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap )
305 QToolButton::setPixmap( pixmap ); 309 QToolButton::setPixmap( pixmap );
306 return; 310 return;
307 } 311 }
308 QIconSet set = iconSet(); 312 QIcon set = iconSet();
309 set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active ); 313 set.setPixmap( pixmap, QIcon::Automatic, QIcon::Active );
310 QToolButton::setIconSet( set ); 314 QToolButton::setIconSet( set );
311} 315}
312 316
313void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap ) 317void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap )
314{ 318{
315 QIconSet set = iconSet(); 319 QIcon set = iconSet();
316 set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Normal ); 320 set.setPixmap( pixmap, QIcon::Automatic, QIcon::Normal );
317 QToolButton::setIconSet( set ); 321 QToolButton::setIconSet( set );
318} 322}
319 323
320void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap ) 324void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap )
321{ 325{
322 QIconSet set = iconSet(); 326 QIcon set = iconSet();
323 set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Disabled ); 327 set.setPixmap( pixmap, QIcon::Automatic, QIcon::Disabled );
324 QToolButton::setIconSet( set ); 328 QToolButton::setIconSet( set );
325} 329}
326 330
327void KToolBarButton::setDefaultIcon( const QString& icon ) 331void KToolBarButton::setDefaultIcon( const QString& icon )
328{ 332{
329 QIconSet set = iconSet(); 333 QIcon set = iconSet();
330 QPixmap pm; 334 QPixmap pm;
331 if (!strcmp(d->m_parent->name(), "mainToolBar")) 335 if (!strcmp(d->m_parent->name(), "mainToolBar"))
332 pm = /*US d->m_instance->iconLoader()*/KGlobal::iconLoader()->loadIcon( icon, KIcon::MainToolbar, 336 pm = /*US d->m_instance->iconLoader()*/KGlobal::iconLoader()->loadIcon( icon, KIcon::MainToolbar,
@@ -334,13 +338,13 @@ void KToolBarButton::setDefaultIcon( const QString& icon )
334 else 338 else
335 pm = /*US d->m_instance->iconLoader()*/KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar, 339 pm = /*US d->m_instance->iconLoader()*/KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar,
336 d->m_iconSize ); 340 d->m_iconSize );
337 set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal ); 341 set.setPixmap( pm, QIcon::Automatic, QIcon::Normal );
338 QToolButton::setIconSet( set ); 342 QToolButton::setIconSet( set );
339} 343}
340 344
341void KToolBarButton::setDisabledIcon( const QString& icon ) 345void KToolBarButton::setDisabledIcon( const QString& icon )
342{ 346{
343 QIconSet set = iconSet(); 347 QIcon set = iconSet();
344 QPixmap pm; 348 QPixmap pm;
345 if (!strcmp(d->m_parent->name(), "mainToolBar")) 349 if (!strcmp(d->m_parent->name(), "mainToolBar"))
346 pm = /*US d->m_instance->iconLoader()*/ KGlobal::iconLoader()->loadIcon( icon, KIcon::MainToolbar, 350 pm = /*US d->m_instance->iconLoader()*/ KGlobal::iconLoader()->loadIcon( icon, KIcon::MainToolbar,
@@ -348,25 +352,25 @@ void KToolBarButton::setDisabledIcon( const QString& icon )
348 else 352 else
349 pm = /*US d->m_instance->iconLoader()*/ KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar, 353 pm = /*US d->m_instance->iconLoader()*/ KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar,
350 d->m_iconSize ); 354 d->m_iconSize );
351 set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled ); 355 set.setPixmap( pm, QIcon::Automatic, QIcon::Disabled );
352 QToolButton::setIconSet( set ); 356 QToolButton::setIconSet( set );
353} 357}
354 358
355QPopupMenu *KToolBarButton::popup() 359QMenu *KToolBarButton::popup()
356{ 360{
357 // obsolete 361 // obsolete
358 // KDE4: remove me 362 // KDE4: remove me
359 return QToolButton::popup(); 363 return QToolButton::popup();
360} 364}
361 365
362void KToolBarButton::setPopup(QPopupMenu *p, bool) 366void KToolBarButton::setPopup(Q3PopupMenu *p, bool)
363{ 367{
364 QToolButton::setPopup(p); 368 QToolButton::setPopup(p);
365 QToolButton::setPopupDelay(1); 369 QToolButton::setPopupDelay(1);
366} 370}
367 371
368 372
369void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool) 373void KToolBarButton::setDelayedPopup (Q3PopupMenu *p, bool)
370{ 374{
371 QToolButton::setPopup(p); 375 QToolButton::setPopup(p);
372//US QToolButton::setPopupDelay(QApplication::startDragTime()); 376//US QToolButton::setPopupDelay(QApplication::startDragTime());
@@ -451,21 +455,27 @@ bool KToolBarButton::eventFilter(QObject *o, QEvent *ev)
451void KToolBarButton::drawButton( QPainter *_painter ) 455void KToolBarButton::drawButton( QPainter *_painter )
452{ 456{
453#ifdef DESKTOP_VERSION 457#ifdef DESKTOP_VERSION
454 QStyle::SFlags flags = QStyle::Style_Default; 458 QStyle::State flags = QStyle::State_None;
455 QStyle::SCFlags active = QStyle::SC_None; 459 QStyle::SubControls active = QStyle::SC_None;
456 460
457 if (isDown()) { 461 if (isDown()) {
458 flags |= QStyle::Style_Down; 462 flags |= QStyle::State_DownArrow;
459 active |= QStyle::SC_ToolButton; 463 active |= QStyle::SC_ToolButton;
460 } 464 }
461 if (isEnabled()) flags |= QStyle::Style_Enabled; 465 if (isEnabled()) flags |= QStyle::State_Enabled;
462 if (isOn()) flags |= QStyle::Style_On; 466 if (isOn()) flags |= QStyle::State_On;
463 if (isEnabled() && d->m_isRaised)flags |= QStyle::Style_Raised; 467 if (isEnabled() && d->m_isRaised)flags |= QStyle::State_Raised;
464 if (hasFocus())flags |= QStyle::Style_HasFocus; 468 if (hasFocus())flags |= QStyle::State_HasFocus;
469
470 QStyleOptionToolButton qsotb;
471 qsotb.initFrom(this);
472 qsotb.state = flags;
473 qsotb.activeSubControls = active;
474 qsotb.rect = rect();
475 qsotb.palette = palette();
465 476
466 // Draw a styled toolbutton 477 // Draw a styled toolbutton
467 style().drawComplexControl(QStyle::CC_ToolButton, _painter, this, rect(), 478 style()->drawComplexControl(QStyle::CC_ToolButton, &qsotb, _painter, this);
468 colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption());
469 479
470#else 480#else
471 style().drawToolButton(_painter, rect().x(), rect().y(), rect().width(), rect().height(), colorGroup()); 481 style().drawToolButton(_painter, rect().x(), rect().y(), rect().width(), rect().height(), colorGroup());
@@ -484,9 +494,9 @@ void KToolBarButton::drawButton( QPainter *_painter )
484 QIconSet::Disabled, 494 QIconSet::Disabled,
485 isOn() ? QIconSet::On : QIconSet::Off ); 495 isOn() ? QIconSet::On : QIconSet::Off );
486*/ 496*/
487 QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic, 497 QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
488 isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) : 498 isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
489 QIconSet::Disabled); 499 QIcon::Disabled);
490 500
491 if( !pixmap.isNull()) 501 if( !pixmap.isNull())
492 { 502 {
@@ -508,9 +518,9 @@ void KToolBarButton::drawButton( QPainter *_painter )
508 QIconSet::Disabled, 518 QIconSet::Disabled,
509 isOn() ? QIconSet::On : QIconSet::Off ); 519 isOn() ? QIconSet::On : QIconSet::Off );
510*/ 520*/
511 QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic, 521 QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
512 isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) : 522 isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
513 QIconSet::Disabled); 523 QIcon::Disabled);
514 524
515 if( !pixmap.isNull()) 525 if( !pixmap.isNull())
516 { 526 {
@@ -526,7 +536,7 @@ void KToolBarButton::drawButton( QPainter *_painter )
526 536
527 if (!textLabel().isNull()) 537 if (!textLabel().isNull())
528 { 538 {
529 textFlags = AlignVCenter|AlignLeft; 539 textFlags = Qt::AlignVCenter|Qt::AlignLeft;
530 if (!pixmap.isNull()) 540 if (!pixmap.isNull())
531 dx = 4 + pixmap.width() + 2; 541 dx = 4 + pixmap.width() + 2;
532 else 542 else
@@ -544,7 +554,7 @@ void KToolBarButton::drawButton( QPainter *_painter )
544 { 554 {
545 if (!textLabel().isNull()) 555 if (!textLabel().isNull())
546 { 556 {
547 textFlags = AlignVCenter|AlignLeft; 557 textFlags = Qt::AlignVCenter|Qt::AlignLeft;
548 dx = (width() - fm.width(textLabel())) / 2; 558 dx = (width() - fm.width(textLabel())) / 2;
549 dy = (height() - fm.lineSpacing()) / 2; 559 dy = (height() - fm.lineSpacing()) / 2;
550 if ( isDown() /*US && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle*/ ) 560 if ( isDown() /*US && style().styleHint(QStyle::SH_GUIStyle) == WindowsStyle*/ )
@@ -563,9 +573,9 @@ void KToolBarButton::drawButton( QPainter *_painter )
563 QIconSet::Disabled, 573 QIconSet::Disabled,
564 isOn() ? QIconSet::On : QIconSet::Off ); 574 isOn() ? QIconSet::On : QIconSet::Off );
565*/ 575*/
566 QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic, 576 QPixmap pixmap = iconSet().pixmap( QIcon::Automatic,
567 isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) : 577 isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) :
568 QIconSet::Disabled); 578 QIcon::Disabled);
569 579
570 if( !pixmap.isNull()) 580 if( !pixmap.isNull())
571 { 581 {
@@ -581,7 +591,7 @@ void KToolBarButton::drawButton( QPainter *_painter )
581 591
582 if (!textLabel().isNull()) 592 if (!textLabel().isNull())
583 { 593 {
584 textFlags = AlignBottom|AlignHCenter; 594 textFlags = Qt::AlignBottom|Qt::AlignHCenter;
585 dx = (width() - fm.width(textLabel())) / 2; 595 dx = (width() - fm.width(textLabel())) / 2;
586 dy = height() - fm.lineSpacing() - 4; 596 dy = height() - fm.lineSpacing() - 4;
587 597
@@ -610,14 +620,18 @@ void KToolBarButton::drawButton( QPainter *_painter )
610 if (QToolButton::popup()) 620 if (QToolButton::popup())
611 { 621 {
612#ifdef DESKTOP_VERSION 622#ifdef DESKTOP_VERSION
613 QStyle::SFlags arrowFlags = QStyle::Style_Default; 623 QStyle::State arrowFlags = QStyle::State_None;
624
625 if (isDown())arrowFlags |= QStyle::State_DownArrow;
626 if (isEnabled()) arrowFlags |= QStyle::State_Enabled;
614 627
615 if (isDown())arrowFlags |= QStyle::Style_Down; 628 QStyleOption qso;
616 if (isEnabled()) arrowFlags |= QStyle::Style_Enabled; 629 qso.initFrom(this);
630 qso.state = arrowFlags;
631 qso.rect = QRect(width()-7, height()-7, 7, 7);
632 qso.palette = palette();
617 633
618 style().drawPrimitive(QStyle::PE_ArrowDown, _painter, 634 style()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &qso, _painter);
619 QRect(width()-7, height()-7, 7, 7), colorGroup(),
620 arrowFlags, QStyleOption() );
621#else 635#else
622 style().drawArrow(_painter, Qt::DownArrow, isDown(), 636 style().drawArrow(_painter, Qt::DownArrow, isDown(),
623 width()-7, height()-7, 7, 7, colorGroup(), isEnabled() ); 637 width()-7, height()-7, 7, 7, colorGroup(), isEnabled() );
diff --git a/microkde/kdeui/ktoolbarbutton.h b/microkde/kdeui/ktoolbarbutton.h
index 9aaa13c..ad02e4e 100644
--- a/microkde/kdeui/ktoolbarbutton.h
+++ b/microkde/kdeui/ktoolbarbutton.h
@@ -26,15 +26,18 @@
26 26
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qtoolbutton.h> 28#include <qtoolbutton.h>
29#include <qintdict.h> 29#include <q3intdict.h>
30#include <qstring.h> 30#include <qstring.h>
31//Added by qt3to4:
32#include <QEvent>
33#include <Q3PopupMenu>
31#include <kglobal.h> 34#include <kglobal.h>
32 35
33class KToolBar; 36class KToolBar;
34class KToolBarButtonPrivate; 37class KToolBarButtonPrivate;
35//USclass KInstance; 38//USclass KInstance;
36class QEvent; 39class QEvent;
37class QPopupMenu; 40class Q3PopupMenu;
38class QPainter; 41class QPainter;
39 42
40/** 43/**
@@ -150,7 +153,7 @@ public:
150 * that set icons or pixmaps. 153 * that set icons or pixmaps.
151 * @param iconset The iconset to use 154 * @param iconset The iconset to use
152 */ 155 */
153 virtual void setIconSet( const QIconSet &iconset ); 156 virtual void setIconSet( const QIcon &iconset );
154 157
155#ifndef KDE_NO_COMPAT 158#ifndef KDE_NO_COMPAT
156 /** 159 /**
@@ -209,7 +212,7 @@ public:
209 /** 212 /**
210 * Return a pointer to this button's popup menu (if it exists) 213 * Return a pointer to this button's popup menu (if it exists)
211 */ 214 */
212 QPopupMenu *popup(); 215 QMenu *popup();
213 216
214 /** 217 /**
215 * Returns the button's id. 218 * Returns the button's id.
@@ -224,7 +227,7 @@ public:
224 * 227 *
225 * @param p The new popup menu 228 * @param p The new popup menu
226 */ 229 */
227 void setPopup (QPopupMenu *p, bool unused = false); 230 void setPopup (Q3PopupMenu *p, bool unused = false);
228 231
229 /** 232 /**
230 * Gives this button a delayed popup menu. 233 * Gives this button a delayed popup menu.
@@ -235,7 +238,7 @@ public:
235 * 238 *
236 * @param p the new popup menu 239 * @param p the new popup menu
237 */ 240 */
238 void setDelayedPopup(QPopupMenu *p, bool unused = false); 241 void setDelayedPopup(Q3PopupMenu *p, bool unused = false);
239 242
240 /** 243 /**
241 * Turn this button into a radio button 244 * Turn this button into a radio button
@@ -303,7 +306,7 @@ private:
303* @internal 306* @internal
304* @version $Id$ 307* @version $Id$
305*/ 308*/
306class KToolBarButtonList : public QIntDict<KToolBarButton> 309class KToolBarButtonList : public Q3IntDict<KToolBarButton>
307{ 310{
308public: 311public:
309 KToolBarButtonList(); 312 KToolBarButtonList();
diff --git a/microkde/kdeui/ktoolbarhandler.cpp b/microkde/kdeui/ktoolbarhandler.cpp
index 7b97233..4d3ace7 100644
--- a/microkde/kdeui/ktoolbarhandler.cpp
+++ b/microkde/kdeui/ktoolbarhandler.cpp
@@ -18,7 +18,9 @@
18 18
19#include "ktoolbarhandler.h" 19#include "ktoolbarhandler.h"
20 20
21#include <qpopupmenu.h> 21#include <q3popupmenu.h>
22//Added by qt3to4:
23#include <Q3PtrList>
22#include <kapplication.h> 24#include <kapplication.h>
23#include <ktoolbar.h> 25#include <ktoolbar.h>
24#include <kmainwindow.h> 26#include <kmainwindow.h>
@@ -44,7 +46,7 @@ namespace
44 class BarActionBuilder 46 class BarActionBuilder
45 { 47 {
46 public: 48 public:
47 BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList ) 49 BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, Q3PtrList<KToolBar> &oldToolBarList )
48 : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) 50 : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false )
49 { 51 {
50/*US 52/*US
@@ -70,16 +72,16 @@ namespace
70 72
71 bool needsRebuild() const { return m_needsRebuild; } 73 bool needsRebuild() const { return m_needsRebuild; }
72 74
73 QPtrList<KAction> create() 75 Q3PtrList<KAction> create()
74 { 76 {
75 if ( !m_needsRebuild ) 77 if ( !m_needsRebuild )
76 return QPtrList<KAction>(); 78 return Q3PtrList<KAction>();
77 79
78 QPtrListIterator<KToolBar> toolBarIt( m_toolBars ); 80 Q3PtrListIterator<KToolBar> toolBarIt( m_toolBars );
79 for ( ; toolBarIt.current(); ++toolBarIt ) 81 for ( ; toolBarIt.current(); ++toolBarIt )
80 handleToolBar( toolBarIt.current() ); 82 handleToolBar( toolBarIt.current() );
81 83
82 QPtrList<KAction> actions; 84 Q3PtrList<KAction> actions;
83 85
84 if ( m_toolBarActions.count() == 0 ) 86 if ( m_toolBarActions.count() == 0 )
85 return actions; 87 return actions;
@@ -91,7 +93,7 @@ namespace
91 93
92 KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); 94 KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" );
93 95
94 QPtrListIterator<KAction> actionIt( m_toolBarActions ); 96 Q3PtrListIterator<KAction> actionIt( m_toolBarActions );
95 for ( ; actionIt.current(); ++actionIt ) 97 for ( ; actionIt.current(); ++actionIt )
96 menuAction->insert( actionIt.current() ); 98 menuAction->insert( actionIt.current() );
97 99
@@ -99,7 +101,7 @@ namespace
99 return actions; 101 return actions;
100 } 102 }
101 103
102 const QPtrList<KToolBar> &toolBars() const { return m_toolBars; } 104 const Q3PtrList<KToolBar> &toolBars() const { return m_toolBars; }
103 105
104 private: 106 private:
105 void handleToolBar( KToolBar *toolBar ) 107 void handleToolBar( KToolBar *toolBar )
@@ -115,8 +117,8 @@ namespace
115 KActionCollection *m_actionCollection; 117 KActionCollection *m_actionCollection;
116 KMainWindow *m_mainWindow; 118 KMainWindow *m_mainWindow;
117 119
118 QPtrList<KToolBar> m_toolBars; 120 Q3PtrList<KToolBar> m_toolBars;
119 QPtrList<KAction> m_toolBarActions; 121 Q3PtrList<KAction> m_toolBarActions;
120 122
121 bool m_needsRebuild : 1; 123 bool m_needsRebuild : 1;
122 }; 124 };
@@ -224,7 +226,7 @@ void ToolBarHandler::init( KMainWindow *mainWindow )
224 226
225void ToolBarHandler::connectToActionContainers() 227void ToolBarHandler::connectToActionContainers()
226{ 228{
227 QPtrListIterator<KAction> actionIt( m_actions ); 229 Q3PtrListIterator<KAction> actionIt( m_actions );
228 for ( ; actionIt.current(); ++actionIt ) 230 for ( ; actionIt.current(); ++actionIt )
229 connectToActionContainer( actionIt.current() ); 231 connectToActionContainer( actionIt.current() );
230} 232}
@@ -239,7 +241,7 @@ void ToolBarHandler::connectToActionContainer( KAction *action )
239void ToolBarHandler::connectToActionContainer( QWidget *container ) 241void ToolBarHandler::connectToActionContainer( QWidget *container )
240{ 242{
241//US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container ); 243//US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container );
242 QPopupMenu *popupMenu = (QPopupMenu *)( container ); 244 Q3PopupMenu *popupMenu = (Q3PopupMenu *)( container );
243 if ( !popupMenu ) 245 if ( !popupMenu )
244 return; 246 return;
245 247
diff --git a/microkde/kdeui/ktoolbarhandler.h b/microkde/kdeui/ktoolbarhandler.h
index a1340ae..35f0d18 100644
--- a/microkde/kdeui/ktoolbarhandler.h
+++ b/microkde/kdeui/ktoolbarhandler.h
@@ -20,8 +20,8 @@
20#define KBARHANDLER_H 20#define KBARHANDLER_H
21 21
22#include <qobject.h> 22#include <qobject.h>
23#include <qguardedptr.h> 23#include <qpointer.h>
24#include <qptrlist.h> 24#include <q3ptrlist.h>
25#include <kxmlguiclient.h> 25#include <kxmlguiclient.h>
26#include <kaction.h> 26#include <kaction.h>
27 27
@@ -57,9 +57,9 @@ private:
57 struct Data; 57 struct Data;
58 Data *d; 58 Data *d;
59 59
60 QGuardedPtr<KMainWindow> m_mainWindow; 60 QPointer<KMainWindow> m_mainWindow;
61 QPtrList<KAction> m_actions; 61 Q3PtrList<KAction> m_actions;
62 QPtrList<KToolBar> m_toolBars; 62 Q3PtrList<KToolBar> m_toolBars;
63}; 63};
64 64
65} // namespace KDEPrivate 65} // namespace KDEPrivate
diff --git a/microkde/kdeui/kxmlguiclient.cpp b/microkde/kdeui/kxmlguiclient.cpp
index 073e30b..8740bde 100644
--- a/microkde/kdeui/kxmlguiclient.cpp
+++ b/microkde/kdeui/kxmlguiclient.cpp
@@ -39,6 +39,8 @@
39#include <kapplication.h> 39#include <kapplication.h>
40 40
41#include <assert.h> 41#include <assert.h>
42//Added by qt3to4:
43#include <Q3PtrList>
42 44
43class KXMLGUIClientPrivate 45class KXMLGUIClientPrivate
44{ 46{
@@ -63,7 +65,7 @@ public:
63//US KXMLGUIFactory *m_factory; 65//US KXMLGUIFactory *m_factory;
64 KXMLGUIClient *m_parent; 66 KXMLGUIClient *m_parent;
65 //QPtrList<KXMLGUIClient> m_supers; 67 //QPtrList<KXMLGUIClient> m_supers;
66 QPtrList<KXMLGUIClient> m_children; 68 Q3PtrList<KXMLGUIClient> m_children;
67//US KXMLGUIBuilder *m_builder; 69//US KXMLGUIBuilder *m_builder;
68//US QString m_xmlFile; 70//US QString m_xmlFile;
69//US QString m_localXMLFile; 71//US QString m_localXMLFile;
@@ -85,7 +87,7 @@ KXMLGUIClient::~KXMLGUIClient()
85 if ( d->m_parent ) 87 if ( d->m_parent )
86 d->m_parent->removeChildClient( this ); 88 d->m_parent->removeChildClient( this );
87 89
88 QPtrListIterator<KXMLGUIClient> it( d->m_children ); 90 Q3PtrListIterator<KXMLGUIClient> it( d->m_children );
89 for ( ; it.current(); ++it ) { 91 for ( ; it.current(); ++it ) {
90 assert( it.current()->d->m_parent == this ); 92 assert( it.current()->d->m_parent == this );
91 it.current()->d->m_parent = 0; 93 it.current()->d->m_parent = 0;
@@ -99,7 +101,7 @@ KAction *KXMLGUIClient::action( const char *name ) const
99{ 101{
100 KAction* act = actionCollection()->action( name ); 102 KAction* act = actionCollection()->action( name );
101 if ( !act ) { 103 if ( !act ) {
102 QPtrListIterator<KXMLGUIClient> childIt( d->m_children ); 104 Q3PtrListIterator<KXMLGUIClient> childIt( d->m_children );
103 for (; childIt.current(); ++childIt ) { 105 for (; childIt.current(); ++childIt ) {
104 act = childIt.current()->actionCollection()->action( name ); 106 act = childIt.current()->actionCollection()->action( name );
105 if ( act ) 107 if ( act )
@@ -588,7 +590,7 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child )
588 return true; 590 return true;
589}*/ 591}*/
590 592
591const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients() 593const Q3PtrList<KXMLGUIClient> *KXMLGUIClient::childClients()
592{ 594{
593 return &d->m_children; 595 return &d->m_children;
594} 596}
@@ -606,7 +608,7 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const
606} 608}
607*/ 609*/
608 610
609void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList ) 611void KXMLGUIClient::plugActionList( const QString &name, const Q3PtrList<KAction> &actionList )
610{ 612{
611/*US 613/*US
612 if ( !d->m_factory ) 614 if ( !d->m_factory )
diff --git a/microkde/kdeui/kxmlguiclient.h b/microkde/kdeui/kxmlguiclient.h
index cd74c8e..b9d7b09 100644
--- a/microkde/kdeui/kxmlguiclient.h
+++ b/microkde/kdeui/kxmlguiclient.h
@@ -21,7 +21,7 @@
21 21
22 22
23//US #include <qdom.h> 23//US #include <qdom.h>
24#include <qptrlist.h> 24#include <q3ptrlist.h>
25#include <qmap.h> 25#include <qmap.h>
26#include <qstringlist.h> 26#include <qstringlist.h>
27 27
@@ -161,7 +161,7 @@ public:
161 /** 161 /**
162 * Retrieves a list of all child clients. 162 * Retrieves a list of all child clients.
163 */ 163 */
164 const QPtrList<KXMLGUIClient> *childClients(); 164 const Q3PtrList<KXMLGUIClient> *childClients();
165 165
166 /** 166 /**
167 * A client can have an own @ref KXMLGUIBuilder. 167 * A client can have an own @ref KXMLGUIBuilder.
@@ -228,7 +228,7 @@ public:
228 * plugActionList() would leave the previous actions in the 228 * plugActionList() would leave the previous actions in the
229 * menu too.. 229 * menu too..
230 */ 230 */
231 void plugActionList( const QString &name, const QPtrList<KAction> &actionList ); 231 void plugActionList( const QString &name, const Q3PtrList<KAction> &actionList );
232 232
233 /** 233 /**
234 * The complement of \ref plugActionList() ... 234 * The complement of \ref plugActionList() ...
diff --git a/microkde/kdialog.cpp b/microkde/kdialog.cpp
index 8398956..57e7ea6 100644
--- a/microkde/kdialog.cpp
+++ b/microkde/kdialog.cpp
@@ -1,10 +1,12 @@
1 1
2#include <kdialog.h> 2#include <kdialog.h>
3#include <qapp.h> 3#include <qapplication.h>
4#include <qlabel.h> 4#include <qlabel.h>
5#include <qpushbutton.h> 5#include <qpushbutton.h>
6#include <qlayout.h> 6#include <qlayout.h>
7#include <qprogressbar.h> 7#include <q3progressbar.h>
8//Added by qt3to4:
9#include <Q3VBoxLayout>
8#include <klocale.h> 10#include <klocale.h>
9 11
10KDialog::KDialog( QWidget *parent, const char *name, bool modal ) : 12KDialog::KDialog( QWidget *parent, const char *name, bool modal ) :
@@ -30,9 +32,9 @@ int KDialog::marginHintSmall() { return 1; }
30KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal ) : 32KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal ) :
31 QDialog( parent, name, modal ) 33 QDialog( parent, name, modal )
32{ 34{
33 QVBoxLayout* lay= new QVBoxLayout ( this ); 35 Q3VBoxLayout* lay= new Q3VBoxLayout ( this );
34 mLabel = new QLabel ( "abc",this ); 36 mLabel = new QLabel ( "abc",this );
35 mBar = new QProgressBar ( this ); 37 mBar = new Q3ProgressBar ( this );
36 mButton = new QPushButton ( i18n("Cancel"),this ); 38 mButton = new QPushButton ( i18n("Cancel"),this );
37 lay->addWidget ( mLabel ); 39 lay->addWidget ( mLabel );
38 lay->addWidget ( mBar ); 40 lay->addWidget ( mBar );
diff --git a/microkde/kdialog.h b/microkde/kdialog.h
index bc80689..5f9bf0e 100644
--- a/microkde/kdialog.h
+++ b/microkde/kdialog.h
@@ -2,8 +2,10 @@
2#define MINIKDE_KDIALOG_H 2#define MINIKDE_KDIALOG_H
3 3
4#include <qdialog.h> 4#include <qdialog.h>
5//Added by qt3to4:
6#include <QLabel>
5class QLabel; 7class QLabel;
6class QProgressBar; 8class Q3ProgressBar;
7class QPushButton ; 9class QPushButton ;
8 10
9class KDialog : public QDialog 11class KDialog : public QDialog
@@ -29,7 +31,7 @@ class KProgressDialog : public QDialog
29 void reject(); 31 void reject();
30 private: 32 private:
31 QLabel * mLabel; 33 QLabel * mLabel;
32 QProgressBar *mBar; 34 Q3ProgressBar *mBar;
33 QPushButton *mButton; 35 QPushButton *mButton;
34 signals: 36 signals:
35 void cancelled (); 37 void cancelled ();
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index d5c7e61..a40bad6 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -1,7 +1,11 @@
1#include <qtabwidget.h> 1#include <qtabwidget.h>
2#include <qpushbutton.h> 2#include <qpushbutton.h>
3#include <qlayout.h> 3#include <qlayout.h>
4#include <qframe.h> 4#include <q3frame.h>
5//Added by qt3to4:
6#include <QPixmap>
7#include <Q3HBoxLayout>
8#include <Q3VBoxLayout>
5 9
6 10
7#include "klocale.h" 11#include "klocale.h"
@@ -135,13 +139,13 @@ void KDialogBase::initLayout()
135{ 139{
136 140
137 delete mTopLayout; 141 delete mTopLayout;
138 mTopLayout = new QVBoxLayout( this ); 142 mTopLayout = new Q3VBoxLayout( this );
139 mTopLayout->setMargin( marginHintSmall() ); 143 mTopLayout->setMargin( marginHintSmall() );
140 mTopLayout->setSpacing( spacingHintSmall() ); 144 mTopLayout->setSpacing( spacingHintSmall() );
141 145
142 mTopLayout->addWidget( mMainWidget ); 146 mTopLayout->addWidget( mMainWidget );
143 147
144 QBoxLayout *buttonLayout = new QHBoxLayout; 148 Q3BoxLayout *buttonLayout = new Q3HBoxLayout;
145 mTopLayout->addLayout( buttonLayout ); 149 mTopLayout->addLayout( buttonLayout );
146 150
147 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button ); 151 if ( mUser1Button ) buttonLayout->addWidget( mUser1Button );
@@ -155,15 +159,15 @@ void KDialogBase::initLayout()
155 buttonLayout->setSpacing( spacingHintSmall() ); 159 buttonLayout->setSpacing( spacingHintSmall() );
156} 160}
157 161
158QFrame *KDialogBase::addPage( const QString &name ) 162Q3Frame *KDialogBase::addPage( const QString &name )
159{ 163{
160// kdDebug() << "KDialogBase::addPage(): " << name << endl; 164// kdDebug() << "KDialogBase::addPage(): " << name << endl;
161 QFrame *frame = new QFrame( tabWidget() ); 165 Q3Frame *frame = new Q3Frame( tabWidget() );
162 tabWidget()->addTab( frame, name ); 166 tabWidget()->addTab( frame, name );
163 return frame; 167 return frame;
164} 168}
165 169
166QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) 170Q3Frame *KDialogBase::addPage( const QString &name, int, const QPixmap & )
167{ 171{
168 return addPage( name ); 172 return addPage( name );
169} 173}
@@ -254,10 +258,10 @@ bool KDialogBase::showPage( int index )
254 tabWidget()->setCurrentPage( index );return false; 258 tabWidget()->setCurrentPage( index );return false;
255} 259}
256 260
257QFrame *KDialogBase::plainPage() 261Q3Frame *KDialogBase::plainPage()
258{ 262{
259 if ( !mPlainPage ) { 263 if ( !mPlainPage ) {
260 mPlainPage = new QFrame( this ); 264 mPlainPage = new Q3Frame( this );
261 setMainWidget( mPlainPage ); 265 setMainWidget( mPlainPage );
262 } 266 }
263 return mPlainPage; 267 return mPlainPage;
diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h
index 17c186b..64cbd17 100644
--- a/microkde/kdialogbase.h
+++ b/microkde/kdialogbase.h
@@ -1,14 +1,16 @@
1#ifndef MINIKDE_KDIALOGBASE_H 1#ifndef MINIKDE_KDIALOGBASE_H
2#define MINIKDE_KDIALOGBASE_H 2#define MINIKDE_KDIALOGBASE_H
3 3
4#include <qframe.h> 4#include <q3frame.h>
5//Added by qt3to4:
6#include <QPixmap>
5 7
6#include "kdialog.h" 8#include "kdialog.h"
7 9
8class QPushButton; 10class QPushButton;
9class QLayout; 11class QLayout;
10class QTabWidget; 12class QTabWidget;
11class QBoxLayout; 13class Q3BoxLayout;
12 14
13class KDialogBase : public KDialog 15class KDialogBase : public KDialog
14{ 16{
@@ -59,8 +61,8 @@ class KDialogBase : public KDialog
59 const QString &user3=QString::null); 61 const QString &user3=QString::null);
60 virtual ~KDialogBase(); 62 virtual ~KDialogBase();
61 63
62 QFrame *addPage( const QString & ); 64 Q3Frame *addPage( const QString & );
63 QFrame *addPage( const QString &, int, const QPixmap & ); 65 Q3Frame *addPage( const QString &, int, const QPixmap & );
64 66
65 void setMainWidget( QWidget *widget ); 67 void setMainWidget( QWidget *widget );
66 68
@@ -77,7 +79,7 @@ class KDialogBase : public KDialog
77 bool showPage( int index ); 79 bool showPage( int index );
78 void hideButtons(); 80 void hideButtons();
79 81
80 QFrame *plainPage(); 82 Q3Frame *plainPage();
81 83
82 signals: 84 signals:
83 void user1Clicked(); 85 void user1Clicked();
@@ -128,8 +130,8 @@ class KDialogBase : public KDialog
128 130
129 QWidget *mMainWidget; 131 QWidget *mMainWidget;
130 QTabWidget *mTabWidget; 132 QTabWidget *mTabWidget;
131 QFrame *mPlainPage; 133 Q3Frame *mPlainPage;
132 QBoxLayout *mTopLayout; 134 Q3BoxLayout *mTopLayout;
133 135
134 QPushButton *mUser1Button; 136 QPushButton *mUser1Button;
135 QPushButton *mUser2Button; 137 QPushButton *mUser2Button;
diff --git a/microkde/keditlistbox.cpp b/microkde/keditlistbox.cpp
index 55b7784..257a44a 100644
--- a/microkde/keditlistbox.cpp
+++ b/microkde/keditlistbox.cpp
@@ -21,10 +21,13 @@
21#include <qstringlist.h> 21#include <qstringlist.h>
22#include <qpushbutton.h> 22#include <qpushbutton.h>
23#include <qlayout.h> 23#include <qlayout.h>
24#include <qgroupbox.h> 24#include <q3groupbox.h>
25#include <qlistbox.h> 25#include <q3listbox.h>
26#include <qwhatsthis.h> 26#include <q3whatsthis.h>
27#include <qlabel.h> 27#include <qlabel.h>
28//Added by qt3to4:
29#include <Q3GridLayout>
30#include <Q3StrList>
28 31
29#include <kcombobox.h> 32#include <kcombobox.h>
30#include <kdebug.h> 33#include <kdebug.h>
@@ -47,14 +50,14 @@ public:
47 50
48KEditListBox::KEditListBox(QWidget *parent, const char *name, 51KEditListBox::KEditListBox(QWidget *parent, const char *name,
49 bool checkAtEntering, int buttons ) 52 bool checkAtEntering, int buttons )
50 :QGroupBox(parent, name ) 53 :Q3GroupBox(parent, name )
51{ 54{
52 init( checkAtEntering, buttons ); 55 init( checkAtEntering, buttons );
53} 56}
54 57
55KEditListBox::KEditListBox(const QString& title, QWidget *parent, 58KEditListBox::KEditListBox(const QString& title, QWidget *parent,
56 const char *name, bool checkAtEntering, int buttons) 59 const char *name, bool checkAtEntering, int buttons)
57 :QGroupBox(title, parent, name ) 60 :Q3GroupBox(title, parent, name )
58{ 61{
59 init( checkAtEntering, buttons ); 62 init( checkAtEntering, buttons );
60} 63}
@@ -62,7 +65,7 @@ KEditListBox::KEditListBox(const QString& title, QWidget *parent,
62KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom, 65KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom,
63 QWidget *parent, const char *name, 66 QWidget *parent, const char *name,
64 bool checkAtEntering, int buttons) 67 bool checkAtEntering, int buttons)
65 :QGroupBox(title, parent, name ) 68 :Q3GroupBox(title, parent, name )
66{ 69{
67 m_lineEdit = custom.lineEdit(); 70 m_lineEdit = custom.lineEdit();
68 init( checkAtEntering, buttons, custom.representationWidget() ); 71 init( checkAtEntering, buttons, custom.representationWidget() );
@@ -95,7 +98,7 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
95 QSizePolicy::MinimumExpanding)); 98 QSizePolicy::MinimumExpanding));
96 99
97 QWidget * gb = this; 100 QWidget * gb = this;
98 QGridLayout * grid = new QGridLayout(gb, 7 - lostButtons, 2, 101 Q3GridLayout * grid = new Q3GridLayout(gb, 7 - lostButtons, 2,
99 KDialog::marginHint(), 102 KDialog::marginHint(),
100 KDialog::spacingHint()); 103 KDialog::spacingHint());
101 grid->addRowSpacing(0, fontMetrics().lineSpacing()); 104 grid->addRowSpacing(0, fontMetrics().lineSpacing());
@@ -109,7 +112,7 @@ void KEditListBox::init( bool checkAtEntering, int buttons,
109 else 112 else
110 m_lineEdit=new KLineEdit(gb); 113 m_lineEdit=new KLineEdit(gb);
111 114
112 m_listBox = new QListBox(gb); 115 m_listBox = new Q3ListBox(gb);
113 116
114 QWidget *editingWidget = representationWidget ? 117 QWidget *editingWidget = representationWidget ?
115 representationWidget : m_lineEdit; 118 representationWidget : m_lineEdit;
@@ -204,7 +207,7 @@ void KEditListBox::moveItemUp()
204 return; 207 return;
205 } 208 }
206 209
207 QListBoxItem *selItem = m_listBox->item(selIndex); 210 Q3ListBoxItem *selItem = m_listBox->item(selIndex);
208 m_listBox->takeItem(selItem); 211 m_listBox->takeItem(selItem);
209 m_listBox->insertItem(selItem, selIndex-1); 212 m_listBox->insertItem(selItem, selIndex-1);
210 m_listBox->setCurrentItem(selIndex - 1); 213 m_listBox->setCurrentItem(selIndex - 1);
@@ -227,7 +230,7 @@ void KEditListBox::moveItemDown()
227 return; 230 return;
228 } 231 }
229 232
230 QListBoxItem *selItem = m_listBox->item(selIndex); 233 Q3ListBoxItem *selItem = m_listBox->item(selIndex);
231 m_listBox->takeItem(selItem); 234 m_listBox->takeItem(selItem);
232 m_listBox->insertItem(selItem, selIndex+1); 235 m_listBox->insertItem(selItem, selIndex+1);
233 m_listBox->setCurrentItem(selIndex + 1); 236 m_listBox->setCurrentItem(selIndex + 1);
@@ -349,14 +352,16 @@ void KEditListBox::insertStringList(const QStringList& list, int index)
349 m_listBox->insertStringList(list,index); 352 m_listBox->insertStringList(list,index);
350} 353}
351 354
352void KEditListBox::insertStrList(const QStrList* list, int index) 355void KEditListBox::insertStrList(const Q3StrList* list, int index)
353{ 356{
354 m_listBox->insertStrList(list,index); 357 for(Q3StrList::const_iterator i=list->begin();i!=list->end();++i)
358 m_listBox->insertItem(*i,index++);
355} 359}
356 360
357void KEditListBox::insertStrList(const QStrList& list, int index) 361void KEditListBox::insertStrList(const Q3StrList& list, int index)
358{ 362{
359 m_listBox->insertStrList(list,index); 363 for(Q3StrList::const_iterator i=list.begin();i!=list.end();++i)
364 m_listBox->insertItem(*i,index++);
360} 365}
361 366
362void KEditListBox::insertStrList(const char ** list, int numStrings, int index) 367void KEditListBox::insertStrList(const char ** list, int numStrings, int index)
diff --git a/microkde/keditlistbox.h b/microkde/keditlistbox.h
index 130d933..e43d958 100644
--- a/microkde/keditlistbox.h
+++ b/microkde/keditlistbox.h
@@ -20,8 +20,10 @@
20#ifndef KEDITLISTBOX_H 20#ifndef KEDITLISTBOX_H
21#define KEDITLISTBOX_H 21#define KEDITLISTBOX_H
22 22
23#include <qgroupbox.h> 23#include <q3groupbox.h>
24#include <qlistbox.h> 24#include <q3listbox.h>
25//Added by qt3to4:
26#include <Q3StrList>
25 27
26class KLineEdit; 28class KLineEdit;
27class KComboBox; 29class KComboBox;
@@ -36,7 +38,7 @@ class KEditListBoxPrivate;
36 * items into the listbox and pushbuttons to add and remove 38 * items into the listbox and pushbuttons to add and remove
37 * items from the listbox and two buttons to move items up and down. 39 * items from the listbox and two buttons to move items up and down.
38 */ 40 */
39class KEditListBox : public QGroupBox 41class KEditListBox : public Q3GroupBox
40{ 42{
41 Q_OBJECT 43 Q_OBJECT
42 44
@@ -126,7 +128,7 @@ public:
126 /** 128 /**
127 * Return a pointer to the embedded QListBox. 129 * Return a pointer to the embedded QListBox.
128 */ 130 */
129 QListBox* listBox() const { return m_listBox; } 131 Q3ListBox* listBox() const { return m_listBox; }
130 /** 132 /**
131 * Return a pointer to the embedded QLineEdit. 133 * Return a pointer to the embedded QLineEdit.
132 */ 134 */
@@ -159,11 +161,11 @@ public:
159 /** 161 /**
160 * See @ref QListBox::insertStringList() 162 * See @ref QListBox::insertStringList()
161 */ 163 */
162 void insertStrList(const QStrList* list, int index=-1); 164 void insertStrList(const Q3StrList* list, int index=-1);
163 /** 165 /**
164 * See @ref QListBox::insertStrList() 166 * See @ref QListBox::insertStrList()
165 */ 167 */
166 void insertStrList(const QStrList& list, int index=-1); 168 void insertStrList(const Q3StrList& list, int index=-1);
167 /** 169 /**
168 * See @ref QListBox::insertStrList() 170 * See @ref QListBox::insertStrList()
169 */ 171 */
@@ -207,7 +209,7 @@ public:
207 void typedSomething(const QString& text); 209 void typedSomething(const QString& text);
208 210
209 private: 211 private:
210 QListBox *m_listBox; 212 Q3ListBox *m_listBox;
211 QPushButton *servUpButton, *servDownButton; 213 QPushButton *servUpButton, *servDownButton;
212 QPushButton *servNewButton, *servRemoveButton; 214 QPushButton *servNewButton, *servRemoveButton;
213 KLineEdit *m_lineEdit; 215 KLineEdit *m_lineEdit;
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp
index 383e711..c1bfdef 100644
--- a/microkde/kfiledialog.cpp
+++ b/microkde/kfiledialog.cpp
@@ -4,6 +4,8 @@
4#include <qdir.h> 4#include <qdir.h>
5#include <qfileinfo.h> 5#include <qfileinfo.h>
6#include <qapplication.h> 6#include <qapplication.h>
7//Added by qt3to4:
8#include <Q3VBoxLayout>
7 9
8#ifndef DESKTOP_VERSION 10#ifndef DESKTOP_VERSION
9//US orig#include <ofileselector.h> 11//US orig#include <ofileselector.h>
@@ -13,7 +15,7 @@ QString KFileDialog::getSaveFileName( const QString & fn,
13{ 15{
14 QString retfile = ""; 16 QString retfile = "";
15 QDialog dia ( par, "input-dialog", true ); 17 QDialog dia ( par, "input-dialog", true );
16 QVBoxLayout lay( &dia ); 18 Q3VBoxLayout lay( &dia );
17 lay.setMargin(7); 19 lay.setMargin(7);
18 lay.setSpacing(7); 20 lay.setSpacing(7);
19 QString file = fn; 21 QString file = fn;
@@ -42,7 +44,7 @@ QString KFileDialog::getOpenFileName( const QString & fn,
42 QString retfile = ""; 44 QString retfile = "";
43 QDialog dia ( par, "input-dialog", true ); 45 QDialog dia ( par, "input-dialog", true );
44 // QLineEdit lab ( &dia ); 46 // QLineEdit lab ( &dia );
45 QVBoxLayout lay( &dia ); 47 Q3VBoxLayout lay( &dia );
46 lay.setMargin(7); 48 lay.setMargin(7);
47 lay.setSpacing(7); 49 lay.setSpacing(7);
48 QString file = fn; 50 QString file = fn;
@@ -66,23 +68,23 @@ QString KFileDialog::getExistingDirectory( const QString & fn,
66} 68}
67#else 69#else
68 70
69#include <qfiledialog.h> 71#include <q3filedialog.h>
70 72
71QString KFileDialog::getSaveFileName( const QString & fn, 73QString KFileDialog::getSaveFileName( const QString & fn,
72 const QString & cap , QWidget * par ) 74 const QString & cap , QWidget * par )
73{ 75{
74 return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); 76 return Q3FileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap );
75} 77}
76QString KFileDialog::getOpenFileName( const QString & fn, 78QString KFileDialog::getOpenFileName( const QString & fn,
77 const QString & cap, QWidget * par ) 79 const QString & cap, QWidget * par )
78{ 80{
79 81
80 return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); 82 return Q3FileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap );
81} 83}
82QString KFileDialog::getExistingDirectory( const QString & fn, 84QString KFileDialog::getExistingDirectory( const QString & fn,
83 const QString & cap, QWidget * par ) 85 const QString & cap, QWidget * par )
84{ 86{
85 return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); 87 return Q3FileDialog::getExistingDirectory( fn, par, "exidtingdir", cap );
86} 88}
87#endif 89#endif
88 90
diff --git a/microkde/kfontdialog.cpp b/microkde/kfontdialog.cpp
index 174123c..f83c2a8 100644
--- a/microkde/kfontdialog.cpp
+++ b/microkde/kfontdialog.cpp
@@ -7,12 +7,14 @@
7#include <qdialog.h> 7#include <qdialog.h>
8#include <qlayout.h> 8#include <qlayout.h>
9#include <qpushbutton.h> 9#include <qpushbutton.h>
10//Added by qt3to4:
11#include <Q3VBoxLayout>
10QFont KFontDialog::getFont( const QFont & f, bool & ok ) 12QFont KFontDialog::getFont( const QFont & f, bool & ok )
11{ 13{
12#ifndef DESKTOP_VERSION 14#ifndef DESKTOP_VERSION
13 QDialog d( 0, "fd", true );; 15 QDialog d( 0, "fd", true );;
14 OFontSelector s ( true, &d, "fontsel"); 16 OFontSelector s ( true, &d, "fontsel");
15 QVBoxLayout l ( &d ); 17 Q3VBoxLayout l ( &d );
16 l.addWidget( &s ); 18 l.addWidget( &s );
17 s.setSelectedFont ( f ); 19 s.setSelectedFont ( f );
18 QPushButton b ( "OK", &d ); 20 QPushButton b ( "OK", &d );
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index 53edd08..9cc5835 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -1,7 +1,8 @@
1#include "kglobal.h" 1#include "kglobal.h"
2#include "kstandarddirs.h" 2#include "kstandarddirs.h"
3#include <qkeycode.h> 3#include <qnamespace.h>
4#include <qapplication.h> 4#include <qapplication.h>
5#include <QDesktopWidget>
5 6
6KLocale *KGlobal::mLocale = 0; 7KLocale *KGlobal::mLocale = 0;
7KConfig *KGlobal::mConfig = 0; 8KConfig *KGlobal::mConfig = 0;
@@ -13,7 +14,7 @@ QString KGlobal::mAppName = "godot";
13KLocale *KGlobal::locale() 14KLocale *KGlobal::locale()
14{ 15{
15 if ( !mLocale ) { 16 if ( !mLocale ) {
16 ASSERT(mAppName); 17 Q_ASSERT(!mAppName.isEmpty());
17 18
18 mLocale = new KLocale();//mAppName); 19 mLocale = new KLocale();//mAppName);
19 } 20 }
diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp
index 2e483e9..1f08255 100644
--- a/microkde/kglobalsettings.cpp
+++ b/microkde/kglobalsettings.cpp
@@ -4,6 +4,7 @@
4#include "kconfigbase.h" 4#include "kconfigbase.h"
5 5
6#include <qapplication.h> 6#include <qapplication.h>
7#include <QDesktopWidget>
7 8
8#ifdef DESKTOP_VERSION 9#ifdef DESKTOP_VERSION
9 QColor KGlobalSettings::mAlternate = QColor( 235, 235, 235 ); 10 QColor KGlobalSettings::mAlternate = QColor( 235, 235, 235 );
diff --git a/microkde/kiconloader.cpp b/microkde/kiconloader.cpp
index 4842d71..e7f657d 100644
--- a/microkde/kiconloader.cpp
+++ b/microkde/kiconloader.cpp
@@ -4,6 +4,8 @@
4 4
5#ifndef DESKTOP_VERSION_OEGEL 5#ifndef DESKTOP_VERSION_OEGEL
6#include <qdir.h> 6#include <qdir.h>
7//Added by qt3to4:
8#include <QPixmap>
7QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, 9QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
8 int, QString *, bool ) const 10 int, QString *, bool ) const
9{ 11{
@@ -14,14 +16,14 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
14 // qDebug("KIconLoader::loadIcon %s -----------", file.latin1()); 16 // qDebug("KIconLoader::loadIcon %s -----------", file.latin1());
15 return pix; 17 return pix;
16} 18}
17QIconSet KIconLoader::loadIconSet( const QString& name) const 19QIcon KIconLoader::loadIconSet( const QString& name) const
18{ 20{
19 QPixmap pixmapLoader; 21 QPixmap pixmapLoader;
20 QString file; 22 QString file;
21 file = iconPath() + name+".png"; 23 file = iconPath() + name+".png";
22 pixmapLoader.load( file ); 24 pixmapLoader.load( file );
23 //qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() ); 25 //qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() );
24 QIconSet is ( pixmapLoader ); 26 QIcon is ( pixmapLoader );
25 return is; 27 return is;
26} 28}
27 29
@@ -77,12 +79,12 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int,
77 return p; 79 return p;
78} 80}
79 81
80QIconSet KIconLoader::loadIconSet( const QString& name) const 82QIcon KIconLoader::loadIconSet( const QString& name) const
81{ 83{
82 QString px = this->iconPath() + "/" + name; 84 QString px = this->iconPath() + "/" + name;
83 85
84 QIconSet is ;//= Resource::loadIconSet( px ); 86 QIcon is ;//= Resource::loadIconSet( px );
85 QIconSet* isPtr = 0;//LR&is; 87 QIcon* isPtr = 0;//LR&is;
86 if (isPtr == 0) 88 if (isPtr == 0)
87 qDebug("KIconLoader::loadIconSet: %s not foun", px.latin1()); 89 qDebug("KIconLoader::loadIconSet: %s not foun", px.latin1());
88 90
diff --git a/microkde/kiconloader.h b/microkde/kiconloader.h
index 68fec4e..2abb667 100644
--- a/microkde/kiconloader.h
+++ b/microkde/kiconloader.h
@@ -4,7 +4,7 @@
4#include <qpixmap.h> 4#include <qpixmap.h>
5#include <qstring.h> 5#include <qstring.h>
6//US 6//US
7#include <qiconset.h> 7#include <qicon.h>
8 8
9class KIcon 9class KIcon
10{ 10{
@@ -34,7 +34,7 @@ class KIconLoader
34 QString setIconPath( const QString &); 34 QString setIconPath( const QString &);
35 QString iconPath( /*US const QString &, int */) const; 35 QString iconPath( /*US const QString &, int */) const;
36 QString iconPath( const QString &, int ) const; 36 QString iconPath( const QString &, int ) const;
37 QIconSet loadIconSet( const QString &name) const; 37 QIcon loadIconSet( const QString &name) const;
38 38
39//US to make this class usable for different applications, we have to add a iconpathvariable 39//US to make this class usable for different applications, we have to add a iconpathvariable
40 private: 40 private:
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp
index ca94570..ce62da7 100644
--- a/microkde/kio/kfile/kurlrequester.cpp
+++ b/microkde/kio/kfile/kurlrequester.cpp
@@ -27,6 +27,8 @@
27//US #include <qtooltip.h> 27//US #include <qtooltip.h>
28 28
29#include <qpushbutton.h> 29#include <qpushbutton.h>
30//Added by qt3to4:
31#include <QPixmap>
30 32
31//US #include <kaccel.h> 33//US #include <kaccel.h>
32//US #include <kcombobox.h> 34//US #include <kcombobox.h>
@@ -182,7 +184,7 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
182*/ 184*/
183 185
184KURLRequester::KURLRequester( QWidget *parent, const char *name ) 186KURLRequester::KURLRequester( QWidget *parent, const char *name )
185 : QHBox( parent, name ) 187 : Q3HBox( parent, name )
186{ 188{
187 d = new KURLRequesterPrivate; 189 d = new KURLRequesterPrivate;
188 init(); 190 init();
@@ -191,7 +193,7 @@ KURLRequester::KURLRequester( QWidget *parent, const char *name )
191 193
192KURLRequester::KURLRequester( const QString& url, QWidget *parent, 194KURLRequester::KURLRequester( const QString& url, QWidget *parent,
193 const char *name ) 195 const char *name )
194 : QHBox( parent, name ) 196 : Q3HBox( parent, name )
195{ 197{
196 d = new KURLRequesterPrivate; 198 d = new KURLRequesterPrivate;
197 init(); 199 init();
@@ -216,8 +218,8 @@ void KURLRequester::init()
216 d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); 218 d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" );
217 219
218 myButton = new KURLDragPushButton( this, "kfile button"); 220 myButton = new KURLDragPushButton( this, "kfile button");
219 QIconSet iconSet = SmallIconSet("fileopen"); 221 QIcon iconSet = SmallIconSet("fileopen");
220 QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); 222 QPixmap pixMap = iconSet.pixmap( QIcon::Small, QIcon::Normal );
221 myButton->setIconSet( iconSet ); 223 myButton->setIconSet( iconSet );
222 myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); 224 myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
223//US QToolTip::add(myButton, i18n("Open file dialog")); 225//US QToolTip::add(myButton, i18n("Open file dialog"));
diff --git a/microkde/kio/kfile/kurlrequester.h b/microkde/kio/kfile/kurlrequester.h
index faa3326..5d4fa11 100644
--- a/microkde/kio/kfile/kurlrequester.h
+++ b/microkde/kio/kfile/kurlrequester.h
@@ -20,7 +20,7 @@
20#ifndef KURLREQUESTER_H 20#ifndef KURLREQUESTER_H
21#define KURLREQUESTER_H 21#define KURLREQUESTER_H
22 22
23#include <qhbox.h> 23#include <q3hbox.h>
24 24
25#include <keditlistbox.h> 25#include <keditlistbox.h>
26//US #include <kfile.h> 26//US #include <kfile.h>
@@ -53,7 +53,7 @@ class QTimer;
53 * @short A widget to request a filename/url from the user 53 * @short A widget to request a filename/url from the user
54 * @author Carsten Pfeiffer <pfeiffer@kde.org> 54 * @author Carsten Pfeiffer <pfeiffer@kde.org>
55 */ 55 */
56class KURLRequester : public QHBox 56class KURLRequester : public Q3HBox
57{ 57{
58 Q_OBJECT 58 Q_OBJECT
59 Q_PROPERTY( QString url READ url WRITE setURL ) 59 Q_PROPERTY( QString url READ url WRITE setURL )
diff --git a/microkde/kio/kio/kdirwatch.cpp b/microkde/kio/kio/kdirwatch.cpp
index 1596d1f..5f07c54 100644
--- a/microkde/kio/kio/kdirwatch.cpp
+++ b/microkde/kio/kio/kdirwatch.cpp
@@ -52,11 +52,13 @@ $Id$
52#include <assert.h> 52#include <assert.h>
53#include <qdir.h> 53#include <qdir.h>
54#include <qfile.h> 54#include <qfile.h>
55#include <qintdict.h> 55#include <q3intdict.h>
56#include <qptrlist.h> 56#include <q3ptrlist.h>
57#include <qsocketnotifier.h> 57#include <qsocketnotifier.h>
58#include <qstringlist.h> 58#include <qstringlist.h>
59#include <qtimer.h> 59#include <qtimer.h>
60//Added by qt3to4:
61#include <Q3CString>
60 62
61#include <kapplication.h> 63#include <kapplication.h>
62#include <kdebug.h> 64#include <kdebug.h>
@@ -184,7 +186,7 @@ KDirWatchPrivate::KDirWatchPrivate()
184//US m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000); 186//US m_nfsPollInterval = config.readNumEntry("NFSPollInterval", 5000);
185//US m_PollInterval = config.readNumEntry("PollInterval", 500); 187//US m_PollInterval = config.readNumEntry("PollInterval", 500);
186 KConfig *config = KGlobal::config(); 188 KConfig *config = KGlobal::config();
187 KConfigGroupSaver saver( config, QCString("DirWatch") ); 189 KConfigGroupSaver saver( config, Q3CString("DirWatch") );
188 190
189 m_nfsPollInterval = config->readNumEntry("NFSPollInterval", 5000); 191 m_nfsPollInterval = config->readNumEntry("NFSPollInterval", 5000);
190 m_PollInterval = config->readNumEntry("PollInterval", 500); 192 m_PollInterval = config->readNumEntry("PollInterval", 500);
@@ -731,7 +733,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance,
731 */ 733 */
732void KDirWatchPrivate::removeEntries( KDirWatch* instance ) 734void KDirWatchPrivate::removeEntries( KDirWatch* instance )
733{ 735{
734 QPtrList<Entry> list; 736 Q3PtrList<Entry> list;
735 int minfreq = 3600000; 737 int minfreq = 3600000;
736 738
737 // put all entries where instance is a client in list 739 // put all entries where instance is a client in list
@@ -1007,7 +1009,7 @@ void KDirWatchPrivate::slotRescan()
1007 delayRemove = true; 1009 delayRemove = true;
1008 1010
1009#ifdef HAVE_DNOTIFY 1011#ifdef HAVE_DNOTIFY
1010 QPtrList<Entry> dList, cList; 1012 Q3PtrList<Entry> dList, cList;
1011 1013
1012 // for DNotify method, 1014 // for DNotify method,
1013 if (rescan_all) 1015 if (rescan_all)
diff --git a/microkde/kio/kio/kdirwatch_p.h b/microkde/kio/kio/kdirwatch_p.h
index 0ab482f..be74f2a 100644
--- a/microkde/kio/kio/kdirwatch_p.h
+++ b/microkde/kio/kio/kdirwatch_p.h
@@ -18,7 +18,7 @@ $Id$
18#include <fam.h> 18#include <fam.h>
19#endif 19#endif
20 20
21#include <qptrlist.h> 21#include <q3ptrlist.h>
22 22
23#include <kdirwatch.h> 23#include <kdirwatch.h>
24 24
@@ -58,9 +58,9 @@ public:
58 entryMode m_mode; 58 entryMode m_mode;
59 bool isDir; 59 bool isDir;
60 // instances interested in events 60 // instances interested in events
61 QPtrList<Client> m_clients; 61 Q3PtrList<Client> m_clients;
62 // nonexistent entries of this directory 62 // nonexistent entries of this directory
63 QPtrList<Entry> m_entries; 63 Q3PtrList<Entry> m_entries;
64 QString path; 64 QString path;
65 65
66 int msecLeft, freq; 66 int msecLeft, freq;
@@ -124,7 +124,7 @@ private:
124 bool useStat(Entry*); 124 bool useStat(Entry*);
125 125
126 bool delayRemove; 126 bool delayRemove;
127 QPtrList<Entry> removeList; 127 Q3PtrList<Entry> removeList;
128 128
129#ifdef HAVE_FAM 129#ifdef HAVE_FAM
130 QSocketNotifier *sn; 130 QSocketNotifier *sn;
@@ -141,7 +141,7 @@ private:
141 int mPipe[2]; 141 int mPipe[2];
142 QTimer mTimer; 142 QTimer mTimer;
143 QSocketNotifier *mSn; 143 QSocketNotifier *mSn;
144 QIntDict<Entry> fd_Entry; 144 Q3IntDict<Entry> fd_Entry;
145 145
146 static void dnotify_handler(int, siginfo_t *si, void *); 146 static void dnotify_handler(int, siginfo_t *si, void *);
147 static void dnotify_sigio_handler(int, siginfo_t *si, void *); 147 static void dnotify_sigio_handler(int, siginfo_t *si, void *);
diff --git a/microkde/klineedit.h b/microkde/klineedit.h
index 70c72d1..9eb749d 100644
--- a/microkde/klineedit.h
+++ b/microkde/klineedit.h
@@ -2,6 +2,8 @@
2#define MINIKDE_KLINEEDIT_H 2#define MINIKDE_KLINEEDIT_H
3 3
4#include <qlineedit.h> 4#include <qlineedit.h>
5//Added by qt3to4:
6#include <QKeyEvent>
5 7
6#ifndef DESKTOP_VERSION 8#ifndef DESKTOP_VERSION
7#include <qpe/qpeapplication.h> 9#include <qpe/qpeapplication.h>
diff --git a/microkde/klineeditdlg.h b/microkde/klineeditdlg.h
index 68e9252..d0004cd 100644
--- a/microkde/klineeditdlg.h
+++ b/microkde/klineeditdlg.h
@@ -7,6 +7,8 @@
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qdialog.h> 8#include <qdialog.h>
9#include <qpushbutton.h> 9#include <qpushbutton.h>
10//Added by qt3to4:
11#include <Q3VBoxLayout>
10 12
11class KLineEditDlg : public QDialog 13class KLineEditDlg : public QDialog
12{ 14{
@@ -15,7 +17,7 @@ class KLineEditDlg : public QDialog
15 QDialog( parent,"lineedit", true ) { 17 QDialog( parent,"lineedit", true ) {
16 QLabel* lab = new QLabel( text, this ); 18 QLabel* lab = new QLabel( text, this );
17 mEdit = new KLineEdit( this ); 19 mEdit = new KLineEdit( this );
18 QVBoxLayout* vl = new QVBoxLayout( this ); 20 Q3VBoxLayout* vl = new Q3VBoxLayout( this );
19 vl->setSpacing(5); 21 vl->setSpacing(5);
20 vl->setMargin(7); 22 vl->setMargin(7);
21 vl->addWidget( lab ); 23 vl->addWidget( lab );
diff --git a/microkde/kresources/configdialog.cpp b/microkde/kresources/configdialog.cpp
index 55253c0..4820faf 100644
--- a/microkde/kresources/configdialog.cpp
+++ b/microkde/kresources/configdialog.cpp
@@ -25,14 +25,17 @@
25#include <kglobal.h> 25#include <kglobal.h>
26#include <kmessagebox.h> 26#include <kmessagebox.h>
27 27
28#include <qgroupbox.h> 28#include <q3groupbox.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qlayout.h> 30#include <qlayout.h>
31#include <qpushbutton.h> 31#include <qpushbutton.h>
32#include <qvbox.h> 32#include <q3vbox.h>
33 33
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qscrollview.h> 35#include <q3scrollview.h>
36//Added by qt3to4:
37#include <Q3VBoxLayout>
38#include <Q3Frame>
36 39
37#include <kbuttonbox.h> 40#include <kbuttonbox.h>
38#include <kdialog.h> 41#include <kdialog.h>
@@ -55,14 +58,14 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
55//US resize( 250, 240 ); 58//US resize( 250, 240 );
56 resize( KMIN(KGlobal::getDesktopWidth(), 250), KMIN(KGlobal::getDesktopHeight(), 240)); 59 resize( KMIN(KGlobal::getDesktopWidth(), 250), KMIN(KGlobal::getDesktopHeight(), 240));
57 60
58 QFrame *main; 61 Q3Frame *main;
59 62
60 main = plainPage(); 63 main = plainPage();
61 64
62 QVBoxLayout *mainLayout = new QVBoxLayout( main, 0, spacingHint() ); 65 Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main, 0, spacingHint() );
63 66
64 67
65 QGroupBox *generalGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); 68 Q3GroupBox *generalGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main );
66 generalGroupBox->layout()->setSpacing( spacingHint() ); 69 generalGroupBox->layout()->setSpacing( spacingHint() );
67 generalGroupBox->setTitle( i18n( "General Settings" ) ); 70 generalGroupBox->setTitle( i18n( "General Settings" ) );
68 71
@@ -82,7 +85,7 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
82 85
83 mainLayout->addWidget( generalGroupBox ); 86 mainLayout->addWidget( generalGroupBox );
84 87
85 QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); 88 Q3GroupBox *resourceGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main );
86 resourceGroupBox->layout()->setSpacing( spacingHint()); 89 resourceGroupBox->layout()->setSpacing( spacingHint());
87 resourceGroupBox->setTitle( i18n( "%1 Resource Settings" ) 90 resourceGroupBox->setTitle( i18n( "%1 Resource Settings" )
88 .arg( factory->typeName( resource->type() ) ) ); 91 .arg( factory->typeName( resource->type() ) ) );
diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp
index fc7a42e..1a9d063 100644
--- a/microkde/kresources/configpage.cpp
+++ b/microkde/kresources/configpage.cpp
@@ -28,7 +28,7 @@ Copyright (c) 2004 Ulf Schenk
28$Id$ 28$Id$
29*/ 29*/
30 30
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32 32
33#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
34#include <qinputdialog.h> 34#include <qinputdialog.h>
@@ -37,6 +37,10 @@ $Id$
37#endif 37#endif
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qlayout.h> 39#include <qlayout.h>
40//Added by qt3to4:
41#include <Q3GridLayout>
42#include <Q3ValueList>
43#include <Q3VBoxLayout>
40#include <kapplication.h> 44#include <kapplication.h>
41#include <kcombobox.h> 45#include <kcombobox.h>
42#include <kdebug.h> 46#include <kdebug.h>
@@ -61,11 +65,11 @@ $Id$
61 65
62using namespace KRES; 66using namespace KRES;
63 67
64class ConfigViewItem : public QCheckListItem 68class ConfigViewItem : public Q3CheckListItem
65{ 69{
66 public: 70 public:
67 ConfigViewItem( QListView *parent, Resource* resource ) : 71 ConfigViewItem( Q3ListView *parent, Resource* resource ) :
68 QCheckListItem( parent, resource->resourceName(), CheckBox ), 72 Q3CheckListItem( parent, resource->resourceName(), CheckBox ),
69 mResource( resource ), 73 mResource( resource ),
70 mIsStandard( false ) 74 mIsStandard( false )
71 { 75 {
@@ -97,13 +101,13 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
97{ 101{
98 setCaption( i18n( "Resource Configuration" ) ); 102 setCaption( i18n( "Resource Configuration" ) );
99 103
100 QVBoxLayout *mainLayout = new QVBoxLayout( this ); 104 Q3VBoxLayout *mainLayout = new Q3VBoxLayout( this );
101 105
102 QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this ); 106 Q3GroupBox *groupBox = new Q3GroupBox( i18n( "Resources" ), this );
103 groupBox->setColumnLayout(0, Qt::Vertical ); 107 groupBox->setColumnLayout(0, Qt::Vertical );
104 groupBox->layout()->setSpacing( 3 ); 108 groupBox->layout()->setSpacing( 3 );
105 groupBox->layout()->setMargin( 5 ); 109 groupBox->layout()->setMargin( 5 );
106 QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 ); 110 Q3GridLayout *groupBoxLayout = new Q3GridLayout( groupBox->layout(), 4, 2 );
107 111
108//US mFamilyCombo = new KComboBox( false, groupBox ); 112//US mFamilyCombo = new KComboBox( false, groupBox );
109 mFamilyCombo = new KComboBox( groupBox ); 113 mFamilyCombo = new KComboBox( groupBox );
@@ -145,8 +149,8 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
145 SLOT( slotFamilyChanged( int ) ) ); 149 SLOT( slotFamilyChanged( int ) ) );
146 connect( mListView, SIGNAL( selectionChanged() ), 150 connect( mListView, SIGNAL( selectionChanged() ),
147 SLOT( slotSelectionChanged() ) ); 151 SLOT( slotSelectionChanged() ) );
148 connect( mListView, SIGNAL( clicked( QListViewItem * ) ), 152 connect( mListView, SIGNAL( clicked( Q3ListViewItem * ) ),
149 SLOT( slotItemClicked( QListViewItem * ) ) ); 153 SLOT( slotItemClicked( Q3ListViewItem * ) ) );
150 154
151 mLastItem = 0; 155 mLastItem = 0;
152 156
@@ -159,7 +163,7 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name )
159 163
160ConfigPage::~ConfigPage() 164ConfigPage::~ConfigPage()
161{ 165{
162 QValueList<ResourcePageInfo>::Iterator it; 166 Q3ValueList<ResourcePageInfo>::Iterator it;
163 for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) { 167 for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) {
164 (*it).mManager->removeListener( this ); 168 (*it).mManager->removeListener( this );
165 delete (*it).mManager; 169 delete (*it).mManager;
@@ -230,7 +234,7 @@ void ConfigPage::save()
230{ 234{
231 saveResourceSettings(); 235 saveResourceSettings();
232 236
233 QValueList<ResourcePageInfo>::Iterator it; 237 Q3ValueList<ResourcePageInfo>::Iterator it;
234 for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) 238 for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it )
235 (*it).mManager->writeConfig( (*it).mConfig ); 239 (*it).mManager->writeConfig( (*it).mConfig );
236 240
@@ -341,7 +345,7 @@ void ConfigPage::slotAdd()
341 // as standard resource 345 // as standard resource
342 if ( !resource->readOnly() ) { 346 if ( !resource->readOnly() ) {
343 bool onlyReadOnly = true; 347 bool onlyReadOnly = true;
344 QListViewItem *it = mListView->firstChild(); 348 Q3ListViewItem *it = mListView->firstChild();
345 while ( it != 0 ) { 349 while ( it != 0 ) {
346 ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it ); 350 ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it );
347 if ( !confIt->readOnly() && confIt != item ) 351 if ( !confIt->readOnly() && confIt != item )
@@ -366,7 +370,7 @@ void ConfigPage::slotRemove()
366 if ( !mCurrentManager ) 370 if ( !mCurrentManager )
367 return; 371 return;
368 372
369 QListViewItem *item = mListView->currentItem(); 373 Q3ListViewItem *item = mListView->currentItem();
370 ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item ); 374 ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item );
371 375
372 if ( !confItem ) 376 if ( !confItem )
@@ -393,7 +397,7 @@ void ConfigPage::slotEdit()
393 if ( !mCurrentManager ) 397 if ( !mCurrentManager )
394 return; 398 return;
395 399
396 QListViewItem *item = mListView->currentItem(); 400 Q3ListViewItem *item = mListView->currentItem();
397 ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); 401 ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item );
398 if ( !configItem ) 402 if ( !configItem )
399 return; 403 return;
@@ -435,7 +439,7 @@ void ConfigPage::slotStandard()
435 return; 439 return;
436 } 440 }
437 441
438 QListViewItem *it = mListView->firstChild(); 442 Q3ListViewItem *it = mListView->firstChild();
439 while ( it != 0 ) { 443 while ( it != 0 ) {
440 ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it ); 444 ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it );
441 if ( configItem->standard() ) 445 if ( configItem->standard() )
@@ -482,7 +486,7 @@ void ConfigPage::resourceDeleted( Resource* resource )
482 qDebug("ConfigPage::resourceDeleted : %s", resource->resourceName().latin1()); 486 qDebug("ConfigPage::resourceDeleted : %s", resource->resourceName().latin1());
483} 487}
484 488
485void ConfigPage::slotItemClicked( QListViewItem *item ) 489void ConfigPage::slotItemClicked( Q3ListViewItem *item )
486{ 490{
487 ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item ); 491 ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item );
488 if ( !configItem ) return; 492 if ( !configItem ) return;
@@ -504,7 +508,7 @@ void ConfigPage::saveResourceSettings()
504 508
505 if ( mCurrentManager ) { 509 if ( mCurrentManager ) {
506 510
507 QListViewItem *item = mListView->firstChild(); 511 Q3ListViewItem *item = mListView->firstChild();
508 while ( item ) { 512 while ( item ) {
509 ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); 513 ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item );
510 514
diff --git a/microkde/kresources/configpage.h b/microkde/kresources/configpage.h
index be9239e..dc1aa50 100644
--- a/microkde/kresources/configpage.h
+++ b/microkde/kresources/configpage.h
@@ -25,13 +25,15 @@
25 25
26#include <qstringlist.h> 26#include <qstringlist.h>
27#include <qwidget.h> 27#include <qwidget.h>
28//Added by qt3to4:
29#include <Q3ValueList>
28 30
29#include "manager.h" 31#include "manager.h"
30 32
31class KComboBox; 33class KComboBox;
32class KListView; 34class KListView;
33 35
34class QListViewItem; 36class Q3ListViewItem;
35class QPushButton; 37class QPushButton;
36 38
37 39
@@ -73,7 +75,7 @@ class ConfigPage : public QWidget, public ManagerListener<Resource>
73 virtual void resourceDeleted( Resource* resource ); 75 virtual void resourceDeleted( Resource* resource );
74 76
75 protected slots: 77 protected slots:
76 void slotItemClicked( QListViewItem * ); 78 void slotItemClicked( Q3ListViewItem * );
77 79
78 signals: 80 signals:
79 void changed( bool ); 81 void changed( bool );
@@ -86,7 +88,7 @@ class ConfigPage : public QWidget, public ManagerListener<Resource>
86 KConfig* mConfig; 88 KConfig* mConfig;
87 QString mFamily; 89 QString mFamily;
88 QStringList mFamilyMap; 90 QStringList mFamilyMap;
89 QValueList<ResourcePageInfo> mInfoMap; 91 Q3ValueList<ResourcePageInfo> mInfoMap;
90 92
91 KComboBox* mFamilyCombo; 93 KComboBox* mFamilyCombo;
92 KListView* mListView; 94 KListView* mListView;
@@ -95,7 +97,7 @@ class ConfigPage : public QWidget, public ManagerListener<Resource>
95 QPushButton* mEditButton; 97 QPushButton* mEditButton;
96 QPushButton* mStandardButton; 98 QPushButton* mStandardButton;
97 99
98 QListViewItem* mLastItem; 100 Q3ListViewItem* mLastItem;
99 static const QString syncfamily; 101 static const QString syncfamily;
100}; 102};
101 103
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index 86b22b2..4f286d1 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -41,8 +41,8 @@
41#endif 41#endif
42using namespace KRES; 42using namespace KRES;
43 43
44QDict<Factory> *Factory::mSelves = 0; 44Q3Dict<Factory> *Factory::mSelves = 0;
45static KStaticDeleter< QDict<Factory> > staticDeleter; 45static KStaticDeleter< Q3Dict<Factory> > staticDeleter;
46 46
47Factory *Factory::self( const QString& resourceFamily) 47Factory *Factory::self( const QString& resourceFamily)
48{ 48{
@@ -51,7 +51,7 @@ Factory *Factory::self( const QString& resourceFamily)
51 Factory *factory = 0; 51 Factory *factory = 0;
52 if ( !mSelves ) 52 if ( !mSelves )
53 { 53 {
54 mSelves = staticDeleter.setObject( new QDict<Factory> ); 54 mSelves = staticDeleter.setObject( new Q3Dict<Factory> );
55 } 55 }
56 56
57 factory = mSelves->find( resourceFamily ); 57 factory = mSelves->find( resourceFamily );
diff --git a/microkde/kresources/factory.h b/microkde/kresources/factory.h
index ea01b23..709fde0 100644
--- a/microkde/kresources/factory.h
+++ b/microkde/kresources/factory.h
@@ -24,7 +24,7 @@
24#ifndef KRESOURCES_FACTORY_H 24#ifndef KRESOURCES_FACTORY_H
25#define KRESOURCES_FACTORY_H 25#define KRESOURCES_FACTORY_H
26 26
27#include <qdict.h> 27#include <q3dict.h>
28#include <qstring.h> 28#include <qstring.h>
29 29
30#include <kconfig.h> 30#include <kconfig.h>
@@ -114,7 +114,7 @@ class Factory
114 Factory( const QString& resourceFamily); 114 Factory( const QString& resourceFamily);
115 115
116 private: 116 private:
117 static QDict<Factory> *mSelves; 117 static Q3Dict<Factory> *mSelves;
118 118
119 QString mResourceFamily; 119 QString mResourceFamily;
120//US QMap<QString, KService::Ptr> mTypeMap; 120//US QMap<QString, KService::Ptr> mTypeMap;
diff --git a/microkde/kresources/kcmkresources.cpp b/microkde/kresources/kcmkresources.cpp
index d600a31..f5eb826 100644
--- a/microkde/kresources/kcmkresources.cpp
+++ b/microkde/kresources/kcmkresources.cpp
@@ -20,6 +20,9 @@
20*/ 20*/
21 21
22#include <qlayout.h> 22#include <qlayout.h>
23//Added by qt3to4:
24#include <Q3VBoxLayout>
25#include <Q3Frame>
23 26
24//US #include <kaboutdata.h> 27//US #include <kaboutdata.h>
25//US #include <kgenericfactory.h> 28//US #include <kgenericfactory.h>
@@ -40,9 +43,9 @@ KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringLi
40 : KDialogBase( parent, name, true, i18n( "Configure Resources" ), 43 : KDialogBase( parent, name, true, i18n( "Configure Resources" ),
41 Ok|Cancel, Ok, true ) 44 Ok|Cancel, Ok, true )
42{ 45{
43 QFrame *main = plainPage(); 46 Q3Frame *main = plainPage();
44 47
45 QVBoxLayout *layout = new QVBoxLayout( main ); 48 Q3VBoxLayout *layout = new Q3VBoxLayout( main );
46 mConfigPage = new KRES::ConfigPage( main ); 49 mConfigPage = new KRES::ConfigPage( main );
47 layout->addWidget( mConfigPage ); 50 layout->addWidget( mConfigPage );
48 51
diff --git a/microkde/kresources/manager.h b/microkde/kresources/manager.h
index 69062da..88705d4 100644
--- a/microkde/kresources/manager.h
+++ b/microkde/kresources/manager.h
@@ -32,8 +32,10 @@ $Id$
32#ifndef KRESOURCES_MANAGER_H 32#ifndef KRESOURCES_MANAGER_H
33#define KRESOURCES_MANAGER_H 33#define KRESOURCES_MANAGER_H
34 34
35#include <qdict.h> 35#include <q3dict.h>
36#include <qstringlist.h> 36#include <qstringlist.h>
37//Added by qt3to4:
38#include <Q3PtrList>
37 39
38#include "factory.h" 40#include "factory.h"
39#include "managerimpl.h" 41#include "managerimpl.h"
@@ -175,7 +177,7 @@ class Manager : private ManagerImplListener
175 mImpl = new ManagerImpl( family ); 177 mImpl = new ManagerImpl( family );
176 mImpl->setListener( this ); 178 mImpl->setListener( this );
177 179
178 mListeners = new QPtrList<ManagerListener<T> >; 180 mListeners = new Q3PtrList<ManagerListener<T> >;
179 } 181 }
180 182
181 virtual ~Manager() 183 virtual ~Manager()
@@ -330,7 +332,7 @@ class Manager : private ManagerImplListener
330 private: 332 private:
331 ManagerImpl *mImpl; 333 ManagerImpl *mImpl;
332 Factory *mFactory; 334 Factory *mFactory;
333 QPtrList<ManagerListener<T> > *mListeners; 335 Q3PtrList<ManagerListener<T> > *mListeners;
334}; 336};
335 337
336} 338}
diff --git a/microkde/kresources/managerimpl.cpp b/microkde/kresources/managerimpl.cpp
index a6d2007..4c0751c 100644
--- a/microkde/kresources/managerimpl.cpp
+++ b/microkde/kresources/managerimpl.cpp
@@ -35,6 +35,8 @@ $Id$
35#include <kconfig.h> 35#include <kconfig.h>
36#include <kstandarddirs.h> 36#include <kstandarddirs.h>
37#include <qfile.h> 37#include <qfile.h>
38//Added by qt3to4:
39#include <Q3PtrList>
38 40
39#include "resource.h" 41#include "resource.h"
40#include "factory.h" 42#include "factory.h"
@@ -232,9 +234,9 @@ Resource::List *ManagerImpl::resourceList()
232 return &mResources; 234 return &mResources;
233} 235}
234 236
235QPtrList<Resource> ManagerImpl::resources() 237Q3PtrList<Resource> ManagerImpl::resources()
236{ 238{
237 QPtrList<Resource> result; 239 Q3PtrList<Resource> result;
238 240
239 Resource::List::ConstIterator it; 241 Resource::List::ConstIterator it;
240 for ( it = mResources.begin(); it != mResources.end(); ++it ) { 242 for ( it = mResources.begin(); it != mResources.end(); ++it ) {
@@ -243,9 +245,9 @@ QPtrList<Resource> ManagerImpl::resources()
243 return result; 245 return result;
244} 246}
245 247
246QPtrList<Resource> ManagerImpl::resources( bool active ) 248Q3PtrList<Resource> ManagerImpl::resources( bool active )
247{ 249{
248 QPtrList<Resource> result; 250 Q3PtrList<Resource> result;
249 251
250 Resource::List::ConstIterator it; 252 Resource::List::ConstIterator it;
251 for ( it = mResources.begin(); it != mResources.end(); ++it ) { 253 for ( it = mResources.begin(); it != mResources.end(); ++it ) {
diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h
index 56a2db6..1f728e5 100644
--- a/microkde/kresources/managerimpl.h
+++ b/microkde/kresources/managerimpl.h
@@ -32,8 +32,8 @@ $Id$
32#define KRESOURCES_MANAGERIMPL_H 32#define KRESOURCES_MANAGERIMPL_H
33 33
34#include <qstring.h> 34#include <qstring.h>
35#include <qptrlist.h> 35#include <q3ptrlist.h>
36#include <qdict.h> 36#include <q3dict.h>
37//US 37//US
38#include <qobject.h> 38#include <qobject.h>
39 39
@@ -81,10 +81,10 @@ class ManagerImpl : public QObject
81 81
82 Resource::List *resourceList(); 82 Resource::List *resourceList();
83 83
84 QPtrList<Resource> resources(); 84 Q3PtrList<Resource> resources();
85 85
86 // Get only active or passive resources 86 // Get only active or passive resources
87 QPtrList<Resource> resources( bool active ); 87 Q3PtrList<Resource> resources( bool active );
88 88
89 QStringList resourceNames(); 89 QStringList resourceNames();
90 90
diff --git a/microkde/kresources/resource.h b/microkde/kresources/resource.h
index ed5af96..1f9527c 100644
--- a/microkde/kresources/resource.h
+++ b/microkde/kresources/resource.h
@@ -28,7 +28,7 @@
28#include <qmutex.h> 28#include <qmutex.h>
29#endif //QT_THREAD_SUPPORT 29#endif //QT_THREAD_SUPPORT
30 30
31#include <qvaluelist.h> 31#include <q3valuelist.h>
32#include <qwidget.h> 32#include <qwidget.h>
33 33
34#include <qobject.h> 34#include <qobject.h>
@@ -239,7 +239,7 @@ class Resource : public QObject
239 Q_OBJECT 239 Q_OBJECT
240 240
241 public: 241 public:
242 typedef QValueList<Resource *> List; 242 typedef Q3ValueList<Resource *> List;
243 243
244 /** 244 /**
245 * Constructor. Construct resource from config. 245 * Constructor. Construct resource from config.
diff --git a/microkde/kresources/selectdialog.cpp b/microkde/kresources/selectdialog.cpp
index fba8648..d5b83e9 100644
--- a/microkde/kresources/selectdialog.cpp
+++ b/microkde/kresources/selectdialog.cpp
@@ -34,9 +34,13 @@
34//US 34//US
35#include <kglobal.h> 35#include <kglobal.h>
36 36
37#include <qlistbox.h> 37#include <q3listbox.h>
38#include <qlayout.h> 38#include <qlayout.h>
39#include <qgroupbox.h> 39#include <q3groupbox.h>
40//Added by qt3to4:
41#include <Q3VBoxLayout>
42#include <Q3Frame>
43#include <Q3PtrList>
40 44
41#include "resource.h" 45#include "resource.h"
42 46
@@ -46,7 +50,7 @@ using namespace KRES;
46 50
47//US I am using KBaseDialog instead of KDialog 51//US I am using KBaseDialog instead of KDialog
48//US : KDialog( parent, name, true ) 52//US : KDialog( parent, name, true )
49SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, 53SelectDialog::SelectDialog( Q3PtrList<Resource> list, QWidget *parent,
50 const char *name ) 54 const char *name )
51 : KDialogBase( parent, name, true, i18n( "Resource Selection" ), Help | Ok | Cancel, 55 : KDialogBase( parent, name, true, i18n( "Resource Selection" ), Help | Ok | Cancel,
52 Ok, true) 56 Ok, true)
@@ -57,7 +61,7 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
57 resize( KMIN(KGlobal::getDesktopWidth(), 300), KMIN(KGlobal::getDesktopHeight(), 200) ); 61 resize( KMIN(KGlobal::getDesktopWidth(), 300), KMIN(KGlobal::getDesktopHeight(), 200) );
58 62
59//US 63//US
60 QFrame *main = plainPage(); 64 Q3Frame *main = plainPage();
61/*US 65/*US
62 QVBoxLayout *layout = new QVBoxLayout( main ); 66 QVBoxLayout *layout = new QVBoxLayout( main );
63 mConfigPage = new KRES::ConfigPage( main ); 67 mConfigPage = new KRES::ConfigPage( main );
@@ -65,15 +69,15 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
65*/ 69*/
66 70
67//US QVBoxLayout *mainLayout = new QVBoxLayout( this ); 71//US QVBoxLayout *mainLayout = new QVBoxLayout( this );
68 QVBoxLayout *mainLayout = new QVBoxLayout( main ); 72 Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main );
69 mainLayout->setMargin( marginHint() ); 73 mainLayout->setMargin( marginHint() );
70 74
71//US QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this ); 75//US QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this );
72 QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, main ); 76 Q3GroupBox *groupBox = new Q3GroupBox( 2, Qt::Horizontal, main );
73 groupBox->setTitle( i18n( "Resources" ) ); 77 groupBox->setTitle( i18n( "Resources" ) );
74 78
75//US mResourceId = new KListBox( groupBox ); 79//US mResourceId = new KListBox( groupBox );
76 mResourceId = new QListBox( groupBox ); 80 mResourceId = new Q3ListBox( groupBox );
77 81
78 mainLayout->addWidget( groupBox ); 82 mainLayout->addWidget( groupBox );
79 83
@@ -101,7 +105,7 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent,
101 } 105 }
102 106
103 mResourceId->setCurrentItem( 0 ); 107 mResourceId->setCurrentItem( 0 );
104 connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)), 108 connect( mResourceId, SIGNAL(returnPressed(Q3ListBoxItem*)),
105 SLOT(accept()) ); 109 SLOT(accept()) );
106} 110}
107 111
@@ -113,7 +117,7 @@ Resource *SelectDialog::resource()
113 return 0; 117 return 0;
114} 118}
115 119
116Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent ) 120Resource *SelectDialog::getResource( Q3PtrList<Resource> list, QWidget *parent )
117{ 121{
118 if ( list.count() == 0 ) { 122 if ( list.count() == 0 ) {
119 KMessageBox::error( parent, i18n( "There is no resource available!" ) ); 123 KMessageBox::error( parent, i18n( "There is no resource available!" ) );
diff --git a/microkde/kresources/selectdialog.h b/microkde/kresources/selectdialog.h
index 7026212..be5152b 100644
--- a/microkde/kresources/selectdialog.h
+++ b/microkde/kresources/selectdialog.h
@@ -25,13 +25,13 @@
25#define KRESOURCES_SELECTDIALOG_H 25#define KRESOURCES_SELECTDIALOG_H
26 26
27#include <qobject.h> 27#include <qobject.h>
28#include <qptrlist.h> 28#include <q3ptrlist.h>
29#include <qmap.h> 29#include <qmap.h>
30 30
31#include <kdialogbase.h> 31#include <kdialogbase.h>
32 32
33//US class KListBox; 33//US class KListBox;
34class QListBox; 34class Q3ListBox;
35 35
36namespace KRES { 36namespace KRES {
37 37
@@ -62,7 +62,7 @@ class SelectDialog : KDialogBase
62 * @param parent The parent widget 62 * @param parent The parent widget
63 * @param name The name of the dialog 63 * @param name The name of the dialog
64 */ 64 */
65 SelectDialog( QPtrList<Resource> list, QWidget *parent = 0, 65 SelectDialog( Q3PtrList<Resource> list, QWidget *parent = 0,
66 const char *name = 0); 66 const char *name = 0);
67 67
68 // ~SelectDialog(); 68 // ~SelectDialog();
@@ -76,11 +76,11 @@ class SelectDialog : KDialogBase
76 * Open a dialog showing the available resources and return the resource the 76 * Open a dialog showing the available resources and return the resource the
77 * user has selected. Returns 0, if the dialog was canceled. 77 * user has selected. Returns 0, if the dialog was canceled.
78 */ 78 */
79 static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 ); 79 static Resource *getResource( Q3PtrList<Resource> list, QWidget *parent = 0 );
80 80
81 private: 81 private:
82//US KListBox *mResourceId; 82//US KListBox *mResourceId;
83 QListBox *mResourceId; 83 Q3ListBox *mResourceId;
84 84
85 QMap<int, Resource*> mResourceMap; 85 QMap<int, Resource*> mResourceMap;
86}; 86};
diff --git a/microkde/ksystemtray.cpp b/microkde/ksystemtray.cpp
index 4f81d02..0d0045f 100644
--- a/microkde/ksystemtray.cpp
+++ b/microkde/ksystemtray.cpp
@@ -1,4 +1,7 @@
1#include "ksystemtray.h" 1#include "ksystemtray.h"
2//Added by qt3to4:
3#include <QMouseEvent>
4#include <QLabel>
2 5
3void KSystemTray::mousePressEvent( QMouseEvent *) 6void KSystemTray::mousePressEvent( QMouseEvent *)
4{ 7{
diff --git a/microkde/ksystemtray.h b/microkde/ksystemtray.h
index f3e4f6a..6708c86 100644
--- a/microkde/ksystemtray.h
+++ b/microkde/ksystemtray.h
@@ -2,6 +2,8 @@
2#define MICROKDE_KSYSTEMTRAY_H 2#define MICROKDE_KSYSTEMTRAY_H
3 3
4#include <qlabel.h> 4#include <qlabel.h>
5//Added by qt3to4:
6#include <QMouseEvent>
5 7
6class KSystemTray : public QLabel 8class KSystemTray : public QLabel
7{ 9{
diff --git a/microkde/ktempfile.cpp b/microkde/ktempfile.cpp
index b9166bd..d61d22e 100644
--- a/microkde/ktempfile.cpp
+++ b/microkde/ktempfile.cpp
@@ -1,4 +1,4 @@
1#include <qtextstream.h> 1#include <q3textstream.h>
2 2
3#include "ktempfile.h" 3#include "ktempfile.h"
4 4
@@ -19,7 +19,7 @@ QString KTempFile::name()
19 return QString::null; 19 return QString::null;
20} 20}
21 21
22QTextStream *KTempFile::textStream() 22Q3TextStream *KTempFile::textStream()
23{ 23{
24 return 0; 24 return 0;
25} 25}
diff --git a/microkde/ktempfile.h b/microkde/ktempfile.h
index 20dfa82..1ac7258 100644
--- a/microkde/ktempfile.h
+++ b/microkde/ktempfile.h
@@ -3,7 +3,7 @@
3 3
4#include <qstring.h> 4#include <qstring.h>
5 5
6class QTextStream; 6class Q3TextStream;
7 7
8class KTempFile 8class KTempFile
9{ 9{
@@ -14,7 +14,7 @@ class KTempFile
14 void setAutoDelete( bool ); 14 void setAutoDelete( bool );
15 QString name(); 15 QString name();
16 16
17 QTextStream *textStream(); 17 Q3TextStream *textStream();
18}; 18};
19 19
20#endif 20#endif
diff --git a/microkde/ktextedit.cpp b/microkde/ktextedit.cpp
index 4dd6875..d74706b 100644
--- a/microkde/ktextedit.cpp
+++ b/microkde/ktextedit.cpp
@@ -2,10 +2,12 @@
2#include <ktextedit.h> 2#include <ktextedit.h>
3#ifndef DESKTOP_VERSION 3#ifndef DESKTOP_VERSION
4#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
5//Added by qt3to4:
6#include <QMouseEvent>
5#endif 7#endif
6 8
7 9
8KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent ) 10KTextEdit::KTextEdit ( QWidget *parent ) : Q3MultiLineEdit( parent )
9{ 11{
10 mAllowPopupMenu = false; 12 mAllowPopupMenu = false;
11 mMouseDown = false; 13 mMouseDown = false;
@@ -17,14 +19,14 @@ KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent )
17 19
18void KTextEdit::mousePressEvent(QMouseEvent *e) 20void KTextEdit::mousePressEvent(QMouseEvent *e)
19{ 21{
20 if ( e->button() == LeftButton ) { 22 if ( e->button() == Qt::LeftButton ) {
21 mAllowPopupMenu = true; 23 mAllowPopupMenu = true;
22 mYMousePos = mapToGlobal( (e->pos())).y(); 24 mYMousePos = mapToGlobal( (e->pos())).y();
23 mXMousePos = mapToGlobal( (e->pos())).x(); 25 mXMousePos = mapToGlobal( (e->pos())).x();
24 } 26 }
25 if ( e->button() == RightButton && !mAllowPopupMenu ) 27 if ( e->button() == Qt::RightButton && !mAllowPopupMenu )
26 return; 28 return;
27 if ( e->button() == LeftButton ) { 29 if ( e->button() == Qt::LeftButton ) {
28 if ( hasMarkedText () ) 30 if ( hasMarkedText () )
29 mIgnoreMark = !mIgnoreMark; 31 mIgnoreMark = !mIgnoreMark;
30 if ( mIgnoreMark && hasMarkedText () ) { 32 if ( mIgnoreMark && hasMarkedText () ) {
@@ -32,12 +34,12 @@ void KTextEdit::mousePressEvent(QMouseEvent *e)
32 return ; 34 return ;
33 } 35 }
34 } 36 }
35 QMultiLineEdit::mousePressEvent( e ); 37 Q3MultiLineEdit::mousePressEvent( e );
36} 38}
37 39
38void KTextEdit::mouseReleaseEvent(QMouseEvent *e) 40void KTextEdit::mouseReleaseEvent(QMouseEvent *e)
39{ 41{
40 QMultiLineEdit::mouseReleaseEvent(e); 42 Q3MultiLineEdit::mouseReleaseEvent(e);
41} 43}
42 44
43void KTextEdit::mouseMoveEvent(QMouseEvent *e) 45void KTextEdit::mouseMoveEvent(QMouseEvent *e)
@@ -48,6 +50,6 @@ void KTextEdit::mouseMoveEvent(QMouseEvent *e)
48 if ( diff2 < 0 ) diff2 = -diff2; 50 if ( diff2 < 0 ) diff2 = -diff2;
49 if ( diff+ diff2 > 20 ) 51 if ( diff+ diff2 > 20 )
50 mAllowPopupMenu = false; 52 mAllowPopupMenu = false;
51 QMultiLineEdit::mouseMoveEvent(e); 53 Q3MultiLineEdit::mouseMoveEvent(e);
52} 54}
53 55
diff --git a/microkde/ktextedit.h b/microkde/ktextedit.h
index 87c0602..b7c8924 100644
--- a/microkde/ktextedit.h
+++ b/microkde/ktextedit.h
@@ -1,9 +1,11 @@
1#ifndef MICROKDE_KTEXTEDIT_H 1#ifndef MICROKDE_KTEXTEDIT_H
2#define MICROKDE_KTEXTEDIT_H 2#define MICROKDE_KTEXTEDIT_H
3 3
4#include <qmultilineedit.h> 4#include <q3multilineedit.h>
5//Added by qt3to4:
6#include <QMouseEvent>
5 7
6class KTextEdit : public QMultiLineEdit 8class KTextEdit : public Q3MultiLineEdit
7{ 9{
8 public: 10 public:
9 KTextEdit( QWidget *parent ) ; 11 KTextEdit( QWidget *parent ) ;
diff --git a/microkde/kurl.cpp b/microkde/kurl.cpp
index 2574e25..122ad71 100644
--- a/microkde/kurl.cpp
+++ b/microkde/kurl.cpp
@@ -34,13 +34,15 @@
34#else 34#else
35#include <unistd.h> 35#include <unistd.h>
36#endif 36#endif
37#include <qurl.h> 37#include <q3url.h>
38#include <qdir.h> 38#include <qdir.h>
39#include <qstringlist.h> 39#include <qstringlist.h>
40#include <qregexp.h> 40#include <qregexp.h>
41//US#include <qstylesheet.h> 41//US#include <qstylesheet.h>
42#include <qmap.h> 42#include <qmap.h>
43#include <qtextcodec.h> 43#include <qtextcodec.h>
44//Added by qt3to4:
45#include <Q3CString>
44 46
45static const QString fileProt = "file"; 47static const QString fileProt = "file";
46 48
@@ -57,7 +59,7 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h
57 else 59 else
58 encode_string = "<>#@\"&%?={}|^~[]\'`\\:+"; 60 encode_string = "<>#@\"&%?={}|^~[]\'`\\:+";
59 61
60 QCString local; 62 Q3CString local;
61 if (encoding_hint==0) 63 if (encoding_hint==0)
62 local = segment.local8Bit(); 64 local = segment.local8Bit();
63 else 65 else
@@ -100,7 +102,7 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h
100 102
101 } 103 }
102 else 104 else
103 new_segment[ new_length++ ] = local[i]; 105 new_segment[ new_length++ ] = character;
104 } 106 }
105 107
106 QString result = QString(new_segment, new_length); 108 QString result = QString(new_segment, new_length);
@@ -205,7 +207,7 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
205 if (!textCodec) 207 if (!textCodec)
206 textCodec = QTextCodec::codecForLocale(); 208 textCodec = QTextCodec::codecForLocale();
207 209
208 QCString csegment = textCodec->fromUnicode(segment); 210 Q3CString csegment = textCodec->fromUnicode(segment);
209 // Check if everything went ok 211 // Check if everything went ok
210 if (textCodec->toUnicode(csegment) != segment) 212 if (textCodec->toUnicode(csegment) != segment)
211 { 213 {
@@ -278,7 +280,7 @@ static void decode( const QString& segment, QString &decoded, QString &encoded,
278 array.setRawData(new_segment, new_length); 280 array.setRawData(new_segment, new_length);
279 decoded = textCodec->toUnicode( array, new_length ); 281 decoded = textCodec->toUnicode( array, new_length );
280 array.resetRawData(new_segment, new_length); 282 array.resetRawData(new_segment, new_length);
281 QCString validate = textCodec->fromUnicode(decoded); 283 Q3CString validate = textCodec->fromUnicode(decoded);
282 284
283 if (strcmp(validate.data(), new_segment) != 0) 285 if (strcmp(validate.data(), new_segment) != 0)
284 { 286 {
@@ -419,7 +421,7 @@ KURL::KURL( const char * url, int encoding_hint )
419 parse( QString::fromLatin1(url), encoding_hint ); 421 parse( QString::fromLatin1(url), encoding_hint );
420} 422}
421 423
422KURL::KURL( const QCString& url, int encoding_hint ) 424KURL::KURL( const Q3CString& url, int encoding_hint )
423{ 425{
424 reset(); 426 reset();
425 parse( QString::fromLatin1(url), encoding_hint ); 427 parse( QString::fromLatin1(url), encoding_hint );
@@ -460,7 +462,7 @@ QDataStream & operator>> (QDataStream & s, KURL & a)
460} 462}
461 463
462#ifndef QT_NO_NETWORKPROTOCOL 464#ifndef QT_NO_NETWORKPROTOCOL
463KURL::KURL( const QUrl &u ) 465KURL::KURL( const Q3Url &u )
464{ 466{
465 *this = u; 467 *this = u;
466} 468}
@@ -589,13 +591,13 @@ void KURL::parse( const QString& _url, int encoding_hint )
589 QChar x = buf[pos++]; 591 QChar x = buf[pos++];
590 if ( x == '/' ) 592 if ( x == '/' )
591 goto Node9; 593 goto Node9;
592 if ( !isalpha( (int)x ) ) 594 if ( !x.isLetter() )
593 goto NodeErr; 595 goto NodeErr;
594 596
595 // Node 2: Accept any amount of (alpha|digit|'+'|'-') 597 // Node 2: Accept any amount of (alpha|digit|'+'|'-')
596 // '.' is not currently accepted, because current KURL may be confused. 598 // '.' is not currently accepted, because current KURL may be confused.
597 // Proceed with :// :/ or : 599 // Proceed with :// :/ or :
598 while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || 600 while( pos < len && ( buf[pos].isLetter() || buf[pos].isDigit() ||
599 buf[pos] == '+' || buf[pos] == '-')) pos++; 601 buf[pos] == '+' || buf[pos] == '-')) pos++;
600 602
601 if ( pos+2 < len && buf[pos] == ':' && buf[pos+1] == '/' && buf[pos+2] == '/' ) 603 if ( pos+2 < len && buf[pos] == ':' && buf[pos+1] == '/' && buf[pos+2] == '/' )
@@ -769,11 +771,11 @@ void KURL::parse( const QString& _url, int encoding_hint )
769 if ( pos == len ) 771 if ( pos == len )
770 goto NodeErr; 772 goto NodeErr;
771 start = pos; 773 start = pos;
772 if ( !isdigit( buf[pos++] ) ) 774 if ( !buf[pos++].isDigit() )
773 goto NodeErr; 775 goto NodeErr;
774 776
775 // Node 8b: Accept any amount of digits 777 // Node 8b: Accept any amount of digits
776 while( pos < len && isdigit( buf[pos] ) ) pos++; 778 while( pos < len && buf[pos].isDigit() ) pos++;
777 port = QString( buf + start, pos - start ); 779 port = QString( buf + start, pos - start );
778 m_iPort = port.toUShort(); 780 m_iPort = port.toUShort();
779 if ( pos == len ) 781 if ( pos == len )
@@ -848,7 +850,7 @@ KURL& KURL::operator=( const char * _url )
848} 850}
849 851
850#ifndef QT_NO_NETWORKPROTOCOL 852#ifndef QT_NO_NETWORKPROTOCOL
851KURL& KURL::operator=( const QUrl & u ) 853KURL& KURL::operator=( const Q3Url & u )
852{ 854{
853 m_strProtocol = u.protocol(); 855 m_strProtocol = u.protocol();
854 m_strUser = u.user(); 856 m_strUser = u.user();
@@ -1374,7 +1376,7 @@ KURL KURL::join( const KURL::List & lst )
1374 KURL u(*it); 1376 KURL u(*it);
1375 if (it != first) 1377 if (it != first)
1376 { 1378 {
1377 if (!u.m_strRef_encoded) u.m_strRef_encoded = tmp.url(); 1379 if (u.m_strRef_encoded.isEmpty()) u.m_strRef_encoded = tmp.url();
1378 else u.m_strRef_encoded += "#" + tmp.url(); // Support more than one suburl thingy 1380 else u.m_strRef_encoded += "#" + tmp.url(); // Support more than one suburl thingy
1379 } 1381 }
1380 tmp = u; 1382 tmp = u;
@@ -1418,7 +1420,7 @@ QString KURL::fileName( bool _strip_trailing_slash ) const
1418 // unencoded one. 1420 // unencoded one.
1419 int i = m_strPath_encoded.findRev( '/', len - 1 ); 1421 int i = m_strPath_encoded.findRev( '/', len - 1 );
1420 QString fileName_encoded = m_strPath_encoded.mid(i+1); 1422 QString fileName_encoded = m_strPath_encoded.mid(i+1);
1421 n += fileName_encoded.contains("%2f", false); 1423 n += fileName_encoded.count("%2f", Qt::CaseInsensitive);
1422 } 1424 }
1423 int i = len; 1425 int i = len;
1424 do { 1426 do {
diff --git a/microkde/kurl.h b/microkde/kurl.h
index cd65a1c..016eb24 100644
--- a/microkde/kurl.h
+++ b/microkde/kurl.h
@@ -21,9 +21,11 @@
21#define __kurl_h__ "$Id$" 21#define __kurl_h__ "$Id$"
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qvaluelist.h> 24#include <q3valuelist.h>
25//Added by qt3to4:
26#include <Q3CString>
25 27
26class QUrl; 28class Q3Url;
27class QStringList; 29class QStringList;
28template <typename K, typename V> class QMap; 30template <typename K, typename V> class QMap;
29 31
@@ -64,7 +66,7 @@ public:
64 * @see KURL 66 * @see KURL
65 * @see QValueList 67 * @see QValueList
66 */ 68 */
67 class List : public QValueList<KURL> 69 class List : public Q3ValueList<KURL>
68 { 70 {
69 public: 71 public:
70 /** 72 /**
@@ -135,7 +137,7 @@ public:
135 * @param encoding_hint MIB of original encoding of URL. 137 * @param encoding_hint MIB of original encoding of URL.
136 * @see QTextCodec::mibEnum() 138 * @see QTextCodec::mibEnum()
137 */ 139 */
138 KURL( const QCString& url, int encoding_hint = 0 ); 140 KURL( const Q3CString& url, int encoding_hint = 0 );
139 /** 141 /**
140 * Copy constructor. 142 * Copy constructor.
141 * @param u the KURL to copy 143 * @param u the KURL to copy
@@ -145,7 +147,7 @@ public:
145 * Converts from a @ref QUrl. 147 * Converts from a @ref QUrl.
146 * @param u the QUrl 148 * @param u the QUrl
147 */ 149 */
148 KURL( const QUrl &u ); 150 KURL( const Q3Url &u );
149 /** 151 /**
150 * Constructor allowing relative URLs. 152 * Constructor allowing relative URLs.
151 * 153 *
@@ -658,7 +660,7 @@ public:
658 KURL& operator=( const KURL& _u ); 660 KURL& operator=( const KURL& _u );
659 KURL& operator=( const QString& _url ); 661 KURL& operator=( const QString& _url );
660 KURL& operator=( const char * _url ); 662 KURL& operator=( const char * _url );
661 KURL& operator=( const QUrl & u ); 663 KURL& operator=( const Q3Url & u );
662 664
663 bool operator==( const KURL& _u ) const; 665 bool operator==( const KURL& _u ) const;
664 bool operator==( const QString& _u ) const; 666 bool operator==( const QString& _u ) const;
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp
index 9c87682..88f17e5 100644
--- a/microkde/kutils/kcmultidialog.cpp
+++ b/microkde/kutils/kcmultidialog.cpp
@@ -19,10 +19,12 @@
19 19
20*/ 20*/
21 21
22#include <qhbox.h> 22#include <q3hbox.h>
23#include <qvbox.h> 23#include <q3vbox.h>
24#include <qcursor.h> 24#include <qcursor.h>
25#include <qlayout.h> 25#include <qlayout.h>
26//Added by qt3to4:
27#include <QPixmap>
26 28
27#include <klocale.h> 29#include <klocale.h>
28#include <kglobal.h> 30#include <kglobal.h>
@@ -73,7 +75,7 @@ void KCMultiDialog::slotDefault()
73 75
74 int curPageIndex = activePageIndex(); 76 int curPageIndex = activePageIndex();
75 77
76 QPtrListIterator<KCModule> it(modules); 78 Q3PtrListIterator<KCModule> it(modules);
77 for (; it.current(); ++it) 79 for (; it.current(); ++it)
78 { 80 {
79 if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) 81 if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex)
@@ -91,7 +93,7 @@ void KCMultiDialog::accept()
91} 93}
92void KCMultiDialog::slotApply() 94void KCMultiDialog::slotApply()
93{ 95{
94 QPtrListIterator<KCModule> it(modules); 96 Q3PtrListIterator<KCModule> it(modules);
95 for (; it.current(); ++it) 97 for (; it.current(); ++it)
96 (*it)->save(); 98 (*it)->save();
97 clientChanged(false); 99 clientChanged(false);
@@ -105,7 +107,7 @@ void KCMultiDialog::slotOk()
105{ 107{
106qDebug("KCMultiDialog::slotOk clicked"); 108qDebug("KCMultiDialog::slotOk clicked");
107 109
108 QPtrListIterator<KCModule> it(modules); 110 Q3PtrListIterator<KCModule> it(modules);
109 for (; it.current(); ++it) 111 for (; it.current(); ++it)
110 (*it)->save(); 112 (*it)->save();
111 QDialog::accept(); 113 QDialog::accept();
@@ -153,9 +155,9 @@ void KCMultiDialog::addModule(const QString& path, bool withfallback)
153 slotAboutToShow(page); 155 slotAboutToShow(page);
154} 156}
155*/ 157*/
156QVBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) 158Q3VBox * KCMultiDialog::getNewVBoxPage( const QString & modulename )
157{ 159{
158 QVBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() ); 160 Q3VBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() );
159 return page; 161 return page;
160 162
161} 163}
diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h
index 66412ac..78f8a00 100644
--- a/microkde/kutils/kcmultidialog.h
+++ b/microkde/kutils/kcmultidialog.h
@@ -22,8 +22,8 @@
22#ifndef KCMULTIDIALOG_H 22#ifndef KCMULTIDIALOG_H
23#define KCMULTIDIALOG_H 23#define KCMULTIDIALOG_H
24 24
25#include <qptrlist.h> 25#include <q3ptrlist.h>
26#include <qptrdict.h> 26#include <q3ptrdict.h>
27 27
28#include <kdialogbase.h> 28#include <kdialogbase.h>
29#include <kjanuswidget.h> 29#include <kjanuswidget.h>
@@ -75,7 +75,7 @@ public:
75 75
76//US special method for microkde. We do not want to load everything dynamically. 76//US special method for microkde. We do not want to load everything dynamically.
77 void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); 77 void addModule(KCModule* module );//, const QString& modulename, const QString& iconname);
78 QVBox* getNewVBoxPage(const QString & modulename) ; 78 Q3VBox* getNewVBoxPage(const QString & modulename) ;
79 79
80 80
81 bool showPage( int index ); 81 bool showPage( int index );
@@ -133,7 +133,7 @@ private:
133 bool withfallback; 133 bool withfallback;
134 }; 134 };
135*/ 135*/
136 QPtrList<KCModule> modules; 136 Q3PtrList<KCModule> modules;
137/* 137/*
138 QPtrDict<LoadInfo> moduleDict; 138 QPtrDict<LoadInfo> moduleDict;
139 QString _docPath; 139 QString _docPath;
diff --git a/microkde/microkde.pro b/microkde/microkde.pro
index 7120bdd..4ff06a3 100644
--- a/microkde/microkde.pro
+++ b/microkde/microkde.pro
@@ -6,7 +6,7 @@ include( ../variables.pri )
6INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio 6INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio
7#LIBS += -lqtcompat 7#LIBS += -lqtcompat
8 8
9 TARGET = microkde 9 TARGET = xmicrokde
10DESTDIR= ../bin 10DESTDIR= ../bin
11DEFINES += DESKTOP_VERSION KDE_QT_ONLY 11DEFINES += DESKTOP_VERSION KDE_QT_ONLY
12unix : { 12unix : {
@@ -178,3 +178,5 @@ KDGanttMinimizeSplitter.cpp \
178 kdecore/kprefs.cpp \ 178 kdecore/kprefs.cpp \
179 kdecore/klibloader.cpp \ 179 kdecore/klibloader.cpp \
180 kidmanager.cpp 180 kidmanager.cpp
181#The following line was inserted by qt3to4
182QT += xml qt3support
diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro
index 8fe2bd5..514e7b3 100644
--- a/microkde/microkdeE.pro
+++ b/microkde/microkdeE.pro
@@ -7,7 +7,7 @@ LIBS += -lmicroqtcompat -L$(QPEDIR)/lib
7 7
8DEFINES += KDE_QT_ONLY 8DEFINES += KDE_QT_ONLY
9 9
10 TARGET = microkde 10 TARGET = xmicrokde
11OBJECTS_DIR = obj/$(PLATFORM) 11OBJECTS_DIR = obj/$(PLATFORM)
12MOC_DIR = moc/$(PLATFORM) 12MOC_DIR = moc/$(PLATFORM)
13DESTDIR=$(QPEDIR)/lib 13DESTDIR=$(QPEDIR)/lib
diff --git a/microkde/ofileselector_p.cpp b/microkde/ofileselector_p.cpp
index f4f112e..0f95c84 100644
--- a/microkde/ofileselector_p.cpp
+++ b/microkde/ofileselector_p.cpp
@@ -265,7 +265,7 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st
265 btn->setIconSet( Resource::loadPixmap("cardmon/pcmcia") ); 265 btn->setIconSet( Resource::loadPixmap("cardmon/pcmcia") );
266 266
267 /* let's fill device parts */ 267 /* let's fill device parts */
268 QPopupMenu* pop = new QPopupMenu(this); 268 Q3PopupMenu* pop = new Q3PopupMenu(this);
269 connect(pop, SIGNAL( activated(int) ), 269 connect(pop, SIGNAL( activated(int) ),
270 this, SLOT(slotFSActivated(int) ) ); 270 this, SLOT(slotFSActivated(int) ) );
271 271
diff --git a/microkde/ofileselector_p.h b/microkde/ofileselector_p.h
index 834fd70..a7d97fe 100644
--- a/microkde/ofileselector_p.h
+++ b/microkde/ofileselector_p.h
@@ -137,7 +137,7 @@ private:
137 QMap<QString, QString> m_dev; 137 QMap<QString, QString> m_dev;
138 bool m_all : 1; 138 bool m_all : 1;
139 OFileSelector* m_sel; 139 OFileSelector* m_sel;
140 QPopupMenu* m_fsPop; 140 Q3PopupMenu* m_fsPop;
141 bool compliesMime( const QString& ); 141 bool compliesMime( const QString& );
142 QStringList m_mimes; // used in compy mime 142 QStringList m_mimes; // used in compy mime
143 QString m_currentDir; 143 QString m_currentDir;
diff --git a/microkde/qlayoutengine_p.h b/microkde/qlayoutengine_p.h
index 2d6a556..e782703 100644
--- a/microkde/qlayoutengine_p.h
+++ b/microkde/qlayoutengine_p.h
@@ -1,3 +1,5 @@
1//Added by qt3to4:
2#include <Q3MemArray>
1// THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter 3// THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter
2 4
3/**************************************************************************** 5/****************************************************************************
@@ -55,10 +57,6 @@
55// 57//
56 58
57 59
58#ifndef QT_H
59#include "qabstractlayout.h"
60#endif // QT_H
61
62#ifndef QT_NO_LAYOUT 60#ifndef QT_NO_LAYOUT
63struct QLayoutStruct 61struct QLayoutStruct
64{ 62{
@@ -81,7 +79,7 @@ struct QLayoutStruct
81}; 79};
82 80
83 81
84void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, 82void qGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos,
85 int space, int spacer ); 83 int space, int spacer );
86 84
87 85
diff --git a/pwmanager/libcrypt/cipher/cipher.pro b/pwmanager/libcrypt/cipher/cipher.pro
index ad96201..7e1a330 100644
--- a/pwmanager/libcrypt/cipher/cipher.pro
+++ b/pwmanager/libcrypt/cipher/cipher.pro
@@ -68,3 +68,5 @@ SOURCES += ../crypt/ath.c \
68 68
69#LIBS += -L../$(PLATFORM) 69#LIBS += -L../$(PLATFORM)
70#LIBS += -lgcrypt -lmpi -lerror 70#LIBS += -lgcrypt -lmpi -lerror
71#The following line was inserted by qt3to4
72QT += xml qt3support
diff --git a/pwmanager/libcrypt/error/error.pro b/pwmanager/libcrypt/error/error.pro
index 8c5f667..e96bcee 100644
--- a/pwmanager/libcrypt/error/error.pro
+++ b/pwmanager/libcrypt/error/error.pro
@@ -29,4 +29,6 @@ SOURCES += code-from-errno.c \
29 # gpg-error.c \ 29 # gpg-error.c \
30 # gpg-error.h \ 30 # gpg-error.h \
31 # mkerrcodes.h 31 # mkerrcodes.h
32 # mkerrcodes.c \ \ No newline at end of file 32 # mkerrcodes.c \
33#The following line was inserted by qt3to4
34QT += xml qt3support
diff --git a/pwmanager/libcrypt/mpi/mpi.pro b/pwmanager/libcrypt/mpi/mpi.pro
index 4eb6346..d213bc3 100644
--- a/pwmanager/libcrypt/mpi/mpi.pro
+++ b/pwmanager/libcrypt/mpi/mpi.pro
@@ -40,3 +40,5 @@ SOURCES += mpi-add.c \
40 generic/mpih-rshift.c \ 40 generic/mpih-rshift.c \
41 generic/mpih-sub1.c \ 41 generic/mpih-sub1.c \
42 generic/udiv-w-sdiv.c 42 generic/udiv-w-sdiv.c
43#The following line was inserted by qt3to4
44QT += xml qt3support
diff --git a/pwmanager/libcrypt/zlib/zlib.pro b/pwmanager/libcrypt/zlib/zlib.pro
index 2841aaf..7ba44e3 100644
--- a/pwmanager/libcrypt/zlib/zlib.pro
+++ b/pwmanager/libcrypt/zlib/zlib.pro
@@ -34,3 +34,5 @@ SOURCES += adler32.c \
34 trees.c \ 34 trees.c \
35 uncompr.c \ 35 uncompr.c \
36 zutil.c 36 zutil.c
37#The following line was inserted by qt3to4
38QT += xml qt3support
diff --git a/pwmanager/pwmanager/addentrywnd_emb.cpp b/pwmanager/pwmanager/addentrywnd_emb.cpp
index 2fa9e8a..f76d33b 100644
--- a/pwmanager/pwmanager/addentrywnd_emb.cpp
+++ b/pwmanager/pwmanager/addentrywnd_emb.cpp
@@ -29,12 +29,15 @@ $Id$
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qtabwidget.h> 31#include <qtabwidget.h>
32#include <qgroupbox.h> 32#include <q3groupbox.h>
33//Added by qt3to4:
34#include <Q3GridLayout>
35#include <Q3VBoxLayout>
33#include <klocale.h> 36#include <klocale.h>
34#include <kcombobox.h> 37#include <kcombobox.h>
35#include <klineedit.h> 38#include <klineedit.h>
36#include <qpushbutton.h> 39#include <qpushbutton.h>
37#include <qmultilineedit.h> 40#include <q3multilineedit.h>
38 41
39/* 42/*
40 * Constructs a addEntryWnd as a child of 'parent', with the 43 * Constructs a addEntryWnd as a child of 'parent', with the
@@ -49,7 +52,7 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
49 KDialogBase::Ok, parent, name, true ), doc(d) 52 KDialogBase::Ok, parent, name, true ), doc(d)
50{ 53{
51 QWidget *page = plainPage(); 54 QWidget *page = plainPage();
52 QVBoxLayout *pageLayout = new QVBoxLayout( page ); 55 Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
53 56
54 QTabWidget* mTabWidget = new QTabWidget( page ); 57 QTabWidget* mTabWidget = new QTabWidget( page );
55 pageLayout->addWidget( mTabWidget ); 58 pageLayout->addWidget( mTabWidget );
@@ -58,7 +61,7 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
58 // This is the Password tab 61 // This is the Password tab
59 QWidget *tab1 = new QWidget( mTabWidget ); 62 QWidget *tab1 = new QWidget( mTabWidget );
60 63
61 QGridLayout *layout = new QGridLayout( tab1, 3, 1 ); 64 Q3GridLayout *layout = new Q3GridLayout( tab1, 3, 1 );
62 layout->setMargin( KDialogBase::marginHint() ); 65 layout->setMargin( KDialogBase::marginHint() );
63 layout->setSpacing( KDialogBase::spacingHint() ); 66 layout->setSpacing( KDialogBase::spacingHint() );
64 67
@@ -77,7 +80,7 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
77 layout->addWidget( categoryComboBox, i, 1 ); 80 layout->addWidget( categoryComboBox, i, 1 );
78 i++; 81 i++;
79 categoryComboBox->setEditable( TRUE ); 82 categoryComboBox->setEditable( TRUE );
80 categoryComboBox->setSizeLimit( 8 ); 83 categoryComboBox->setMaxVisibleItems( 8 );
81 categoryComboBox->setAutoCompletion( TRUE ); 84 categoryComboBox->setAutoCompletion( TRUE );
82 categoryComboBox->setDuplicatesEnabled( FALSE ); 85 categoryComboBox->setDuplicatesEnabled( FALSE );
83 connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&))); 86 connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&)));
@@ -117,12 +120,12 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
117 // This is the Comment tab 120 // This is the Comment tab
118 QWidget *tab2 = new QWidget( mTabWidget ); 121 QWidget *tab2 = new QWidget( mTabWidget );
119 122
120 layout = new QGridLayout( tab2, 3, 1 ); 123 layout = new Q3GridLayout( tab2, 3, 1 );
121 layout->setMargin( KDialogBase::marginHintSmall() ); 124 layout->setMargin( KDialogBase::marginHintSmall() );
122 layout->setSpacing( KDialogBase::spacingHintSmall() ); 125 layout->setSpacing( KDialogBase::spacingHintSmall() );
123 i = 0; 126 i = 0;
124 127
125 commentTextEdit = new QMultiLineEdit(tab2); 128 commentTextEdit = new Q3MultiLineEdit(tab2);
126 layout->addMultiCellWidget( commentTextEdit, i, i, 0, 0 ); 129 layout->addMultiCellWidget( commentTextEdit, i, i, 0, 0 );
127 i++; 130 i++;
128 131
@@ -134,7 +137,7 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name)
134 // This is the Launcher tab 137 // This is the Launcher tab
135 QWidget *tab3 = new QWidget( mTabWidget ); 138 QWidget *tab3 = new QWidget( mTabWidget );
136 139
137 layout = new QGridLayout( tab3, 3, 1 ); 140 layout = new Q3GridLayout( tab3, 3, 1 );
138 layout->setMargin( KDialogBase::marginHintSmall() ); 141 layout->setMargin( KDialogBase::marginHintSmall() );
139 layout->setSpacing( KDialogBase::spacingHintSmall() ); 142 layout->setSpacing( KDialogBase::spacingHintSmall() );
140 i = 0; 143 i = 0;
diff --git a/pwmanager/pwmanager/addentrywnd_emb.h b/pwmanager/pwmanager/addentrywnd_emb.h
index 966d9d2..ad7d30c 100644
--- a/pwmanager/pwmanager/addentrywnd_emb.h
+++ b/pwmanager/pwmanager/addentrywnd_emb.h
@@ -27,18 +27,23 @@ $Id$
27#define ADDENTRYWND_EMB_H 27#define ADDENTRYWND_EMB_H
28 28
29#include <qvariant.h> 29#include <qvariant.h>
30//Added by qt3to4:
31#include <Q3VBoxLayout>
32#include <Q3GridLayout>
33#include <Q3HBoxLayout>
34#include <QLabel>
30#include <kdialogbase.h> 35#include <kdialogbase.h>
31 36
32class QVBoxLayout; 37class Q3VBoxLayout;
33class QHBoxLayout; 38class Q3HBoxLayout;
34class QGridLayout; 39class Q3GridLayout;
35class QSpacerItem; 40class QSpacerItem;
36class KLineEdit; 41class KLineEdit;
37class QPushButton; 42class QPushButton;
38class KComboBox; 43class KComboBox;
39class QLabel; 44class QLabel;
40class QGroupBox; 45class Q3GroupBox;
41class QMultiLineEdit; 46class Q3MultiLineEdit;
42class PwMDoc; 47class PwMDoc;
43 48
44class addEntryWnd : public KDialogBase 49class addEntryWnd : public KDialogBase
@@ -61,7 +66,7 @@ public:
61 QLabel* pwLineLabel; 66 QLabel* pwLineLabel;
62 67
63 QPushButton* revealButton; 68 QPushButton* revealButton;
64 QMultiLineEdit* commentTextEdit; 69 Q3MultiLineEdit* commentTextEdit;
65 PwMDoc* doc; 70 PwMDoc* doc;
66 71
67public slots: 72public slots:
diff --git a/pwmanager/pwmanager/addentrywndimpl.cpp b/pwmanager/pwmanager/addentrywndimpl.cpp
index 09efd1c..c952ead 100644
--- a/pwmanager/pwmanager/addentrywndimpl.cpp
+++ b/pwmanager/pwmanager/addentrywndimpl.cpp
@@ -196,7 +196,7 @@ void AddEntryWndImpl::switchComment(bool toAdvanced)
196 if (commentTextEdit) 196 if (commentTextEdit)
197 return; 197 return;
198 198
199 commentTextEdit = new QTextEdit(commentDummy); 199 commentTextEdit = new Q3TextEdit(commentDummy);
200 commentTextEdit->setTextFormat(Qt::PlainText); 200 commentTextEdit->setTextFormat(Qt::PlainText);
201 commentTextEdit->resize(commentDummy->size()); 201 commentTextEdit->resize(commentDummy->size());
202 commentTextEdit->setText(savedCommentText); 202 commentTextEdit->setText(savedCommentText);
@@ -216,6 +216,6 @@ void AddEntryWndImpl::editAdvCommentButton_slot()
216#endif 216#endif
217} 217}
218 218
219#ifndef PWM_EMBEDDED 219#ifndef PWM_EMBEDDED_
220#include "addentrywndimpl.moc" 220#include "moc_addentrywndimpl.cpp"
221#endif 221#endif
diff --git a/pwmanager/pwmanager/addentrywndimpl.h b/pwmanager/pwmanager/addentrywndimpl.h
index e13eb54..c5f4bb1 100644
--- a/pwmanager/pwmanager/addentrywndimpl.h
+++ b/pwmanager/pwmanager/addentrywndimpl.h
@@ -23,13 +23,13 @@
23 23
24#ifndef PWM_EMBEDDED 24#ifndef PWM_EMBEDDED
25#include <qlineedit.h> 25#include <qlineedit.h>
26#include <qtextedit.h> 26#include <q3textedit.h>
27#include <qcombobox.h> 27#include <qcombobox.h>
28#include "addentrywnd.h" 28#include "addentrywnd.h"
29#else 29#else
30#include <klineedit.h> 30#include <klineedit.h>
31#include <kcombobox.h> 31#include <kcombobox.h>
32#include <qmultilineedit.h> 32#include <q3multilineedit.h>
33#include "addentrywnd_emb.h" 33#include "addentrywnd_emb.h"
34#endif 34#endif
35 35
@@ -86,12 +86,12 @@ public:
86 86
87public slots: 87public slots:
88#ifndef PWM_EMBEDDED 88#ifndef PWM_EMBEDDED
89//MOC_SKIP_BEGIN 89#ifndef Q_MOC_RUN
90 /** OK button pressed */ 90 /** OK button pressed */
91 void okButton_slot(); 91 void okButton_slot();
92 /** cancel button pressed */ 92 /** cancel button pressed */
93 void cancelButton_slot(); 93 void cancelButton_slot();
94//MOC_SKIP_END 94#endif
95#else 95#else
96 virtual void slotOk(); 96 virtual void slotOk();
97#endif 97#endif
@@ -110,7 +110,7 @@ protected:
110protected: 110protected:
111 QPushButton *editAdvCommentButton; 111 QPushButton *editAdvCommentButton;
112#ifndef PWM_EMBEDDED 112#ifndef PWM_EMBEDDED
113 QTextEdit *commentTextEdit; 113 Q3TextEdit *commentTextEdit;
114#else 114#else
115 //nothing here 115 //nothing here
116#endif 116#endif
diff --git a/pwmanager/pwmanager/binentrygen.h b/pwmanager/pwmanager/binentrygen.h
index 49288aa..9263cdc 100644
--- a/pwmanager/pwmanager/binentrygen.h
+++ b/pwmanager/pwmanager/binentrygen.h
@@ -21,7 +21,7 @@
21#define __BINENTRYGEN_H 21#define __BINENTRYGEN_H
22 22
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25 25
26#include "pwmdoc.h" 26#include "pwmdoc.h"
27 27
diff --git a/pwmanager/pwmanager/commentbox.cpp b/pwmanager/pwmanager/commentbox.cpp
index 5416856..a60440d 100644
--- a/pwmanager/pwmanager/commentbox.cpp
+++ b/pwmanager/pwmanager/commentbox.cpp
@@ -26,9 +26,9 @@
26#ifndef PWM_EMBEDDED 26#ifndef PWM_EMBEDDED
27#include <khtml_part.h> 27#include <khtml_part.h>
28#include <khtmlview.h> 28#include <khtmlview.h>
29#include <qtextedit.h> 29#include <q3textedit.h>
30#else 30#else
31#include <qmultilineedit.h> 31#include <q3multilineedit.h>
32#endif 32#endif
33 33
34 34
@@ -137,7 +137,7 @@ void CommentBox::switchTo(commentBoxMode newMode)
137 // setup new mode 137 // setup new mode
138 switch (newMode) { 138 switch (newMode) {
139 case mode_text: 139 case mode_text:
140 textDta = new QTextEdit(parentWidget); 140 textDta = new Q3TextEdit(parentWidget);
141 textDta->setTextFormat(Qt::PlainText); 141 textDta->setTextFormat(Qt::PlainText);
142 textDta->setReadOnly(true); 142 textDta->setReadOnly(true);
143 textDta->show(); 143 textDta->show();
@@ -229,11 +229,11 @@ QSize CommentBox::size()
229#else 229#else
230 230
231CommentBox::CommentBox(QWidget *_parentWidget) 231CommentBox::CommentBox(QWidget *_parentWidget)
232 : QTextBrowser(_parentWidget) 232 : Q3TextBrowser(_parentWidget)
233 233
234{ 234{
235 //this->setReadOnly(true); 235 //this->setReadOnly(true);
236 setFocusPolicy( QWidget::ClickFocus ); 236 setFocusPolicy( Qt::ClickFocus );
237} 237}
238 238
239CommentBox::~CommentBox() 239CommentBox::~CommentBox()
@@ -248,7 +248,7 @@ void CommentBox::clear()
248 248
249void CommentBox::setText(const QString &text) 249void CommentBox::setText(const QString &text)
250{ 250{
251 QTextBrowser::setText( text); 251 Q3TextBrowser::setText( text);
252 if (!isVisible()) 252 if (!isVisible())
253 show(); 253 show();
254} 254}
diff --git a/pwmanager/pwmanager/commentbox.h b/pwmanager/pwmanager/commentbox.h
index 3103353..d14ba13 100644
--- a/pwmanager/pwmanager/commentbox.h
+++ b/pwmanager/pwmanager/commentbox.h
@@ -23,7 +23,7 @@
23#include <qstring.h> 23#include <qstring.h>
24#include <qsize.h> 24#include <qsize.h>
25class QWidget; 25class QWidget;
26class QTextEdit; 26class Q3TextEdit;
27class KHTMLPart; 27class KHTMLPart;
28 28
29#ifndef PWM_EMBEDDED 29#ifndef PWM_EMBEDDED
@@ -85,18 +85,18 @@ protected:
85 /** current comment box usage type */ 85 /** current comment box usage type */
86 commentBoxMode mode; 86 commentBoxMode mode;
87 /** if the comment box is a normal textbox, data is stored here */ 87 /** if the comment box is a normal textbox, data is stored here */
88 QTextEdit *textDta; 88 Q3TextEdit *textDta;
89 /** if the comment box is a HTML box, data is stored here */ 89 /** if the comment box is a HTML box, data is stored here */
90 KHTMLPart *htmlDta; 90 KHTMLPart *htmlDta;
91}; 91};
92 92
93#else 93#else
94#include <qtextbrowser.h> 94#include <q3textbrowser.h>
95/** Implementation of the advanced HTML comment box */ 95/** Implementation of the advanced HTML comment box */
96//US ENH: CommentBox must be derived from QWidget, to allow the splitter to set a initial size 96//US ENH: CommentBox must be derived from QWidget, to allow the splitter to set a initial size
97// without conflicting with the two display modes 97// without conflicting with the two display modes
98 98
99class CommentBox : public QTextBrowser 99class CommentBox : public Q3TextBrowser
100{ 100{
101public: 101public:
102 CommentBox(QWidget *_parentWidget); 102 CommentBox(QWidget *_parentWidget);
diff --git a/pwmanager/pwmanager/csv.cpp b/pwmanager/pwmanager/csv.cpp
index 194edf2..226cc08 100644
--- a/pwmanager/pwmanager/csv.cpp
+++ b/pwmanager/pwmanager/csv.cpp
@@ -23,6 +23,8 @@
23 23
24#include <kmessagebox.h> 24#include <kmessagebox.h>
25#include <klocale.h> 25#include <klocale.h>
26//Added by qt3to4:
27#include <Q3CString>
26 28
27 #define MAX_CSV_FILE_SIZE(50 * 1024 * 1024) // bytes 29 #define MAX_CSV_FILE_SIZE(50 * 1024 * 1024) // bytes
28 30
@@ -42,7 +44,7 @@ bool Csv::importData(const QString &filepath,
42 bool ret = true; 44 bool ret = true;
43 QByteArray d; 45 QByteArray d;
44 QFile f(filepath); 46 QFile f(filepath);
45 if (!f.open(IO_ReadOnly)) { 47 if (!f.open(QIODevice::ReadOnly)) {
46 KMessageBox::error(parent, 48 KMessageBox::error(parent,
47 i18n("Could not open file.\n" 49 i18n("Could not open file.\n"
48 "Does the file exist?"), 50 "Does the file exist?"),
@@ -89,7 +91,7 @@ bool Csv::doImport(const QByteArray &d,
89 91
90 int refIndex = 0; 92 int refIndex = 0;
91 int ret; 93 int ret;
92 QCString s, curCat; 94 Q3CString s, curCat;
93 int fieldIndex = 0; 95 int fieldIndex = 0;
94 bool inRecord = false; 96 bool inRecord = false;
95 /* fieldIndex is a reference count to see which 97 /* fieldIndex is a reference count to see which
@@ -121,27 +123,27 @@ bool Csv::doImport(const QByteArray &d,
121 curCat = s; 123 curCat = s;
122 break; 124 break;
123 case 1:// desc 125 case 1:// desc
124 di.desc = s; 126 di.desc = std::string(s);
125 ++fieldIndex; 127 ++fieldIndex;
126 break; 128 break;
127 case 2: // name 129 case 2: // name
128 di.name = s; 130 di.name = std::string(s);
129 ++fieldIndex; 131 ++fieldIndex;
130 break; 132 break;
131 case 3: // pw 133 case 3: // pw
132 di.pw = s; 134 di.pw = std::string(s);
133 ++fieldIndex; 135 ++fieldIndex;
134 break; 136 break;
135 case 4: // url 137 case 4: // url
136 di.url = s; 138 di.url = std::string(s);
137 ++fieldIndex; 139 ++fieldIndex;
138 break; 140 break;
139 case 5: // launcher 141 case 5: // launcher
140 di.launcher = s; 142 di.launcher = std::string(s);
141 ++fieldIndex; 143 ++fieldIndex;
142 break; 144 break;
143 case 6: // comment 145 case 6: // comment
144 di.comment = s; 146 di.comment = std::string(s);
145 ++fieldIndex; 147 ++fieldIndex;
146 break; 148 break;
147 default: 149 default:
@@ -154,7 +156,7 @@ bool Csv::doImport(const QByteArray &d,
154 case 1: 156 case 1:
155 // record complete. 157 // record complete.
156 if (fieldIndex == 6) 158 if (fieldIndex == 6)
157 di.comment = s; 159 di.comment = std::string(s);
158 inRecord = false; 160 inRecord = false;
159 fieldIndex = 0; 161 fieldIndex = 0;
160 doc->addEntry(curCat, &di, true); 162 doc->addEntry(curCat, &di, true);
@@ -175,7 +177,7 @@ bool Csv::doImport(const QByteArray &d,
175 return false; 177 return false;
176} 178}
177 179
178int Csv::nextField(QCString *ret, 180int Csv::nextField(Q3CString *ret,
179 const QByteArray &in, 181 const QByteArray &in,
180 bool inRecord, 182 bool inRecord,
181 int *_refIndex) 183 int *_refIndex)
@@ -353,7 +355,7 @@ bool Csv::exportData(const QString &filepath,
353 } 355 }
354 } 356 }
355 QFile f(filepath); 357 QFile f(filepath);
356 if (!f.open(IO_ReadWrite)) { 358 if (!f.open(QIODevice::ReadWrite)) {
357 KMessageBox::error(parent, 359 KMessageBox::error(parent,
358 i18n("Could not open file for writing."), 360 i18n("Could not open file for writing."),
359 i18n("Open error.")); 361 i18n("Open error."));
@@ -376,7 +378,7 @@ bool Csv::doExport(QFile &f,
376 unsigned int numEntr; 378 unsigned int numEntr;
377 unsigned int i, j; 379 unsigned int i, j;
378 PwMDataItem d; 380 PwMDataItem d;
379 QCString s, catName; 381 Q3CString s, catName;
380 QByteArray b; 382 QByteArray b;
381 383
382 for (i = 0; i < numCat; ++i) { 384 for (i = 0; i < numCat; ++i) {
@@ -401,7 +403,7 @@ bool Csv::doExport(QFile &f,
401 b = s; 403 b = s;
402 // remove \0 termination 404 // remove \0 termination
403#ifndef PWM_EMBEDDED 405#ifndef PWM_EMBEDDED
404 b.resize(b.size() - 1, QGArray::SpeedOptim); 406 b.resize(b.size() - 1, Q3GArray::SpeedOptim);
405#else 407#else
406 b.resize(b.size() - 1); 408 b.resize(b.size() - 1);
407#endif 409#endif
@@ -412,15 +414,15 @@ bool Csv::doExport(QFile &f,
412 return true; 414 return true;
413} 415}
414 416
415QCString Csv::newField(QCString s) 417Q3CString Csv::newField(Q3CString s)
416{ 418{
417 if (s.isEmpty()) 419 if (s.isEmpty())
418 return QCString(); 420 return Q3CString();
419 QCString ret("\""); 421 Q3CString ret("\"");
420#ifndef PWM_EMBEDDED 422#ifndef PWM_EMBEDDED
421 s.replace('\"', "\"\""); 423 s.replace('\"', "\"\"");
422#else 424#else
423 s.replace(QRegExp("\""), "\"\""); 425 s.replace("\"", "\"\"");
424#endif 426#endif
425 ret += s; 427 ret += s;
426 ret += "\""; 428 ret += "\"";
diff --git a/pwmanager/pwmanager/csv.h b/pwmanager/pwmanager/csv.h
index 6f3c1e1..8049122 100644
--- a/pwmanager/pwmanager/csv.h
+++ b/pwmanager/pwmanager/csv.h
@@ -21,7 +21,7 @@
21#ifndef __PWMANAGER_CSV_H 21#ifndef __PWMANAGER_CSV_H
22#define __PWMANAGER_CSV_H 22#define __PWMANAGER_CSV_H
23 23
24#include <qcstring.h> 24#include <q3cstring.h>
25#include <qfile.h> 25#include <qfile.h>
26 26
27 27
@@ -73,7 +73,7 @@ protected:
73 * 2 -> data end. 73 * 2 -> data end.
74 * -1 -> parser error. 74 * -1 -> parser error.
75 */ 75 */
76 int nextField(QCString *ret, 76 int nextField(Q3CString *ret,
77 const QByteArray &in, 77 const QByteArray &in,
78 bool inRecord, 78 bool inRecord,
79 int *_refIndex); 79 int *_refIndex);
@@ -81,7 +81,7 @@ protected:
81 bool doExport(QFile &f, 81 bool doExport(QFile &f,
82 PwMDoc *doc); 82 PwMDoc *doc);
83 /** generate a new data field string. */ 83 /** generate a new data field string. */
84 QCString newField(QCString s); 84 Q3CString newField(Q3CString s);
85 85
86protected: 86protected:
87 /** current parent widget. */ 87 /** current parent widget. */
diff --git a/pwmanager/pwmanager/editcategory.cpp b/pwmanager/pwmanager/editcategory.cpp
index 4e2378c..4f19299 100644
--- a/pwmanager/pwmanager/editcategory.cpp
+++ b/pwmanager/pwmanager/editcategory.cpp
@@ -28,7 +28,9 @@ $Id$
28 28
29#include <qlayout.h> 29#include <qlayout.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qgroupbox.h> 31#include <q3groupbox.h>
32//Added by qt3to4:
33#include <Q3GridLayout>
32#include <klocale.h> 34#include <klocale.h>
33#include <kcombobox.h> 35#include <kcombobox.h>
34#include <klineedit.h> 36#include <klineedit.h>
@@ -55,7 +57,7 @@ editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name)
55 57
56 58
57 QWidget *page = plainPage(); 59 QWidget *page = plainPage();
58 QGridLayout *layout = new QGridLayout( page, 3, 1 ); 60 Q3GridLayout *layout = new Q3GridLayout( page, 3, 1 );
59 layout->setMargin( KDialogBase::marginHint() ); 61 layout->setMargin( KDialogBase::marginHint() );
60 layout->setSpacing( KDialogBase::spacingHint() ); 62 layout->setSpacing( KDialogBase::spacingHint() );
61 63
@@ -66,7 +68,7 @@ editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name)
66 layout->addWidget( categoryComboBox, i, 1 ); 68 layout->addWidget( categoryComboBox, i, 1 );
67 i++; 69 i++;
68 categoryComboBox->setEditable( FALSE ); 70 categoryComboBox->setEditable( FALSE );
69 categoryComboBox->setSizeLimit( 100 ); 71 categoryComboBox->setMaxVisibleItems( 100 );
70 connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&))); 72 connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&)));
71 73
72 74
diff --git a/pwmanager/pwmanager/editcategory.h b/pwmanager/pwmanager/editcategory.h
index 90b685b..10a012b 100644
--- a/pwmanager/pwmanager/editcategory.h
+++ b/pwmanager/pwmanager/editcategory.h
@@ -27,18 +27,23 @@ $Id$
27#define EDITCATEGORY_H 27#define EDITCATEGORY_H
28 28
29#include <qvariant.h> 29#include <qvariant.h>
30//Added by qt3to4:
31#include <Q3VBoxLayout>
32#include <Q3GridLayout>
33#include <Q3HBoxLayout>
34#include <QLabel>
30#include <kdialogbase.h> 35#include <kdialogbase.h>
31 36
32class QVBoxLayout; 37class Q3VBoxLayout;
33class QHBoxLayout; 38class Q3HBoxLayout;
34class QGridLayout; 39class Q3GridLayout;
35class QSpacerItem; 40class QSpacerItem;
36class KLineEdit; 41class KLineEdit;
37class QPushButton; 42class QPushButton;
38class KComboBox; 43class KComboBox;
39class QLabel; 44class QLabel;
40class QGroupBox; 45class Q3GroupBox;
41class QMultiLineEdit; 46class Q3MultiLineEdit;
42class PwMDoc; 47class PwMDoc;
43 48
44class editCategoryWnd : public KDialogBase 49class editCategoryWnd : public KDialogBase
diff --git a/pwmanager/pwmanager/findwnd_emb.cpp b/pwmanager/pwmanager/findwnd_emb.cpp
index 6dcabe8..03d4e38 100644
--- a/pwmanager/pwmanager/findwnd_emb.cpp
+++ b/pwmanager/pwmanager/findwnd_emb.cpp
@@ -28,9 +28,11 @@ $Id$
28#include <klocale.h> 28#include <klocale.h>
29 29
30#include <qcheckbox.h> 30#include <qcheckbox.h>
31#include <qbuttongroup.h> 31#include <q3buttongroup.h>
32#include <qradiobutton.h> 32#include <qradiobutton.h>
33#include <qlayout.h> 33#include <qlayout.h>
34//Added by qt3to4:
35#include <Q3VBoxLayout>
34#include <klineedit.h> 36#include <klineedit.h>
35#include <qlabel.h> 37#include <qlabel.h>
36 38
@@ -57,7 +59,7 @@ findWnd::findWnd( QWidget* parent, const char* name )
57 KDialogBase::Ok, parent, name, true ) 59 KDialogBase::Ok, parent, name, true )
58{ 60{
59 QWidget *page = plainPage(); 61 QWidget *page = plainPage();
60 QVBoxLayout *layout = new QVBoxLayout( page ); 62 Q3VBoxLayout *layout = new Q3VBoxLayout( page );
61 layout->setMargin( KDialogBase::marginHint() ); 63 layout->setMargin( KDialogBase::marginHint() );
62 layout->setSpacing( KDialogBase::spacingHint() ); 64 layout->setSpacing( KDialogBase::spacingHint() );
63 65
@@ -68,7 +70,7 @@ findWnd::findWnd( QWidget* parent, const char* name )
68 layout->addWidget( caseSensCheckBox ); 70 layout->addWidget( caseSensCheckBox );
69 71
70 72
71 QButtonGroup* buttonGroup1 = new QButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page ); 73 Q3ButtonGroup* buttonGroup1 = new Q3ButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page );
72 layout->addWidget( buttonGroup1 ); 74 layout->addWidget( buttonGroup1 );
73 75
74 descRadioButton = new QRadioButton( i18n( "&Description" ), buttonGroup1 ); 76 descRadioButton = new QRadioButton( i18n( "&Description" ), buttonGroup1 );
diff --git a/pwmanager/pwmanager/findwndimpl.cpp b/pwmanager/pwmanager/findwndimpl.cpp
index 059219f..d323133 100644
--- a/pwmanager/pwmanager/findwndimpl.cpp
+++ b/pwmanager/pwmanager/findwndimpl.cpp
@@ -133,6 +133,6 @@ void FindWndImpl::selectionChanged_slot()
133 currFoundPos = -1; 133 currFoundPos = -1;
134} 134}
135 135
136#ifndef PWM_EMBEDDED 136#ifndef PWM_EMBEDDED_
137#include "findwndimpl.moc" 137#include "moc_findwndimpl.cpp"
138#endif 138#endif
diff --git a/pwmanager/pwmanager/genpasswd.cpp b/pwmanager/pwmanager/genpasswd.cpp
index 41078b3..82f0c06 100644
--- a/pwmanager/pwmanager/genpasswd.cpp
+++ b/pwmanager/pwmanager/genpasswd.cpp
@@ -21,6 +21,8 @@
21#include "pwmexception.h" 21#include "pwmexception.h"
22#include "randomizer.h" 22#include "randomizer.h"
23#include "globalstuff.h" 23#include "globalstuff.h"
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25 27
26/* how often can a char of the same charset be reused in order */ 28/* how often can a char of the same charset be reused in order */
@@ -158,7 +160,7 @@ GenPasswd::dynCharset_element * GenPasswd::selectNextCharset()
158 Randomizer *rnd = Randomizer::obj(); 160 Randomizer *rnd = Randomizer::obj();
159 if (useFilter) { 161 if (useFilter) {
160 // find out which charsets are allowed (filtering) 162 // find out which charsets are allowed (filtering)
161 QPtrList<dynCharset_element> allowedCharsets; 163 Q3PtrList<dynCharset_element> allowedCharsets;
162 // QPtrList<dynCharset_element>::iterator is not available in QT-3.1 164 // QPtrList<dynCharset_element>::iterator is not available in QT-3.1
163 unsigned int i, cnt = dynCharset.count(); 165 unsigned int i, cnt = dynCharset.count();
164 dynCharset_element *p; 166 dynCharset_element *p;
diff --git a/pwmanager/pwmanager/genpasswd.h b/pwmanager/pwmanager/genpasswd.h
index 3fa1607..5493891 100644
--- a/pwmanager/pwmanager/genpasswd.h
+++ b/pwmanager/pwmanager/genpasswd.h
@@ -21,7 +21,7 @@
21#define __GENPASSWD_H 21#define __GENPASSWD_H
22 22
23#include <qstring.h> 23#include <qstring.h>
24#include <qptrlist.h> 24#include <q3ptrlist.h>
25 25
26/** internal password generator of PwManager */ 26/** internal password generator of PwManager */
27class GenPasswd 27class GenPasswd
@@ -70,7 +70,7 @@ protected:
70 /** use the filter? */ 70 /** use the filter? */
71 bool useFilter; 71 bool useFilter;
72 /** dynamic charset used for generating the password */ 72 /** dynamic charset used for generating the password */
73 QPtrList<dynCharset_element> dynCharset; 73 Q3PtrList<dynCharset_element> dynCharset;
74}; 74};
75 75
76#endif // __GENPASSWD_H 76#endif // __GENPASSWD_H
diff --git a/pwmanager/pwmanager/getkeycardwnd.cpp b/pwmanager/pwmanager/getkeycardwnd.cpp
index 89dada2..b8e6174 100644
--- a/pwmanager/pwmanager/getkeycardwnd.cpp
+++ b/pwmanager/pwmanager/getkeycardwnd.cpp
@@ -20,17 +20,20 @@
20#include "getkeycardwnd.h" 20#include "getkeycardwnd.h"
21 21
22#include <qmessagebox.h> 22#include <qmessagebox.h>
23//Added by qt3to4:
24#include <QResizeEvent>
25#include <QLabel>
23 26
24#include <klocale.h> 27#include <klocale.h>
25 28
26 29
27GetKeyCardWnd::GetKeyCardWnd(QWidget *parent, 30GetKeyCardWnd::GetKeyCardWnd(QWidget *parent,
28 const char *name, bool modal, WFlags f) 31 const char *name, bool modal, Qt::WFlags f)
29 : QDialog(parent, name, modal, f) 32 : QDialog(parent, name, modal, f)
30{ 33{
31 vbox1 = new QVBox(this); 34 vbox1 = new Q3VBox(this);
32 text_label = new QLabel(vbox1); 35 text_label = new QLabel(vbox1);
33 hbox1 = new QHBox(vbox1); 36 hbox1 = new Q3HBox(vbox1);
34 okButton = new QPushButton(i18n("&Ok"), hbox1); 37 okButton = new QPushButton(i18n("&Ok"), hbox1);
35 cancelButton = new QPushButton(i18n("&Cancel"), hbox1); 38 cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
36 39
@@ -62,6 +65,6 @@ void GetKeyCardWnd::okButton_slot()
62 done(1); 65 done(1);
63} 66}
64 67
65#ifndef PWM_EMBEDDED 68#ifndef PWM_EMBEDDED_
66#include "getkeycardwnd.moc" 69#include "moc_getkeycardwnd.cpp"
67#endif 70#endif
diff --git a/pwmanager/pwmanager/getkeycardwnd.h b/pwmanager/pwmanager/getkeycardwnd.h
index fbe46ee..202e920 100644
--- a/pwmanager/pwmanager/getkeycardwnd.h
+++ b/pwmanager/pwmanager/getkeycardwnd.h
@@ -20,12 +20,14 @@
20#ifndef GETKEYCARDWND_H 20#ifndef GETKEYCARDWND_H
21#define GETKEYCARDWND_H 21#define GETKEYCARDWND_H
22 22
23#include <qvbox.h> 23#include <q3vbox.h>
24#include <qhbox.h> 24#include <q3hbox.h>
25#include <qdialog.h> 25#include <qdialog.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qevent.h> 28#include <qevent.h>
29//Added by qt3to4:
30#include <QResizeEvent>
29 31
30/** The equivalent to GetMasterPwWndImpl for chipcards */ 32/** The equivalent to GetMasterPwWndImpl for chipcards */
31class GetKeyCardWnd : public QDialog 33class GetKeyCardWnd : public QDialog
@@ -33,15 +35,15 @@ class GetKeyCardWnd : public QDialog
33 Q_OBJECT 35 Q_OBJECT
34public: 36public:
35 GetKeyCardWnd(QWidget *parent = 0, const char *name = 0, 37 GetKeyCardWnd(QWidget *parent = 0, const char *name = 0,
36 bool modal = FALSE, WFlags f = 0); 38 bool modal = FALSE, Qt::WFlags f = 0);
37 ~GetKeyCardWnd(); 39 ~GetKeyCardWnd();
38 40
39protected slots: 41protected slots:
40 void okButton_slot(); 42 void okButton_slot();
41 43
42protected: 44protected:
43 QVBox *vbox1; 45 Q3VBox *vbox1;
44 QHBox *hbox1; 46 Q3HBox *hbox1;
45 QLabel *text_label; 47 QLabel *text_label;
46 QPushButton *okButton; 48 QPushButton *okButton;
47 QPushButton *cancelButton; 49 QPushButton *cancelButton;
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
index 678f05f..7e4bbb7 100644
--- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
+++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp
@@ -43,6 +43,9 @@ $Id$
43#include <qlineedit.h> 43#include <qlineedit.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qapplication.h> 45#include <qapplication.h>
46//Added by qt3to4:
47#include <Q3GridLayout>
48#include <Q3VBoxLayout>
46 49
47/* 50/*
48 * Constructs a getMasterPwWnd as a child of 'parent', with the 51 * Constructs a getMasterPwWnd as a child of 'parent', with the
@@ -54,13 +57,13 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
54 KDialogBase::Ok, parent, name, true ) 57 KDialogBase::Ok, parent, name, true )
55{ 58{
56 QWidget *page = plainPage(); 59 QWidget *page = plainPage();
57 QVBoxLayout *pageLayout = new QVBoxLayout( page ); 60 Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
58 61
59 pwLineEdit = new QLineEdit( page, "pwLineEdit" ); 62 pwLineEdit = new QLineEdit( page, "pwLineEdit" );
60 pwLineEdit->setEchoMode( QLineEdit::Password ); 63 pwLineEdit->setEchoMode( QLineEdit::Password );
61 64
62 QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); 65 QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" );
63 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); 66 textLabel1->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) );
64 pageLayout->addWidget(textLabel1); 67 pageLayout->addWidget(textLabel1);
65 pageLayout->addWidget(pwLineEdit); 68 pageLayout->addWidget(pwLineEdit);
66 69
@@ -76,7 +79,7 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name)
76 } 79 }
77#endif 80#endif
78 81
79 QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); 82 Q3GridLayout* numberLayout = new Q3GridLayout( numberBox, 4, 3 );
80 numberLayout->setMargin( 0 ); 83 numberLayout->setMargin( 0 );
81 numberLayout->setSpacing( 0 ); 84 numberLayout->setSpacing( 0 );
82 85
diff --git a/pwmanager/pwmanager/getmasterpwwndimpl.cpp b/pwmanager/pwmanager/getmasterpwwndimpl.cpp
index 6be9618..f741f72 100644
--- a/pwmanager/pwmanager/getmasterpwwndimpl.cpp
+++ b/pwmanager/pwmanager/getmasterpwwndimpl.cpp
@@ -55,6 +55,6 @@ void GetMasterPwWndImpl::slotOk()
55} 55}
56#endif 56#endif
57 57
58#ifndef PWM_EMBEDDED 58#ifndef PWM_EMBEDDED_
59#include "getmasterpwwndimpl.moc" 59#include "moc_getmasterpwwndimpl.cpp"
60#endif 60#endif
diff --git a/pwmanager/pwmanager/globalstuff.h b/pwmanager/pwmanager/globalstuff.h
index 090fcda..2e8f287 100644
--- a/pwmanager/pwmanager/globalstuff.h
+++ b/pwmanager/pwmanager/globalstuff.h
@@ -34,7 +34,7 @@
34#include <sstream> 34#include <sstream>
35#else 35#else
36#include <qstring.h> 36#include <qstring.h>
37#include <qtextstream.h> 37#include <QTextOStream>
38#endif 38#endif
39 39
40#ifndef CONFIG_KEYCARD 40#ifndef CONFIG_KEYCARD
@@ -97,7 +97,7 @@ template <class T> inline
97std::string tostr(const T &t) 97std::string tostr(const T &t)
98{ 98{
99 QString result; 99 QString result;
100 QTextOStream(&result) << t; 100 QTextOStream tmp(&result); tmp << t;
101 return result.latin1(); 101 return result.latin1();
102} 102}
103#endif 103#endif
diff --git a/pwmanager/pwmanager/htmlgen.cpp b/pwmanager/pwmanager/htmlgen.cpp
index bee8198..be3406a 100644
--- a/pwmanager/pwmanager/htmlgen.cpp
+++ b/pwmanager/pwmanager/htmlgen.cpp
@@ -60,7 +60,7 @@ QString HtmlGen::escapeHtmlText(const QString &str)
60 unsigned int len = str.length(), i; 60 unsigned int len = str.length(), i;
61 char c; 61 char c;
62 for (i = 0; i < len; ++i) { 62 for (i = 0; i < len; ++i) {
63 c = str.at(i); 63 c = str.at(i).toLatin1();
64 switch (c) { 64 switch (c) {
65 case '<': 65 case '<':
66 ret.append("&lt;"); 66 ret.append("&lt;");
diff --git a/pwmanager/pwmanager/ipc.cpp b/pwmanager/pwmanager/ipc.cpp
index 643b022..4c65f1d 100644
--- a/pwmanager/pwmanager/ipc.cpp
+++ b/pwmanager/pwmanager/ipc.cpp
@@ -28,7 +28,7 @@
28#include <sys/types.h> 28#include <sys/types.h>
29#include <stdio.h> 29#include <stdio.h>
30#else 30#else
31#include <qsocket.h> 31#include <q3socket.h>
32#endif 32#endif
33 33
34 #define END_OF_LINE '\n' 34 #define END_OF_LINE '\n'
@@ -77,7 +77,7 @@ Ipc::Ipc()
77 qDebug("Ipc: socketpair() failed"); 77 qDebug("Ipc: socketpair() failed");
78 } 78 }
79#endif 79#endif
80 QSocket* qsock = new QSocket(); 80 Q3Socket* qsock = new Q3Socket();
81 qsock->setSocket(sock[0]); 81 qsock->setSocket(sock[0]);
82 82
83 rdBufSize = INIT_LINEBUF_LEN; 83 rdBufSize = INIT_LINEBUF_LEN;
@@ -88,7 +88,7 @@ Ipc::Ipc()
88 qDebug("Ipc: OOM"); 88 qDebug("Ipc: OOM");
89 } 89 }
90 90
91 qsock = new QSocket(); 91 qsock = new Q3Socket();
92 qsock->setSocket(sock[0]); 92 qsock->setSocket(sock[0]);
93 93
94 /*US 94 /*US
@@ -152,7 +152,7 @@ Ipc::Ipc(const Ipc *ipc)
152 sock[0] = ipc->sock[1]; 152 sock[0] = ipc->sock[1];
153 sock[1] = ipc->sock[0]; 153 sock[1] = ipc->sock[0];
154 154
155 qSock = new QSocket(); 155 qSock = new Q3Socket();
156 qSock->setSocket(sock[0]); 156 qSock->setSocket(sock[0]);
157 157
158 /*US 158 /*US
@@ -212,6 +212,6 @@ void Ipc::receiveData(int s)
212 212
213} 213}
214 214
215#ifndef PWM_EMBEDDED 215#ifndef PWM_EMBEDDED_
216#include "ipc.moc" 216#include "moc_ipc.cpp"
217#endif 217#endif
diff --git a/pwmanager/pwmanager/ipc.h b/pwmanager/pwmanager/ipc.h
index 7bfca02..3248283 100644
--- a/pwmanager/pwmanager/ipc.h
+++ b/pwmanager/pwmanager/ipc.h
@@ -29,7 +29,7 @@
29#ifndef PWM_EMBEDDED 29#ifndef PWM_EMBEDDED
30#include <stdio.h> 30#include <stdio.h>
31#else 31#else
32#include <qsocket.h> 32#include <q3socket.h>
33#endif 33#endif
34 34
35class QSocketNotifier; 35class QSocketNotifier;
@@ -74,7 +74,7 @@ protected:
74 /** current receive buffer size */ 74 /** current receive buffer size */
75 size_t rdBufSize; 75 size_t rdBufSize;
76#else 76#else
77 QSocket* qSock; 77 Q3Socket* qSock;
78 /** current receive buffer size */ 78 /** current receive buffer size */
79 unsigned int rdBufSize; 79 unsigned int rdBufSize;
80#endif 80#endif
diff --git a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp
index b7944c3..1804e88 100644
--- a/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/kcmpwmconfig.cpp
@@ -22,6 +22,8 @@
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3VBoxLayout>
25 27
26#include <kdebug.h> 28#include <kdebug.h>
27 29
@@ -42,7 +44,7 @@ extern "C"
42KCMPwmConfig::KCMPwmConfig(QWidget *parent, const char *name ) 44KCMPwmConfig::KCMPwmConfig(QWidget *parent, const char *name )
43 : KCModule( PWMPrefs::instance(), parent, name ) 45 : KCModule( PWMPrefs::instance(), parent, name )
44{ 46{
45 QVBoxLayout *layout = new QVBoxLayout( this ); 47 Q3VBoxLayout *layout = new Q3VBoxLayout( this );
46 mConfigWidget = new PWMConfigWidget( (PWMPrefs*)getPreferences(), this, "mConfigWidget" ); 48 mConfigWidget = new PWMConfigWidget( (PWMPrefs*)getPreferences(), this, "mConfigWidget" );
47 layout->addWidget( mConfigWidget ); 49 layout->addWidget( mConfigWidget );
48 layout->setSpacing( 0 ); 50 layout->setSpacing( 0 );
diff --git a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
index 2c5189c..04771b3 100644
--- a/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
+++ b/pwmanager/pwmanager/kcmconfigs/pwmconfigwidget.cpp
@@ -22,8 +22,8 @@
22*/ 22*/
23 23
24#include <qcheckbox.h> 24#include <qcheckbox.h>
25#include <qframe.h> 25#include <q3frame.h>
26#include <qgroupbox.h> 26#include <q3groupbox.h>
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qtabwidget.h> 29#include <qtabwidget.h>
@@ -32,7 +32,10 @@
32#include <qspinbox.h> 32#include <qspinbox.h>
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36//Added by qt3to4:
37#include <Q3GridLayout>
38#include <Q3VBoxLayout>
36 39
37#include <kconfig.h> 40#include <kconfig.h>
38#include <kdebug.h> 41#include <kdebug.h>
@@ -52,7 +55,7 @@
52PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name ) 55PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *name )
53 : KPrefsWidget(prefs, parent, name ) 56 : KPrefsWidget(prefs, parent, name )
54{ 57{
55 QVBoxLayout *topLayout = new QVBoxLayout( this, 0, 58 Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0,
56 KDialog::spacingHint() ); 59 KDialog::spacingHint() );
57 60
58 QTabWidget *tabWidget = new QTabWidget( this ); 61 QTabWidget *tabWidget = new QTabWidget( this );
@@ -61,7 +64,7 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
61 // windowsStyle page 64 // windowsStyle page
62 ////////////////////////////////////////////////////// 65 //////////////////////////////////////////////////////
63 QWidget *windowStylePage = new QWidget( this ); 66 QWidget *windowStylePage = new QWidget( this );
64 QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3); 67 Q3GridLayout *windowStyleLayout = new Q3GridLayout( windowStylePage, 3, 3);
65 68
66 int i = 0; 69 int i = 0;
67 KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage); 70 KPrefsWidRadios * windowStyle = addWidRadios(i18n("Window-style:") ,&(prefs->mMainViewStyle), windowStylePage);
@@ -98,7 +101,7 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
98 // File page 101 // File page
99 ////////////////////////////////////////////////////// 102 //////////////////////////////////////////////////////
100 QWidget *filePage = new QWidget( this ); 103 QWidget *filePage = new QWidget( this );
101 QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2); 104 Q3GridLayout *fileLayout = new Q3GridLayout( filePage, 3, 2);
102 105
103 i = 0; 106 i = 0;
104 QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage); 107 QLabel* kcfg_compression_label = new QLabel(i18n("Compression:"), filePage);
@@ -154,7 +157,7 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
154 // Timeout page 157 // Timeout page
155 ////////////////////////////////////////////////////// 158 //////////////////////////////////////////////////////
156 QWidget *timeoutPage = new QWidget( this ); 159 QWidget *timeoutPage = new QWidget( this );
157 QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2); 160 Q3GridLayout *timeoutLayout = new Q3GridLayout( timeoutPage, 3, 2);
158 161
159 i = 0; 162 i = 0;
160 pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" ); 163 pwTimeoutSpinBox = new QSpinBox( 0,600,10,timeoutPage, "pwTimeoutSpinBox" );
@@ -183,7 +186,7 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
183 // Autostart page 186 // Autostart page
184 ////////////////////////////////////////////////////// 187 //////////////////////////////////////////////////////
185 QWidget *autostartPage = new QWidget( this ); 188 QWidget *autostartPage = new QWidget( this );
186 QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2); 189 Q3GridLayout *autostartLayout = new Q3GridLayout( autostartPage, 3, 2);
187 190
188 i = 0; 191 i = 0;
189 192
@@ -203,7 +206,7 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
203 // external app page 206 // external app page
204 ////////////////////////////////////////////////////// 207 //////////////////////////////////////////////////////
205 QWidget *externalappPage = new QWidget( this ); 208 QWidget *externalappPage = new QWidget( this );
206 QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); 209 Q3GridLayout *externalappLayout = new Q3GridLayout( externalappPage, 3, 2);
207 210
208 i = 0; 211 i = 0;
209 212
@@ -223,7 +226,7 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n
223 // miscelaneous page 226 // miscelaneous page
224 ////////////////////////////////////////////////////// 227 //////////////////////////////////////////////////////
225 QWidget *miscPage = new QWidget( this ); 228 QWidget *miscPage = new QWidget( this );
226 QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2); 229 Q3GridLayout *miscLayout = new Q3GridLayout( miscPage, 3, 2);
227 230
228 i = 0; 231 i = 0;
229 232
@@ -359,7 +362,7 @@ void PWMConfigWidget::setFilePermissions(int perm)
359 362
360 363
361 364
362#ifndef PWM_EMBEDDED 365#ifndef PWM_EMBEDDED_
363#include "pwmconfigwidget.moc" 366#include "moc_pwmconfigwidget.cpp"
364#endif //PWM_EMBEDDED 367#endif //PWM_EMBEDDED
365 368
diff --git a/pwmanager/pwmanager/listobjselectwnd.cpp b/pwmanager/pwmanager/listobjselectwnd.cpp
index 59729f1..7da7e95 100644
--- a/pwmanager/pwmanager/listobjselectwnd.cpp
+++ b/pwmanager/pwmanager/listobjselectwnd.cpp
@@ -20,22 +20,25 @@
20#include "listobjselectwnd.h" 20#include "listobjselectwnd.h"
21 21
22#include <klocale.h> 22#include <klocale.h>
23//Added by qt3to4:
24#include <QResizeEvent>
25#include <QLabel>
23 26
24 27
25ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleText, 28ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleText,
26 QWidget *parent, bool multiSel, const char *name, 29 QWidget *parent, bool multiSel, const char *name,
27 bool modal, WFlags f) 30 bool modal, Qt::WFlags f)
28 : QDialog(parent, name, modal, f) 31 : QDialog(parent, name, modal, f)
29{ 32{
30 vbox1 = new QVBox(this); 33 vbox1 = new Q3VBox(this);
31 title = new QLabel(vbox1); 34 title = new QLabel(vbox1);
32 list = new QListBox(vbox1); 35 list = new Q3ListBox(vbox1);
33 if (multiSel) { 36 if (multiSel) {
34 hbox2 = new QHBox(vbox1); 37 hbox2 = new Q3HBox(vbox1);
35 selAllButton = new QPushButton(i18n("&Select all"), hbox2); 38 selAllButton = new QPushButton(i18n("&Select all"), hbox2);
36 unselAllButton = new QPushButton(i18n("&Unselect all"), hbox2); 39 unselAllButton = new QPushButton(i18n("&Unselect all"), hbox2);
37 } 40 }
38 hbox1 = new QHBox(vbox1); 41 hbox1 = new Q3HBox(vbox1);
39 okButton = new QPushButton(i18n("&Ok"), hbox1); 42 okButton = new QPushButton(i18n("&Ok"), hbox1);
40 cancelButton = new QPushButton(i18n("&Cancel"), hbox1); 43 cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
41 44
@@ -45,7 +48,7 @@ ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleT
45 resize(250, 300); 48 resize(250, 300);
46 setCaption(caption); 49 setCaption(caption);
47 if (multiSel) { 50 if (multiSel) {
48 list->setSelectionMode(QListBox::Multi); 51 list->setSelectionMode(Q3ListBox::Multi);
49 } 52 }
50 53
51 title->setAlignment(Qt::AlignHCenter | Qt::WordBreak); 54 title->setAlignment(Qt::AlignHCenter | Qt::WordBreak);
@@ -126,6 +129,6 @@ void ListObjSelectWnd::setList(const QStringList &_list)
126 list->insertStringList(_list); 129 list->insertStringList(_list);
127} 130}
128 131
129#ifndef PWM_EMBEDDED 132#ifndef PWM_EMBEDDED_
130#include "listobjselectwnd.moc" 133#include "moc_listobjselectwnd.cpp"
131#endif 134#endif
diff --git a/pwmanager/pwmanager/listobjselectwnd.h b/pwmanager/pwmanager/listobjselectwnd.h
index 3b5f1eb..df3da93 100644
--- a/pwmanager/pwmanager/listobjselectwnd.h
+++ b/pwmanager/pwmanager/listobjselectwnd.h
@@ -21,12 +21,14 @@
21#define LISTOBJSELECTWND_H 21#define LISTOBJSELECTWND_H
22 22
23#include <qdialog.h> 23#include <qdialog.h>
24#include <qvbox.h> 24#include <q3vbox.h>
25#include <qhbox.h> 25#include <q3hbox.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlistbox.h> 27#include <q3listbox.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qstringlist.h> 29#include <qstringlist.h>
30//Added by qt3to4:
31#include <QResizeEvent>
30 32
31 33
32/** Display a list-window for selection of some objects */ 34/** Display a list-window for selection of some objects */
@@ -37,7 +39,7 @@ public:
37 ListObjSelectWnd(const QString &caption, const QString &titleText, 39 ListObjSelectWnd(const QString &caption, const QString &titleText,
38 QWidget *parent = 0, bool multiSel = false, 40 QWidget *parent = 0, bool multiSel = false,
39 const char *name = 0, 41 const char *name = 0,
40 bool modal = FALSE, WFlags f = 0); 42 bool modal = FALSE, Qt::WFlags f = 0);
41 ~ListObjSelectWnd(); 43 ~ListObjSelectWnd();
42 44
43 void setList(const QStringList &_list); 45 void setList(const QStringList &_list);
@@ -62,11 +64,11 @@ public:
62 { list->clear(); } 64 { list->clear(); }
63 65
64protected: 66protected:
65 QVBox *vbox1; 67 Q3VBox *vbox1;
66 QHBox *hbox1; 68 Q3HBox *hbox1;
67 QHBox *hbox2; 69 Q3HBox *hbox2;
68 QLabel *title; 70 QLabel *title;
69 QListBox *list; 71 Q3ListBox *list;
70 QPushButton *okButton; 72 QPushButton *okButton;
71 QPushButton *cancelButton; 73 QPushButton *cancelButton;
72 QPushButton *selAllButton; 74 QPushButton *selAllButton;
diff --git a/pwmanager/pwmanager/listviewpwm.cpp b/pwmanager/pwmanager/listviewpwm.cpp
index 0df9431..4253ab1 100644
--- a/pwmanager/pwmanager/listviewpwm.cpp
+++ b/pwmanager/pwmanager/listviewpwm.cpp
@@ -23,6 +23,9 @@
23 23
24#include <qpainter.h> 24#include <qpainter.h>
25#include <qpixmap.h> 25#include <qpixmap.h>
26//Added by qt3to4:
27#include <QEvent>
28#include <QKeyEvent>
26 29
27#include <kiconloader.h> 30#include <kiconloader.h>
28 31
@@ -39,7 +42,7 @@ ListViewPwM::ListViewPwM(QWidget *parent, const char *name)
39 42
40bool ListViewPwM::event(QEvent *e) 43bool ListViewPwM::event(QEvent *e)
41{ 44{
42 if (e->type() == QEvent::LayoutHint) 45 if (e->type() == QEvent::LayoutRequest)
43 emit layoutChanged(); 46 emit layoutChanged();
44 if (e->type() == QEvent::KeyPress) { 47 if (e->type() == QEvent::KeyPress) {
45 QKeyEvent* ke = (QKeyEvent*) e; 48 QKeyEvent* ke = (QKeyEvent*) e;
@@ -64,8 +67,8 @@ bool ListViewPwM::event(QEvent *e)
64QPixmap * ListViewItemPwM::onPix = 0; 67QPixmap * ListViewItemPwM::onPix = 0;
65QPixmap * ListViewItemPwM::offPix = 0; 68QPixmap * ListViewItemPwM::offPix = 0;
66 69
67ListViewItemPwM::ListViewItemPwM(QListView *parent) 70ListViewItemPwM::ListViewItemPwM(Q3ListView *parent)
68 : QCheckListItem(parent, "", QCheckListItem::CheckBox) 71 : Q3CheckListItem(parent, "", Q3CheckListItem::CheckBox)
69{ 72{
70 if (!onPix) { 73 if (!onPix) {
71 PWM_ASSERT(!offPix); 74 PWM_ASSERT(!offPix);
@@ -97,7 +100,7 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg,
97 return; 100 return;
98 //US BUG: 101 //US BUG:
99 if (column != COLUMN_DESC) { 102 if (column != COLUMN_DESC) {
100 QCheckListItem::paintCell(p, cg, column, width, align); 103 Q3CheckListItem::paintCell(p, cg, column, width, align);
101 return; 104 return;
102 } 105 }
103 QPixmap *curPix = isOn() ? onPix : offPix; 106 QPixmap *curPix = isOn() ? onPix : offPix;
@@ -120,10 +123,10 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg,
120 p->translate( pixSpace, 0 ); 123 p->translate( pixSpace, 0 );
121 124
122#endif 125#endif
123 QListViewItem::paintCell(p, cg, column, width - pixSpace, align); 126 Q3ListViewItem::paintCell(p, cg, column, width - pixSpace, align);
124 127
125} 128}
126 129
127#ifndef PWM_EMBEDDED 130#ifndef PWM_EMBEDDED_
128#include "listviewpwm.moc" 131#include "moc_listviewpwm.cpp"
129#endif 132#endif
diff --git a/pwmanager/pwmanager/listviewpwm.h b/pwmanager/pwmanager/listviewpwm.h
index 51008b8..2652939 100644
--- a/pwmanager/pwmanager/listviewpwm.h
+++ b/pwmanager/pwmanager/listviewpwm.h
@@ -21,6 +21,9 @@
21#define __LISTVIEW_H 21#define __LISTVIEW_H
22 22
23#include <klistview.h> 23#include <klistview.h>
24//Added by qt3to4:
25#include <QEvent>
26#include <QPixmap>
24 27
25/** PwManager implementation of the list view. 28/** PwManager implementation of the list view.
26 * Derived from KListView. 29 * Derived from KListView.
@@ -41,10 +44,10 @@ protected:
41 virtual bool event(QEvent *e); 44 virtual bool event(QEvent *e);
42}; 45};
43 46
44class ListViewItemPwM : public QCheckListItem 47class ListViewItemPwM : public Q3CheckListItem
45{ 48{
46public: 49public:
47 ListViewItemPwM(QListView *parent); 50 ListViewItemPwM(Q3ListView *parent);
48 51
49protected: 52protected:
50 void paintCell(QPainter *p, const QColorGroup &cg, 53 void paintCell(QPainter *p, const QColorGroup &cg,
diff --git a/pwmanager/pwmanager/main.cpp b/pwmanager/pwmanager/main.cpp
index ee26082..acb0011 100644
--- a/pwmanager/pwmanager/main.cpp
+++ b/pwmanager/pwmanager/main.cpp
@@ -142,6 +142,7 @@ static void addAuthors(KAboutData *aboutData)
142 142
143int main(int argc, char *argv[]) 143int main(int argc, char *argv[])
144{ 144{
145 if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi");
145 printDebugConfigureInfo(); 146 printDebugConfigureInfo();
146#ifndef PWM_EMBEDDED 147#ifndef PWM_EMBEDDED
147 KAboutData aboutData(PACKAGE_NAME, PROG_NAME, 148 KAboutData aboutData(PACKAGE_NAME, PROG_NAME,
diff --git a/pwmanager/pwmanager/printtext.h b/pwmanager/pwmanager/printtext.h
index 82e31b0..71bc2e0 100644
--- a/pwmanager/pwmanager/printtext.h
+++ b/pwmanager/pwmanager/printtext.h
@@ -15,7 +15,7 @@
15#include <kprinter.h> 15#include <kprinter.h>
16 16
17#include <qpainter.h> 17#include <qpainter.h>
18#include <qpaintdevicemetrics.h> 18#include <q3paintdevicemetrics.h>
19#include <qrect.h> 19#include <qrect.h>
20#include <qpoint.h> 20#include <qpoint.h>
21 21
@@ -42,7 +42,7 @@ protected:
42 /** painter object */ 42 /** painter object */
43 QPainter *paint; 43 QPainter *paint;
44 /** metrics */ 44 /** metrics */
45 QPaintDeviceMetrics *metrics; 45 Q3PaintDeviceMetrics *metrics;
46 /** left field of header */ 46 /** left field of header */
47 QString headerLeft; 47 QString headerLeft;
48 /** middle field of header */ 48 /** middle field of header */
diff --git a/pwmanager/pwmanager/pwgenwnd_emb.cpp b/pwmanager/pwmanager/pwgenwnd_emb.cpp
index 429904c..21e0af4 100644
--- a/pwmanager/pwmanager/pwgenwnd_emb.cpp
+++ b/pwmanager/pwmanager/pwgenwnd_emb.cpp
@@ -26,12 +26,15 @@ $Id$
26#include "pwgenwnd_emb.h" 26#include "pwgenwnd_emb.h"
27 27
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qgroupbox.h> 29#include <q3groupbox.h>
30#include <qcheckbox.h> 30#include <qcheckbox.h>
31#include <qlabel.h> 31#include <qlabel.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qspinbox.h> 33#include <qspinbox.h>
34#include <qlayout.h> 34#include <qlayout.h>
35//Added by qt3to4:
36#include <Q3HBoxLayout>
37#include <Q3VBoxLayout>
35 38
36#include "klocale.h" 39#include "klocale.h"
37 40
@@ -46,14 +49,14 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name)
46 KDialogBase::Ok, parent, name, true ) 49 KDialogBase::Ok, parent, name, true )
47{ 50{
48 QWidget *page = plainPage(); 51 QWidget *page = plainPage();
49 QVBoxLayout* pwGenWndLayout = new QVBoxLayout( page, 11, 6, "pwGenWndLayout"); 52 Q3VBoxLayout* pwGenWndLayout = new Q3VBoxLayout( page, 11, 6, "pwGenWndLayout");
50 53
51 QGroupBox* groupBox1 = new QGroupBox( page, "groupBox1" ); 54 Q3GroupBox* groupBox1 = new Q3GroupBox( page, "groupBox1" );
52 groupBox1->setTitle( i18n( "Character set:" ) ); 55 groupBox1->setTitle( i18n( "Character set:" ) );
53 groupBox1->setColumnLayout(0, Qt::Vertical ); 56 groupBox1->setColumnLayout(0, Qt::Vertical );
54 groupBox1->layout()->setSpacing( 6 ); 57 groupBox1->layout()->setSpacing( 6 );
55 groupBox1->layout()->setMargin( 11 ); 58 groupBox1->layout()->setMargin( 11 );
56 QVBoxLayout* groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); 59 Q3VBoxLayout* groupBox1Layout = new Q3VBoxLayout( groupBox1->layout() );
57 groupBox1Layout->setAlignment( Qt::AlignTop ); 60 groupBox1Layout->setAlignment( Qt::AlignTop );
58 61
59 int_charLowerCheckBox = new QCheckBox( i18n("Lowercase (abc)"), groupBox1, "int_charLowerCheckBox" ); 62 int_charLowerCheckBox = new QCheckBox( i18n("Lowercase (abc)"), groupBox1, "int_charLowerCheckBox" );
@@ -80,7 +83,7 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name)
80 int_charBlankCheckBox = new QCheckBox( i18n( "Spaces (blank characters)"), groupBox1, "int_charBlankCheckBox" ); 83 int_charBlankCheckBox = new QCheckBox( i18n( "Spaces (blank characters)"), groupBox1, "int_charBlankCheckBox" );
81 groupBox1Layout->addWidget( int_charBlankCheckBox ); 84 groupBox1Layout->addWidget( int_charBlankCheckBox );
82 85
83 QHBoxLayout* layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); 86 Q3HBoxLayout* layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7");
84 87
85 int_charUserCheckBox = new QCheckBox( i18n("User defined:"), groupBox1, "int_charUserCheckBox" ); 88 int_charUserCheckBox = new QCheckBox( i18n("User defined:"), groupBox1, "int_charUserCheckBox" );
86 layout7->addWidget( int_charUserCheckBox ); 89 layout7->addWidget( int_charUserCheckBox );
@@ -92,7 +95,7 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name)
92 pwGenWndLayout->addWidget( groupBox1 ); 95 pwGenWndLayout->addWidget( groupBox1 );
93 96
94 97
95 QHBoxLayout* layout8 = new QHBoxLayout( 0, 0, 6, "layout8"); 98 Q3HBoxLayout* layout8 = new Q3HBoxLayout( 0, 0, 6, "layout8");
96 99
97 int_lenSpinBox = new QSpinBox( page, "int_lenSpinBox" ); 100 int_lenSpinBox = new QSpinBox( page, "int_lenSpinBox" );
98 QLabel* textLabel2 = new QLabel( int_lenSpinBox, i18n("Password Length:"), page, "textLabel2" ); 101 QLabel* textLabel2 = new QLabel( int_lenSpinBox, i18n("Password Length:"), page, "textLabel2" );
diff --git a/pwmanager/pwmanager/pwgenwndimpl.cpp b/pwmanager/pwmanager/pwgenwndimpl.cpp
index 5313060..0eb7043 100644
--- a/pwmanager/pwmanager/pwgenwndimpl.cpp
+++ b/pwmanager/pwmanager/pwgenwndimpl.cpp
@@ -34,7 +34,7 @@
34PwGenWndImpl::PwGenWndImpl(QWidget *parent, 34PwGenWndImpl::PwGenWndImpl(QWidget *parent,
35 const char *name, 35 const char *name,
36 bool modal, 36 bool modal,
37 WFlags fl) 37 Qt::WFlags fl)
38 : pwGenWnd(parent, name, modal, fl) 38 : pwGenWnd(parent, name, modal, fl)
39{ 39{
40} 40}
diff --git a/pwmanager/pwmanager/pwgenwndimpl.h b/pwmanager/pwmanager/pwgenwndimpl.h
index 994ff2f..1e706a1 100644
--- a/pwmanager/pwmanager/pwgenwndimpl.h
+++ b/pwmanager/pwmanager/pwgenwndimpl.h
@@ -33,7 +33,7 @@ public:
33 PwGenWndImpl(QWidget *parent = 0, 33 PwGenWndImpl(QWidget *parent = 0,
34 const char *name = 0, 34 const char *name = 0,
35 bool modal = FALSE, 35 bool modal = FALSE,
36 WFlags fl = 0); 36 Qt::WFlags fl = 0);
37#else 37#else
38 PwGenWndImpl( QWidget* parent = 0, const char* name = 0); 38 PwGenWndImpl( QWidget* parent = 0, const char* name = 0);
39#endif 39#endif
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 8373850..694fb13 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -25,6 +25,12 @@
25#include <kmessagebox.h> 25#include <kmessagebox.h>
26 26
27#include <qstatusbar.h> 27#include <qstatusbar.h>
28#include <QDesktopWidget>
29//Added by qt3to4:
30#include <Q3ValueList>
31#include <QHideEvent>
32#include <QFocusEvent>
33#include <QCloseEvent>
28 34
29#ifndef PWM_EMBEDDED 35#ifndef PWM_EMBEDDED
30#include <kmenubar.h> 36#include <kmenubar.h>
@@ -186,7 +192,7 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc,
186 initToolbar(); 192 initToolbar();
187 initMetrics(); 193 initMetrics();
188 setVirgin(virginity); 194 setVirgin(virginity);
189 setFocusPolicy(QWidget::WheelFocus); 195 setFocusPolicy(Qt::WheelFocus);
190#ifndef PWM_EMBEDDED 196#ifndef PWM_EMBEDDED
191 statusBar()->show(); 197 statusBar()->show();
192#endif 198#endif
@@ -240,20 +246,20 @@ void PwM::initMenubar()
240 optionsPopup = new KPopupMenu(this); 246 optionsPopup = new KPopupMenu(this);
241 247
242// "file" popup menu 248// "file" popup menu
243 filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), 249 filePopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)),
244 i18n("&New"), this, 250 i18n("&New"), this,
245 SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); 251 SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW);
246 filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), 252 filePopup->insertItem(QIcon(picons->loadIcon("fileopen", KIcon::Small)),
247 i18n("&Open"), this, 253 i18n("&Open"), this,
248 SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); 254 SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN);
249 filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), 255 filePopup->insertItem(QIcon(picons->loadIcon("fileclose", KIcon::Small)),
250 i18n("&Close"), this, 256 i18n("&Close"), this,
251 SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); 257 SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE);
252 filePopup->insertSeparator(); 258 filePopup->insertSeparator();
253 filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), 259 filePopup->insertItem(QIcon(picons->loadIcon("filesave", KIcon::Small)),
254 i18n("&Save"), this, 260 i18n("&Save"), this,
255 SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); 261 SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE);
256 filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), 262 filePopup->insertItem(QIcon(picons->loadIcon("filesaveas", KIcon::Small)),
257 i18n("Save &as..."), 263 i18n("Save &as..."),
258 this, SLOT(saveAs_slot()), 0, 264 this, SLOT(saveAs_slot()), 0,
259 BUTTON_POPUP_FILE_SAVEAS); 265 BUTTON_POPUP_FILE_SAVEAS);
@@ -269,7 +275,7 @@ void PwM::initMenubar()
269 exportPopup->insertItem(i18n("&KWallet..."), this, 275 exportPopup->insertItem(i18n("&KWallet..."), this,
270 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); 276 SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET);
271#endif 277#endif
272 filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), 278 filePopup->insertItem(QIcon(picons->loadIcon("fileexport", KIcon::Small)),
273 i18n("E&xport"), exportPopup, 279 i18n("E&xport"), exportPopup,
274 BUTTON_POPUP_FILE_EXPORT); 280 BUTTON_POPUP_FILE_EXPORT);
275 // "file/import" popup menu 281 // "file/import" popup menu
@@ -283,87 +289,87 @@ void PwM::initMenubar()
283 importPopup->insertItem(i18n("&KWallet..."), this, 289 importPopup->insertItem(i18n("&KWallet..."), this,
284 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); 290 SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET);
285#endif 291#endif
286 filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), 292 filePopup->insertItem(QIcon(picons->loadIcon("fileimport", KIcon::Small)),
287 i18n("I&mport"), importPopup, 293 i18n("I&mport"), importPopup,
288 BUTTON_POPUP_FILE_IMPORT); 294 BUTTON_POPUP_FILE_IMPORT);
289 filePopup->insertSeparator(); 295 filePopup->insertSeparator();
290#if 0 296#if 0
291 filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), 297 filePopup->insertItem(QIcon(picons->loadIcon("fileprint", KIcon::Small)),
292 i18n("&Print..."), this, 298 i18n("&Print..."), this,
293 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); 299 SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT);
294 filePopup->insertSeparator(); 300 filePopup->insertSeparator();
295#endif 301#endif
296 filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), 302 filePopup->insertItem(QIcon(picons->loadIcon("exit", KIcon::Small)),
297 i18n("&Quit"), this, 303 i18n("&Quit"), this,
298 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); 304 SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT);
299 menuBar()->insertItem(i18n("&File"), filePopup); 305 menuBar()->insertItem(i18n("&File"), filePopup);
300// "manage" popup menu 306// "manage" popup menu
301 managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), 307 managePopup->insertItem(QIcon(picons->loadIcon("pencil", KIcon::Small)),
302 i18n("&Add password"), this, 308 i18n("&Add password"), this,
303 SLOT(addPwd_slot()), 0, 309 SLOT(addPwd_slot()), 0,
304 BUTTON_POPUP_MANAGE_ADD); 310 BUTTON_POPUP_MANAGE_ADD);
305 managePopup->insertSeparator(); 311 managePopup->insertSeparator();
306 managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), 312 managePopup->insertItem(QIcon(picons->loadIcon("edit", KIcon::Small)),
307 i18n("&Edit"), this, SLOT(editPwd_slot()), 0, 313 i18n("&Edit"), this, SLOT(editPwd_slot()), 0,
308 BUTTON_POPUP_MANAGE_EDIT); 314 BUTTON_POPUP_MANAGE_EDIT);
309 managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), 315 managePopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)),
310 i18n("&Delete"), this, SLOT(deletePwd_slot()), 316 i18n("&Delete"), this, SLOT(deletePwd_slot()),
311 0, BUTTON_POPUP_MANAGE_DEL); 317 0, BUTTON_POPUP_MANAGE_DEL);
312 managePopup->insertSeparator(); 318 managePopup->insertSeparator();
313 managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), 319 managePopup->insertItem(QIcon(picons->loadIcon("rotate", KIcon::Small)),
314 i18n("Change &Master Password"), this, 320 i18n("Change &Master Password"), this,
315 SLOT(changeMasterPwd_slot()), 0, 321 SLOT(changeMasterPwd_slot()), 0,
316 BUTTON_POPUP_MANAGE_CHANGEMP); 322 BUTTON_POPUP_MANAGE_CHANGEMP);
317 menuBar()->insertItem(i18n("&Manage"), managePopup); 323 menuBar()->insertItem(i18n("&Manage"), managePopup);
318// "chipcard" popup menu 324// "chipcard" popup menu
319#ifdef CONFIG_KEYCARD 325#ifdef CONFIG_KEYCARD
320 chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), 326 chipcardPopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)),
321 i18n("&Generate new key-card"), this, 327 i18n("&Generate new key-card"), this,
322 SLOT(genNewCard_slot()), 0, 328 SLOT(genNewCard_slot()), 0,
323 BUTTON_POPUP_CHIPCARD_GENNEW); 329 BUTTON_POPUP_CHIPCARD_GENNEW);
324 chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), 330 chipcardPopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)),
325 i18n("&Erase key-card"), this, 331 i18n("&Erase key-card"), this,
326 SLOT(eraseCard_slot()), 0, 332 SLOT(eraseCard_slot()), 0,
327 BUTTON_POPUP_CHIPCARD_DEL); 333 BUTTON_POPUP_CHIPCARD_DEL);
328 chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), 334 chipcardPopup->insertItem(QIcon(picons->loadIcon("", KIcon::Small)),
329 i18n("Read card-&ID"), this, 335 i18n("Read card-&ID"), this,
330 SLOT(readCardId_slot()), 0, 336 SLOT(readCardId_slot()), 0,
331 BUTTON_POPUP_CHIPCARD_READID); 337 BUTTON_POPUP_CHIPCARD_READID);
332 chipcardPopup->insertSeparator(); 338 chipcardPopup->insertSeparator();
333 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), 339 chipcardPopup->insertItem(QIcon(picons->loadIcon("2rightarrow", KIcon::Small)),
334 i18n("&Make card backup-image"), this, 340 i18n("&Make card backup-image"), this,
335 SLOT(makeCardBackup_slot()), 0, 341 SLOT(makeCardBackup_slot()), 0,
336 BUTTON_POPUP_CHIPCARD_SAVEBACKUP); 342 BUTTON_POPUP_CHIPCARD_SAVEBACKUP);
337 chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), 343 chipcardPopup->insertItem(QIcon(picons->loadIcon("2leftarrow", KIcon::Small)),
338 i18n("&Replay card backup-image"), this, 344 i18n("&Replay card backup-image"), this,
339 SLOT(replayCardBackup_slot()), 0, 345 SLOT(replayCardBackup_slot()), 0,
340 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP); 346 BUTTON_POPUP_CHIPCARD_REPLAYBACKUP);
341 menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup); 347 menuBar()->insertItem(i18n("&Chipcard manager"), chipcardPopup);
342#endif // CONFIG_KEYCARD 348#endif // CONFIG_KEYCARD
343// "view" popup menu 349// "view" popup menu
344 viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), 350 viewPopup->insertItem(QIcon(picons->loadIcon("find", KIcon::Small)),
345 i18n("&Find"), this, 351 i18n("&Find"), this,
346 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); 352 SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND);
347 viewPopup->insertSeparator(); 353 viewPopup->insertSeparator();
348 viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), 354 viewPopup->insertItem(QIcon(picons->loadIcon("halfencrypted", KIcon::Small)),
349 i18n("&Lock all entries"), this, 355 i18n("&Lock all entries"), this,
350 SLOT(lockWnd_slot()), 0, 356 SLOT(lockWnd_slot()), 0,
351 BUTTON_POPUP_VIEW_LOCK); 357 BUTTON_POPUP_VIEW_LOCK);
352 viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), 358 viewPopup->insertItem(QIcon(picons->loadIcon("encrypted", KIcon::Small)),
353 i18n("&Deep-lock all entries"), this, 359 i18n("&Deep-lock all entries"), this,
354 SLOT(deepLockWnd_slot()), 0, 360 SLOT(deepLockWnd_slot()), 0,
355 BUTTON_POPUP_VIEW_DEEPLOCK); 361 BUTTON_POPUP_VIEW_DEEPLOCK);
356 viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), 362 viewPopup->insertItem(QIcon(picons->loadIcon("decrypted", KIcon::Small)),
357 i18n("&Unlock all entries"), this, 363 i18n("&Unlock all entries"), this,
358 SLOT(unlockWnd_slot()), 0, 364 SLOT(unlockWnd_slot()), 0,
359 BUTTON_POPUP_VIEW_UNLOCK); 365 BUTTON_POPUP_VIEW_UNLOCK);
360 menuBar()->insertItem(i18n("&View"), viewPopup); 366 menuBar()->insertItem(i18n("&View"), viewPopup);
361// "options" popup menu 367// "options" popup menu
362 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 368 optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)),
363 i18n("&Configure PwM/Pi..."), this, 369 i18n("&Configure PwM/Pi..."), this,
364 SLOT(config_slot()),0, 370 SLOT(config_slot()),0,
365 BUTTON_POPUP_OPTIONS_CONFIG); 371 BUTTON_POPUP_OPTIONS_CONFIG);
366 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 372 optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)),
367 i18n("Global Settings..."), this, 373 i18n("Global Settings..."), this,
368 SLOT(config_global_slot()),0, 374 SLOT(config_global_slot()),0,
369 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG); 375 BUTTON_POPUP_OPTIONS_GLOBAL_CONFIG);
@@ -376,7 +382,7 @@ void PwM::initMenubar()
376#ifndef PWM_EMBEDDED 382#ifndef PWM_EMBEDDED
377 helpPopup = helpMenu(QString::null, false); 383 helpPopup = helpMenu(QString::null, false);
378#else 384#else
379 optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), 385 optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)),
380 i18n("C&ategories..."), this, 386 i18n("C&ategories..."), this,
381 SLOT(category_slot()),0, 387 SLOT(category_slot()),0,
382 BUTTON_POPUP_OPTIONS_CATEGORY); 388 BUTTON_POPUP_OPTIONS_CATEGORY);
@@ -922,12 +928,12 @@ void PwM::config_slot()
922 ++i; 928 ++i;
923 } 929 }
924 930
925 const QValueList<PwM *> *ml = init->mainWndList(); 931 const Q3ValueList<PwM *> *ml = init->mainWndList();
926#ifndef PWM_EMBEDDED 932#ifndef PWM_EMBEDDED
927 QValueList<PwM *>::const_iterator i2 = ml->begin(), 933 Q3ValueList<PwM *>::const_iterator i2 = ml->begin(),
928 end2 = ml->end(); 934 end2 = ml->end();
929#else 935#else
930 QValueList<PwM *>::ConstIterator i2 = ml->begin(), 936 Q3ValueList<PwM *>::ConstIterator i2 = ml->begin(),
931 end2 = ml->end(); 937 end2 = ml->end();
932#endif 938#endif
933 PwM *pwm; 939 PwM *pwm;
@@ -1594,6 +1600,6 @@ void PwM::removeSyncInfo( QString syncProfile)
1594#endif 1600#endif
1595 1601
1596 1602
1597#ifndef PWM_EMBEDDED 1603#ifndef PWM_EMBEDDED_
1598#include "pwm.moc" 1604#include "moc_pwm.cpp"
1599#endif 1605#endif
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index c4bbb4e..450d13f 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -36,6 +36,11 @@
36#include <kaction.h> 36#include <kaction.h>
37 37
38#include <qglobal.h> 38#include <qglobal.h>
39//Added by qt3to4:
40#include <QCloseEvent>
41#include <QFocusEvent>
42#include <Q3PopupMenu>
43#include <QHideEvent>
39 44
40#include "pwmview.h" 45#include "pwmview.h"
41#include "pwmexception.h" 46#include "pwmexception.h"
@@ -50,9 +55,9 @@ class KSyncManager;
50 55
51/** PwM is the base class of the project */ 56/** PwM is the base class of the project */
52#ifndef PWM_EMBEDDED 57#ifndef PWM_EMBEDDED
53//MOC_SKIP_BEGIN 58#ifndef Q_MOC_RUN
54class PwM : public KMainWindow 59class PwM : public KMainWindow
55//MOC_SKIP_END 60#endif
56#else 61#else
57class PwM : public KMainWindow, public KSyncInterface 62class PwM : public KMainWindow, public KSyncInterface
58#endif 63#endif
@@ -284,7 +289,7 @@ protected:
284 289
285 // LR ******************************* 290 // LR *******************************
286 // sync stuff! 291 // sync stuff!
287 QPopupMenu *syncPopup; 292 Q3PopupMenu *syncPopup;
288 KSyncManager* syncManager; 293 KSyncManager* syncManager;
289#endif 294#endif
290 295
diff --git a/pwmanager/pwmanager/pwmanager.pro b/pwmanager/pwmanager/pwmanager.pro
index 7efe45c..d6d8dbe 100644
--- a/pwmanager/pwmanager/pwmanager.pro
+++ b/pwmanager/pwmanager/pwmanager.pro
@@ -11,8 +11,8 @@ DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION
11#DEFINES += CONFIG_DEBUG 11#DEFINES += CONFIG_DEBUG
12LIBS += -L../libcrypt/ 12LIBS += -L../libcrypt/
13LIBS += -L../../bin/ 13LIBS += -L../../bin/
14LIBS += -lmicrokde 14LIBS += -lxmicrokde
15LIBS += -lmicrokdepim 15LIBS += -lxmicrokdepim
16LIBS += -lzlib 16LIBS += -lzlib
17LIBS += -lkpmicrocipher 17LIBS += -lkpmicrocipher
18LIBS += -lkpmicroerror 18LIBS += -lkpmicroerror
@@ -175,3 +175,5 @@ kcmconfigs/pwmconfigwidget.cpp
175 175
176 176
177 177
178#The following line was inserted by qt3to4
179QT += xml qt3support
diff --git a/pwmanager/pwmanager/pwmanagerE.pro b/pwmanager/pwmanager/pwmanagerE.pro
index 6b68514..e80d1ae 100644
--- a/pwmanager/pwmanager/pwmanagerE.pro
+++ b/pwmanager/pwmanager/pwmanagerE.pro
@@ -14,9 +14,9 @@ DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY
14#DEFINES += CONFIG_DEBUG 14#DEFINES += CONFIG_DEBUG
15 15
16LIBS += -L../libcrypt/$(PLATFORM) 16LIBS += -L../libcrypt/$(PLATFORM)
17LIBS += -lmicrokde 17LIBS += -lxmicrokde
18LIBS += -lmicroqtcompat 18LIBS += -lmicroqtcompat
19LIBS += -lmicrokdepim 19LIBS += -lxmicrokdepim
20LIBS += -L$(QPEDIR)/lib 20LIBS += -L$(QPEDIR)/lib
21LIBS += -lqpe 21LIBS += -lqpe
22LIBS += -lzlib 22LIBS += -lzlib
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index b58d7e2..9213360 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -48,6 +48,7 @@
48#include <qsize.h> 48#include <qsize.h>
49#include <qfileinfo.h> 49#include <qfileinfo.h>
50#include <qfile.h> 50#include <qfile.h>
51#include <QDesktopWidget>
51 52
52#include <stdio.h> 53#include <stdio.h>
53#include <stdlib.h> 54#include <stdlib.h>
@@ -481,7 +482,8 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file)
481 char rnd_buf[5]; 482 char rnd_buf[5];
482 sprintf(rnd_buf, "%X%X%X%X", rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF, 483 sprintf(rnd_buf, "%X%X%X%X", rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF,
483 rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF); 484 rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF);
484 tmpFileMoved = filename + "." + rnd_buf + ".mv"; 485 tmpFileMoved = filename; tmpFileMoved += '.';
486 tmpFileMoved += rnd_buf; tmpFileMoved += ".mv";
485 if (!copyFile(filename, tmpFileMoved)) 487 if (!copyFile(filename, tmpFileMoved))
486 return e_openFile; 488 return e_openFile;
487 if (!QFile::remove(filename)) { 489 if (!QFile::remove(filename)) {
@@ -491,7 +493,7 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file)
491 } 493 }
492 } 494 }
493 f.setName(filename); 495 f.setName(filename);
494 if (!f.open(IO_ReadWrite)) { 496 if (!f.open(QIODevice::ReadWrite)) {
495 ret = e_openFile; 497 ret = e_openFile;
496 goto out_moveback; 498 goto out_moveback;
497 } 499 }
@@ -634,7 +636,7 @@ PwMerror PwMDoc::openDoc(const QString *file, int openLocked)
634 goto out_success; 636 goto out_success;
635 } 637 }
636 638
637 if (!f.open(IO_ReadOnly)) 639 if (!f.open(QIODevice::ReadOnly))
638 return e_openFile; 640 return e_openFile;
639 641
640 ret = checkHeader(&cryptAlgo, &currentPw, &compress, &headerLen, 642 ret = checkHeader(&cryptAlgo, &currentPw, &compress, &headerLen,
@@ -1003,10 +1005,10 @@ bool PwMDoc::copyFile(const QString &src, const QString &dst)
1003 return false; 1005 return false;
1004 } 1006 }
1005 QFile srcFd(src); 1007 QFile srcFd(src);
1006 if (!srcFd.open(IO_ReadOnly)) 1008 if (!srcFd.open(QIODevice::ReadOnly))
1007 return false; 1009 return false;
1008 QFile dstFd(dst); 1010 QFile dstFd(dst);
1009 if (!dstFd.open(IO_ReadWrite)) { 1011 if (!dstFd.open(QIODevice::ReadWrite)) {
1010 srcFd.close(); 1012 srcFd.close();
1011 return false; 1013 return false;
1012 } 1014 }
@@ -1485,7 +1487,7 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
1485 PWM_ASSERT(pw); 1487 PWM_ASSERT(pw);
1486 PWM_ASSERT(f); 1488 PWM_ASSERT(f);
1487 1489
1488 unsigned int cryptLen = f->size() - pos; 1490 size_t cryptLen = f->size() - pos;
1489 byte *encrypted = new byte[cryptLen]; 1491 byte *encrypted = new byte[cryptLen];
1490 byte *decrypted = new byte[cryptLen]; 1492 byte *decrypted = new byte[cryptLen];
1491 1493
@@ -1525,9 +1527,9 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
1525 return e_cryptNotImpl; 1527 return e_cryptNotImpl;
1526 LibGCryptIf gc; 1528 LibGCryptIf gc;
1527 PwMerror err; 1529 PwMerror err;
1528 err = gc.decrypt(&decrypted, 1530 err = gc.decrypt((unsigned char **)&decrypted,
1529 &cryptLen, 1531 &cryptLen,
1530 encrypted, 1532 (unsigned char*)encrypted,
1531 cryptLen, 1533 cryptLen,
1532 reinterpret_cast<const unsigned char *>(pw->latin1()), 1534 reinterpret_cast<const unsigned char *>(pw->latin1()),
1533 pw->length(), 1535 pw->length(),
@@ -2433,7 +2435,7 @@ PwMerror PwMDoc::exportToText(const QString *file)
2433 return e_accessFile; 2435 return e_accessFile;
2434 } 2436 }
2435 QFile f(*file); 2437 QFile f(*file);
2436 if (!f.open(IO_ReadWrite)) 2438 if (!f.open(QIODevice::ReadWrite))
2437 return e_openFile; 2439 return e_openFile;
2438 2440
2439 if (!unlockAll_tempoary()) { 2441 if (!unlockAll_tempoary()) {
@@ -2707,7 +2709,7 @@ PwMerror PwMDoc::importText_PwM(const QString *file)
2707 string curCat; 2709 string curCat;
2708 unsigned int entriesRead = 0; 2710 unsigned int entriesRead = 0;
2709 PwMDataItem currItem; 2711 PwMDataItem currItem;
2710 bool res = f.open(IO_ReadOnly); 2712 bool res = f.open(QIODevice::ReadOnly);
2711 if (res == false) 2713 if (res == false)
2712 return e_openFile; 2714 return e_openFile;
2713 2715
@@ -3629,6 +3631,6 @@ QStringList PwMDoc::getIDEntryList()
3629 3631
3630 3632
3631 3633
3632#ifndef PWM_EMBEDDED 3634#ifndef PWM_EMBEDDED_
3633#include "pwmdoc.moc" 3635#include "moc_pwmdoc.cpp"
3634#endif 3636#endif
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 144831f..07c97a9 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -212,7 +212,7 @@ struct PwMDataItem
212 //US ENH: we need this operator to compare two items if we have no unique ids 212 //US ENH: we need this operator to compare two items if we have no unique ids
213 //available. Generaly this happens before the first sync 213 //available. Generaly this happens before the first sync
214 214
215 bool PwMDataItem::operator==( const PwMDataItem &a ) const 215 bool operator==( const PwMDataItem &a ) const
216 { 216 {
217 //qDebug("oper==%s", a.desc.c_str()); 217 //qDebug("oper==%s", a.desc.c_str());
218 if ( desc != a.desc ) return false; 218 if ( desc != a.desc ) return false;
@@ -227,7 +227,7 @@ struct PwMDataItem
227 227
228 //US ENH: this sync method actually copies all values from the parameter like the =operator 228 //US ENH: this sync method actually copies all values from the parameter like the =operator
229 //does with two exceptions: listViewPos will not be changed, and the launcher only if required. 229 //does with two exceptions: listViewPos will not be changed, and the launcher only if required.
230 bool PwMDataItem::syncItem(const PwMDataItem &a, bool syncLauncher=true ) 230 bool syncItem(const PwMDataItem &a, bool syncLauncher=true )
231 { 231 {
232 desc = a.desc; 232 desc = a.desc;
233 name = a.name; 233 name = a.name;
diff --git a/pwmanager/pwmanager/pwmdocui.cpp b/pwmanager/pwmanager/pwmdocui.cpp
index a9916c2..ea96509 100644
--- a/pwmanager/pwmanager/pwmdocui.cpp
+++ b/pwmanager/pwmanager/pwmdocui.cpp
@@ -465,6 +465,6 @@ QString PwMDocUi::string_defaultTitle()
465 return i18n("Untitled"); 465 return i18n("Untitled");
466} 466}
467 467
468#ifndef PWM_EMBEDDED 468#ifndef PWM_EMBEDDED_
469#include "pwmdocui.moc" 469#include "moc_pwmdocui.cpp"
470#endif 470#endif
diff --git a/pwmanager/pwmanager/pwminit.cpp b/pwmanager/pwmanager/pwminit.cpp
index d59d4d8..15e21ee 100644
--- a/pwmanager/pwmanager/pwminit.cpp
+++ b/pwmanager/pwmanager/pwminit.cpp
@@ -20,6 +20,8 @@
20#include "pwminit.h" 20#include "pwminit.h"
21#include "randomizer.h" 21#include "randomizer.h"
22#include <qdir.h> 22#include <qdir.h>
23//Added by qt3to4:
24#include <Q3ValueList>
23 25
24#ifndef PWM_EMBEDDED 26#ifndef PWM_EMBEDDED
25#include "selftest.h" 27#include "selftest.h"
@@ -92,12 +94,12 @@ PwMInit::~PwMInit()
92#ifndef PWM_EMBEDDED 94#ifndef PWM_EMBEDDED
93 SelfTest::cancel(); 95 SelfTest::cancel();
94 // close all open mainwnds 96 // close all open mainwnds
95 QValueList<PwM *>::iterator i = _mainWndList.begin(), 97 Q3ValueList<PwM *>::iterator i = _mainWndList.begin(),
96 end = _mainWndList.end(); 98 end = _mainWndList.end();
97 99
98#else 100#else
99 // close all open mainwnds 101 // close all open mainwnds
100 QValueList<PwM *>::Iterator i = _mainWndList.begin(), 102 Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(),
101 end = _mainWndList.end(); 103 end = _mainWndList.end();
102#endif 104#endif
103 while (i != end) { 105 while (i != end) {
@@ -426,11 +428,11 @@ again:
426 } 428 }
427#ifndef PWM_EMBEDDED 429#ifndef PWM_EMBEDDED
428 // find the closed window in the "mainWndList" and delete it. 430 // find the closed window in the "mainWndList" and delete it.
429 QValueList<PwM *>::iterator i = _mainWndList.begin(), 431 Q3ValueList<PwM *>::iterator i = _mainWndList.begin(),
430 end = _mainWndList.end(); 432 end = _mainWndList.end();
431#else 433#else
432 // find the closed window in the "mainWndList" and delete it. 434 // find the closed window in the "mainWndList" and delete it.
433 QValueList<PwM *>::Iterator i = _mainWndList.begin(), 435 Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(),
434 end = _mainWndList.end(); 436 end = _mainWndList.end();
435#endif 437#endif
436 while (i != end) { 438 while (i != end) {
@@ -573,12 +575,12 @@ void PwMInit::minimizeAllMainWnd(bool toTray)
573 if (!_mainWndList.count()) 575 if (!_mainWndList.count())
574 return; 576 return;
575#endif 577#endif
576 const QValueList<PwM *> *ml = mainWndList(); 578 const Q3ValueList<PwM *> *ml = mainWndList();
577#ifndef PWM_EMBEDDED 579#ifndef PWM_EMBEDDED
578 QValueList<PwM *>::const_iterator it = ml->begin(), 580 Q3ValueList<PwM *>::const_iterator it = ml->begin(),
579 end = ml->end(); 581 end = ml->end();
580#else 582#else
581 QValueList<PwM *>::ConstIterator it = ml->begin(), 583 Q3ValueList<PwM *>::ConstIterator it = ml->begin(),
582 end = ml->end(); 584 end = ml->end();
583#endif 585#endif
584 PwM *wnd; 586 PwM *wnd;
@@ -624,7 +626,6 @@ PwMApplication::PwMApplication(int & argc, char ** argv)
624 : QApplication( argc, argv ) 626 : QApplication( argc, argv )
625 , init (0) 627 , init (0)
626{ 628{
627 setStyle( new QPlatinumStyle ());
628 QString hdir = QDir::homeDirPath(); 629 QString hdir = QDir::homeDirPath();
629 // there is a bug when creating dirs for WIN 98 630 // there is a bug when creating dirs for WIN 98
630 // it is difficult to fix, because we have no WIN 98 runnung 631 // it is difficult to fix, because we have no WIN 98 runnung
@@ -656,6 +657,6 @@ PwMApplication::~PwMApplication()
656 657
657 658
658 659
659#ifndef PWM_EMBEDDED 660#ifndef PWM_EMBEDDED_
660#include "pwminit.moc" 661#include "moc_pwminit.cpp"
661#endif 662#endif
diff --git a/pwmanager/pwmanager/pwminit.h b/pwmanager/pwmanager/pwminit.h
index bf72093..32d1b4f 100644
--- a/pwmanager/pwmanager/pwminit.h
+++ b/pwmanager/pwmanager/pwminit.h
@@ -20,7 +20,7 @@
20#ifndef __PWMINIT_H 20#ifndef __PWMINIT_H
21#define __PWMINIT_H 21#define __PWMINIT_H
22 22
23#include <qvaluelist.h> 23#include <q3valuelist.h>
24#include <qobject.h> 24#include <qobject.h>
25#ifndef PWM_EMBEDDED 25#ifndef PWM_EMBEDDED
26#include <kuniqueapplication.h> 26#include <kuniqueapplication.h>
@@ -30,7 +30,6 @@
30#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
31#else //DESKTOP_VERSION 31#else //DESKTOP_VERSION
32#include <qapplication.h> 32#include <qapplication.h>
33#include <qplatinumstyle.h>
34#endif //DESKTOP_VERSION 33#endif //DESKTOP_VERSION
35 34
36#include <kapplication.h> 35#include <kapplication.h>
@@ -50,7 +49,7 @@ class PwMInit;
50 49
51/** main application class */ 50/** main application class */
52#ifndef PWM_EMBEDDED 51#ifndef PWM_EMBEDDED
53//MOC_SKIP_BEGIN 52#ifndef Q_MOC_RUN
54class PwMApplication : public KUniqueApplication 53class PwMApplication : public KUniqueApplication
55{ 54{
56public: 55public:
@@ -68,7 +67,7 @@ public:
68protected: 67protected:
69 PwMInit *init; 68 PwMInit *init;
70}; 69};
71//MOC_SKIP_END 70#endif
72#else //PWM_EMBEDDED 71#else //PWM_EMBEDDED
73 72
74#ifndef DESKTOP_VERSION 73#ifndef DESKTOP_VERSION
@@ -154,7 +153,7 @@ public:
154 PwMTray * tray() 153 PwMTray * tray()
155 { return _tray; } 154 { return _tray; }
156 /** returns a list of all open main windows */ 155 /** returns a list of all open main windows */
157 const QValueList<PwM *> * mainWndList() 156 const Q3ValueList<PwM *> * mainWndList()
158 { return &_mainWndList; } 157 { return &_mainWndList; }
159 /** create a new document */ 158 /** create a new document */
160 PwMDoc * createDoc(); 159 PwMDoc * createDoc();
@@ -214,7 +213,7 @@ protected:
214 /** pointer to the tray icon */ 213 /** pointer to the tray icon */
215 PwMTray *_tray; 214 PwMTray *_tray;
216 /** list of all open main windows */ 215 /** list of all open main windows */
217 QValueList<PwM *> _mainWndList; 216 Q3ValueList<PwM *> _mainWndList;
218 /** saved command line options. */ 217 /** saved command line options. */
219 savedCmd_t savedCmd; 218 savedCmd_t savedCmd;
220}; 219};
diff --git a/pwmanager/pwmanager/pwmprefs.h b/pwmanager/pwmanager/pwmprefs.h
index 1f6a35c..42f7c2e 100644
--- a/pwmanager/pwmanager/pwmprefs.h
+++ b/pwmanager/pwmanager/pwmprefs.h
@@ -28,6 +28,8 @@
28 28
29#include <qstringlist.h> 29#include <qstringlist.h>
30#include <qsize.h> 30#include <qsize.h>
31//Added by qt3to4:
32#include <Q3ValueList>
31 33
32#include <kpimprefs.h> 34#include <kpimprefs.h>
33 35
@@ -150,8 +152,8 @@ public:
150 bool mClose; 152 bool mClose;
151 153
152 //US ENH 154 //US ENH
153 QValueList<int> mCommentSplitter; 155 Q3ValueList<int> mCommentSplitter;
154 QValueList<int> mCategorySplitter; 156 Q3ValueList<int> mCategorySplitter;
155 157
156 158
157 // US introduce a nonconst way to return the config object. 159 // US introduce a nonconst way to return the config object.
diff --git a/pwmanager/pwmanager/pwmtray.cpp b/pwmanager/pwmanager/pwmtray.cpp
index fe074ca..478116f 100644
--- a/pwmanager/pwmanager/pwmtray.cpp
+++ b/pwmanager/pwmanager/pwmtray.cpp
@@ -32,6 +32,9 @@
32#endif 32#endif
33 33
34#include <klocale.h> 34#include <klocale.h>
35//Added by qt3to4:
36#include <Q3ValueList>
37#include <QMouseEvent>
35 38
36 39
37void ActiveTreeItem::execIt() 40void ActiveTreeItem::execIt()
@@ -87,12 +90,12 @@ void ActiveTreeItem::execIt()
87 break; 90 break;
88 } case openMainWnd: { 91 } case openMainWnd: {
89 // search if there is already an open window. 92 // search if there is already an open window.
90 const QValueList<PwM *> *wl = tray->init->mainWndList(); 93 const Q3ValueList<PwM *> *wl = tray->init->mainWndList();
91#ifndef PWM_EMBEDDED 94#ifndef PWM_EMBEDDED
92 QValueList<PwM *>::const_iterator i = wl->begin(), 95 Q3ValueList<PwM *>::const_iterator i = wl->begin(),
93 end = wl->end(); 96 end = wl->end();
94#else 97#else
95 QValueList<PwM *>::ConstIterator i = wl->begin(), 98 Q3ValueList<PwM *>::ConstIterator i = wl->begin(),
96 end = wl->end(); 99 end = wl->end();
97#endif 100#endif
98 PwM *wnd; 101 PwM *wnd;
@@ -178,7 +181,7 @@ void PwMTray::buildMain()
178void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, 181void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
179 ActiveTreeItem::Task task, PwMDoc *doc, 182 ActiveTreeItem::Task task, PwMDoc *doc,
180 int docCategory, int docEntry, 183 int docCategory, int docEntry,
181 QValueList<int> *activeItemsList) 184 Q3ValueList<int> *activeItemsList)
182{ 185{
183 ActiveTreeItem *activeItem; 186 ActiveTreeItem *activeItem;
184 int id; 187 int id;
@@ -196,7 +199,7 @@ void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
196} 199}
197 200
198void PwMTray::rebuildTree(KPopupMenu *popup, PwMDoc *doc, 201void PwMTray::rebuildTree(KPopupMenu *popup, PwMDoc *doc,
199 QValueList<int> *activeItems) 202 Q3ValueList<int> *activeItems)
200{ 203{
201 PWM_ASSERT(doc); 204 PWM_ASSERT(doc);
202 PWM_ASSERT(popup); 205 PWM_ASSERT(popup);
@@ -334,11 +337,11 @@ void PwMTray::updateTree(PwMDoc *document)
334 if (treeItemNum != -1) { 337 if (treeItemNum != -1) {
335 // delete all *old* active items 338 // delete all *old* active items
336 KPopupMenu *ctxMenu = contextMenu(); 339 KPopupMenu *ctxMenu = contextMenu();
337 QValueList<int> *oldItems = &tree[treeItemNum].activeItems; 340 Q3ValueList<int> *oldItems = &tree[treeItemNum].activeItems;
338#ifndef PWM_EMBEDDED 341#ifndef PWM_EMBEDDED
339 QValueList<int>::iterator i = oldItems->begin(); 342 Q3ValueList<int>::iterator i = oldItems->begin();
340#else 343#else
341 QValueList<int>::Iterator i = oldItems->begin(); 344 Q3ValueList<int>::Iterator i = oldItems->begin();
342#endif 345#endif
343 while (i != oldItems->end()) { 346 while (i != oldItems->end()) {
344 ctxMenu->removeItem(*i); 347 ctxMenu->removeItem(*i);
@@ -481,6 +484,6 @@ void PwMTray::undock()
481 // Attention! "this" is already deleted here! 484 // Attention! "this" is already deleted here!
482} 485}
483 486
484#ifndef PWM_EMBEDDED 487#ifndef PWM_EMBEDDED_
485#include "pwmtray.moc" 488#include "moc_pwmtray.cpp"
486#endif 489#endif
diff --git a/pwmanager/pwmanager/pwmtray.h b/pwmanager/pwmanager/pwmtray.h
index ffb625e..b1145e0 100644
--- a/pwmanager/pwmanager/pwmtray.h
+++ b/pwmanager/pwmanager/pwmtray.h
@@ -27,7 +27,10 @@
27#include <kpopupmenu.h> 27#include <kpopupmenu.h>
28 28
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qvaluelist.h> 30#include <q3valuelist.h>
31//Added by qt3to4:
32#include <QMouseEvent>
33#include <QMenuItem>
31 34
32//#include "pwmexception.h" 35//#include "pwmexception.h"
33 36
@@ -36,8 +39,7 @@ class PwMDoc;
36class PwMTray; 39class PwMTray;
37 40
38/* wrapper to workaround MOC problems */ 41/* wrapper to workaround MOC problems */
39class __ActiveTreeItem : public QCustomMenuItem 42class __ActiveTreeItem : public QMenuItem
40 , public QObject
41{ 43{
42public: 44public:
43 __ActiveTreeItem() {} 45 __ActiveTreeItem() {}
@@ -87,14 +89,14 @@ public:
87 bool /*enabled*/, int x, int y, int w, int h) 89 bool /*enabled*/, int x, int y, int w, int h)
88 { 90 {
89 p->setFont(font); 91 p->setFont(font);
90 p->drawText(x, y, w, h, AlignLeft | AlignVCenter | 92 p->drawText(x, y, w, h, Qt::AlignLeft | Qt::AlignVCenter |
91 DontClip | ShowPrefix, text); 93 Qt::DontClip | Qt::ShowPrefix, text);
92 } 94 }
93 95
94 QSize sizeHint() 96 QSize sizeHint()
95 { 97 {
96 return QFontMetrics(font).size(AlignLeft | AlignVCenter | 98 return QFontMetrics(font).size(Qt::AlignLeft | Qt::AlignVCenter |
97 ShowPrefix | DontClip, text); 99 Qt::ShowPrefix | Qt::DontClip, text);
98 } 100 }
99 101
100 bool fullSpan() const 102 bool fullSpan() const
@@ -122,7 +124,7 @@ protected:
122 124
123/** tray icon implementation */ 125/** tray icon implementation */
124#ifndef PWM_EMBEDDED 126#ifndef PWM_EMBEDDED
125//MOC_SKIP_BEGIN 127#ifndef Q_MOC_RUN
126class PwMTray : public KSystemTray 128class PwMTray : public KSystemTray
127{ 129{
128 Q_OBJECT 130 Q_OBJECT
@@ -134,7 +136,7 @@ class PwMTray : public KSystemTray
134 int menuId; 136 int menuId;
135 PwMDoc *doc; 137 PwMDoc *doc;
136 KPopupMenu *menu; 138 KPopupMenu *menu;
137 QValueList<int> activeItems; // ids of all active items 139 Q3ValueList<int> activeItems; // ids of all active items
138 }; 140 };
139 141
140public: 142public:
@@ -170,7 +172,7 @@ protected:
170 /** holds a list of all open files, its documents and 172 /** holds a list of all open files, its documents and
171 * its menuIDs 173 * its menuIDs
172 */ 174 */
173 QValueList<struct treeItem> tree; 175 Q3ValueList<struct treeItem> tree;
174 /** pointer to init */ 176 /** pointer to init */
175 PwMInit *init; 177 PwMInit *init;
176 178
@@ -185,7 +187,7 @@ protected:
185 void buildMain(); 187 void buildMain();
186 /** rebuilds the tree for the given KPopupMenu entry */ 188 /** rebuilds the tree for the given KPopupMenu entry */
187 void rebuildTree(KPopupMenu *popup, PwMDoc *doc, 189 void rebuildTree(KPopupMenu *popup, PwMDoc *doc,
188 QValueList<int> *activeItems); 190 Q3ValueList<int> *activeItems);
189 /** insert a new tree-entry for the given doc and returns the ID.*/ 191 /** insert a new tree-entry for the given doc and returns the ID.*/
190 int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup); 192 int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup);
191 /** removes a tree entry */ 193 /** removes a tree entry */
@@ -194,7 +196,7 @@ protected:
194 void insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, 196 void insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
195 ActiveTreeItem::Task task, PwMDoc *doc, 197 ActiveTreeItem::Task task, PwMDoc *doc,
196 int docCategory, int docEntry, 198 int docCategory, int docEntry,
197 QValueList<int> *activeItemsList); 199 Q3ValueList<int> *activeItemsList);
198 /** mouse event on icon */ 200 /** mouse event on icon */
199 void mouseReleaseEvent(QMouseEvent *e); 201 void mouseReleaseEvent(QMouseEvent *e);
200 /** inserts the items for the main window control 202 /** inserts the items for the main window control
@@ -202,7 +204,7 @@ protected:
202 */ 204 */
203 void insertMainWndCtrl(KPopupMenu *menu, PwMDoc *doc); 205 void insertMainWndCtrl(KPopupMenu *menu, PwMDoc *doc);
204}; 206};
205//MOC_SKIP_END 207#endif
206#else 208#else
207class PwMTray : public QWidget 209class PwMTray : public QWidget
208{ 210{
@@ -215,7 +217,7 @@ class PwMTray : public QWidget
215 int menuId; 217 int menuId;
216 PwMDoc *doc; 218 PwMDoc *doc;
217 KPopupMenu *menu; 219 KPopupMenu *menu;
218 QValueList<int> activeItems; // ids of all active items 220 Q3ValueList<int> activeItems; // ids of all active items
219 }; 221 };
220 222
221public: 223public:
@@ -255,7 +257,7 @@ protected:
255 /** holds a list of all open files, its documents and 257 /** holds a list of all open files, its documents and
256 * its menuIDs 258 * its menuIDs
257 */ 259 */
258 QValueList<struct treeItem> tree; 260 Q3ValueList<struct treeItem> tree;
259 /** pointer to init */ 261 /** pointer to init */
260 PwMInit *init; 262 PwMInit *init;
261 263
@@ -270,7 +272,7 @@ protected:
270 void buildMain(); 272 void buildMain();
271 /** rebuilds the tree for the given KPopupMenu entry */ 273 /** rebuilds the tree for the given KPopupMenu entry */
272 void rebuildTree(KPopupMenu *popup, PwMDoc *doc, 274 void rebuildTree(KPopupMenu *popup, PwMDoc *doc,
273 QValueList<int> *activeItems); 275 Q3ValueList<int> *activeItems);
274 /** insert a new tree-entry for the given doc and returns the ID.*/ 276 /** insert a new tree-entry for the given doc and returns the ID.*/
275 int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup); 277 int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup);
276 /** removes a tree entry */ 278 /** removes a tree entry */
@@ -279,7 +281,7 @@ protected:
279 void insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, 281 void insertActiveTreeItem(KPopupMenu *insertIn, const QString &text,
280 ActiveTreeItem::Task task, PwMDoc *doc, 282 ActiveTreeItem::Task task, PwMDoc *doc,
281 int docCategory, int docEntry, 283 int docCategory, int docEntry,
282 QValueList<int> *activeItemsList); 284 Q3ValueList<int> *activeItemsList);
283 /** mouse event on icon */ 285 /** mouse event on icon */
284 void mouseReleaseEvent(QMouseEvent *e); 286 void mouseReleaseEvent(QMouseEvent *e);
285 /** inserts the items for the main window control 287 /** inserts the items for the main window control
diff --git a/pwmanager/pwmanager/pwmview.cpp b/pwmanager/pwmanager/pwmview.cpp
index 2533487..68500d0 100644
--- a/pwmanager/pwmanager/pwmview.cpp
+++ b/pwmanager/pwmanager/pwmview.cpp
@@ -35,7 +35,15 @@
35#include <qlineedit.h> 35#include <qlineedit.h>
36#include <qpoint.h> 36#include <qpoint.h>
37#include <qapplication.h> 37#include <qapplication.h>
38#include <QDesktopWidget>
38#include <qlayout.h> 39#include <qlayout.h>
40//Added by qt3to4:
41#include <Q3HBoxLayout>
42#include <QKeyEvent>
43#include <QLabel>
44#include <QResizeEvent>
45#include <Q3PopupMenu>
46#include <Q3VBoxLayout>
39 47
40//US ENH: wouldn't it be a good idea if we could use this consts everywhere else. 48//US ENH: wouldn't it be a good idea if we could use this consts everywhere else.
41//US ENH: for examle in listviewpwm.cpp 49//US ENH: for examle in listviewpwm.cpp
@@ -76,7 +84,7 @@ PwMView::~PwMView()
76 84
77void PwMView::initCtxMenu() 85void PwMView::initCtxMenu()
78{ 86{
79 ctxMenu = new QPopupMenu(this); 87 ctxMenu = new Q3PopupMenu(this);
80 ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot())); 88 ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot()));
81 ctxMenu->insertSeparator(); 89 ctxMenu->insertSeparator();
82 ctxMenu->insertItem(i18n("&Edit"), mainClass, SLOT(editPwd_slot())); 90 ctxMenu->insertItem(i18n("&Edit"), mainClass, SLOT(editPwd_slot()));
@@ -106,7 +114,7 @@ void PwMView::resizeEvent(QResizeEvent *)
106 resizeView(size()); 114 resizeView(size());
107} 115}
108 116
109void PwMView::refreshCommentTextEdit(QListViewItem *curItem) 117void PwMView::refreshCommentTextEdit(Q3ListViewItem *curItem)
110{ 118{
111 PWM_ASSERT(commentBox); 119 PWM_ASSERT(commentBox);
112 if (!curItem) 120 if (!curItem)
@@ -136,14 +144,14 @@ void PwMView::keyReleaseEvent(QKeyEvent * /*e*/)
136 144
137bool PwMView::getCurEntryIndex(unsigned int *index) 145bool PwMView::getCurEntryIndex(unsigned int *index)
138{ 146{
139 QListViewItem *current = lv->currentItem(); 147 Q3ListViewItem *current = lv->currentItem();
140 if (!current) 148 if (!current)
141 return false; 149 return false;
142 return getDocEntryIndex(index, current); 150 return getDocEntryIndex(index, current);
143} 151}
144 152
145bool PwMView::getDocEntryIndex(unsigned int *index, 153bool PwMView::getDocEntryIndex(unsigned int *index,
146 const QListViewItem *item) 154 const Q3ListViewItem *item)
147{ 155{
148 vector<unsigned int> foundPositions; 156 vector<unsigned int> foundPositions;
149 PwMDataItem curItem; 157 PwMDataItem curItem;
@@ -166,12 +174,12 @@ bool PwMView::getDocEntryIndex(unsigned int *index,
166 return false; 174 return false;
167} 175}
168 176
169void PwMView::handleToggle(QListViewItem *item) 177void PwMView::handleToggle(Q3ListViewItem *item)
170{ 178{
171 PWM_ASSERT(doc); 179 PWM_ASSERT(doc);
172 if (!item) 180 if (!item)
173 return; 181 return;
174 QCheckListItem *clItem = (QCheckListItem *)item; 182 Q3CheckListItem *clItem = (Q3CheckListItem *)item;
175 QString curCat(getCurrentCategory()); 183 QString curCat(getCurrentCategory());
176 184
177 // find document position of this entry. 185 // find document position of this entry.
@@ -195,7 +203,7 @@ void PwMView::handleToggle(QListViewItem *item)
195 doc->lockAt(curCat, curEntryDocIndex, !clItem->isOn()); 203 doc->lockAt(curCat, curEntryDocIndex, !clItem->isOn());
196} 204}
197 205
198void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int) 206void PwMView::handleRightClick(Q3ListViewItem *item, const QPoint &point, int)
199{ 207{
200 if (!item) 208 if (!item)
201 return; 209 return;
@@ -274,7 +282,7 @@ void PwMView::shiftToView()
274 lv->setColumnText(COLUMN_PW, catItem->pw_text.c_str()); 282 lv->setColumnText(COLUMN_PW, catItem->pw_text.c_str());
275 } 283 }
276 284
277 QCheckListItem *newItem; 285 Q3CheckListItem *newItem;
278 vector<PwMDataItem>::iterator it = tmpSorted.begin(), 286 vector<PwMDataItem>::iterator it = tmpSorted.begin(),
279 end = tmpSorted.end(); 287 end = tmpSorted.end();
280 while (it != end) { 288 while (it != end) {
@@ -313,7 +321,7 @@ void PwMView::reorgLp()
313 return; 321 return;
314 PWM_ASSERT(doc); 322 PWM_ASSERT(doc);
315 PWM_ASSERT(!doc->isDocEmpty()); 323 PWM_ASSERT(!doc->isDocEmpty());
316 QListViewItem *currItem; 324 Q3ListViewItem *currItem;
317 vector<unsigned int> foundPos; 325 vector<unsigned int> foundPos;
318 /* This searchIn _should_ be: 326 /* This searchIn _should_ be:
319 *const unsigned int searchIn = SEARCH_IN_DESC; 327 *const unsigned int searchIn = SEARCH_IN_DESC;
@@ -355,7 +363,7 @@ void PwMView::reorgLp()
355 363
356void PwMView::selAt(int index) 364void PwMView::selAt(int index)
357{ 365{
358 QListViewItem *item = lv->itemAtIndex(index); 366 Q3ListViewItem *item = lv->itemAtIndex(index);
359 if (!item) 367 if (!item)
360 return; 368 return;
361 lv->setCurrentItem(item); 369 lv->setCurrentItem(item);
@@ -479,7 +487,7 @@ void PwMView::copyCommentToClip()
479 487
480 488
481PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name ) 489PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name )
482 : QTextBrowser( parent, name ) 490 : Q3TextBrowser( parent, name )
483 491
484 492
485{ 493{
@@ -566,24 +574,24 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t
566 findButton( User1 )->setText( i18n("Local")); 574 findButton( User1 )->setText( i18n("Local"));
567 QWidget* topframe = new QWidget( this ); 575 QWidget* topframe = new QWidget( this );
568 setMainWidget( topframe ); 576 setMainWidget( topframe );
569 QBoxLayout* bl; 577 Q3BoxLayout* bl;
570 if ( QApplication::desktop()->width() < 640 ) { 578 if ( QApplication::desktop()->width() < 640 ) {
571 bl = new QVBoxLayout( topframe ); 579 bl = new Q3VBoxLayout( topframe );
572 } else { 580 } else {
573 bl = new QHBoxLayout( topframe ); 581 bl = new Q3HBoxLayout( topframe );
574 } 582 }
575 QVBox* subframe = new QVBox( topframe ); 583 Q3VBox* subframe = new Q3VBox( topframe );
576 bl->addWidget(subframe ); 584 bl->addWidget(subframe );
577 QLabel* lab = new QLabel( i18n("Local Entry"), subframe ); 585 QLabel* lab = new QLabel( i18n("Local Entry"), subframe );
578 if ( takeloc ) 586 if ( takeloc )
579 lab->setBackgroundColor(Qt::green.light() ); 587 lab->setBackgroundColor(QColor(Qt::green).light() );
580 PwMDataItemView * av = new PwMDataItemView( subframe ); 588 PwMDataItemView * av = new PwMDataItemView( subframe );
581 av->setPwMDataItem( loc ); 589 av->setPwMDataItem( loc );
582 subframe = new QVBox( topframe ); 590 subframe = new Q3VBox( topframe );
583 bl->addWidget(subframe ); 591 bl->addWidget(subframe );
584 lab = new QLabel( i18n("Remote Entry"), subframe ); 592 lab = new QLabel( i18n("Remote Entry"), subframe );
585 if ( !takeloc ) 593 if ( !takeloc )
586 lab->setBackgroundColor(Qt::green.light() ); 594 lab->setBackgroundColor(QColor(Qt::green).light() );
587 av = new PwMDataItemView( subframe ); 595 av = new PwMDataItemView( subframe );
588 av->setPwMDataItem( rem ); 596 av->setPwMDataItem( rem );
589 QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote())); 597 QObject::connect(findButton( Ok ),SIGNAL(clicked()),this, SLOT(slot_remote()));
@@ -618,6 +626,6 @@ void PwMDataItemChooser::slot_local()
618 626
619 627
620 628
621#ifndef PWM_EMBEDDED 629#ifndef PWM_EMBEDDED_
622#include "pwmview.moc" 630#include "moc_pwmview.cpp"
623#endif 631#endif
diff --git a/pwmanager/pwmanager/pwmview.h b/pwmanager/pwmanager/pwmview.h
index e42b17a..8f60063 100644
--- a/pwmanager/pwmanager/pwmview.h
+++ b/pwmanager/pwmanager/pwmview.h
@@ -41,7 +41,11 @@
41#include <qevent.h> 41#include <qevent.h>
42#include <qfont.h> 42#include <qfont.h>
43#include <qobject.h> 43#include <qobject.h>
44#include <qtextbrowser.h> 44#include <q3textbrowser.h>
45//Added by qt3to4:
46#include <QResizeEvent>
47#include <QKeyEvent>
48#include <Q3PopupMenu>
45 49
46#include <vector> 50#include <vector>
47#include <string> 51#include <string>
@@ -77,7 +81,7 @@ public:
77 * Note: This func only serches in the current category. 81 * Note: This func only serches in the current category.
78 */ 82 */
79 bool getDocEntryIndex(unsigned int *index, 83 bool getDocEntryIndex(unsigned int *index,
80 const QListViewItem *item); 84 const Q3ListViewItem *item);
81 85
82public slots: 86public slots:
83 /** update the view (call if dirty) */ 87 /** update the view (call if dirty) */
@@ -89,9 +93,9 @@ public slots:
89 /** (re)sort all items and (re)shift them to listView. */ 93 /** (re)sort all items and (re)shift them to listView. */
90 void shiftToView(); 94 void shiftToView();
91 /** handle clicking on an item */ 95 /** handle clicking on an item */
92 void handleToggle(QListViewItem *item); 96 void handleToggle(Q3ListViewItem *item);
93 /** handle right-clicking on an item */ 97 /** handle right-clicking on an item */
94 void handleRightClick(QListViewItem *item, const QPoint &point, int); 98 void handleRightClick(Q3ListViewItem *item, const QPoint &point, int);
95 /** selects the item at "index" */ 99 /** selects the item at "index" */
96 void selAt(int index); 100 void selAt(int index);
97 /** rename category button pressed */ 101 /** rename category button pressed */
@@ -101,7 +105,7 @@ public slots:
101 105
102protected: 106protected:
103 /** right-click context-menu */ 107 /** right-click context-menu */
104 QPopupMenu *ctxMenu; 108 Q3PopupMenu *ctxMenu;
105 109
106protected: 110protected:
107 /** update the categories from document */ 111 /** update the categories from document */
@@ -124,7 +128,7 @@ protected:
124 128
125protected slots: 129protected slots:
126 /** changes the comment text-edit, because a new item has been selected */ 130 /** changes the comment text-edit, because a new item has been selected */
127 void refreshCommentTextEdit(QListViewItem *curItem); 131 void refreshCommentTextEdit(Q3ListViewItem *curItem);
128 /** copy pw to clipboard */ 132 /** copy pw to clipboard */
129 void copyPwToClip(); 133 void copyPwToClip();
130 /** copy name to clipboard */ 134 /** copy name to clipboard */
@@ -152,7 +156,7 @@ private:
152 156
153//US ENH basic widget to view an password entry. We need it for the sync stuff. 157//US ENH basic widget to view an password entry. We need it for the sync stuff.
154//But might be oif interest for other functionalities as well. 158//But might be oif interest for other functionalities as well.
155class PwMDataItemView : public QTextBrowser 159class PwMDataItemView : public Q3TextBrowser
156{ 160{
157 public: 161 public:
158 PwMDataItemView( QWidget *parent = 0, const char *name = 0 ); 162 PwMDataItemView( QWidget *parent = 0, const char *name = 0 );
diff --git a/pwmanager/pwmanager/pwmviewstyle.cpp b/pwmanager/pwmanager/pwmviewstyle.cpp
index ee35472..b6d930f 100644
--- a/pwmanager/pwmanager/pwmviewstyle.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle.cpp
@@ -61,7 +61,7 @@ PwMViewStyle::~PwMViewStyle()
61 delete_ifnot_null(s1); 61 delete_ifnot_null(s1);
62} 62}
63 63
64void PwMViewStyle::editPassWord( QListViewItem * i ) 64void PwMViewStyle::editPassWord( Q3ListViewItem * i )
65{ 65{
66 if ( !i ) 66 if ( !i )
67 return; 67 return;
@@ -93,16 +93,16 @@ void PwMViewStyle::initStyle(style_t style)
93 return; 93 return;
94 } 94 }
95 curStyle = style; 95 curStyle = style;
96 connect(lv, SIGNAL(pressed(QListViewItem *)), 96 connect(lv, SIGNAL(pressed(Q3ListViewItem *)),
97 v, SLOT(handleToggle(QListViewItem *))); 97 v, SLOT(handleToggle(Q3ListViewItem *)));
98 connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), 98 connect(lv, SIGNAL(rightButtonClicked(Q3ListViewItem *, const QPoint &, int)),
99 v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); 99 v, SLOT(handleRightClick(Q3ListViewItem *, const QPoint &, int)));
100 connect(lv, SIGNAL(clicked(QListViewItem *)), 100 connect(lv, SIGNAL(clicked(Q3ListViewItem *)),
101 v, SLOT(refreshCommentTextEdit(QListViewItem *))); 101 v, SLOT(refreshCommentTextEdit(Q3ListViewItem *)));
102 connect(lv, SIGNAL(returnPressed(QListViewItem *)), 102 connect(lv, SIGNAL(returnPressed(Q3ListViewItem *)),
103 this, SLOT(editPassWord(QListViewItem *))); 103 this, SLOT(editPassWord(Q3ListViewItem *)));
104 connect(lv, SIGNAL(doubleClicked(QListViewItem *)), 104 connect(lv, SIGNAL(doubleClicked(Q3ListViewItem *)),
105 this, SLOT(editPassWord(QListViewItem *))); 105 this, SLOT(editPassWord(Q3ListViewItem *)));
106 connect(lv, SIGNAL(insertPW()), 106 connect(lv, SIGNAL(insertPW()),
107 this, SIGNAL( insertPW() )); 107 this, SIGNAL( insertPW() ));
108 connect(lv, SIGNAL(deletePW()), 108 connect(lv, SIGNAL(deletePW()),
@@ -249,6 +249,6 @@ int PwMViewStyle::numCategories()
249 return 0; 249 return 0;
250} 250}
251 251
252#ifndef PWM_EMBEDDED 252#ifndef PWM_EMBEDDED_
253#include "pwmviewstyle.moc" 253#include "moc_pwmviewstyle.cpp"
254#endif 254#endif
diff --git a/pwmanager/pwmanager/pwmviewstyle.h b/pwmanager/pwmanager/pwmviewstyle.h
index 6c2d81c..a7dccbe 100644
--- a/pwmanager/pwmanager/pwmviewstyle.h
+++ b/pwmanager/pwmanager/pwmviewstyle.h
@@ -23,18 +23,18 @@
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qsplitter.h> 25#include <qsplitter.h>
26#include <qhbox.h> 26#include <q3hbox.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qpopupmenu.h> 29#include <q3popupmenu.h>
30#ifndef PWM_EMBEDDED 30#ifndef PWM_EMBEDDED
31#include <qtextedit.h> 31#include <q3textedit.h>
32#else 32#else
33#include <qmultilineedit.h> 33#include <q3multilineedit.h>
34#endif 34#endif
35 35
36#include <qlabel.h> 36#include <qlabel.h>
37#include <qlistbox.h> 37#include <q3listbox.h>
38#include <qcombobox.h> 38#include <qcombobox.h>
39#include <qsize.h> 39#include <qsize.h>
40 40
@@ -42,7 +42,7 @@ class ListViewPwM;
42class PwMViewStyle_0; 42class PwMViewStyle_0;
43class PwMViewStyle_1; 43class PwMViewStyle_1;
44class PwMView; 44class PwMView;
45class QListViewItem; 45class Q3ListViewItem;
46class CommentBox; 46class CommentBox;
47 47
48class PwMViewStyle : public QWidget 48class PwMViewStyle : public QWidget
@@ -94,7 +94,7 @@ protected:
94 CommentBox *commentBox; 94 CommentBox *commentBox;
95 95
96protected slots: 96protected slots:
97 void editPassWord( QListViewItem * ); 97 void editPassWord( Q3ListViewItem * );
98 98
99private: 99private:
100 /** which style has the view? 100 /** which style has the view?
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.cpp b/pwmanager/pwmanager/pwmviewstyle_0.cpp
index 1d88a34..3d1f41f 100644
--- a/pwmanager/pwmanager/pwmviewstyle_0.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_0.cpp
@@ -26,13 +26,16 @@
26#include <kglobal.h> 26#include <kglobal.h>
27#include <kiconloader.h> 27#include <kiconloader.h>
28#include "pwmprefs.h" 28#include "pwmprefs.h"
29//Added by qt3to4:
30#include <QLabel>
31#include <Q3ValueList>
29 32
30PwMViewStyle_0::PwMViewStyle_0(PwMView *view) 33PwMViewStyle_0::PwMViewStyle_0(PwMView *view)
31 : QObject() 34 : QObject()
32{ 35{
33 vbox1 = new QVBox(view); 36 vbox1 = new Q3VBox(view);
34 vbox1->setSpacing(0); 37 vbox1->setSpacing(0);
35 hbox1 = new QHBox(vbox1); 38 hbox1 = new Q3HBox(vbox1);
36 hbox1->setSpacing(0); 39 hbox1->setSpacing(0);
37 categoriesTitle = new QLabel(hbox1); 40 categoriesTitle = new QLabel(hbox1);
38 categoriesTitle->setText(i18n("Category:")); 41 categoriesTitle->setText(i18n("Category:"));
@@ -46,8 +49,8 @@ PwMViewStyle_0::PwMViewStyle_0(PwMView *view)
46 delCatButton->setPixmap (KGlobal::iconLoader()->loadIcon("editdelete", KIcon::Small) ); 49 delCatButton->setPixmap (KGlobal::iconLoader()->loadIcon("editdelete", KIcon::Small) );
47 maxsi = delCatButton->sizeHint().height()+4; 50 maxsi = delCatButton->sizeHint().height()+4;
48 delCatButton->setMinimumSize( maxsi, maxsi ); 51 delCatButton->setMinimumSize( maxsi, maxsi );
49 delCatButton->setFocusPolicy( QWidget::NoFocus ); 52 delCatButton->setFocusPolicy( Qt::NoFocus );
50 renCatButton->setFocusPolicy( QWidget::NoFocus ); 53 renCatButton->setFocusPolicy( Qt::NoFocus );
51 54
52#ifndef PWM_EMBEDDED 55#ifndef PWM_EMBEDDED
53 splitter1 = new QSplitter(vbox1); 56 splitter1 = new QSplitter(vbox1);
@@ -81,9 +84,9 @@ PwMViewStyle_0::~PwMViewStyle_0()
81void PwMViewStyle_0::toggleSplitter() 84void PwMViewStyle_0::toggleSplitter()
82{ 85{
83 86
84 QValueList<int> si = splitter1->sizes(); 87 Q3ValueList<int> si = splitter1->sizes();
85 splitter1->toggle(); 88 splitter1->toggle();
86 QValueList<int> si2 = splitter1->sizes(); 89 Q3ValueList<int> si2 = splitter1->sizes();
87 //qDebug("PwMViewStyle_0::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] ); 90 //qDebug("PwMViewStyle_0::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] );
88 if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) { 91 if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) {
89 int diff = si[0]/2; 92 int diff = si[0]/2;
diff --git a/pwmanager/pwmanager/pwmviewstyle_0.h b/pwmanager/pwmanager/pwmviewstyle_0.h
index 6d3c1d1..f144eec 100644
--- a/pwmanager/pwmanager/pwmviewstyle_0.h
+++ b/pwmanager/pwmanager/pwmviewstyle_0.h
@@ -20,14 +20,14 @@
20#ifndef PWMVIEWSTYLE_0_H 20#ifndef PWMVIEWSTYLE_0_H
21#define PWMVIEWSTYLE_0_H 21#define PWMVIEWSTYLE_0_H
22 22
23#include <qhbox.h> 23#include <q3hbox.h>
24#include <qvbox.h> 24#include <q3vbox.h>
25#include <qpushbutton.h> 25#include <qpushbutton.h>
26#ifndef PWM_EMBEDDED 26#ifndef PWM_EMBEDDED
27#include <qtextedit.h> 27#include <q3textedit.h>
28#include <qsplitter.h> 28#include <qsplitter.h>
29#else 29#else
30#include <qmultilineedit.h> 30#include <q3multilineedit.h>
31#include <KDGanttMinimizeSplitter.h> 31#include <KDGanttMinimizeSplitter.h>
32#endif 32#endif
33#include <qlabel.h> 33#include <qlabel.h>
@@ -87,9 +87,9 @@ protected:
87 /** title string for the categories combo or list box */ 87 /** title string for the categories combo or list box */
88 QLabel *categoriesTitle; 88 QLabel *categoriesTitle;
89 /** hbox1 for widget style */ 89 /** hbox1 for widget style */
90 QHBox *hbox1; 90 Q3HBox *hbox1;
91 /** vbox1 for widget style */ 91 /** vbox1 for widget style */
92 QVBox *vbox1; 92 Q3VBox *vbox1;
93 /** splitter for commentTextEdit */ 93 /** splitter for commentTextEdit */
94 #ifndef PWM_EMBEDDED 94 #ifndef PWM_EMBEDDED
95 QSplitter *splitter1; 95 QSplitter *splitter1;
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.cpp b/pwmanager/pwmanager/pwmviewstyle_1.cpp
index e335a3f..83eed97 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.cpp
+++ b/pwmanager/pwmanager/pwmviewstyle_1.cpp
@@ -29,6 +29,12 @@
29#include <qpe/qpeapplication.h> 29#include <qpe/qpeapplication.h>
30#else 30#else
31#include <qapplication.h> 31#include <qapplication.h>
32#include <QDesktopWidget>
33//Added by qt3to4:
34#include <QLabel>
35#include <Q3ValueList>
36#include <Q3Frame>
37#include <Q3PopupMenu>
32#endif 38#endif
33 #define INITIAL_CATEGORIES_WIDTH100 39 #define INITIAL_CATEGORIES_WIDTH100
34 40
@@ -54,9 +60,9 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
54 //US topLayout->addWidget(mMiniSplitter ); 60 //US topLayout->addWidget(mMiniSplitter );
55#endif 61#endif
56 62
57 vbox1 = new QVBox(splitter); 63 vbox1 = new Q3VBox(splitter);
58 categoriesTitle = new QLabel(vbox1); 64 categoriesTitle = new QLabel(vbox1);
59 categoriesList = new QListBox(vbox1); 65 categoriesList = new Q3ListBox(vbox1);
60#ifndef PWM_EMBEDDED 66#ifndef PWM_EMBEDDED
61 splitter2 = new QSplitter(splitter); 67 splitter2 = new QSplitter(splitter);
62 splitter2->setOrientation(Qt::Vertical); 68 splitter2->setOrientation(Qt::Vertical);
@@ -70,7 +76,7 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
70 commentBox = new CommentBox(splitter2); 76 commentBox = new CommentBox(splitter2);
71 // set sizes and styles 77 // set sizes and styles
72 //UScommentBox->resize(commentBox->size().width(), 60); 78 //UScommentBox->resize(commentBox->size().width(), 60);
73 QValueList<int> sizes; 79 Q3ValueList<int> sizes;
74#ifndef PWM_EMBEDDED 80#ifndef PWM_EMBEDDED
75 sizes.push_back(INITIAL_CATEGORIES_WIDTH); 81 sizes.push_back(INITIAL_CATEGORIES_WIDTH);
76 sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH); 82 sizes.push_back(view->height() - INITIAL_CATEGORIES_WIDTH);
@@ -81,12 +87,12 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
81 //USsplitter->setSizes(sizes); 87 //USsplitter->setSizes(sizes);
82 categoriesTitle->setAlignment(Qt::AlignHCenter); 88 categoriesTitle->setAlignment(Qt::AlignHCenter);
83#ifndef PWM_EMBEDDED 89#ifndef PWM_EMBEDDED
84 categoriesTitle->setFrameShape(QFrame::MenuBarPanel); 90 categoriesTitle->setFrameShape(Q3Frame::MenuBarPanel);
85#else 91#else
86 //categoriesTitle->setFrameShape(QFrame::StyledPanel); 92 //categoriesTitle->setFrameShape(QFrame::StyledPanel);
87#endif 93#endif
88 categoriesTitle->setText(i18n("Category:")); 94 categoriesTitle->setText(i18n("Category:"));
89 catCtxMenu = new QPopupMenu(view); 95 catCtxMenu = new Q3PopupMenu(view);
90 catCtxMenu->insertItem(i18n("&Rename"), 96 catCtxMenu->insertItem(i18n("&Rename"),
91 view, SLOT(renCatButton_slot())); 97 view, SLOT(renCatButton_slot()));
92 catCtxMenu->insertItem(i18n("&Delete"), 98 catCtxMenu->insertItem(i18n("&Delete"),
@@ -100,9 +106,9 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view)
100 connect(categoriesList, SIGNAL(highlighted(int)), 106 connect(categoriesList, SIGNAL(highlighted(int)),
101 view, SLOT(shiftToView())); 107 view, SLOT(shiftToView()));
102 connect(categoriesList, 108 connect(categoriesList,
103 SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)), 109 SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)),
104 this, 110 this,
105 SLOT(catRightClick(QListBoxItem *, const QPoint &))); 111 SLOT(catRightClick(Q3ListBoxItem *, const QPoint &)));
106 112
107 connect(lv, SIGNAL(toggleOverview()), 113 connect(lv, SIGNAL(toggleOverview()),
108 this, SLOT(toggleSplitter())); 114 this, SLOT(toggleSplitter()));
@@ -115,9 +121,9 @@ PwMViewStyle_1::~PwMViewStyle_1()
115} 121}
116void PwMViewStyle_1::toggleSplitter() 122void PwMViewStyle_1::toggleSplitter()
117{ 123{
118 QValueList<int> si = splitter2->sizes(); 124 Q3ValueList<int> si = splitter2->sizes();
119 splitter2->toggle(); 125 splitter2->toggle();
120 QValueList<int> si2 = splitter2->sizes(); 126 Q3ValueList<int> si2 = splitter2->sizes();
121 //qDebug("PwMViewStyle_1::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] ); 127 //qDebug("PwMViewStyle_1::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] );
122 if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) { 128 if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) {
123 int diff = si[0]/2; 129 int diff = si[0]/2;
@@ -130,7 +136,7 @@ void PwMViewStyle_1::toggleSplitter()
130 } 136 }
131} 137}
132 138
133void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point) 139void PwMViewStyle_1::catRightClick(Q3ListBoxItem *item, const QPoint &point)
134{ 140{
135 if (!item) 141 if (!item)
136 return; 142 return;
@@ -187,6 +193,6 @@ void PwMViewStyle_1::saveSettings(PWMPrefs* prefs)
187} 193}
188 194
189 195
190#ifndef PWM_EMBEDDED 196#ifndef PWM_EMBEDDED_
191#include "pwmviewstyle_1.moc" 197#include "moc_pwmviewstyle_1.cpp"
192#endif 198#endif
diff --git a/pwmanager/pwmanager/pwmviewstyle_1.h b/pwmanager/pwmanager/pwmviewstyle_1.h
index 4f7a256..66cba03 100644
--- a/pwmanager/pwmanager/pwmviewstyle_1.h
+++ b/pwmanager/pwmanager/pwmviewstyle_1.h
@@ -20,19 +20,19 @@
20#ifndef PWMVIEWSTYLE_1_H 20#ifndef PWMVIEWSTYLE_1_H
21#define PWMVIEWSTYLE_1_H 21#define PWMVIEWSTYLE_1_H
22 22
23#include <qvbox.h> 23#include <q3vbox.h>
24 24
25#ifndef PWM_EMBEDDED 25#ifndef PWM_EMBEDDED
26#include <qtextedit.h> 26#include <q3textedit.h>
27#include <qsplitter.h> 27#include <qsplitter.h>
28#else 28#else
29#include <qmultilineedit.h> 29#include <q3multilineedit.h>
30#include <KDGanttMinimizeSplitter.h> 30#include <KDGanttMinimizeSplitter.h>
31#endif 31#endif
32 32
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qlistbox.h> 34#include <q3listbox.h>
35#include <qpopupmenu.h> 35#include <q3popupmenu.h>
36 36
37class PwMView; 37class PwMView;
38class ListViewPwM; 38class ListViewPwM;
@@ -82,7 +82,7 @@ public slots:
82 void toggleSplitter(); 82 void toggleSplitter();
83protected slots: 83protected slots:
84 /** user clicked right button in category list */ 84 /** user clicked right button in category list */
85 void catRightClick(QListBoxItem *item, const QPoint &point); 85 void catRightClick(Q3ListBoxItem *item, const QPoint &point);
86 86
87protected: 87protected:
88 /** main list view */ 88 /** main list view */
@@ -100,15 +100,15 @@ protected:
100#endif 100#endif
101 101
102 /** categories list-box */ 102 /** categories list-box */
103 QListBox *categoriesList; 103 Q3ListBox *categoriesList;
104 /** title string for the categories combo or list box */ 104 /** title string for the categories combo or list box */
105 QLabel *categoriesTitle; 105 QLabel *categoriesTitle;
106 /** hbox1 for widget style */ 106 /** hbox1 for widget style */
107 QVBox *vbox1; 107 Q3VBox *vbox1;
108 /** text-edit to display the comment */ 108 /** text-edit to display the comment */
109 CommentBox *commentBox; 109 CommentBox *commentBox;
110 /** category list context menu */ 110 /** category list context menu */
111 QPopupMenu *catCtxMenu; 111 Q3PopupMenu *catCtxMenu;
112}; 112};
113 113
114#endif 114#endif
diff --git a/pwmanager/pwmanager/randomizer.cpp b/pwmanager/pwmanager/randomizer.cpp
index da4df78..24f9926 100644
--- a/pwmanager/pwmanager/randomizer.cpp
+++ b/pwmanager/pwmanager/randomizer.cpp
@@ -53,7 +53,7 @@ Randomizer::Randomizer()
53 // probe for /dev/urandom 53 // probe for /dev/urandom
54 rndDev->setName("/dev/urandom"); 54 rndDev->setName("/dev/urandom");
55 if (rndDev->exists() && 55 if (rndDev->exists() &&
56 rndDev->open(IO_ReadOnly)) { 56 rndDev->open(QIODevice::ReadOnly)) {
57 printDebug("Randomizer: using /dev/urandom"); 57 printDebug("Randomizer: using /dev/urandom");
58 return; 58 return;
59 } 59 }
@@ -61,7 +61,7 @@ Randomizer::Randomizer()
61 // probe for /dev/random 61 // probe for /dev/random
62 rndDev->setName("/dev/random"); 62 rndDev->setName("/dev/random");
63 if (rndDev->exists() && 63 if (rndDev->exists() &&
64 rndDev->open(IO_ReadOnly)) { 64 rndDev->open(QIODevice::ReadOnly)) {
65 printDebug("Randomizer: using /dev/random"); 65 printDebug("Randomizer: using /dev/random");
66 return; 66 return;
67 } 67 }
@@ -71,7 +71,7 @@ Randomizer::Randomizer()
71 if (fn) { 71 if (fn) {
72 rndDev->setName(fn); 72 rndDev->setName(fn);
73 if (rndDev->exists() && 73 if (rndDev->exists() &&
74 rndDev->open(IO_ReadOnly)) { 74 rndDev->open(QIODevice::ReadOnly)) {
75 printDebug(string("Randomizer: using $RANDFILE \"") 75 printDebug(string("Randomizer: using $RANDFILE \"")
76 + fn 76 + fn
77 + "\" (aka EGD)"); 77 + "\" (aka EGD)");
diff --git a/pwmanager/pwmanager/rencatwnd.cpp b/pwmanager/pwmanager/rencatwnd.cpp
index 3c4de27..3ca758c 100644
--- a/pwmanager/pwmanager/rencatwnd.cpp
+++ b/pwmanager/pwmanager/rencatwnd.cpp
@@ -20,16 +20,19 @@
20#include "rencatwnd.h" 20#include "rencatwnd.h"
21 21
22#include <klocale.h> 22#include <klocale.h>
23//Added by qt3to4:
24#include <QResizeEvent>
25#include <QLabel>
23 26
24 27
25RenCatWnd::RenCatWnd(QWidget *parent, 28RenCatWnd::RenCatWnd(QWidget *parent,
26 const char *name, bool modal, WFlags f) 29 const char *name, bool modal, Qt::WFlags f)
27 : QDialog(parent, name, true, f) 30 : QDialog(parent, name, true, f)
28{ 31{
29 vbox1 = new QVBox(this); 32 vbox1 = new Q3VBox(this);
30 label = new QLabel(vbox1); 33 label = new QLabel(vbox1);
31 newName = new QLineEdit(vbox1); 34 newName = new QLineEdit(vbox1);
32 hbox1 = new QHBox(vbox1); 35 hbox1 = new Q3HBox(vbox1);
33 okButton = new QPushButton(i18n("&Ok"), hbox1); 36 okButton = new QPushButton(i18n("&Ok"), hbox1);
34 cancelButton = new QPushButton(i18n("&Cancel"), hbox1); 37 cancelButton = new QPushButton(i18n("&Cancel"), hbox1);
35 38
@@ -65,6 +68,6 @@ void RenCatWnd::cancelButton_slot()
65 done(2); 68 done(2);
66} 69}
67 70
68#ifndef PWM_EMBEDDED 71#ifndef PWM_EMBEDDED_
69#include "rencatwnd.moc" 72#include "moc_rencatwnd.cpp"
70#endif 73#endif
diff --git a/pwmanager/pwmanager/rencatwnd.h b/pwmanager/pwmanager/rencatwnd.h
index 37b6725..1773136 100644
--- a/pwmanager/pwmanager/rencatwnd.h
+++ b/pwmanager/pwmanager/rencatwnd.h
@@ -20,13 +20,15 @@
20#ifndef RENCATWND_H 20#ifndef RENCATWND_H
21#define RENCATWND_H 21#define RENCATWND_H
22 22
23#include <qvbox.h> 23#include <q3vbox.h>
24#include <qhbox.h> 24#include <q3hbox.h>
25#include <qdialog.h> 25#include <qdialog.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qpushbutton.h> 28#include <qpushbutton.h>
29#include <qevent.h> 29#include <qevent.h>
30//Added by qt3to4:
31#include <QResizeEvent>
30 32
31 33
32/** rename category window */ 34/** rename category window */
@@ -35,7 +37,7 @@ class RenCatWnd : public QDialog
35 Q_OBJECT 37 Q_OBJECT
36public: 38public:
37 RenCatWnd(QWidget *parent = 0, const char *name = 0, 39 RenCatWnd(QWidget *parent = 0, const char *name = 0,
38 bool modal = FALSE, WFlags f = 0); 40 bool modal = FALSE, Qt::WFlags f = 0);
39 ~RenCatWnd(); 41 ~RenCatWnd();
40 42
41 QString getNewName() 43 QString getNewName()
@@ -46,8 +48,8 @@ protected slots:
46 void cancelButton_slot(); 48 void cancelButton_slot();
47 49
48protected: 50protected:
49 QVBox *vbox1; 51 Q3VBox *vbox1;
50 QHBox *hbox1; 52 Q3HBox *hbox1;
51 QLabel *label; 53 QLabel *label;
52 QLineEdit *newName; 54 QLineEdit *newName;
53 QPushButton *okButton; 55 QPushButton *okButton;
diff --git a/pwmanager/pwmanager/serializer.cpp b/pwmanager/pwmanager/serializer.cpp
index 507fa30..6c6512e 100644
--- a/pwmanager/pwmanager/serializer.cpp
+++ b/pwmanager/pwmanager/serializer.cpp
@@ -24,6 +24,8 @@
24#ifdef PWM_EMBEDDED 24#ifdef PWM_EMBEDDED
25#include <kglobal.h> 25#include <kglobal.h>
26#include <klocale.h> 26#include <klocale.h>
27//Added by qt3to4:
28#include <Q3CString>
27#endif 29#endif
28 30
29/* enable/disable serializer debugging (0/1) */ 31/* enable/disable serializer debugging (0/1) */
@@ -146,7 +148,7 @@ Serializer::Serializer()
146#endif 148#endif
147} 149}
148 150
149Serializer::Serializer(const QCString &buffer) 151Serializer::Serializer(const Q3CString &buffer)
150{ 152{
151 defaultLockStat = true; 153 defaultLockStat = true;
152//US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing 154//US BUG: I needed to specify a document name. Otherwise impl will not be created for serializing
@@ -177,7 +179,7 @@ void Serializer::clear()
177 domDoc = new QDomDocument; 179 domDoc = new QDomDocument;
178} 180}
179 181
180bool Serializer::parseXml(const QCString &buffer) 182bool Serializer::parseXml(const Q3CString &buffer)
181{ 183{
182 //abort(); 184 //abort();
183 //qDebug("parse %s ", buffer.data()); 185 //qDebug("parse %s ", buffer.data());
@@ -198,33 +200,33 @@ bool Serializer::parseXml(const QCString &buffer)
198 return true; 200 return true;
199} 201}
200 202
201QCString Serializer::getXml() 203Q3CString Serializer::getXml()
202{ 204{
203 PWM_ASSERT(domDoc); 205 PWM_ASSERT(domDoc);
204 206
205#ifndef PWM_EMBEDDED 207#ifndef PWM_EMBEDDED
206#if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 208#if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0
207 QCString tmp(domDoc->toCString(8)); 209 Q3CString tmp(domDoc->toCString(8));
208 printDebug("<BEGIN Serializer::getXml() dump>\n"); 210 printDebug("<BEGIN Serializer::getXml() dump>\n");
209 cout << tmp << endl; 211 cout << tmp << endl;
210 printDebug("<END Serializer::getXml() dump>"); 212 printDebug("<END Serializer::getXml() dump>");
211#endif // DEBUG 213#endif // DEBUG
212 214
213 QCString ret(domDoc->toCString(0)); 215 Q3CString ret(domDoc->toCString(0));
214 ret.replace('\n', ""); 216 ret.replace('\n', "");
215 return ret; 217 return ret;
216#else 218#else
217 219
218#if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 220#if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0
219 QCString tmp(" " + domDoc->toCString()); 221 Q3CString tmp(" " + domDoc->toCString());
220 printDebug("<BEGIN Serializer::getXml() dump>\n"); 222 printDebug("<BEGIN Serializer::getXml() dump>\n");
221 qDebug(tmp); 223 qDebug(tmp);
222 cout << tmp << endl; 224 cout << tmp << endl;
223 printDebug("<END Serializer::getXml() dump>"); 225 printDebug("<END Serializer::getXml() dump>");
224#endif // DEBUG 226#endif // DEBUG
225 227
226 QCString ret(domDoc->toCString()); 228 Q3CString ret(domDoc->toByteArray());
227 ret.replace(QRegExp("\n"), ""); 229 ret.replace("\n", "");
228 return ret; 230 return ret;
229 231
230#endif 232#endif
diff --git a/pwmanager/pwmanager/serializer.h b/pwmanager/pwmanager/serializer.h
index df50e42..e085ade 100644
--- a/pwmanager/pwmanager/serializer.h
+++ b/pwmanager/pwmanager/serializer.h
@@ -23,7 +23,7 @@
23 23
24#include "pwmdoc.h" 24#include "pwmdoc.h"
25 25
26#include <qcstring.h> 26#include <q3cstring.h>
27#include <qdom.h> 27#include <qdom.h>
28 28
29#include <vector> 29#include <vector>
@@ -40,16 +40,16 @@ public:
40 /** construct an empty serializer document */ 40 /** construct an empty serializer document */
41 Serializer(); 41 Serializer();
42 /** construct a serializer document and parse "buffer" */ 42 /** construct a serializer document and parse "buffer" */
43 Serializer(const QCString &buffer); 43 Serializer(const Q3CString &buffer);
44 /** destructor */ 44 /** destructor */
45 virtual ~Serializer(); 45 virtual ~Serializer();
46 46
47 /** clears all data */ 47 /** clears all data */
48 void clear(); 48 void clear();
49 /** parse the given data buffer */ 49 /** parse the given data buffer */
50 bool parseXml(const QCString &buffer); 50 bool parseXml(const Q3CString &buffer);
51 /** returns the current XML data */ 51 /** returns the current XML data */
52 QCString getXml(); 52 Q3CString getXml();
53 /** serialize "dta" and store it as XML data */ 53 /** serialize "dta" and store it as XML data */
54 //US ENH: we need to serialize and deserialize not only categories, but also synctargets 54 //US ENH: we need to serialize and deserialize not only categories, but also synctargets
55 bool serialize(PwMItem &dta); 55 bool serialize(PwMItem &dta);
diff --git a/pwmanager/pwmanager/setmasterpwwnd_emb.cpp b/pwmanager/pwmanager/setmasterpwwnd_emb.cpp
index e6471e6..c5fd4e4 100644
--- a/pwmanager/pwmanager/setmasterpwwnd_emb.cpp
+++ b/pwmanager/pwmanager/setmasterpwwnd_emb.cpp
@@ -31,6 +31,9 @@ $Id$
31#include <qlabel.h> 31#include <qlabel.h>
32#include <qlineedit.h> 32#include <qlineedit.h>
33#include <qlayout.h> 33#include <qlayout.h>
34//Added by qt3to4:
35#include <Q3VBoxLayout>
36#include <Q3GridLayout>
34 37
35#include <klocale.h> 38#include <klocale.h>
36 39
@@ -57,7 +60,7 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name )
57 KDialogBase::Ok, parent, name, true ) 60 KDialogBase::Ok, parent, name, true )
58{ 61{
59 QWidget *page = plainPage(); 62 QWidget *page = plainPage();
60 QVBoxLayout *pageLayout = new QVBoxLayout( page ); 63 Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page );
61 64
62 mainTab = new QTabWidget( page ); 65 mainTab = new QTabWidget( page );
63 pageLayout->addWidget( mainTab ); 66 pageLayout->addWidget( mainTab );
@@ -70,12 +73,12 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name )
70 // This is the Password tab1 73 // This is the Password tab1
71 tab = new QWidget( mainTab ); 74 tab = new QWidget( mainTab );
72 75
73 QGridLayout *layout = new QGridLayout( tab, 5, 1 ); 76 Q3GridLayout *layout = new Q3GridLayout( tab, 5, 1 );
74 layout->setMargin( KDialogBase::marginHint() ); 77 layout->setMargin( KDialogBase::marginHint() );
75 layout->setSpacing( KDialogBase::spacingHint() ); 78 layout->setSpacing( KDialogBase::spacingHint() );
76 79
77 QLabel* label = new QLabel( i18n( "Using a normal password-string to encrypt the data." ), tab ); 80 QLabel* label = new QLabel( i18n( "Using a normal password-string to encrypt the data." ), tab );
78 label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); 81 label->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) );
79 layout->addWidget(label, 0, 0); 82 layout->addWidget(label, 0, 0);
80 83
81 pwEdit_1 = new QLineEdit( tab, "pwEdit_1" ); 84 pwEdit_1 = new QLineEdit( tab, "pwEdit_1" );
@@ -99,16 +102,16 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name )
99 // This is the Password tab2 102 // This is the Password tab2
100 tab_2 = new QWidget( mainTab ); 103 tab_2 = new QWidget( mainTab );
101 104
102 layout = new QGridLayout( tab_2, 5, 1 ); 105 layout = new Q3GridLayout( tab_2, 5, 1 );
103 layout->setMargin( KDialogBase::marginHint() ); 106 layout->setMargin( KDialogBase::marginHint() );
104 layout->setSpacing( KDialogBase::spacingHint() ); 107 layout->setSpacing( KDialogBase::spacingHint() );
105 108
106 label = new QLabel( i18n( "Using a PwM key-card to encrypt the data." ), tab_2 ); 109 label = new QLabel( i18n( "Using a PwM key-card to encrypt the data." ), tab_2 );
107 label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); 110 label->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) );
108 layout->addWidget(label, 0, 0); 111 layout->addWidget(label, 0, 0);
109 112
110 label = new QLabel( i18n( "selected card:" ), tab_2 ); 113 label = new QLabel( i18n( "selected card:" ), tab_2 );
111 label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); 114 label->setAlignment( int( Qt::AlignVCenter | Qt::AlignRight ) );
112 layout->addWidget(label, 1, 0); 115 layout->addWidget(label, 1, 0);
113 116
114 selCardButton = new QPushButton( i18n( "&Select the currently inserted card as key-card" ), tab_2 ); 117 selCardButton = new QPushButton( i18n( "&Select the currently inserted card as key-card" ), tab_2 );
diff --git a/pwmanager/pwmanager/setmasterpwwnd_emb.h b/pwmanager/pwmanager/setmasterpwwnd_emb.h
index c8ddec6..a070fea 100644
--- a/pwmanager/pwmanager/setmasterpwwnd_emb.h
+++ b/pwmanager/pwmanager/setmasterpwwnd_emb.h
@@ -27,6 +27,8 @@ $Id$
27#define SETMASTERPWWND_EMB_H 27#define SETMASTERPWWND_EMB_H
28 28
29#include <kdialogbase.h> 29#include <kdialogbase.h>
30//Added by qt3to4:
31#include <QLabel>
30 32
31class QLineEdit; 33class QLineEdit;
32class QPushButton; 34class QPushButton;
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.cpp b/pwmanager/pwmanager/setmasterpwwndimpl.cpp
index 3482643..7041d2e 100644
--- a/pwmanager/pwmanager/setmasterpwwndimpl.cpp
+++ b/pwmanager/pwmanager/setmasterpwwndimpl.cpp
@@ -188,6 +188,6 @@ string SetMasterPwWndImpl::getPw(bool *useCard)
188 return ""; 188 return "";
189} 189}
190 190
191#ifndef PWM_EMBEDDED 191#ifndef PWM_EMBEDDED_
192#include "setmasterpwwndimpl.moc" 192#include "moc_setmasterpwwndimpl.cpp"
193#endif 193#endif
diff --git a/pwmanager/pwmanager/waitwnd.cpp b/pwmanager/pwmanager/waitwnd.cpp
index a3f25cc..d4676a9 100644
--- a/pwmanager/pwmanager/waitwnd.cpp
+++ b/pwmanager/pwmanager/waitwnd.cpp
@@ -22,6 +22,10 @@
22#include "pwmexception.h" 22#include "pwmexception.h"
23 23
24#include <qmessagebox.h> 24#include <qmessagebox.h>
25//Added by qt3to4:
26#include <QResizeEvent>
27#include <QCloseEvent>
28#include <QLabel>
25 29
26#include <klocale.h> 30#include <klocale.h>
27 31
@@ -29,11 +33,11 @@
29WaitWnd::WaitWnd(QString caption, QString _staticText, 33WaitWnd::WaitWnd(QString caption, QString _staticText,
30 bool showCancelButton, bool showGenericText, 34 bool showCancelButton, bool showGenericText,
31 QWidget *parent, 35 QWidget *parent,
32 const char *name, bool modal, WFlags f) 36 const char *name, bool modal, Qt::WFlags f)
33 : QDialog(parent, name, modal, f) 37 : QDialog(parent, name, modal, f)
34{ 38{
35 canClose = false; 39 canClose = false;
36 vbox1 = new QVBox(this); 40 vbox1 = new Q3VBox(this);
37 staticText = new QLabel(vbox1); 41 staticText = new QLabel(vbox1);
38 if (showGenericText) { 42 if (showGenericText) {
39 genericText = new QLabel(vbox1); 43 genericText = new QLabel(vbox1);
@@ -89,6 +93,6 @@ void WaitWnd::updateGenericText(const QString &text)
89 genericText->setText(text); 93 genericText->setText(text);
90} 94}
91 95
92#ifndef PWM_EMBEDDED 96#ifndef PWM_EMBEDDED_
93#include "waitwnd.moc" 97#include "moc_waitwnd.cpp"
94#endif 98#endif
diff --git a/pwmanager/pwmanager/waitwnd.h b/pwmanager/pwmanager/waitwnd.h
index ae86c8b..6a619b9 100644
--- a/pwmanager/pwmanager/waitwnd.h
+++ b/pwmanager/pwmanager/waitwnd.h
@@ -20,11 +20,14 @@
20#ifndef WAITWND_H 20#ifndef WAITWND_H
21#define WAITWND_H 21#define WAITWND_H
22 22
23#include <qvbox.h> 23#include <q3vbox.h>
24#include <qdialog.h> 24#include <qdialog.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qpushbutton.h> 26#include <qpushbutton.h>
27#include <qevent.h> 27#include <qevent.h>
28//Added by qt3to4:
29#include <QResizeEvent>
30#include <QCloseEvent>
28 31
29/** window to ask the user to wait */ 32/** window to ask the user to wait */
30class WaitWnd : public QDialog 33class WaitWnd : public QDialog
@@ -34,7 +37,7 @@ public:
34 WaitWnd(QString caption, QString _staticText, 37 WaitWnd(QString caption, QString _staticText,
35 bool showCancelButton, bool showGenericText, 38 bool showCancelButton, bool showGenericText,
36 QWidget *parent = 0, const char *name = 0, 39 QWidget *parent = 0, const char *name = 0,
37 bool modal = FALSE, WFlags f = 0); 40 bool modal = FALSE, Qt::WFlags f = 0);
38 ~WaitWnd(); 41 ~WaitWnd();
39 42
40 void updateGenericText(const QString &text); 43 void updateGenericText(const QString &text);
@@ -46,7 +49,7 @@ protected slots:
46 void cancel_slot(); 49 void cancel_slot();
47 50
48protected: 51protected:
49 QVBox *vbox1; 52 Q3VBox *vbox1;
50 QLabel *staticText; 53 QLabel *staticText;
51 QLabel *genericText; 54 QLabel *genericText;
52 QPushButton *cancelButton; 55 QPushButton *cancelButton;
diff --git a/qtcompat/qptrlist.h b/qtcompat/qptrlist.h
index 8ce6868..c3d3ca2 100644
--- a/qtcompat/qptrlist.h
+++ b/qtcompat/qptrlist.h
@@ -1,6 +1,8 @@
1#ifndef QTCOMPAT_QPTRLIST_H 1#ifndef QTCOMPAT_QPTRLIST_H
2#define QTCOMPAT_QPTRLIST_H 2#define QTCOMPAT_QPTRLIST_H
3 3
4#if 0
5
4#include <qlist.h> 6#include <qlist.h>
5 7
6#define QPtrList QList 8#define QPtrList QList
@@ -8,3 +10,5 @@
8#define QPtrCollection QCollection 10#define QPtrCollection QCollection
9 11
10#endif 12#endif
13
14#endif
diff --git a/qtcompat/qptrstack.h b/qtcompat/qptrstack.h
index 92070b3..b0afdf1 100644
--- a/qtcompat/qptrstack.h
+++ b/qtcompat/qptrstack.h
@@ -1,9 +1,13 @@
1#ifndef QTCOMPAT_QPTRSTACK_H 1#ifndef QTCOMPAT_QPTRSTACK_H
2#define QTCOMPAT_QPTRSTACK_H 2#define QTCOMPAT_QPTRSTACK_H
3 3
4#if 0
5
4#include <qstack.h> 6#include <qstack.h>
5 7
6#define QPtrStack QStack 8#define QPtrStack QStack
7#define QPtrStackIterator QStackIterator 9#define QPtrStackIterator QStackIterator
8 10
9#endif 11#endif
12
13#endif