author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
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 @@ -export KDEPIMDIR = $(shell pwd) - -export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version) - -ifeq ($(PLATFORM) , zaurus) - BUILD_NO_LDAP_PLUGIN=1 -endif - -ifneq ($(PLATFORM) , zaurus) - BUILD_NO_SHARP_PLUGIN=1 -endif - -#opie plugin is deprecated. The qtopia plugin handles the task from now on. -BUILD_NO_OPIE_PLUGIN=1 - -SUBDIRS_MICROKDE = \ - libical/src/libical \ - libical/src/libicalss \ - qtcompat \ - microkde \ - libkcal \ - libkdepim \ - kabc \ - kabc/formats/binary \ - kabc/plugins/file \ - kabc/plugins/dir \ - korganizer \ - kalarmd \ - kaddressbook - -SUBDIRS_QTOPIA_PLUGIN = \ - kabc/plugins/qtopia - -SUBDIRS_OPIE_PLUGIN = \ - kabc/plugins/opie - -SUBDIRS_SHARP_PLUGIN = \ - kabc/plugins/sharpdtm - -SUBDIRS_LDAP_PLUGIN = \ - kabc/plugins/ldap - -SUBDIRS_MICROMAIL = \ - libetpan \ - kmicromail/libmailwrapper \ - kmicromail - -SUBDIRS_GAMMU = \ - gammu/emb/common \ - gammu/emb/gammu - -SUBDIRS_PWMANAGER = \ - pwmanager/libcrypt/mpi \ - pwmanager/libcrypt/error \ - pwmanager/libcrypt/cipher \ - pwmanager/libcrypt/zlib \ - pwmanager/pwmanager - -SUBDIRS = \ - $(SUBDIRS_MICROKDE) \ - $(SUBDIRS_QTOPIA_PLUGIN) \ - $(SUBDIRS_OPIE_PLUGIN) \ - $(SUBDIRS_SHARP_PLUGIN) \ - $(SUBDIRS_LDAP_PLUGIN) \ - $(SUBDIRS_MICROMAIL) \ - $(SUBDIRS_GAMMU) \ - $(SUBDIRS_PWMANAGER) - - -all: build_microkde \ - build_qtopia_plugin \ - build_opie_plugin \ - build_sharp_plugin \ - build_ldap_plugin \ - build_micromail \ - build_gammu \ - build_pwmanager - - -build_microkde: variable_test tmake - for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - -build_qtopia_plugin: build_microkde - ifdef BUILD_NO_QTOPIA_PLUGIN - @echo == qtopia plugin not build. - else - for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_opie_plugin: build_microkde - ifdef BUILD_NO_OPIE_PLUGIN - @echo == opie plugin not build. - else - for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_sharp_plugin: build_microkde - ifdef BUILD_NO_SHARP_PLUGIN - @echo == ldap plugin not build. - else - for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_ldap_plugin: build_microkde - ifdef BUILD_NO_LDAP_PLUGIN - @echo == ldap plugin not build. - else - for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - - -build_micromail: build_microkde - ifdef BUILD_NO_MICROMAIL - @echo == kmicromail not build. - else - for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_gammu: variable_test tmake - ifdef BUILD_NO_GAMMU - @echo == gammu not build. - else - for i in $(SUBDIRS_GAMMU); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - -build_pwmanager: build_microkde - ifdef BUILD_NO_PWMANAGER - @echo == pwmanager not build. - else - for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ - make -f Makefile$(PLATFORM) || exit 1; popd; \ - done - endif - - -variable_info: - @echo -------------------------------------- - @echo KDEPIM buildsystem, variableinfo... - @echo KDEPIMDIR=$(KDEPIMDIR) - @echo QTDIR=$(QTDIR) - @echo QPEDIR=$(QPEDIR) - @echo OPIEDIR=$(OPIEDIR) - @echo PLATFORM=$(PLATFORM) - @echo RELEASE_DEBUG=$(RELEASE_DEBUG) - @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) - @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) - @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) - @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) - @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) - ifndef BUILD_NO_SHARP_PLUGIN - @echo SHARPDTMSDK=$(SHARPDTMSDK) - endif - @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) - @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) - @echo -------------------------------------- - -variable_test: variable_info - @echo KDEPIM buildsystem, variablecheck... - ifndef KDEPIMDIR - @echo KDEPIMDIR is not defined. - $(error KDEPIMDIR is not defined) - endif - ifndef PLATFORM - @echo PLATFORM is not defined. - $(error PLATFORM is not defined) - endif - ifdef BUILD_NO_LDAP_PLUGIN - @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) - endif - ifdef BUILD_NO_OPIE_PLUGIN - @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) - endif - ifdef BUILD_NO_QTOPIA_PLUGIN - @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) - endif - ifdef BUILD_NO_MICROMAIL - @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) - endif - ifdef BUILD_NO_SHARP_PLUGIN - @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) - else - ifndef SHARPDTMSDK - @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) - $(error SHARPDTMSDK is not defined) - endif - endif - ifdef BUILD_NO_GAMMU - @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) - endif - ifdef BUILD_NO_PWMANAGER - @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) - endif - @echo -------------------------------------- - - -objects: - for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done - for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done - mkdir -p libical/lib/$(PLATFORM) - mkdir -p dest - mkdir -p dest$(LIBICAL_PATH) - mkdir -p pwmanager/libcrypt/$(PLATFORM) - -clean: - rm -rf libical/lib/$(PLATFORM)/*; - rm -rf pwmanager/libcrypt/$(PLATFORM)/*; - for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ - rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ - done - -pac: - rm -f $(QPEDIR)/lib/libmicro* - rm -f $(QPEDIR)/plugins/applets/libkopi* - make - make install - make dist -install: - - cd bin/kdepim; make install - cp -r Pim $(QPEDIR)/apps - cp db2file/db2file $(QPEDIR)/bin/db2file - chmod ugo+x $(QPEDIR)/bin/db2file - cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop - cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop - cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop - cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop - -dist: - @echo Dont forget to do "make install" before "make dist" - rm -f *arm.ipk - rm -f *ipk.zip - rm -rf ../kdepimpi_$(KDEPIM_VERSION)/* - rm -f *~ - cd ..;mkdir -p kdepimpi_$(KDEPIM_VERSION) - cd ../kdepimpi_$(KDEPIM_VERSION);mkdir -p ipk - cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim - mkipks kmicrokdelibs.control - mkipks korganizer.control - mkipks kaddressbook.control - ifndef BUILD_NO_MICROMAIL - mkipks kopiemail.control - endif - ifndef BUILD_NO_SHARP_PLUGIN - mkipks ksharpPIM-DTMaccess.control - endif - mkipks korganizer-alarm.control - ifndef BUILD_NO_GAMMU - mkipks kmobilephoneaccess.control - endif - ifndef BUILD_NO_PWMANAGER - mkipks pwmanager.control - endif - mkipks pimTABicon.control - zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt - mv *.ipk ../kdepimpi_$(KDEPIM_VERSION)/ipk/ - mv *for_SharpRom.ipk.zip ../kdepimpi_$(KDEPIM_VERSION)/ - mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../kdepimpi_$(KDEPIM_VERSION)/ - -tmake: objects \ - qtcompat/Makefile$(PLATFORM) \ - microkde/Makefile$(PLATFORM) \ - libkcal/Makefile$(PLATFORM) \ - libkdepim/Makefile$(PLATFORM) \ - korganizer/Makefile$(PLATFORM) \ - kalarmd/Makefile$(PLATFORM) \ - libical/src/libical/Makefile$(PLATFORM) \ - libical/src/libicalss/Makefile$(PLATFORM) \ - kabc/Makefile$(PLATFORM) \ - kabc/formats/binary/Makefile$(PLATFORM) \ - kabc/plugins/file/Makefile$(PLATFORM) \ - kabc/plugins/dir/Makefile$(PLATFORM) \ - kabc/plugins/ldap/Makefile$(PLATFORM) \ - kabc/plugins/opie/Makefile$(PLATFORM) \ - kabc/plugins/qtopia/Makefile$(PLATFORM) \ - kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ - kaddressbook/Makefile$(PLATFORM) \ - kmicromail/Makefile$(PLATFORM) \ - libetpan/Makefile$(PLATFORM) \ - kmicromail/libmailwrapper/Makefile$(PLATFORM) \ - gammu/emb/common/Makefile$(PLATFORM) \ - gammu/emb/gammu/Makefile$(PLATFORM) \ - pwmanager/pwmanager/Makefile$(PLATFORM) \ - pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ - pwmanager/libcrypt/error/Makefile$(PLATFORM) \ - pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ - pwmanager/libcrypt/zlib/Makefile$(PLATFORM) - -qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro - cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) - -microkde/Makefile$(PLATFORM): microkde/microkdeE.pro - cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) - -libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro - cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) - - -libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro - cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) - -kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro - cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) - -korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro - cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) - -libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro - cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) - -libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro - cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) - -kabc/Makefile$(PLATFORM): kabc/kabcE.pro - cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) - -kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro - cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) - -kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro - cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) - -kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro - cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) - -kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro - cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) - -kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro - cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) - -kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro - cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) - -kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro - cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) - -kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro - cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) - -kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro - cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) - -libetpan/Makefile$(PLATFORM): libetpan/libetpanE.pro - cd libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) - -kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro - cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) - -gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro - cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) - -gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro - cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) - -pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro - cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM) - - -pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro - cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM) - -pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro - cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM) - -pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro - cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM) - -pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro - cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM) - - 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 @@ -172,3 +172,3 @@ phone/symbian/mroutgen.c DEFINES += DESKTOP_VERSION -TARGET = microgammu +TARGET = xmicrogammu CONFIG = warn_off release console @@ -194 +194,3 @@ SOURCES += device/serial/ser_w32.c \ } +#The following line was inserted by qt3to4 +QT += 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 @@ -90,3 +90,3 @@ static GSM_Error bluetooth_checkdevice(GSM_StateMachine *s, char *address, WSAPR WSAQUERYSET *pResults = (WSAQUERYSET*)&buffer; - HANDLE handle; + Qt::HANDLE handle; GSM_Error error; @@ -140,3 +140,3 @@ GSM_Error bluetooth_findchannel(GSM_StateMachine *s) WSAPROTOCOL_INFO protocolInfo; - HANDLE handle; + Qt::HANDLE handle; DWORD flags; 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 @@ -121,3 +121,3 @@ WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextA( - IN HANDLE hLookup, + IN Qt::HANDLE hLookup, IN DWORD dwControlFlags, @@ -129,3 +129,3 @@ WSALookupServiceNextA( -WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(IN HANDLE hLookup); +WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(IN Qt::HANDLE hLookup); 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 @@ -8,3 +8,3 @@ typedef struct { - HANDLE hPhone; + Qt::HANDLE hPhone; DCB old_settings; 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 @@ -49,3 +49,3 @@ SOURCES += gammu.c \ unix : { -LIBS += ../../../bin/libmicrogammu.so /usr/lib/libpthread.so +LIBS += ../../../bin/libxmicrogammu.so -lpthread # bluetooth disabled for now @@ -65 +65,3 @@ DESTDIR = ../../../bin TARGET = kammu +#The following line was inserted by qt3to4 +QT += xml qt3support diff --git a/kabc/address.h b/kabc/address.h index 38ad20b..41794fe 100644 --- a/kabc/address.h +++ b/kabc/address.h @@ -34,3 +34,3 @@ $Id$ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -70,4 +70,4 @@ class Address */ - typedef QValueList<Address> List; - typedef QValueList<int> TypeList; + typedef Q3ValueList<Address> List; + typedef Q3ValueList<int> TypeList; diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index fe59fcb..c700897 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -39,4 +39,4 @@ $Id$ */ -#include <qptrlist.h> -#include <qtextstream.h> +#include <q3ptrlist.h> +#include <q3textstream.h> #include <qfile.h> @@ -246,3 +246,3 @@ void AddressBook::init(const QString &config, const QString &family ) QString fami = family; - if (config != 0) { + if (!config.isEmpty()) { if ( family == "syncContact" ) { @@ -383,3 +383,3 @@ void AddressBook::export2File( QString fileName, QString resourceName ) QFile outFile( fileName ); - if ( !outFile.open( IO_WriteOnly ) ) { + if ( !outFile.open( QIODevice::WriteOnly ) ) { QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); @@ -388,4 +388,4 @@ void AddressBook::export2File( QString fileName, QString resourceName ) } - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); Iterator it; @@ -470,6 +470,6 @@ bool AddressBook::export2PhoneFormat( QStringList uids ,QString fileName ) QFile outFile(fileName); - if ( outFile.open(IO_WriteOnly) ) { + if ( outFile.open(QIODevice::WriteOnly) ) { datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); - QTextStream t( &outFile ); // use a text stream - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); // use a text stream + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t <<datastream; @@ -492,3 +492,3 @@ int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool remo QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); @@ -636,3 +636,3 @@ void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); @@ -1220,5 +1220,5 @@ void AddressBook::removeResources() //remove all possible resources. This should cleanup the configfile. - QPtrList<KABC::Resource> mResources = resources(); + Q3PtrList<KABC::Resource> mResources = resources(); - QPtrListIterator<KABC::Resource> it(mResources); + Q3PtrListIterator<KABC::Resource> it(mResources); for ( ; it.current(); ++it ) { @@ -1242,5 +1242,5 @@ bool AddressBook::removeResource( Resource *resource ) -QPtrList<Resource> AddressBook::resources() +Q3PtrList<Resource> AddressBook::resources() { - QPtrList<Resource> list; + Q3PtrList<Resource> list; diff --git a/kabc/addressbook.h b/kabc/addressbook.h index a8a9fc1..56fce4d 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -33,3 +33,3 @@ $Id$ #include <kresources/manager.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -282,3 +282,3 @@ class AddressBook : public QObject */ - QPtrList<Resource> resources(); + Q3PtrList<Resource> resources(); diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index e8e440c..9994e29 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -393,3 +393,3 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) if ( mData->givenName.isEmpty() ) mData->givenName = ad.mData->givenName ; - if ( mData->additionalName ) mData->additionalName = ad.mData->additionalName; + if ( mData->additionalName.isEmpty() ) mData->additionalName = ad.mData->additionalName; if ( mData->prefix.isEmpty() ) mData->prefix = ad.mData->prefix; diff --git a/kabc/addressee.h b/kabc/addressee.h index 0ea1803..30dcd5d 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -35,3 +35,3 @@ $Id$ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -86,3 +86,3 @@ class Addressee public: - typedef QValueList<Addressee> List; + typedef Q3ValueList<Addressee> List; diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index 671787e..bda1b9e 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -22,7 +22,10 @@ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qapplication.h> #include <qregexp.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qlabel.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3VBoxLayout> @@ -40,4 +43,4 @@ using namespace KABC; -AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : - QListViewItem( parent ), +AddresseeItem::AddresseeItem( Q3ListView *parent, const Addressee &addressee ) : + Q3ListViewItem( parent ), mAddressee( addressee ) @@ -73,3 +76,3 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : - QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ; + Q3VBoxLayout *listLayout = new Q3VBoxLayout (listWidget) ; //topLayout->addLayout( listLayout ); @@ -83,6 +86,6 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : listLayout->addWidget( mAddresseeList ); - connect( mAddresseeList, SIGNAL( doubleClicked( QListViewItem * ) ), + connect( mAddresseeList, SIGNAL( doubleClicked( Q3ListViewItem * ) ), SLOT( slotOk() ) ); //QHBox* searchBox = new QHBox ( listWidget ); - QHBox * hb = new QHBox ( listWidget ); + Q3HBox * hb = new Q3HBox ( listWidget ); listLayout->addWidget ( hb ); @@ -103,5 +106,5 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : // SLOT( removeSelected() ) ); - connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ), + connect( mSelectedList, SIGNAL( clicked( Q3ListViewItem * ) ), SLOT( removeSelected() ) ); - connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ), + connect( mSelectedList, SIGNAL( returnPressed( Q3ListViewItem *) ), SLOT( removeSelected() ) ); @@ -113,6 +116,6 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : #endif - connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ), - SLOT( addSelected( QListViewItem * ) ) ); - connect( mAddresseeList, SIGNAL( returnPressed( QListViewItem * ) ), - SLOT( selectNextItem( QListViewItem * ) ) ); + connect( mAddresseeList, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( addSelected( Q3ListViewItem * ) ) ); + connect( mAddresseeList, SIGNAL( returnPressed( Q3ListViewItem * ) ), + SLOT( selectNextItem( Q3ListViewItem * ) ) ); @@ -128,3 +131,3 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : loadAddressBook(); - QValueList<int> splitterSize; + Q3ValueList<int> splitterSize; splitterSize.append( ( width() / 5 ) * 3 ); @@ -174,3 +177,3 @@ void AddresseeDialog::loadAddressBook() -void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) +void AddresseeDialog::addCompletionItem( const QString &str, Q3ListViewItem *item ) { @@ -186,3 +189,3 @@ void AddresseeDialog::selectItem( const QString &str ) - QListViewItem *item = mItemDict.find( str ); + Q3ListViewItem *item = mItemDict.find( str ); if ( item ) { @@ -195,3 +198,3 @@ void AddresseeDialog::selectItem( const QString &str ) -void AddresseeDialog::updateEdit( QListViewItem *item ) +void AddresseeDialog::updateEdit( Q3ListViewItem *item ) { @@ -201,6 +204,6 @@ void AddresseeDialog::updateEdit( QListViewItem *item ) -void AddresseeDialog::selectNextItem( QListViewItem *item ) +void AddresseeDialog::selectNextItem( Q3ListViewItem *item ) { addSelected( item ); - QListViewItem *next = item->nextSibling(); + Q3ListViewItem *next = item->nextSibling(); if ( next ) { @@ -211,3 +214,3 @@ void AddresseeDialog::selectNextItem( QListViewItem *item ) } -void AddresseeDialog::addSelected( QListViewItem *item ) +void AddresseeDialog::addSelected( Q3ListViewItem *item ) { @@ -218,3 +221,3 @@ void AddresseeDialog::addSelected( QListViewItem *item ) - QListViewItem *selectedItem = mSelectedDict.find( a.uid() ); + Q3ListViewItem *selectedItem = mSelectedDict.find( a.uid() ); if ( !selectedItem ) { @@ -228,6 +231,6 @@ void AddresseeDialog::removeSelected() { - QListViewItem *item = mSelectedList->selectedItem(); + Q3ListViewItem *item = mSelectedList->selectedItem(); AddresseeItem *addrItem = (AddresseeItem *)( item ); if ( !addrItem ) return; - QListViewItem *next = item->nextSibling(); + Q3ListViewItem *next = item->nextSibling(); mSelectedDict.remove( addrItem->addressee().uid() ); @@ -257,3 +260,3 @@ Addressee::List AddresseeDialog::addressees() if ( mMultiple ) { - QListViewItem *item = mSelectedList->firstChild(); + Q3ListViewItem *item = mSelectedList->firstChild(); while( item ) { diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h index 6fab62d..be7bbb4 100644 --- a/kabc/addresseedialog.h +++ b/kabc/addresseedialog.h @@ -23,3 +23,3 @@ -#include <qdict.h> +#include <q3dict.h> @@ -36,3 +36,3 @@ namespace KABC { */ -class AddresseeItem : public QListViewItem +class AddresseeItem : public Q3ListViewItem { @@ -53,3 +53,3 @@ class AddresseeItem : public QListViewItem */ - AddresseeItem( QListView *parent, const Addressee &addressee ); + AddresseeItem( Q3ListView *parent, const Addressee &addressee ); @@ -131,5 +131,5 @@ class AddresseeDialog : public KDialogBase void selectItem( const QString & ); - void selectNextItem( QListViewItem *item ); - void updateEdit( QListViewItem *item ); - void addSelected( QListViewItem *item ); + void selectNextItem( Q3ListViewItem *item ); + void updateEdit( Q3ListViewItem *item ); + void addSelected( Q3ListViewItem *item ); void removeSelected(); @@ -141,3 +141,3 @@ class AddresseeDialog : public KDialogBase private: - void addCompletionItem( const QString &str, QListViewItem *item ); + void addCompletionItem( const QString &str, Q3ListViewItem *item ); @@ -152,4 +152,4 @@ class AddresseeDialog : public KDialogBase - QDict<QListViewItem> mItemDict; - QDict<QListViewItem> mSelectedDict; + Q3Dict<Q3ListViewItem> mItemDict; + Q3Dict<Q3ListViewItem> mSelectedDict; diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp index 097e162..e1ba1ce 100644 --- a/kabc/addresseelist.cpp +++ b/kabc/addresseelist.cpp @@ -30,3 +30,5 @@ $Id$ //US -#include <qtl.h> +#include <q3tl.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -123,3 +125,3 @@ bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 ) AddresseeList::AddresseeList() - : QValueList<Addressee>() + : Q3ValueList<Addressee>() { @@ -135,3 +137,3 @@ AddresseeList::~AddresseeList() AddresseeList::AddresseeList( const AddresseeList &l ) - : QValueList<Addressee>( l ) + : Q3ValueList<Addressee>( l ) { @@ -141,4 +143,4 @@ AddresseeList::AddresseeList( const AddresseeList &l ) -AddresseeList::AddresseeList( const QValueList<Addressee> &l ) - : QValueList<Addressee>( l ) +AddresseeList::AddresseeList( const Q3ValueList<Addressee> &l ) + : Q3ValueList<Addressee>( l ) { diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h index 2df252c..6106804 100644 --- a/kabc/addresseelist.h +++ b/kabc/addresseelist.h @@ -31,3 +31,3 @@ $Id$ -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -116,3 +116,3 @@ typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterio */ -class AddresseeList : public QValueList<Addressee> +class AddresseeList : public Q3ValueList<Addressee> { @@ -122,3 +122,3 @@ class AddresseeList : public QValueList<Addressee> AddresseeList( const AddresseeList & ); - AddresseeList( const QValueList<Addressee> & ); + AddresseeList( const Q3ValueList<Addressee> & ); diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp index cde19a1..425e67c 100644 --- a/kabc/addresseeview.cpp +++ b/kabc/addresseeview.cpp @@ -29,6 +29,6 @@ //US #include <kstringhandler.h> -#include <qscrollview.h> +#include <q3scrollview.h> #include <qregexp.h> #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qlabel.h> @@ -39,3 +39,3 @@ #ifdef DESKTOP_VERSION -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qprinter.h> @@ -43,5 +43,10 @@ #endif +#include <QDesktopWidget> -#include <qstylesheet.h> +#include <q3stylesheet.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QPixmap> +#include <Q3VBoxLayout> #include "externalapphandler.h" @@ -61,3 +66,3 @@ bool AddresseeView::sFullDetailsMode = false; AddresseeView::AddresseeView( QWidget *parent, const char *name ) - : QTextBrowser( parent, name ) + : Q3TextBrowser( parent, name ) @@ -84,3 +89,3 @@ void AddresseeView::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -404,3 +409,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( picAvailintern ) { - QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); + Q3MimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); int wid = picture.data().width(); @@ -420,3 +425,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) QPixmap picPix( picture.url() ); - QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); int wid = picPix.width(); @@ -437,3 +442,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( !setDefaultImageChildren ) { - QMimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "familyIcon", KGlobal::iconLoader()->loadIcon( "ic_kids", KIcon::Desktop, 128 ) ); setDefaultImageChildren = true; @@ -445,3 +450,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( !setDefaultImagepouses ) { - QMimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "SpousesIcon", KGlobal::iconLoader()->loadIcon( "ic_family", KIcon::Desktop, 128 ) ); setDefaultImagepouses = true; @@ -454,3 +459,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( !setDefaultImageMale ) { - QMimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "MaleIcon", KGlobal::iconLoader()->loadIcon( "ic_male", KIcon::Desktop, 128 ) ); setDefaultImageMale = true; @@ -462,3 +467,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( !setDefaultImageFemale ) { - QMimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "FemaleIcon", KGlobal::iconLoader()->loadIcon( "ic_female", KIcon::Desktop, 128 ) ); setDefaultImageFemale = true; @@ -471,3 +476,3 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) //qDebug("Setting default pixmap "); - QMimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "defaultIcon", KGlobal::iconLoader()->loadIcon( "ic_penguin", KIcon::Desktop, 128 ) ); setDefaultImage = true; @@ -655,3 +660,3 @@ void AddresseeView::addTag(const QString & tag,const QString & text) return; - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; @@ -690,9 +695,9 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo setMainWidget( topframe ); - QBoxLayout* bl; + Q3BoxLayout* bl; if ( QApplication::desktop()->width() < 640 ) { - bl = new QVBoxLayout( topframe ); + bl = new Q3VBoxLayout( topframe ); } else { - bl = new QHBoxLayout( topframe ); + bl = new Q3HBoxLayout( topframe ); } - QVBox* subframe = new QVBox( topframe ); + Q3VBox* subframe = new Q3VBox( topframe ); bl->addWidget(subframe ); @@ -700,6 +705,6 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo if ( takeloc ) - lab->setBackgroundColor(Qt::green.light() ); + lab->setBackgroundColor(QColor(Qt::green).light() ); AddresseeView * av = new AddresseeView( subframe ); av->setAddressee( loc ); - subframe = new QVBox( topframe ); + subframe = new Q3VBox( topframe ); bl->addWidget(subframe ); @@ -707,3 +712,3 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo if ( !takeloc ) - lab->setBackgroundColor(Qt::green.light() ); + lab->setBackgroundColor(QColor(Qt::green).light() ); av = new AddresseeView( subframe ); diff --git a/kabc/addresseeview.h b/kabc/addresseeview.h index a4de085..f7ce2e0 100644 --- a/kabc/addresseeview.h +++ b/kabc/addresseeview.h @@ -28,3 +28,3 @@ //US #include <ktextbrowser.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> @@ -33,3 +33,3 @@ namespace KABC { //US class AddresseeView : public KTextBrowser -class AddresseeView : public QTextBrowser +class AddresseeView : public Q3TextBrowser { diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp index d34ba0b..cf5afa6 100644 --- a/kabc/distributionlist.cpp +++ b/kabc/distributionlist.cpp @@ -25,2 +25,4 @@ #include "distributionlist.h" +//Added by qt3to4: +#include <Q3ValueList> @@ -56,3 +58,3 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email ) Entry e( a, em ); - QValueList<Entry>::Iterator it; + Q3ValueList<Entry>::Iterator it; for( it = mEntries.begin(); it != mEntries.end(); ++it ) { @@ -76,3 +78,3 @@ void DistributionList::removeEntry( const Addressee &a, const QString &email ) { - QValueList<Entry>::Iterator it; + Q3ValueList<Entry>::Iterator it; for( it = mEntries.begin(); it != mEntries.end(); ++it ) { diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h index c81e543..8d21a17 100644 --- a/kabc/distributionlist.h +++ b/kabc/distributionlist.h @@ -26,2 +26,5 @@ #include "addressbook.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> @@ -50,3 +53,3 @@ class DistributionList { - typedef QValueList<Entry> List; + typedef Q3ValueList<Entry> List; @@ -169,3 +172,3 @@ class DistributionListManager - QPtrList<DistributionList> mLists; + Q3PtrList<DistributionList> mLists; }; diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp index d2e1144..82883e6 100644 --- a/kabc/distributionlistdialog.cpp +++ b/kabc/distributionlistdialog.cpp @@ -20,3 +20,3 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qlayout.h> @@ -25,4 +25,10 @@ #include <qcombobox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> #include <klineeditdlg.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> +#include <Q3Button> #include <qradiobutton.h> @@ -62,6 +68,6 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString ¤t, { - QFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = plainPage(); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); - mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), topFrame ); @@ -80,3 +86,3 @@ QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); @@ -98,8 +104,8 @@ QString EmailSelector::getEmail( const QStringList &emails, const QString &curre -class EntryItem : public QListViewItem +class EntryItem : public Q3ListViewItem { public: - EntryItem( QListView *parent, const Addressee &addressee, + EntryItem( Q3ListView *parent, const Addressee &addressee, const QString &email=QString::null ) : - QListViewItem( parent ), + Q3ListViewItem( parent ), mAddressee( addressee ), @@ -138,6 +144,6 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); - QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; + Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ; @@ -159,3 +165,3 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address - QGridLayout *gridLayout = new QGridLayout( topLayout, 3, 3 ); + Q3GridLayout *gridLayout = new Q3GridLayout( topLayout, 3, 3 ); gridLayout->setColStretch(1, 1); @@ -168,3 +174,3 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address - mAddresseeView = new QListView( this ); + mAddresseeView = new Q3ListView( this ); mAddresseeView->addColumn( i18n("Name") ); @@ -175,3 +181,3 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address SLOT( slotSelectionAddresseeViewChanged() ) ); - connect( mAddresseeView, SIGNAL( doubleClicked( QListViewItem * ) ), + connect( mAddresseeView, SIGNAL( doubleClicked( Q3ListViewItem * ) ), SLOT( addEntry() ) ); @@ -183,3 +189,3 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address - mEntryView = new QListView( this ); + mEntryView = new Q3ListView( this ); mEntryView->addColumn( i18n("Name") ); diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h index b6d3c80..3627431 100644 --- a/kabc/distributionlistdialog.h +++ b/kabc/distributionlistdialog.h @@ -24,2 +24,4 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QLabel> @@ -27,6 +29,6 @@ -class QListView; +class Q3ListView; class QLabel; class QComboBox; -class QButtonGroup; +class Q3ButtonGroup; @@ -95,3 +97,3 @@ class EmailSelector : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; @@ -126,4 +128,4 @@ class DistributionListEditorWidget : public QWidget QLabel *mListLabel; - QListView *mEntryView; - QListView *mAddresseeView; + Q3ListView *mEntryView; + Q3ListView *mAddresseeView; diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp index 9f5840b..ca5ecb7 100644 --- a/kabc/distributionlisteditor.cpp +++ b/kabc/distributionlisteditor.cpp @@ -20,3 +20,3 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qlayout.h> @@ -29,4 +29,8 @@ #endif -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qradiobutton.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> @@ -50,6 +54,6 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString & { - QFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = plainPage(); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); - mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), topFrame ); @@ -68,3 +72,3 @@ QString EmailSelectDialog::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); @@ -87,8 +91,8 @@ QString EmailSelectDialog::getEmail( const QStringList &emails, const QString &c -class EditEntryItem : public QListViewItem +class EditEntryItem : public Q3ListViewItem { public: - EditEntryItem( QListView *parent, const Addressee &addressee, + EditEntryItem( Q3ListView *parent, const Addressee &addressee, const QString &email=QString::null ) : - QListViewItem( parent ), + Q3ListViewItem( parent ), mAddressee( addressee ), @@ -127,3 +131,3 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setMargin( KDialog::marginHint() ); @@ -131,3 +135,3 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge - QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; + Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ; @@ -145,3 +149,3 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge - mEntryView = new QListView( this ); + mEntryView = new Q3ListView( this ); mEntryView->addColumn( i18n("Name") ); @@ -164,3 +168,3 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge - mAddresseeView = new QListView( this ); + mAddresseeView = new Q3ListView( this ); mAddresseeView->addColumn( i18n("Name") ); diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h index e0b4221..e672a14 100644 --- a/kabc/distributionlisteditor.h +++ b/kabc/distributionlisteditor.h @@ -26,5 +26,5 @@ -class QListView; +class Q3ListView; class QComboBox; -class QButtonGroup; +class Q3ButtonGroup; @@ -47,3 +47,3 @@ class EmailSelectDialog : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; @@ -74,4 +74,4 @@ class DistributionListEditor : public QWidget QComboBox *mNameCombo; - QListView *mEntryView; - QListView *mAddresseeView; + Q3ListView *mEntryView; + Q3ListView *mAddresseeView; diff --git a/kabc/field.cpp b/kabc/field.cpp index 7c6d7a9..203f696 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -35,2 +35,4 @@ $Id$ #include "resource.h" +//Added by qt3to4: +#include <Q3ValueList> @@ -379,3 +381,3 @@ bool Field::setValue( KABC::Addressee &a, const QString &value ) QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate - a.setBirthday(dt); + a.setBirthday((QDateTime)dt); } @@ -495,3 +497,3 @@ void Field::saveFields( KConfig *cfg, const QString &identifier, { - QValueList<int> fieldIds; + Q3ValueList<int> fieldIds; @@ -535,3 +537,3 @@ Field::List Field::restoreFields( KConfig *cfg, const QString &identifier ) { - QValueList<int> fieldIds = cfg->readIntListEntry( identifier); + Q3ValueList<int> fieldIds = cfg->readIntListEntry( identifier); //US @@ -542,3 +544,3 @@ Field::List Field::restoreFields( KConfig *cfg, const QString &identifier ) int custom = 0; - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) { diff --git a/kabc/field.h b/kabc/field.h index 9e06597..55cc705 100644 --- a/kabc/field.h +++ b/kabc/field.h @@ -31,3 +31,3 @@ $Id$ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -45,3 +45,3 @@ class Field public: - typedef QValueList<Field *> List; + typedef Q3ValueList<Field *> List; diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp index 3ae1c27..cbb97a2 100644 --- a/kabc/formatfactory.cpp +++ b/kabc/formatfactory.cpp @@ -104,3 +104,3 @@ QStringList FormatFactory::formats() - QDictIterator<FormatInfo> it( mFormatList ); + Q3DictIterator<FormatInfo> it( mFormatList ); for ( ; it.current(); ++it ) diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h index 9612374..de15b17 100644 --- a/kabc/formatfactory.h +++ b/kabc/formatfactory.h @@ -23,3 +23,3 @@ -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -99,3 +99,3 @@ class FormatFactory - QDict<FormatInfo> mFormatList; + Q3Dict<FormatInfo> mFormatList; }; 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 @@ -10,3 +10,3 @@ MOC_DIR = moc DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib 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 @@ -13,3 +13,3 @@ $Id$ -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> @@ -39,4 +39,4 @@ bool VCardFormatPlugin2::load( Addressee &addressee, QFile *file ) - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); data = t.read(); @@ -60,4 +60,4 @@ bool VCardFormatPlugin2::loadAll( AddressBook *addressBook, Resource *resource, - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); data = t.read(); @@ -88,4 +88,4 @@ void VCardFormatPlugin2::save( const Addressee &addressee, QFile *file ) - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t << tool.createVCards( vcardlist ); @@ -107,4 +107,4 @@ void VCardFormatPlugin2::saveAll( AddressBook *ab, Resource *resource, QFile *fi - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t << tool.createVCards( vcardlist ); @@ -116,3 +116,3 @@ bool VCardFormatPlugin2::checkFormat( QFile *file ) const - file->readLine( line, 1024 ); + char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp; line = line.stripWhiteSpace(); diff --git a/kabc/kabc.pro b/kabc/kabc.pro index 17ebff8..846ed8a 100644 --- a/kabc/kabc.pro +++ b/kabc/kabc.pro @@ -5,3 +5,3 @@ DESTDIR=../bin -TARGET = microkabc +TARGET = xmicrokabc @@ -11,3 +11,3 @@ INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microk -#LIBS += -lmicrokde -lldap +#LIBS += -lxmicrokde -lldap LIBS += -L$(QPEDIR)/lib @@ -218 +218,5 @@ vcard/TextListValue.cpp #formats/binary/binaryformat.cpp \ +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +QT += diff --git a/kabc/kabcE.pro b/kabc/kabcE.pro index 1d28a4d..6045b68 100644 --- a/kabc/kabcE.pro +++ b/kabc/kabcE.pro @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc +TARGET = xmicrokabc @@ -9,4 +9,4 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokdepim #LIBS += -lldap @@ -196 +196,3 @@ vcard/TextListValue.cpp # plugins/ldap/resourceldapconfig.cpp \ +#The following line was inserted by qt3to4 +QT += qt3support @@ -30,3 +30,3 @@ $Id$ -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -43,4 +43,4 @@ class Key public: - typedef QValueList<Key> List; - typedef QValueList<int> TypeList; + typedef Q3ValueList<Key> List; + typedef Q3ValueList<int> TypeList; diff --git a/kabc/phonenumber.h b/kabc/phonenumber.h index feeba6c..6bc89d3 100644 --- a/kabc/phonenumber.h +++ b/kabc/phonenumber.h @@ -30,3 +30,3 @@ $Id$ -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qstring.h> @@ -48,4 +48,4 @@ class PhoneNumber public: - typedef QValueList<PhoneNumber> List; - typedef QValueList<int> TypeList; + typedef Q3ValueList<PhoneNumber> List; + typedef Q3ValueList<int> TypeList; diff --git a/kabc/picture.cpp b/kabc/picture.cpp index 57aa297..0c59937 100644 --- a/kabc/picture.cpp +++ b/kabc/picture.cpp @@ -28,2 +28,4 @@ $Id$ #include "picture.h" +//Added by qt3to4: +#include <QPixmap> diff --git a/kabc/picture.h b/kabc/picture.h index 714d1e2..1b63610 100644 --- a/kabc/picture.h +++ b/kabc/picture.h @@ -31,2 +31,4 @@ $Id$ #include <qimage.h> +//Added by qt3to4: +#include <QPixmap> 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 @@ -6,6 +6,6 @@ include( ../../../variables.pri ) -TARGET = microkabc_dir +TARGET = xmicrokabc_dir INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat DESTDIR = ../../../bin -#LIBS += -lmicrokde -lmicrokabc +#LIBS += -lxmicrokde -lxmicrokabc #LIBS += -L$(QPEDIR)/lib @@ -31,6 +31,10 @@ OBJECTS_DIR = obj/win MOC_DIR = moc/win -LIBS += ../../../bin/microkdepim.lib -LIBS += ../../../bin/microkcal.lib -LIBS += ../../../bin/microkde.lib +LIBS += ../../../bin/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } +#The following line was inserted by qt3to4 +QT += qt3support +#The following line was inserted by qt3to4 +QT += 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 @@ -4,3 +4,3 @@ CONFIG += qt warn_on release -TARGET = microkabc_dir +TARGET = xmicrokabc_dir INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat @@ -9,3 +9,3 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib 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 @@ -172,3 +172,3 @@ bool ResourceDir::doOpen() QFile file( mPath + "/" + testName ); - if ( file.open( IO_ReadOnly ) ) + if ( file.open( QIODevice::ReadOnly ) ) return true; @@ -198,3 +198,3 @@ bool ResourceDir::load() - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); @@ -225,3 +225,3 @@ bool ResourceDir::save( Ticket *ticket ) QFile file( mPath + "/" + (*it).uid() ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1' for writing" ).arg( file.name() ) ); @@ -269,3 +269,3 @@ bool ResourceDir::lock( const QString &path ) QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); 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 @@ -29,2 +29,4 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -46,3 +48,3 @@ ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name ) { - QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, + Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0, KDialog::spacingHint() ); 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 @@ -6,3 +6,3 @@ include( ../../../variables.pri ) -TARGET = microkabc_file +TARGET = xmicrokabc_file INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat @@ -10,3 +10,3 @@ INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microk DESTDIR = ../../../bin -#LIBS += -lmicrokde -lmicrokabc +#LIBS += -lxmicrokde -lxmicrokabc #LIBS += -L$(QPEDIR)/lib @@ -32,6 +32,10 @@ OBJECTS_DIR = obj/win MOC_DIR = moc/win -LIBS += ../../../bin/microkdepim.lib -LIBS += ../../../bin/microkcal.lib -LIBS += ../../../bin/microkde.lib +LIBS += ../../../bin/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } +#The following line was inserted by qt3to4 +QT += qt3support +#The following line was inserted by qt3to4 +QT += 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 @@ -4,3 +4,3 @@ CONFIG += qt warn_on release -TARGET = microkabc_file +TARGET = xmicrokabc_file INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat @@ -9,3 +9,3 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib 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 @@ -203,3 +203,3 @@ bool ResourceFile::doOpen() // try to create the file - bool ok = file.open( IO_WriteOnly ); + bool ok = file.open( QIODevice::WriteOnly ); if ( ok ) @@ -209,3 +209,3 @@ bool ResourceFile::doOpen() } else { - if ( !file.open( IO_ReadWrite ) ) + if ( !file.open( QIODevice::ReadWrite ) ) return false; @@ -232,3 +232,3 @@ bool ResourceFile::load() QFile file( fileName() ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1'." ).arg( fileName() ) ); @@ -313,3 +313,3 @@ bool ResourceFile::save( Ticket *ticket ) info.setName( fileName() ); - bool ok = info.open( IO_WriteOnly ); + bool ok = info.open( QIODevice::WriteOnly ); if ( ok ) { @@ -365,3 +365,3 @@ bool ResourceFile::lock( const QString &fileName ) QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); 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 @@ -30,2 +30,4 @@ $Id$ #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -52,3 +54,3 @@ ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name ) - QGridLayout *mainLayout = new QGridLayout( this, 2, 2, 0, + Q3GridLayout *mainLayout = new Q3GridLayout( this, 2, 2, 0, KDialog::spacingHint() ); 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 @@ -4,3 +4,3 @@ CONFIG += qt warn_on release -TARGET = microkabc_ldap +TARGET = xmicrokabc_ldap INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include @@ -9,3 +9,3 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_olaccess +TARGET = xmicrokabc_olaccess @@ -30,5 +30,5 @@ OBJECTS_DIR = obj/win MOC_DIR = moc/win -LIBS += ../../../bin/microkdepim.lib -LIBS += ../../../bin/microkcal.lib -LIBS += ../../../bin/microkde.lib +LIBS += ../../../bin/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib 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 @@ -3,3 +3,3 @@ CONFIG += qt warn_on #release debug -TARGET = microkabc_opie +TARGET = xmicrokabc_opie @@ -11,4 +11,4 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc +LIBS += -lxmicrokde +LIBS += -lxmicrokabc LIBS += -L$(QPEDIR)/lib 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 @@ -5,3 +5,3 @@ include( ../../../variables.pri ) -TARGET = microkabc_qtopia +TARGET = xmicrokabc_qtopia @@ -10,4 +10,4 @@ INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/ DESTDIR = ../../../bin -#LIBS += -lmicrokde -#LIBS += -lkamicrokabc +#LIBS += -lxmicrokde +#LIBS += -lxkamicrokabc @@ -38,6 +38,10 @@ OBJECTS_DIR = obj/win MOC_DIR = moc/win -LIBS += ../../../bin/microkdepim.lib -LIBS += ../../../bin/microkcal.lib -LIBS += ../../../bin/microkde.lib +LIBS += ../../../bin/xmicrokdepim.lib +LIBS += ../../../bin/xmicrokcal.lib +LIBS += ../../../bin/xmicrokde.lib LIBS += ../../../bin/microkabc.lib } +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +QT += 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 @@ -3,3 +3,3 @@ CONFIG += qt warn_on -TARGET = microkabc_qtopia +TARGET = xmicrokabc_qtopia @@ -10,4 +10,4 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc +LIBS += -lxmicrokde +LIBS += -lxmicrokabc LIBS += -L$(QPEDIR)/lib 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 @@ -36,3 +36,5 @@ $Id$ #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3ValueList> //#include <.h> @@ -73,4 +75,4 @@ QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QStr QStringList dummy; - QValueList<OpieCategories>::ConstIterator catIt; - QValueList<OpieCategories> categories = m_edit->categories(); + Q3ValueList<OpieCategories>::ConstIterator catIt; + Q3ValueList<OpieCategories> categories = m_edit->categories(); bool found = false; @@ -194,3 +196,3 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr ) if ( date.isValid() ) - adr.setBirthday( date ); + adr.setBirthday( (QDateTime)date ); @@ -319,3 +321,3 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr ) -bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, QTextStream *stream ) +bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, Q3TextStream *stream ) { @@ -486,5 +488,5 @@ void CategoryEdit::save(const QString& fileName)const{ QString endl = "\n"; - if ( file.open( IO_WriteOnly ) ) { - QTextStream stream( &file ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + if ( file.open( QIODevice::WriteOnly ) ) { + Q3TextStream stream( &file ); + stream.setEncoding( Q3TextStream::UnicodeUTF8 ); stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl; @@ -492,3 +494,3 @@ void CategoryEdit::save(const QString& fileName)const{ stream << "<Categories>" << endl; - for ( QValueList<OpieCategories>::ConstIterator it = m_categories.begin(); + for ( Q3ValueList<OpieCategories>::ConstIterator it = m_categories.begin(); it != m_categories.end(); ++it ) @@ -539,3 +541,3 @@ void CategoryEdit::parse( const QString &tempFile ){ QFile f( tempFile ); - if ( !f.open( IO_ReadOnly ) ) + if ( !f.open( QIODevice::ReadOnly ) ) return; @@ -589,3 +591,3 @@ QString CategoryEdit::categoryById( const QString &id, const QString &app )cons { - QValueList<OpieCategories>::ConstIterator it; + Q3ValueList<OpieCategories>::ConstIterator it; QString category; 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 @@ -30,2 +30,5 @@ $Id$ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3TextStream> @@ -78,3 +81,3 @@ class OpieCategories { void clear(); - QValueList<OpieCategories> categories()const { return m_categories; }; + Q3ValueList<OpieCategories> categories()const { return m_categories; }; private: @@ -85,3 +88,3 @@ class OpieCategories { QMap<int, bool> ids; // from tt Qtopia::UidGen - QValueList<OpieCategories> m_categories; + Q3ValueList<OpieCategories> m_categories; }; @@ -119,3 +122,3 @@ public: */ - bool addresseeToQtopia( const Addressee &ab, QTextStream *stream ); + bool addresseeToQtopia( const Addressee &ab, Q3TextStream *stream ); 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 @@ -33,3 +33,3 @@ $Id$ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfileinfo.h> @@ -158,3 +158,3 @@ bool ResourceQtopia::load() QFile file( fileName() ); - if ( !file.open(IO_ReadOnly ) ) { + if ( !file.open(QIODevice::ReadOnly ) ) { return false; @@ -205,8 +205,8 @@ bool ResourceQtopia::save( Ticket *ticket ) QFile file( fileName() ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); - QTextStream *stream = &ts; - stream->setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream ts( &file ); + Q3TextStream *stream = &ts; + stream->setEncoding( Q3TextStream::UnicodeUTF8 ); *stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE Addressbook ><AddressBook>" << endl; @@ -262,3 +262,3 @@ bool ResourceQtopia::lock( const QString &lockfileName ) QFile file( mLockUniqueName ); - file.open( IO_WriteOnly ); + file.open( QIODevice::WriteOnly ); file.close(); 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 @@ -29,2 +29,4 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -48,3 +50,3 @@ ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) { - QGridLayout *mainLayout = new QGridLayout( this, 1, 2, 0, + Q3GridLayout *mainLayout = new Q3GridLayout( this, 1, 2, 0, KDialog::spacingHint() ); 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 @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_sharpdtm +TARGET = xmicrokabc_sharpdtm @@ -10,5 +10,5 @@ MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokabc +LIBS += -lxmicrokdepim LIBS += -lmicroqtcompat diff --git a/kabc/secrecy.h b/kabc/secrecy.h index b2ff565..0fe956e 100644 --- a/kabc/secrecy.h +++ b/kabc/secrecy.h @@ -30,3 +30,3 @@ $Id$ -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -40,3 +40,3 @@ class Secrecy public: - typedef QValueList<int> TypeList; + typedef Q3ValueList<int> TypeList; diff --git a/kabc/sound.h b/kabc/sound.h index 0ec5ec8..9777054 100644 --- a/kabc/sound.h +++ b/kabc/sound.h @@ -30,3 +30,3 @@ $Id$ -#include <qcstring.h> +#include <q3cstring.h> #include <qstring.h> diff --git a/kabc/tmpaddressbook.cpp b/kabc/tmpaddressbook.cpp index cfa57e3..5152e00 100644 --- a/kabc/tmpaddressbook.cpp +++ b/kabc/tmpaddressbook.cpp @@ -26,3 +26,3 @@ $Id$ */ -#include <qptrlist.h> +#include <q3ptrlist.h> 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -40,3 +42,3 @@ AdrParam::AdrParam(const AdrParam & x) -AdrParam::AdrParam(const QCString & s) +AdrParam::AdrParam(const Q3CString & s) : Param(s) @@ -58,3 +60,3 @@ AdrParam::operator = (AdrParam & x) AdrParam & -AdrParam::operator = (const QCString & s) +AdrParam::operator = (const Q3CString & s) { @@ -79,3 +81,3 @@ AdrParam::operator == (AdrParam & x) - QStrListIterator it(x.adrTypeList_); + Q3StrListIterator it(x.adrTypeList_); @@ -116,3 +118,3 @@ AdrParam::_assemble() - QStrListIterator it(adrTypeList_); + Q3StrListIterator it(adrTypeList_); 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 @@ -27,2 +27,5 @@ #include <VCardDefines.h> +//Added by qt3to4: +#include <Q3StrList> +#include <Q3CString> @@ -47,3 +50,3 @@ AdrValue::AdrValue(const AdrValue & x) -AdrValue::AdrValue(const QCString & s) +AdrValue::AdrValue(const Q3CString & s) : Value(s) @@ -70,3 +73,3 @@ AdrValue::operator = (AdrValue & x) AdrValue & -AdrValue::operator = (const QCString & s) +AdrValue::operator = (const Q3CString & s) { @@ -107,3 +110,3 @@ AdrValue::_parse() - QStrList l; + Q3StrList l; RTokenise(strRep_, ";", l); 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -41,3 +43,3 @@ AgentParam::AgentParam(const AgentParam & x) -AgentParam::AgentParam(const QCString & s) +AgentParam::AgentParam(const Q3CString & s) : Param(s) @@ -59,3 +61,3 @@ AgentParam::operator = (AgentParam & x) AgentParam & -AgentParam::operator = (const QCString & s) +AgentParam::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ AgentValue::AgentValue(const AgentValue & x) -AgentValue::AgentValue(const QCString & s) +AgentValue::AgentValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ AgentValue::operator = (AgentValue & x) AgentValue & -AgentValue::operator = (const QCString & s) +AgentValue::operator = (const Q3CString & s) { 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 @@ -28,2 +28,4 @@ #include <kdebug.h> +//Added by qt3to4: +#include <Q3CString> @@ -42,3 +44,3 @@ ClassValue::ClassValue(const ClassValue & x) -ClassValue::ClassValue(const QCString & s) +ClassValue::ClassValue(const Q3CString & s) : Value(s) @@ -60,3 +62,3 @@ ClassValue::operator = (ClassValue & x) ClassValue & -ClassValue::operator = (const QCString & s) +ClassValue::operator = (const Q3CString & s) { 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 @@ -23,4 +23,4 @@ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <qregexp.h> @@ -100,3 +100,3 @@ ContentLine::ContentLine(const ContentLine & x) -ContentLine::ContentLine(const QCString & s) +ContentLine::ContentLine(const Q3CString & s) : Entity(s), @@ -131,3 +131,3 @@ ContentLine::operator = (ContentLine & x) ContentLine & -ContentLine::operator = (const QCString & s) +ContentLine::operator = (const Q3CString & s) { @@ -144,3 +144,3 @@ ContentLine::operator == (ContentLine & x) - QPtrListIterator<Param> it(x.paramList()); + Q3PtrListIterator<Param> it(x.paramList()); @@ -165,7 +165,7 @@ ContentLine::_parse() // NLR - strRep_ = strRep_.replace( QRegExp( "\\r" ), "" ); + strRep_ = strRep_.replace( "\\r" , "" ); // Unqote newlines - strRep_ = strRep_.replace( QRegExp( "\\\\n" ), "\n" ); + strRep_ = strRep_.replace( "\\\\n", "\n" ); //NLR - strRep_ = strRep_.replace( QRegExp( "\\\\r" ), "\r" ); + strRep_ = strRep_.replace( "\\\\r" , "\r" ); @@ -178,4 +178,4 @@ ContentLine::_parse() - QCString firstPart(strRep_.left(split)); - QCString valuePart(strRep_.mid(split + 1)); + Q3CString firstPart(strRep_.left(split)); + Q3CString valuePart(strRep_.mid(split + 1)); @@ -194,3 +194,3 @@ ContentLine::_parse() - QStrList l; + Q3StrList l; @@ -216,3 +216,3 @@ ContentLine::_parse() - QStrListIterator it(l); + Q3StrListIterator it(l); @@ -220,3 +220,3 @@ ContentLine::_parse() - QCString str = *it; + Q3CString str = *it; @@ -228,9 +228,9 @@ ContentLine::_parse() - QCString paraName = str.left(split); - QCString paraValue = str.mid(split + 1); + Q3CString paraName = str.left(split); + Q3CString paraValue = str.mid(split + 1); - QStrList paraValues; + Q3StrList paraValues; RTokenise(paraValue, ",", paraValues); - QStrListIterator it2( paraValues ); + Q3StrListIterator it2( paraValues ); @@ -311,3 +311,3 @@ ContentLine::_assemble() - QCString line; + Q3CString line; 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ DateParam::DateParam(const DateParam & x) -DateParam::DateParam(const QCString & s) +DateParam::DateParam(const Q3CString & s) : Param(s) @@ -54,3 +56,3 @@ DateParam::operator = (DateParam & x) DateParam & -DateParam::operator = (const QCString & s) +DateParam::operator = (const Q3CString & s) { 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 @@ -24,2 +24,4 @@ #include <qregexp.h> +//Added by qt3to4: +#include <Q3CString> @@ -107,3 +109,3 @@ DateValue::DateValue(const DateValue & x) -DateValue::DateValue(const QCString & s) +DateValue::DateValue(const Q3CString & s) : Value(s) @@ -122,3 +124,3 @@ DateValue::operator = (DateValue & x) DateValue & -DateValue::operator = (const QCString & s) +DateValue::operator = (const Q3CString & s) { @@ -156,4 +158,4 @@ DateValue::_parse() - QCString dateStr; - QCString timeStr; + Q3CString dateStr; + Q3CString timeStr; @@ -175,3 +177,3 @@ DateValue::_parse() - dateStr.replace(QRegExp("-"), ""); + dateStr.replace("-", ""); @@ -198,3 +200,3 @@ DateValue::_parse() - QCString zoneStr(timeStr.mid(zoneSep + 1)); + Q3CString zoneStr(timeStr.mid(zoneSep + 1)); vDebug("zoneStr == " + zoneStr); @@ -213,3 +215,3 @@ DateValue::_parse() if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. - QCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); + Q3CString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); secFrac_ = quirkafleeg.toDouble(); @@ -219,3 +221,3 @@ DateValue::_parse() - timeStr.replace(QRegExp(":"), ""); + timeStr.replace(":", ""); @@ -231,5 +233,5 @@ DateValue::_assemble() - QCString year; - QCString month; - QCString day; + Q3CString year; + Q3CString month; + Q3CString day; @@ -245,5 +247,5 @@ DateValue::_assemble() if ( hasTime_ ) { - QCString hour; - QCString minute; - QCString second; + Q3CString hour; + Q3CString minute; + Q3CString second; 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 @@ -26,2 +26,4 @@ #include <VCardDefines.h> +//Added by qt3to4: +#include <Q3CString> @@ -42,3 +44,3 @@ EmailParam::EmailParam(const EmailParam & x) -EmailParam::EmailParam(const QCString & s) +EmailParam::EmailParam(const Q3CString & s) : Param(s) @@ -60,3 +62,3 @@ EmailParam::operator = (EmailParam & x) EmailParam & -EmailParam::operator = (const QCString & s) +EmailParam::operator = (const Q3CString & s) { 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 @@ -24,2 +24,4 @@ #include <VCardEntity.h> +//Added by qt3to4: +#include <Q3CString> @@ -42,3 +44,3 @@ Entity::Entity(const Entity & e) -Entity::Entity(const QCString & s) +Entity::Entity(const Q3CString & s) : strRep_ (s), @@ -63,3 +65,3 @@ Entity::operator = (const Entity & e) Entity & -Entity::operator = (const QCString & s) +Entity::operator = (const Q3CString & s) { @@ -85,3 +87,3 @@ Entity::operator != (Entity & e) bool -Entity::operator == (const QCString & s) +Entity::operator == (const Q3CString & s) { @@ -91,3 +93,3 @@ Entity::operator == (const QCString & s) bool -Entity::operator != (const QCString & s) +Entity::operator != (const Q3CString & s) { @@ -101,3 +103,3 @@ Entity::~Entity() - QCString + Q3CString 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 @@ -23,3 +23,3 @@ -#include <qcstring.h> +#include <q3cstring.h> #include <ctype.h> @@ -31,3 +31,3 @@ using namespace VCARD; // There are 31 possible types, not including extensions. - const QCString + const Q3CString VCARD::paramNames [] = @@ -224,3 +224,3 @@ VCARD::EntityTypeToValueType(EntityType e) - QCString + Q3CString VCARD::EntityTypeToParamName(EntityType e) @@ -232,3 +232,3 @@ VCARD::EntityTypeToParamName(EntityType e) EntityType -VCARD::EntityNameToEntityType(const QCString & s) +VCARD::EntityNameToEntityType(const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -47,3 +49,3 @@ FloatValue::FloatValue(const FloatValue & x) -FloatValue::FloatValue(const QCString & s) +FloatValue::FloatValue(const Q3CString & s) : Value(s) @@ -65,3 +67,3 @@ FloatValue::operator = (FloatValue & x) FloatValue & -FloatValue::operator = (const QCString & s) +FloatValue::operator = (const Q3CString & s) { @@ -103,3 +105,3 @@ FloatValue::_assemble() { - strRep_ = QCString().setNum(value_); + strRep_ = Q3CString().setNum(value_); } 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 @@ -25,2 +25,4 @@ #include <kdebug.h> +//Added by qt3to4: +#include <Q3CString> @@ -38,3 +40,3 @@ GeoValue::GeoValue(const GeoValue & x) -GeoValue::GeoValue(const QCString & s) +GeoValue::GeoValue(const Q3CString & s) : Value(s) @@ -56,3 +58,3 @@ GeoValue::operator = (GeoValue & x) GeoValue & -GeoValue::operator = (const QCString & s) +GeoValue::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ ImageParam::ImageParam(const ImageParam & x) -ImageParam::ImageParam(const QCString & s) +ImageParam::ImageParam(const Q3CString & s) : Param(s) @@ -54,3 +56,3 @@ ImageParam::operator = (ImageParam & x) ImageParam & -ImageParam::operator = (const QCString & s) +ImageParam::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ ImageValue::ImageValue(const ImageValue & x) -ImageValue::ImageValue(const QCString & s) +ImageValue::ImageValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ ImageValue::operator = (ImageValue & x) ImageValue & -ImageValue::operator = (const QCString & s) +ImageValue::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ ImgValue::ImgValue(const ImgValue & x) -ImgValue::ImgValue(const QCString & s) +ImgValue::ImgValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ ImgValue::operator = (ImgValue & x) ImgValue & -ImgValue::operator = (const QCString & s) +ImgValue::operator = (const Q3CString & s) { 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 @@ -28,2 +28,5 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3StrList> @@ -41,3 +44,3 @@ LangValue::LangValue(const LangValue & x) -LangValue::LangValue(const QCString & s) +LangValue::LangValue(const Q3CString & s) : Value(s) @@ -56,3 +59,3 @@ LangValue::operator = (LangValue & x) LangValue & -LangValue::operator = (const QCString & s) +LangValue::operator = (const Q3CString & s) { @@ -76,3 +79,3 @@ LangValue::_parse() { - QStrList l; + Q3StrList l; RTokenise(strRep_, "-", l); @@ -93,9 +96,10 @@ LangValue::_assemble() - QStrListIterator it(subtags_); + Q3StrListIterator it(subtags_); - for (; it.current(); ++it) - strRep_ += QCString('-') + it.current(); + for (; it.current(); ++it) { + strRep_ += Q3CString('-'); strRep_ += it.current(); + } } - QCString + Q3CString LangValue::primary() @@ -106,3 +110,3 @@ LangValue::primary() - QStrList + Q3StrList LangValue::subtags() @@ -114,3 +118,3 @@ LangValue::subtags() void -LangValue::setPrimary(const QCString & s) +LangValue::setPrimary(const Q3CString & s) { @@ -121,3 +125,3 @@ LangValue::setPrimary(const QCString & s) void -LangValue::setSubTags(const QStrList & l) +LangValue::setSubTags(const Q3StrList & 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 @@ -23,3 +23,5 @@ -#include <qstrlist.h> +#include <q3strlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -48,3 +50,3 @@ NValue::NValue(const NValue & x) -NValue::NValue(const QCString & s) +NValue::NValue(const Q3CString & s) : Value(s) @@ -70,3 +72,3 @@ NValue::operator = (NValue & x) NValue & -NValue::operator = (const QCString & s) +NValue::operator = (const Q3CString & s) { @@ -102,3 +104,3 @@ NValue::_parse() { - QStrList l; + Q3StrList l; RTokenise(strRep_, ";", l); 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 @@ -28,2 +28,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -41,3 +43,3 @@ OrgValue::OrgValue(const OrgValue & x) -OrgValue::OrgValue(const QCString & s) +OrgValue::OrgValue(const Q3CString & s) : Value(s) @@ -56,3 +58,3 @@ OrgValue::operator = (OrgValue & x) OrgValue & -OrgValue::operator = (const QCString & s) +OrgValue::operator = (const Q3CString & s) { @@ -84,3 +86,3 @@ OrgValue::_assemble() - QStrListIterator it(valueList_); + Q3StrListIterator it(valueList_); @@ -100,3 +102,3 @@ OrgValue::numValues() - QCString + Q3CString OrgValue::value(unsigned int i) 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 @@ -28,2 +28,4 @@ #include <VCardRToken.h> +//Added by qt3to4: +#include <Q3CString> @@ -45,3 +47,3 @@ Param::Param(const Param & x) -Param::Param(const QCString & s) +Param::Param(const Q3CString & s) : Entity(s), @@ -65,3 +67,3 @@ Param::operator = (Param & x) Param & -Param::operator = (const QCString & s) +Param::operator = (const Q3CString & s) { @@ -93,3 +95,3 @@ Param::_assemble() -Param::Param(const QCString &name, const QCString &value) +Param::Param(const Q3CString &name, const Q3CString &value) : Entity(), @@ -103,3 +105,3 @@ Param::Param(const QCString &name, const QCString &value) void -Param::setName(const QCString & name) +Param::setName(const Q3CString & name) { @@ -111,3 +113,3 @@ Param::setName(const QCString & name) void -Param::setValue(const QCString & value) +Param::setValue(const Q3CString & value) { @@ -118,3 +120,3 @@ Param::setValue(const QCString & value) - QCString + Q3CString Param::name() @@ -124,3 +126,3 @@ Param::name() - QCString + Q3CString Param::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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) -PhoneNumberValue::PhoneNumberValue(const QCString & s) +PhoneNumberValue::PhoneNumberValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ PhoneNumberValue::operator = (PhoneNumberValue & x) PhoneNumberValue & -PhoneNumberValue::operator = (const QCString & s) +PhoneNumberValue::operator = (const Q3CString & s) { 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 @@ -26,4 +26,4 @@ #include <stddef.h> -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> @@ -33,3 +33,3 @@ namespace VCARD Q_UINT32 -RTokenise(const char * str, const char * delim, QStrList & l) +RTokenise(const char * str, const char * delim, Q3StrList & l) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ SoundValue::SoundValue(const SoundValue & x) -SoundValue::SoundValue(const QCString & s) +SoundValue::SoundValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ SoundValue::operator = (SoundValue & x) SoundValue & -SoundValue::operator = (const QCString & s) +SoundValue::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -43,3 +45,3 @@ SourceParam::SourceParam(const SourceParam & x) -SourceParam::SourceParam(const QCString & s) +SourceParam::SourceParam(const Q3CString & s) : Param(s), @@ -62,3 +64,3 @@ SourceParam::operator = (SourceParam & x) SourceParam & -SourceParam::operator = (const QCString & s) +SourceParam::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ TelParam::TelParam(const TelParam & x) -TelParam::TelParam(const QCString & s) +TelParam::TelParam(const Q3CString & s) : Param(s) @@ -54,3 +56,3 @@ TelParam::operator = (TelParam & x) TelParam & -TelParam::operator = (const QCString & s) +TelParam::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ TelValue::TelValue(const TelValue & x) -TelValue::TelValue(const QCString & s) +TelValue::TelValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ TelValue::operator = (TelValue & x) TelValue & -TelValue::operator = (const QCString & s) +TelValue::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ TextBinParam::TextBinParam(const TextBinParam & x) -TextBinParam::TextBinParam(const QCString & s) +TextBinParam::TextBinParam(const Q3CString & s) : Param(s) @@ -54,3 +56,3 @@ TextBinParam::operator = (TextBinParam & x) TextBinParam & -TextBinParam::operator = (const QCString & s) +TextBinParam::operator = (const Q3CString & s) { 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 @@ -27,2 +27,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -43,3 +45,3 @@ TextBinValue::TextBinValue(const TextBinValue & x) -TextBinValue::TextBinValue(const QCString & s) +TextBinValue::TextBinValue(const Q3CString & s) : Value(s) @@ -62,3 +64,3 @@ TextBinValue::operator = (TextBinValue & x) TextBinValue & -TextBinValue::operator = (const QCString & s) +TextBinValue::operator = (const Q3CString & s) { 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 @@ -28,2 +28,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -41,3 +43,3 @@ TextListValue::TextListValue(const TextListValue & x) -TextListValue::TextListValue(const QCString & s) +TextListValue::TextListValue(const Q3CString & s) : Value(s) @@ -56,3 +58,3 @@ TextListValue::operator = (TextListValue & x) TextListValue & -TextListValue::operator = (const QCString & s) +TextListValue::operator = (const Q3CString & s) { @@ -84,3 +86,3 @@ TextListValue::_assemble() - QStrListIterator it(valueList_); + Q3StrListIterator it(valueList_); @@ -100,3 +102,3 @@ TextListValue::numValues() - QCString + Q3CString TextListValue::value(unsigned int i) 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 @@ -26,2 +26,4 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ TextParam::TextParam(const TextParam & x) -TextParam::TextParam(const QCString & s) +TextParam::TextParam(const Q3CString & s) : Param(s) @@ -54,3 +56,3 @@ TextParam::operator = (TextParam & x) TextParam & -TextParam::operator = (const QCString & s) +TextParam::operator = (const Q3CString & s) { 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -39,3 +41,3 @@ TextValue::TextValue(const TextValue & x) -TextValue::TextValue(const QCString & s) +TextValue::TextValue(const Q3CString & s) : Value(s) @@ -54,3 +56,3 @@ TextValue::operator = (TextValue & x) TextValue & -TextValue::operator = (const QCString & s) +TextValue::operator = (const Q3CString & s) { @@ -63,3 +65,3 @@ TextValue::operator == (TextValue & x) { - return strRep_ = x.strRep_; + return strRep_ == x.strRep_; } 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -34,3 +36,3 @@ URIValue::URIValue() -URIValue::URIValue(const QCString & scheme, const QCString & schemeSpecificPart) +URIValue::URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart) : Value(), @@ -49,3 +51,3 @@ URIValue::URIValue(const URIValue & x) -URIValue::URIValue(const QCString & s) +URIValue::URIValue(const Q3CString & s) : Value(s) @@ -67,3 +69,3 @@ URIValue::operator = (URIValue & x) URIValue & -URIValue::operator = (const QCString & s) +URIValue::operator = (const Q3CString & s) { @@ -105,3 +107,3 @@ URIValue::_assemble() - QCString + Q3CString URIValue::scheme() @@ -112,3 +114,3 @@ URIValue::scheme() - QCString + Q3CString URIValue::schemeSpecificPart() @@ -120,3 +122,3 @@ URIValue::schemeSpecificPart() void -URIValue::setScheme(const QCString & s) +URIValue::setScheme(const Q3CString & s) { @@ -127,3 +129,3 @@ URIValue::setScheme(const QCString & s) void -URIValue::setSchemeSpecificPart(const QCString & s) +URIValue::setSchemeSpecificPart(const Q3CString & 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 @@ -26,2 +26,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -40,3 +42,3 @@ UTCValue::UTCValue(const UTCValue & x) -UTCValue::UTCValue(const QCString & s) +UTCValue::UTCValue(const Q3CString & s) : Value(s) @@ -59,3 +61,3 @@ UTCValue::operator = (UTCValue & x) UTCValue & -UTCValue::operator = (const QCString & s) +UTCValue::operator = (const Q3CString & s) { 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 @@ -25,2 +25,4 @@ #include <qdatetime.h> +//Added by qt3to4: +#include <Q3CString> @@ -43,3 +45,3 @@ VCardEntity::VCardEntity(const VCardEntity & x) -VCardEntity::VCardEntity(const QCString & s) +VCardEntity::VCardEntity(const Q3CString & s) : Entity(s) @@ -59,3 +61,3 @@ VCardEntity::operator = (VCardEntity & x) VCardEntity & -VCardEntity::operator = (const QCString & s) +VCardEntity::operator = (const Q3CString & s) { @@ -85,3 +87,3 @@ VCardEntity::_parse() vDebug("parse"); - QCString s(strRep_); + Q3CString s(strRep_); @@ -93,3 +95,3 @@ VCardEntity::_parse() - QCString cardStr(s.left(i)); + Q3CString cardStr(s.left(i)); @@ -134,3 +136,3 @@ VCardEntity::_parse() char* dat = strRep_.data()+start; - VCard * v = new VCard( QCString ( dat,i-start ) ); + VCard * v = new VCard( Q3CString ( dat,i-start ) ); start = i; 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 @@ -23,7 +23,7 @@ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <qstringlist.h> #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -50,3 +50,3 @@ VCard::VCard(const VCard & x) - QPtrListIterator<ContentLine> it(x.contentLineList_); + Q3PtrListIterator<ContentLine> it(x.contentLineList_); for (; it.current(); ++it) { @@ -58,3 +58,3 @@ VCard::VCard(const VCard & x) -VCard::VCard(const QCString & s) +VCard::VCard(const Q3CString & s) : Entity(s) @@ -70,3 +70,3 @@ VCard::operator = (VCard & x) group_ = x.group(); - QPtrListIterator<ContentLine> it(x.contentLineList_); + Q3PtrListIterator<ContentLine> it(x.contentLineList_); for (; it.current(); ++it) { @@ -81,3 +81,3 @@ VCard::operator = (VCard & x) VCard & -VCard::operator = (const QCString & s) +VCard::operator = (const Q3CString & s) { @@ -103,3 +103,3 @@ VCard::_parse() QStringList l; - QStrList sl; + Q3StrList sl; @@ -111,3 +111,4 @@ VCard::_parse() } - l = QStringList::fromStrList( sl ); + for(Q3StrList::iterator i=sl.begin();i!=sl.end();++i) + l.push_back(*i); // Get the first line @@ -182,3 +183,3 @@ VCard::_parse() for (; it2 != refolded.end(); ++it2) { - ContentLine * cl = new ContentLine(QCString((*it2).latin1())); + ContentLine * cl = new ContentLine(Q3CString((*it2).latin1())); cl->parse(); @@ -230,3 +231,3 @@ VCard::_assemble() - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); @@ -246,3 +247,3 @@ VCard::has(EntityType t) bool -VCard::has(const QCString & s) +VCard::has(const Q3CString & s) { @@ -261,3 +262,3 @@ VCard::add(const ContentLine & cl) void -VCard::add(const QCString & s) +VCard::add(const Q3CString & s) { @@ -272,3 +273,3 @@ VCard::contentLine(EntityType t) parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); @@ -282,6 +283,6 @@ VCard::contentLine(EntityType t) ContentLine * -VCard::contentLine(const QCString & s) +VCard::contentLine(const Q3CString & s) { parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); 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 @@ -25,2 +25,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -38,3 +40,3 @@ Value::Value(const Value & x) -Value::Value(const QCString & s) +Value::Value(const Q3CString & s) : Entity(s) @@ -53,3 +55,3 @@ Value::operator = (Value & x) Value & -Value::operator = (const QCString & s) +Value::operator = (const Q3CString & s) { 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 @@ -26,4 +26,4 @@ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> @@ -39,12 +39,12 @@ class AdrParam : public Param - QStrList adrTypeList() + Q3StrList adrTypeList() { parse(); return adrTypeList_; } - QCString textParam() + Q3CString textParam() { parse(); return textParam_; } - void setAdrTypeList(const QStrList & l) + void setAdrTypeList(const Q3StrList & l) { adrTypeList_ = l; assembled_ = false; } - void setTextParam(const QCString & s) + void setTextParam(const Q3CString & s) { textParam_ = s; assembled_ = false; } @@ -58,4 +58,4 @@ class AdrParam : public Param - QStrList adrTypeList_; - QCString textParam_; + Q3StrList adrTypeList_; + Q3CString textParam_; }; 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 @@ -26,3 +26,5 @@ -#include <qstrlist.h> +#include <q3strlist.h> +//Added by qt3to4: +#include <Q3CString> #include <VCardValue.h> @@ -39,30 +41,30 @@ class AdrValue : public Value - void setPOBox(const QCString & s) + void setPOBox(const Q3CString & s) { poBox_ = s; assembled_ = false; } - void setExtAddress(const QCString & s) + void setExtAddress(const Q3CString & s) { extAddress_ = s; assembled_ = false; } - void setStreet(const QCString & s) + void setStreet(const Q3CString & s) { street_ = s; assembled_ = false; } - void setLocality(const QCString & s) + void setLocality(const Q3CString & s) { locality_ = s; assembled_ = false; } - void setRegion(const QCString & s) + void setRegion(const Q3CString & s) { region_ = s; assembled_ = false; } - void setPostCode(const QCString & s) + void setPostCode(const Q3CString & s) { postCode_ = s; assembled_ = false; } - void setCountryName(const QCString & s) + void setCountryName(const Q3CString & s) { countryName_ = s; assembled_ = false; } - QCString poBox() { parse(); return poBox_; } - QCString extAddress() { parse(); return extAddress_; } - QCString street() { parse(); return street_; } - QCString locality() { parse(); return locality_; } - QCString region() { parse(); return region_; } - QCString postCode() { parse(); return postCode_; } - QCString countryName() { parse(); return countryName_; } + Q3CString poBox() { parse(); return poBox_; } + Q3CString extAddress() { parse(); return extAddress_; } + Q3CString street() { parse(); return street_; } + Q3CString locality() { parse(); return locality_; } + Q3CString region() { parse(); return region_; } + Q3CString postCode() { parse(); return postCode_; } + Q3CString countryName() { parse(); return countryName_; } @@ -70,9 +72,9 @@ class AdrValue : public Value - QCString poBox_; - QCString extAddress_; - QCString street_; - QCString locality_; - QCString region_; - QCString postCode_; - QCString countryName_; + Q3CString poBox_; + Q3CString extAddress_; + Q3CString street_; + Q3CString locality_; + Q3CString region_; + Q3CString postCode_; + Q3CString countryName_; }; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> @@ -48,3 +48,3 @@ class AgentParam : public Param - void setURI(const QCString & s) + void setURI(const Q3CString & s) { uri_ = s; assembled_ = false; } 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,5 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -41,4 +43,4 @@ class ContentLine : public Entity - QCString group() { parse(); return group_; } - QCString name() { parse(); return name_; } + Q3CString group() { parse(); return group_; } + Q3CString name() { parse(); return name_; } Value * value() { parse(); return value_; } @@ -49,6 +51,6 @@ class ContentLine : public Entity - void setGroup (const QCString & s) + void setGroup (const Q3CString & s) { group_ = s; assembled_ = false; } - void setName (const QCString & s) + void setName (const Q3CString & s) { name_ = s; assembled_ = false; } @@ -65,5 +67,5 @@ class ContentLine : public Entity - QCString group_; - QCString name_; - QPtrList<Param> paramList_; + Q3CString group_; + Q3CString name_; + Q3PtrList<Param> paramList_; Value * value_; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> #include <qdatetime.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 @@ -37,3 +37,3 @@ #ifndef NDEBUG -# include <qcstring.h> +# include <q3cstring.h> # include <iostream> @@ -41,6 +41,6 @@ # define vDebug(a) cerr << className() << ":" << __FUNCTION__ << " (" \ - << __LINE__ << "): " << QCString((a)).data() << endl; + << __LINE__ << "): " << Q3CString((a)).data() << endl; # else # define vDebug(a) cerr << className() << ": " \ - << QCString((a)).data() << endl; + << Q3CString((a)).data() << endl; # endif 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> @@ -38,6 +38,6 @@ class EmailParam : public Param - QCString emailType() { parse(); return emailType_; } + Q3CString emailType() { parse(); return emailType_; } bool pref() { parse(); return pref_; } - void setEmailType(const QCString & s) + void setEmailType(const Q3CString & s) { emailType_ = s; assembled_ = false; } @@ -49,3 +49,3 @@ class EmailParam : public Param - QCString emailType_; + Q3CString emailType_; bool pref_; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> @@ -37,6 +37,6 @@ class Entity Entity(const Entity & e); - Entity(const QCString & s); + Entity(const Q3CString & s); virtual Entity & operator = (const Entity & e); - virtual Entity & operator = (const QCString & s); + virtual Entity & operator = (const Q3CString & s); @@ -44,4 +44,4 @@ class Entity virtual bool operator != (Entity & e); - virtual bool operator == (const QCString & s); - virtual bool operator != (const QCString & s); + virtual bool operator == (const Q3CString & s); + virtual bool operator != (const Q3CString & s); @@ -49,3 +49,3 @@ class Entity - QCString asString(); + Q3CString asString(); @@ -59,3 +59,3 @@ class Entity - QCString strRep_; + Q3CString strRep_; bool parsed_; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> @@ -31,3 +31,3 @@ namespace VCARD -extern const QCString paramNames []; +extern const Q3CString paramNames []; @@ -110,4 +110,4 @@ ParamType EntityTypeToParamType(EntityType); ValueType EntityTypeToValueType(EntityType); -QCString EntityTypeToParamName(EntityType); -EntityType EntityNameToEntityType(const QCString &); +Q3CString EntityTypeToParamName(EntityType); +EntityType EntityNameToEntityType(const Q3CString &); 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,4 +26,4 @@ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> @@ -38,10 +38,10 @@ class LangValue : public Value - QCString primary(); - QStrList subtags(); + Q3CString primary(); + Q3StrList subtags(); - void setPrimary(const QCString &); - void setSubTags(const QStrList &); + void setPrimary(const Q3CString &); + void setSubTags(const Q3StrList &); - QCString primary_; - QStrList subtags_; + Q3CString primary_; + Q3StrList subtags_; }; 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 @@ -27,2 +27,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -36,13 +38,13 @@ class NValue : public Value - QCString family() { parse(); return family_; } - QCString given() { parse(); return given_; } - QCString middle() { parse(); return middle_; } - QCString prefix() { parse(); return prefix_; } - QCString suffix() { parse(); return suffix_; } - - void setFamily (const QCString & s) { family_ = s; assembled_ = false; } - void setGiven (const QCString & s) { given_ = s; assembled_ = false; } - void setMiddle (const QCString & s) { middle_ = s; assembled_ = false; } - void setPrefix (const QCString & s) { prefix_ = s; assembled_ = false; } - void setSuffix (const QCString & s) { suffix_ = s; assembled_ = false; } + Q3CString family() { parse(); return family_; } + Q3CString given() { parse(); return given_; } + Q3CString middle() { parse(); return middle_; } + Q3CString prefix() { parse(); return prefix_; } + Q3CString suffix() { parse(); return suffix_; } + + void setFamily (const Q3CString & s) { family_ = s; assembled_ = false; } + void setGiven (const Q3CString & s) { given_ = s; assembled_ = false; } + void setMiddle (const Q3CString & s) { middle_ = s; assembled_ = false; } + void setPrefix (const Q3CString & s) { prefix_ = s; assembled_ = false; } + void setSuffix (const Q3CString & s) { suffix_ = s; assembled_ = false; } @@ -50,3 +52,3 @@ class NValue : public Value - QCString family_, given_, middle_, prefix_, suffix_; + Q3CString family_, given_, middle_, prefix_, suffix_; }; 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 @@ -26,4 +26,4 @@ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> @@ -40,3 +40,3 @@ class OrgValue : public Value unsigned int numValues(); - QCString value(unsigned int); + Q3CString value(unsigned int); @@ -44,3 +44,3 @@ class OrgValue : public Value - QStrList valueList_; + Q3StrList valueList_; }; 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 @@ -26,4 +26,4 @@ -#include <qcstring.h> -#include <qptrlist.h> +#include <q3cstring.h> +#include <q3ptrlist.h> @@ -39,9 +39,9 @@ class Param : public Entity - Param(const QCString &name, const QCString &value); + Param(const Q3CString &name, const Q3CString &value); - void setName(const QCString &); - void setValue(const QCString &); + void setName(const Q3CString &); + void setValue(const Q3CString &); - QCString name(); - QCString value(); + Q3CString name(); + Q3CString value(); @@ -49,8 +49,8 @@ class Param : public Entity - QCString name_; - QCString value_; + Q3CString name_; + Q3CString value_; }; -typedef QPtrList<Param> ParamList; -typedef QPtrListIterator<Param> ParamListIterator; +typedef Q3PtrList<Param> ParamList; +typedef Q3PtrListIterator<Param> ParamListIterator; 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 @@ -27,3 +27,3 @@ -#include <qstrlist.h> +#include <q3strlist.h> @@ -32,3 +32,3 @@ namespace VCARD -Q_UINT32 RTokenise(const char * str, const char * delim, QStrList & l); +Q_UINT32 RTokenise(const char * str, const char * delim, Q3StrList & l); 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> @@ -41,8 +41,8 @@ class SourceParam : public Param SourceParamType type() { parse(); return type_;} - QCString par() { parse(); return par_; } - QCString val() { parse(); return val_; } + Q3CString par() { parse(); return par_; } + Q3CString val() { parse(); return val_; } void setType(SourceParamType t) { type_ = t; assembled_ = false; } - void setPar(const QCString & s) { par_ = s; assembled_ = false; } - void setVal(const QCString & s) { val_ = s; assembled_ = false; } + void setPar(const Q3CString & s) { par_ = s; assembled_ = false; } + void setVal(const Q3CString & s) { val_ = s; assembled_ = false; } @@ -52,3 +52,3 @@ class SourceParam : public Param // May be "VALUE = uri" or "CONTEXT = word" or "x-name = *SAFE-CHAR" - QCString par_, val_; // Sub-parameter, value + Q3CString par_, val_; // Sub-parameter, value }; 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 @@ -26,3 +26,5 @@ -#include <qcstring.h> +#include <q3cstring.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -45,3 +47,3 @@ class TelParam : public Param - QPtrList<TelType> types_; + Q3PtrList<TelType> types_; }; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -26,5 +26,5 @@ -#include <qstrlist.h> +#include <q3strlist.h> -#include <qcstring.h> +#include <q3cstring.h> @@ -41,3 +41,3 @@ class TextListValue : public Value unsigned int numValues(); - QCString value(unsigned int); + Q3CString value(unsigned int); @@ -45,3 +45,3 @@ class TextListValue : public Value - QStrList valueList_; + Q3StrList valueList_; }; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -27,2 +27,4 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> @@ -35,9 +37,9 @@ class URIValue : public Value - URIValue(const QCString & scheme, const QCString & schemeSpecificPart); + URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart); - QCString scheme(); - QCString schemeSpecificPart(); + Q3CString scheme(); + Q3CString schemeSpecificPart(); - void setScheme (const QCString &); - void setSchemeSpecificPart (const QCString &); + void setScheme (const Q3CString &); + void setSchemeSpecificPart (const Q3CString &); @@ -45,4 +47,4 @@ class URIValue : public Value - QCString scheme_; - QCString schemeSpecificPart_; + Q3CString scheme_; + Q3CString schemeSpecificPart_; }; 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 @@ -26,3 +26,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -27,3 +27,5 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -42,13 +44,13 @@ class VCard : public Entity bool has(EntityType); - bool has(const QCString &); + bool has(const Q3CString &); void add(const ContentLine &); - void add(const QCString &); + void add(const Q3CString &); ContentLine * contentLine(EntityType); - ContentLine * contentLine(const QCString &); + ContentLine * contentLine(const Q3CString &); - QCString group() { parse(); return group_; } + Q3CString group() { parse(); return group_; } - QPtrList<ContentLine> contentLineList() { parse(); return contentLineList_; } + Q3PtrList<ContentLine> contentLineList() { parse(); return contentLineList_; } @@ -56,4 +58,4 @@ class VCard : public Entity - QCString group_; - QPtrList<ContentLine> contentLineList_; + Q3CString group_; + Q3PtrList<ContentLine> contentLineList_; }; 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 @@ -27,3 +27,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -36,4 +36,4 @@ namespace VCARD -typedef QPtrList<VCard> VCardList; -typedef QPtrListIterator<VCard> VCardListIterator; +typedef Q3PtrList<VCard> VCardList; +typedef Q3PtrListIterator<VCard> VCardListIterator; 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 @@ -26,3 +26,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -40,4 +40,4 @@ class Value : public Entity -typedef QPtrList<Value> ValueList; -typedef QPtrListIterator<Value> ValueListIterator; +typedef Q3PtrList<Value> ValueList; +typedef Q3PtrListIterator<Value> ValueListIterator; 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ AdrParam(); AdrParam(const AdrParam&); -AdrParam(const QCString&); +AdrParam(const Q3CString&); AdrParam & operator = (AdrParam&); -AdrParam & operator = (const QCString&); +AdrParam & operator = (const Q3CString&); bool operator ==(AdrParam&); bool operator !=(AdrParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {AdrParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {AdrParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ AdrValue(); AdrValue(const AdrValue&); -AdrValue(const QCString&); +AdrValue(const Q3CString&); AdrValue & operator = (AdrValue&); -AdrValue & operator = (const QCString&); +AdrValue & operator = (const Q3CString&); bool operator ==(AdrValue&); bool operator !=(AdrValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {AdrValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {AdrValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ AgentParam(); AgentParam(const AgentParam&); -AgentParam(const QCString&); +AgentParam(const Q3CString&); AgentParam & operator = (AgentParam&); -AgentParam & operator = (const QCString&); +AgentParam & operator = (const Q3CString&); bool operator ==(AgentParam&); bool operator !=(AgentParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {AgentParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {AgentParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ AgentValue(); AgentValue(const AgentValue&); -AgentValue(const QCString&); +AgentValue(const Q3CString&); AgentValue & operator = (AgentValue&); -AgentValue & operator = (const QCString&); +AgentValue & operator = (const Q3CString&); bool operator ==(AgentValue&); bool operator !=(AgentValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {AgentValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {AgentValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ ClassValue(); ClassValue(const ClassValue&); -ClassValue(const QCString&); +ClassValue(const Q3CString&); ClassValue & operator = (ClassValue&); -ClassValue & operator = (const QCString&); +ClassValue & operator = (const Q3CString&); bool operator ==(ClassValue&); bool operator !=(ClassValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {ClassValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {ClassValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ ContentLine(); ContentLine(const ContentLine&); -ContentLine(const QCString&); +ContentLine(const Q3CString&); ContentLine & operator = (ContentLine&); -ContentLine & operator = (const QCString&); +ContentLine & operator = (const Q3CString&); bool operator ==(ContentLine&); bool operator !=(ContentLine& x) {return !(*this==x);} -bool operator ==(const QCString& s) {ContentLine a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {ContentLine a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ DateParam(); DateParam(const DateParam&); -DateParam(const QCString&); +DateParam(const Q3CString&); DateParam & operator = (DateParam&); -DateParam & operator = (const QCString&); +DateParam & operator = (const Q3CString&); bool operator ==(DateParam&); bool operator !=(DateParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {DateParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {DateParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ DateValue(); DateValue(const DateValue&); -DateValue(const QCString&); +DateValue(const Q3CString&); DateValue & operator = (DateValue&); -DateValue & operator = (const QCString&); +DateValue & operator = (const Q3CString&); bool operator ==(DateValue&); bool operator !=(DateValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {DateValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {DateValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ EmailParam(); EmailParam(const EmailParam&); -EmailParam(const QCString&); +EmailParam(const Q3CString&); EmailParam & operator = (EmailParam&); -EmailParam & operator = (const QCString&); +EmailParam & operator = (const Q3CString&); bool operator ==(EmailParam&); bool operator !=(EmailParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {EmailParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {EmailParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ FloatValue(); FloatValue(const FloatValue&); -FloatValue(const QCString&); +FloatValue(const Q3CString&); FloatValue & operator = (FloatValue&); -FloatValue & operator = (const QCString&); +FloatValue & operator = (const Q3CString&); bool operator ==(FloatValue&); bool operator !=(FloatValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {FloatValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {FloatValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ GeoValue(); GeoValue(const GeoValue&); -GeoValue(const QCString&); +GeoValue(const Q3CString&); GeoValue & operator = (GeoValue&); -GeoValue & operator = (const QCString&); +GeoValue & operator = (const Q3CString&); bool operator ==(GeoValue&); bool operator !=(GeoValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {GeoValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {GeoValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ Group(); Group(const Group&); -Group(const QCString&); +Group(const Q3CString&); Group & operator = (Group&); -Group & operator = (const QCString&); +Group & operator = (const Q3CString&); bool operator ==(Group&); bool operator !=(Group& x) {return !(*this==x);} -bool operator ==(const QCString& s) {Group a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {Group a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ ImageParam(); ImageParam(const ImageParam&); -ImageParam(const QCString&); +ImageParam(const Q3CString&); ImageParam & operator = (ImageParam&); -ImageParam & operator = (const QCString&); +ImageParam & operator = (const Q3CString&); bool operator ==(ImageParam&); bool operator !=(ImageParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {ImageParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {ImageParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ ImageValue(); ImageValue(const ImageValue&); -ImageValue(const QCString&); +ImageValue(const Q3CString&); ImageValue & operator = (ImageValue&); -ImageValue & operator = (const QCString&); +ImageValue & operator = (const Q3CString&); bool operator ==(ImageValue&); bool operator !=(ImageValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {ImageValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {ImageValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ ImgParam(); ImgParam(const ImgParam&); -ImgParam(const QCString&); +ImgParam(const Q3CString&); ImgParam & operator = (ImgParam&); -ImgParam & operator = (const QCString&); +ImgParam & operator = (const Q3CString&); bool operator ==(ImgParam&); bool operator !=(ImgParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {ImgParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {ImgParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ ImgValue(); ImgValue(const ImgValue&); -ImgValue(const QCString&); +ImgValue(const Q3CString&); ImgValue & operator = (ImgValue&); -ImgValue & operator = (const QCString&); +ImgValue & operator = (const Q3CString&); bool operator ==(ImgValue&); bool operator !=(ImgValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {ImgValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {ImgValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ LangValue(); LangValue(const LangValue&); -LangValue(const QCString&); +LangValue(const Q3CString&); LangValue & operator = (LangValue&); -LangValue & operator = (const QCString&); +LangValue & operator = (const Q3CString&); bool operator ==(LangValue&); bool operator !=(LangValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {LangValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {LangValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ NValue(); NValue(const NValue&); -NValue(const QCString&); +NValue(const Q3CString&); NValue & operator = (NValue&); -NValue & operator = (const QCString&); +NValue & operator = (const Q3CString&); bool operator ==(NValue&); bool operator !=(NValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {NValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {NValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ V_Name(); V_Name(const V_Name&); -V_Name(const QCString&); +V_Name(const Q3CString&); V_Name & operator = (V_Name&); -V_Name & operator = (const QCString&); +V_Name & operator = (const Q3CString&); bool operator ==(V_Name&); bool operator !=(V_Name& x) {return !(*this==x);} -bool operator ==(const QCString& s) {V_Name a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {V_Name a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ OrgValue(); OrgValue(const OrgValue&); -OrgValue(const QCString&); +OrgValue(const Q3CString&); OrgValue & operator = (OrgValue&); -OrgValue & operator = (const QCString&); +OrgValue & operator = (const Q3CString&); bool operator ==(OrgValue&); bool operator !=(OrgValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {OrgValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {OrgValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ Param(); Param(const Param&); -Param(const QCString&); +Param(const Q3CString&); Param & operator = (Param&); -Param & operator = (const QCString&); +Param & operator = (const Q3CString&); bool operator ==(Param&); bool operator !=(Param& x) {return !(*this==x);} -bool operator ==(const QCString& s) {Param a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {Param a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ V_ParamName(); V_ParamName(const V_ParamName&); -V_ParamName(const QCString&); +V_ParamName(const Q3CString&); V_ParamName & operator = (V_ParamName&); -V_ParamName & operator = (const QCString&); +V_ParamName & operator = (const Q3CString&); bool operator ==(V_ParamName&); bool operator !=(V_ParamName& x) {return !(*this==x);} -bool operator ==(const QCString& s) {V_ParamName a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {V_ParamName a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ V_ParamValue(); V_ParamValue(const V_ParamValue&); -V_ParamValue(const QCString&); +V_ParamValue(const Q3CString&); V_ParamValue & operator = (V_ParamValue&); -V_ParamValue & operator = (const QCString&); +V_ParamValue & operator = (const Q3CString&); bool operator ==(V_ParamValue&); bool operator !=(V_ParamValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {V_ParamValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {V_ParamValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ PhoneNumberValue(); PhoneNumberValue(const PhoneNumberValue&); -PhoneNumberValue(const QCString&); +PhoneNumberValue(const Q3CString&); PhoneNumberValue & operator = (PhoneNumberValue&); -PhoneNumberValue & operator = (const QCString&); +PhoneNumberValue & operator = (const Q3CString&); bool operator ==(PhoneNumberValue&); bool operator !=(PhoneNumberValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {PhoneNumberValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {PhoneNumberValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ SoundValue(); SoundValue(const SoundValue&); -SoundValue(const QCString&); +SoundValue(const Q3CString&); SoundValue & operator = (SoundValue&); -SoundValue & operator = (const QCString&); +SoundValue & operator = (const Q3CString&); bool operator ==(SoundValue&); bool operator !=(SoundValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {SoundValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {SoundValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ SourceParam(); SourceParam(const SourceParam&); -SourceParam(const QCString&); +SourceParam(const Q3CString&); SourceParam & operator = (SourceParam&); -SourceParam & operator = (const QCString&); +SourceParam & operator = (const Q3CString&); bool operator ==(SourceParam&); bool operator !=(SourceParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {SourceParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {SourceParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TelParam(); TelParam(const TelParam&); -TelParam(const QCString&); +TelParam(const Q3CString&); TelParam & operator = (TelParam&); -TelParam & operator = (const QCString&); +TelParam & operator = (const Q3CString&); bool operator ==(TelParam&); bool operator !=(TelParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TelParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TelParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TelValue(); TelValue(const TelValue&); -TelValue(const QCString&); +TelValue(const Q3CString&); TelValue & operator = (TelValue&); -TelValue & operator = (const QCString&); +TelValue & operator = (const Q3CString&); bool operator ==(TelValue&); bool operator !=(TelValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TelValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TelValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TextBinParam(); TextBinParam(const TextBinParam&); -TextBinParam(const QCString&); +TextBinParam(const Q3CString&); TextBinParam & operator = (TextBinParam&); -TextBinParam & operator = (const QCString&); +TextBinParam & operator = (const Q3CString&); bool operator ==(TextBinParam&); bool operator !=(TextBinParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TextBinParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TextBinParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TextBinValue(); TextBinValue(const TextBinValue&); -TextBinValue(const QCString&); +TextBinValue(const Q3CString&); TextBinValue & operator = (TextBinValue&); -TextBinValue & operator = (const QCString&); +TextBinValue & operator = (const Q3CString&); bool operator ==(TextBinValue&); bool operator !=(TextBinValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TextBinValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TextBinValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TextListValue(); TextListValue(const TextListValue&); -TextListValue(const QCString&); +TextListValue(const Q3CString&); TextListValue & operator = (TextListValue&); -TextListValue & operator = (const QCString&); +TextListValue & operator = (const Q3CString&); bool operator ==(TextListValue&); bool operator !=(TextListValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TextListValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TextListValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TextNSParam(); TextNSParam(const TextNSParam&); -TextNSParam(const QCString&); +TextNSParam(const Q3CString&); TextNSParam & operator = (TextNSParam&); -TextNSParam & operator = (const QCString&); +TextNSParam & operator = (const Q3CString&); bool operator ==(TextNSParam&); bool operator !=(TextNSParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TextNSParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TextNSParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TextParam(); TextParam(const TextParam&); -TextParam(const QCString&); +TextParam(const Q3CString&); TextParam & operator = (TextParam&); -TextParam & operator = (const QCString&); +TextParam & operator = (const Q3CString&); bool operator ==(TextParam&); bool operator !=(TextParam& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TextParam a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TextParam a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ TextValue(); TextValue(const TextValue&); -TextValue(const QCString&); +TextValue(const Q3CString&); TextValue & operator = (TextValue&); -TextValue & operator = (const QCString&); +TextValue & operator = (const Q3CString&); bool operator ==(TextValue&); bool operator !=(TextValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {TextValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {TextValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ URIValue(); URIValue(const URIValue&); -URIValue(const QCString&); +URIValue(const Q3CString&); URIValue & operator = (URIValue&); -URIValue & operator = (const QCString&); +URIValue & operator = (const Q3CString&); bool operator ==(URIValue&); bool operator !=(URIValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {URIValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {URIValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ UTCValue(); UTCValue(const UTCValue&); -UTCValue(const QCString&); +UTCValue(const Q3CString&); UTCValue & operator = (UTCValue&); -UTCValue & operator = (const QCString&); +UTCValue & operator = (const Q3CString&); bool operator ==(UTCValue&); bool operator !=(UTCValue& x) {return !(*this==x);} -bool operator ==(const QCString& s) {UTCValue a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {UTCValue a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ VCard(); VCard(const VCard&); -VCard(const QCString&); +VCard(const Q3CString&); VCard & operator = (VCard&); -VCard & operator = (const QCString&); +VCard & operator = (const Q3CString&); bool operator ==(VCard&); bool operator !=(VCard& x) {return !(*this==x);} -bool operator ==(const QCString& s) {VCard a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {VCard a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ VCardEntity(); VCardEntity(const VCardEntity&); -VCardEntity(const QCString&); +VCardEntity(const Q3CString&); VCardEntity & operator = (VCardEntity&); -VCardEntity & operator = (const QCString&); +VCardEntity & operator = (const Q3CString&); bool operator ==(VCardEntity&); bool operator !=(VCardEntity& x) {return !(*this==x);} -bool operator ==(const QCString& s) {VCardEntity a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {VCardEntity a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 +1,3 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -5,9 +7,9 @@ Value(); Value(const Value&); -Value(const QCString&); +Value(const Q3CString&); Value & operator = (Value&); -Value & operator = (const QCString&); +Value & operator = (const Q3CString&); bool operator ==(Value&); bool operator !=(Value& x) {return !(*this==x);} -bool operator ==(const QCString& s) {Value a(s);return(*this==a);} -bool operator != (const QCString& s) {return !(*this == s);} +bool operator ==(const Q3CString& s) {Value a(s);return(*this==a);} +bool operator != (const Q3CString& s) {return !(*this == s);} 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 @@ -5,3 +5,5 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3CString> @@ -20,5 +22,5 @@ int main(int argc, char * argv[]) - QCString str; + Q3CString str; - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { cerr << "Couldn't open file \"" << argv[1] << endl; @@ -27,3 +29,3 @@ int main(int argc, char * argv[]) - QTextStream t(&f); + Q3TextStream t(&f); @@ -54,3 +56,3 @@ int main(int argc, char * argv[]) - QCString s = v.contentLine(EntityEmail)->value()->asString(); + Q3CString s = v.contentLine(EntityEmail)->value()->asString(); 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 @@ -7,2 +7,4 @@ #include <VCard.h> +//Added by qt3to4: +#include <Q3CString> @@ -35,3 +37,3 @@ int main(int argc,char **argv) - QCString str = v.asString(); + Q3CString str = v.asString(); diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index 60d02b8..e24a9dc 100644 --- a/kabc/vcard21parser.cpp +++ b/kabc/vcard21parser.cpp @@ -29,2 +29,4 @@ $Id$ #include <qregexp.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kmdcodec.h> @@ -47,3 +49,3 @@ bool VCardLineX::isValid() const // a tree which is probably the ideal situation, but a bit memory heavy) - switch( name[0] ) { + switch( name[0].unicode() ) { case 'a': @@ -271,3 +273,3 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) //set the addressee's phone numbers - for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { + for ( Q3ValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { if ( (*i).name == VCARD_TEL ) { @@ -310,3 +312,3 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) //set the addressee's addresses - for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { + for ( Q3ValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { if ( (*i).name == VCARD_ADR ) { @@ -329,3 +331,6 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) } - addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); + QStringList tmp; + for(Q3ValueList<QString>::const_iterator ii=(*i).parameters.begin();ii!=(*i).parameters.end();++ii) + tmp.push_back(*ii); + addressee.insertAddress( readAddressFromQStringList( tmp, type ) ); } @@ -410,6 +415,6 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) - QValueList<VCardLineX> *_vcdata; - QValueList<QString> lines; + Q3ValueList<VCardLineX> *_vcdata; + QStringList lines; - _vcdata = new QValueList<VCardLineX>; + _vcdata = new Q3ValueList<VCardLineX>; @@ -503,4 +508,4 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) if ( qp ) { // decode the quoted printable - for ( QStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) - *z = KCodecs::quotedPrintableDecode( (*z).latin1() ); + for ( QLinkedList<QString>::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) + *z = KCodecs::quotedPrintableDecode( (Q3CString)(*z).latin1() ); } @@ -545,3 +550,3 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) -VCard21ParserImpl::VCard21ParserImpl(QValueList<VCardLineX> *_vcd) : _vcdata(_vcd) +VCard21ParserImpl::VCard21ParserImpl(Q3ValueList<VCardLineX> *_vcd) : _vcdata(_vcd) { @@ -556,3 +561,3 @@ QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifie - for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { + for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { @@ -572,3 +577,3 @@ QString VCard21ParserImpl::getValue(const QString& name) - for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { + for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { if ((*i).name == lowname && !(*i).qualified) { @@ -586,5 +591,6 @@ QStringList VCard21ParserImpl::getValues(const QString& name) const QString lowname = name.lower(); - for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && !(*i).qualified) - return (*i).parameters; + for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { + if ((*i).name == lowname && !(*i).qualified) { + return QStringList( (*i).parameters ); + } } @@ -598,5 +604,5 @@ QStringList VCard21ParserImpl::getValues(const QString& name, const QString& qua const QString lowqualifier = qualifier.lower(); - for (QValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { + for (Q3ValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) - return (*i).parameters; + return QStringList( (*i).parameters ); } diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h index 77e69b6..80ba6ef 100644 --- a/kabc/vcard21parser.h +++ b/kabc/vcard21parser.h @@ -36,3 +36,3 @@ $Id$ #include <kurl.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -198,4 +198,4 @@ public: bool qualified; - QValueList<QString> qualifiers; - QValueList<QString> parameters; + Q3ValueList<QString> qualifiers; + Q3ValueList<QString> parameters; bool isValid() const; @@ -219,6 +219,6 @@ public: - QValueList<VCardLineX> *_vcdata; + Q3ValueList<VCardLineX> *_vcdata; private: - VCard21ParserImpl (QValueList<VCardLineX> *_vcd); + VCard21ParserImpl (Q3ValueList<VCardLineX> *_vcd); }; diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index 580c28b..2417874 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -30,2 +30,5 @@ $Id$ #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> @@ -56,3 +59,3 @@ bool VCardFormatImpl::load( Addressee &addressee, QFile *file ) QByteArray fdata = file->readAll(); - QCString data(fdata.data(), fdata.size()+1); + Q3CString data(fdata.data(), fdata.size()+1); @@ -77,3 +80,3 @@ bool VCardFormatImpl::loadAll( AddressBook *addressBook, Resource *resource, QFi - QCString data(file->readAll().data(), file->size()+1); + Q3CString data(file->readAll().data(), file->size()+1); VCardEntity e( data ); @@ -110,3 +113,3 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file ) - QCString vcardData = vcards.asString(); + Q3CString vcardData = vcards.asString(); file->writeBlock( (const char*)vcardData, vcardData.length() ); @@ -131,3 +134,3 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) { - QPtrList<ContentLine> contentLines = v->contentLineList(); + Q3PtrList<ContentLine> contentLines = v->contentLineList(); ContentLine *cl; @@ -135,3 +138,3 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - QCString n = cl->name(); + Q3CString n = cl->name(); if ( n.left( 2 ) == "X-" ) { @@ -221,3 +224,3 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) case EntityBirthday: - addressee.setBirthday( readDateValue( cl ) ); + addressee.setBirthday( (QDateTime) readDateValue( cl ) ); break; @@ -532,3 +535,3 @@ int VCardFormatImpl::readAddressParam( ContentLine *cl ) ParamListIterator it( params ); - QCString tmpStr; + Q3CString tmpStr; for( ; it.current(); ++it ) { @@ -611,3 +614,3 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) ParamListIterator it( params ); - QCString tmpStr; + Q3CString tmpStr; for( ; it.current(); ++it ) { @@ -872,3 +875,3 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty QByteArray data; - QDataStream s( data, IO_WriteOnly ); + QDataStream s( &data, QIODevice::WriteOnly ); s.setVersion( 4 ); // to produce valid png files @@ -961,3 +964,3 @@ void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, co QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_WriteOnly ) ) { + if ( file.open( QIODevice::WriteOnly ) ) { file.writeBlock( data ); @@ -993,3 +996,3 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee & QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_ReadOnly ) ) { + if ( file.open( QIODevice::ReadOnly ) ) { data = file.readAll(); diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp index 8db8c11..0b97a08 100644 --- a/kabc/vcardformatplugin.cpp +++ b/kabc/vcardformatplugin.cpp @@ -63,3 +63,3 @@ bool VCardFormatPlugin::checkFormat( QFile *file ) const - file->readLine( line, 1024 ); + char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp; line = line.stripWhiteSpace(); 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 @@ -26,3 +26,3 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -33,3 +33,3 @@ class VCard public: - typedef QValueList<VCard> List; + typedef Q3ValueList<VCard> List; typedef QMap< QString, VCardLine::List > LineMap; 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 @@ -21,2 +21,4 @@ #include "vcardline.h" +//Added by qt3to4: +#include <Q3CString> @@ -45,3 +47,3 @@ VCardLine::VCardLine( const QString &identifier, const QString &value ) mIdentifier = identifier; - mValue.assign( value.data(), value.length() ); + mValue = value; } @@ -88,3 +90,3 @@ void VCardLine::setValueString( const QString& value ) } -void VCardLine::setValueCString( const QCString& value ) +void VCardLine::setValueCString( const Q3CString& value ) { 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 @@ -24,4 +24,4 @@ #include <qstringlist.h> -#include <qvaluelist.h> -#include <qcstring.h> +#include <q3valuelist.h> +#include <q3cstring.h> #include <qvariant.h> @@ -35,3 +35,3 @@ class VCardLine public: - typedef QValueList<VCardLine> List; + typedef Q3ValueList<VCardLine> List; typedef QMap<QString, QStringList> ParamMap; @@ -61,3 +61,3 @@ class VCardLine void setValueString( const QString& value ); - void setValueCString( const QCString& value ); + void setValueCString( const Q3CString& value ); void setValueBytes( const QByteArray& value ); 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 @@ -220,3 +220,3 @@ QString VCardParser::createVCards( const VCard::List& list ) else if ( encodingType == "quoted-printable" ) - KCodecs::quotedPrintableEncode( input, output ); + KCodecs::quotedPrintableEncode( input, output, true ); textLine.append( ":" + QString( output ) ); 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 @@ -654,3 +654,3 @@ VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pi QByteArray input; - QDataStream s( input, IO_WriteOnly ); + QDataStream s( &input, QIODevice::WriteOnly ); s.setVersion( 4 ); diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp index 3dcd592..83908d0 100644 --- a/kaddressbook/addresseditwidget.cpp +++ b/kaddressbook/addresseditwidget.cpp @@ -24,16 +24,23 @@ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> -#include <qlistview.h> +#include <q3listbox.h> +#include <q3listview.h> #include <qpushbutton.h> -#include <qsignal.h> +#include <q3signal.h> #include <qstring.h> #include <qapplication.h> +#include <QDesktopWidget> + +#include <Q3VBoxLayout> +#include <Q3GridLayout> #ifndef KAB_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3VBoxLayout> #include <kaccelmanager.h> @@ -41,3 +48,3 @@ #else //KAB_EMBEDDED -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif //KAB_EMBEDDED @@ -69,5 +76,5 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) mConfig = AddresseeConfig::instance(); - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); layout->setSpacing( KDialog::spacingHintSmall() ); - QHBox *b1 = new QHBox( this); + Q3HBox *b1 = new Q3HBox( this); //QLabel * label = new QLabel( b1 ); @@ -86,3 +93,3 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) #ifndef KAB_EMBEDDED - mAddressTextEdit = new QTextEdit( this ); + mAddressTextEdit = new Q3TextEdit( this ); mAddressTextEdit->setReadOnly( true ); @@ -90,3 +97,3 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) #else //KAB_EMBEDDED - mAddressTextEdit = new QMultiLineEdit( this ); + mAddressTextEdit = new Q3MultiLineEdit( this ); mAddressTextEdit->setReadOnly( true ); @@ -128,3 +135,3 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, - QValueList<int> defaultTypes; + Q3ValueList<int> defaultTypes; defaultTypes << KABC::Address::Home; @@ -133,4 +140,4 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, mConfig->setUid( mAddressee.uid() ); - QValueList<int> configList = mConfig->noDefaultAddrTypes(); - QValueList<int>::ConstIterator it; + Q3ValueList<int> configList = mConfig->noDefaultAddrTypes(); + Q3ValueList<int>::ConstIterator it; for ( it = configList.begin(); it != configList.end(); ++it ) @@ -183,3 +190,3 @@ void AddressEditWidget::edit() mConfig->setUid( mAddressee.uid() ); - QValueList<int> configList; + Q3ValueList<int> configList; if ( !hasHome ) { @@ -257,3 +264,3 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, - QGridLayout *topLayout = new QGridLayout( page, 8, 2 ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 ); topLayout->setSpacing( spacingHintSmall() ); @@ -268,5 +275,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, #ifndef KAB_EMBEDDED - mStreetTextEdit = new QTextEdit( page ); + mStreetTextEdit = new Q3TextEdit( page ); #else //KAB_EMBEDDED - mStreetTextEdit = new QMultiLineEdit( page ); + mStreetTextEdit = new Q3MultiLineEdit( page ); //US qDebug("AddressEditDialog::AddressEditDialog has to be changed"); @@ -313,3 +320,3 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, topLayout->addWidget( mCountryCombo, 6, 1 ); - mCountryCombo->setSizeLimit( 8); + mCountryCombo->setMaxVisibleItems( 8); mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page ); @@ -320,3 +327,3 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, */ - QHBox *buttonBox = new QHBox( page ); + Q3HBox *buttonBox = new Q3HBox( page ); buttonBox->setSpacing( spacingHint() ); @@ -585,5 +592,5 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent ) QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); - mGroup = new QButtonGroup( 2, Horizontal, i18n( "Address Types" ), page ); + mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Address Types" ), page ); layout->addWidget( mGroup ); @@ -619,4 +626,4 @@ int AddressTypeDialog::type() const -#ifndef KAB_EMBEDDED -#include "addresseditwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseditwidget.cpp" #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 @@ -35,9 +35,9 @@ -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; -class QListView; +class Q3ListView; #ifndef KAB_EMBEDDED -class QTextEdit; +class Q3TextEdit; #else //KAB_EMBEDDED -class QMultiLineEdit; +class Q3MultiLineEdit; #endif //KAB_EMBEDDED @@ -83,5 +83,5 @@ class AddressEditWidget : public QWidget #ifndef KAB_EMBEDDED - QTextEdit *mAddressTextEdit; + Q3TextEdit *mAddressTextEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mAddressTextEdit; + Q3MultiLineEdit *mAddressTextEdit; #endif //KAB_EMBEDDED @@ -122,5 +122,5 @@ class AddressEditDialog : public KDialogBase #ifndef KAB_EMBEDDED - QTextEdit *mStreetTextEdit; + Q3TextEdit *mStreetTextEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mStreetTextEdit; + Q3MultiLineEdit *mStreetTextEdit; #endif //KAB_EMBEDDED @@ -153,3 +153,3 @@ class AddressTypeDialog : public KDialogBase private: - QButtonGroup *mGroup; + Q3ButtonGroup *mGroup; diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp index ea0436f..81b1bf4 100644 --- a/kaddressbook/addresseeconfig.cpp +++ b/kaddressbook/addresseeconfig.cpp @@ -28,2 +28,4 @@ #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -79,3 +81,3 @@ void AddresseeConfig::setAutomaticNameParsing( bool value ) -void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) +void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types ) { @@ -85,3 +87,3 @@ void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) - QValueList<int> AddresseeConfig::noDefaultAddrTypes() const + Q3ValueList<int> AddresseeConfig::noDefaultAddrTypes() const { diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h index 47fbdd6..f6bb3e9 100644 --- a/kaddressbook/addresseeconfig.h +++ b/kaddressbook/addresseeconfig.h @@ -28,2 +28,4 @@ #include <kconfig.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -45,4 +47,4 @@ class AddresseeConfig - void setNoDefaultAddrTypes( const QValueList<int> &types ); - QValueList<int> noDefaultAddrTypes() const; + void setNoDefaultAddrTypes( const Q3ValueList<int> &types ); + Q3ValueList<int> noDefaultAddrTypes() const; diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index b5a60f2..b925a07 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp @@ -25,2 +25,5 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -45,3 +48,3 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); @@ -120,4 +123,4 @@ void AddresseeEditorDialog::slotCancel() -#ifndef KAB_EMBEDDED -#include "addresseeeditordialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseeeditordialog.cpp" #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 @@ -24,6 +24,6 @@ #include <qcheckbox.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpushbutton.h> @@ -33,3 +33,7 @@ #ifndef KAB_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> @@ -40,3 +44,3 @@ #else //KAB_EMBEDDED -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif //KAB_EMBEDDED @@ -132,3 +136,3 @@ void AddresseeEditorWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); @@ -162,3 +166,3 @@ void AddresseeEditorWidget::setupTab1() } - QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); + Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol ); @@ -329,3 +333,3 @@ void AddresseeEditorWidget::setupTab1() /////////////////////////////////////// - QHBox *categoryBox = new QHBox( tab1 ,"cato"); + Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato"); categoryBox->setSpacing( KDialogBase::spacingHint() ); @@ -339,3 +343,3 @@ void AddresseeEditorWidget::setupTab1() mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); - mCatPopup = new QPopupMenu ( categoryBox ); + mCatPopup = new Q3PopupMenu ( categoryBox ); mCategoryEdit->setPopup( mCatPopup ); @@ -413,3 +417,3 @@ void AddresseeEditorWidget::setupTab1_1() //US QGridLayout *layout = new QGridLayout( tab1_1, 11, 7 ); - QGridLayout *layout = new QGridLayout( tab1_1, 7, 2 ); + Q3GridLayout *layout = new Q3GridLayout( tab1_1, 7, 2 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -614,3 +618,3 @@ void AddresseeEditorWidget::setupTab2() - QGridLayout *layout = new QGridLayout( tab2, 8, 3 ); + Q3GridLayout *layout = new Q3GridLayout( tab2, 8, 3 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -693,3 +697,3 @@ void AddresseeEditorWidget::setupTab2() if ( QApplication::desktop()->width() == 640 ) { - QHBox * nbox = new QHBox ( tab2 ); + Q3HBox * nbox = new Q3HBox ( tab2 ); label = new QLabel( i18n( "Nick name:" )+" ", nbox ); @@ -737,3 +741,3 @@ void AddresseeEditorWidget::setupTab2() if ( QApplication::desktop()->width() == 640 ) { - QHBox * nbox = new QHBox ( tab2 ); + Q3HBox * nbox = new Q3HBox ( tab2 ); label = new QLabel( i18n( "Birthday:" )+" ", nbox ); @@ -806,3 +810,3 @@ void AddresseeEditorWidget::setupTab2_1() - QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 ); + Q3GridLayout *layout = new Q3GridLayout( tab2_2, 1, 2 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -928,8 +932,8 @@ void AddresseeEditorWidget::setupTab2_1() #ifndef KAB_EMBEDDED - mNoteEdit = new QTextEdit( tab2_2 ); - mNoteEdit->setWordWrap( QTextEdit::WidgetWidth ); + mNoteEdit = new Q3TextEdit( tab2_2 ); + mNoteEdit->setWordWrap( Q3TextEdit::WidgetWidth ); mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); #else //KAB_EMBEDDED - mNoteEdit = new QMultiLineEdit( tab2_2 ); - mNoteEdit->setWordWrap( QMultiLineEdit::WidgetWidth ); + mNoteEdit = new Q3MultiLineEdit( tab2_2 ); + mNoteEdit->setWordWrap( Q3MultiLineEdit::WidgetWidth ); mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); @@ -955,3 +959,3 @@ void AddresseeEditorWidget::setupTab3() - QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -1007,3 +1011,3 @@ void AddresseeEditorWidget::setupTab3_1() //US QGridLayout *layout = new QGridLayout( tab3, 2, 3 ); - QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); layout->setMargin( KDialogBase::marginHint() ); @@ -1432,4 +1436,4 @@ QString AddresseeEditorWidget::identifier() const -#ifndef KAB_EMBEDDED -#include "addresseeeditorwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseeeditorwidget.cpp" #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 @@ -27,3 +27,3 @@ #include <qdatetime.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcombobox.h> @@ -42,5 +42,5 @@ class QTabWidget; #ifndef KAB_EMBEDDED -class QTextEdit; +class Q3TextEdit; #else //KAB_EMBEDDED -class QMultiLineEdit; +class Q3MultiLineEdit; #endif //KAB_EMBEDDED @@ -157,3 +157,3 @@ class AddresseeEditorWidget : public ExtensionWidget QPushButton *mCategoryEdit; - QPopupMenu *mCatPopup; + Q3PopupMenu *mCatPopup; SecrecyWidget *mSecrecyWidget; @@ -174,5 +174,5 @@ class AddresseeEditorWidget : public ExtensionWidget #ifndef KAB_EMBEDDED - QTextEdit *mNoteEdit; + Q3TextEdit *mNoteEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mNoteEdit; + Q3MultiLineEdit *mNoteEdit; #endif //KAB_EMBEDDED diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp index 366384a..a860f6d 100644 --- a/kaddressbook/addresseeutil.cpp +++ b/kaddressbook/addresseeutil.cpp @@ -48,3 +48,3 @@ KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data { - uint numVCards = data.contains( "BEGIN:VCARD", false ); + uint numVCards = data.count( "BEGIN:VCARD", Qt::CaseInsensitive ); QStringList dataList = QStringList::split( "\r\n\r\n", data ); diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 6def26b..b52a83c 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp @@ -27,3 +27,3 @@ #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlabel.h> @@ -31,2 +31,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -37,3 +39,3 @@ -AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, +AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, const char *name ) @@ -50,3 +52,3 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, - QGridLayout *layout = new QGridLayout( page, 2, 2 ); + Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 ); layout->setSpacing( spacingHint() ); @@ -63,3 +65,3 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, - mTypeGroup = new QButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); + mTypeGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "View Type" ), page ); connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); @@ -68,3 +70,3 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, // Now create the radio buttons. This needs some layout work. - QDictIterator<ViewFactory> iter( *mViewFactoryDict ); + Q3DictIterator<ViewFactory> iter( *mViewFactoryDict ); for ( iter.toFirst(); iter.current(); ++iter ) { @@ -115,4 +117,4 @@ void AddViewDialog::textChanged( const QString &text ) -#ifndef KAB_EMBEDDED -#include "addviewdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addviewdialog.cpp" #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 @@ -27,3 +27,3 @@ #include <kdialogbase.h> -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -31,3 +31,3 @@ class ViewFactory; -class QButtonGroup; +class Q3ButtonGroup; class QLineEdit; @@ -45,3 +45,3 @@ class AddViewDialog : public KDialogBase public: - AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent, + AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, const char *name = 0 ); @@ -65,5 +65,5 @@ class AddViewDialog : public KDialogBase private: - QDict<ViewFactory> *mViewFactoryDict; + Q3Dict<ViewFactory> *mViewFactoryDict; QLineEdit *mViewNameEdit; - QButtonGroup *mTypeGroup; + Q3ButtonGroup *mTypeGroup; 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 @@ -24,6 +24,9 @@ #include <qcombobox.h> -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qlayout.h> -#include <qwidgetstack.h> +#include <q3widgetstack.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -47,3 +50,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); //topLayout->setMargin( KDialog::marginHint() ); @@ -53,3 +56,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) - QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout ); @@ -61,3 +64,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) - QFrame *frameRuler = new QFrame( this ); + Q3Frame *frameRuler = new Q3Frame( this ); //US frameRuler->setFrameShape( QFrame::HLine ); @@ -66,3 +69,3 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) - mDetailsStack = new QWidgetStack( this ); + mDetailsStack = new Q3WidgetStack( this ); topLayout->addWidget( mDetailsStack, 1 ); @@ -161,4 +164,4 @@ void ViewContainer::setReadOnly( bool state ) -#ifndef KAB_EMBEDDED -#include "detailsviewcontainer.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_detailsviewcontainer.cpp" #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 @@ -26,3 +26,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -31,3 +31,3 @@ class QComboBox; -class QWidgetStack; +class Q3WidgetStack; @@ -96,6 +96,6 @@ class ViewContainer : public QWidget KABBasicLook *mCurrentLook; - QPtrList<KABLookFactory> mLookFactories; + Q3PtrList<KABLookFactory> mLookFactories; QComboBox *mStyleCombo; - QWidgetStack *mDetailsStack; + Q3WidgetStack *mDetailsStack; }; 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 @@ -28,3 +28,3 @@ KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) - : QVBox( parent, name ), mReadOnly( false ) + : Q3VBox( parent, name ), mReadOnly( false ) { @@ -72,4 +72,4 @@ KABLookFactory::~KABLookFactory() } -#ifndef KAB_EMBEDDED -#include "look_basic.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_look_basic.cpp" #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 @@ -27,3 +27,3 @@ #include <kabc/addressbook.h> -#include <qvbox.h> +#include <q3vbox.h> @@ -43,3 +43,3 @@ class KConfig; */ -class KABBasicLook : public QVBox +class KABBasicLook : public Q3VBox { 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 @@ -191,6 +191,6 @@ void KABDetailedView::mousePressEvent( QMouseEvent *e ) { - QPopupMenu menu( this ); - QPopupMenu *menuBG = new QPopupMenu( &menu ); - mMenuBorderedBG = new QPopupMenu( &menu ); - mMenuTiledBG = new QPopupMenu( &menu ); + Q3PopupMenu menu( this ); + Q3PopupMenu *menuBG = new Q3PopupMenu( &menu ); + mMenuBorderedBG = new Q3PopupMenu( &menu ); + mMenuTiledBG = new Q3PopupMenu( &menu ); @@ -416,4 +416,4 @@ void KABDetailedView::restoreSettings( KConfig *config ) -#ifndef KAB_EMBEDDED -#include "look_details.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_look_details.cpp" #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 @@ -132,4 +132,4 @@ class KABDetailedView : public KABBasicLook - QPopupMenu *mMenuBorderedBG; - QPopupMenu *mMenuTiledBG; + Q3PopupMenu *mMenuBorderedBG; + Q3PopupMenu *mMenuTiledBG; 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 @@ -26,3 +26,3 @@ #include "look_html.h" -#include <qscrollview.h> +#include <q3scrollview.h> #include "kabprefs.h" @@ -53,4 +53,4 @@ void KABHtmlView::setAddressee( const KABC::Addressee &addr ) -#ifndef KAB_EMBEDDED -#include "look_html.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_look_html.cpp" #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 @@ -30,3 +30,5 @@ #include <qtooltip.h> -#include <qlistbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -50,3 +52,3 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) { - QGridLayout *topLayout = new QGridLayout( this, 2, 2 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -57,3 +59,3 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) topLayout->addWidget( label, 0, 0 ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); QPushButton *editButton = new QPushButton( i18n( "Edit Email Addresses..." ), this); @@ -139,3 +141,3 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, - QGridLayout *topLayout = new QGridLayout( page, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 ); @@ -156,3 +158,3 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, - mEmailListBox = new QListBox( page ); + mEmailListBox = new Q3ListBox( page ); @@ -274,4 +276,4 @@ void EmailEditDialog::emailChanged() -#ifndef KAB_EMBEDDED -#include "emaileditwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_emaileditwidget.cpp" #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 @@ -31,7 +31,7 @@ -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; -class QListView; -class QListBox; -class QTextEdit; +class Q3ListView; +class Q3ListBox; +class Q3TextEdit; class QToolButton; @@ -91,3 +91,3 @@ class EmailEditDialog : public KDialogBase KLineEdit *mEmailEdit; - QListBox *mEmailListBox; + Q3ListBox *mEmailListBox; QPushButton *mAddButton; diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 46defa1..5356224 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -24,2 +24,4 @@ #include <qapplication.h> +//Added by qt3to4: +#include <Q3HBoxLayout> #include <kactionclasses.h> @@ -44,3 +46,3 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, const char *name ) - : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) + : Q3ScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) { @@ -60,3 +62,3 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, mWidgetBox = new QWidget( viewport() ); - new QHBoxLayout (mWidgetBox ); + new Q3HBoxLayout (mWidgetBox ); addChild( mWidgetBox ); @@ -150,3 +152,3 @@ void ExtensionManager::createExtensionWidgets() mExtensionWidgetList.setAutoDelete( true ); - QPtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); + Q3PtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); ExtensionWidget *wdg = 0; @@ -161,3 +163,3 @@ void ExtensionManager::createExtensionWidgets() - QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();; + Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();; @@ -246,4 +248,4 @@ void ExtensionManager::createExtensionWidgets() -#ifndef KAB_EMBEDDED -#include "extensionmanager.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_extensionmanager.cpp" #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 @@ -26,5 +26,5 @@ -#include <qhbox.h> -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3hbox.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> @@ -36,3 +36,3 @@ class KSelectAction; -class ExtensionManager : public QScrollView +class ExtensionManager : public Q3ScrollView { @@ -82,3 +82,3 @@ class ExtensionManager : public QScrollView ExtensionWidget *mCurrentExtensionWidget; - QPtrList<ExtensionWidget> mExtensionWidgetList; + Q3PtrList<ExtensionWidget> mExtensionWidgetList; diff --git a/kaddressbook/extensionwidget.cpp b/kaddressbook/extensionwidget.cpp index 69f4aa8..7c3b415 100644 --- a/kaddressbook/extensionwidget.cpp +++ b/kaddressbook/extensionwidget.cpp @@ -80,5 +80,4 @@ ConfigureWidget *ExtensionFactory::configureWidget( QWidget*, const char* ) -#ifndef KAB_EMBEDDED -#include "extensionwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_extensionwidget.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/extensionwidget.h b/kaddressbook/extensionwidget.h index fc91f21..9fcfba9 100644 --- a/kaddressbook/extensionwidget.h +++ b/kaddressbook/extensionwidget.h @@ -88,5 +88,5 @@ class ExtensionWidget : public QWidget #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class ExtensionFactory : public KLibFactory -//MOC_SKIP_END +#endif #else //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 @@ -23,3 +23,3 @@ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcombobox.h> @@ -27,5 +27,12 @@ #include <qlayout.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> #include <qradiobutton.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> +#include <QDragEnterEvent> @@ -79,3 +86,3 @@ extern "C" { -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { @@ -84,3 +91,3 @@ class ContactItem : public QListViewItem const QString &email = QString::null ) : - QListViewItem( parent ), + Q3ListViewItem( parent ), mAddressee( addressee ), @@ -123,3 +130,3 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, { - QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() ); @@ -168,4 +175,4 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, SLOT( selectionContactViewChanged() ) ); - connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), - SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); + connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ), + SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) ); @@ -412,3 +419,3 @@ QString DistributionListWidget::identifier() const -void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) +void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* ) { @@ -434,3 +441,3 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); @@ -442,3 +449,3 @@ void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); @@ -463,6 +470,6 @@ EmailSelector::EmailSelector( const QStringList &emails, { - QFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = plainPage(); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); - mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), topFrame ); @@ -481,3 +488,3 @@ QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) @@ -498,4 +505,4 @@ QString EmailSelector::getEmail( const QStringList &emails, -#ifndef KAB_EMBEDDED -#include "distributionlistwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_distributionlistwidget.cpp" #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 @@ -30,7 +30,12 @@ #include "extensionwidget.h" +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> +#include <QLabel> +#include <QDragMoveEvent> -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; class QLabel; -class QListView; +class Q3ListView; @@ -59,3 +64,3 @@ class DistributionListWidget : public ExtensionWidget void save(); - void dropped( QDropEvent*, QListViewItem* ); + void dropped( QDropEvent*, Q3ListViewItem* ); @@ -122,3 +127,3 @@ class EmailSelector : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; 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 @@ -25,2 +25,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -65,3 +67,3 @@ extern "C" { -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { @@ -69,3 +71,3 @@ class ContactItem : public QListViewItem ContactItem( KListView *parent, const KABC::Addressee &addressee ) - : QListViewItem( parent ), mAddressee( addressee ) + : Q3ListViewItem( parent ), mAddressee( addressee ) { @@ -96,3 +98,3 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name ) - QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -216,3 +218,3 @@ void MergeWidget::mergeAndRemove() mBlockUpdate = true; - core()->deleteContacts( oldUID ); + core()->deleteContacts( QStringList(oldUID) ); core()->setContactSelected( mMasterAddressee.uid() ); @@ -371,4 +373,4 @@ void MergeWidget::doMerge( const KABC::Addressee &addr ) -#ifndef KAB_EMBEDDED -#include "mergewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_mergewidget.cpp" #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 @@ -31,3 +31,3 @@ -class QListView; +class Q3ListView; diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp index 12ab1e3..6462310 100644 --- a/kaddressbook/filter.cpp +++ b/kaddressbook/filter.cpp @@ -220,3 +220,3 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup ) filter.mEnabled = true; - filter.mCategoryList = *it; + filter.mCategoryList = QStringList(*it); filter.mMatchRule = Matching; diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h index f4ae123..508436d 100644 --- a/kaddressbook/filter.h +++ b/kaddressbook/filter.h @@ -28,3 +28,3 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -44,3 +44,3 @@ class Filter int criteria() const { return mCriteria;} - typedef QValueList<Filter> List; + typedef Q3ValueList<Filter> List; diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index ef9b979..40698a7 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -30,4 +30,4 @@ $Id$ -#include <qbuttongroup.h> -#include <qhbox.h> +#include <q3buttongroup.h> +#include <q3hbox.h> #include <qlabel.h> @@ -42,2 +42,4 @@ $Id$ #include <qwidget.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -66,3 +68,3 @@ FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name ) for ( iter = cats.begin(); iter != cats.end(); ++iter ) - mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, (*iter), QCheckListItem::CheckBox ) ); + mCategoriesView->insertItem( new Q3CheckListItem( mCategoriesView, (*iter), Q3CheckListItem::CheckBox ) ); filterNameTextChanged( mNameEdit->text() ); @@ -79,6 +81,6 @@ void FilterEditDialog::setFilter( const Filter &filter ) QStringList categories = filter.categories(); - QListViewItem *item = mCategoriesView->firstChild(); + Q3ListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { if ( categories.contains( item->text( 0 ) ) ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item ); checkItem->setOn( true ); @@ -107,5 +109,5 @@ Filter FilterEditDialog::filter() QStringList categories; - QListViewItem *item = mCategoriesView->firstChild(); + Q3ListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + Q3CheckListItem *checkItem = static_cast<Q3CheckListItem*>( item ); if ( checkItem->isOn() ) @@ -143,3 +145,3 @@ void FilterEditDialog::initGUI() - QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 3, 2, 0, spacingHint() ); @@ -157,3 +159,3 @@ void FilterEditDialog::initGUI() - mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); + mMatchRuleGroup = new Q3HButtonGroup( i18n( "Category rule" ), page ); mMatchRuleGroup->setExclusive( true ); @@ -166,3 +168,3 @@ void FilterEditDialog::initGUI() - QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); + Q3HButtonGroup * mMatchPPCGroup = new Q3HButtonGroup(i18n( "Include contacts, that are:" ), page ); mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); @@ -274,3 +276,3 @@ void FilterDialog::refresh() -void FilterDialog::selectionChanged( QListBoxItem *item ) +void FilterDialog::selectionChanged( Q3ListBoxItem *item ) { @@ -292,3 +294,3 @@ void FilterDialog::initGUI() - QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 2, 0, spacingHint() ); @@ -296,8 +298,8 @@ void FilterDialog::initGUI() topLayout->addWidget( mFilterListBox, 0, 0 ); - connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ), - SLOT( selectionChanged( QListBoxItem * ) ) ); - connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ), + connect( mFilterListBox, SIGNAL( selectionChanged( Q3ListBoxItem * ) ), + SLOT( selectionChanged( Q3ListBoxItem * ) ) ); + connect( mFilterListBox, SIGNAL( doubleClicked ( Q3ListBoxItem * ) ), SLOT( edit() ) ); - KButtonBox *buttonBox = new KButtonBox( page, Vertical ); + KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical ); buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) ); @@ -312,4 +314,4 @@ void FilterDialog::initGUI() -#ifndef KAB_EMBEDDED -#include "filtereditdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_filtereditdialog.cpp" #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 @@ -33,3 +33,3 @@ $Id$ -class QButtonGroup; +#include <Q3HButtonGroup> class QString; @@ -37,3 +37,3 @@ class QToolButton; class QWidget; -class QListBoxItem; +class Q3ListBoxItem; class QCheckBox; @@ -45,3 +45,2 @@ class KListView; #include <kdialogbase.h> -#include <qhbuttongroup.h> @@ -64,3 +63,3 @@ class FilterDialog : public KDialogBase void remove(); - void selectionChanged( QListBoxItem* ); + void selectionChanged( Q3ListBoxItem* ); @@ -100,3 +99,3 @@ class FilterEditDialog : public KDialogBase KListView *mCategoriesView; - QHButtonGroup *mMatchRuleGroup; + Q3HButtonGroup *mMatchRuleGroup; QCheckBox *mPrivate; diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 13cd084..caff3b2 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -29,3 +29,8 @@ -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <QPaintEvent> +#include <Q3GridLayout> +#include <Q3Frame> +#include <QMouseEvent> #include <kglobal.h> @@ -33,2 +38,4 @@ +#include <QDesktopWidget> + #include <knuminput.h> @@ -43,6 +50,6 @@ #include <qapplication.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpainter.h> @@ -61,3 +68,3 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) - QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 ); topLayout->setMargin( KDialog::marginHint() ); @@ -71,3 +78,3 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); @@ -169,5 +176,5 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) { - QFrame *page = plainPage(); + Q3Frame *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(), spacingHint() ); @@ -177,4 +184,4 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) mCityCombo = new KComboBox( page ); - QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); - QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(), + Q3GroupBox *sexagesimalGroup = new Q3GroupBox( 0, Qt::Vertical, i18n( "Sexagesimal" ), page ); + Q3GridLayout *sexagesimalLayout = new Q3GridLayout( sexagesimalGroup->layout(), 2, 5, spacingHint() ); @@ -431,4 +438,4 @@ void GeoDialog::loadCityList() - if ( file.open( IO_ReadOnly ) ) { - QTextStream s( &file ); + if ( file.open( QIODevice::ReadOnly ) ) { + Q3TextStream s( &file ); @@ -554,3 +561,3 @@ GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) { - setBackgroundMode( NoBackground ); + setBackgroundMode( Qt::NoBackground ); @@ -626,4 +633,4 @@ void GeoMapWidget::paintEvent( QPaintEvent* ) -#ifndef KAB_EMBEDDED -#include "geowidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_geowidget.cpp" #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 @@ -29,2 +29,6 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QLabel> +#include <QMouseEvent> +#include <QPaintEvent> #include <kdialogbase.h> diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index eec5e08..6ecf66d 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -39,3 +39,3 @@ #include <qcheckbox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> @@ -45,2 +45,6 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> @@ -51,7 +55,7 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) { - QGridLayout *topLayout = new QGridLayout( this, 2, 1, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 1, KDialog::marginHint(), KDialog::spacingHint() ); - QGroupBox *photoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); - QGridLayout *boxLayout = new QGridLayout( photoBox->layout(), 3, 2, + Q3GroupBox *photoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Photo" ), this ); + Q3GridLayout *boxLayout = new Q3GridLayout( photoBox->layout(), 3, 2, KDialog::spacingHint() ); @@ -65,3 +69,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mPhotoLabel->setScaledContents( true ); - mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); @@ -77,3 +81,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) boxLayout->addWidget( mPhotoUrl, 0, 1 ); - QHBox *hb1 = new QHBox ( photoBox ); + Q3HBox *hb1 = new Q3HBox ( photoBox ); mUsePhotoUrl = new QCheckBox( i18n( "Store as URL" ), hb1 ); @@ -88,4 +92,4 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) - QGroupBox *logoBox = new QGroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); - boxLayout = new QGridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); + Q3GroupBox *logoBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Logo" ), this ); + boxLayout = new Q3GridLayout( logoBox->layout(), 3, 2, KDialog::spacingHint() ); boxLayout->setRowStretch( 2, 1 ); @@ -95,3 +99,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mLogoLabel->setScaledContents( true ); - mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); @@ -106,3 +110,3 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) - QHBox *hb2 = new QHBox ( logoBox ); + Q3HBox *hb2 = new Q3HBox ( logoBox ); mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 ); @@ -182,3 +186,3 @@ KABC::Picture ImageWidget::photo() const else { - QPixmap *px = mPhotoLabel->pixmap(); + const QPixmap *px = mPhotoLabel->pixmap(); if ( px ) { @@ -234,3 +238,3 @@ KABC::Picture ImageWidget::logo() const else { - QPixmap *px = mLogoLabel->pixmap(); + const QPixmap *px = mLogoLabel->pixmap(); if ( px ) { @@ -294,4 +298,4 @@ QPixmap ImageWidget::loadPixmap( const QString &url ) -#ifndef KAB_EMBEDDED -#include "imagewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_imagewidget.cpp" #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 @@ -27,2 +27,5 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QPixmap> +#include <QLabel> diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 5f8b83d..a54d1cd 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -27,3 +27,6 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qcombobox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> @@ -39,4 +42,5 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) { + setObjectName(name); + setParent(parent); #ifndef KAB_EMBEDDED @@ -45,3 +49,3 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); + Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() ); @@ -49,3 +53,3 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) QLabel *label = new QLabel( i18n( "Search:" ), this ); - label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); + label->setAlignment( Qt::AlignVCenter | Qt::AlignRight ); layout->addWidget( label ); @@ -178,4 +182,4 @@ int IncSearchWidget::currentItem() const } -#ifndef KAB_EMBEDDED -#include "incsearchwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_incsearchwidget.cpp" #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 @@ -27,4 +27,7 @@ #include <qstring.h> -#include <qtl.h> +#include <q3tl.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> @@ -75,5 +78,5 @@ JumpButtonBar::JumpButtonBar( KABCore *core, QWidget *parent, const char *name ) - mButtonLayout = new QGridLayout( this, 1, 18 ); + mButtonLayout = new Q3GridLayout( this, 1, 18 ); else - mButtonLayout = new QGridLayout( this, 1, 20 ); + mButtonLayout = new Q3GridLayout( this, 1, 20 ); mButtonLayout->setAlignment( Qt::AlignTop ); @@ -254,4 +257,4 @@ void JumpButtonBar::sortListLocaleAware( QStringList &list ) -#ifndef KAB_EMBEDDED -#include "jumpbuttonbar.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_jumpbuttonbar.cpp" #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 @@ -28,7 +28,10 @@ #include <qwidget.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qstringlist.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <Q3GridLayout> class QChar; -class QGridLayout; +class Q3GridLayout; class QResizeEvent; @@ -78,5 +81,5 @@ class JumpButtonBar : public QWidget - QGridLayout *mButtonLayout; + Q3GridLayout *mButtonLayout; QStringList mCharacters; - QPtrList<JumpButton> mButtons; + Q3PtrList<JumpButton> mButtons; }; diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index ab2824c..03b44d1 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -41,3 +41,13 @@ $Id$ #include <qpushbutton.h> -#include <qprogressbar.h> +#include <q3progressbar.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QPixmap> +#include <Q3ValueList> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> +#include <Q3CString> +#include <Q3PopupMenu> +#include <Q3PtrList> #include <libkdepim/phoneaccess.h> @@ -49,6 +59,6 @@ $Id$ #include <qapplicaton.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlayout.h> #include <qregexp.h> -#include <qvbox.h> +#include <q3vbox.h> #include <kabc/addresseelist.h> @@ -90,3 +100,3 @@ $Id$ -#include <qapp.h> +#include <qapplication.h> #include <qmenubar.h> @@ -131,8 +141,8 @@ $Id$ #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qlayout.h> #include <qclipboard.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> @@ -177,3 +187,3 @@ class KABCatPrefs : public QDialog setCaption( i18n("Manage new Categories") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -182,3 +192,3 @@ class KABCatPrefs : public QDialog lay->addWidget( lab ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this ); lay->addWidget( format ); @@ -209,3 +219,3 @@ class KABFormatPrefs : public QDialog setCaption( i18n("Set formatted name") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -214,3 +224,3 @@ class KABFormatPrefs : public QDialog lay->addWidget( lab ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Set formatted name to:"), this ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Set formatted name to:"), this ); lay->addWidget( format ); @@ -247,3 +257,3 @@ class KAex2phonePrefs : public QDialog setCaption( i18n("Export to phone options") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -252,5 +262,5 @@ class KAex2phonePrefs : public QDialog lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); - lab->setAlignment (AlignHCenter ); - QHBox* temphb; - temphb = new QHBox( this ); + lab->setAlignment (Qt::AlignHCenter ); + Q3HBox* temphb; + temphb = new Q3HBox( this ); new QLabel( i18n("I/O device: "), temphb ); @@ -258,3 +268,3 @@ class KAex2phonePrefs : public QDialog lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Connection: "), temphb ); @@ -262,3 +272,3 @@ class KAex2phonePrefs : public QDialog lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Model(opt.): "), temphb ); @@ -269,3 +279,3 @@ class KAex2phonePrefs : public QDialog lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ncontact data on phone!"), this ) ); - lab->setAlignment (AlignHCenter); + lab->setAlignment (Qt::AlignHCenter); QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); @@ -409,3 +419,3 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const } -void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) +void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data ) { @@ -423,5 +433,5 @@ void KABCore::loadDataAfterStart() #ifndef DESKTOP_VERSION - disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); + disconnect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT (receiveStart ( const Q3CString &, const QByteArray & ))); - QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); + QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & ))); if ( !mCStringMess.isEmpty() ) @@ -455,3 +465,3 @@ KABCore::~KABCore() } -void KABCore::receive( const QCString& cmsg, const QByteArray& data ) +void KABCore::receive( const Q3CString& cmsg, const QByteArray& data ) { @@ -459,3 +469,3 @@ void KABCore::receive( const QCString& cmsg, const QByteArray& data ) if ( cmsg == "setDocument(QString)" ) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); QString fileName; @@ -482,3 +492,3 @@ void KABCore::toggleBeamReceive( ) infrared = new QCopChannel("QPE/Application/addressbook",this, "channelAB" ) ; - QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(receive( const QCString&, const QByteArray& ))); + QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(receive( const Q3CString&, const QByteArray& ))); #endif @@ -562,3 +572,3 @@ void KABCore::restoreSettings() #endif - QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; + Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; if ( true /*splitterSize.count() == 0*/ ) { @@ -652,6 +662,6 @@ KABC::Resource *KABCore::requestResource( QWidget *parent ) { - QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); + Q3PtrList<KABC::Resource> kabcResources = addressBook()->resources(); - QPtrList<KRES::Resource> kresResources; - QPtrListIterator<KABC::Resource> resIt( kabcResources ); + Q3PtrList<KRES::Resource> kresResources; + Q3PtrListIterator<KABC::Resource> resIt( kabcResources ); KABC::Resource *resource; @@ -797,3 +807,3 @@ void KABCore::mailVCard( const QStringList& uids ) - if ( outFile.open(IO_WriteOnly) ) { // file opened successfully + if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully KABC::VCardConverter converter; @@ -803,4 +813,4 @@ void KABCore::mailVCard( const QStringList& uids ) - QTextStream t( &outFile ); // use a text stream - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); // use a text stream + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t << vcard; @@ -1018,7 +1028,7 @@ void KABCore::beamVCard(const QStringList& uids) QFile outFile(fileName); - if ( outFile.open(IO_WriteOnly) ) { + if ( outFile.open(QIODevice::WriteOnly) ) { datastream.replace ( QRegExp("VERSION:3.0") , "VERSION:2.1" ); - QTextStream t( &outFile ); // use a text stream + Q3TextStream t( &outFile ); // use a text stream //t.setEncoding( QTextStream::UnicodeUTF8 ); - t.setEncoding( QTextStream::Latin1 ); + t.setEncoding( Q3TextStream::Latin1 ); t <<datastream.latin1(); @@ -1299,6 +1309,6 @@ void KABCore::newContact() - QPtrList<KABC::Resource> kabcResources = mAddressBook->resources(); + Q3PtrList<KABC::Resource> kabcResources = mAddressBook->resources(); - QPtrList<KRES::Resource> kresResources; - QPtrListIterator<KABC::Resource> it( kabcResources ); + Q3PtrList<KRES::Resource> kresResources; + Q3PtrListIterator<KABC::Resource> it( kabcResources ); KABC::Resource *resource; @@ -1858,3 +1868,3 @@ void KABCore::initGUI() #ifndef KAB_EMBEDDED - QHBoxLayout *topLayout = new QHBoxLayout( this ); + Q3HBoxLayout *topLayout = new Q3HBoxLayout( this ); topLayout->setSpacing( KDialogBase::spacingHint() ); @@ -1866,3 +1876,3 @@ void KABCore::initGUI() - QVBox *viewSpace = new QVBox( mDetailsSplitter ); + Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter ); mIncSearchWidget = new IncSearchWidget( viewSpace ); @@ -1890,10 +1900,10 @@ void KABCore::initGUI() // Viewmanager needs this menu to plugin submenues. - viewMenu = new QPopupMenu( this ); - settingsMenu = new QPopupMenu( this ); + viewMenu = new Q3PopupMenu( this ); + settingsMenu = new Q3PopupMenu( this ); //filterMenu = new QPopupMenu( this ); - ImportMenu = new QPopupMenu( this ); - ExportMenu = new QPopupMenu( this ); - syncMenu = new QPopupMenu( this ); - changeMenu= new QPopupMenu( this ); - beamMenu= new QPopupMenu( this ); + ImportMenu = new Q3PopupMenu( this ); + ExportMenu = new Q3PopupMenu( this ); + syncMenu = new Q3PopupMenu( this ); + changeMenu= new Q3PopupMenu( this ); + beamMenu= new Q3PopupMenu( this ); @@ -1902,3 +1912,3 @@ void KABCore::initGUI() - QBoxLayout *topLayout; + Q3BoxLayout *topLayout; @@ -1911,3 +1921,3 @@ void KABCore::initGUI() #ifdef DESKTOP_VERSION - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); @@ -1926,3 +1936,3 @@ void KABCore::initGUI() if ( QApplication::desktop()->width() > 480 ) { - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); @@ -1931,3 +1941,3 @@ void KABCore::initGUI() - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); @@ -2036,3 +2046,3 @@ void KABCore::initActions() //mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); - mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", CTRL + Key_P, mViewManager, + mActionPrint = new KAction( i18n( "&Print View" ), "fileprint", Qt::CTRL + Qt::Key_P, mViewManager, SLOT( printView() ), actionCollection(), "kaddressbook_print" ); @@ -2043,6 +2053,6 @@ void KABCore::initActions() - mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, + mActionSave = new KAction( i18n( "&Save" ), "filesave", Qt::CTRL+Qt::Key_S, this, SLOT( save() ), actionCollection(), "file_sync" ); - mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, + mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", Qt::CTRL+Qt::Key_N, this, SLOT( newContact() ), actionCollection(), "file_new_contact" ); @@ -2085,18 +2095,18 @@ void KABCore::initActions() if ( mIsPart ) { - mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, + mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", Qt::CTRL + Qt::Key_C, this, SLOT( copyContacts() ), actionCollection(), "kaddressbook_copy" ); - mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, + mActionCut = new KAction( i18n( "Cu&t" ), "editcut", Qt::CTRL + Qt::Key_X, this, SLOT( cutContacts() ), actionCollection(), "kaddressbook_cut" ); - mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, + mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", Qt::CTRL + Qt::Key_V, this, SLOT( pasteContacts() ), actionCollection(), "kaddressbook_paste" ); - mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, + mActionSelectAll = new KAction( i18n( "Select &All" ), Qt::CTRL + Qt::Key_A, this, SLOT( selectAllContacts() ), actionCollection(), "kaddressbook_select_all" ); - mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, + mActionUndo = new KAction( i18n( "&Undo" ), "undo", Qt::CTRL + Qt::Key_Z, this, SLOT( undo() ), actionCollection(), "kaddressbook_undo" ); - mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, + mActionRedo = new KAction( i18n( "Re&do" ), "redo", Qt::CTRL + Qt::SHIFT + Qt::Key_Z, this, SLOT( redo() ), actionCollection(), @@ -2113,3 +2123,3 @@ void KABCore::initActions() mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", - Key_Delete, this, SLOT( deleteContacts() ), + Qt::Key_Delete, this, SLOT( deleteContacts() ), actionCollection(), "edit_delete" ); @@ -2248,5 +2258,5 @@ void KABCore::addActionsManually() #ifdef KAB_EMBEDDED - QPopupMenu *fileMenu = new QPopupMenu( this ); - QPopupMenu *editMenu = new QPopupMenu( this ); - QPopupMenu *helpMenu = new QPopupMenu( this ); + Q3PopupMenu *fileMenu = new Q3PopupMenu( this ); + Q3PopupMenu *editMenu = new Q3PopupMenu( this ); + Q3PopupMenu *helpMenu = new Q3PopupMenu( this ); @@ -2278,3 +2288,3 @@ void KABCore::addActionsManually() QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); - QPopupMenu *popupBarTB = new QPopupMenu( this ); + Q3PopupMenu *popupBarTB = new Q3PopupMenu( this ); menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); @@ -2633,3 +2643,3 @@ void KABCore::configureResources() { - KRES::KCMKResources dlg( this, "" , 0 ); + KRES::KCMKResources dlg( this, "" , QStringList() ); @@ -2729,3 +2739,3 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString } - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; @@ -2910,3 +2920,3 @@ KABC::Addressee KABCore::getLastSyncAddressee() lse.setRevision( mLastAddressbookSync ); - lse.setCategories( i18n("SyncEvent") ); + lse.setCategories( QStringList(i18n("SyncEvent")) ); mAddressBook->insertAddressee( lse ); @@ -3101,3 +3111,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo addresseeRSync.setRevision( mLastAddressbookSync ); - addresseeRSync.setCategories( i18n("SyncAddressee") ); + addresseeRSync.setCategories( QStringList(i18n("SyncAddressee")) ); } diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index ec6a9ec..4351720 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -30,3 +30,3 @@ #endif //KAB_EMBEDDED -#include <qdict.h> +#include <q3dict.h> #include <qtimer.h> @@ -34,3 +34,7 @@ #include <qwidget.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3CString> +#include <QPixmap> +#include <QResizeEvent> #include <ksyncmanager.h> @@ -87,5 +91,5 @@ class KABCore : public QWidget, public KSyncInterface //US added functionality - QPopupMenu* getViewMenu() {return viewMenu;} - QPopupMenu* getFilterMenu() {return filterMenu;} - QPopupMenu* getSettingsMenu() {return settingsMenu;} + Q3PopupMenu* getViewMenu() {return viewMenu;} + Q3PopupMenu* getFilterMenu() {return filterMenu;} + Q3PopupMenu* getSettingsMenu() {return settingsMenu;} void addActionsManually(); @@ -137,4 +141,4 @@ class KABCore : public QWidget, public KSyncInterface #ifdef KAB_EMBEDDED - inline QPopupMenu* getImportMenu() { return ImportMenu;} - inline QPopupMenu* getExportMenu() { return ExportMenu;} + inline Q3PopupMenu* getImportMenu() { return ImportMenu;} + inline Q3PopupMenu* getExportMenu() { return ExportMenu;} #endif //KAB_EMBEDDED @@ -368,4 +372,4 @@ class KABCore : public QWidget, public KSyncInterface void updateMainWindow(); - void receive( const QCString& cmsg, const QByteArray& data ); - void receiveStart( const QCString& cmsg, const QByteArray& data ); + void receive( const Q3CString& cmsg, const QByteArray& data ); + void receiveStart( const Q3CString& cmsg, const QByteArray& data ); void toggleBeamReceive( ); @@ -396,3 +400,3 @@ class KABCore : public QWidget, public KSyncInterface private: - QCString mCStringMess; + Q3CString mCStringMess; QByteArray mByteData; @@ -488,10 +492,10 @@ class KABCore : public QWidget, public KSyncInterface - QPopupMenu *viewMenu; - QPopupMenu *filterMenu; - QPopupMenu *settingsMenu; - QPopupMenu *changeMenu; - QPopupMenu *beamMenu; + Q3PopupMenu *viewMenu; + Q3PopupMenu *filterMenu; + Q3PopupMenu *settingsMenu; + Q3PopupMenu *changeMenu; + Q3PopupMenu *beamMenu; //US QAction *mActionSave; - QPopupMenu *ImportMenu; - QPopupMenu *ExportMenu; + Q3PopupMenu *ImportMenu; + Q3PopupMenu *ExportMenu; //LR additional methods @@ -526,3 +530,3 @@ class KABCore : public QWidget, public KSyncInterface QString sentSyncFile(); - QPopupMenu *syncMenu; + Q3PopupMenu *syncMenu; KSyncManager* syncManager; diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 42d541b..6f9c995 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -27,3 +27,3 @@ -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> @@ -93,3 +93,3 @@ KABPrefs::KABPrefs() addItemString( "CurrentView", &mCurrentView, defaultView ); - addItemStringList( "ViewNames", &mViewNames, defaultView ); + addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index ddbc0c0..aff725e 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -27,3 +27,5 @@ #include <qstringlist.h> -#include <qdict.h> +#include <q3dict.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -75,4 +77,4 @@ class KABPrefs : public KPimPrefs bool mAskForDelete; - QValueList<int> mExtensionsSplitter; - QValueList<int> mDetailsSplitter; + Q3ValueList<int> mExtensionsSplitter; + Q3ValueList<int> mDetailsSplitter; diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro index cd38e5f..4eb1f7f 100644 --- a/kaddressbook/kaddressbook.pro +++ b/kaddressbook/kaddressbook.pro @@ -15,16 +15,16 @@ staticlib: { TARGET = kapi_linux -LIBS += ../bin/libmicrokabc_qtopia.a -LIBS += ../bin/libmicrokabc_file.a -LIBS += ../bin/libmicrokabc_dir.a -LIBS += ../bin/libmicrokdepim.a -LIBS += ../bin/libmicrokcal.a -LIBS += ../bin/libmicrokabc.a -LIBS += ../bin/libmicrokde.a -LIBS += ../bin/libmicrokabc_qtopia.a -LIBS += ../bin/libmicrokabc_file.a -LIBS += ../bin/libmicrokabc_dir.a -LIBS += ../bin/libmicrokdepim.a -LIBS += ../bin/libmicrokcal.a -LIBS += ../bin/libmicrokabc.a -LIBS += ../bin/libmicrokde.a +LIBS += ../bin/libxmicrokabc_qtopia.a +LIBS += ../bin/libxmicrokabc_file.a +LIBS += ../bin/libxmicrokabc_dir.a +LIBS += ../bin/libxmicrokdepim.a +LIBS += ../bin/libxmicrokcal.a +LIBS += ../bin/libxmicrokabc.a +LIBS += ../bin/libxmicrokde.a +LIBS += ../bin/libxmicrokabc_qtopia.a +LIBS += ../bin/libxmicrokabc_file.a +LIBS += ../bin/libxmicrokabc_dir.a +LIBS += ../bin/libxmicrokdepim.a +LIBS += ../bin/libxmicrokcal.a +LIBS += ../bin/libxmicrokabc.a +LIBS += ../bin/libxmicrokde.a LIBS += ../libical/lib/libical.a @@ -33,6 +33,6 @@ LIBS += ../libical/lib/libicalss.a } else { -LIBS += ../bin/libmicrokdepim.so -LIBS += ../bin/libmicrokde.so -LIBS += ../bin/libmicrokabc.so -LIBS += ../bin/libmicrokcal.so +LIBS += ../bin/libxmicrokdepim.so +LIBS += ../bin/libxmicrokde.so +LIBS += ../bin/libxmicrokabc.so +LIBS += ../bin/libxmicrokcal.so #LIBS += -lldap @@ -45,6 +45,6 @@ RC_FILE = winicons.rc DEFINES += _WIN32_ -LIBS += ../bin/microkdepim.lib -LIBS += ../bin/microkcal.lib -LIBS += ../bin/microkde.lib -LIBS += ../bin/microkabc.lib +LIBS += ../bin/xmicrokdepim.lib +LIBS += ../bin/xmicrokcal.lib +LIBS += ../bin/xmicrokde.lib +LIBS += ../bin/xmicrokabc.lib QMAKE_LINK += /NODEFAULTLIB:LIBC @@ -206 +206,3 @@ xxport/sharpdtm_xxport.cpp \ +#The following line was inserted by qt3to4 +QT += xml qt3support diff --git a/kaddressbook/kaddressbookE.pro b/kaddressbook/kaddressbookE.pro index 64e3a4a..c4b2499 100644 --- a/kaddressbook/kaddressbookE.pro +++ b/kaddressbook/kaddressbookE.pro @@ -14,6 +14,6 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER #DEFINES += KORG_NOLVALTERNATION -LIBS += -lmicrokdepim -LIBS += -lmicrokde +LIBS += -lxmicrokdepim +LIBS += -lxmicrokde LIBS += -lmicroqtcompat -LIBS += -lmicrokabc +LIBS += -lxmicrokabc LIBS += -lqpe diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index c417226..b317974 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -27,4 +27,7 @@ #include <qmessagebox.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <QCloseEvent> #else //KAB_EMBEDDED @@ -44,5 +47,5 @@ KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) #else //KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) -//MOC_SKIP_END +#endif #endif //KAB_EMBEDDED @@ -53,5 +56,5 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW // KABCore will fill the toolbar with menues and icons - QMainWindow::ToolBarDock tbd; - tbd = Top; - iconToolBar = new QToolBar( this ); + Qt::ToolBarDock tbd; + tbd = Qt::DockTop; + iconToolBar = new Q3ToolBar( this ); addToolBar (iconToolBar , tbd ); @@ -87,3 +90,3 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW #ifndef DESKTOP_VERSION - QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & ))); + QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), mCore, SLOT (receiveStart ( const Q3CString &, const QByteArray & ))); #endif @@ -237,5 +240,4 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce ) -#ifndef KAB_EMBEDDED -#include "kaddressbookmain.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookmain.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h index b6d9b4b..d3f5cc7 100644 --- a/kaddressbook/kaddressbookmain.h +++ b/kaddressbook/kaddressbookmain.h @@ -26,6 +26,8 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QCloseEvent> #ifdef KAB_EMBEDDED -class QToolBar; +class Q3ToolBar; #include <qaction.h> @@ -54,5 +56,5 @@ class KAddressBookMain : public KMainWindow #else //KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface -//MOC_SKIP_END +#endif #endif //KAB_EMBEDDED @@ -75,5 +77,5 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN virtual ASYNC showContactEditor( QString uid ); -//MOC_SKIP_END +#endif #endif //KAB_EMBEDDED diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp index 86898e2..4823b37 100644 --- a/kaddressbook/kaddressbookview.cpp +++ b/kaddressbook/kaddressbookview.cpp @@ -34,2 +34,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -135,3 +137,3 @@ void KAddressBookView::initGUI() // Create the layout - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); @@ -185,4 +187,4 @@ ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab, -#ifndef KAB_EMBEDDED -#include "kaddressbookview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookview.cpp" #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 +1,3 @@ +//Added by qt3to4: +#include <QDropEvent> /* @@ -42,3 +44,3 @@ class QDropEvent; #ifdef DESKTOP_VERSION -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qprinter.h> @@ -177,5 +179,5 @@ class KAddressBookView : public QWidget #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN virtual void setSelected( QString uid = QString::null, bool selected = true ) = 0; -//MOC_SKIP_END +#endif #else //KAB_EMBEDDED @@ -264,5 +266,5 @@ class KAddressBookView : public QWidget #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class ViewFactory : public KLibFactory -//MOC_SKIP_END +#endif #else //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 @@ -23,8 +23,12 @@ -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> @@ -47,3 +51,3 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, { - QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), + Q3GridLayout* layout = new Q3GridLayout( this, 1, 1, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -53,3 +57,3 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, - mBox = new QListBox( this ); + mBox = new Q3ListBox( this ); mBox->setMaximumSize(70, 70); @@ -72,9 +76,9 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, { - QHBoxLayout *layout = new QHBoxLayout( this ); + Q3HBoxLayout *layout = new Q3HBoxLayout( this ); - QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); - QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, + Q3GroupBox *group = new Q3GroupBox( 0, Qt::Vertical, title, this ); + Q3GridLayout *groupLayout = new Q3GridLayout( group->layout(), 2, 2, KDialog::spacingHint() ); - mBox = new QListBox( group ); + mBox = new Q3ListBox( group ); @@ -99,4 +103,4 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, - connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ), - SLOT( selectionChanged( QListBoxItem* ) ) ); + connect( mBox, SIGNAL( selectionChanged( Q3ListBoxItem* ) ), + SLOT( selectionChanged( Q3ListBoxItem* ) ) ); connect( mEdit, SIGNAL( textChanged( const QString& ) ), @@ -145,3 +149,3 @@ void NamePartWidget::remove() -void NamePartWidget::selectionChanged( QListBoxItem *item ) +void NamePartWidget::selectionChanged( Q3ListBoxItem *item ) { @@ -159,3 +163,3 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) { - QGridLayout *layout; + Q3GridLayout *layout; @@ -180,3 +184,3 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) { - layout = new QGridLayout( this, 4, 2, KDialog::marginHintSmall(), + layout = new Q3GridLayout( this, 4, 2, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -192,3 +196,3 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) { - layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + layout = new Q3GridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); @@ -235,4 +239,4 @@ void AddresseeWidget::saveSettings() -#ifndef KAB_EMBEDDED -#include "addresseewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_addresseewidget.cpp" #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 @@ -31,4 +31,4 @@ class KLineEdit; -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QPushButton; @@ -54,3 +54,3 @@ class NamePartWidget : public QWidget - void selectionChanged( QListBoxItem* ); + void selectionChanged( Q3ListBoxItem* ); void textChanged( const QString& ); @@ -60,3 +60,3 @@ class NamePartWidget : public QWidget - QListBox *mBox; + Q3ListBox *mBox; QPushButton *mAddButton; 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 @@ -24,2 +24,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> @@ -36,4 +39,4 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig { - QFrame *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() ); + Q3Frame *page = plainPage(); + Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHint(), spacingHint() ); @@ -56,4 +59,4 @@ void ExtensionConfigDialog::slotOk() -#ifndef KAB_EMBEDDED -#include "extensionconfigdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_extensionconfigdialog.cpp" #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 @@ -24,4 +24,4 @@ #include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> +#include <q3frame.h> +#include <q3groupbox.h> #include <qlayout.h> @@ -33,3 +33,7 @@ #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> @@ -59,3 +63,3 @@ -class ExtensionItem : public QCheckListItem +class ExtensionItem : public Q3CheckListItem { @@ -64,6 +68,6 @@ class ExtensionItem : public QCheckListItem #ifndef KAB_EMBEDDED - ExtensionItem( QListView *parent, const QString &text ); + ExtensionItem( Q3ListView *parent, const QString &text ); void setService( const KService::Ptr &ptr ); #else //KAB_EMBEDDED - ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ); + ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment ); void setFactory( ExtensionFactory* fac ); @@ -92,3 +96,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHintSmall() ); @@ -100,3 +104,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *generalPage = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), + Q3VBoxLayout *layout = new Q3VBoxLayout( generalPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -105,3 +109,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *hBox = new QWidget( generalPage, "qhbox" ); - QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); + Q3HBoxLayout *hboxLayout = new Q3HBoxLayout( hBox); KPrefsWidFont *detailsFont = @@ -119,3 +123,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *vBox = new QWidget( generalPage, "qvbox" ); - QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); + Q3VBoxLayout *boxLayout = new Q3VBoxLayout( vBox ); boxLayout->setAlignment( Qt::AlignTop ); @@ -156,3 +160,3 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QWidget *extensionPage = new QWidget( this ); - QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), + Q3VBoxLayout *extensionLayout = new Q3VBoxLayout( extensionPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -161,4 +165,4 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * - QGroupBox* groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); - boxLayout = new QVBoxLayout( groupBox->layout() ); + Q3GroupBox* groupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), extensionPage ); + boxLayout = new Q3VBoxLayout( groupBox->layout() ); boxLayout->setAlignment( Qt::AlignTop ); @@ -191,6 +195,6 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * connect( mAskForDelete, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); - connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), - SLOT( selectionChanged( QListViewItem* ) ) ); - connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( itemClicked( QListViewItem* ) ) ); + connect( mExtensionView, SIGNAL( selectionChanged( Q3ListViewItem* ) ), + SLOT( selectionChanged( Q3ListViewItem* ) ) ); + connect( mExtensionView, SIGNAL( clicked( Q3ListViewItem* ) ), + SLOT( itemClicked( Q3ListViewItem* ) ) ); connect( mConfigureButton, SIGNAL( clicked() ), @@ -297,4 +301,4 @@ void KABConfigWidget::saveExtensionSettings() - QPtrList<QListViewItem> list; - QListViewItemIterator it( mExtensionView ); + Q3PtrList<Q3ListViewItem> list; + Q3ListViewItemIterator it( mExtensionView ); while ( it.current() ) { @@ -330,3 +334,3 @@ void KABConfigWidget::configureExtension() -void KABConfigWidget::selectionChanged( QListViewItem *i ) +void KABConfigWidget::selectionChanged( Q3ListViewItem *i ) { @@ -339,3 +343,3 @@ void KABConfigWidget::selectionChanged( QListViewItem *i ) -void KABConfigWidget::itemClicked( QListViewItem *item ) +void KABConfigWidget::itemClicked( Q3ListViewItem *item ) { @@ -346,4 +350,4 @@ void KABConfigWidget::itemClicked( QListViewItem *item ) #ifndef KAB_EMBEDDED -ExtensionItem::ExtensionItem( QListView *parent, const QString &text ) - : QCheckListItem( parent, text, CheckBox ) +ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text ) + : Q3CheckListItem( parent, text, CheckBox ) { @@ -356,4 +360,4 @@ void ExtensionItem::setService( const KService::Ptr &ptr ) #else //KAB_EMBEDDED -ExtensionItem::ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ) - : QCheckListItem( parent, text, CheckBox ) +ExtensionItem::ExtensionItem( Q3ListView *parent, const QString &text, const QString &name, const QString &comment ) + : Q3CheckListItem( parent, text, CheckBox ) { @@ -420,5 +424,4 @@ QString ExtensionItem::text( int column ) const -#ifndef KAB_EMBEDDED -#include "kabconfigwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kabconfigwidget.cpp" #endif //KAB_EMBEDDED - 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 @@ -29,3 +29,3 @@ class QCheckBox; -class QListViewItem; +class Q3ListViewItem; class QPushButton; @@ -55,4 +55,4 @@ class KABConfigWidget : public KPrefsWidget void configureExtension(); - void selectionChanged( QListViewItem* ); - void itemClicked( QListViewItem* ); + void selectionChanged( Q3ListViewItem* ); + void itemClicked( Q3ListViewItem* ); 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 @@ -24,2 +24,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -50,3 +52,3 @@ KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) //abort(); - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mConfigWidget = new KABConfigWidget( (KABPrefs*)getPreferences(), this, "KABConfigWidget" ); @@ -89,4 +91,4 @@ const KAboutData* KCMKabConfig::aboutData() const -#ifndef KAB_EMBEDDED -#include "kcmkabconfig.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kcmkabconfig.cpp" #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 @@ -30,2 +30,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -38,3 +40,3 @@ #include <qmessagebox.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kurl.h> @@ -54,3 +56,3 @@ KeyWidget::KeyWidget( QWidget *parent, const char *name ) { - QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), + Q3GridLayout *layout = new Q3GridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -138,3 +140,3 @@ void KeyWidget::addKey() QFile file( tmpFile ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); @@ -154,3 +156,3 @@ void KeyWidget::addKey() QFile file( keyfile ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); @@ -165,6 +167,6 @@ void KeyWidget::addKey() - QTextStream s( &file ); + Q3TextStream s( &file ); QString data; - s.setEncoding( QTextStream::UnicodeUTF8 ); + s.setEncoding( Q3TextStream::UnicodeUTF8 ); s >> data; @@ -223,4 +225,4 @@ void KeyWidget::exportKey() KTempFile tempFile; - QTextStream *s = tempFile.textStream(); - s->setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream *s = tempFile.textStream(); + s->setEncoding( Q3TextStream::UnicodeUTF8 ); (*s) << key.textData(); @@ -237,3 +239,3 @@ void KeyWidget::exportKey() QFile file( keyfile ); - if ( !file.open( IO_ReadWrite ) ) { + if ( !file.open( QIODevice::ReadWrite ) ) { QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); @@ -244,4 +246,4 @@ void KeyWidget::exportKey() - QTextStream s( &file ); - s.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream s( &file ); + s.setEncoding( Q3TextStream::UnicodeUTF8 ); s << key.textData(); @@ -274,4 +276,4 @@ void KeyWidget::updateKeyCombo() -#ifndef KAB_EMBEDDED -#include "keywidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_keywidget.cpp" #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 @@ -7,4 +7,3 @@ #include <qwindowsstyle.h> -#include <qplatinumstyle.h> -#include <qmainwindow.h> +#include <q3mainwindow.h> #include <qmessagebox.h> @@ -26,2 +25,3 @@ int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION @@ -31,3 +31,2 @@ int main( int argc, char **argv ) QApplication a( argc, argv ); - QApplication::setStyle( new QPlatinumStyle ()); #ifdef _WIN32_ diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 199f3d6..96822d8 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -25,4 +25,4 @@ #include <qlabel.h> -#include <qlistbox.h> -#include <qlistview.h> +#include <q3listbox.h> +#include <q3listview.h> #include <qtooltip.h> @@ -31,2 +31,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -59,3 +61,3 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, QWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 5, 3 ); + Q3GridLayout *layout = new Q3GridLayout( page, 5, 3 ); layout->setSpacing( spacingHint() ); @@ -297,4 +299,4 @@ qDebug("NameEditDialog::slotHelp Help is not supported yet"); -#ifndef KAB_EMBEDDED -#include "nameeditdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_nameeditdialog.cpp" #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 @@ -318,9 +318,9 @@ void MainWindow::initActions() QPEMenuBar *menuBar1 = new QPEMenuBar( iconToolBar ); - QPopupMenu *menuBar = new QPopupMenu( this ); + Q3PopupMenu *menuBar = new Q3PopupMenu( this ); menuBar1->insertItem( "ME", menuBar); - QPopupMenu *fileMenu = new QPopupMenu( this ); - QPopupMenu *editMenu = new QPopupMenu( this ); - QPopupMenu *viewMenu = new QPopupMenu( this ); - QPopupMenu *settingsMenu = new QPopupMenu( this ); - QPopupMenu *importMenu = new QPopupMenu( this ); + Q3PopupMenu *fileMenu = new Q3PopupMenu( this ); + Q3PopupMenu *editMenu = new Q3PopupMenu( this ); + Q3PopupMenu *viewMenu = new Q3PopupMenu( this ); + Q3PopupMenu *settingsMenu = new Q3PopupMenu( this ); + Q3PopupMenu *importMenu = new Q3PopupMenu( this ); diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index df3b551..3661677 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -29,6 +29,6 @@ #include <qstring.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qbuttongroup.h> -#include <qhbox.h> +#include <q3listbox.h> +#include <q3listview.h> +#include <q3buttongroup.h> +#include <q3hbox.h> #include <qcursor.h> @@ -36,2 +36,8 @@ #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> @@ -59,3 +65,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) { - QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); + Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 ); @@ -69,4 +75,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) - sv = new QScrollView( this ); - sv->setFrameStyle ( QFrame::Plain ); + sv = new Q3ScrollView( this ); + sv->setFrameStyle ( Q3Frame::Plain ); sv->setLineWidth ( 0 ); @@ -75,4 +81,4 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) sv->addChild(mw); - sv->setResizePolicy( QScrollView::AutoOneFit ); - mainLayout = new QVBoxLayout ( mw ); + sv->setResizePolicy( Q3ScrollView::AutoOneFit ); + mainLayout = new Q3VBoxLayout ( mw ); mainLayout->setMargin( 0 ); @@ -92,3 +98,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) mTypeNumberEditList.setAutoDelete( true ); - mPopup = new QPopupMenu( this ); + mPopup = new Q3PopupMenu( this ); QStringList list = PhoneNumber::supportedTypeListNames(); @@ -228,3 +234,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) { - QGridLayout *layout = new QGridLayout( this, 4, 1 ); + Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 ); //US layout->setSpacing( KDialog::spacingHint() ); @@ -238,3 +244,3 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); //US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); @@ -329,3 +335,3 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) - QValueList<int> defaultTypes; + Q3ValueList<int> defaultTypes; defaultTypes << KABC::PhoneNumber::Home; @@ -339,3 +345,3 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) // combos. - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { @@ -489,6 +495,6 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot -class PhoneViewItem : public QListViewItem +class PhoneViewItem : public Q3ListViewItem { public: - PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ); + PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ); @@ -513,4 +519,4 @@ private: -PhoneViewItem::PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ) - : QListViewItem( parent ), mPhoneNumber( number ) +PhoneViewItem::PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ) + : Q3ListViewItem( parent ), mPhoneNumber( number ) { @@ -546,3 +552,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * - QGridLayout *layout = new QGridLayout( page, 1, 2 ); + Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 ); layout->setSpacing( spacingHint() ); @@ -554,3 +560,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * - KButtonBox *buttonBox = new KButtonBox( page, Vertical ); + KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical ); @@ -567,3 +573,3 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * connect( mListView, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged()) ); - connect( mListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); + connect( mListView, SIGNAL(doubleClicked( Q3ListViewItem *, const QPoint &, int )), this, SLOT( slotEditPhoneNumber())); @@ -590,3 +596,3 @@ void PhoneEditDialog::slotAddPhoneNumber() if ( dlg.exec() ) { - QListViewItem* i = mListView->firstChild(); + Q3ListViewItem* i = mListView->firstChild(); KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); @@ -622,3 +628,3 @@ void PhoneEditDialog::slotRemovePhoneNumber() mPhoneNumberList.remove( item->phoneNumber() ); - QListViewItem *currItem = mListView->currentItem(); + Q3ListViewItem *currItem = mListView->currentItem(); mListView->takeItem( currItem ); @@ -675,3 +681,3 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, QLabel *label = 0; - QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); + Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() ); @@ -685,3 +691,3 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, - mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); + mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page ); layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); @@ -728,4 +734,4 @@ KABC::PhoneNumber PhoneTypeDialog::phoneNumber() #endif -#ifndef KAB_EMBEDDED -#include "phoneeditwidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_phoneeditwidget.cpp" #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 @@ -29,7 +29,11 @@ #include <qlayout.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qapplication.h> +#include <QDesktopWidget> -#include <qptrlist.h> -#include <qscrollview.h> +#include <q3ptrlist.h> +#include <q3scrollview.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -38,3 +42,3 @@ -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; @@ -78,4 +82,4 @@ class PhoneEditWidget : public QWidget private: - QScrollView* sv; - QPopupMenu *mPopup; + Q3ScrollView* sv; + Q3PopupMenu *mPopup; int mPopupCount; @@ -85,4 +89,4 @@ class PhoneEditWidget : public QWidget QWidget* mw; - QVBoxLayout* mainLayout; - QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList; + Q3VBoxLayout* mainLayout; + Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList; @@ -97,3 +101,3 @@ public: { - QHBoxLayout * lay = new QHBoxLayout( this ); + Q3HBoxLayout * lay = new Q3HBoxLayout( this ); lay->setSpacing( 2 ); @@ -104,3 +108,3 @@ public: if ( QApplication::desktop()->width() <= 640 ) - mCombo->setSizeLimit ( 6 ); + mCombo->setMaxVisibleItems ( 6 ); mNumber = new KLineEdit( this ); diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp index 4a2acc8..1c237c0 100644 --- a/kaddressbook/secrecywidget.cpp +++ b/kaddressbook/secrecywidget.cpp @@ -24,2 +24,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -34,3 +36,3 @@ SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) { - QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), + Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); @@ -67,4 +69,4 @@ KABC::Secrecy SecrecyWidget::secrecy() const -#ifndef KAB_EMBEDDED -#include "secrecywidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_secrecywidget.cpp" #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 @@ -116,4 +116,4 @@ void RedoStack::redo() -#ifndef KAB_EMBEDDED -#include "undo.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_undo.cpp" #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 @@ -27,3 +27,3 @@ #include <qobject.h> -#include <qptrstack.h> +#include <q3ptrstack.h> #include <qstring.h> @@ -69,3 +69,3 @@ class StackBase : public QObject - QPtrStack<Command> mCommandStack; + Q3PtrStack<Command> mCommandStack; }; diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp index 5807dc0..e900b00 100644 --- a/kaddressbook/undocmds.cpp +++ b/kaddressbook/undocmds.cpp @@ -23,3 +23,3 @@ -#include <qtextstream.h> +#include <q3textstream.h> diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp index 5daae1a..7366a0b 100644 --- a/kaddressbook/viewconfigurefieldspage.cpp +++ b/kaddressbook/viewconfigurefieldspage.cpp @@ -38,5 +38,9 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3BoxLayout> @@ -44,10 +48,10 @@ -class FieldItem : public QListBoxText +class FieldItem : public Q3ListBoxText { public: - FieldItem( QListBox *parent, KABC::Field *field ) - : QListBoxText( parent, field->label() ), mField( field ) {} + FieldItem( Q3ListBox *parent, KABC::Field *field ) + : Q3ListBoxText( parent, field->label() ), mField( field ) {} - FieldItem( QListBox *parent, KABC::Field *field, int index ) - : QListBoxText( parent, field->label(), parent->item( index ) ), + FieldItem( Q3ListBox *parent, KABC::Field *field, int index ) + : Q3ListBoxText( parent, field->label(), parent->item( index ) ), mField( field ) {} @@ -108,3 +112,3 @@ void ViewConfigureFieldsPage::slotShowFields( int index ) for ( it = allFields.begin(); it != allFields.end(); ++it ) { - QListBoxItem *item = mSelectedBox->firstItem(); + Q3ListBoxItem *item = mSelectedBox->firstItem(); while( item ) { @@ -191,3 +195,3 @@ void ViewConfigureFieldsPage::slotMoveUp() if ( i > 0 ) { - QListBoxItem *item = mSelectedBox->item( i ); + Q3ListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); @@ -203,3 +207,3 @@ void ViewConfigureFieldsPage::slotMoveDown() if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { - QListBoxItem *item = mSelectedBox->item( i ); + Q3ListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); @@ -221,7 +225,7 @@ void ViewConfigureFieldsPage::initGUI() - QGridLayout *gl = 0; + Q3GridLayout *gl = 0; if (orientation == 0) - gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() ); + gl = new Q3GridLayout( this , 6, 4, 0, KDialog::spacingHint() ); else - gl = new QGridLayout( this , 4, 6, 0, KDialog::spacingHint() ); + gl = new Q3GridLayout( this , 4, 6, 0, KDialog::spacingHint() ); @@ -251,4 +255,4 @@ void ViewConfigureFieldsPage::initGUI() - mUnSelectedBox = new QListBox( this ); - mUnSelectedBox->setSelectionMode( QListBox::Extended ); + mUnSelectedBox = new Q3ListBox( this ); + mUnSelectedBox->setSelectionMode( Q3ListBox::Extended ); mUnSelectedBox->setMinimumHeight( 80 ); @@ -259,3 +263,3 @@ void ViewConfigureFieldsPage::initGUI() - mSelectedBox = new QListBox( this ); + mSelectedBox = new Q3ListBox( this ); //if ( QApplication::desktop()->width() < 320 ) { @@ -264,3 +268,3 @@ void ViewConfigureFieldsPage::initGUI() //} - mSelectedBox->setSelectionMode( QListBox::Extended ); + mSelectedBox->setSelectionMode( Q3ListBox::Extended ); mSelectedBox->setMinimumHeight( 80 ); @@ -272,7 +276,7 @@ void ViewConfigureFieldsPage::initGUI() - QBoxLayout *vb1 = 0; + Q3BoxLayout *vb1 = 0; if (orientation == 0) - vb1 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); + vb1 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() ); else - vb1 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() ); + vb1 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() ); @@ -303,7 +307,7 @@ void ViewConfigureFieldsPage::initGUI() - QBoxLayout *vb2 = 0; + Q3BoxLayout *vb2 = 0; if (orientation == 0) - vb2 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); + vb2 = new Q3BoxLayout( Q3BoxLayout::TopToBottom, KDialog::spacingHint() ); else - vb2 = new QBoxLayout( QBoxLayout::LeftToRight, KDialog::spacingHint() ); + vb2 = new Q3BoxLayout( Q3BoxLayout::LeftToRight, KDialog::spacingHint() ); @@ -342,3 +346,3 @@ void ViewConfigureFieldsPage::initGUI() connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); - connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); + connect( mSelectedBox, SIGNAL( currentChanged( Q3ListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); @@ -348,4 +352,4 @@ void ViewConfigureFieldsPage::initGUI() -#ifndef KAB_EMBEDDED -#include "viewconfigurefieldspage.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewconfigurefieldspage.cpp" #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 @@ -37,4 +37,4 @@ class QComboBox; -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QPushButton; @@ -70,4 +70,4 @@ class ViewConfigureFieldsPage : public QWidget #endif //KAB_EMBEDDED - QListBox *mSelectedBox; - QListBox *mUnSelectedBox; + Q3ListBox *mSelectedBox; + Q3ListBox *mUnSelectedBox; QToolButton *mAddButton; diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp index b085a5e..cdb778b 100644 --- a/kaddressbook/viewconfigurefilterpage.cpp +++ b/kaddressbook/viewconfigurefilterpage.cpp @@ -29,3 +29,3 @@ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlabel.h> @@ -33,2 +33,5 @@ #include <qradiobutton.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -46,5 +49,5 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, { - QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); - mFilterGroup = new QButtonGroup(); + mFilterGroup = new Q3ButtonGroup(); connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) ); @@ -70,3 +73,3 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, - QBoxLayout *comboLayout = new QHBoxLayout(); + Q3BoxLayout *comboLayout = new Q3HBoxLayout(); topLayout->addLayout( comboLayout ); @@ -134,4 +137,4 @@ void ViewConfigureFilterPage::buttonClicked( int id ) -#ifndef KAB_EMBEDDED -#include "viewconfigurefilterpage.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewconfigurefilterpage.cpp" #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 @@ -28,3 +28,3 @@ -class QButtonGroup; +class Q3ButtonGroup; @@ -59,3 +59,3 @@ class ViewConfigureFilterPage : public QWidget - QButtonGroup *mFilterGroup; + Q3ButtonGroup *mFilterGroup; }; diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp index 666e188..047df8c 100644 --- a/kaddressbook/viewconfigurewidget.cpp +++ b/kaddressbook/viewconfigurewidget.cpp @@ -26,3 +26,3 @@ -#include <qvbox.h> +#include <q3vbox.h> @@ -39,2 +39,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QPixmap> @@ -52,3 +55,3 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this ); @@ -59,3 +62,3 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent // Add the first page, the attributes - QVBox *page = addPage( i18n( "Fields" ), QString::null, + Q3VBox *page = addPage( i18n( "Fields" ), QString::null, KGlobal::iconLoader()->loadIcon( "view_detailed", @@ -95,3 +98,3 @@ void ViewConfigureWidget::saveSettings( KConfig *config ) -QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, +Q3VBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, const QPixmap &pixmap ) @@ -101,3 +104,3 @@ QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -154,6 +157,4 @@ void ViewConfigureDialog::slotHelp() -#ifndef KAB_EMBEDDED -#include "viewconfigurewidget.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewconfigurewidget.cpp" #endif //KAB_EMBEDDED - - diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h index 0c2b77c..e3b9b12 100644 --- a/kaddressbook/viewconfigurewidget.h +++ b/kaddressbook/viewconfigurewidget.h @@ -30,3 +30,3 @@ -class QVBox; +class Q3VBox; @@ -76,3 +76,3 @@ class ViewConfigureWidget : public ConfigureWidget */ - QVBox *addPage( const QString &item, const QString &header = QString::null, + Q3VBox *addPage( const QString &item, const QString &header = QString::null, const QPixmap &pixmap = QPixmap() ); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index b5d9419..5cfe3ad 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -52,3 +52,6 @@ $Id$ #include <qmessagebox.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QDropEvent> #include <kconfigbase.h> @@ -63,3 +66,4 @@ $Id$ #include <qapplication.h> -#include <qwidgetstack.h> +#include <QDesktopWidget> +#include <q3widgetstack.h> @@ -119,3 +123,3 @@ void ViewManager::restoreSettings() - QDictIterator<KAddressBookView> it( mViewDict ); + Q3DictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { @@ -133,3 +137,3 @@ void ViewManager::saveSettings() - QDictIterator<KAddressBookView> it( mViewDict ); + Q3DictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { @@ -163,3 +167,3 @@ QStringList ViewManager::selectedEmails() const if ( mActiveView ) - return mActiveView->selectedEmails(); + return QStringList(mActiveView->selectedEmails()); else @@ -558,3 +562,3 @@ void ViewManager::startDrag() KMultipleDrag *drag = new KMultipleDrag( this ); - drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); + drag->addDragObject( new Q3TextDrag( AddresseeUtil::addresseesToClipboard(addrList), this ) ); KABC::Addressee::List::Iterator it; @@ -661,5 +665,5 @@ void ViewManager::initActions() #ifdef KAB_EMBEDDED - QPopupMenu *viewmenu = (QPopupMenu*)mCore->getViewMenu(); - QPopupMenu *settingsmenu = (QPopupMenu*)mCore->getSettingsMenu(); - QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu(); + Q3PopupMenu *viewmenu = (Q3PopupMenu*)mCore->getViewMenu(); + Q3PopupMenu *settingsmenu = (Q3PopupMenu*)mCore->getSettingsMenu(); + Q3PopupMenu *filtermenu = (Q3PopupMenu*)mCore->getFilterMenu(); #endif //KAB_EMBEDDED @@ -740,4 +744,4 @@ void ViewManager::initGUI() { - QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 ); - mViewWidgetStack = new QWidgetStack( this ); + Q3HBoxLayout *layout = new Q3HBoxLayout( this, 0, 0 ); + mViewWidgetStack = new Q3WidgetStack( this ); layout->addWidget( mViewWidgetStack ); @@ -745,4 +749,4 @@ void ViewManager::initGUI() -#ifndef KAB_EMBEDDED -#include "viewmanager.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_viewmanager.cpp" #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 @@ -28,4 +28,6 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <QDropEvent> #include <kaddressbookview.h> -#include <qdict.h> +#include <q3dict.h> #include "filter.h" @@ -36,3 +38,3 @@ class KSelectAction; class KABCore; -class QWidgetStack; +class Q3WidgetStack; class QDropEvent; @@ -147,7 +149,7 @@ class ViewManager : public QWidget - QDict<KAddressBookView> mViewDict; - QDict<ViewFactory> mViewFactoryDict; + Q3Dict<KAddressBookView> mViewDict; + Q3Dict<ViewFactory> mViewFactoryDict; QStringList mViewNameList; - QWidgetStack *mViewWidgetStack; + Q3WidgetStack *mViewWidgetStack; KAddressBookView *mActiveView; 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 @@ -36,2 +36,10 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QEvent> +#include <QWheelEvent> @@ -73,7 +81,7 @@ class CardViewTip : public QLabel { // -class CardViewItemList : public QPtrList<CardViewItem> +class CardViewItemList : public Q3PtrList<CardViewItem> { protected: - virtual int compareItems(QPtrCollection::Item item1, - QPtrCollection::Item item2) + virtual int compareItems(Q3PtrCollection::Item item1, + Q3PtrCollection::Item item2) { @@ -163,3 +171,3 @@ class CardViewPrivate CardViewItemList mItemList; - QPtrList<CardViewSeparator> mSeparatorList; + Q3PtrList<CardViewSeparator> mSeparatorList; QFontMetrics *mFm; @@ -210,3 +218,3 @@ class CardViewItemPrivate QString mCaption; - QPtrList< CardViewItem::Field > mFieldList; + Q3PtrList< CardViewItem::Field > mFieldList; bool mSelected; @@ -315,3 +323,3 @@ void CardViewItem::paintCard(QPainter *p, QColorGroup &cg) // Go through the fields and draw them - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); QString label, value; @@ -410,3 +418,3 @@ int CardViewItem::height( bool allowCache ) const int maxLines( mView->maxFieldLines() ); - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) @@ -415,3 +423,3 @@ int CardViewItem::height( bool allowCache ) const continue; - lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines ); + lines = QMIN( (*iter)->second.count('\n') + 1, maxLines ); fieldHeight += ( lines * fh ) + 2;//sp; @@ -452,3 +460,3 @@ void CardViewItem::removeField(const QString &label) - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) @@ -525,3 +533,3 @@ QString CardViewItem::fieldValue(const QString &label) { - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) @@ -571,3 +579,3 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) if ( se || ! _f->second.isEmpty() ) - y += ( QMIN(_f->second.contains('\n')+1, maxLines) * fh ) + 2; + y += ( QMIN(_f->second.count('\n')+1, maxLines) * fh ) + 2; // } @@ -588,3 +596,3 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); - trimmed = r.width() > mw || r.height()/fh > QMIN(s.contains('\n') + 1, maxLines); + trimmed = r.width() > mw || r.height()/fh > QMIN(s.count('\n') + 1, maxLines); } @@ -628,3 +636,3 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const if ( showEmpty || !f->second.isEmpty() ) - ypos += ( QMIN( f->second.contains('\n')+1, maxLines ) *fh)+2; + ypos += ( QMIN( f->second.count('\n')+1, maxLines ) *fh)+2; if ( iy <= ypos ) @@ -639,3 +647,3 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const CardView::CardView(QWidget *parent, const char *name) - : QScrollView(parent, name), + : Q3ScrollView(parent, name), d(new CardViewPrivate()) @@ -658,4 +666,4 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setFocusProxy(this); - viewport()->setFocusPolicy(WheelFocus); - viewport()->setBackgroundMode(PaletteBase); + viewport()->setFocusPolicy(Qt::WheelFocus); + viewport()->setBackgroundMode(Qt::PaletteBase); @@ -664,3 +672,3 @@ CardView::CardView(QWidget *parent, const char *name) //US setBackgroundMode(PaletteBackground, PaletteBase); - setBackgroundMode(PaletteBackground); + setBackgroundMode(Qt::PaletteBackground); @@ -741,3 +749,3 @@ CardViewItem *CardView::itemAt(const QPoint &viewPos) CardViewItem *item = 0; - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); bool found = false; @@ -789,3 +797,3 @@ void CardView::selectAll(bool state) { - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); if (!state) @@ -880,3 +888,3 @@ CardViewItem *CardView::selectedItem() const // find the first selected item - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); for (iter.toFirst(); iter.current(); ++iter) @@ -957,3 +965,3 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, // Now tell the cards to draw, if they are in the clip region - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); for (iter.toFirst(); iter.current(); ++iter) @@ -977,3 +985,3 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, // Followed by the separators if they are in the clip region - QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); + Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); for (sepIter.toFirst(); sepIter.current(); ++sepIter) @@ -995,3 +1003,3 @@ void CardView::resizeEvent(QResizeEvent *e) { - QScrollView::resizeEvent(e); + Q3ScrollView::resizeEvent(e); @@ -1015,3 +1023,3 @@ void CardView::calcLayout() - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); CardViewItem *item = 0; @@ -1058,3 +1066,3 @@ void CardView::calcLayout() // max height of a column - QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); + Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); for (sepIter.toFirst(); sepIter.current(); ++sepIter) @@ -1103,3 +1111,3 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) { - QScrollView::contentsMousePressEvent(e); + Q3ScrollView::contentsMousePressEvent(e); @@ -1173,3 +1181,3 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) - if ( s && ! (e->state() & ControlButton) ) + if ( s && ! (e->state() & Qt::ControlButton) ) { @@ -1221,3 +1229,3 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e) { - QScrollView::contentsMouseReleaseEvent(e); + Q3ScrollView::contentsMouseReleaseEvent(e); @@ -1259,3 +1267,3 @@ void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) { - QScrollView::contentsMouseDoubleClickEvent(e); + Q3ScrollView::contentsMouseDoubleClickEvent(e); @@ -1304,3 +1312,3 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) { - setCursor( SplitVCursor ); // Why does this fail sometimes? + setCursor( Qt::SplitVCursor ); // Why does this fail sometimes? d->mOnSeparator = true; @@ -1309,3 +1317,3 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) { - setCursor( ArrowCursor ); + setCursor( Qt::ArrowCursor ); d->mOnSeparator = false; @@ -1326,3 +1334,3 @@ void CardView::leaveEvent( QEvent * ) d->mOnSeparator = false; - setCursor( ArrowCursor ); + setCursor( Qt::ArrowCursor ); } @@ -1370,3 +1378,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) { - case Key_Up: + case Qt::Key_Up: if ( pos > 0 ) @@ -1377,3 +1385,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Down: + case Qt::Key_Down: if ( pos < d->mItemList.count() - 1 ) @@ -1384,3 +1392,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Left: + case Qt::Key_Left: { @@ -1402,3 +1410,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Right: + case Qt::Key_Right: { @@ -1417,3 +1425,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Home: + case Qt::Key_Home: aItem = d->mItemList.first(); @@ -1421,3 +1429,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_End: + case Qt::Key_End: aItem = d->mItemList.last(); @@ -1425,3 +1433,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Prior: // PageUp + case Qt::Key_Prior: // PageUp { @@ -1438,3 +1446,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Next: // PageDown + case Qt::Key_Next: // PageDown { @@ -1460,3 +1468,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Space: + case Qt::Key_Space: setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); @@ -1464,4 +1472,4 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { @@ -1472,3 +1480,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) default: - if ( (e->state() & ControlButton) && e->key() == Key_A ) + if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A ) { @@ -1490,3 +1498,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) { - if ( (e->state() & ShiftButton) ) + if ( (e->state() & Qt::ShiftButton) ) { @@ -1521,3 +1529,3 @@ void CardView::keyPressEvent( QKeyEvent *e ) } - else if ( (e->state() & ControlButton) ) + else if ( (e->state() & Qt::ControlButton) ) { @@ -1640,5 +1648,5 @@ void CardView::drawRubberBands( int pos ) QPainter p( viewport() ); - p.setRasterOp( XorROP ); - p.setPen( gray ); - p.setBrush( gray ); + p.setCompositionMode( QPainter::CompositionMode_Xor ); + p.setPen( Qt::gray ); + p.setBrush( Qt::gray ); uint n = d->first; @@ -1701,3 +1709,3 @@ void CardView::setFont( const QFont &fnt ) { - QScrollView::setFont( fnt ); + Q3ScrollView::setFont( fnt ); delete d->mFm; @@ -1738,3 +1746,3 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) } - QScrollView::keyReleaseEvent ( e ); + Q3ScrollView::keyReleaseEvent ( e ); } @@ -1747,4 +1755,4 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) -#ifndef KAB_EMBEDDED -#include "cardview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_cardview.cpp" #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 @@ -3,4 +3,4 @@ -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> #include <qstring.h> @@ -9,2 +9,10 @@ #include <qpoint.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QLabel> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> @@ -150,3 +158,3 @@ class CardViewItem */ -class CardView : public QScrollView +class CardView : public Q3ScrollView { 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 @@ -21,2 +21,7 @@ #include <qpainter.h> +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> +#include <QDragMoveEvent> +#include <QDragLeaveEvent> @@ -33,3 +38,3 @@ -ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) +ColorListBox::ColorListBox( QWidget *parent, const char *name, Qt::WFlags f ) :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) @@ -37,3 +42,3 @@ ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); - connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) ); + connect( this, SIGNAL(clicked(Q3ListBoxItem *)), this, SLOT(slotNewColor(Q3ListBoxItem *)) ); setAcceptDrops( true); @@ -49,3 +54,3 @@ void ColorListBox::setEnabled( bool state ) - QListBox::setEnabled( state ); + Q3ListBox::setEnabled( state ); for( uint i=0; i<count(); i++ ) @@ -77,6 +82,6 @@ QColor ColorListBox::color( uint index ) const { - return( black ); + return( Qt::black ); } } -void ColorListBox::slotNewColor(QListBoxItem * i) +void ColorListBox::slotNewColor(Q3ListBoxItem * i) { @@ -200,3 +205,3 @@ qDebug("ColorListBox::dropEvent drag&drop currently not supported"); ColorListItem::ColorListItem( const QString &text, const QColor &color ) - : QListBoxItem(), mColor( color ), mBoxWidth( 30 ) + : Q3ListBoxItem(), mColor( color ), mBoxWidth( 30 ) { @@ -231,3 +236,3 @@ void ColorListItem::paint( QPainter *p ) -int ColorListItem::height(const QListBox *lb ) const +int ColorListItem::height(const Q3ListBox *lb ) const { @@ -237,3 +242,3 @@ int ColorListItem::height(const QListBox *lb ) const -int ColorListItem::width(const QListBox *lb ) const +int ColorListItem::width(const Q3ListBox *lb ) const { @@ -242,4 +247,4 @@ int ColorListItem::width(const QListBox *lb ) const -#ifndef KAB_EMBEDDED -#include "colorlistbox.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_colorlistbox.cpp" #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 @@ -24,2 +24,7 @@ #include <klistbox.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDragLeaveEvent> +#include <QDropEvent> +#include <QDragEnterEvent> @@ -35,3 +40,3 @@ class ColorListBox : public KListBox public: - ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); + ColorListBox( QWidget *parent=0, const char * name=0, Qt::WFlags f=0 ); void setColor( uint index, const QColor &color ); @@ -50,3 +55,3 @@ class ColorListBox : public KListBox void newColor( int index ); - void slotNewColor(QListBoxItem * i); + void slotNewColor(Q3ListBoxItem * i); @@ -58,3 +63,3 @@ class ColorListBox : public KListBox -class ColorListItem : public QListBoxItem +class ColorListItem : public Q3ListBoxItem { @@ -67,4 +72,4 @@ class ColorListItem : public QListBoxItem virtual void paint( QPainter * ); - virtual int height( const QListBox * ) const; - virtual int width( const QListBox * ) const; + virtual int height( const Q3ListBox * ) const; + virtual int width( const Q3ListBox * ) const; 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 @@ -27,7 +27,10 @@ #include <qcheckbox.h> -#include <qvbox.h> -#include <qgroupbox.h> +#include <q3vbox.h> +#include <q3groupbox.h> #include <qspinbox.h> #include <qtabwidget.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> @@ -91,3 +94,3 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config ) CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) - : QVBox( parent, name ) + : Q3VBox( parent, name ) { @@ -236,3 +239,3 @@ void CardViewLookNFeelPage::initGUI() // Layout - QVBox *loTab = new QVBox( this, "layouttab" ); + Q3VBox *loTab = new Q3VBox( this, "layouttab" ); @@ -241,3 +244,3 @@ void CardViewLookNFeelPage::initGUI() - QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); + Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); @@ -245,3 +248,3 @@ void CardViewLookNFeelPage::initGUI() - QHBox *hbSW = new QHBox( gbGeneral ); + Q3HBox *hbSW = new Q3HBox( gbGeneral ); QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); @@ -250,3 +253,3 @@ void CardViewLookNFeelPage::initGUI() - QHBox *hbPadding = new QHBox( gbGeneral ); + Q3HBox *hbPadding = new Q3HBox( gbGeneral ); QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); @@ -255,5 +258,5 @@ void CardViewLookNFeelPage::initGUI() - QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); + Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); - QHBox *hbMargin = new QHBox( gbCards ); + Q3HBox *hbMargin = new Q3HBox( gbCards ); QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); @@ -266,3 +269,3 @@ void CardViewLookNFeelPage::initGUI() - QWhatsThis::add( sbMargin, i18n( + Q3WhatsThis::add( sbMargin, i18n( "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " @@ -270,4 +273,4 @@ void CardViewLookNFeelPage::initGUI() ) ); - QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); - QWhatsThis::add( sbSpacing, i18n( + /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */ + Q3WhatsThis::add( sbSpacing, i18n( "The Item Spacing decides the distance (in pixels) between the items and anything else: the view " @@ -275,5 +278,5 @@ void CardViewLookNFeelPage::initGUI() ) ); - QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); - QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); - QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); + /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */ + Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); + /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */ @@ -282,3 +285,3 @@ void CardViewLookNFeelPage::initGUI() // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + Q3VBox *colorTab = new Q3VBox( this, "colortab" ); colorTab->setSpacing( spacing ); @@ -290,3 +293,3 @@ void CardViewLookNFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomColors, i18n( + Q3WhatsThis::add( cbEnableCustomColors, i18n( "If custom colors are enabled, you may choose the colors for the view below. " @@ -294,3 +297,3 @@ void CardViewLookNFeelPage::initGUI() ) ); - QWhatsThis::add( lbColors, i18n( + Q3WhatsThis::add( lbColors, i18n( "Double click or press RETURN on a item to select a color for the related strings in the view." @@ -299,3 +302,3 @@ void CardViewLookNFeelPage::initGUI() // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); @@ -308,3 +311,3 @@ void CardViewLookNFeelPage::initGUI() vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); @@ -314,3 +317,3 @@ void CardViewLookNFeelPage::initGUI() lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -327,3 +330,3 @@ void CardViewLookNFeelPage::initGUI() lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -338,3 +341,3 @@ void CardViewLookNFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomFonts, i18n( + Q3WhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " @@ -347,3 +350,3 @@ void CardViewLookNFeelPage::initGUI() // Behaviour - QVBox *behaviourTab = new QVBox( this ); + Q3VBox *behaviourTab = new Q3VBox( this ); behaviourTab->setMargin( margin ); @@ -366,4 +369,4 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l ) -#ifndef KAB_EMBEDDED -#include "configurecardviewdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_configurecardviewdialog.cpp" #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 @@ -28,5 +28,7 @@ -#include <qvbox.h> +#include <q3vbox.h> #include <qwidget.h> #include <qfont.h> +//Added by qt3to4: +#include <QLabel> @@ -79,3 +81,3 @@ class ConfigureCardViewWidget : public ViewConfigureWidget -class CardViewLookNFeelPage : public QVBox { +class CardViewLookNFeelPage : public Q3VBox { 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 @@ -29,7 +29,10 @@ #include <qcheckbox.h> -#include <qvbox.h> -#include <qbuttongroup.h> +#include <q3vbox.h> +#include <q3buttongroup.h> #include <qtabwidget.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> @@ -86,3 +89,3 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config ) LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) - : QVBox(parent, name) + : Q3VBox(parent, name) { @@ -231,3 +234,3 @@ void LookAndFeelPage::initGUI() // General - QVBox *generalTab = new QVBox( this, "generaltab" ); + Q3VBox *generalTab = new Q3VBox( this, "generaltab" ); @@ -236,3 +239,3 @@ void LookAndFeelPage::initGUI() - QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, + Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Row Separator"), generalTab); @@ -264,3 +267,3 @@ void LookAndFeelPage::initGUI() // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + Q3VBox *colorTab = new Q3VBox( this, "colortab" ); colorTab->setSpacing( spacing ); @@ -272,3 +275,3 @@ void LookAndFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomColors, i18n( + Q3WhatsThis::add( cbEnableCustomColors, i18n( "If custom colors are enabled, you may choose the colors for the view below. " @@ -276,3 +279,3 @@ void LookAndFeelPage::initGUI() ) ); - QWhatsThis::add( lbColors, i18n( + Q3WhatsThis::add( lbColors, i18n( "Double click or press RETURN on a item to select a color for the related strings in the view." @@ -281,3 +284,3 @@ void LookAndFeelPage::initGUI() // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); @@ -290,3 +293,3 @@ void LookAndFeelPage::initGUI() vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); @@ -296,3 +299,3 @@ void LookAndFeelPage::initGUI() lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -309,3 +312,3 @@ void LookAndFeelPage::initGUI() lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED @@ -320,3 +323,3 @@ void LookAndFeelPage::initGUI() - QWhatsThis::add( cbEnableCustomFonts, i18n( + Q3WhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " @@ -342,4 +345,4 @@ void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l ) -#ifndef KAB_EMBEDDED -#include "configuretableviewdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_configuretableviewdialog.cpp" #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 @@ -28,3 +28,5 @@ -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <QLabel> @@ -65,3 +67,3 @@ class ConfigureTableViewWidget : public ViewConfigureWidget */ -class LookAndFeelPage : public QVBox +class LookAndFeelPage : public Q3VBox { 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 @@ -23,6 +23,6 @@ -#include <qheader.h> -#include <qiconset.h> +#include <q3header.h> +#include <qicon.h> #include <qimage.h> -#include <qdragobject.h> +#include <q3dragobject.h> #include <qcombobox.h> @@ -32,2 +32,7 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QPixmap> +#include <QMouseEvent> +#include <QKeyEvent> @@ -49,3 +54,3 @@ DynamicTip::DynamicTip( ContactListView *parent) - : QToolTip( parent ) + /* TODO:hacker:: QToolTip( parent ) */ { @@ -55,2 +60,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) { + /* TODO:hacker: static bool ishidden = true; @@ -65,3 +71,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) - QListViewItem *lvi = plv->itemAt( pos - posVp ); + Q3ListViewItem *lvi = plv->itemAt( pos - posVp ); if (!lvi) @@ -153,3 +159,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) ishidden = !ishidden; - + */ } @@ -175,3 +181,3 @@ QString ContactListViewItem::key(int column, bool ascending) const if ( lan == 1 ) { //GERMAN - QString ret = QListViewItem::key(column, ascending).lower().utf8(); + QString ret = Q3ListViewItem::key(column, ascending).lower().utf8(); int start = -1; @@ -199,3 +205,3 @@ QString ContactListViewItem::key(int column, bool ascending) const #endif - return QListViewItem::key(column, ascending).lower(); + return Q3ListViewItem::key(column, ascending).lower(); } @@ -290,3 +296,3 @@ void ContactListView::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -345,3 +351,3 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) { - if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { + if ((e->state() & Qt::LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { emit startAddresseeDrag(); @@ -355,3 +361,3 @@ bool ContactListView::acceptDrag(QDropEvent *e) const #ifndef KAB_EMBEDDED - return QTextDrag::canDecode(e); + return Q3TextDrag::canDecode(e); #else //KAB_EMBEDDED @@ -426,4 +432,4 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e ) } -#ifndef KAB_EMBEDDED -#include "contactlistview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_contactlistview.cpp" #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 @@ -7,2 +7,6 @@ #include <qstring.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QMouseEvent> +#include <QKeyEvent> @@ -22,3 +26,3 @@ class ContactListView; */ -class DynamicTip : public QToolTip +class DynamicTip /* TODO:hacker: : public QToolTip */ { 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 @@ -23,5 +23,5 @@ -#include <qdragobject.h> +#include <q3dragobject.h> #include <qevent.h> -#include <qiconview.h> +#include <q3iconview.h> #include <qlayout.h> @@ -30,2 +30,7 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QKeyEvent> +#include <Q3VBoxLayout> +#include <QDragEnterEvent> @@ -127,3 +132,3 @@ void AddresseeCardView::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -150,3 +155,3 @@ void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) #ifndef KAB_EMBEDDED - if (QTextDrag::canDecode(e)) + if (Q3TextDrag::canDecode(e)) e->accept(); @@ -178,3 +183,3 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab, // Init the GUI - QVBoxLayout *layout = new QVBoxLayout(viewWidget()); + Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); @@ -522,4 +527,4 @@ void KAddressBookCardView::addresseeSelected() } -#ifndef KAB_EMBEDDED -#include "kaddressbookcardview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookcardview.cpp" #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 @@ -27,2 +27,5 @@ #include <qstring.h> +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> #ifndef 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 @@ -24,3 +24,3 @@ #ifndef KAB_EMBEDDED -#include <qiconview.h> +#include <q3iconview.h> #include <qstringlist.h> @@ -37,2 +37,10 @@ +//Added by qt3to4: +#include <QDropEvent> +#include <Q3ValueList> +#include <QPixmap> +#include <QKeyEvent> +#include <QEvent> +#include <Q3VBoxLayout> + #include <kabc/addressbook.h> @@ -75,3 +83,3 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) - : QIconView(parent, name) + : Q3IconView(parent, name) #endif //KAB_EMBEDDED @@ -79,4 +87,4 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) { - setSelectionMode( QIconView::Extended ); - setResizeMode( QIconView::Adjust ); + setSelectionMode( Q3IconView::Extended ); + setResizeMode( Q3IconView::Adjust ); setWordWrapIconText( true ); @@ -91,4 +99,4 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) - connect(this, SIGNAL(dropped(QDropEvent*, const QValueList<QIconDragItem>&)), - this, SLOT(itemDropped(QDropEvent*, const QValueList<QIconDragItem>&))); + connect(this, SIGNAL(dropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&)), + this, SLOT(itemDropped(QDropEvent*, const Q3ValueList<Q3IconDragItem>&))); #endif //KAB_EMBEDDED @@ -102,3 +110,3 @@ AddresseeIconView::~AddresseeIconView() void AddresseeIconView::itemDropped(QDropEvent *e, - const QValueList<QIconDragItem> &) + const Q3ValueList<Q3IconDragItem> &) { @@ -107,3 +115,3 @@ void AddresseeIconView::itemDropped(QDropEvent *e, -QDragObject *AddresseeIconView::dragObject() +Q3DragObject *AddresseeIconView::dragObject() { @@ -119,3 +127,3 @@ class AddresseeIconViewItem : public KIconViewItem #else //KAB_EMBEDDED -class AddresseeIconViewItem : public QIconViewItem +class AddresseeIconViewItem : public Q3IconViewItem #endif //KAB_EMBEDDED @@ -126,3 +134,3 @@ class AddresseeIconViewItem : public QIconViewItem KABC::AddressBook *doc, const KABC::Addressee &a, - QIconView *parent) + Q3IconView *parent) : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) @@ -131,4 +139,4 @@ class AddresseeIconViewItem : public QIconViewItem KABC::AddressBook *doc, const KABC::Addressee &a, - QIconView *parent) - : QIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) + Q3IconView *parent) + : Q3IconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) #endif //KAB_EMBEDDED @@ -202,3 +210,3 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, // Init the GUI - QVBoxLayout *layout = new QVBoxLayout(viewWidget()); + Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); @@ -212,4 +220,4 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, //US this, SLOT(addresseeExecuted(QIconViewItem *))); - connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); @@ -250,4 +258,4 @@ void KAddressBookIconView::readConfig(KConfig *config) //US this, SLOT(addresseeExecuted(QIconViewItem *))); - disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); @@ -262,4 +270,4 @@ void KAddressBookIconView::readConfig(KConfig *config) */ - connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); @@ -338,3 +346,3 @@ QStringList KAddressBookIconView::selectedUids() QStringList uidList; - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -360,3 +368,3 @@ void KAddressBookIconView::refresh(QString uid) { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -408,3 +416,3 @@ void KAddressBookIconView::setSelected(QString uid, bool selected) { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -437,3 +445,3 @@ void KAddressBookIconView::setSelected(QString uid, bool selected) -void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) +void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item) { @@ -452,3 +460,3 @@ void KAddressBookIconView::addresseeSelected() { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -478,4 +486,4 @@ void KAddressBookIconView::addresseeSelected() -#ifndef KAB_EMBEDDED -#include "kaddressbookiconview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookiconview.cpp" #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 @@ -27,2 +27,5 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <QDropEvent> #ifndef KAB_EMBEDDED @@ -30,4 +33,4 @@ #else //KAB_EMBEDDED -#include <qiconview.h> -#include <qptrlist.h> +#include <q3iconview.h> +#include <q3ptrlist.h> #include <klocale.h> @@ -36,3 +39,3 @@ -class QIconViewItem; +class Q3IconViewItem; class KConfig; @@ -40,3 +43,3 @@ class AddresseeIconView; class AddresseeIconViewItem; -class QIconDragItem; +class Q3IconDragItem; class KAddressBookIconView; @@ -70,5 +73,5 @@ class KAddressBookIconView : public KAddressBookView #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN void setSelected(QString uid = QString::null, bool selected = true); -//MOC_SKIP_END +#endif #else //KAB_EMBEDDED @@ -79,3 +82,3 @@ class KAddressBookIconView : public KAddressBookView protected slots: - void addresseeExecuted(QIconViewItem *item); + void addresseeExecuted(Q3IconViewItem *item); void addresseeSelected(); @@ -84,3 +87,3 @@ class KAddressBookIconView : public KAddressBookView AddresseeIconView *mIconView; - QPtrList<AddresseeIconViewItem> mIconList; + Q3PtrList<AddresseeIconViewItem> mIconList; }; @@ -89,7 +92,7 @@ class KAddressBookIconView : public KAddressBookView #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class AddresseeIconView : public KIconView -//MOC_SKIP_END +#endif #else //KAB_EMBEDDED -class AddresseeIconView : public QIconView +class AddresseeIconView : public Q3IconView #endif //KAB_EMBEDDED @@ -107,6 +110,6 @@ class AddresseeIconView : public QIconView protected: - virtual QDragObject *dragObject(); + virtual Q3DragObject *dragObject(); protected slots: - void itemDropped(QDropEvent *, const QValueList<QIconDragItem> &); + void itemDropped(QDropEvent *, const Q3ValueList<Q3IconDragItem> &); }; 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 @@ -2,4 +2,4 @@ -#include <qvbox.h> -#include <qlistbox.h> +#include <q3vbox.h> +#include <q3listbox.h> #include <qwidget.h> @@ -9,6 +9,10 @@ #include <qapplication.h> -#include <qdragobject.h> +#include <q3dragobject.h> #include <qevent.h> -#include <qurl.h> +#include <q3url.h> #include <qpixmap.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QKeyEvent> +#include <Q3VBoxLayout> @@ -34,3 +38,3 @@ #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qregexp.h> @@ -44,3 +48,3 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, { - mainLayout = new QVBoxLayout( viewWidget(), 2 ); + mainLayout = new Q3VBoxLayout( viewWidget(), 2 ); @@ -79,10 +83,10 @@ void KAddressBookTableView::reconstructListView() this, SLOT(addresseeSelected())); - disconnect(mListView, SIGNAL(executed(QListViewItem*)), - this, SLOT(addresseeExecuted(QListViewItem*))); - disconnect(mListView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(addresseeExecuted(QListViewItem*))); + disconnect(mListView, SIGNAL(executed(Q3ListViewItem*)), + this, SLOT(addresseeExecuted(Q3ListViewItem*))); + disconnect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)), + this, SLOT(addresseeExecuted(Q3ListViewItem*))); disconnect(mListView, SIGNAL(startAddresseeDrag()), this, SIGNAL(startDrag())); - disconnect(mListView, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(addresseeExecuted(QListViewItem*))); + disconnect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)), + this, SLOT(addresseeExecuted(Q3ListViewItem*))); @@ -107,3 +111,3 @@ void KAddressBookTableView::reconstructListView() mListView->addColumn( (*it)->label() ); - mListView->setColumnWidthMode(c++, QListView::Manual); + mListView->setColumnWidthMode(c++, Q3ListView::Manual); //US @@ -121,11 +125,11 @@ void KAddressBookTableView::reconstructListView() // qDebug("KAddressBookTableView::reconstructListView single"); - connect(mListView, SIGNAL(executed(QListViewItem*)), - this, SLOT(addresseeExecuted(QListViewItem*))); + connect(mListView, SIGNAL(executed(Q3ListViewItem*)), + this, SLOT(addresseeExecuted(Q3ListViewItem*))); } else { // qDebug("KAddressBookTableView::reconstructListView double"); - connect(mListView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(addresseeExecuted(QListViewItem*))); + connect(mListView, SIGNAL(doubleClicked(Q3ListViewItem*)), + this, SLOT(addresseeExecuted(Q3ListViewItem*))); } - connect(mListView, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(addresseeExecuted(QListViewItem*))); + connect(mListView, SIGNAL(returnPressed(Q3ListViewItem*)), + this, SLOT(addresseeExecuted(Q3ListViewItem*))); connect(mListView, SIGNAL(signalDelete()), @@ -346,3 +350,3 @@ void KAddressBookTableView::refresh(QString uid) ContactListViewItem *ceItem; - QListViewItemIterator it( mListView ); + Q3ListViewItemIterator it( mListView ); while ( it.current() ) { @@ -368,3 +372,3 @@ QStringList KAddressBookTableView::selectedUids() QStringList uidList; - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; @@ -396,3 +400,3 @@ void KAddressBookTableView::setSelected(QString uid, bool selected) { - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; @@ -431,3 +435,3 @@ void KAddressBookTableView::addresseeSelected() // selected last. - QListViewItem *item; + Q3ListViewItem *item; bool found =false; @@ -455,3 +459,3 @@ void KAddressBookTableView::addresseeSelected() -void KAddressBookTableView::addresseeExecuted(QListViewItem *item) +void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item) { @@ -489,4 +493,4 @@ void KAddressBookTableView::addresseeDeleted() -#ifndef KAB_EMBEDDED -#include "kaddressbooktableview.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbooktableview.cpp" #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 @@ -12,8 +12,8 @@ #include <qwidget.h> -#include <qlistview.h> +#include <q3listview.h> #include <qstring.h> #include <qdialog.h> -#include <qtabdialog.h> +#include <q3tabdialog.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -27,6 +27,8 @@ #include "kaddressbookview.h" +//Added by qt3to4: +#include <Q3VBoxLayout> -class QListViewItem; -class QListBox; -class QVBoxLayout; +class Q3ListViewItem; +class Q3ListBox; +class Q3VBoxLayout; class KConfig; @@ -81,6 +83,6 @@ friend class ContactListView; */ - void addresseeExecuted(QListViewItem*); + void addresseeExecuted(Q3ListViewItem*); private: - QVBoxLayout *mainLayout; + Q3VBoxLayout *mainLayout; ContactListView *mListView; 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 @@ -32,3 +32,3 @@ $Id$ #include <qregexp.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -106,3 +106,3 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& QFile file( url.path() ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); @@ -126,3 +126,3 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& QFile file( fileName ); - if ( !file.open( IO_WriteOnly ) ) { + if ( !file.open( QIODevice::WriteOnly ) ) { QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); @@ -153,3 +153,3 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) { - QTextStream t( fp ); + Q3TextStream t( fp ); t.setCodec( QTextCodec::codecForName("utf8") ); @@ -189,6 +189,4 @@ void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) -#ifndef KAB_EMBEDDED -#include "csv_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_csv_xxport.cpp" #endif //KAB_EMBEDDED - - 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 @@ -29,3 +29,3 @@ $Id$ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> @@ -41,6 +41,10 @@ $Id$ #include <qradiobutton.h> -#include <qtable.h> +#include <q3table.h> #include <qlayout.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3ValueList> +#include <Q3GridLayout> @@ -58,3 +62,3 @@ $Id$ #ifdef DESKTOP_VERSION -#include "qtable.h" +#include "q3table.h" #else @@ -163,3 +167,3 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, // if ( QApplication::desktop()->width() < 321 ) - QIconSet icon = SmallIcon("filesave"); + QIcon icon = SmallIcon("filesave"); @@ -188,3 +192,3 @@ KABC::AddresseeList CSVImportDialog::contacts() const - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) ); @@ -231,3 +235,3 @@ KABC::AddresseeList CSVImportDialog::contacts() const QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate - a.setBirthday(dt); + a.setBirthday(QDateTime(dt)); } @@ -384,5 +388,5 @@ void CSVImportDialog::initGUI() - QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(), + Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHintSmall(), spacingHintSmall() ); - QHBoxLayout *hbox = new QHBoxLayout(); + Q3HBoxLayout *hbox = new Q3HBoxLayout(); hbox->setSpacing( spacingHint() ); @@ -399,3 +403,3 @@ void CSVImportDialog::initGUI() // Delimiter: comma, semicolon, tab, space, other - mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), page ); + mDelimiterBox = new Q3ButtonGroup( i18n( "Delimiter" ), page ); mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); @@ -403,3 +407,3 @@ void CSVImportDialog::initGUI() mDelimiterBox->layout()->setMargin( marginHint() ); - QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); + Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() ); delimiterLayout->setAlignment( Qt::AlignTop ); @@ -452,4 +456,4 @@ void CSVImportDialog::initGUI() - mTable = new QTable( 0, 0, page ); - mTable->setSelectionMode( QTable::NoSelection ); + mTable = new Q3Table( 0, 0, page ); + mTable->setSelectionMode( Q3Table::NoSelection ); //mTable->horizontalHeader()->hide(); @@ -485,3 +489,3 @@ void CSVImportDialog::fillTable() // store previous assignment - QValueList<int> mTypeOld = mTypeStore; + Q3ValueList<int> mTypeOld = mTypeStore; @@ -489,3 +493,3 @@ void CSVImportDialog::fillTable() for ( column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, column ) ); + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -508,10 +512,10 @@ void CSVImportDialog::fillTable() - QTextStream inputStream( mData, IO_ReadOnly ); + Q3TextStream inputStream( mData, QIODevice::ReadOnly ); if ( mComboCodec->currentItem () == 0 ) { - inputStream.setEncoding( QTextStream::UnicodeUTF8 ); + inputStream.setEncoding( Q3TextStream::UnicodeUTF8 ); } else if ( mComboCodec->currentItem () == 1 ) { - inputStream.setEncoding( QTextStream::Latin1 ); + inputStream.setEncoding( Q3TextStream::Latin1 ); } else { - inputStream.setEncoding( QTextStream::Locale ); + inputStream.setEncoding( Q3TextStream::Locale ); } @@ -528,3 +532,3 @@ void CSVImportDialog::fillTable() state = S_QUOTED_FIELD; - } else if ( x == mDelimiter ) { + } else if ( QString(x) == mDelimiter ) { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) @@ -563,3 +567,3 @@ void CSVImportDialog::fillTable() state = S_QUOTED_FIELD; - } else if ( x == mDelimiter || x == '\n' ) { + } else if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); @@ -580,3 +584,3 @@ void CSVImportDialog::fillTable() case S_END_OF_QUOTED_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); @@ -603,3 +607,3 @@ void CSVImportDialog::fillTable() case S_NORMAL_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); @@ -619,3 +623,3 @@ void CSVImportDialog::fillTable() } - if ( x != mDelimiter ) + if ( QString(x) != mDelimiter ) lastCharDelimiter = false; @@ -651,3 +655,3 @@ void CSVImportDialog::fillTable() //US QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); - QComboTableItem *item = new QComboTableItem( mTable, keys ); + Q3ComboTableItem *item = new Q3ComboTableItem( mTable, keys ); mTable->setItem( 0, column, item ); @@ -766,3 +770,3 @@ void CSVImportDialog::slotOk() for ( int column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -838,3 +842,3 @@ void CSVImportDialog::applyTemplate() int type = columnMap[ column ]; - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -880,3 +884,3 @@ void CSVImportDialog::saveTemplate() for ( uint column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); @@ -936,3 +940,3 @@ void CSVImportDialog::setFile( const QString &fileName ) QFile file( fileName ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { KMessageBox::sorry( this, i18n( "Cannot open input file!" ) ); @@ -966,4 +970,4 @@ void CSVImportDialog::urlChanged( const QString &file ) -#ifndef KAB_EMBEDDED -#include <csvimportdialog.moc> +#ifndef KAB_EMBEDDED_ +#include <moc_csvimportdialog.cpp> #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 @@ -35,3 +35,3 @@ $Id$ -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -39,3 +39,3 @@ class KURLRequester; -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; @@ -45,3 +45,3 @@ class QPushButton; class QRadioButton; -class QTable; +class Q3Table; @@ -87,4 +87,4 @@ class CSVImportDialog : public KDialogBase - QTable* mTable; - QButtonGroup* mDelimiterBox; + Q3Table* mTable; + Q3ButtonGroup* mDelimiterBox; QRadioButton* mRadioComma; @@ -121,3 +121,3 @@ class CSVImportDialog : public KDialogBase bool mClearTypeStore; - QValueList<int> mTypeStore; + Q3ValueList<int> mTypeStore; 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 @@ -118,4 +118,4 @@ KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const -#ifndef KAB_EMBEDDED -#include "kde2_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kde2_xxport.cpp" #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 @@ -31,4 +31,6 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> @@ -104,3 +106,3 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString QFile outFile( fileName ); - if ( !outFile.open( IO_WriteOnly ) ) { + if ( !outFile.open( QIODevice::WriteOnly ) ) { QString text = i18n( "<qt>Unable to open file <b>%1</b> for export.</qt>" ); @@ -110,4 +112,4 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); @@ -155,3 +157,3 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); @@ -198,4 +200,4 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const QFile file( fileName ); - if ( file.open( IO_ReadOnly ) ) { - QCString rawData ( file.readAll().data(),file.size()+1); + if ( file.open( QIODevice::ReadOnly ) ) { + Q3CString rawData ( file.readAll().data(),file.size()+1); file.close(); @@ -269,4 +271,4 @@ KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const -#ifndef KAB_EMBEDDED -#include "vcard_xxport.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_vcard_xxport.cpp" #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 @@ -32,2 +32,4 @@ $Id$ #include <qlist.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -219,3 +221,3 @@ void XXPortManager::loadPlugins() #else //KAB_EMBEDDED - QList<XXPortFactory> factorylist; + QList<XXPortFactory*> factorylist; factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); @@ -227,6 +229,4 @@ void XXPortManager::loadPlugins() - QListIterator<XXPortFactory> it(factorylist); - for ( ; it.current(); ++it ) - { - XXPortFactory *xxportFactory = it.current(); + for(QList<XXPortFactory*>::iterator it=factorylist.begin();it!=factorylist.end();++it) { + XXPortFactory *xxportFactory = *it; #endif //KAB_EMBEDDED @@ -252,3 +252,3 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page, marginHint(), spacingHint() ); connect( this, SIGNAL( user1Clicked() ), this, SLOT ( slotClose() ) ); @@ -266,5 +266,4 @@ PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent, -#ifndef KAB_EMBEDDED -#include "xxportmanager.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_xxportmanager.cpp" #endif //KAB_EMBEDDED - diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h index e801d9b..0528922 100644 --- a/kaddressbook/xxportmanager.h +++ b/kaddressbook/xxportmanager.h @@ -34,3 +34,3 @@ $Id$ -#include <qdict.h> +#include <q3dict.h> #include <qobject.h> @@ -73,3 +73,3 @@ class XXPortManager : public QObject - QDict<XXPortObject> mXXPortObjects; + Q3Dict<XXPortObject> mXXPortObjects; diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp index bd9d986..2d8d0ff 100644 --- a/kaddressbook/xxportobject.cpp +++ b/kaddressbook/xxportobject.cpp @@ -273,4 +273,4 @@ KABC::AddresseeList XXPortResourceObject::_importContacts( const QString& identi -#ifndef KAB_EMBEDDED -#include "xxportobject.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_xxportobject.cpp" #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 @@ -38,8 +38,9 @@ $Id$ #include <qapplication.h> -#include <qbuttongroup.h> +#include <QDesktopWidget> +#include <q3buttongroup.h> #include <qcombobox.h> -#include <qheader.h> +#include <q3header.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -47,3 +48,7 @@ $Id$ #include <qstringlist.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> @@ -64,4 +69,4 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, SLOT( filterChanged( int ) ) ); - connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( categoryClicked( QListViewItem* ) ) ); + connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ), + SLOT( categoryClicked( Q3ListViewItem* ) ) ); @@ -86,3 +91,3 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, for ( it = categories.begin(); it != categories.end(); ++it ) - new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); + new Q3CheckListItem( mCategoriesView, *it, Q3CheckListItem::CheckBox ); mUseCategories->setEnabled( categories.count() > 0 ); @@ -212,5 +217,5 @@ QStringList XXPortSelectDialog::categories() const - QListViewItemIterator it( mCategoriesView ); + Q3ListViewItemIterator it( mCategoriesView ); for ( ; it.current(); ++it ) { - QCheckListItem* qcli = static_cast<QCheckListItem*>(it.current()); + Q3CheckListItem* qcli = static_cast<Q3CheckListItem*>(it.current()); if ( qcli->isOn() ) @@ -227,5 +232,5 @@ void XXPortSelectDialog::filterChanged( int ) -void XXPortSelectDialog::categoryClicked( QListViewItem *i ) +void XXPortSelectDialog::categoryClicked( Q3ListViewItem *i ) { - QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); + Q3CheckListItem *qcli = static_cast<Q3CheckListItem*>( i ); if ( qcli->isOn() ) @@ -246,5 +251,5 @@ void XXPortSelectDialog::initGUI() { - QFrame *page = plainPage(); + Q3Frame *page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHintSmall(), + Q3VBoxLayout *topLayout = new Q3VBoxLayout( page, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -254,3 +259,3 @@ void XXPortSelectDialog::initGUI() - mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); + mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page ); mButtonGroup->setColumnLayout( 0, Qt::Vertical ); @@ -259,3 +264,3 @@ void XXPortSelectDialog::initGUI() - QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); + Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() ); groupLayout->setAlignment( Qt::AlignTop ); @@ -264,3 +269,3 @@ void XXPortSelectDialog::initGUI() mUseWholeBook->setChecked( true ); - QWhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) ); + Q3WhatsThis::add( mUseWholeBook, i18n( "Select the entire address book" ) ); groupLayout->addWidget( mUseWholeBook, 0, 0 ); @@ -268,3 +273,3 @@ void XXPortSelectDialog::initGUI() mUseSelection = new QRadioButton( i18n( "&Selected" ), mButtonGroup ); - QWhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" + Q3WhatsThis::add( mUseSelection, i18n( "Only contacts selected in KAddressBook.\n" "This option is disabled if no contacts are selected." ) ); @@ -273,3 +278,3 @@ void XXPortSelectDialog::initGUI() mUseFilters = new QRadioButton( i18n( "By matching &filter" ), mButtonGroup ); - QWhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" + Q3WhatsThis::add( mUseFilters, i18n( "Only contacts matching the selected filter.\n" "This option is disabled if you haven't defined any filters" ) ); @@ -278,3 +283,3 @@ void XXPortSelectDialog::initGUI() mUseCategories = new QRadioButton( i18n( "By Cate&gories" ), mButtonGroup ); - QWhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" + Q3WhatsThis::add( mUseCategories, i18n( "Only contacts who are members of a category that is checked on the list to the left.\n" "This option is disabled if you have no categories." ) ); @@ -284,9 +289,9 @@ void XXPortSelectDialog::initGUI() mFiltersCombo->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); - QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); + Q3WhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to select." ) ); groupLayout->addWidget( mFiltersCombo, 2, 1 ); - mCategoriesView = new QListView( mButtonGroup ); + mCategoriesView = new Q3ListView( mButtonGroup ); mCategoriesView->addColumn( "" ); mCategoriesView->header()->hide(); - QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); + Q3WhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to select." ) ); groupLayout->addWidget( mCategoriesView, 3, 1 ); @@ -297,5 +302,5 @@ void XXPortSelectDialog::initGUI() - QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); + Q3ButtonGroup *sortingGroup = new Q3ButtonGroup( i18n( "Sorting" ), page ); sortingGroup->setColumnLayout( 0, Qt::Vertical ); - QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, + Q3GridLayout *sortLayout = new Q3GridLayout( sortingGroup->layout(), 2, 2, KDialog::spacingHint() ); @@ -337,6 +342,4 @@ void XXPortSelectDialog::initGUI() -#ifndef KAB_EMBEDDED -#include "xxportselectdialog.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_xxportselectdialog.cpp" #endif //KAB_EMBEDDED - - diff --git a/kaddressbook/xxportselectdialog.h b/kaddressbook/xxportselectdialog.h index 28b1fef..208f4f9 100644 --- a/kaddressbook/xxportselectdialog.h +++ b/kaddressbook/xxportselectdialog.h @@ -32,6 +32,6 @@ -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; -class QListView; -class QListViewItem; +class Q3ListView; +class Q3ListViewItem; class QRadioButton; @@ -55,3 +55,3 @@ class XXPortSelectDialog : public KDialogBase void filterChanged( int ); - void categoryClicked( QListViewItem * i ); + void categoryClicked( Q3ListViewItem * i ); @@ -64,3 +64,3 @@ class XXPortSelectDialog : public KDialogBase - QButtonGroup* mButtonGroup; + Q3ButtonGroup* mButtonGroup; QRadioButton* mUseCategories; @@ -70,3 +70,3 @@ class XXPortSelectDialog : public KDialogBase QComboBox* mFiltersCombo; - QListView* mCategoriesView; + Q3ListView* mCategoriesView; diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index 18ce9da..467fef7 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp @@ -25,5 +25,6 @@ -#include <qhbox.h> -#include <qvbox.h> -#include <qapp.h> +#include <q3hbox.h> +#include <q3vbox.h> +#include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> @@ -41,2 +42,5 @@ #include <qspinbox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> #endif @@ -64,6 +68,6 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) setCaption( "KO/Pi Alarm!" ); - QVBoxLayout* layout = new QVBoxLayout( this); + Q3VBoxLayout* layout = new Q3VBoxLayout( this); QLabel* l = new QLabel("The following event triggered alarm:",this); layout->addWidget ( l ); - l->setAlignment( AlignCenter); + l->setAlignment( Qt::AlignCenter); mMessage = new QLabel ( " ", this ); @@ -85,6 +89,6 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) mMessage->setFont(fo ); - mMessage->setAlignment( AlignCenter); + mMessage->setAlignment( Qt::AlignCenter); layout->addWidget ( mMessage ); mMissedAlarms= new QLabel ( "(No missed Alarms)", this ); - mMissedAlarms->setAlignment( AlignCenter); + mMissedAlarms->setAlignment( Qt::AlignCenter); @@ -105,3 +109,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) #endif - labb->setAlignment(AlignCenter); + labb->setAlignment(Qt::AlignCenter); //layout->addWidget ( labb ); @@ -124,3 +128,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); - QHBoxLayout* layoutSpin = new QHBoxLayout( layout ); + Q3HBoxLayout* layoutSpin = new Q3HBoxLayout( layout ); layoutSpin->addStretch (); @@ -130,3 +134,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) - QVBox * bbox = new QVBox ( this ); + Q3VBox * bbox = new Q3VBox ( this ); layout->addWidget ( bbox ); @@ -134,3 +138,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox); - labb->setAlignment(AlignCenter); + labb->setAlignment(Qt::AlignCenter); mSuspendButton = new QPushButton( "Suspend", bbox); diff --git a/kalarmd/alarmdialog.h b/kalarmd/alarmdialog.h index 52e681a..c3e0966 100644 --- a/kalarmd/alarmdialog.h +++ b/kalarmd/alarmdialog.h @@ -32,2 +32,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <QLabel> diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 15eff28..74a53cb 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp @@ -54,3 +54,3 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mAlarmDialog = new AlarmDialog( 0 ); - mPopUp = new QPopupMenu( this ); + mPopUp = new Q3PopupMenu( this ); mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); @@ -68,8 +68,8 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); - mTimerPopUp = new QPopupMenu( this ); + mTimerPopUp = new Q3PopupMenu( this ); - mBeepPopUp = new QPopupMenu( this ); - mSoundPopUp = new QPopupMenu( this ); - mPausePopUp = new QPopupMenu( this ); - mFontsizePopup = new QPopupMenu( this ); + mBeepPopUp = new Q3PopupMenu( this ); + mSoundPopUp = new Q3PopupMenu( this ); + mPausePopUp = new Q3PopupMenu( this ); + mFontsizePopup = new Q3PopupMenu( this ); mFontsizePopup->insertItem( "10", 10 ); @@ -87,3 +87,3 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mFontsizePopup->insertItem( "36", 36 ); - QPopupMenu* savePopUp = new QPopupMenu( this ); + QPopupMenu* savePopUp = new Q3PopupMenu( this ); savePopUp->insertItem( "Save", 0 ); @@ -101,3 +101,3 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mPausePopUp->insertItem( " 5 min", 300 ); - mSuspendPopUp = new QPopupMenu( this ); + mSuspendPopUp = new Q3PopupMenu( this ); mSuspendPopUp->insertItem( "Off", 0 ); diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 06ef91b..ac65797 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h @@ -32,3 +32,2 @@ class QLabel; class QTimer; -class QPopupMenu; class AlarmDialog; @@ -78,3 +77,3 @@ class SimpleAlarmDaemonImpl : public QLabel int getFileNameLen( QString ); - QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; + Q3PopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; QDateTime mRunningTimer; diff --git a/kdepim-desktop.pro b/kdepim-desktop.pro index 4a5ceef..05d8357 100644 --- a/kdepim-desktop.pro +++ b/kdepim-desktop.pro @@ -21,3 +21,5 @@ unix:{ !staticlib: { -SUBDIRS += libetpan kmicromail/libmailwrapper kmicromail pwmanager/libcrypt/cipher pwmanager/libcrypt/error pwmanager/libcrypt/mpi pwmanager/libcrypt/zlib pwmanager/pwmanager +SUBDIRS += libetpan +# kmicromail/libmailwrapper kmicromail +SUBDIRS += pwmanager/libcrypt/cipher pwmanager/libcrypt/error pwmanager/libcrypt/mpi pwmanager/libcrypt/zlib pwmanager/pwmanager } diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 985a762..9b1ea2f 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -14,4 +14,6 @@ /* QT */ -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kiconloader.h> @@ -56,3 +58,3 @@ AbstractMail *POP3viewItem::getWrapper() -void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & ) +void POP3viewItem::refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > & ) { @@ -64,7 +66,7 @@ void POP3viewItem::refresh() if (account->getOffline()) return; - QValueList<FolderP> *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); + Q3ValueList<FolderP> *folders = wrapper->listFolders(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); @@ -72,4 +74,4 @@ void POP3viewItem::refresh() } - QValueList<FolderP>::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList<FolderP>::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) @@ -88,5 +90,5 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) -QPopupMenu * POP3viewItem::getContextMenu() +Q3PopupMenu * POP3viewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -110,6 +112,6 @@ void POP3viewItem::disconnect() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); @@ -159,3 +161,3 @@ POP3folderItem::~POP3folderItem() -POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , QListViewItem*after ) +POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , Q3ListViewItem*after ) : AccountViewItem(folderInit,parent,after ) @@ -174,3 +176,3 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , -void POP3folderItem::refresh(QValueList<RecMailP>&target) +void POP3folderItem::refresh(Q3ValueList<RecMailP>&target) { @@ -185,5 +187,5 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail) -QPopupMenu * POP3folderItem::getContextMenu() +Q3PopupMenu * POP3folderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -263,3 +265,3 @@ AbstractMail *NNTPviewItem::getWrapper() -void NNTPviewItem::refresh( QValueList<RecMailP> & ) +void NNTPviewItem::refresh( Q3ValueList<RecMailP> & ) { @@ -271,8 +273,8 @@ void NNTPviewItem::refresh() if (account->getOffline()) return; - QValueList<FolderP> *folders = wrapper->listFolders(); + Q3ValueList<FolderP> *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); @@ -280,4 +282,4 @@ void NNTPviewItem::refresh() } - QValueList<FolderP>::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList<FolderP>::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) @@ -296,5 +298,5 @@ RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail ) -QPopupMenu * NNTPviewItem::getContextMenu() +Q3PopupMenu * NNTPviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -328,6 +330,6 @@ void NNTPviewItem::disconnect() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); @@ -370,3 +372,3 @@ NNTPfolderItem::~NNTPfolderItem() -NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , QListViewItem*after ) +NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , Q3ListViewItem*after ) : AccountViewItem( folderInit, parent,after ) @@ -385,3 +387,3 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent -void NNTPfolderItem::refresh(QValueList<RecMailP>&target) +void NNTPfolderItem::refresh(Q3ValueList<RecMailP>&target) { @@ -396,5 +398,5 @@ RECBODYP NNTPfolderItem::fetchBody(const RecMailP&aMail) -QPopupMenu * NNTPfolderItem::getContextMenu() +Q3PopupMenu * NNTPfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -455,3 +457,3 @@ AbstractMail *IMAPviewItem::getWrapper() -void IMAPviewItem::refresh(QValueList<RecMailP>&) +void IMAPviewItem::refresh(Q3ValueList<RecMailP>&) { @@ -472,7 +474,7 @@ void IMAPviewItem::refreshFolders(bool force) currentFolders.clear(); - QValueList<FolderP> * folders = wrapper->listFolders(); + Q3ValueList<FolderP> * folders = wrapper->listFolders(); - QValueList<FolderP>::Iterator it; - QListViewItem*item = 0; - QListViewItem*titem = 0; + Q3ValueList<FolderP>::Iterator it; + Q3ListViewItem*item = 0; + Q3ListViewItem*titem = 0; QString fname,del,search; @@ -515,5 +517,5 @@ void IMAPviewItem::refreshFolders(bool force) -QPopupMenu * IMAPviewItem::getContextMenu() +Q3PopupMenu * IMAPviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -617,3 +619,3 @@ bool IMAPviewItem::offline() -IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , QListViewItem*after ) +IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , Q3ListViewItem*after ) : AccountViewItem( folderInit, parent , after ) @@ -632,3 +634,3 @@ IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent -IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ) +IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master ) : AccountViewItem(folderInit, parent,after ) @@ -655,3 +657,3 @@ const QString& IMAPfolderItem::Delemiter()const -void IMAPfolderItem::refresh(QValueList<RecMailP>&target) +void IMAPfolderItem::refresh(Q3ValueList<RecMailP>&target) { @@ -672,5 +674,5 @@ RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail) -QPopupMenu * IMAPfolderItem::getContextMenu() +Q3PopupMenu * IMAPfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -723,3 +725,3 @@ void IMAPfolderItem::deleteFolder() { - QListView*v=listView(); + Q3ListView*v=listView(); IMAPviewItem * box = imap; @@ -802,3 +804,3 @@ AbstractMail *MHviewItem::getWrapper() -void MHviewItem::refresh( QValueList<RecMailP> & target) +void MHviewItem::refresh( Q3ValueList<RecMailP> & target) { @@ -813,4 +815,4 @@ void MHviewItem::refresh(bool force) currentFolders.clear(); - QValueList<FolderP> *folders = wrapper->listFolders(); - QValueList<FolderP>::ConstIterator it; + Q3ValueList<FolderP> *folders = wrapper->listFolders(); + Q3ValueList<FolderP>::ConstIterator it; MHfolderItem*item = 0; @@ -859,5 +861,5 @@ RECBODYP MHviewItem::fetchBody( const RecMailP &mail ) -QPopupMenu * MHviewItem::getContextMenu() +Q3PopupMenu * MHviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -922,3 +924,3 @@ MHfolderItem::~MHfolderItem() -MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after ) +MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , Q3ListViewItem*after ) : AccountViewItem(folderInit, parent,after ) @@ -929,3 +931,3 @@ MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QLis -MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master) +MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master) : AccountViewItem(folderInit, parent,after ) @@ -969,3 +971,3 @@ const FolderP&MHfolderItem::getFolder()const -void MHfolderItem::refresh(QValueList<RecMailP>&target) +void MHfolderItem::refresh(Q3ValueList<RecMailP>&target) { @@ -991,3 +993,3 @@ void MHfolderItem::deleteFolder() { - QListView*v=listView(); + Q3ListView*v=listView(); MHviewItem * box = mbox; @@ -1004,5 +1006,5 @@ void MHfolderItem::deleteFolder() -QPopupMenu * MHfolderItem::getContextMenu() +Q3PopupMenu * MHfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -1033,3 +1035,3 @@ void MHfolderItem::createFolder() { - QListView*v=listView(); + Q3ListView*v=listView(); MHviewItem * box = mbox; @@ -1080,3 +1082,3 @@ const QString AccountViewItem::contextName="AccountViewItem"; AccountViewItem::AccountViewItem( AccountView *parent ) - : QListViewItem( parent ) + : Q3ListViewItem( parent ) { @@ -1086,4 +1088,4 @@ AccountViewItem::AccountViewItem( AccountView *parent ) -AccountViewItem::AccountViewItem( QListViewItem *parent) - : QListViewItem( parent),folder(0) +AccountViewItem::AccountViewItem( Q3ListViewItem *parent) + : Q3ListViewItem( parent),folder(0) { @@ -1092,4 +1094,4 @@ AccountViewItem::AccountViewItem( QListViewItem *parent) -AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) - :QListViewItem( parent,after ),folder(0) +AccountViewItem::AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after ) + :Q3ListViewItem( parent,after ),folder(0) { @@ -1098,4 +1100,4 @@ AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) -AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) - :QListViewItem( parent,after ),folder(folderInit) +AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after ) + :Q3ListViewItem( parent,after ),folder(folderInit) { @@ -1142,6 +1144,6 @@ void AccountViewItem::removeChilds() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h index 4c92bfc..bbfd05f 100644 --- a/kmicromail/accountitem.h +++ b/kmicromail/accountitem.h @@ -4,4 +4,7 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PopupMenu> #include <opie2/osmartpointer.h> @@ -12,3 +15,3 @@ class RecMail; class RecBody; -class QPopupMenu; +class Q3PopupMenu; class Selectstore; @@ -23,3 +26,3 @@ class Folder; -class AccountViewItem : public QListViewItem +class AccountViewItem : public Q3ListViewItem { @@ -28,10 +31,10 @@ public: AccountViewItem( AccountView *parent ); - AccountViewItem( QListViewItem *parent); - AccountViewItem( QListViewItem *parent , QListViewItem*after ); - AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); + AccountViewItem( Q3ListViewItem *parent); + AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after ); + AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after ); virtual ~AccountViewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; - virtual QPopupMenu * getContextMenu(){return 0;}; + virtual Q3PopupMenu * getContextMenu(){return 0;}; virtual void contextMenuSelected(int){} @@ -58,6 +61,6 @@ public: virtual ~POP3viewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -76,7 +79,7 @@ class POP3folderItem : public AccountViewItem public: - POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); + POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , Q3ListViewItem*after ); virtual ~POP3folderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -95,6 +98,6 @@ public: virtual ~NNTPviewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -114,7 +117,7 @@ class NNTPfolderItem : public AccountViewItem public: - NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); + NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , Q3ListViewItem*after ); virtual ~NNTPfolderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -134,6 +137,6 @@ public: virtual ~IMAPviewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -154,8 +157,8 @@ class IMAPfolderItem : public AccountViewItem public: - IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); - IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); + IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , Q3ListViewItem*after ); + IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master ); virtual ~IMAPfolderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -176,6 +179,6 @@ public: virtual ~MHviewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); @@ -196,8 +199,8 @@ class MHfolderItem : public AccountViewItem public: - MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); - MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); + MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , Q3ListViewItem*after ); + MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master); virtual ~MHfolderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index d1d4f7e..eea1f65 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp @@ -15,3 +15,3 @@ #include <qmessagebox.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcheckbox.h> @@ -19,2 +19,4 @@ #include <qspinbox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <klocale.h> @@ -23,4 +25,4 @@ using namespace Opie::Core; -AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) - : QListView( parent, name, flags ) +AccountView::AccountView( QWidget *parent, const char *name, Qt::WFlags flags ) + : Q3ListView( parent, name, flags ) { @@ -28,8 +30,8 @@ AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) // SLOT( refresh(QListViewItem*) ) ); - connect( this, SIGNAL( clicked(QListViewItem*) ), - SLOT( refresh(QListViewItem*) ) ); - connect( this, SIGNAL( returnPressed(QListViewItem*) ), - SLOT( refresh(QListViewItem*) ) ); - connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, - SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); + connect( this, SIGNAL( clicked(Q3ListViewItem*) ), + SLOT( refresh(Q3ListViewItem*) ) ); + connect( this, SIGNAL( returnPressed(Q3ListViewItem*) ), + SLOT( refresh(Q3ListViewItem*) ) ); + connect( this, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this, + SLOT( slotHold(int,Q3ListViewItem*,const QPoint&,int) ) ); setSorting(0); @@ -50,3 +52,3 @@ void AccountView::slotContextMenu(int id) -void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) +void AccountView::slotHold(int button, Q3ListViewItem * item,const QPoint&,int) { @@ -55,3 +57,3 @@ void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) AccountViewItem *view = static_cast<AccountViewItem *>(item); - QPopupMenu*m = view->getContextMenu(); + Q3PopupMenu*m = view->getContextMenu(); if (!m) return; @@ -95,3 +97,3 @@ void AccountView::populate( QList<Account> list ) -void AccountView::refresh(QListViewItem *item) +void AccountView::refresh(Q3ListViewItem *item) { @@ -147,3 +149,3 @@ void AccountView::refreshCurrentSelected() if ( !m_currentItem ) return; - QValueList<RecMailP> headerlist; + Q3ValueList<RecMailP> headerlist; AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); @@ -168,3 +170,3 @@ RecBodyP AccountView::fetchBody(const RecMailP&aMail) { - QListViewItem*item = selectedItem (); + Q3ListViewItem*item = selectedItem (); if (!item) return new RecBody(); diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h index 33f3479..14b0ff9 100644 --- a/kmicromail/accountview.h +++ b/kmicromail/accountview.h @@ -3,4 +3,6 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> #include <opie2/osmartpointer.h> @@ -15,3 +17,3 @@ class MHviewItem; -class AccountView : public QListView +class AccountView : public Q3ListView { @@ -20,3 +22,3 @@ class AccountView : public QListView public: - AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); + AccountView( QWidget *parent = 0, const char *name = 0, Qt::WFlags flags = 0 ); virtual ~AccountView(); @@ -27,6 +29,6 @@ public: virtual bool currentisDraft(); - QValueList<MHviewItem*> allAccounts() { return mhAccounts;} + Q3ValueList<MHviewItem*> allAccounts() { return mhAccounts;} public slots: virtual void refreshAll(); - virtual void refresh(QListViewItem *item); + virtual void refresh(Q3ListViewItem *item); virtual void refreshCurrent(); @@ -34,3 +36,3 @@ public slots: virtual void refreshOutgoing(); - virtual void slotHold(int, QListViewItem *,const QPoint&,int); + virtual void slotHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotContextMenu(int id); @@ -39,8 +41,8 @@ public slots: signals: - void refreshMailview(const QValueList<RecMailP>& ); + void refreshMailview(const Q3ValueList<RecMailP>& ); protected: - QListViewItem* m_currentItem; - QValueList<IMAPviewItem*> imapAccounts; - QValueList<MHviewItem*> mhAccounts; + Q3ListViewItem* m_currentItem; + Q3ValueList<IMAPviewItem*> imapAccounts; + Q3ValueList<MHviewItem*> mhAccounts; }; diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 4bc4441..81d7b52 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -40,3 +40,3 @@ #include <qcheckbox.h> -#include <qiconset.h> +#include <qicon.h> #include <qtimer.h> @@ -44,6 +44,6 @@ #include <qpushbutton.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include <qlabel.h> #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> @@ -127,3 +127,3 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo warnAttach = true; - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); @@ -143,3 +143,3 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo message->setFont ( KOPrefs::instance()->mComposeFont ); - message->setWordWrap (QMultiLineEdit::WidgetWidth); + message->setWordWrap (Q3MultiLineEdit::WidgetWidth); if ( smtpAccounts.count() > 0 ) { @@ -536,4 +536,4 @@ void ComposeMail::reEditMail(const RecMailP¤t) -AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) - : QListViewItem( parent ) +AttachViewItem::AttachViewItem( Q3ListView *parent, Attachment *att ) + : Q3ListViewItem( parent ) { diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h index 966ac3e..9aef4e1 100644 --- a/kmicromail/composemail.h +++ b/kmicromail/composemail.h @@ -4,3 +4,3 @@ #include <qlineedit.h> -#include <qlistview.h> +#include <q3listview.h> @@ -82,6 +82,6 @@ protected: -class AttachViewItem : public QListViewItem +class AttachViewItem : public Q3ListViewItem { public: - AttachViewItem( QListView *parent, Attachment *att ); + AttachViewItem( Q3ListView *parent, Attachment *att ); Attachment *getAttachment() { return attachment; } diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 2c0f2d8..f274dc3 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp @@ -18,3 +18,3 @@ #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> #include <qspinbox.h> @@ -27,4 +27,4 @@ using namespace Opie::Core; -AccountListItem::AccountListItem( QListView *parent, Account *a) - : QListViewItem( parent ) +AccountListItem::AccountListItem( Q3ListView *parent, Account *a) + : Q3ListViewItem( parent ) { @@ -53,3 +53,3 @@ AccountListItem::AccountListItem( QListView *parent, Account *a) -EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) +EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : EditAccountsUI( parent, name, modal, flags ) @@ -310,3 +310,3 @@ void EditAccounts::accept() -SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) +SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : SelectMailTypeUI( parent, name, modal, flags ) @@ -327,3 +327,3 @@ void SelectMailType::slotSelection( const QString &sel ) -IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : IMAPconfigUI( parent, name, modal, flags ) @@ -410,3 +410,3 @@ void IMAPconfig::accept() -POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : POP3configUI( parent, name, modal, flags ) @@ -491,3 +491,3 @@ void POP3config::accept() -SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : SMTPconfigUI( parent, name, modal, flags ) @@ -500,3 +500,3 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, // fillValues(); - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); @@ -574,3 +574,3 @@ void SMTPconfig::accept() -NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : NNTPconfigUI( parent, name, modal, flags ) @@ -595,4 +595,4 @@ void NNTPconfig::slotShowSub() for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); item->setOn( true ); @@ -608,5 +608,5 @@ void NNTPconfig::slotShowFilter() for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { - QCheckListItem *item; + Q3CheckListItem *item; if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); ++count; @@ -631,4 +631,4 @@ void NNTPconfig::slotGetNG() { for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); if ( subscribedGroups.contains( (*it) ) >= 1 ) { @@ -665,4 +665,4 @@ void NNTPconfig::fillValues() for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); item->setOn( true ); @@ -681,3 +681,3 @@ void NNTPconfig::save() - QListViewItemIterator list_it( ListViewGroups ); + Q3ListViewItemIterator list_it( ListViewGroups ); @@ -685,3 +685,3 @@ void NNTPconfig::save() - if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { + if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) { if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h index 465780c..3d01d23 100644 --- a/kmicromail/editaccounts.h +++ b/kmicromail/editaccounts.h @@ -4,3 +4,3 @@ #include <qstring.h> -#include <qlistview.h> +#include <q3listview.h> @@ -17,3 +17,3 @@ -class AccountListItem : public QListViewItem +class AccountListItem : public Q3ListViewItem { @@ -21,3 +21,3 @@ class AccountListItem : public QListViewItem public: - AccountListItem( QListView *parent, Account *a); + AccountListItem( Q3ListView *parent, Account *a); Account *getAccount() { return account; } @@ -34,3 +34,3 @@ class EditAccounts : public EditAccountsUI public: - EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); @@ -62,3 +62,3 @@ class SelectMailType : public SelectMailTypeUI public: - SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); @@ -77,3 +77,3 @@ class IMAPconfig : public IMAPconfigUI public: - IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); @@ -96,3 +96,3 @@ class POP3config : public POP3configUI public: - POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); @@ -115,3 +115,3 @@ class SMTPconfig : public SMTPconfigUI public: - SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); @@ -135,3 +135,3 @@ class NNTPconfig : public NNTPconfigUI public: - NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); diff --git a/kmicromail/kmicromail.pro b/kmicromail/kmicromail.pro index 9f4d4bd..ce30bbf 100644 --- a/kmicromail/kmicromail.pro +++ b/kmicromail/kmicromail.pro @@ -43,3 +43,4 @@ SOURCES = main.cpp \ -INTERFACES = editaccountsui.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = editaccountsui.ui \ selectmailtypeui.ui \ @@ -58,3 +59,3 @@ INTERFACES = editaccountsui.ui \ INCLUDEPATH += ./qpe . .. ../libkdepim ../microkde ../microkde/kdecore ../libetpan/include ../microkde/kdeui -LIBS += -L../bin -lmicromailwrapper -lmicrolibetpan -lmicrokde -lssl -lcrypto -lmicrokdepim -lmicrokabc -lpthread +LIBS += -L../bin -lmicromailwrapper -lxmicrolibetpan -lxmicrokde -lssl -lcrypto -lxmicrokdepim -lxmicrokabc -lpthread @@ -78 +79,6 @@ MOC_DIR = moc/win +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +CONFIG += uic3 + diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro index a5a51f7..19fa398 100644 --- a/kmicromail/kmicromailE.pro +++ b/kmicromail/kmicromailE.pro @@ -57,3 +57,3 @@ INTERFACES = editaccountsui.ui \ INCLUDEPATH += $(QPEDIR)/include . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/libetpan/include $(KDEPIMDIR)/microkde/kdeui -LIBS += -L$(QPEDIR)/lib -lmicromailwrapper -lqpe -lmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokdepim -lpthread +LIBS += -L$(QPEDIR)/lib -lmicromailwrapper -lqpe -lxmicrolibetpan -lxmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lxmicrokdepim -lpthread LIBS += $(QTOPIALIB) diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index e4b61dc..e2eed9a 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp @@ -28,3 +28,3 @@ #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 017f1f7..e3102a4 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp @@ -25,4 +25,4 @@ #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> @@ -31,6 +31,6 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qcombobox.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qregexp.h> @@ -41,4 +41,9 @@ #include <qpushbutton.h> -#include <qstrlist.h> +#include <q3strlist.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <QPixmap> +#include <Q3Frame> @@ -113,5 +118,5 @@ void KOPrefsDialog::setupMainTab() { - QFrame *topFrame = addPage(i18n("General"),0,0); + Q3Frame *topFrame = addPage(i18n("General"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); @@ -138,5 +143,5 @@ void KOPrefsDialog::setupMailTab() { - QFrame *topFrame = addPage(i18n("Mail"),0,0); + Q3Frame *topFrame = addPage(i18n("Mail"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); @@ -184,6 +189,6 @@ void KOPrefsDialog::setupFontsTab() - QFrame *topFrame = addPage(i18n("Fonts"),0,0); + Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,7,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); @@ -240,4 +245,4 @@ void KOPrefsDialog::setupLocaleDateTab() { -QFrame *topFrame = addPage(i18n("Date Format"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,3,2); +Q3Frame *topFrame = addPage(i18n("Date Format"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2); topLayout->setSpacing(spacingHint()); @@ -294,4 +299,4 @@ void KOPrefsDialog::setupLocaleTab() { - QFrame *topFrame = addPage(i18n("Locale"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3Frame *topFrame = addPage(i18n("Locale"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); @@ -333,3 +338,3 @@ void KOPrefsDialog::setupLocaleTab() QWidget * hb = new QWidget( topFrame ); - QHBoxLayout *hbLayout = new QHBoxLayout(hb); + Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); sb = @@ -363,5 +368,5 @@ void KOPrefsDialog::setupSyncAlgTab() QLabel * lab; - QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); + Q3Frame *topFrame = addPage(i18n("Sync Prefs"),0,0); mSetupSyncAlgTab = topFrame; - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); @@ -405,4 +410,4 @@ void KOPrefsDialog::setupSyncTab() QLabel * lab; - QFrame *topFrame = addPage(i18n("Sync Network"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3Frame *topFrame = addPage(i18n("Sync Network"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); @@ -453,6 +458,6 @@ void KOPrefsDialog::setupMainTab() { - QFrame *topFrame = addPage(i18n("General"),0,0); + Q3Frame *topFrame = addPage(i18n("General"),0,0); // DesktopIcon("identity",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); @@ -477,7 +482,7 @@ void KOPrefsDialog::setupMainTab() KPrefsDialogWidBool *wb; - QHBox *dummy; + Q3HBox *dummy; if ( QApplication::desktop()->width() > 480 ) { - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); } else { - dummy = new QVBox(topFrame); + dummy = new Q3VBox(topFrame); } @@ -493,3 +498,3 @@ void KOPrefsDialog::setupMainTab() - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in What's Next:"),dummy); @@ -501,3 +506,3 @@ void KOPrefsDialog::setupMainTab() - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); @@ -507,3 +512,3 @@ void KOPrefsDialog::setupMainTab() - QHBox *prioBox = new QHBox(topFrame); + Q3HBox *prioBox = new Q3HBox(topFrame); // intervalBox->setSpacing(spacingHint()); @@ -531,3 +536,3 @@ void KOPrefsDialog::setupMainTab() - QHBox *intervalBox = new QHBox(topFrame); + Q3HBox *intervalBox = new Q3HBox(topFrame); // intervalBox->setSpacing(spacingHint()); @@ -622,6 +627,6 @@ void KOPrefsDialog::setupTimeTab() { - QFrame *topFrame = addPage(i18n("Time"),0,0); + Q3Frame *topFrame = addPage(i18n("Time"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); @@ -629,3 +634,3 @@ void KOPrefsDialog::setupTimeTab() - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); KPrefsWidTime *dayBegins = @@ -660,3 +665,3 @@ void KOPrefsDialog::setupTimeTab() - QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, + Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, i18n("Working Hours"), @@ -666,3 +671,3 @@ void KOPrefsDialog::setupTimeTab() workingHoursGroup->layout()->setMargin( 4 ); - QHBox *workStartBox = new QHBox(workingHoursGroup); + Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); // workStartBox->setMargin( 0 ); @@ -671,3 +676,3 @@ void KOPrefsDialog::setupTimeTab() - QHBox *workEndBox = new QHBox(workingHoursGroup); + Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); //workEndBox->setMargin( 0 ); @@ -675,3 +680,3 @@ void KOPrefsDialog::setupTimeTab() &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); - QVBox *excludeBox = new QVBox(workingHoursGroup); + Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); //excludeBox->setMargin( 0 ); @@ -695,6 +700,6 @@ void KOPrefsDialog::setupViewsTab() - QFrame *topFrame = addPage(i18n("Views"),0,0); + Q3Frame *topFrame = addPage(i18n("Views"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,1); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); @@ -787,3 +792,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,6,1); + topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); @@ -840,3 +845,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(spacingHint()); @@ -845,3 +850,3 @@ void KOPrefsDialog::setupViewsTab() QLabel *lab; - QHBox *habo = new QHBox( topFrame ); + Q3HBox *habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() < 320 ) { @@ -867,3 +872,3 @@ void KOPrefsDialog::setupViewsTab() - habo = new QHBox( topFrame ); + habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() < 320 ) { @@ -935,3 +940,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(spacingHint()); @@ -967,3 +972,3 @@ void KOPrefsDialog::setupViewsTab() &(KOPrefs::instance()->mTodoDueTodayColor),wid); - QHBoxLayout *widLayout = new QHBoxLayout(wid); + Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); @@ -975,3 +980,3 @@ void KOPrefsDialog::setupViewsTab() wid = new QWidget( topFrame ); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); KPrefsWidColor *todoOverdueColor = @@ -999,3 +1004,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(spacingHint()); @@ -1012,5 +1017,5 @@ void KOPrefsDialog::setupViewsTab() #ifndef DESKTOP_VERSION - lab->setAlignment( AlignLeft|WordBreak|AlignTop); + lab->setAlignment( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop); #else - lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); + lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); @@ -1018,3 +1023,3 @@ void KOPrefsDialog::setupViewsTab() - QHBox* dummyBox = new QHBox(topFrame); + Q3HBox* dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); @@ -1023,3 +1028,3 @@ void KOPrefsDialog::setupViewsTab() - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); @@ -1028,3 +1033,3 @@ void KOPrefsDialog::setupViewsTab() - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); @@ -1033,3 +1038,3 @@ void KOPrefsDialog::setupViewsTab() - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); @@ -1044,3 +1049,3 @@ void KOPrefsDialog::setupViewsTab() - QHBox* hbo = new QHBox ( topFrame ); + Q3HBox* hbo = new Q3HBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); @@ -1084,6 +1089,6 @@ void KOPrefsDialog::setupFontsTab() - QFrame *topFrame = addPage(i18n("Fonts"),0,0); + Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,7,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); @@ -1154,3 +1159,3 @@ void KOPrefsDialog::setupFontsTab() - topLayout = new QGridLayout(topFrame,7,3); + topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); @@ -1222,6 +1227,6 @@ void KOPrefsDialog::setupColorsTab() { - QFrame *topFrame = addPage(i18n("Colors"),0,0); + Q3Frame *topFrame = addPage(i18n("Colors"),0,0); // DesktopIcon("colorize",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); // topLayout->setSpacing(spacingHint()); @@ -1233,5 +1238,5 @@ void KOPrefsDialog::setupColorsTab() int ii = 1; - QGroupBox *categoryGroup ; + Q3GroupBox *categoryGroup ; - categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), + categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"), topFrame); @@ -1328,3 +1333,3 @@ void KOPrefsDialog::setupPrinterTab() - QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); topLayout->setSpacing(spacingHint()); @@ -1338,6 +1343,6 @@ void KOPrefsDialog::setupGroupSchedulingTab() #if 0 - QFrame *topFrame = addPage(i18n("Group Scheduling"),0, + Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0, DesktopIcon("personal",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); @@ -1364,3 +1369,3 @@ void KOPrefsDialog::setupGroupSchedulingTab() topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); - mAMails = new QListView(topFrame); + mAMails = new Q3ListView(topFrame); mAMails->addColumn(i18n("Email"),300); @@ -1382,3 +1387,3 @@ void KOPrefsDialog::setupGroupSchedulingTab() connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); - connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); + connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); #endif @@ -1389,6 +1394,6 @@ void KOPrefsDialog::setupGroupAutomationTab() return; - QFrame *topFrame = addPage(i18n("Group Automation"),0, + Q3Frame *topFrame = addPage(i18n("Group Automation"),0, DesktopIcon("personal",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,1); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(spacingHint()); @@ -1545,3 +1550,3 @@ void KOPrefsDialog::usrWriteConfig() - QDictIterator<QColor> it(mCategoryDict); + Q3DictIterator<QColor> it(mCategoryDict); while (it.current()) { @@ -1685,6 +1690,6 @@ void KOPrefsDialog::setupTimeZoneTab() { - QFrame *topFrame = addPage(i18n("Time Zone"),0,0); + Q3Frame *topFrame = addPage(i18n("Time Zone"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); topLayout->setSpacing(spacingHint()); @@ -1692,3 +1697,3 @@ void KOPrefsDialog::setupTimeZoneTab() - QHBox *timeZoneBox = new QHBox( topFrame ); + Q3HBox *timeZoneBox = new Q3HBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h index 7fa9261..042af3f 100644 --- a/kmicromail/koprefsdialog.h +++ b/kmicromail/koprefsdialog.h @@ -25,6 +25,8 @@ -#include <qframe.h> -#include <qdict.h> +#include <q3frame.h> +#include <q3dict.h> #include <qcolor.h> -#include <qlistview.h> +#include <q3listview.h> +//Added by qt3to4: +#include <QLabel> @@ -121,3 +123,3 @@ protected: - QFrame *mPrinterTab; + Q3Frame *mPrinterTab; @@ -148,3 +150,3 @@ protected: KColorButton *mCategoryButton; - QDict<QColor> mCategoryDict; + Q3Dict<QColor> mCategoryDict; 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 @@ -5,3 +5,3 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan 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 @@ -5,3 +5,3 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan 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 @@ -10,5 +10,7 @@ -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qapplication.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <klocale.h> @@ -16,3 +18,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <stdlib.h> @@ -113,6 +115,6 @@ QString AbstractMail::gen_attachment_id() QFile file( "/proc/sys/kernel/random/uuid" ); - if (!file.open(IO_ReadOnly ) ) + if (!file.open(QIODevice::ReadOnly ) ) return QString::null; - QTextStream stream(&file); + Q3TextStream stream(&file); @@ -140,6 +142,6 @@ QString AbstractMail::draftFolder() /* temporary - will be removed when implemented in all classes */ -void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) +void AbstractMail::deleteMails(const QString &,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &) { } -void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) +void AbstractMail::deleteMailList(const Q3ValueList<RecMailP>&target) { @@ -149,3 +151,3 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) int count = target.count(); - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); @@ -179,3 +181,3 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe } - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); @@ -189,6 +191,6 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe qApp->processEvents(); - QValueList<RecMailP> e; + Q3ValueList<RecMailP> e; targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); //qDebug("target has mails %d ", e.count()); - QValueList<RecMailP> n; + Q3ValueList<RecMailP> n; int iii = 0; @@ -223,3 +225,3 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe #if 0 - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; listMessages(fromFolder->getName(),t, maxSizeInKb); @@ -232,3 +234,3 @@ void AbstractMail::mvcpAllMails(const FolderP&fromFolder, { - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; listMessages(fromFolder->getName(),t, maxSizeInKb); @@ -237,3 +239,3 @@ void AbstractMail::mvcpAllMails(const FolderP&fromFolder, } -void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, +void AbstractMail::mvcpMailList(const Q3ValueList<RecMailP>& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) @@ -248,3 +250,3 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Copying...")); 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 @@ -9,2 +9,4 @@ #include <qobject.h> +//Added by qt3to4: +#include <Q3ValueList> #include <opie2/osmartpointer.h> @@ -27,4 +29,4 @@ public: virtual ~AbstractMail(){} - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; - virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target, int sizeInKb = 0 )=0; + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; + virtual void listMessages(const QString & mailbox,Q3ValueList<RecMailP>&target, int sizeInKb = 0 )=0; virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; @@ -37,6 +39,6 @@ public: virtual void deleteMail(const RecMailP&mail)=0; - virtual void deleteMailList(const QValueList<RecMailP>&target); + virtual void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail)=0; virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; - virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target); virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; @@ -46,3 +48,3 @@ public: const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); - virtual void mvcpMailList(const QValueList<RecMailP>& t, + virtual void mvcpMailList(const Q3ValueList<RecMailP>& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); 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 @@ -9,2 +9,4 @@ #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> @@ -230,3 +232,3 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { int err; - QCString __str; + Q3CString __str; //qDebug(" Generatemail::buildTxtPart %s", str.latin1()); @@ -254,3 +256,3 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { //__str = str.utf8(); - __str = QCString (str.latin1()); + __str = Q3CString (str.latin1()); err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() ); 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 @@ -8,2 +8,4 @@ #include <kstandarddirs.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -184,3 +186,3 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) -void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) +void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rec,int current_count) { @@ -202,3 +204,3 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); @@ -252,3 +254,3 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m mailmime*cbody=0; - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { @@ -272,3 +274,3 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); @@ -304,3 +306,3 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) err = mailmessage_get_bodystructure(msg,&mime); - QValueList<int>recList; + Q3ValueList<int>recList; traverseBody(body,msg,mime,recList); @@ -449,3 +451,3 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) -void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) +void Genericwrapper::parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) { 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 @@ -7,2 +7,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libetpan/clist.h> @@ -53,3 +55,3 @@ protected: - void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); + void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rek=0,int current_count=1); static void fillSingleBody(RecPartP&target,mailmessage*message,mailmime*mime); @@ -57,3 +59,3 @@ protected: static QString getencoding(mailmime_mechanism*aEnc); - virtual void parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); + virtual void parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); QStringList parseInreplies(mailimf_in_reply_to * in_replies); 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 @@ -5,2 +5,4 @@ #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> #include "imapwrapper.h" @@ -8,3 +10,3 @@ #include "logindialog.h" -#include <qprogressbar.h> +#include <q3progressbar.h> #include "genericwrapper.h" @@ -241,3 +243,3 @@ void IMAPwrapper::logout() -void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) +void IMAPwrapper::listMessages(const QString&mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) { @@ -322,3 +324,3 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma -QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() { @@ -331,3 +333,3 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() - QValueList<FolderP>* folders = new QValueList<FolderP>(); + Q3ValueList<FolderP>* folders = new Q3ValueList<FolderP>(); login(); @@ -615,3 +617,3 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; - QValueList<int> path; + Q3ValueList<int> path; body_desc = item->att_data.att_static->att_data.att_body; @@ -666,3 +668,3 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) -encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) +encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call) { @@ -740,3 +742,3 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, - int current_recursion,QValueList<int>recList,int current_count) + int current_recursion,Q3ValueList<int>recList,int current_count) { @@ -748,3 +750,3 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); @@ -801,3 +803,3 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; clistcell*current=0; @@ -987,3 +989,3 @@ void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which } -void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) +void IMAPwrapper::deleteMailList(const Q3ValueList<RecMailP>&target) { @@ -1007,3 +1009,3 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); @@ -1116,3 +1118,3 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) -QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call,const QString&enc) +QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call,const QString&enc) { @@ -1301,3 +1303,3 @@ encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) // dummy - QValueList<int> path; + Q3ValueList<int> path; return fetchRawPart(mail,path,false); 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 @@ -5,2 +5,4 @@ #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> #include "mailwrapper.h" @@ -26,4 +28,4 @@ public: virtual ~IMAPwrapper(); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); - virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); @@ -31,3 +33,3 @@ public: virtual void deleteMail(const RecMailP&mail); - void deleteMailList(const QValueList<RecMailP>&target); + void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail); @@ -61,4 +63,4 @@ protected: - virtual QString fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); - virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call); + virtual QString fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call=false,const QString&enc=""); + virtual encodedString*fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call); int selectMbox(const QString&mbox); @@ -70,3 +72,3 @@ protected: void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which); - void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,QValueList<int>recList,int current_count=1); + void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,Q3ValueList<int>recList,int current_count=1); 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 @@ -40,3 +40,4 @@ SOURCES = imapwrapper.cpp \ -INTERFACES = logindialogui.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = logindialogui.ui \ sendmailprogressui.ui @@ -65 +66,6 @@ MOC_DIR = moc/win } +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +CONFIG += uic3 + 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 @@ -8,3 +8,3 @@ -LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, WFlags flags ) +LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : LoginDialogUI( parent, name, modal, flags ) 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 @@ -10,3 +10,3 @@ class LoginDialog : public LoginDialogUI public: - LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); + LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, Qt::WFlags flags = 0 ); QString getUser() { return _user; } 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 @@ -5,2 +5,4 @@ #include <stdlib.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -285,3 +287,3 @@ const QString RecPart::searchParamter(const QString&key)const -void RecPart::setPositionlist(const QValueList<int>&poslist) +void RecPart::setPositionlist(const Q3ValueList<int>&poslist) { @@ -290,3 +292,3 @@ void RecPart::setPositionlist(const QValueList<int>&poslist) -const QValueList<int>& RecPart::Positionlist()const +const Q3ValueList<int>& RecPart::Positionlist()const { @@ -325,3 +327,3 @@ const QString& RecBody::Bodytext()const -void RecBody::setParts(const QValueList<RecPartP>&parts) +void RecBody::setParts(const Q3ValueList<RecPartP>&parts) { @@ -331,3 +333,3 @@ void RecBody::setParts(const QValueList<RecPartP>&parts) -const QValueList<RecPartP>& RecBody::Parts()const +const Q3ValueList<RecPartP>& RecBody::Parts()const { 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 @@ -16,3 +16,3 @@ #include <qmap.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -111,3 +111,3 @@ protected: /* describes the position in the mail */ - QValueList<int> m_poslist; + Q3ValueList<int> m_poslist; @@ -138,4 +138,4 @@ public: const QString searchParamter(const QString&key)const; - void setPositionlist(const QValueList<int>&poslist); - const QValueList<int>& Positionlist()const; + void setPositionlist(const Q3ValueList<int>&poslist); + const Q3ValueList<int>& Positionlist()const; }; @@ -149,3 +149,3 @@ protected: QString mCharset; - QValueList<RecPartP> m_PartsList; + Q3ValueList<RecPartP> m_PartsList; RecPartP m_description; @@ -164,4 +164,4 @@ public: - void setParts(const QValueList<RecPartP>&parts); - const QValueList<RecPartP>& Parts()const; + void setParts(const Q3ValueList<RecPartP>&parts); + const Q3ValueList<RecPartP>& Parts()const; void addPart(const RecPartP&part); 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 @@ -7,2 +7,4 @@ #include <qdir.h> +//Added by qt3to4: +#include <Q3CString> @@ -83,4 +85,4 @@ QString IMAPFolder::decodeFolderName( const QString &name ) unsigned long srcPtr = 0; - QCString dst = ""; - QCString src = name.ascii(); + Q3CString dst = ""; + Q3CString src = name.ascii(); @@ -94,5 +96,5 @@ QString IMAPFolder::decodeFolderName( const QString &name ) while (srcPtr < src.length ()) { - c = src[srcPtr++]; + c = src.at(srcPtr++); /* deal with literal characters and &- */ - if (c != '&' || src[srcPtr] == '-') { + if (c != '&' || src.at(srcPtr) == '-') { /* encode literally */ @@ -107,3 +109,3 @@ QString IMAPFolder::decodeFolderName( const QString &name ) ucs4 = 0; - while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { + while ((c = base64[(unsigned char) src.at(srcPtr)]) != UNDEFINED) { ++srcPtr; @@ -151,3 +153,3 @@ QString IMAPFolder::decodeFolderName( const QString &name ) /* skip over trailing '-' in modified UTF-7 encoding */ - if (src[srcPtr] == '-') + if (src.at(srcPtr) == '-') ++srcPtr; 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 @@ -8,2 +8,4 @@ #include <qfileinfo.h> +//Added by qt3to4: +#include <QPixmap> #include <kiconloader.h> @@ -63,3 +65,3 @@ public: void addAttachment( Attachment *att ) { attList.append( att ); } - const QList<Attachment>& getAttachments()const { return attList; } + const QList<Attachment*>& getAttachments()const { return attList; } void removeAttachment( Attachment *att ) { attList.remove( att ); } @@ -88,3 +90,3 @@ public: private: - QList<Attachment> attList; + QList<Attachment*> attList; QString name, mail, to, cc, bcc, reply, subject, message, charset; 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 @@ -5,2 +5,4 @@ #include <qdir.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> @@ -25,3 +27,3 @@ MBOXwrapper::~MBOXwrapper() -void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &target ) +void MBOXwrapper::listMessages(const QString & mailbox, Q3ValueList<RecMailP> &target ) { @@ -50,5 +52,5 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta -QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); QDir dir(MBOXPath); @@ -219,3 +221,3 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail) -void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) +void MBOXwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target) { @@ -233,3 +235,3 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> -void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target) +void MBOXwrapper::deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target) { @@ -237,3 +239,3 @@ void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &targ int r; - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it != target.end();++it) { 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 @@ -5,2 +5,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -17,4 +19,4 @@ public: - virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList<RecMailP>&target ); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); @@ -34,3 +36,3 @@ public: virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList<RecMailP> &target); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); @@ -41,3 +43,3 @@ public: protected: - static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); + static void deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target); QString MBOXPath; 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 @@ -7,2 +7,4 @@ #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> @@ -66,3 +68,3 @@ MHwrapper::~MHwrapper() -void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) +void MHwrapper::listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) { @@ -82,5 +84,5 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSm -QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); /* this is needed! */ @@ -257,3 +259,3 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) -void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) +void MHwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target) { @@ -265,3 +267,3 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> & } - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it!=target.end();++it) { 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 @@ -8,2 +8,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -18,4 +20,4 @@ public: - virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); @@ -38,3 +40,3 @@ public: virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> > &target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); 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 @@ -6,2 +6,4 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -62,3 +64,3 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { } - msg_cache.open(IO_ReadWrite|IO_Truncate); + msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); last_msg_id = mail->getNumber(); @@ -69,3 +71,3 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { QString msg=""; - msg_cache.open(IO_ReadOnly); + msg_cache.open(QIODevice::ReadOnly); message = new char[4096]; @@ -101,3 +103,3 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { -void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) +void NNTPwrapper::listMessages(const QString & which, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) { @@ -188,5 +190,5 @@ void NNTPwrapper::logout() -QValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); QStringList groups; 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 @@ -7,2 +7,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libetpan/clist.h> @@ -23,5 +25,5 @@ public: /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); + virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); /* should only get the subscribed one */ - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); /* mailbox will be ignored */ 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 @@ -11,4 +11,6 @@ #include <qfile.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -64,3 +66,3 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { } - msg_cache.open(IO_ReadWrite|IO_Truncate); + msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); last_msg_id = mail->getNumber(); @@ -71,3 +73,3 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { QString msg=""; - msg_cache.open(IO_ReadOnly); + msg_cache.open(QIODevice::ReadOnly); message = new char[4096]; @@ -102,3 +104,3 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { -void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) +void POP3wrapper::listMessages(const QString &, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) { @@ -189,4 +191,4 @@ void POP3wrapper::logout() -QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<FolderP>(); FolderP inb=new Folder("INBOX","/"); @@ -196,3 +198,3 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { -void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) +void POP3wrapper::deleteMailList(const Q3ValueList<RecMailP>&target) { @@ -204,3 +206,3 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); @@ -248,3 +250,3 @@ int POP3wrapper::deleteAllMail(const FolderP&) { - QProgressBar wid ( result ); + Q3ProgressBar wid ( result ); wid.setCaption( i18n("Deleting ...")); 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 @@ -7,2 +7,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -20,4 +22,4 @@ public: /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); /* mailbox will be ignored */ @@ -26,3 +28,3 @@ public: virtual void deleteMail(const RecMailP&mail); - virtual void deleteMailList(const QValueList<RecMailP>&target); + virtual void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail); 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,3 +1,3 @@ #include "sendmailprogress.h" -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlabel.h> 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 @@ -4,3 +4,3 @@ #include <qtextcodec.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> @@ -378,3 +378,3 @@ QString SMTPaccount::getSignature() QFile file( signature ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return QString(); @@ -382,3 +382,3 @@ QString SMTPaccount::getSignature() } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -401,3 +401,3 @@ void SMTPaccount::setSignature( QString b ) QFile fileIn( signature ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { qDebug("OM: Cannot write signature file %s ", signature.latin1() ); @@ -405,3 +405,3 @@ void SMTPaccount::setSignature( QString b ) } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); 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 @@ -11,2 +11,4 @@ #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> @@ -436,4 +438,4 @@ bool SMTPwrapper::flushOutbox() { QString oldPw, oldUser; - QValueList<RecMailP> mailsToSend; - QValueList<RecMailP> mailsToRemove; + Q3ValueList<RecMailP> mailsToSend; + Q3ValueList<RecMailP> mailsToRemove; QString mbox("Outgoing"); diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp index 41cee52..d8eee7d 100644 --- a/kmicromail/mailistviewitem.cpp +++ b/kmicromail/mailistviewitem.cpp @@ -3,3 +3,3 @@ #include <libmailwrapper/abstractmail.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kiconloader.h> @@ -8,3 +8,3 @@ -MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) +MailListViewItem::MailListViewItem(Q3ListView * parent, MailListViewItem * item ) :KListViewItem(parent,item),mail_data() diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h index b409c9d..ecc01ba 100644 --- a/kmicromail/mailistviewitem.h +++ b/kmicromail/mailistviewitem.h @@ -11,3 +11,3 @@ class MailListViewItem:public KListViewItem public: - MailListViewItem(QListView * parent, MailListViewItem * after ); + MailListViewItem(Q3ListView * parent, MailListViewItem * after ); virtual ~MailListViewItem(){} diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp index fe4bc76..dc73455 100644 --- a/kmicromail/main.cpp +++ b/kmicromail/main.cpp @@ -5,2 +5,4 @@ #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <Q3CString> #include <libkdepim/externalapphandler.h> @@ -25,2 +27,3 @@ void dumpMissing(); int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); @@ -53,3 +56,3 @@ int main( int argc, char **argv ) { //qDebug("CONNECT "); - QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); + QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&mw, SLOT(message( const Q3CString&, const QByteArray& ))); // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index d547dda..627d92e 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -3,6 +3,12 @@ #include <qlabel.h> -#include <qvbox.h> -#include <qheader.h> +#include <q3vbox.h> +#include <q3header.h> #include <qtimer.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3GridLayout> +#include <Q3ValueList> +#include <QPixmap> +#include <Q3PopupMenu> //#include <kdialog.h> @@ -29,4 +35,4 @@ extern QStatusBar* globalSstatusBarMainWindow; -MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) - : QMainWindow( parent, name ) //, flags ) +MainWindow::MainWindow( QWidget *parent, const char *name, Qt::WFlags flags ) + : Q3MainWindow( parent, name ) //, flags ) { @@ -38,7 +44,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //KABC::StdAddressBook::self(); - toolBar = new QToolBar( this ); + toolBar = new Q3ToolBar( this ); menuBar = new QPEMenuBar( toolBar ); - mailMenu = new QPopupMenu( menuBar ); + mailMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Mail" ), mailMenu ); - settingsMenu = new QPopupMenu( menuBar ); + settingsMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Settings" ), settingsMenu ); @@ -116,3 +122,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) editAccounts->addTo( settingsMenu ); - codecMenu = new QPopupMenu( menuBar ); + codecMenu = new Q3PopupMenu( menuBar ); codecMenu->insertItem( "Western (iso-8859-1)",0,0); @@ -127,3 +133,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) - QVBox* wrapperBox = new QVBox( this ); + Q3VBox* wrapperBox = new Q3VBox( this ); setCentralWidget( wrapperBox ); @@ -141,3 +147,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) QWidget* infoBox = new QWidget( splithor ); - QGridLayout *griLay = new QGridLayout( infoBox, 2,2); + Q3GridLayout *griLay = new Q3GridLayout( infoBox, 2,2); if ( KOPrefs::instance()->mShowInfoSub ) { @@ -170,8 +176,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) mailView->addColumn( i18n( " " ) ); - mailView->addColumn( i18n( "Subject" ),QListView::Manual ); - mailView->addColumn( i18n( "Sender" ),QListView::Manual ); - mailView->addColumn( i18n( "Size" ),QListView::Manual); - mailView->addColumn( i18n( "Date" ),QListView::Manual); + mailView->addColumn( i18n( "Subject" ),Q3ListView::Manual ); + mailView->addColumn( i18n( "Sender" ),Q3ListView::Manual ); + mailView->addColumn( i18n( "Size" ),Q3ListView::Manual); + mailView->addColumn( i18n( "Date" ),Q3ListView::Manual); if ( KOPrefs::instance()->mShowToField ) - mailView->addColumn( i18n( "To" ),QListView::Manual); + mailView->addColumn( i18n( "To" ),Q3ListView::Manual); mailView->setAllColumnsShowFocus(true); @@ -181,3 +187,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) statusWidget->hide(); - mailView->setSelectionMode( QListView::Multi ); + mailView->setSelectionMode( Q3ListView::Multi ); mailView->setMultiSelection( true); @@ -199,13 +205,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) #endif - connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, - SLOT( mailLeftClicked(QListViewItem*) ) ); - connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, - SLOT( mailLeftClicked(QListViewItem*) ) ); - connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, - SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); - connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), - this,SLOT(refreshMailView(const QValueList<RecMailP>&))); - - connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, - SLOT( setInfoFields(QListViewItem*) ) ); + connect( mailView, SIGNAL( doubleClicked (Q3ListViewItem* )),this, + SLOT( mailLeftClicked(Q3ListViewItem*) ) ); + connect( mailView, SIGNAL( returnPressed (Q3ListViewItem* )),this, + SLOT( mailLeftClicked(Q3ListViewItem*) ) ); + connect( mailView, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this, + SLOT( mailHold(int,Q3ListViewItem*,const QPoint&,int) ) ); + connect(folderView, SIGNAL(refreshMailview(const Q3ValueList<RecMailP>&)), + this,SLOT(refreshMailView(const Q3ValueList<RecMailP>&))); + + connect( mailView, SIGNAL( currentChanged (Q3ListViewItem* )),this, + SLOT( setInfoFields(Q3ListViewItem*) ) ); @@ -217,3 +223,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //mailView->setSelectionMode( QListView::Extended ); - QValueList<int> list; + Q3ValueList<int> list; int fw = 100; @@ -237,3 +243,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) - QPopupMenu* helpMenu = new QPopupMenu( menuBar ); + Q3PopupMenu* helpMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Help" ), helpMenu ); @@ -261,3 +267,3 @@ MainWindow::~MainWindow() -void MainWindow::setInfoFields(QListViewItem* item ) +void MainWindow::setInfoFields(Q3ListViewItem* item ) { @@ -347,3 +353,3 @@ void MainWindow::showEtpanLicence() } -void MainWindow::appMessage(const QCString &, const QByteArray &) +void MainWindow::appMessage(const Q3CString &, const QByteArray &) { @@ -407,3 +413,3 @@ void MainWindow::slotShowFolders( bool ) -void MainWindow::refreshMailView(const QValueList<RecMailP>&) +void MainWindow::refreshMailView(const Q3ValueList<RecMailP>&) { @@ -412,3 +418,3 @@ void MainWindow::refreshMailView(const QValueList<RecMailP>&) -void MainWindow::mailLeftClicked(QListViewItem * ) +void MainWindow::mailLeftClicked(Q3ListViewItem * ) { @@ -427,3 +433,3 @@ void MainWindow::slotDeleteMail() -void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) +void MainWindow::mailHold(int, Q3ListViewItem *,const QPoint&,int ) { diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index f65f3b4..1ccadc2 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h @@ -5,3 +5,7 @@ -#include <qmainwindow.h> +#include <q3mainwindow.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> +#include <Q3PopupMenu> #include <klistview.h> @@ -10,3 +14,3 @@ -#include <qtoolbar.h> +#include <q3toolbar.h> #ifdef DESKTOP_VERSION @@ -26,3 +30,3 @@ class RecMail; -class MainWindow : public QMainWindow +class MainWindow : public Q3MainWindow { @@ -31,3 +35,3 @@ class MainWindow : public QMainWindow public: - MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); + MainWindow( QWidget *parent = 0, const char *name = 0, Qt::WFlags flags = 0 ); virtual ~MainWindow(); @@ -37,3 +41,3 @@ public slots: virtual void slotAdjustColumnsWide(); - virtual void appMessage(const QCString &msg, const QByteArray &data); + virtual void appMessage(const Q3CString &msg, const QByteArray &data); virtual void slotComposeMail(); @@ -41,3 +45,3 @@ public slots: protected slots: - virtual void setInfoFields(QListViewItem* ); + virtual void setInfoFields(Q3ListViewItem* ); virtual void slotSendQueued(); @@ -45,3 +49,3 @@ protected slots: virtual void slotShowFolders( bool show ); - virtual void refreshMailView(const QValueList<RecMailP>&); + virtual void refreshMailView(const Q3ValueList<RecMailP>&); virtual void displayMail(); @@ -52,3 +56,3 @@ protected slots: virtual void slotSetCodec(int); - virtual void mailHold(int, QListViewItem *,const QPoint&,int); + virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotAdjustLayout(); @@ -56,3 +60,3 @@ protected slots: virtual void slotEditGlobalSettings(); - virtual void mailLeftClicked( QListViewItem * ); + virtual void mailLeftClicked( Q3ListViewItem * ); void showLicence(); @@ -62,6 +66,6 @@ protected slots: protected: - QToolBar *toolBar; + Q3ToolBar *toolBar; StatusWidget *statusWidget; QPEMenuBar *menuBar; - QPopupMenu *mailMenu, *settingsMenu, *codecMenu; + Q3PopupMenu *mailMenu, *settingsMenu, *codecMenu; QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, diff --git a/kmicromail/nntpgroups.cpp b/kmicromail/nntpgroups.cpp index c729f79..d2213d4 100644 --- a/kmicromail/nntpgroups.cpp +++ b/kmicromail/nntpgroups.cpp @@ -3,3 +3,3 @@ #include <libmailwrapper/settings.h> -#include <qlistview.h> +#include <q3listview.h> #include <qlineedit.h> @@ -8,3 +8,3 @@ using namespace Opie::Core; -NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, WFlags fl) +NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, Qt::WFlags fl) : NNTPGroupsUI(parent,name,fl),subscribedGroups() @@ -29,4 +29,4 @@ void NNTPGroups::slotGetNG() for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox ); if ( subscribedGroups.contains( (*it) ) >= 1 ) { @@ -43,4 +43,4 @@ void NNTPGroups::fillGroups() for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox ); item->setOn( true ); @@ -52,6 +52,6 @@ void NNTPGroups::storeValues() if (!m_Account) return; - QListViewItemIterator list_it( GroupListView ); + Q3ListViewItemIterator list_it( GroupListView ); subscribedGroups.clear(); for ( ; list_it.current(); ++list_it ) { - if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { + if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) { subscribedGroups.append( list_it.current()->text(0) ); diff --git a/kmicromail/nntpgroups.h b/kmicromail/nntpgroups.h index e5b7c35..80cc329 100644 --- a/kmicromail/nntpgroups.h +++ b/kmicromail/nntpgroups.h @@ -14,3 +14,3 @@ class NNTPGroups:public NNTPGroupsUI public: - NNTPGroups(NNTPaccount *account, QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + NNTPGroups(NNTPaccount *account, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); virtual ~NNTPGroups(); diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp index f564b10..bfe1d35 100644 --- a/kmicromail/nntpgroupsdlg.cpp +++ b/kmicromail/nntpgroupsdlg.cpp @@ -7,2 +7,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -13,3 +15,3 @@ NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * m_Account = account; - QVBoxLayout*dlglayout = new QVBoxLayout(this); + Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this); dlglayout->setSpacing(2); diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 75a75b9..f453be5 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -6,2 +6,7 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3CString> +#include <QPixmap> +#include <Q3PopupMenu> #undef protected @@ -29,3 +34,3 @@ #include <qcursor.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qregexp.h> @@ -65,3 +70,3 @@ OpieMail::~OpieMail() -void OpieMail::appMessage(const QCString &msg, const QByteArray &data) +void OpieMail::appMessage(const Q3CString &msg, const QByteArray &data) { @@ -70,3 +75,3 @@ void OpieMail::appMessage(const QCString &msg, const QByteArray &data) #include <stdlib.h> -void OpieMail::message(const QCString &msg, const QByteArray &data) +void OpieMail::message(const Q3CString &msg, const QByteArray &data) { @@ -85,3 +90,3 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) //qDebug("writeMail(QString,QString) "); - QDataStream stream(data,IO_ReadOnly); + QDataStream stream(data,QIODevice::ReadOnly); stream >> mPendingName >> mPendingEmail; @@ -102,3 +107,3 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) //qDebug(" newMail(QString)"); - QDataStream stream(data,IO_ReadOnly); + QDataStream stream(data,QIODevice::ReadOnly); stream >> mPendingName; @@ -281,3 +286,3 @@ void OpieMail::replyMail() - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; @@ -333,3 +338,3 @@ void OpieMail::slotDownloadMail( ) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { @@ -374,3 +379,3 @@ void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { @@ -394,3 +399,3 @@ void OpieMail::displayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; @@ -410,3 +415,3 @@ void OpieMail::displayMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; @@ -434,3 +439,3 @@ void OpieMail::displayMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (item) @@ -441,3 +446,3 @@ void OpieMail::slotGetAllMail() { - QListViewItem * item = folderView->firstChild(); + Q3ListViewItem * item = folderView->firstChild(); while ( item ){ @@ -449,3 +454,3 @@ void OpieMail::slotGetMail() { - QListViewItem * item = folderView->currentItem(); + Q3ListViewItem * item = folderView->currentItem(); if ( ! item ) return; @@ -466,3 +471,3 @@ void OpieMail::slotDeleteAllMail() - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) @@ -494,3 +499,3 @@ void OpieMail::selectAll() { - QListViewItem* item = mailView->firstChild (); + Q3ListViewItem* item = mailView->firstChild (); while ( item ) { @@ -501,3 +506,3 @@ void OpieMail::selectAll() -void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) +void OpieMail::mailHold(int button, Q3ListViewItem *item,const QPoint&,int ) { @@ -508,3 +513,3 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) if (!item) return; - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) @@ -555,3 +560,3 @@ void OpieMail::slotShowFolders( bool show ) -void OpieMail::refreshMailView(const QValueList<RecMailP>&list) +void OpieMail::refreshMailView(const Q3ValueList<RecMailP>&list) { @@ -560,3 +565,3 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list) - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it = list.begin(); it != list.end();++it) @@ -570,3 +575,3 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list) -void OpieMail::mailLeftClicked( QListViewItem *item ) +void OpieMail::mailLeftClicked( Q3ListViewItem *item ) { @@ -616,3 +621,3 @@ void OpieMail::slotMoveCopyAllMail() if (!mailView->currentItem()) return; - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; // 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 ) diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index bdd9058..ea64dc4 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -11,2 +11,5 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> @@ -28,4 +31,4 @@ public slots: virtual void slotExtAppHandler(); - virtual void appMessage(const QCString &msg, const QByteArray &data); - virtual void message(const QCString &msg, const QByteArray &data); + virtual void appMessage(const Q3CString &msg, const QByteArray &data); + virtual void message(const Q3CString &msg, const QByteArray &data); void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); @@ -45,6 +48,6 @@ protected slots: virtual void slotDeleteAllMail(); - virtual void mailHold(int, QListViewItem *,const QPoint&,int); + virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotShowFolders( bool show ); - virtual void refreshMailView(const QValueList<RecMailP>&); - virtual void mailLeftClicked( QListViewItem * ); + virtual void refreshMailView(const Q3ValueList<RecMailP>&); + virtual void mailLeftClicked( Q3ListViewItem * ); virtual void slotMoveCopyMail(); @@ -61,5 +64,5 @@ private: QByteArray mPendingData; - QCString mPendingMessage; + Q3CString mPendingMessage; Settings *settings; - QTextBrowser * tb; + Q3TextBrowser * tb; 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 @@ -16,3 +16,3 @@ class QDialog_hacked : public QDialog public: - QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, WFlags f=0 ); + QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, Qt::WFlags f=0 ); 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 @@ -2,3 +2,3 @@ #include <qdialog.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qpushbutton.h> @@ -8,3 +8,3 @@ #endif - QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, WFlags f ) + QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, Qt::WFlags f ) : QDialog( parent,name,modal, f) @@ -15,3 +15,3 @@ setOrientation ( Vertical ); - QHBox * hb = new QHBox ( this ); + Q3HBox * hb = new Q3HBox ( this ); QPushButton *ok = new QPushButton( i18n("OK"), hb ); diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp index 10b6d79..ead723c 100644 --- a/kmicromail/selectsmtp.cpp +++ b/kmicromail/selectsmtp.cpp @@ -10,5 +10,5 @@ #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> #include <klocale.h> -selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) +selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : selectstoreui(parent,name,modal,fl) diff --git a/kmicromail/selectsmtp.h b/kmicromail/selectsmtp.h index 9157ddf..d7accf6 100644 --- a/kmicromail/selectsmtp.h +++ b/kmicromail/selectsmtp.h @@ -13,3 +13,3 @@ class selectsmtp : public selectstoreui public: - selectsmtp(QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); + selectsmtp(QWidget* parent = 0, const char* name = 0, bool modal = TRUE, Qt::WFlags fl = 0 ); virtual ~selectsmtp(); diff --git a/kmicromail/selectstore.h b/kmicromail/selectstore.h index 447a6ae..d312c1d 100644 --- a/kmicromail/selectstore.h +++ b/kmicromail/selectstore.h @@ -4,3 +4,3 @@ #include "selectstoreui.h" -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qmap.h> diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp index c593b48..889c490 100644 --- a/kmicromail/settingsdialog.cpp +++ b/kmicromail/settingsdialog.cpp @@ -4,2 +4,4 @@ #include <qtabwidget.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -14,3 +16,3 @@ -SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) +SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : SettingsDialogUI( parent, name, modal, fl ) { @@ -20,3 +22,3 @@ SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, W - QGridLayout *topLayout = new QGridLayout(topFrame,3,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,3); topLayout->setSpacing(2); diff --git a/kmicromail/settingsdialog.h b/kmicromail/settingsdialog.h index 042b69f..b168226 100644 --- a/kmicromail/settingsdialog.h +++ b/kmicromail/settingsdialog.h @@ -13,3 +13,3 @@ Q_OBJECT public: - SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~SettingsDialog(); diff --git a/kmicromail/statuswidget.cpp b/kmicromail/statuswidget.cpp index 19cf635..6da6f54 100644 --- a/kmicromail/statuswidget.cpp +++ b/kmicromail/statuswidget.cpp @@ -1,3 +1,3 @@ #include <qtimer.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlabel.h> @@ -9,3 +9,3 @@ -StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl ) +StatusWidget::StatusWidget( QWidget* parent, const char* name,Qt::WFlags fl ) : StatusWidgetUI( parent, name, fl ) { diff --git a/kmicromail/statuswidget.h b/kmicromail/statuswidget.h index 73f0d75..1d29daf 100644 --- a/kmicromail/statuswidget.h +++ b/kmicromail/statuswidget.h @@ -11,3 +11,3 @@ Q_OBJECT public: - StatusWidget( QWidget* parent = 0, const char* name = 0,WFlags fl = 0 ); + StatusWidget( QWidget* parent = 0, const char* name = 0,Qt::WFlags fl = 0 ); ~StatusWidget(); diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 685b4e4..c9dedb0 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -26,9 +26,12 @@ /* QT */ -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qmessagebox.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qaction.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qfile.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3VBoxLayout> @@ -37,5 +40,5 @@ -AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path) - : QListViewItem(parent,after),_partNum(num) +AttachItem::AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path) + : Q3ListViewItem(parent,after),_partNum(num) { @@ -48,5 +51,5 @@ AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mi -AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path) - : QListViewItem(parent,after),_partNum(num) +AttachItem::AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path) + : Q3ListViewItem(parent,after),_partNum(num) { @@ -59,3 +62,3 @@ AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QStrin -bool AttachItem::isParentof(const QValueList<int>&path) +bool AttachItem::isParentof(const Q3ValueList<int>&path) { @@ -72,5 +75,5 @@ bool AttachItem::isParentof(const QValueList<int>&path) -AttachItem* ViewMail::searchParent(const QValueList<int>&path) +AttachItem* ViewMail::searchParent(const Q3ValueList<int>&path) { - QListViewItemIterator it( attachments ); + Q3ListViewItemIterator it( attachments ); for ( ; it.current(); ++it ) @@ -156,3 +159,3 @@ void ViewMail::setBody(const RecBodyP&body ) if (w>0) o.precision(2); else o.precision(0); - o.setf(QTextStream::fixed); + o.setf(Q3TextStream::fixed); o << s << " " << q << "Byte"; @@ -197,3 +200,3 @@ void ViewMail::setBody(const RecBodyP&body ) if (w>0) o.precision(2); else o.precision(0); - o.setf(QTextStream::fixed); + o.setf(Q3TextStream::fixed); o << s << " " << q << "Byte"; @@ -241,3 +244,3 @@ void ViewMail::slotShowHtml( bool state ) -void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) +void ViewMail::slotItemClicked( Q3ListViewItem * item , const QPoint & point, int ) { @@ -251,3 +254,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int } - QPopupMenu *menu = new QPopupMenu(); + Q3PopupMenu *menu = new Q3PopupMenu(); int ret=0; @@ -280,3 +283,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int QFile output(str); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); @@ -299,3 +302,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int QFile output(tmpfile); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); @@ -354,3 +357,3 @@ void ViewMail::slotNextMail() -ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) +ViewMail::ViewMail( QWidget *parent, const char *name, Qt::WFlags fl) : ViewMailBase(parent, name, fl), _inLoop(false) @@ -371,3 +374,3 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) attachments->setEnabled(m_gotBody); - connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); + connect( attachments, SIGNAL( clicked(Q3ListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(Q3ListViewItem*,const QPoint&, int) ) ); @@ -559,6 +562,6 @@ void ViewMail::slotDeleteMail( ) -MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) +MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, Qt::WFlags f) : QDialog(parent,name,modal) { - QVBoxLayout*dlglayout = new QVBoxLayout(this); + Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this); dlglayout->setSpacing(2); diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index bb5b685..6cf6efb 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h @@ -9,3 +9,3 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qmap.h> @@ -13,3 +13,3 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -17,11 +17,11 @@ -class AttachItem : public QListViewItem +class AttachItem : public Q3ListViewItem { public: - AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path); - AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path); + AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path); + AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path); int Partnumber() { return _partNum; } - bool isParentof(const QValueList<int>&path); + bool isParentof(const Q3ValueList<int>&path); @@ -30,3 +30,3 @@ private: /* needed for a better display of attachments */ - QValueList<int> _path; + Q3ValueList<int> _path; }; @@ -38,3 +38,3 @@ class ViewMail : public ViewMailBase public: - ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); + ViewMail( QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0); ~ViewMail(); @@ -52,3 +52,3 @@ protected: QString deHtml(const QString &string); - AttachItem* searchParent(const QValueList<int>&path); + AttachItem* searchParent(const Q3ValueList<int>&path); AttachItem* lastChild(AttachItem*parent); @@ -60,3 +60,3 @@ protected slots: void setText(); - void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); + void slotItemClicked( Q3ListViewItem * item , const QPoint & point, int c ); void slotDeleteMail( ); @@ -85,3 +85,3 @@ class MailImageDlg:public QDialog public: - MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); + MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, Qt::WFlags f = 0); ~MailImageDlg(); diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 3bb964e..371ee91 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -1,11 +1,14 @@ // CHANGED 2004-08-06 Lutz Rogowski -#include <qtextbrowser.h> -#include <qlistview.h> +#include <q3textbrowser.h> +#include <q3listview.h> #include <qaction.h> #include <qlabel.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qapplication.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qmenubar.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PopupMenu> #include <kiconloader.h> @@ -17,4 +20,4 @@ -ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) - : QMainWindow(parent, name, fl) +ViewMailBase::ViewMailBase(QWidget *parent, const char *name, Qt::WFlags fl) + : Q3MainWindow(parent, name, fl) { @@ -23,5 +26,5 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) - toolbar = new QToolBar(this); + toolbar = new Q3ToolBar(this); menubar = new QMenuBar( toolbar ); - mailmenu = new QPopupMenu( menubar ); + mailmenu = new Q3PopupMenu( menubar ); menubar->insertItem( i18n( "Mail" ), mailmenu ); @@ -71,6 +74,6 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) closeMail->addTo(mailmenu); - QVBox *view = new QVBox(this); + Q3VBox *view = new Q3VBox(this); setCentralWidget(view); - attachments = new QListView(view); + attachments = new Q3ListView(view); int fixh = 100; @@ -87,3 +90,3 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) - browser = new QTextBrowser(view); + browser = new Q3TextBrowser(view); diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index 7c075eb..3f1dead 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h @@ -4,3 +4,6 @@ -#include <qmainwindow.h> +#include <q3mainwindow.h> +//Added by qt3to4: +#include <Q3PopupMenu> +#include <QKeyEvent> @@ -13,9 +16,9 @@ class QAction; class OpenDiag; -class QListView; -class QToolBar; -class QTextBrowser; +class Q3ListView; +class Q3ToolBar; +class Q3TextBrowser; class QMenuBar; -class QPopupMenu; +class Q3PopupMenu; -class ViewMailBase : public QMainWindow +class ViewMailBase : public Q3MainWindow { @@ -24,3 +27,3 @@ class ViewMailBase : public QMainWindow public: - ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); + ViewMailBase(QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0); @@ -28,8 +31,8 @@ protected: QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource; - QListView *attachments; - QToolBar *toolbar; - QTextBrowser *browser; + Q3ListView *attachments; + Q3ToolBar *toolbar; + Q3TextBrowser *browser; OpenDiag *openDiag; QMenuBar *menubar; - QPopupMenu *mailmenu; + Q3PopupMenu *mailmenu; diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8385bcc..c1a2f76 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -34,3 +34,3 @@ #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlayout.h> @@ -39,9 +39,9 @@ #include <qmessagebox.h> -#include <qprogressbar.h> -#include <qmultilineedit.h> +#include <q3progressbar.h> +#include <q3multilineedit.h> #include <qtimer.h> -#include <qwidgetstack.h> -#include <qptrlist.h> +#include <q3widgetstack.h> +#include <q3ptrlist.h> #include <qregexp.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qfile.h> @@ -50,2 +50,8 @@ #include <qsplitter.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QKeyEvent> +#include <Q3Frame> +#include <QLabel> +#include <Q3ValueList> #endif @@ -130,3 +136,3 @@ #else -#include <qprocess.h> +#include <q3process.h> #endif @@ -142,3 +148,3 @@ extern int globalFlagBlockStartup; -MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms,QDateTime start ) : QTextBrowser(parent) +MissedAlarmTextBrowser::MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms,QDateTime start ) : Q3TextBrowser(parent) @@ -279,9 +285,9 @@ class KOBeamPrefs : public QDialog setCaption( i18n("Beam Options") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("File format"), this ); lay->addWidget( format ); format->setExclusive ( true ) ; - QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); + Q3ButtonGroup* time = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Time format"), this ); lay->addWidget( time ); time->setExclusive ( true ) ; @@ -314,3 +320,3 @@ class KOCatPrefs : public QDialog setCaption( i18n("Manage new Categories") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -319,3 +325,3 @@ class KOCatPrefs : public QDialog lay->addWidget( lab ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("New categories not in list:"), this ); lay->addWidget( format ); @@ -375,3 +381,3 @@ void CalendarView::init() mNextAlarmDateTime = QDateTime::currentDateTime(); - setFocusPolicy (NoFocus ); + setFocusPolicy (Qt::NoFocus ); mViewerCallerIsSearchDialog = false; @@ -396,3 +402,3 @@ void CalendarView::init() - QBoxLayout *topLayout = (QBoxLayout*)layout(); + Q3BoxLayout *topLayout = (Q3BoxLayout*)layout(); #ifndef KORG_NOSPLITTER @@ -427,5 +433,5 @@ void CalendarView::init() QWidget *rightBox = new QWidget( mPanner ); - QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); + Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox ); - mRightFrame = new QWidgetStack( rightBox ); + mRightFrame = new Q3WidgetStack( rightBox ); rightLayout->addWidget( mRightFrame, 1 ); @@ -456,3 +462,3 @@ void CalendarView::init() #ifdef DESKTOP_VERSION - mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,QScrollBar::Horizontal, this ); + mDateScrollBar = new QScrollBar ( 1, 365, 1,30, 200,Qt::Horizontal, this ); topLayout->addWidget( mDateScrollBar ); @@ -503,4 +509,4 @@ void CalendarView::init() //mainBoxLayout->addWidget ( rightBox, 10 ); - QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); - mRightFrame = new QWidgetStack( rightBox ); + Q3BoxLayout *rightLayout = new Q3VBoxLayout( rightBox ); + mRightFrame = new Q3WidgetStack( rightBox ); rightLayout->addWidget( mRightFrame, 10 ); @@ -618,5 +624,5 @@ void CalendarView::init() - mDateFrame = new QVBox(0,0,WType_Popup); + mDateFrame = new Q3VBox(0,0,Qt::WType_Popup); //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); - mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); + mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised ); mDateFrame->setLineWidth(3); @@ -671,3 +677,3 @@ void CalendarView::nextConflict( bool all, bool allday ) flag_blockConflict = true; - QPtrList<Event> testlist = mCalendar->events(); + Q3PtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); @@ -687,3 +693,3 @@ void CalendarView::nextConflict( bool all, bool allday ) Event * cE2 = 0; - QPtrList<Event> testlist2 = testlist; + Q3PtrList<Event> testlist2 = testlist; test = testlist.first(); @@ -837,3 +843,3 @@ void CalendarView::checkFiles() QString message; - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -859,3 +865,3 @@ void CalendarView::checkAlarms() QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); - int daysto = dt.daysTo( QDate::currentDate() ); + int daysto = dt.daysTo( (QDateTime)QDate::currentDate() ); int days = config->readNumEntry( "LatestProgramStopDays" , daysto); @@ -869,4 +875,4 @@ void CalendarView::checkAlarms() //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); - QPtrList<Incidence> el = mCalendar->rawIncidences(); - QPtrList<Incidence> al; + Q3PtrList<Incidence> el = mCalendar->rawIncidences(); + Q3PtrList<Incidence> al; Incidence* inL = el.first(); @@ -888,5 +894,5 @@ void CalendarView::checkAlarms() if ( al.count() ) { - QDialog* dia = new QDialog( this, "huhu", false, WDestructiveClose | WStyle_StaysOnTop ); + QDialog* dia = new QDialog( this, "huhu", false, Qt::WDestructiveClose | Qt::WStyle_StaysOnTop ); dia->setCaption( i18n("KO/Pi: Missing alarms!") ); - QVBoxLayout* lay = new QVBoxLayout( dia ); + Q3VBoxLayout* lay = new Q3VBoxLayout( dia ); lay->setSpacing( 0 ); @@ -1218,3 +1224,3 @@ void CalendarView::computeAlarm( QString msg ) #else - QProcess* p = new QProcess(); + Q3Process* p = new Q3Process(); p->addArgument( tempfilename.latin1() ); @@ -1268,6 +1274,6 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) QFile file( fn ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { qDebug("KO: Error writing next suspend alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); } else { - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << mess; @@ -1296,6 +1302,6 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) QFile file( fn ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { qDebug("KO: Error writing next alarm file %s\nContent: \n%s ", fn.latin1(), mess.latin1()); } else { - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << mess; @@ -1572,3 +1578,3 @@ Event* CalendarView::getLastSyncEvent() // if yes, we set this id in the profile to delete -void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ) +void CalendarView::checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete ) { @@ -1602,3 +1608,3 @@ void CalendarView::checkExternalId( Incidence * inc ) { - QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; + Q3PtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; checkExternSyncEvent( lastSync, inc ); @@ -1626,4 +1632,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int clearAllViews(); - QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); - QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); + Q3PtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); + Q3PtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); bool fullDateRange = false; @@ -1686,6 +1692,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int qDebug("KO: mLastCalendarSync %s .Full: %d",mLastCalendarSync.toString().latin1(), fullDateRange); - QPtrList<Incidence> er = remote->rawIncidences(); + Q3PtrList<Incidence> er = remote->rawIncidences(); Incidence* inR = er.first(); Incidence* inL; - QProgressBar bar( er.count(),0 ); + Q3ProgressBar bar( er.count(),0 ); bar.setCaption (i18n("Syncing - close to abort!") ); @@ -1833,3 +1839,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } - QPtrList<Incidence> el = local->rawIncidences(); + Q3PtrList<Incidence> el = local->rawIncidences(); inL = el.first(); @@ -2050,3 +2056,3 @@ void CalendarView::syncExternal( int mode ) { - QPtrList<Incidence> iL = mCalendar->rawIncidences(); + Q3PtrList<Incidence> iL = mCalendar->rawIncidences(); Incidence* inc = iL.first(); @@ -2117,3 +2123,3 @@ bool CalendarView::importBday() } - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; @@ -2188,3 +2194,3 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; @@ -2352,3 +2358,3 @@ bool CalendarView::loadCalendars() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -2366,3 +2372,3 @@ bool CalendarView::restoreCalendarSettings() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -2531,3 +2537,3 @@ bool CalendarView::checkAllFileVersions() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -2593,3 +2599,3 @@ bool CalendarView::saveCalendars() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -2697,3 +2703,3 @@ void CalendarView::readSettings() - QValueList<int> sizes = config->readIntListEntry("Separator1"); + Q3ValueList<int> sizes = config->readIntListEntry("Separator1"); if (sizes.count() != 2) { @@ -2765,3 +2771,3 @@ void CalendarView::readSettings() - QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); + Q3ValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); @@ -2844,3 +2850,3 @@ void CalendarView::writeSettings() QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); - int days = dt.daysTo( QDate::currentDate() ); + int days = dt.daysTo( (QDateTime)QDate::currentDate() ); dt = dt.addDays( days ); @@ -2871,5 +2877,5 @@ void CalendarView::writeSettings() - QValueList<int> listINT = mLeftFrame->sizes(); + Q3ValueList<int> listINT = mLeftFrame->sizes(); config->writeEntry("Left Splitter Frame",listINT); - QValueList<int> listINT2 = mMainFrame->sizes(); + Q3ValueList<int> listINT2 = mMainFrame->sizes(); config->writeEntry("Main Splitter Frame",listINT2); @@ -3168,3 +3174,3 @@ void CalendarView::checkConflictForEvent() } - QPtrList<Event> testlist = mCalendar->events(); + Q3PtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); @@ -3430,3 +3436,3 @@ void CalendarView::removeCategories() { - QPtrList<Incidence> incList = mCalendar->rawIncidences(); + Q3PtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; @@ -3451,3 +3457,3 @@ int CalendarView::addCategories() { - QPtrList<Incidence> incList = mCalendar->rawIncidences(); + Q3PtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; @@ -3509,3 +3515,3 @@ void CalendarView::beamIncidence(Incidence * Inc) { - QPtrList<Incidence> delSel ; + Q3PtrList<Incidence> delSel ; delSel.append(Inc); @@ -3515,3 +3521,3 @@ void CalendarView::beamCalendar() { - QPtrList<Incidence> delSel = mCalendar->rawIncidences(); + Q3PtrList<Incidence> delSel = mCalendar->rawIncidences(); //qDebug("beamCalendar() "); @@ -3521,3 +3527,3 @@ void CalendarView::beamFilteredCalendar() { - QPtrList<Incidence> delSel = mCalendar->incidences(); + Q3PtrList<Incidence> delSel = mCalendar->incidences(); //qDebug("beamFilteredCalendar() "); @@ -3525,3 +3531,3 @@ void CalendarView::beamFilteredCalendar() } -void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) +void CalendarView::beamIncidenceList(Q3PtrList<Incidence> delSel ) { @@ -4317,3 +4323,3 @@ void CalendarView::schedule_publish(Incidence *incidence) if (incidence->attendeeCount()>0) { - QPtrList<Attendee> attendees = incidence->attendees(); + Q3PtrList<Attendee> attendees = incidence->attendees(); attendees.first(); @@ -4726,3 +4732,3 @@ void CalendarView::showDates(const DateList &selectedDates) -QPtrList<CalFilter> CalendarView::filters() +Q3PtrList<CalFilter> CalendarView::filters() { @@ -4767,3 +4773,3 @@ void CalendarView::showFilter(bool visible) mCalEditView->show(); - QValueList<int> sizes; + Q3ValueList<int> sizes; sizes = mLeftFrame->sizes(); @@ -4848,3 +4854,3 @@ void CalendarView::takeOverCalendar() clearAllViews(); - QPtrList<Event> events = mCalendar->events(); + Q3PtrList<Event> events = mCalendar->events(); for(uint i=0; i<events.count(); ++i) { @@ -4855,3 +4861,3 @@ void CalendarView::takeOverCalendar() - QPtrList<Todo> todos = mCalendar->todos(); + Q3PtrList<Todo> todos = mCalendar->todos(); for(uint i=0; i<todos.count(); ++i) { @@ -4862,3 +4868,3 @@ void CalendarView::takeOverCalendar() - QPtrList<Journal> journals = mCalendar->journals(); + Q3PtrList<Journal> journals = mCalendar->journals(); for(uint i=0; i<journals.count(); ++i) { @@ -4877,3 +4883,3 @@ void CalendarView::showIntro() -QWidgetStack *CalendarView::viewStack() +Q3WidgetStack *CalendarView::viewStack() { @@ -5062,3 +5068,3 @@ bool CalendarView::removeCompletedSubTodos( Todo* t ) bool deleteTodo = true; - QPtrList<Incidence> subTodos; + Q3PtrList<Incidence> subTodos; Incidence *aTodo; @@ -5088,4 +5094,4 @@ void CalendarView::purgeCompleted() - QPtrList<Todo> todoCal; - QPtrList<Todo> rootTodos; + Q3PtrList<Todo> todoCal; + Q3PtrList<Todo> rootTodos; //QPtrList<Incidence> rel; diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 60b1276..b4eada7 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -26,9 +26,11 @@ -#include <qframe.h> +#include <q3frame.h> #include <qlayout.h> #include <qwidget.h> -#include <qptrlist.h> -#include <qvbox.h> +#include <q3ptrlist.h> +#include <q3vbox.h> #include <qmap.h> #include <qscrollbar.h> +//Added by qt3to4: +#include <QKeyEvent> #ifndef DESKTOP_VERSION @@ -49,3 +51,3 @@ -class QWidgetStack; +class Q3WidgetStack; class QSplitter; @@ -86,9 +88,9 @@ using namespace KCal; -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qtextcodec.h> -class MissedAlarmTextBrowser : public QTextBrowser { +class MissedAlarmTextBrowser : public Q3TextBrowser { Q_OBJECT public: - MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); + MissedAlarmTextBrowser(QWidget *parent, Q3PtrList<Incidence> alarms ,QDateTime start); ~MissedAlarmTextBrowser(); @@ -98,3 +100,3 @@ class MissedAlarmTextBrowser : public QTextBrowser { Incidence * getNextInc(QDateTime start ); - QPtrList<Incidence> mAlarms; + Q3PtrList<Incidence> mAlarms; signals: @@ -129,3 +131,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser - QWidgetStack *viewStack(); + Q3WidgetStack *viewStack(); QWidget *leftFrame(); @@ -443,3 +445,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void toggleFilerEnabled(); - QPtrList<CalFilter> filters(); + Q3PtrList<CalFilter> filters(); void toggleFilter(); @@ -497,3 +499,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void beamFilteredCalendar() ; - void beamIncidenceList(QPtrList<Incidence>) ; + void beamIncidenceList(Q3PtrList<Incidence>) ; void manageCategories(); @@ -577,3 +579,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser QDateTime loadedFileVersion; - void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); + void checkExternSyncEvent( Q3PtrList<Event> lastSync , Incidence* toDelete ); void checkExternalId( Incidence * inc ); @@ -595,6 +597,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; - QWidgetStack *mRightFrame; + Q3WidgetStack *mRightFrame; KDatePicker* mDatePicker; - QVBox* mDateFrame; + Q3VBox* mDateFrame; @@ -620,3 +622,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser // Calendar filters - QPtrList<CalFilter> mFilters; + Q3PtrList<CalFilter> mFilters; diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp index 7b7d54c..ecb9e03 100644 --- a/korganizer/calprintbase.cpp +++ b/korganizer/calprintbase.cpp @@ -27,7 +27,9 @@ #include <qlayout.h> -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> -#include <qptrlist.h> -#include <qintdict.h> +#include <q3ptrlist.h> +#include <q3intdict.h> #include <qfontmetrics.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -147,4 +149,4 @@ QWidget *CalPrintBase::configWidget( QWidget *w ) { - QFrame *wdg = new QFrame( w ); - QVBoxLayout *layout = new QVBoxLayout( wdg ); + Q3Frame *wdg = new Q3Frame( w ); + Q3VBoxLayout *layout = new Q3VBoxLayout( wdg ); @@ -287,3 +289,3 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd, const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); - p.drawText(x, y, width, height/4, AlignCenter, calSys->monthName( qd ) ); + p.drawText(x, y, width, height/4, Qt::AlignCenter, calSys->monthName( qd ) ); @@ -303,3 +305,3 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd, p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight, - AlignCenter, tmpStr); + Qt::AlignCenter, tmpStr); monthDate2 = monthDate2.addDays(1); @@ -320,3 +322,3 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd, y+height/4+cellHeight+(row*cellHeight), - cellWidth, cellHeight, AlignCenter, + cellWidth, cellHeight, Qt::AlignCenter, tmpStr.setNum(monthDate.day()) ); @@ -360,3 +362,3 @@ void CalPrintBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd, // QBrush( Dense7Pattern ) ); - p.drawText( x+5, y, width-10, height, AlignCenter | AlignVCenter, + p.drawText( x+5, y, width-10, height, Qt::AlignCenter | Qt::AlignVCenter, calSys->weekDayName( qd ) ); @@ -403,6 +405,6 @@ void CalPrintBase::drawTimeLine(QPainter &p, p.drawText(x+2, (int)currY+2, width/2-2, (int)cellHeight, - AlignTop|AlignRight, numStr); + Qt::AlignTop|Qt::AlignRight, numStr); p.setFont(QFont("helvetica", 10, QFont::Normal)); p.drawText(x+width/2, (int)currY+2, width/2+2, (int)(cellHeight/2)-3, - AlignTop | AlignLeft, "00"); + Qt::AlignTop | Qt::AlignLeft, "00"); } else { @@ -412,3 +414,3 @@ void CalPrintBase::drawTimeLine(QPainter &p, p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3, - AlignTop|AlignLeft, numStr); + Qt::AlignTop|Qt::AlignLeft, numStr); } @@ -474,3 +476,3 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList, p.drawText( x+5, offset+5, width-10, height-10, - AlignCenter | AlignVCenter | AlignJustify | WordBreak, + Qt::AlignCenter | Qt::AlignVCenter | Qt::AlignJustify | Qt::WordBreak, text ); @@ -495,3 +497,3 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList, p.drawText( x+5, offset+5, width-10, height-10, - AlignLeft | AlignTop | AlignJustify , + Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify , multiDayStr); @@ -562,3 +564,3 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events, - QPtrList<KOrg::CellItem> cells; + Q3PtrList<KOrg::CellItem> cells; cells.setAutoDelete( true ); @@ -570,3 +572,3 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events, - QPtrListIterator<KOrg::CellItem> it1( cells ); + Q3PtrListIterator<KOrg::CellItem> it1( cells ); for( it1.toFirst(); it1.current(); ++it1 ) { @@ -595,3 +597,3 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events, - p.setBrush( QBrush( NoBrush ) ); + p.setBrush( QBrush( Qt::NoBrush ) ); } @@ -637,3 +639,3 @@ void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p, p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3, - AlignLeft | AlignTop | AlignJustify | WordBreak, + Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify | Qt::TextWordWrap, text); @@ -672,3 +674,3 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd, - p.drawText( x+5, y, width-25, mSubHeaderHeight, AlignLeft | AlignVCenter, + p.drawText( x+5, y, width-25, mSubHeaderHeight, Qt::AlignLeft | Qt::AlignVCenter, hstring ); @@ -682,3 +684,3 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd, } - p.drawText(x+5, y, width-10, mSubHeaderHeight, AlignRight | AlignVCenter, + p.drawText(x+5, y, width-10, mSubHeaderHeight, Qt::AlignRight | Qt::AlignVCenter, dayNumStr); @@ -726,3 +728,3 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd, p.drawText(x+5, y+textY, width-10, lineSpacing, - AlignLeft|AlignBottom, outStr); + Qt::AlignLeft|Qt::AlignBottom, outStr); textY+=lineSpacing; @@ -745,3 +747,3 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd, p.drawText(x+5, y+textY, width-10, lineSpacing, - AlignLeft|AlignBottom, text); + Qt::AlignLeft|Qt::AlignBottom, text); textY+=lineSpacing; @@ -851,3 +853,3 @@ void CalPrintBase::drawMonth(QPainter &p, const QDate &qd, bool weeknumbers, QRect rc(x, y+yoffset+cellHeight*row, xoffset-1, cellHeight); - p.drawText( rc, AlignRight|AlignVCenter, QString::number(calWeek) ); + p.drawText( rc, Qt::AlignRight|Qt::AlignVCenter, QString::number(calWeek) ); weekDate = weekDate.addDays(7); @@ -899,3 +901,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & // lines of the tree can easily be drawn (needed if a new page is started) - static QPtrList<TodoParentStart> startPoints; + static Q3PtrList<TodoParentStart> startPoints; if (level<1) { @@ -912,3 +914,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & int left = possummary+(level*10); - rect = p.boundingRect(left, y, (posdue-left-5),-1, WordBreak, outStr); + rect = p.boundingRect(left, y, (posdue-left-5),-1, Qt::WordBreak, outStr); //qDebug("bottom1 %d ", rect.bottom() ); @@ -917,3 +919,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1, - WordBreak, outStr ); + Qt::WordBreak, outStr ); } @@ -935,4 +937,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & start = p.viewport().top(); - p.moveTo( center, start ); - p.lineTo( center, to ); + p.drawLine( center, start, center, to ); rct->mSamePage=false; @@ -953,3 +954,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & outStr.setNum(priority); - rect = p.boundingRect(pospriority, y + 10, 5, -1, AlignCenter, outStr); + rect = p.boundingRect(pospriority, y + 10, 5, -1, Qt::AlignCenter, outStr); // Make it a more reasonable size @@ -958,3 +959,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & if ( priority > 0 && pospriority>=0 ) { - p.drawText(rect, AlignCenter, outStr); + p.drawText(rect, Qt::AlignCenter, outStr); p.drawRect(rect); @@ -966,3 +967,3 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & QPen pen = p.pen(); - p.setPen ( QPen ( black, 2) ); + p.setPen ( QPen ( Qt::black, 2) ); p.drawLine( rect.left()+2,rect.top()+rect.height()/2, rect.right()-2, +rect.top()+rect.height()/2 ); @@ -983,5 +984,4 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & int endx( rect.left() ); - p.moveTo(center, bottom); - p.lineTo(center, to); - p.lineTo(endx, to); + p.drawLine(center,bottom, center,to); + p.drawLine(center,to, endx,to); } @@ -1001,5 +1001,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & rect = p.boundingRect( left, rect.top(), (posdue-(left + rect.width() + 5)), - -1, WordBreak, outStr); + -1, Qt::WordBreak, outStr); QRect newrect; - p.drawText( rect, WordBreak, outStr, -1, &newrect ); + p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect ); //ft.setStrikeOut(false); @@ -1018,4 +1018,4 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & rect = p.boundingRect( left+20, y, x+width-(left+10), -1, - WordBreak, outStr ); - p.drawText( rect, WordBreak, outStr, -1, &newrect ); + Qt::WordBreak, outStr ); + p.drawText( rect, Qt::WordBreak, outStr, -1, &newrect ); } @@ -1140,4 +1140,4 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, QFont font("helvetica", 18, QFont::Bold); - QPen penA( black,0); - QPen penB( black,3); + QPen penA( Qt::black,0); + QPen penB( Qt::black,3); p.setFont(font); @@ -1163,3 +1163,3 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, lineSpacing = p.fontMetrics().lineSpacing(); - p.drawText(0, lineSpacing * 0, width, lineSpacing, AlignRight |AlignTop, title ); + p.drawText(0, lineSpacing * 0, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title ); @@ -1173,3 +1173,3 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, title += QString::number(fd.year()); - p.drawText(0, lineSpacing * 1, width, lineSpacing, AlignRight |AlignTop, title ); + p.drawText(0, lineSpacing * 1, width, lineSpacing, Qt::AlignRight |Qt::AlignTop, title ); mSubHeaderHeight = tempStore ; @@ -1199,3 +1199,3 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width, p.drawText(offsetLeft, mHeaderHeight + 5, - width, mSubHeaderHeight, AlignHCenter | AlignVCenter, + width, mSubHeaderHeight, Qt::AlignHCenter | Qt::AlignVCenter, dayName); @@ -1256,6 +1256,6 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width, p.drawText(offsetLeft+12, offset+startMinuteOff+startTime*cellHeight+5, width-24, - cheight-10, AlignHCenter | AlignTop, text); + cheight-10, Qt::AlignHCenter | Qt::AlignTop, text); } } - p.setBrush(QBrush(NoBrush)); + p.setBrush(QBrush(Qt::NoBrush)); mSubHeaderHeight = tempStore ; @@ -1276,8 +1276,8 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth, for (int i = 0; i < hours; i++) { - p.setPen(QPen(black,1)); + p.setPen(QPen(Qt::black,1)); p.drawLine(0, offset+i*cellHeight, width, offset+i*cellHeight); - p.setPen(QPen(gray,0)); + p.setPen(QPen(Qt::gray,0)); p.drawLine(37, offset+i*cellHeight+(cellHeight/2), width, offset+i*cellHeight+(cellHeight/2)); - p.setPen(QPen(black,0)); + p.setPen(QPen(Qt::black,0)); @@ -1291,6 +1291,6 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth, p.drawText(0, offset+i*cellHeight, 33, cellHeight/2, - AlignTop|AlignRight, numStr); + Qt::AlignTop|Qt::AlignRight, numStr); p.setFont(QFont("helvetica", 12, QFont::Bold)); p.drawText(37, offset+i*cellHeight, 45, cellHeight/2, - AlignTop | AlignLeft, "00"); + Qt::AlignTop | Qt::AlignLeft, "00"); } else { @@ -1300,3 +1300,3 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth, p.drawText(4, offset+i*cellHeight, 70, cellHeight/2, - AlignTop|AlignLeft, numStr); + Qt::AlignTop|Qt::AlignLeft, numStr); } diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp index 0cdf28e..d4bf988 100644 --- a/korganizer/calprinter.cpp +++ b/korganizer/calprinter.cpp @@ -23,4 +23,4 @@ -#include <qvbuttongroup.h> -#include <qwidgetstack.h> +// #include <qvbuttongroup.h> +#include <q3widgetstack.h> #include <qradiobutton.h> @@ -30,4 +30,7 @@ #include <qlabel.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qsplitter.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PtrList> @@ -176,3 +179,3 @@ void CalPrinter::updateConfig() -CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, +CalPrintDialog::CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p, QWidget *parent, const char *name ) @@ -181,5 +184,5 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, { - QVBox *page = new QVBox(this);//makeVBoxMainWidget(); + Q3VBox *page = new Q3VBox(this);//makeVBoxMainWidget(); setMainWidget( page ); - QHBox *printerLayout = new QHBox( page ); + Q3HBox *printerLayout = new Q3HBox( page ); @@ -193,5 +196,5 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, QSplitter *splitter = new QSplitter( page ); - splitter->setOrientation( QSplitter::Horizontal ); + splitter->setOrientation( Qt::Horizontal ); - mTypeGroup = new QVButtonGroup( i18n("View Type"), splitter, "buttonGroup" ); + mTypeGroup = new Q3VButtonGroup( i18n("View Type"), splitter, "buttonGroup" ); // use the minimal width possible = max width of the radio buttons, not extensible @@ -202,3 +205,3 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, QWidget *splitterRight = new QWidget( splitter, "splitterRight" ); - QGridLayout *splitterRightLayout = new QGridLayout( splitterRight ); + Q3GridLayout *splitterRightLayout = new Q3GridLayout( splitterRight ); splitterRightLayout->setMargin( marginHint() ); @@ -206,3 +209,3 @@ CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, - mConfigArea = new QWidgetStack( splitterRight, "configWidgetStack" ); + mConfigArea = new Q3WidgetStack( splitterRight, "configWidgetStack" ); splitterRightLayout->addMultiCellWidget( mConfigArea, 0,0, 0,1 ); diff --git a/korganizer/calprinter.h b/korganizer/calprinter.h index 7b58f4f..e065779 100644 --- a/korganizer/calprinter.h +++ b/korganizer/calprinter.h @@ -1 +1,3 @@ +//Added by qt3to4: +#include <QLabel> /* @@ -30,3 +32,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -40,4 +42,4 @@ using namespace KCal; -class QVButtonGroup; -class QWidgetStack; +class Q3VButtonGroup; +class Q3WidgetStack; class KPrinter; @@ -96,3 +98,3 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase protected: - QPtrList<CalPrintBase> mPrintPlugins; + Q3PtrList<CalPrintBase> mPrintPlugins; @@ -111,3 +113,3 @@ class CalPrintDialog : public KDialogBase public: - CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, + CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p, QWidget *parent = 0, const char *name = 0 ); @@ -129,5 +131,5 @@ signals: KPrinter *mPrinter; - QVButtonGroup *mTypeGroup; - QWidgetStack *mConfigArea; - QPtrList<CalPrintBase> mPrintPlugins; + Q3VButtonGroup *mTypeGroup; + Q3WidgetStack *mConfigArea; + Q3PtrList<CalPrintBase> mPrintPlugins; QLabel *mPrinterLabel; diff --git a/korganizer/calprintplugins.cpp b/korganizer/calprintplugins.cpp index bc35ca4..9b6dc6e 100644 --- a/korganizer/calprintplugins.cpp +++ b/korganizer/calprintplugins.cpp @@ -27,3 +27,3 @@ #include <qpainter.h> -#include <qdatetimeedit.h> +#include <q3datetimeedit.h> #include <qdatetime.h> @@ -31,3 +31,3 @@ #include <qlineedit.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> diff --git a/korganizer/cellitem.cpp b/korganizer/cellitem.cpp index 61d06ac..1fd703c 100644 --- a/korganizer/cellitem.cpp +++ b/korganizer/cellitem.cpp @@ -29,3 +29,5 @@ -#include <qintdict.h> +#include <q3intdict.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -38,3 +40,3 @@ QString CellItem::label() const -QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, +Q3PtrList<CellItem> CellItem::placeItem( Q3PtrList<CellItem> cells, CellItem *placeItem ) @@ -43,8 +45,8 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, - QPtrList<KOrg::CellItem> conflictItems; + Q3PtrList<KOrg::CellItem> conflictItems; int maxSubCells = 0; - QIntDict<KOrg::CellItem> subCellDict; + Q3IntDict<KOrg::CellItem> subCellDict; // Find all items which are in same cell - QPtrListIterator<KOrg::CellItem> it2( cells ); + Q3PtrListIterator<KOrg::CellItem> it2( cells ); for( it2.toFirst(); it2.current(); ++it2 ) { @@ -85,3 +87,3 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, - QPtrListIterator<KOrg::CellItem> it3( conflictItems ); + Q3PtrListIterator<KOrg::CellItem> it3( conflictItems ); for( it3.toFirst(); it3.current(); ++it3 ) { diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h index 72773d0..b917bd5 100644 --- a/korganizer/cellitem.h +++ b/korganizer/cellitem.h @@ -27,3 +27,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -55,3 +55,3 @@ class CellItem */ - static QPtrList<CellItem> placeItem( QPtrList<CellItem> cells, + static Q3PtrList<CellItem> placeItem( Q3PtrList<CellItem> cells, CellItem *placeItem ); diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index ea510f1..53507d3 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -36,2 +36,4 @@ #include "koprefs.h" +//Added by qt3to4: +#include <QResizeEvent> diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index 87cc59f..75d387c 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h @@ -1 +1,4 @@ +//Added by qt3to4: +#include <QResizeEvent> +#include <Q3PtrList> /* @@ -102,3 +105,3 @@ class DateNavigatorContainer: public QWidget - QPtrList<KDateNavigator> mExtraViews; + Q3PtrList<KDateNavigator> mExtraViews; 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 @@ -13,7 +13,8 @@ #include <qpushbutton.h> -#include <qframe.h> -#include <qbuttongroup.h> +#include <q3frame.h> +#include <q3buttongroup.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qradiobutton.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qlabel.h> @@ -22,3 +23,7 @@ #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> #include "tr.h" @@ -29,3 +34,3 @@ */ -FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) +FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, Qt::WFlags fl ) : QWidget( parent, name, fl ) @@ -34,10 +39,10 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) setName( "FilterEdit_base" ); - FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); + FilterEdit_baseLayout = new Q3VBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); - mCriteriaFrame = new QFrame( this, "mCriteriaFrame" ); - mCriteriaFrame->setFrameShape( QFrame::StyledPanel ); - mCriteriaFrame->setFrameShadow( QFrame::Raised ); - mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout"); + mCriteriaFrame = new Q3Frame( this, "mCriteriaFrame" ); + mCriteriaFrame->setFrameShape( Q3Frame::StyledPanel ); + mCriteriaFrame->setFrameShadow( Q3Frame::Raised ); + mCriteriaFrameLayout = new Q3VBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout"); - ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" ); + ButtonGroup1 = new Q3ButtonGroup( mCriteriaFrame, "ButtonGroup1" ); ButtonGroup1->setColumnLayout(0, Qt::Vertical ); @@ -45,6 +50,6 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) ButtonGroup1->layout()->setMargin( 6 ); - ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() ); + ButtonGroup1Layout = new Q3GridLayout( ButtonGroup1->layout() ); ButtonGroup1Layout->setAlignment( Qt::AlignTop ); - layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); + layout4 = new Q3HBoxLayout( 0, 0, 6, "layout4"); @@ -61,3 +66,3 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) - mCatList = new QListBox( ButtonGroup1, "mCatList" ); + mCatList = new Q3ListBox( ButtonGroup1, "mCatList" ); @@ -66,3 +71,3 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) - layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); + layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7"); @@ -78,3 +83,3 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) - layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); + layout9 = new Q3HBoxLayout( 0, 0, 6, "layout9"); @@ -93,3 +98,3 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) - layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); + layout2 = new Q3HBoxLayout( 0, 0, 0, "layout2"); @@ -111,3 +116,2 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) resize( QSize(300, 200).expandedTo(minimumSizeHint()) ); - clearWState( WState_Polished ); } 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 @@ -14,13 +14,19 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <QLabel> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; class QSpacerItem; -class QFrame; -class QButtonGroup; +class Q3Frame; +class Q3ButtonGroup; class QRadioButton; class QPushButton; -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QLabel; @@ -33,7 +39,7 @@ class FilterEdit_base : public QWidget public: - FilterEdit_base( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + FilterEdit_base( QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0 ); ~FilterEdit_base(); - QFrame* mCriteriaFrame; - QButtonGroup* ButtonGroup1; + Q3Frame* mCriteriaFrame; + Q3ButtonGroup* ButtonGroup1; QRadioButton* mCatShowCheck; @@ -41,3 +47,3 @@ public: QPushButton* mCatEditButton; - QListBox* mCatList; + Q3ListBox* mCatList; QLabel* textLabel1; @@ -55,9 +61,9 @@ public: protected: - QVBoxLayout* FilterEdit_baseLayout; - QVBoxLayout* mCriteriaFrameLayout; - QGridLayout* ButtonGroup1Layout; - QHBoxLayout* layout4; - QHBoxLayout* layout7; - QHBoxLayout* layout9; - QHBoxLayout* layout2; + Q3VBoxLayout* FilterEdit_baseLayout; + Q3VBoxLayout* mCriteriaFrameLayout; + Q3GridLayout* ButtonGroup1Layout; + Q3HBoxLayout* layout4; + Q3HBoxLayout* layout7; + Q3HBoxLayout* layout9; + Q3HBoxLayout* layout2; diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp index df84911..a3cff49 100644 --- a/korganizer/filtereditdialog.cpp +++ b/korganizer/filtereditdialog.cpp @@ -28,4 +28,9 @@ #include <qradiobutton.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PtrList> + +#include <QDesktopWidget> @@ -55,3 +60,3 @@ public: -FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, +FilterEditDialog::FilterEditDialog(Q3PtrList<CalFilter> *filters,QWidget *parent, const char *name) : @@ -82,3 +87,3 @@ FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, - QGridLayout *topLayout = new QGridLayout(mainWidget,2,2); + Q3GridLayout *topLayout = new Q3GridLayout(mainWidget,2,2); topLayout->setSpacing(spacingHint()); diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h index 42aa3da..c1a52ed 100644 --- a/korganizer/filtereditdialog.h +++ b/korganizer/filtereditdialog.h @@ -25,3 +25,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -48,3 +48,3 @@ class FilterEditDialog : public KDialogBase public: - FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0); + FilterEditDialog(Q3PtrList<CalFilter> *,QWidget *parent=0, const char *name=0); virtual ~FilterEditDialog(); @@ -76,3 +76,3 @@ class FilterEditDialog : public KDialogBase private: - QPtrList<CalFilter> *mFilters; + Q3PtrList<CalFilter> *mFilters; diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp index fe78356..c2402d4 100644 --- a/korganizer/incomingdialog.cpp +++ b/korganizer/incomingdialog.cpp @@ -19,3 +19,3 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qfile.h> @@ -23,2 +23,4 @@ #include <qmap.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -58,5 +60,5 @@ -ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev, +ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev, Scheduler::Method method,ScheduleMessage::Status status) - : QListViewItem(parent) + : Q3ListViewItem(parent) { @@ -137,3 +139,3 @@ bool ScheduleItemVisitor::visit(Journal *) IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, - QWidget* parent,const char* name,bool modal,WFlags fl) : + QWidget* parent,const char* name,bool modal,Qt::WFlags fl) : IncomingDialog_base(parent,name,modal,fl) @@ -147,8 +149,8 @@ IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, #endif - mMessageListView->setColumnAlignment(1,AlignHCenter); - mMessageListView->setColumnAlignment(2,AlignHCenter); - mMessageListView->setColumnAlignment(3,AlignHCenter); - mMessageListView->setColumnAlignment(4,AlignHCenter); - QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), - this,SLOT(showEvent(QListViewItem *))); + mMessageListView->setColumnAlignment(1,Qt::AlignHCenter); + mMessageListView->setColumnAlignment(2,Qt::AlignHCenter); + mMessageListView->setColumnAlignment(3,Qt::AlignHCenter); + mMessageListView->setColumnAlignment(4,Qt::AlignHCenter); + QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)), + this,SLOT(showEvent(Q3ListViewItem *))); retrieve(); @@ -171,3 +173,3 @@ void IncomingDialog::retrieve() { - QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); + Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); @@ -254,3 +256,3 @@ void IncomingDialog::rejectMessage() -void IncomingDialog::showEvent(QListViewItem *item) +void IncomingDialog::showEvent(Q3ListViewItem *item) { @@ -271,3 +273,3 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item) Attendee *att; - QPtrList<Attendee> attlist = ev->attendees(); + Q3PtrList<Attendee> attlist = ev->attendees(); for (att=attlist.first(); att; att=attlist.next()) { @@ -516,3 +518,3 @@ bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc) KABC::Addressee::List addressList; - QPtrList <Attendee> attendees; + Q3PtrList <Attendee> attendees; Attendee *att; diff --git a/korganizer/incomingdialog.h b/korganizer/incomingdialog.h index 413ce6a..e002b25 100644 --- a/korganizer/incomingdialog.h +++ b/korganizer/incomingdialog.h @@ -21,3 +21,3 @@ -#include <qlistview.h> +#include <q3listview.h> @@ -31,6 +31,6 @@ using namespace KCal; -class ScheduleItemIn : public QListViewItem +class ScheduleItemIn : public Q3ListViewItem { public: - ScheduleItemIn(QListView *parent,IncidenceBase *ev,Scheduler::Method method, + ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev,Scheduler::Method method, ScheduleMessage::Status status); @@ -74,3 +74,3 @@ class IncomingDialog : public IncomingDialog_base IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, - QWidget* parent=0,const char* name=0,bool modal=false,WFlags fl=0); + QWidget* parent=0,const char* name=0,bool modal=false,Qt::WFlags fl=0); ~IncomingDialog(); @@ -89,3 +89,3 @@ class IncomingDialog : public IncomingDialog_base void rejectMessage(); - void showEvent(QListViewItem *); + void showEvent(Q3ListViewItem *); 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 @@ -13,4 +13,4 @@ #include <qvariant.h> -#include <qheader.h> -#include <qlistview.h> +#include <q3header.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -18,3 +18,5 @@ #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -27,3 +29,3 @@ */ -IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) +IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, name, modal, fl ) @@ -33,3 +35,3 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo setName( "IncomingDialog_base" ); - IncomingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout"); + IncomingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "IncomingDialog_baseLayout"); @@ -44,3 +46,3 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo - mMessageListView = new QListView( this, "mMessageListView" ); + mMessageListView = new Q3ListView( this, "mMessageListView" ); mMessageListView->addColumn( tr2i18n( "Summary" ) ); 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 @@ -14,8 +14,12 @@ #include <qdialog.h> - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QListView; -class QListViewItem; +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> +#include <Q3HBoxLayout> + +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; +class Q3ListView; +class Q3ListViewItem; class QPushButton; @@ -27,3 +31,3 @@ class IncomingDialog_base : public QDialog public: - IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + IncomingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~IncomingDialog_base(); @@ -32,3 +36,3 @@ public: QPushButton* PushButton7; - QListView* mMessageListView; + Q3ListView* mMessageListView; QPushButton* PushButton7_2; @@ -38,3 +42,3 @@ public: protected: - QGridLayout* IncomingDialog_baseLayout; + Q3GridLayout* IncomingDialog_baseLayout; 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 @@ -26,4 +26,4 @@ #include <qwidget.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <q3ptrlist.h> +#include <q3valuelist.h> @@ -90,3 +90,3 @@ class BaseView : public QWidget */ - virtual QPtrList<Incidence> selectedIncidences() = 0; + virtual Q3PtrList<Incidence> selectedIncidences() = 0; @@ -155,3 +155,3 @@ class BaseView : public QWidget */ - virtual void showEvents(QPtrList<Event> eventList) = 0; + virtual void showEvents(Q3PtrList<Event> eventList) = 0; 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 @@ -25,2 +25,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -42,3 +44,3 @@ class CalendarViewBase : public QWidget CalendarViewBase(QWidget *parent, const char *name) : - QWidget(parent,name) {new QVBoxLayout(this);} + QWidget(parent,name) {new Q3VBoxLayout(this);} virtual ~CalendarViewBase() {}; diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 5269af7..2814c61 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -28,6 +28,6 @@ #include <qlayout.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qfile.h> #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -36,2 +36,9 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <Q3Frame> +#include <QKeyEvent> +#include <QEvent> +#include <Q3VBoxLayout> @@ -59,3 +66,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : - QFrame(parent) + Q3Frame(parent) { @@ -72,3 +79,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : visibleMode = true; - QHBox * vb = new QHBox ( this ); + Q3HBox * vb = new Q3HBox ( this ); QPixmap iconp; @@ -131,3 +138,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : mEditor->setWordWrap( KTextEdit::WidgetWidth ); - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); topLayout->addWidget(vb); @@ -137,3 +144,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : mTitle->installEventFilter(this); - setFocusPolicy (QWidget::NoFocus); + setFocusPolicy (Qt::NoFocus); @@ -170,3 +177,3 @@ void JournalEntry::resizeEvent(QResizeEvent* e ) #endif - QFrame::resizeEvent( e ); + Q3Frame::resizeEvent( e ); } @@ -188,3 +195,3 @@ void JournalEntry::slotSaveTemplate() QFile fileIn( fileName ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { KMessageBox::error( this, i18n("Error saving template file\n '%1'.") @@ -194,3 +201,3 @@ void JournalEntry::slotSaveTemplate() // QString text; - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); @@ -210,3 +217,3 @@ void JournalEntry::slotLoadTemplate() QFile fileIn( fileName ); - if (!fileIn.open( IO_ReadOnly ) ) { + if (!fileIn.open( QIODevice::ReadOnly ) ) { KMessageBox::error( this, i18n("Error loading template file\n '%1'.") @@ -215,3 +222,3 @@ void JournalEntry::slotLoadTemplate() } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); @@ -318,7 +325,7 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e ) if ( isVisible() ) { - mEditor->setFocusPolicy (QWidget::StrongFocus); - mTitle->setFocusPolicy (QWidget::StrongFocus); + mEditor->setFocusPolicy (Qt::StrongFocus); + mTitle->setFocusPolicy (Qt::StrongFocus); } else { - mEditor->setFocusPolicy (QWidget::NoFocus); - mTitle->setFocusPolicy (QWidget::NoFocus); + mEditor->setFocusPolicy (Qt::NoFocus); + mTitle->setFocusPolicy (Qt::NoFocus); } @@ -337,3 +344,3 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e ) - return QFrame::eventFilter( o, e ); // standard event processing + return Q3Frame::eventFilter( o, e ); // standard event processing } diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index ee17da8..0adebe9 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h @@ -27,3 +27,8 @@ -#include <qframe.h> +#include <q3frame.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QEvent> +#include <QLabel> +#include <QKeyEvent> @@ -39,3 +44,3 @@ using namespace KCal; -class JournalEntry : public QFrame { +class JournalEntry : public Q3Frame { Q_OBJECT diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 6697602..ecc7a2f 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -24,8 +24,12 @@ #include <qstring.h> -#include <qkeycode.h> +#include <qnamespace.h> #include <qlayout.h> #include <qtimer.h> -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qapplication.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <Q3GridLayout> +#include <QEvent> @@ -48,8 +52,8 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) - : QFrame(parent, name), + : Q3Frame(parent, name), updateTimer(0L) { - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); QDate startDate = QDate::currentDate(); - QGridLayout *topLayout = new QGridLayout(this,8,8); + Q3GridLayout *topLayout = new Q3GridLayout(this,8,8); @@ -83,3 +87,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) //headings[i]->setFont(QFont("Arial", 10, QFont::Bold)); - headings[i]->setAlignment(AlignCenter); + headings[i]->setAlignment(Qt::AlignCenter); headings[i]->installEventFilter(this); @@ -92,3 +96,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) weeknos[i] = new QLabel(this); - weeknos[i]->setAlignment(AlignCenter ); + weeknos[i]->setAlignment(Qt::AlignCenter ); //weeknos[i]->setFont(QFont("Arial", 10)); @@ -103,3 +107,3 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) daymatrix = new KODayMatrix( this, "KDateNavigator::DayMatrix"); - daymatrix->setFrameStyle(QFrame::Panel|QFrame::Sunken); + daymatrix->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken); daymatrix->setLineWidth(1); diff --git a/korganizer/kdatenavigator.h b/korganizer/kdatenavigator.h index 780ebb8..2cbca76 100644 --- a/korganizer/kdatenavigator.h +++ b/korganizer/kdatenavigator.h @@ -25,5 +25,8 @@ -#include <qframe.h> +#include <q3frame.h> #include <qdatetime.h> #include <qlabel.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QEvent> @@ -40,3 +43,3 @@ class NavigatorBar; -class KDateNavigator: public QFrame +class KDateNavigator: public Q3Frame { @@ -135,4 +138,4 @@ class KDateNavigator: public QFrame - QFrame *headingSep; - QFrame *weeknumSep; + Q3Frame *headingSep; + Q3Frame *weeknumSep; QLabel *headings[7]; diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 1d4d6de..fe59787 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -31,8 +31,19 @@ #endif -#include <qintdict.h> +#include <q3intdict.h> #include <qdatetime.h> #include <qapplication.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcursor.h> #include <qpainter.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> +#include <QPixmap> +#include <QMouseEvent> +#include <QKeyEvent> +#include <Q3MemArray> +#include <QEvent> +#include <Q3Frame> +#include <Q3PtrList> @@ -65,3 +76,3 @@ extern int globalFlagBlockStartup; MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) - : QFrame(_agenda->viewport(),name), agenda(_agenda) + : Q3Frame(_agenda->viewport(),name), agenda(_agenda) { @@ -171,4 +182,4 @@ void MarcusBains::updateLocation(bool recalculate) KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, - const char *name,WFlags f) : - QScrollView(parent,name,f) + const char *name,Qt::WFlags f) : + Q3ScrollView(parent,name,f) { @@ -192,4 +203,4 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, */ -KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : - QScrollView(parent,name,f) +KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,Qt::WFlags f) : + Q3ScrollView(parent,name,f) { @@ -233,3 +244,3 @@ void KOAgenda::init() - mNewItemPopup = new QPopupMenu( this ); + mNewItemPopup = new Q3PopupMenu( this ); connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); @@ -242,14 +253,14 @@ void KOAgenda::init() - mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); mNewItemPopup->insertSeparator ( ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"day" ), i18n("Day view"),3 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next week"),4 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"month" ), i18n("This month"),6 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); #ifndef _WIN32_ - int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase - viewport()->setWFlags ( wflags); + Qt::WindowFlags wflags = viewport()-> windowFlags() |Qt::WRepaintNoErase;//WResizeNoErase + viewport()->setWindowFlags ( wflags); #endif @@ -265,3 +276,3 @@ void KOAgenda::init() // effect. Has to be fixed. - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); @@ -397,3 +408,3 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) if (!mActionItem) - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); return true; @@ -401,3 +412,3 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) default: - return QScrollView::eventFilter(object,event); + return Q3ScrollView::eventFilter(object,event); } @@ -507,3 +518,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) #ifdef DESKTOP_VERSION - leftButt = (me->button() == LeftButton); + leftButt = (me->button() == Qt::LeftButton); #endif @@ -511,3 +522,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) case QEvent::MouseButtonPress: - if (me->button() == LeftButton) { + if (me->button() == Qt::LeftButton) { mPopupTimer->start( 600 ); @@ -580,6 +591,6 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mPopupKind = 1; - if (me->button() == RightButton) { + if (me->button() == Qt::RightButton) { mPopupKind = 3; popupMenu(); - } else if (me->button() == LeftButton) { + } else if (me->button() == Qt::LeftButton) { mActionItem = (KOAgendaItem *)object; @@ -602,3 +613,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mActionItem = 0; - if (me->button() == RightButton) { + if (me->button() == Qt::RightButton) { int x,y; @@ -613,4 +624,4 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) popupMenu(); - } else if (me->button() == LeftButton) { - setCursor(arrowCursor); + } else if (me->button() == Qt::LeftButton) { + setCursor(Qt::arrowCursor); startSelectAction(viewportPos); @@ -621,3 +632,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) case QEvent::MouseButtonRelease: - if (me->button() == LeftButton ) { + if (me->button() == Qt::LeftButton ) { mPopupTimer->stop(); @@ -625,3 +636,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) if (object != viewport()) { - if (me->button() == LeftButton && mLeftMouseDown) { + if (me->button() == Qt::LeftButton && mLeftMouseDown) { if (mActionItem) { @@ -635,3 +646,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) // emit startDragSignal( mActionItem->incidence() ); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; @@ -647,3 +658,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } else { // ---------- viewport() - if (me->button() == LeftButton && mLeftMouseDown ) { //left click + if (me->button() == Qt::LeftButton && mLeftMouseDown ) { //left click endSelectAction( true ); // emit new event signal @@ -651,3 +662,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } - if (me->button() == LeftButton) + if (me->button() == Qt::LeftButton) mLeftMouseDown = false; @@ -852,3 +863,3 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionType = RESIZELEFT; - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && @@ -856,3 +867,3 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionType = RESIZERIGHT; - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else { @@ -860,3 +871,3 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionItem->startMove(); - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); } @@ -868,3 +879,3 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionType = RESIZETOP; - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && @@ -873,3 +884,3 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionType = RESIZEBOTTOM; - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else { @@ -877,3 +888,3 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionItem->startMove(); - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); } @@ -908,3 +919,3 @@ void KOAgenda::performItemAction(QPoint viewportPos) // emit startDragSignal( mActionItem->incidence() ); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; @@ -917,3 +928,3 @@ void KOAgenda::performItemAction(QPoint viewportPos) case MOVE: - setCursor( sizeAllCursor ); + setCursor( Qt::sizeAllCursor ); break; @@ -921,3 +932,3 @@ void KOAgenda::performItemAction(QPoint viewportPos) case RESIZEBOTTOM: - setCursor( sizeVerCursor ); + setCursor( Qt::sizeVerCursor ); break; @@ -925,6 +936,6 @@ void KOAgenda::performItemAction(QPoint viewportPos) case RESIZERIGHT: - setCursor( sizeHorCursor ); + setCursor( Qt::sizeHorCursor ); break; default: - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); } @@ -973,3 +984,3 @@ void KOAgenda::performItemAction(QPoint viewportPos) //moveChild(mActionItem,childX(mActionItem),y); - QScrollView::moveChild( mActionItem,childX(mActionItem),y ); + Q3ScrollView::moveChild( mActionItem,childX(mActionItem),y ); } @@ -1021,3 +1032,3 @@ void KOAgenda::endItemAction() //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); - QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); KOAgendaItem *item; @@ -1112,3 +1123,3 @@ void KOAgenda::endItemAction() mScrollDownTimer.stop(); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; @@ -1138,8 +1149,8 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) moveItem->cellX() == gx) { - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && moveItem->cellXWidth() == gx) { - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else { - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); } @@ -1150,3 +1161,3 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) !moveItem->firstMultiItem()) { - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && @@ -1154,5 +1165,5 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) !moveItem->lastMultiItem()) { - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else { - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); } @@ -1175,5 +1186,5 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) - QPtrList<KOAgendaItem> conflictItems; + Q3PtrList<KOAgendaItem> conflictItems; int maxSubCells = 0; - QIntDict<KOAgendaItem> subCellDict(7); + Q3IntDict<KOAgendaItem> subCellDict(7); @@ -1242,3 +1253,3 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) KOAgendaItem *item2; - QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); + Q3PtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); for ( item2=conflictItems2.first(); item2 != 0; @@ -1327,5 +1338,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) //qDebug("OFF %d %d %d", off,vySel, vy ); - bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); + bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,QPainter::CompositionMode_Source); } else { - bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); + bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source); } @@ -1344,3 +1355,3 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) hei -= 5; - bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); + bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source); offset += 5; @@ -1367,3 +1378,3 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) - bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); + bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source); @@ -1381,3 +1392,3 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) hei -= 5; - bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); + bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source); offset += 5; @@ -1578,6 +1589,6 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i while (y < cy + ch) { - p->setPen( SolidLine ); + p->setPen( Qt::SolidLine ); p->drawLine(cx,y,cx+cw,y); y+=lGridSpacingY; - p->setPen( DotLine ); + p->setPen( Qt::DotLine ); p->drawLine(cx,y,cx+cw,y); @@ -1585,3 +1596,3 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i } - p->setPen( SolidLine ); + p->setPen( Qt::SolidLine ); } @@ -1719,3 +1730,3 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) mItems.remove( item ); - QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; @@ -1749,3 +1760,3 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) QDate currentDate = QDate::currentDate(); - bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); + bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); QDateTime dt; @@ -1781,3 +1792,3 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) globalFlagBlockAgendaItemPaint = 0; - QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; @@ -1869,3 +1880,3 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, KOAgendaItem *current = 0; - QPtrList<KOAgendaItem> multiItems; + Q3PtrList<KOAgendaItem> multiItems; for (cellX = XBegin;cellX <= XEnd;++cellX) { @@ -1929,3 +1940,3 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev ) computeSizes(); - QScrollView::resizeEvent( ev ); + Q3ScrollView::resizeEvent( ev ); return; @@ -2018,3 +2029,3 @@ void KOAgenda::popupAlarm() Alarm* alarm; - QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); + Q3PtrList<Alarm> list(mClickedItem->incidence()->alarms()); for(alarm=list.first();alarm;alarm=list.next()) { @@ -2109,12 +2120,12 @@ void KOAgenda::keyPressEvent( QKeyEvent *kev ) switch(kev->key()) { - case Key_PageDown: + case Qt::Key_PageDown: verticalScrollBar()->addPage(); break; - case Key_PageUp: + case Qt::Key_PageUp: verticalScrollBar()->subtractPage(); break; - case Key_Down: + case Qt::Key_Down: verticalScrollBar()->addLine(); break; - case Key_Up: + case Qt::Key_Up: verticalScrollBar()->subtractLine(); @@ -2148,3 +2159,3 @@ void KOAgenda::setDateList(const DateList &selectedDates) -void KOAgenda::setHolidayMask(QMemArray<bool> *mask) +void KOAgenda::setHolidayMask(Q3MemArray<bool> *mask) { @@ -2164,3 +2175,3 @@ void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) - QScrollView::contentsMousePressEvent(event); + Q3ScrollView::contentsMousePressEvent(event); } @@ -2198,3 +2209,3 @@ void KOAgenda::moveChild( QWidget *w, int x , int y ) ++x; - QScrollView::moveChild( w, x , y ); + Q3ScrollView::moveChild( w, x , y ); } @@ -2204,3 +2215,3 @@ void KOAgenda::moveChild( QWidget *w, int x , int y ) #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> @@ -2233,3 +2244,3 @@ void KOAgenda::printSelection() QPainter p( printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( printer ); QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() ); diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 380ce62..0708341 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h @@ -25,8 +25,17 @@ -#include <qscrollview.h> +#include <q3scrollview.h> #include <qtimer.h> -#include <qmemarray.h> +#include <q3memarray.h> #include <qpainter.h> #include <qpixmap.h> -#include <qguardedptr.h> +#include <qpointer.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <Q3Frame> +#include <QLabel> +#include <QMouseEvent> +#include <Q3PtrList> +#include <Q3PopupMenu> +#include <QKeyEvent> +#include <QEvent> @@ -35,6 +44,6 @@ -class QPopupMenu; +class Q3PopupMenu; class QTime; class KConfig; -class QFrame; +class Q3Frame; class KOAgenda; @@ -45,3 +54,3 @@ using namespace KCal; -class MarcusBains : public QFrame { +class MarcusBains : public Q3Frame { Q_OBJECT @@ -65,3 +74,3 @@ class MarcusBains : public QFrame { -class KOAgenda : public QScrollView +class KOAgenda : public Q3ScrollView { @@ -73,5 +82,5 @@ class KOAgenda : public QScrollView KOAgenda ( int columns, int rows, int columnSize, QWidget * parent=0, - const char * name=0, WFlags f=0 ); + const char * name=0, Qt::WFlags f=0 ); KOAgenda ( int columns, QWidget * parent=0, - const char * name=0, WFlags f=0 ); + const char * name=0, Qt::WFlags f=0 ); virtual ~KOAgenda(); @@ -119,3 +128,3 @@ class KOAgenda : public QScrollView - void setHolidayMask(QMemArray<bool> *); + void setHolidayMask(Q3MemArray<bool> *); void setDateList(const DateList &selectedDates); @@ -279,6 +288,6 @@ class KOAgenda : public QScrollView // The KOAgendaItem, which is being moved/resized - QGuardedPtr<KOAgendaItem> mActionItem; + QPointer<KOAgendaItem> mActionItem; // Currently selected item - QGuardedPtr<KOAgendaItem> mSelectedItem; + QPointer<KOAgendaItem> mSelectedItem; @@ -293,7 +302,7 @@ class KOAgenda : public QScrollView // List of all Items contained in agenda - QPtrList<KOAgendaItem> mItems; - QPtrList<KOAgendaItem> mUnusedItems; + Q3PtrList<KOAgendaItem> mItems; + Q3PtrList<KOAgendaItem> mUnusedItems; KOAgendaItem* getNewItem(Incidence * event,QDate qd, QWidget* viewport); - QPopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems - QPopupMenu *mNewItemPopup; + Q3PopupMenu *mItemPopup; // Right mouse button popup menu for KOAgendaItems + Q3PopupMenu *mNewItemPopup; @@ -302,3 +311,3 @@ class KOAgenda : public QScrollView KOAgendaItem * getItemForTodo ( Todo * todo ); - QMemArray<bool> *mHolidayMask; + Q3MemArray<bool> *mHolidayMask; int mCurPixWid; diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 407424d..0f9a38f 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -21,9 +21,19 @@ #include <qlayout.h> -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qtooltip.h> -#include <qwhatsthis.h> -#include <qdragobject.h> +#include <q3whatsthis.h> +#include <q3dragobject.h> #include <qdrawutil.h> #include <qpainter.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3PtrList> +#include <QPixmap> +#include <QDragEnterEvent> +#include <QDropEvent> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QEvent> +#include <QPaintEvent> @@ -59,6 +69,6 @@ QToolTipGroup *KOAgendaItem::mToolTipGroup = 0; -class KOAgendaItemWhatsThis :public QWhatsThis +class KOAgendaItemWhatsThis :public Q3WhatsThis { public: - KOAgendaItemWhatsThis( KOAgendaItem* view ) : QWhatsThis( view ),_view (view) { }; + KOAgendaItemWhatsThis( KOAgendaItem* view ) : Q3WhatsThis( view ),_view (view) { }; @@ -74,3 +84,3 @@ private: KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool allday, - const char *name,WFlags) : + const char *name,Qt::WFlags) : QWidget(parent, name), mIncidence(incidence), mDate(qd) @@ -81,4 +91,4 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this); - int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase - setWFlags ( wflags); + Qt::WindowFlags wflags = windowFlags() |Qt::WRepaintNoErase;// WResizeNoErase + setWindowFlags ( wflags); mAllDay = allday; @@ -105,3 +115,3 @@ void KOAgendaItem::initColor () ((static_cast<Todo*>(mIncidence))->dtDue().date() <= QDate::currentDate()) ) ) { - if ( (static_cast<Todo*>(mIncidence))->dtDue() < QDateTime::currentDateTime().date()) + if ( (static_cast<Todo*>(mIncidence))->dtDue() < (QDateTime)QDateTime::currentDateTime().date()) mBackgroundColor = KOPrefs::instance()->mTodoOverdueColor ; @@ -134,3 +144,3 @@ void KOAgendaItem::initColor () BackgroundColor.dark(),BackgroundColor.light(), - BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; + BackgroundColor.dark(),BackgroundColor, Qt::black, BackgroundColor) ; setBackgroundColor( mBackgroundColor ); @@ -230,3 +240,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) if (mIncidence->isAlarmEnabled() && mIncidence->alarmEnabled()) { - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, red ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::red ); if ( horLayout ) @@ -237,3 +247,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) if (mIncidence->doesRecur()) { - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, blue ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::blue ); if ( horLayout ) @@ -244,3 +254,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) if (mIncidence->description().length() > 0) { - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkGreen ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkGreen ); if ( horLayout ) @@ -251,3 +261,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) if (mIncidence->isReadOnly()) { - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, white ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::white ); if ( horLayout ) @@ -261,3 +271,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) if (mIncidence->organizer() == KOPrefs::instance()->email()) { - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, black ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::black ); if ( horLayout ) @@ -272,3 +282,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) } else { - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, yellow ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::yellow ); if ( horLayout ) @@ -279,3 +289,3 @@ bool KOAgendaItem::updateIcons(QPainter * p, bool horLayout) } - p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, darkYellow ); + p->fillRect ( xOff*( 1 +AGENDA_ICON_SIZE )+x, yOff*( 1 +AGENDA_ICON_SIZE)+y, AGENDA_ICON_SIZE, AGENDA_ICON_SIZE, Qt::darkYellow ); if ( horLayout ) @@ -422,5 +432,5 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) #ifndef DESKTOP_VERSION - align = ( AlignLeft|WordBreak|AlignTop); + align = ( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop); #else - align = ( AlignLeft|BreakAnywhere|WordBreak|AlignTop); + align = ( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); #endif @@ -437,3 +447,3 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) if ( mWhiteText ) - paint->setPen ( white); + paint->setPen ( Qt::white); if ( x < 0 ) { @@ -446,5 +456,5 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) #ifndef DESKTOP_VERSION - align = ( AlignHCenter|WordBreak|AlignTop); + align = ( Qt::AlignHCenter|Qt::TextWordWrap|Qt::AlignTop); #else - align = ( AlignHCenter|BreakAnywhere|WordBreak|AlignTop); + align = ( Qt::AlignHCenter|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); #endif @@ -563,3 +573,3 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) //qDebug("%d %d %d %d %d %d %d",rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh); - bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,CopyROP); + bitBlt (this, rx, ry, paintFrom, xx ,yPaintCoord+ry, rw, rh ,QPainter::CompositionMode_Source); } @@ -630,3 +640,3 @@ void KOAgendaItem::computeText() } - QToolTip::add(this,tipText,toolTipGroup(),""); + QToolTip::add(this,tipText /*TODO:hacker: ,toolTipGroup(),"" */); #endif @@ -797,3 +807,3 @@ QToolTipGroup *KOAgendaItem::toolTipGroup() { - if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); + /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */ return mToolTipGroup; @@ -805,3 +815,3 @@ void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e ) if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) || - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); @@ -817,3 +827,3 @@ void KOAgendaItem::dropEvent( QDropEvent *e ) QString text; - if(QTextDrag::decode(e,text)) + if(Q3TextDrag::decode(e,text)) { @@ -835,3 +845,3 @@ void KOAgendaItem::dropEvent( QDropEvent *e ) -QPtrList<KOAgendaItem> KOAgendaItem::conflictItems() +Q3PtrList<KOAgendaItem> KOAgendaItem::conflictItems() { @@ -840,3 +850,3 @@ QPtrList<KOAgendaItem> KOAgendaItem::conflictItems() -void KOAgendaItem::setConflictItems(QPtrList<KOAgendaItem> ci) +void KOAgendaItem::setConflictItems(Q3PtrList<KOAgendaItem> ci) { diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 27ee720..17cf975 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h @@ -21,3 +21,3 @@ -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -26,2 +26,9 @@ #include <qpalette.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <Q3PtrList> +#include <QEvent> +#include <QDragEnterEvent> @@ -47,3 +54,3 @@ class KOAgendaItem : public QWidget KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0, - WFlags f=0 ); + Qt::WFlags f=0 ); ~KOAgendaItem(); @@ -98,4 +105,4 @@ class KOAgendaItem : public QWidget - QPtrList<KOAgendaItem> conflictItems(); - void setConflictItems(QPtrList<KOAgendaItem>); + Q3PtrList<KOAgendaItem> conflictItems(); + void setConflictItems(Q3PtrList<KOAgendaItem>); void addConflictItem(KOAgendaItem *ci); @@ -163,3 +170,3 @@ class KOAgendaItem : public QWidget bool mSelected; - QPtrList<KOAgendaItem> mConflictItems; + Q3PtrList<KOAgendaItem> mConflictItems; }; diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 6e65a03..87993ae 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -23,6 +23,6 @@ -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qlabel.h> -#include <qframe.h> +#include <q3frame.h> #include <qlayout.h> @@ -33,3 +33,3 @@ #include <qfontmetrics.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qtooltip.h> @@ -38,2 +38,14 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QPixmap> +#include <QMouseEvent> +#include <Q3GridLayout> +#include <Q3ValueList> +#include <QKeyEvent> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> +#include <QPaintEvent> +#include <Q3PtrList> @@ -80,4 +92,4 @@ using namespace KOrg; -TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : - QScrollView(parent,name,f) +TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,Qt::WFlags f) : + Q3ScrollView(parent,name,f) { @@ -97,3 +109,3 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : - viewport()->setBackgroundMode( PaletteBackground ); + viewport()->setBackgroundMode( Qt::PaletteBackground ); } @@ -285,3 +297,3 @@ void TimeLabels::paintEvent(QPaintEvent*) EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) - : QFrame(parent,name) + : Q3Frame(parent,name) { @@ -395,3 +407,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); @@ -403,9 +415,9 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : topLayout->addWidget( mSplitterAgenda ); - mAllDayFrame = new QHBox(mSplitterAgenda); - mAllDayFrame->setFocusPolicy(NoFocus); + mAllDayFrame = new Q3HBox(mSplitterAgenda); + mAllDayFrame->setFocusPolicy(Qt::NoFocus); QWidget *agendaFrame = new QWidget(mSplitterAgenda); - agendaFrame->setFocusPolicy(NoFocus); + agendaFrame->setFocusPolicy(Qt::NoFocus); // Create all-day agenda widget - mDummyAllDayLeft = new QVBox( mAllDayFrame ); + mDummyAllDayLeft = new Q3VBox( mAllDayFrame ); @@ -422,5 +434,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); - mExpandButton->setFocusPolicy(NoFocus); + mExpandButton->setFocusPolicy(Qt::NoFocus); mAllDayAgenda = new KOAgenda(1,mAllDayFrame); - mAllDayAgenda->setFocusPolicy(NoFocus); + mAllDayAgenda->setFocusPolicy(Qt::NoFocus); QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); @@ -431,3 +443,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : // Create agenda frame - QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); + Q3GridLayout *agendaLayout = new Q3GridLayout(agendaFrame,4,3); // QHBox *agendaFrame = new QHBox(splitterAgenda); @@ -439,6 +451,6 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : #endif - mDayLabelsFrame = new QHBox(agendaFrame); + mDayLabelsFrame = new Q3HBox(agendaFrame); //topLayout->addWidget(mDayLabelsFrame); - mDayLabels = new QFrame (mDayLabelsFrame); - mLayoutDayLabels = new QHBoxLayout(mDayLabels); + mDayLabels = new Q3Frame (mDayLabelsFrame); + mLayoutDayLabels = new Q3HBoxLayout(mDayLabels); agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); @@ -462,3 +474,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : agendaLayout->setColStretch(1,1); - mAgenda->setFocusPolicy(NoFocus); + mAgenda->setFocusPolicy(Qt::NoFocus); // Create event context menu for agenda @@ -467,3 +479,3 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : #if 0 - mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), + mAllAgendaPopup->addAdditionalItem(QIcon(SmallIcon("bell")), i18n("Toggle Alarm"),mAgenda, @@ -920,5 +932,5 @@ int KOAgendaView::currentDateCount() -QPtrList<Incidence> KOAgendaView::selectedIncidences() +Q3PtrList<Incidence> KOAgendaView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; Incidence *incidence; @@ -989,4 +1001,4 @@ void KOAgendaView::updateConfig() // ToolTips displaying summary of events - KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() - ->mEnableToolTips); + /* TODO:hacker: KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() + ->mEnableToolTips); */ @@ -1119,3 +1131,3 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end ) -void KOAgendaView::showEvents(QPtrList<Event>) +void KOAgendaView::showEvents(Q3PtrList<Event>) { @@ -1167,3 +1179,3 @@ void KOAgendaView::fillAgenda() - QPtrList<Event> dayEvents; + Q3PtrList<Event> dayEvents; @@ -1171,3 +1183,3 @@ void KOAgendaView::fillAgenda() // Therefore, gtodoset all of them. - QPtrList<Todo> todos = calendar()->todos(); + Q3PtrList<Todo> todos = calendar()->todos(); @@ -1302,3 +1314,3 @@ void KOAgendaView::fillAgenda() //if not KOPrefs::instance()->mShowTodoInAgenda, show overdue in agenda - bool overdue = (!todo->isCompleted()) && (todo->dtDue() < today) && KOPrefs::instance()->mShowTodoInAgenda; + bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)today) && KOPrefs::instance()->mShowTodoInAgenda; bool fillIn = false; @@ -1505,3 +1517,3 @@ void KOAgendaView::readSettings(KConfig *config) //#ifndef KORG_NOSPLITTER - QValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); + Q3ValueList<int> sizes = config->readIntListEntry("Separator AgendaView"); if (sizes.count() == 2) { @@ -1526,3 +1538,3 @@ void KOAgendaView::writeSettings(KConfig *config) //#ifndef KORG_NOSPLITTER - QValueList<int> list = mSplitterAgenda->sizes(); + Q3ValueList<int> list = mSplitterAgenda->sizes(); config->writeEntry("Separator AgendaView",list); @@ -1543,3 +1555,3 @@ void KOAgendaView::setHolidayMasks() if ( KOPrefs::instance()->mExcludeHolidays ) { - QPtrList<Event> events = calendar()->events( date, true ); + Q3PtrList<Event> events = calendar()->events( date, true ); Event *event; @@ -1665,3 +1677,3 @@ void KOAgendaView::updateTodo( Todo * t, int ) else { - bool overdue = (!t->isCompleted()) && (t->dtDue() < QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; + bool overdue = (!t->isCompleted()) && (t->dtDue() < (QDateTime)QDate::currentDate()) && KOPrefs::instance()->mShowTodoInAgenda ; if ( overdue && diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 5e68146..3b871d9 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -25,3 +25,3 @@ -#include <qscrollview.h> +#include <q3scrollview.h> #include <qdatetime.h> @@ -29,2 +29,3 @@ #include <qlayout.h> +#include <Q3BoxLayout> #ifndef DESKTOP_VERSION @@ -34,3 +35,12 @@ #endif -#include <qmemarray.h> +#include <q3memarray.h> +//Added by qt3to4: +#include <QPaintEvent> +#include <QResizeEvent> +#include <Q3Frame> +#include <QPixmap> +#include <QLabel> +#include <QMouseEvent> +#include <Q3PtrList> +#include <QKeyEvent> @@ -38,4 +48,4 @@ -class QHBox; -class QFrame; +class Q3HBox; +class Q3Frame; class QLabel; @@ -57,3 +67,3 @@ class KOAgendaButton : public QPushButton setFlat( true ); - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); @@ -72,6 +82,6 @@ private: -class TimeLabels : public QScrollView { +class TimeLabels : public Q3ScrollView { Q_OBJECT public: - TimeLabels(int rows,QWidget *parent=0,const char *name=0,WFlags f=0); + TimeLabels(int rows,QWidget *parent=0,const char *name=0,Qt::WFlags f=0); @@ -115,3 +125,3 @@ class TimeLabels : public QScrollView { -class EventIndicator : public QFrame { +class EventIndicator : public Q3Frame { Q_OBJECT @@ -134,7 +144,7 @@ class EventIndicator : public QFrame { int mColumns; - QHBox *mTopBox; - QBoxLayout *mTopLayout; + Q3HBox *mTopBox; + Q3BoxLayout *mTopLayout; Location mLocation; QPixmap mPixmap; - QMemArray<bool> mEnabled; + Q3MemArray<bool> mEnabled; }; @@ -161,3 +171,3 @@ class KOAgendaView : public KOEventView { /** returns the currently selected events */ - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); @@ -187,3 +197,3 @@ class KOAgendaView : public KOEventView { virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); @@ -262,6 +272,6 @@ class KOAgendaView : public KOEventView { // view widgets - QFrame *mDayLabels; - QHBox *mDayLabelsFrame; - QBoxLayout *mLayoutDayLabels; - QFrame *mAllDayFrame; + Q3Frame *mDayLabels; + Q3HBox *mDayLabelsFrame; + Q3BoxLayout *mLayoutDayLabels; + Q3Frame *mAllDayFrame; KOAgenda *mAllDayAgenda; @@ -286,8 +296,8 @@ class KOAgendaView : public KOEventView { - QMemArray<int> mMinY; - QMemArray<int> mMaxY; + Q3MemArray<int> mMinY; + Q3MemArray<int> mMaxY; - QMemArray<bool> mHolidayMask; + Q3MemArray<bool> mHolidayMask; - QPtrList<KOAgendaButton> mDayLabelsList; + Q3PtrList<KOAgendaButton> mDayLabelsList; QDateTime mTimeSpanBegin; diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h index c8dcf45..493d9e1 100644 --- a/korganizer/kocounterdialog.h +++ b/korganizer/kocounterdialog.h @@ -24,3 +24,3 @@ -#include <qtextview.h> +#include <q3textview.h> diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 52fd1e8..4f681b3 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -26,5 +26,14 @@ #include <qpainter.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qtimer.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <QDragLeaveEvent> +#include <Q3Frame> +#include <QDragEnterEvent> +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QPaintEvent> @@ -56,3 +65,3 @@ DynamicTip::DynamicTip( QWidget * parent ) - : QToolTip( parent ) + /* TODO:hacker: : QToolTip( parent ) */ { @@ -61,6 +70,6 @@ DynamicTip::DynamicTip( QWidget * parent ) -class KODaymatrixWhatsThis :public QWhatsThis +class KODaymatrixWhatsThis :public Q3WhatsThis { public: - KODaymatrixWhatsThis( KODayMatrix* view ) : QWhatsThis( view ),_view (view) { ;}; + KODaymatrixWhatsThis( KODayMatrix* view ) : Q3WhatsThis( view ),_view (view) { ;}; ~KODaymatrixWhatsThis() { ; }; @@ -93,3 +102,3 @@ void DynamicTip::maybeTip( const QPoint &pos ) if (str.isEmpty()) return; - tip(rct, str); + /* TODO:hacker: tip(rct, str);*/ } @@ -105,3 +114,3 @@ const int KODayMatrix::NUMDAYS = 42; KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) - : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) + : Q3Frame( parent, name , Qt::WNoAutoErase ), mCalendar( 0 ) @@ -153,3 +162,3 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) QDate mDate = days[tmp]; - QPtrList<Event> eventlist = mCalendar->events(mDate); + Q3PtrList<Event> eventlist = mCalendar->events(mDate); Event *event; @@ -207,3 +216,3 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { - QPtrList<Todo> todolist = mCalendar->todos(mDate); + Q3PtrList<Todo> todolist = mCalendar->todos(mDate); Todo *todo; @@ -222,3 +231,3 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) if (KOPrefs::instance()->mCurrentDisplayedView == VIEW_J_VIEW ) { - QPtrList<Journal> j_list = mCalendar->journals4Date( mDate ); + Q3PtrList<Journal> j_list = mCalendar->journals4Date( mDate ); Journal *j = j_list.first(); @@ -443,3 +452,3 @@ void KODayMatrix::updateViewTimed() int timeSpan = NUMDAYS-1; - QPtrList<Event> events = mCalendar->events(); + Q3PtrList<Event> events = mCalendar->events(); Event *event; @@ -528,3 +537,3 @@ void KODayMatrix::updateViewTimed() // insert due todos - QPtrList<Todo> todos = mCalendar->todos( ); + Q3PtrList<Todo> todos = mCalendar->todos( ); Todo *todo; @@ -553,3 +562,3 @@ void KODayMatrix::updateViewTimed() // insert due todos - QPtrList<Journal> todos = mCalendar->journals( ); + Q3PtrList<Journal> todos = mCalendar->journals( ); Journal *todo; @@ -577,3 +586,3 @@ void KODayMatrix::updateViewTimed() // if events are set for the day then remember to draw it bold - QPtrList<Event> eventlist = mCalendar->events(days[i]); + Q3PtrList<Event> eventlist = mCalendar->events(days[i]); Event *event; @@ -677,3 +686,3 @@ void KODayMatrix::updateEvents() // if events are set for the day then remember to draw it bold - QPtrList<Event> eventlist = mCalendar->events( days[ i ] ); + Q3PtrList<Event> eventlist = mCalendar->events( days[ i ] ); int numEvents = eventlist.count(); @@ -741,3 +750,3 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e) - if ( e->button() == LeftButton ) + if ( e->button() == Qt::LeftButton ) mouseDown = true; @@ -754,3 +763,3 @@ void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) mRedrawNeeded = true; - if ( e->button() == LeftButton ) + if ( e->button() == Qt::LeftButton ) if ( ! mouseDown ) { @@ -1197,3 +1206,3 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) - bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP); + bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,QPainter::CompositionMode_Source); mRedrawNeeded = false; @@ -1210,3 +1219,3 @@ void KODayMatrix::resizeEvent(QResizeEvent * e) daysize.setWidth(sz.width() / 7); - QFrame::resizeEvent( e ); + Q3Frame::resizeEvent( e ); } diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index b96e08f..6edf7cd 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h @@ -28,3 +28,3 @@ #include <qstring.h> -#include <qframe.h> +#include <q3frame.h> #include <qcolor.h> @@ -36,2 +36,10 @@ #include <qmap.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QDragLeaveEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QDragEnterEvent> @@ -53,3 +61,3 @@ using namespace KCal; */ -class DynamicTip : public QToolTip +class DynamicTip /* TODO:hacker: : public QToolTip */ { @@ -105,3 +113,3 @@ private: */ -class KODayMatrix: public QFrame { +class KODayMatrix: public Q3Frame { diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index ea30fac..deb1e46 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -43,2 +43,4 @@ #include <kapplication.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -190,4 +192,4 @@ void KODialogManager::showSearchDialog() mMainView, SLOT(moveIncidence(Incidence *))); - connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), - mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); + connect(lview, SIGNAL(beamIncidenceList(Q3PtrList<Incidence> )), + mMainView, SLOT(beamIncidenceList(Q3PtrList<Incidence> ))); @@ -248,3 +250,3 @@ void KODialogManager::showArchiveDialog() -void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) +void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters) { diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h index b68ddc2..00ad1df 100644 --- a/korganizer/kodialogmanager.h +++ b/korganizer/kodialogmanager.h @@ -27,3 +27,3 @@ #include <qobject.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -80,3 +80,3 @@ class KODialogManager : public QObject void showArchiveDialog(); - void showFilterEditDialog(QPtrList<CalFilter> *filters); + void showFilterEditDialog(Q3PtrList<CalFilter> *filters); void showPluginDialog(); diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index 9a4b4ec..a01c838 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -24,10 +24,16 @@ #include <qtooltip.h> -#include <qfiledialog.h> +#include <q3filedialog.h> #include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> +#include <q3vbox.h> +#include <q3buttongroup.h> +#include <q3vgroupbox.h> +#include <q3widgetstack.h> #include <qdatetime.h> -#include <qapp.h> +#include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> +#include <QLabel> +#include <Q3PtrList> +#include <Q3VBoxLayout> @@ -82,3 +88,3 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) { - QGridLayout *topLayout = new QGridLayout(this); + Q3GridLayout *topLayout = new Q3GridLayout(this); topLayout->setSpacing(spacing); @@ -103,7 +109,7 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) //mListView->setSingleClick( true ); - connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), + connect(mListView,SIGNAL(selectionChanged(Q3ListViewItem *)), SLOT(updateAttendeeInput())); - connect(mListView,SIGNAL(executed(QListViewItem * ,const QPoint&, int )), - SLOT(itemClicked(QListViewItem * ,const QPoint& , int ))); + connect(mListView,SIGNAL(executed(Q3ListViewItem * ,const QPoint&, int )), + SLOT(itemClicked(Q3ListViewItem * ,const QPoint& , int ))); @@ -142,3 +148,3 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) QWidget *buttonBox = new QWidget(this); - QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); + Q3VBoxLayout *buttonLayout = new Q3VBoxLayout(buttonBox); @@ -367,3 +373,3 @@ void KOEditorDetails::readEvent(Incidence *event) //mdelAttendees.clear(); - QPtrList<Attendee> tmpAList = event->attendees(); + Q3PtrList<Attendee> tmpAList = event->attendees(); Attendee *a; @@ -379,3 +385,3 @@ void KOEditorDetails::writeEvent(Incidence *event) event->clearAttendees(); - QListViewItem *item; + Q3ListViewItem *item; AttendeeListItem *a; @@ -406,3 +412,3 @@ void KOEditorDetails::updateAttendeeInput() { - QListViewItem *item = mListView->selectedItem(); + Q3ListViewItem *item = mListView->selectedItem(); AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); @@ -453,3 +459,3 @@ void KOEditorDetails::setEnabledAttendeeInput( bool enabled ) -void KOEditorDetails::itemClicked(QListViewItem * item ,const QPoint & pnt, int c ) +void KOEditorDetails::itemClicked(Q3ListViewItem * item ,const QPoint & pnt, int c ) { @@ -464,3 +470,3 @@ void KOEditorDetails::updateAttendeeItem() - QListViewItem *item = mListView->selectedItem(); + Q3ListViewItem *item = mListView->selectedItem(); AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h index 5f8f6f2..40e896c 100644 --- a/korganizer/koeditordetails.h +++ b/korganizer/koeditordetails.h @@ -26,3 +26,3 @@ #include <qmap.h> -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -30,9 +30,9 @@ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlineedit.h> #include <qcombobox.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include <klistview.h> #include <qradiobutton.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -85,3 +85,3 @@ class KOEditorDetails : public QWidget void fillAttendeeInput(AttendeeListItem *); - void itemClicked(QListViewItem *,const QPoint & pnt, int c); + void itemClicked(Q3ListViewItem *,const QPoint & pnt, int c); void updateAttendeeItem(); @@ -105,3 +105,3 @@ class KOEditorDetails : public QWidget - QPtrList<Attendee> mdelAttendees; + Q3PtrList<Attendee> mdelAttendees; }; diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 21f220c..8105432 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -26,6 +26,6 @@ #include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> +#include <q3vbox.h> +#include <q3buttongroup.h> +#include <q3vgroupbox.h> +#include <q3widgetstack.h> #include <qdatetime.h> @@ -34,3 +34,10 @@ #include <qregexp.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QLabel> +#include <Q3GridLayout> +#include <Q3PtrList> +#include <Q3PopupMenu> +#include <QDesktopWidget> @@ -71,5 +78,5 @@ KOEditorGeneral::~KOEditorGeneral() -void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initHeader(QWidget *parent,Q3BoxLayout *topLayout) { - QGridLayout *headerLayout = new QGridLayout(topLayout); + Q3GridLayout *headerLayout = new Q3GridLayout(topLayout); @@ -197,6 +204,6 @@ void KOEditorGeneral::selectedCatPopup( int index ) -void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneral::initCategories(QWidget *parent, Q3BoxLayout *topLayout) { - QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); - mCatPopup = new QPopupMenu ( parent ); + Q3BoxLayout *categoriesLayout = new Q3HBoxLayout( topLayout ); + mCatPopup = new Q3PopupMenu ( parent ); mCatPopup->setCheckable (true); @@ -216,5 +223,5 @@ void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) -void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneral::initSecrecy(QWidget *parent, Q3BoxLayout *topLayout) { - QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *secrecyLayout = new Q3HBoxLayout( topLayout ); @@ -230,3 +237,3 @@ void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) -void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initDescription(QWidget *parent,Q3BoxLayout *topLayout) { @@ -245,5 +252,5 @@ void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) -void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initAlarm(QWidget *parent,Q3BoxLayout *topLayout) { - QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *alarmLayout = new Q3HBoxLayout(topLayout); @@ -530,3 +537,3 @@ void KOEditorGeneral::readIncidence(Incidence *event) // set up alarm stuff - QPtrList<Alarm> alarms = event->alarms(); + Q3PtrList<Alarm> alarms = event->alarms(); Alarm* alarm; @@ -592,3 +599,3 @@ void KOEditorGeneral::writeIncidence(Incidence *event) event->newAlarm(); - QPtrList<Alarm> alarms = event->alarms(); + Q3PtrList<Alarm> alarms = event->alarms(); Alarm *alarm; diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index b10a5d4..45f26fd 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h @@ -25,3 +25,3 @@ -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -29,7 +29,7 @@ #include <qpushbutton.h> -#include <qpopupmenu.h> -#include <qgroupbox.h> +#include <q3popupmenu.h> +#include <q3groupbox.h> #include <qlineedit.h> #include <qcombobox.h> -#include <qlistview.h> +#include <q3listview.h> #include <qradiobutton.h> @@ -38,2 +38,3 @@ #include <qcombobox.h> +#include <Q3BoxLayout> @@ -57,7 +58,7 @@ class KOEditorGeneral : public QObject void setFocusOn( int i ); - void initHeader(QWidget *,QBoxLayout *); - void initDescription(QWidget *,QBoxLayout *); - void initSecrecy(QWidget *,QBoxLayout *); - void initCategories(QWidget *,QBoxLayout *); - void initAlarm(QWidget *,QBoxLayout *); + void initHeader(QWidget *,Q3BoxLayout *); + void initDescription(QWidget *,Q3BoxLayout *); + void initSecrecy(QWidget *,Q3BoxLayout *); + void initCategories(QWidget *,Q3BoxLayout *); + void initAlarm(QWidget *,Q3BoxLayout *); @@ -117,3 +118,3 @@ class KOEditorGeneral : public QObject private: - QPopupMenu * mCatPopup; + Q3PopupMenu * mCatPopup; QString getFittingPath( const QString &) ; diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index 2c6ed9f..73a4139 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -25,7 +25,13 @@ #include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> +#include <q3vbox.h> +#include <q3buttongroup.h> +#include <q3vgroupbox.h> +#include <q3widgetstack.h> #include <qdatetime.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3Frame> +#include <QLabel> +#include <Q3VBoxLayout> @@ -86,7 +92,7 @@ void KOEditorGeneralEvent::finishSetup() -void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralEvent::initTime(QWidget *parent,Q3BoxLayout *topLayout) { - QBoxLayout *timeLayout = new QVBoxLayout(topLayout); + Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout); - QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, + Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal, i18n("Date && Time"),parent); @@ -96,5 +102,5 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) timeGroupBox->layout()->setMargin( KDialog::marginHint() ); - QFrame *timeBoxFrame = new QFrame(timeGroupBox); + Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox); - QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); + Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,2,3); layoutTimeBox->setSpacing(topLayout->spacing()); @@ -120,3 +126,3 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) QWidget* duration = new QWidget( timeBoxFrame ); - QHBoxLayout *flagsBox = new QHBoxLayout( duration ); + Q3HBoxLayout *flagsBox = new Q3HBoxLayout( duration ); mNoTimeButton = new QCheckBox(i18n("All day event"),duration); @@ -131,3 +137,3 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) flagsBox->setStretchFactor(mDurationLabel, 10 ); - mDurationLabel->setAlignment( AlignRight | AlignVCenter); + mDurationLabel->setAlignment( Qt::AlignRight | Qt::AlignVCenter); layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); @@ -149,5 +155,5 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) -void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralEvent::initClass(QWidget *parent,Q3BoxLayout *topLayout) { - QBoxLayout *classLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *classLayout = new Q3HBoxLayout(topLayout); diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h index d798905..5d97a5c 100644 --- a/korganizer/koeditorgeneralevent.h +++ b/korganizer/koeditorgeneralevent.h @@ -25,3 +25,3 @@ -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -29,7 +29,7 @@ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlineedit.h> #include <qcombobox.h> -#include <qmultilineedit.h> -#include <qlistview.h> +#include <q3multilineedit.h> +#include <q3listview.h> #include <qradiobutton.h> @@ -53,4 +53,4 @@ class KOEditorGeneralEvent : public KOEditorGeneral - void initTime(QWidget *,QBoxLayout *); - void initClass(QWidget *,QBoxLayout *); + void initTime(QWidget *,Q3BoxLayout *); + void initClass(QWidget *,Q3BoxLayout *); diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index d32d5a5..baee9fc 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -24,10 +24,17 @@ #include <qtooltip.h> -#include <qfiledialog.h> +#include <q3filedialog.h> #include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> +#include <q3vbox.h> +#include <q3buttongroup.h> +#include <q3vgroupbox.h> +#include <q3widgetstack.h> #include <qdatetime.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3Frame> +#include <QLabel> +#include <Q3VBoxLayout> @@ -84,7 +91,7 @@ void KOEditorGeneralTodo::finishSetup() -void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralTodo::initTime(QWidget *parent,Q3BoxLayout *topLayout) { - QBoxLayout *timeLayout = new QVBoxLayout(topLayout); + Q3BoxLayout *timeLayout = new Q3VBoxLayout(topLayout); - QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, + Q3GroupBox *timeGroupBox = new Q3GroupBox(1,Qt::Horizontal, i18n("Date && Time"),parent); @@ -93,5 +100,5 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) timeGroupBox->layout()->setMargin( KDialog::marginHint() ); - QFrame *timeBoxFrame = new QFrame(timeGroupBox); + Q3Frame *timeBoxFrame = new Q3Frame(timeGroupBox); - QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); + Q3GridLayout *layoutTimeBox = new Q3GridLayout(timeBoxFrame,3,3); layoutTimeBox->setSpacing(KDialog::spacingHintSmall()); @@ -135,3 +142,3 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) -void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneralTodo::initCompletion(QWidget *parent, Q3BoxLayout *topLayout) { @@ -175,6 +182,6 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) -void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneralTodo::initPriority(QWidget *parent, Q3BoxLayout *topLayout) { - QHBox* h = new QHBox ( parent ); + Q3HBox* h = new Q3HBox ( parent ); topLayout->addWidget( h ); @@ -191,5 +198,5 @@ void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) -void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneralTodo::initStatus(QWidget *parent,Q3BoxLayout *topLayout) { - QBoxLayout *statusLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *statusLayout = new Q3HBoxLayout(topLayout); @@ -398,3 +405,3 @@ void KOEditorGeneralTodo::startDateChanged(QDate newdate) if ( mDueCheck->isChecked() ) - emit dateTimesChanged(newdate,mDueDateEdit->date()); + emit dateTimesChanged((QDateTime)newdate,(QDateTime)mDueDateEdit->date()); } diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h index 2e56a7a..2e97ff5 100644 --- a/korganizer/koeditorgeneraltodo.h +++ b/korganizer/koeditorgeneraltodo.h @@ -25,3 +25,3 @@ -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -29,7 +29,7 @@ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlineedit.h> #include <qcombobox.h> -#include <qmultilineedit.h> -#include <qlistview.h> +#include <q3multilineedit.h> +#include <q3listview.h> #include <qradiobutton.h> @@ -52,6 +52,6 @@ class KOEditorGeneralTodo : public KOEditorGeneral - void initTime(QWidget *, QBoxLayout *); - void initStatus(QWidget *, QBoxLayout *); - void initCompletion(QWidget *, QBoxLayout *); - void initPriority(QWidget *, QBoxLayout *); + void initTime(QWidget *, Q3BoxLayout *); + void initStatus(QWidget *, Q3BoxLayout *); + void initCompletion(QWidget *, Q3BoxLayout *); + void initPriority(QWidget *, Q3BoxLayout *); diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index e0380c4..e0ae3a0 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -24,10 +24,10 @@ #include <qtooltip.h> -#include <qfiledialog.h> +#include <q3filedialog.h> #include <qlayout.h> -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qvgroupbox.h> -#include <qwidgetstack.h> +#include <q3vbox.h> +#include <q3buttongroup.h> +#include <q3vgroupbox.h> +#include <q3widgetstack.h> #include <qdatetime.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qspinbox.h> @@ -35,2 +35,10 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QLabel> +#include <Q3GridLayout> +#include <Q3PtrList> +#include <Q3Frame> +#include <Q3VBoxLayout> @@ -83,3 +91,3 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QHBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3HBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -102,3 +110,3 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -108,3 +116,3 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : - QBoxLayout *weeksLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *weeksLayout = new Q3HBoxLayout( topLayout ); @@ -118,4 +126,4 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : - QHBox *dayBox = new QHBox( this ); - topLayout->addWidget( dayBox, 1, AlignVCenter ); + Q3HBox *dayBox = new Q3HBox( this ); + topLayout->addWidget( dayBox, 1, Qt::AlignVCenter ); // TODO: Respect start of week setting @@ -158,3 +166,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -163,3 +171,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : - QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout ); @@ -174,7 +182,7 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : - QButtonGroup *buttonGroup = new QButtonGroup( this ); - buttonGroup->setFrameStyle( QFrame::NoFrame ); - topLayout->addWidget( buttonGroup, 1, AlignVCenter ); + Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this ); + buttonGroup->setFrameStyle( Q3Frame::NoFrame ); + topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter ); - QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 3, 2 ); + Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 3, 2 ); buttonLayout->setSpacing( KDialog::spacingHint() ); @@ -191,3 +199,3 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : - mByDayCombo = new QComboBox( buttonGroup ); + mByDayCombo = new Q3ComboBox( buttonGroup ); mByDayCombo->setSizeLimit( 7 ); @@ -295,3 +303,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -300,3 +308,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : - QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout ); @@ -311,7 +319,7 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : - QButtonGroup *buttonGroup = new QButtonGroup( this ); - buttonGroup->setFrameStyle( QFrame::NoFrame ); - topLayout->addWidget( buttonGroup, 1, AlignVCenter ); + Q3ButtonGroup *buttonGroup = new Q3ButtonGroup( this ); + buttonGroup->setFrameStyle( Q3Frame::NoFrame ); + topLayout->addWidget( buttonGroup, 1, Qt::AlignVCenter ); - QGridLayout *buttonLayout = new QGridLayout( buttonGroup, 2, 3 ); + Q3GridLayout *buttonLayout = new Q3GridLayout( buttonGroup, 2, 3 ); @@ -322,3 +330,3 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : buttonLayout->addWidget( mByDayLabel, 0, 1 ); - mByMonthCombo = new QComboBox( buttonGroup ); + mByMonthCombo = new Q3ComboBox( buttonGroup ); mByMonthCombo->insertItem( i18n("January") ); @@ -385,5 +393,5 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); - QGroupBox *groupBox = new QGroupBox( 1, Horizontal, i18n("Exceptions"), + Q3GroupBox *groupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Exceptions"), this ); @@ -393,3 +401,3 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : - QGridLayout *boxLayout = new QGridLayout( box ); + Q3GridLayout *boxLayout = new Q3GridLayout( box ); @@ -405,3 +413,3 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : - mExceptionList = new QListBox( box ); + mExceptionList = new Q3ListBox( box ); boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); @@ -508,5 +516,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); - mRangeGroupBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Range"), + mRangeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Range"), this ); @@ -515,3 +523,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, QWidget *rangeBox = new QWidget( mRangeGroupBox ); - QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); + Q3VBoxLayout *rangeLayout = new Q3VBoxLayout( rangeBox ); rangeLayout->setSpacing( KDialog::spacingHint() ); @@ -522,3 +530,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, - mRangeButtonGroup = new QButtonGroup; + mRangeButtonGroup = new Q3ButtonGroup; @@ -528,3 +536,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, - QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); + Q3BoxLayout *durationLayout = new Q3HBoxLayout( rangeLayout ); durationLayout->setSpacing( KDialog::spacingHint() ); @@ -541,3 +549,3 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, - QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); + Q3BoxLayout *endDateLayout = new Q3HBoxLayout( rangeLayout ); endDateLayout->setSpacing( KDialog::spacingHint() ); @@ -668,3 +676,3 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); @@ -727,3 +735,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : { - QGridLayout *topLayout = new QGridLayout( this, 2,2 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 2,2 ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -737,3 +745,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : - mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"), + mTimeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Time"), this ); @@ -754,3 +762,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : //mDateTimeLabel->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum) ); - mRuleBox = new QGroupBox( 1, Horizontal, i18n("Recurrence Rule"), this ); + mRuleBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Recurrence Rule"), this ); topLayout->addMultiCellWidget( mRuleBox, 2, 2, 0, 1 ); @@ -761,3 +769,3 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : - mRuleStack = new QWidgetStack( mRuleBox ); + mRuleStack = new Q3WidgetStack( mRuleBox ); @@ -898,4 +906,4 @@ void KOEditorRecurrence::readEvent(Incidence *event) QBitArray rDays( 7 ); - QPtrList<Recurrence::rMonthPos> rmp; - QPtrList<int> rmd; + Q3PtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<int> rmd; int day = 0; @@ -970,3 +978,3 @@ void KOEditorRecurrence::readEvent(Incidence *event) //qDebug("2day = %d ",day ); - QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); + Q3PtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); int month; diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index 75e0c73..6c012bd 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h @@ -25,3 +25,3 @@ -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> @@ -29,9 +29,11 @@ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlineedit.h> #include <qcombobox.h> -#include <qmultilineedit.h> -#include <qlistview.h> +#include <q3multilineedit.h> +#include <q3listview.h> #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> +#include <Q3ListBox> +#include <Q3ComboBox> @@ -43,3 +45,3 @@ -class QWidgetStack; +class Q3WidgetStack; class QSpinBox; @@ -100,3 +102,3 @@ class RecurMonthly : public RecurBase QRadioButton *mByDayRadio; - QComboBox *mByDayCombo; + Q3ComboBox *mByDayCombo; @@ -124,3 +126,3 @@ class RecurYearly : public RecurBase QRadioButton *mByMonthRadio; - QComboBox *mByMonthCombo; + Q3ComboBox *mByMonthCombo; QLabel* mByDayLabel; @@ -182,3 +184,3 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase KDateEdit *mExceptionDateEdit; - QListBox *mExceptionList; + Q3ListBox *mExceptionList; DateList mExceptionDates; @@ -237,4 +239,4 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase private: - QButtonGroup *mRangeButtonGroup; - QGroupBox *mRangeGroupBox; + Q3ButtonGroup *mRangeButtonGroup; + Q3GroupBox *mRangeGroupBox; QLabel *mStartDateLabel; @@ -302,7 +304,7 @@ class KOEditorRecurrence : public QWidget - QGroupBox *mTimeGroupBox; + Q3GroupBox *mTimeGroupBox; QLabel *mDateTimeLabel; - QGroupBox *mRuleBox; - QWidgetStack *mRuleStack; + Q3GroupBox *mRuleBox; + Q3WidgetStack *mRuleStack; RecurrenceChooser *mRecurrenceChooser; diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 3e87197..62ad250 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -24,5 +24,5 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qtimer.h> @@ -30,4 +30,9 @@ #include <qlayout.h> -#include <qwidgetstack.h> +#include <q3widgetstack.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> @@ -107,4 +112,4 @@ void KOEventEditor::setupGeneral() if( KOPrefs::instance()->mCompactDialogs ) { - QFrame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3Frame *topFrame = addPage(i18n("General")); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); topLayout->setSpacing(spacingHint()-1); @@ -121,9 +126,9 @@ void KOEventEditor::setupGeneral() - QBoxLayout *buttonLayout; + Q3BoxLayout *buttonLayout; if ( QApplication::desktop()->width() < 500 && QApplication::desktop()->height() > 240 ) - buttonLayout = new QVBoxLayout( topLayout ); + buttonLayout = new Q3VBoxLayout( topLayout ); else - buttonLayout = new QHBoxLayout( topLayout ); - QHBox* buttonWidget = new QHBox (topFrame); - QIconSet icon; + buttonLayout = new Q3HBoxLayout( topLayout ); + Q3HBox* buttonWidget = new Q3HBox (topFrame); + QIcon icon; if ( QApplication::desktop()->width() < 321 ) @@ -148,5 +153,5 @@ void KOEventEditor::setupGeneral() - QFrame *topFrame2 = addPage(i18n("Details")); + Q3Frame *topFrame2 = addPage(i18n("Details")); - QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); + Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2); topLayout2->setSpacing(spacingHint()-1); @@ -162,5 +167,5 @@ void KOEventEditor::setupGeneral() } else { - QFrame *topFrame = addPage(i18n("General")); + Q3Frame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); @@ -169,3 +174,3 @@ void KOEventEditor::setupGeneral() mGeneral->initTime(topFrame,topLayout); - QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout); mGeneral->initAlarm(topFrame,alarmLineLayout); @@ -173,3 +178,3 @@ void KOEventEditor::setupGeneral() mGeneral->initDescription(topFrame,topLayout); - QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout); mGeneral->initCategories( topFrame, detailsLayout ); @@ -184,4 +189,4 @@ void KOEventEditor::setupRecurrence() { - QFrame *topFrame = addPage( i18n("Recurrence") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = addPage( i18n("Recurrence") ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); @@ -358,3 +363,3 @@ void KOEventEditor::slotLoadTemplate() } - QPtrList<Event> events = cal.events(); + Q3PtrList<Event> events = cal.events(); Event* event = events.first(); diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index fc4d9a4..81047c1 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp @@ -24,2 +24,5 @@ #include <qcursor.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PopupMenu> @@ -34,3 +37,3 @@ -KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() +KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu() { @@ -55,3 +58,3 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() isDisabled = false; - mCatPopup = new QPopupMenu ( this ); + mCatPopup = new Q3PopupMenu ( this ); mCatPopup->setCheckable (true); @@ -59,3 +62,3 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); - mCalPopup = new QPopupMenu ( this ); + mCalPopup = new Q3PopupMenu ( this ); mCalPopup->setCheckable (true); @@ -67,3 +70,3 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() insertItem (i18n("Calendar"),mCalPopup ); - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { @@ -76,3 +79,3 @@ void KOEventPopupMenu::enableDefault( bool enable ) isDisabled = !enable; - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { @@ -148,3 +151,3 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) if ( !isDisabled ) { - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { @@ -157,3 +160,3 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) -void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, +void KOEventPopupMenu::addAdditionalItem(const QIcon &icon,const QString &text, const QObject *receiver, const char *member, diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h index e28745b..de5220b 100644 --- a/korganizer/koeventpopupmenu.h +++ b/korganizer/koeventpopupmenu.h @@ -28,3 +28,5 @@ -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -34,3 +36,3 @@ using namespace KCal; -class KOEventPopupMenu : public QPopupMenu { +class KOEventPopupMenu : public Q3PopupMenu { Q_OBJECT @@ -39,3 +41,3 @@ class KOEventPopupMenu : public QPopupMenu { - void addAdditionalItem(const QIconSet &icon,const QString &text, + void addAdditionalItem(const QIcon &icon,const QString &text, const QObject *receiver, const char *member, @@ -75,7 +77,7 @@ class KOEventPopupMenu : public QPopupMenu { bool mHasAdditionalItems; - QValueList<int> mEditOnlyItems; - QValueList<int> mSingleOnlyItems; + Q3ValueList<int> mEditOnlyItems; + Q3ValueList<int> mSingleOnlyItems; bool isDisabled; - QPopupMenu *mCatPopup; - QPopupMenu *mCalPopup; + Q3PopupMenu *mCatPopup; + Q3PopupMenu *mCalPopup; }; diff --git a/korganizer/koeventview.cpp b/korganizer/koeventview.cpp index 1d26930..a4ba85e 100644 --- a/korganizer/koeventview.cpp +++ b/korganizer/koeventview.cpp @@ -23,3 +23,3 @@ -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcursor.h> @@ -75,3 +75,3 @@ KOEventPopupMenu *KOEventView::eventPopup() -void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event) +void KOEventView::showIncidencePopup(Q3PopupMenu *popup,Incidence *event) { diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h index 77ec111..f28e68b 100644 --- a/korganizer/koeventview.h +++ b/korganizer/koeventview.h @@ -32,2 +32,4 @@ #include "koeventpopupmenu.h" +//Added by qt3to4: +#include <Q3PopupMenu> @@ -89,3 +91,3 @@ class KOEventView : public KOrg::BaseView */ - void showIncidencePopup(QPopupMenu *popup, Incidence *event); + void showIncidencePopup(Q3PopupMenu *popup, Incidence *event); diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index c0acf34..4df26a9 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -19,8 +19,13 @@ -#include <qcstring.h> -#include <qwhatsthis.h> +#include <q3cstring.h> +#include <q3whatsthis.h> #include <qdialog.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <Q3VBoxLayout> @@ -57,3 +62,3 @@ #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #else //DESKTOP_VERSION @@ -64,3 +69,3 @@ KOEventViewer::KOEventViewer(QWidget *parent,const char *name) - : QTextBrowser(parent,name) + : Q3TextBrowser(parent,name) { @@ -88,3 +93,3 @@ void KOEventViewer::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -136,3 +141,3 @@ void KOEventViewer::setSource(const QString& n) dia.setCaption( i18n("Details of attendee") ); - QVBoxLayout lay ( &dia ); + Q3VBoxLayout lay ( &dia ); KABC::AddresseeView av ( &dia ); @@ -157,3 +162,3 @@ void KOEventViewer::setSource(const QString& n) } - QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); + Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees(); if (attendees.count()) { @@ -202,3 +207,3 @@ void KOEventViewer::setSource(const QString& n) QByteArray replyData; - QCString replyTypeStr; + Q3CString replyTypeStr; #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) @@ -209,3 +214,3 @@ void KOEventViewer::setSource(const QString& n) //client->send("kaddressbook","KAddressBookIface", - QDataStream arg(paramData, IO_WriteOnly); + QDataStream arg(paramData, QIODevice::WriteOnly); arg << n.mid(6); @@ -233,3 +238,3 @@ void KOEventViewer::mailToAttendees( bool all ) { - QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); + Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees(); if (attendees.count() == 0) return; @@ -262,3 +267,3 @@ void KOEventViewer::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; @@ -589,3 +594,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) } - QPtrList<Incidence> Relations = event->relations(); + Q3PtrList<Incidence> Relations = event->relations(); Incidence *to; @@ -623,3 +628,3 @@ void KOEventViewer::formatAttendees(Incidence *event) { - QPtrList<Attendee> attendees = event->attendees(); + Q3PtrList<Attendee> attendees = event->attendees(); if (attendees.count()) { @@ -656,3 +661,3 @@ void KOEventViewer::formatAttendees(Incidence *event) - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " <a href=\"mailto:" + event->organizer() + "\">"; @@ -706,3 +711,3 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; @@ -864,3 +869,3 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e ) default: - QTextBrowser::keyPressEvent ( e ); + Q3TextBrowser::keyPressEvent ( e ); break; diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 64eb4ff..3df667f 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h @@ -24,3 +24,6 @@ -#include <qtextbrowser.h> +#include <q3textbrowser.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QKeyEvent> @@ -39,3 +42,3 @@ using namespace KCal; #include <qlabel.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <kglobal.h> @@ -49,3 +52,3 @@ class KOPrintPrefs : public QDialog setCaption( i18n("KO/Pi Printout") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 9 ); @@ -54,4 +57,4 @@ class KOPrintPrefs : public QDialog lay->addWidget( lab ); - lab->setAlignment( AlignCenter ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); + lab->setAlignment( Qt::AlignCenter ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Printout Mode"), this ); lay->addWidget( format ); @@ -85,3 +88,3 @@ private: -class KOEventViewer : public QTextBrowser { +class KOEventViewer : public Q3TextBrowser { Q_OBJECT @@ -119,3 +122,3 @@ class KOEventViewer : public QTextBrowser { private: - QTextBrowser *mEventTextView; + Q3TextBrowser *mEventTextView; bool mSyncMode; diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 2e936f3..3a37852 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -24,2 +24,5 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <QHideEvent> +#include <QKeyEvent> @@ -29,3 +32,3 @@ #include <libkcal/todo.h> -#include "qapp.h" +#include "qapplication.h" diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 71696f4..947c10b 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -24,3 +24,6 @@ -#include <qtextview.h> +#include <q3textview.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <QHideEvent> diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ee9c9f6..8335ba9 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -29,6 +29,10 @@ #include <qdialog.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qdir.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3PtrList> @@ -49,4 +53,4 @@ -KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, - const char* name,WFlags fl ) +KOFilterView::KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent, + const char* name,Qt::WFlags fl ) : KOFilterView_base(parent,name,fl) @@ -116,3 +120,3 @@ KOCalEditView::KOCalEditView(QWidget* parent, const char* name ) - : QScrollView(parent,name) + : Q3ScrollView(parent,name) { @@ -120,6 +124,6 @@ KOCalEditView::KOCalEditView(QWidget* parent, setResizePolicy( AutoOneFit ); - setFrameStyle ( QFrame::Panel | QFrame::Plain ); + setFrameStyle ( Q3Frame::Panel | Q3Frame::Plain ); setLineWidth ( 1 ); setMidLineWidth ( 1 ); - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); } @@ -249,3 +253,3 @@ void KOCalEditView::readConfig() int ii = 0; - mainLayout = new QGridLayout ( mw , 2, 8 ); + mainLayout = new Q3GridLayout ( mw , 2, 8 ); mainLayout->setMargin( 2 ); @@ -253,3 +257,3 @@ void KOCalEditView::readConfig() QPushButton * addButT = new QPushButton ( mw ); - addButT->setFocusPolicy(NoFocus); + addButT->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addButT,0,0 ); @@ -257,9 +261,9 @@ void KOCalEditView::readConfig() connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); - 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.") ); + 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.") ); //addBut->setPixmap ( SmallIcon("greenhook16")); QPushButton *addBut = new QPushButton ( mw ); - addBut->setFocusPolicy(NoFocus); + addBut->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addBut,0,++ii ); addBut->setPixmap ( SmallIcon("eye")); - 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.") ); + 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.") ); connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); @@ -270,3 +274,3 @@ void KOCalEditView::readConfig() mainLayout->addWidget( lab,0,++ii ); - 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.") ); + 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.") ); //lab = new QLabel ( i18n(" "), mw ); @@ -275,6 +279,6 @@ void KOCalEditView::readConfig() addBut = new QPushButton ( mw ); - addBut->setFocusPolicy(NoFocus); + addBut->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addBut,0,++ii ); addBut->setPixmap ( SmallIcon("bell")); - 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.") ); + 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.") ); connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); @@ -283,6 +287,6 @@ void KOCalEditView::readConfig() addBut = new QPushButton ( mw ); - addBut->setFocusPolicy(NoFocus); + addBut->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addBut,0,++ii ); addBut->setPixmap ( SmallIcon("pencil")); - 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.") ); + 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.") ); connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); @@ -293,3 +297,3 @@ void KOCalEditView::readConfig() addBut = new QPushButton ( mw ); - addBut->setFocusPolicy(NoFocus); + addBut->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addBut,0,++ii ); @@ -297,3 +301,3 @@ void KOCalEditView::readConfig() connect(addBut,SIGNAL(clicked()),SLOT(addCal())); - 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.") ); + 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.") ); lab = new QLabel ( " ", mw ); @@ -433,3 +437,3 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask ) QFile fileIn( absFile ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { KMessageBox::sorry( this, i18n("Sorry, cannot create the file\n%1!\nNo calendar added!").arg( file ) ); @@ -437,3 +441,3 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask ) } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); @@ -477,3 +481,3 @@ void KOCalEditView::disableRO() } -void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list , bool enable ) +void KOCalEditView::toggleList ( Q3PtrList<KOCalCheckButton> list , bool enable ) { diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 0dd423a..f1bbab4 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -28,2 +28,3 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qradiobutton.h> @@ -32,4 +33,9 @@ #include <qdialog.h> -#include <qscrollview.h> +#include <q3scrollview.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PtrList> +#include <QKeyEvent> +#include <Q3VBoxLayout> #include <kconfig.h> @@ -44,3 +50,3 @@ -class QGridLayout; +class Q3GridLayout; @@ -56,3 +62,3 @@ class KONewCalPrefs : public QDialog setCaption( i18n("Add new Calendar") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -112,3 +118,3 @@ class KOCalButton : public QPushButton mNumber = -1; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); } @@ -137,3 +143,3 @@ class KOCalCheckButton : public QCheckBox mNumber = -1; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); //setMaximumWidth( 10 ); @@ -165,3 +171,3 @@ class KOCalRadioButton : public QRadioButton mNumber = -1; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); //setMaximumWidth( 10 ); @@ -190,3 +196,3 @@ class KOFilterView : public KOFilterView_base public: - KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); + KOFilterView(Q3PtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, Qt::WFlags fl=0); ~KOFilterView(); @@ -206,6 +212,6 @@ class KOFilterView : public KOFilterView_base private: - QPtrList<CalFilter> *mFilters; + Q3PtrList<CalFilter> *mFilters; }; -class KOCalEditView : public QScrollView +class KOCalEditView : public Q3ScrollView { @@ -246,8 +252,8 @@ class KOCalEditView : public QScrollView QWidget *mw; - void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); - QPtrList<KOCalRadioButton> mStdandardB; - QPtrList<KOCalCheckButton> mEnabledB; - QPtrList<KOCalCheckButton> mAlarmB; - QPtrList<KOCalCheckButton> mROB; - QGridLayout* mainLayout; + void toggleList ( Q3PtrList<KOCalCheckButton> , bool b = true ); + Q3PtrList<KOCalRadioButton> mStdandardB; + Q3PtrList<KOCalCheckButton> mEnabledB; + Q3PtrList<KOCalCheckButton> mAlarmB; + Q3PtrList<KOCalCheckButton> mROB; + Q3GridLayout* mainLayout; }; diff --git a/korganizer/koimportoldialog.cpp b/korganizer/koimportoldialog.cpp index 79b97e8..63d044c 100644 --- a/korganizer/koimportoldialog.cpp +++ b/korganizer/koimportoldialog.cpp @@ -24,8 +24,8 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> #include <qlayout.h> -#include <qprogressbar.h> -#include <qprogressdialog.h> -#include <qwidgetstack.h> +#include <q3progressbar.h> +#include <q3progressdialog.h> +#include <q3widgetstack.h> #include <qdatetime.h> @@ -33,7 +33,7 @@ #include <qapplication.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qregexp.h> -#include <qheader.h> +#include <q3header.h> #include <qdatetime.h> -#include <qlistview.h> +#include <q3listview.h> @@ -72,9 +72,9 @@ QDateTime mDdate2Qdtr( DATE dt) -class OLEListViewItem : public QCheckListItem +class OLEListViewItem : public Q3CheckListItem { public: - OLEListViewItem( QListView *parent, QString text ) : - QCheckListItem( parent, text, QCheckListItem::CheckBox ) { mData = 0; }; - OLEListViewItem( QListViewItem *after, QString text ) : - QCheckListItem( after, text, QCheckListItem::CheckBox ) { mData = 0; }; + OLEListViewItem( Q3ListView *parent, QString text ) : + Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { mData = 0; }; + OLEListViewItem( Q3ListViewItem *after, QString text ) : + Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { mData = 0; }; ~OLEListViewItem() {}; @@ -91,5 +91,5 @@ KOImportOLdialog::KOImportOLdialog( const QString &caption, { - QHBox * mw = new QHBox( this ); + Q3HBox * mw = new Q3HBox( this ); setMainWidget( mw ); - mListView = new QListView( mw ); + mListView = new Q3ListView( mw ); mListView->addColumn(i18n("Select Folder to import")); @@ -214,3 +214,3 @@ void KOImportOLdialog::readCalendarData( DWORD folder ) folderItems = mf.GetItems(); - QProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this ); + Q3ProgressDialog bar( i18n("Importing calendar data"),i18n("Abort"), folderItems.GetCount(),this ); bar.setCaption (i18n("Importing!") ); diff --git a/korganizer/koimportoldialog.h b/korganizer/koimportoldialog.h index c8847c5..d66f099 100644 --- a/korganizer/koimportoldialog.h +++ b/korganizer/koimportoldialog.h @@ -33,3 +33,3 @@ class QDateTime; -class QListView; +class Q3ListView; class OLEListViewItem; @@ -74,3 +74,3 @@ class KOImportOLdialog : public KDialogBase Calendar *mCalendar; - QListView * mListView; + Q3ListView * mListView; QString getUidByEmail( QString email ); diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp index 236f6f9..2060ea1 100644 --- a/korganizer/koincidenceeditor.cpp +++ b/korganizer/koincidenceeditor.cpp @@ -24,8 +24,10 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> #include <qlayout.h> -#include <qwidgetstack.h> +#include <q3widgetstack.h> #include <qdatetime.h> #include <qdir.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -84,5 +86,5 @@ void KOIncidenceEditor::setupAttendeesTab() { - QFrame *topFrame = addPage(i18n("Attendees")); + Q3Frame *topFrame = addPage(i18n("Attendees")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 406df5a..51594ff 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -27,5 +27,5 @@ #include <qlayout.h> -#include <qscrollview.h> -#include <qpopupmenu.h> -#include <qhbox.h> +#include <q3scrollview.h> +#include <q3popupmenu.h> +#include <q3hbox.h> #include <qpushbutton.h> @@ -34,2 +34,8 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QPixmap> +#include <Q3PtrList> +#include <QKeyEvent> +#include <Q3VBoxLayout> @@ -53,3 +59,3 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, mCalendar = calendar; - QHBox * vb = new QHBox ( this ); + Q3HBox * vb = new Q3HBox ( this ); QPushButton * newJournal = new QPushButton( vb ); @@ -65,5 +71,5 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, mDateLabel->setMargin(1); - mDateLabel->setAlignment(AlignCenter); - QScrollView * sv = new QScrollView( this ); - QVBoxLayout * hbl = new QVBoxLayout( this ); + mDateLabel->setAlignment(Qt::AlignCenter); + Q3ScrollView * sv = new Q3ScrollView( this ); + Q3VBoxLayout * hbl = new Q3VBoxLayout( this ); hbl->addWidget( vb ); @@ -72,4 +78,4 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, sv->addChild(parWid); - sv->setResizePolicy( QScrollView:: AutoOneFit ); - mTopLayout = new QVBoxLayout(parWid); + sv->setResizePolicy( Q3ScrollView:: AutoOneFit ); + mTopLayout = new Q3VBoxLayout(parWid); connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); @@ -98,5 +104,5 @@ JournalEntry* KOJournalView::getNewEntry() -QPtrList<Incidence> KOJournalView::selectedIncidences() +Q3PtrList<Incidence> KOJournalView::selectedIncidences() { - QPtrList<Incidence> eventList; + Q3PtrList<Incidence> eventList; @@ -164,3 +170,3 @@ void KOJournalView::showOnly ( Journal* j ) } - QPtrList<Journal> jl; + Q3PtrList<Journal> jl; jl.append ( j ); @@ -170,3 +176,3 @@ void KOJournalView::showOnly ( Journal* j ) } -void KOJournalView::showList(QPtrList<Journal> jl) +void KOJournalView::showList(Q3PtrList<Journal> jl) { @@ -227,3 +233,3 @@ void KOJournalView::showDates(const QDate &start, const QDate &) mDateLabel->setText(KGlobal::locale()->formatDate(mDate)); - QPtrList<Journal> jl = calendar()->journals4Date( start ); + Q3PtrList<Journal> jl = calendar()->journals4Date( start ); showList( jl ); @@ -231,3 +237,3 @@ void KOJournalView::showDates(const QDate &start, const QDate &) -void KOJournalView::showEvents(QPtrList<Event>) +void KOJournalView::showEvents(Q3PtrList<Event>) { diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h index 7fa94ae..22f26cd 100644 --- a/korganizer/kojournalview.h +++ b/korganizer/kojournalview.h @@ -27,2 +27,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <QLabel> +#include <Q3BoxLayout> @@ -48,3 +53,3 @@ class KOJournalView : public KOrg::BaseView void clearList(); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); DateList selectedDates() @@ -62,3 +67,3 @@ class KOJournalView : public KOrg::BaseView void showDates( const QDate &start, const QDate &end ); - void showEvents(QPtrList<Event> eventList); + void showEvents(Q3PtrList<Event> eventList); @@ -67,8 +72,8 @@ class KOJournalView : public KOrg::BaseView private: - void showList(QPtrList<Journal> jl); + void showList(Q3PtrList<Journal> jl); Calendar *mCalendar; JournalEntry* getNewEntry(); - QPtrList<JournalEntry> jEntries; + Q3PtrList<JournalEntry> jEntries; void keyPressEvent ( QKeyEvent * ) ; - QBoxLayout *mTopLayout; + Q3BoxLayout *mTopLayout; QWidget *parWid; diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 192f8c0..0ea1d50 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -24,7 +24,7 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qlayout.h> #include <qlabel.h> -#include <qpopupmenu.h> -#include <qprogressbar.h> +#include <q3popupmenu.h> +#include <q3progressbar.h> #include <qfileinfo.h> @@ -32,8 +32,17 @@ #include <qdialog.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qdir.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qregexp.h> #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> +//Added by qt3to4: +#include <QPixmap> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> +#include <Q3VBoxLayout> +#include <Q3PtrList> + +#include<QDesktopWidget> @@ -72,6 +81,6 @@ extern QPixmap* sgListViewJournalPix; -class KOListViewWhatsThis :public QWhatsThis +class KOListViewWhatsThis :public Q3WhatsThis { public: - KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; + KOListViewWhatsThis( QWidget *wid, KOListView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { }; @@ -276,14 +285,14 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, - mListView->setColumnAlignment(0,AlignLeft); - mListView->setColumnAlignment(1,AlignLeft); - mListView->setColumnAlignment(2,AlignHCenter); - mListView->setColumnAlignment(3,AlignLeft); - mListView->setColumnAlignment(4,AlignHCenter); - mListView->setColumnAlignment(5,AlignLeft); - mListView->setColumnAlignment(6,AlignLeft); - mListView->setColumnAlignment(7,AlignLeft); - mListView->setColumnAlignment(8,AlignLeft); - mListView->setColumnAlignment(9,AlignLeft); - mListView->setColumnAlignment(10,AlignLeft); - mListView->setColumnAlignment(11,AlignLeft); + mListView->setColumnAlignment(0,Qt::AlignLeft); + mListView->setColumnAlignment(1,Qt::AlignLeft); + mListView->setColumnAlignment(2,Qt::AlignHCenter); + mListView->setColumnAlignment(3,Qt::AlignLeft); + mListView->setColumnAlignment(4,Qt::AlignHCenter); + mListView->setColumnAlignment(5,Qt::AlignLeft); + mListView->setColumnAlignment(6,Qt::AlignLeft); + mListView->setColumnAlignment(7,Qt::AlignLeft); + mListView->setColumnAlignment(8,Qt::AlignLeft); + mListView->setColumnAlignment(9,Qt::AlignLeft); + mListView->setColumnAlignment(10,Qt::AlignLeft); + mListView->setColumnAlignment(11,Qt::AlignLeft); mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); @@ -292,5 +301,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, for ( iii = 0; iii< 12 ; ++iii ) - mListView->setColumnWidthMode( iii, QListView::Manual ); + mListView->setColumnWidthMode( iii, Q3ListView::Manual ); - QBoxLayout *layoutTop = new QVBoxLayout(this); + Q3BoxLayout *layoutTop = new Q3VBoxLayout(this); layoutTop->addWidget(mListView); @@ -298,3 +307,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mPopupMenu = eventPopup(); - QPopupMenu* selPopup = new QPopupMenu ( this ); + Q3PopupMenu* selPopup = new Q3PopupMenu ( this ); mPopupMenu->insertSeparator(); @@ -308,3 +317,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mPopupMenu->insertItem(i18n("Selection"), selPopup ); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Hide all selected"),this, @@ -313,3 +322,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, selPopup->insertSeparator(); - QPopupMenu * exportPO = new QPopupMenu ( this ); + Q3PopupMenu * exportPO = new Q3PopupMenu ( this ); selPopup->insertItem( i18n("Export"), exportPO ); @@ -317,3 +326,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mPopupMenu->insertSeparator(); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Print complete list..."),this, @@ -321,3 +330,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, #endif - mCalPopup = new QPopupMenu ( this ); + mCalPopup = new Q3PopupMenu ( this ); selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); @@ -329,6 +338,6 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, #if 0 - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Set categories")+"...",this, SLOT(setCat()),true); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Set alarm..."),this, @@ -358,3 +367,3 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, #if 0 - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Beam via IR"),this, @@ -377,9 +386,9 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, this,SIGNAL(signalNewEvent())); - QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), - this,SLOT(defaultItemAction(QListViewItem *))); - QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *, + QObject::connect(mListView,SIGNAL(doubleClicked(Q3ListViewItem *)), + this,SLOT(defaultItemAction(Q3ListViewItem *))); + QObject::connect(mListView,SIGNAL(rightButtonPressed( Q3ListViewItem *, const QPoint &, int )), - this,SLOT(popupMenu(QListViewItem *,const QPoint &,int))); - QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)), - SLOT(processSelectionChange(QListViewItem *))); + this,SLOT(popupMenu(Q3ListViewItem *,const QPoint &,int))); + QObject::connect(mListView,SIGNAL(currentChanged(Q3ListViewItem *)), + SLOT(processSelectionChange(Q3ListViewItem *))); QObject::connect(mListView,SIGNAL(showIncidence(Incidence *)), @@ -430,3 +439,3 @@ void KOListView::setCalendar( int c ) - QPtrList<Incidence> delSel = getSelectedIncidences() ; + Q3PtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); @@ -444,3 +453,3 @@ void KOListView::setCalendar( int c ) } - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -499,3 +508,3 @@ void KOListView::setAlarm() return; - QPtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos + Q3PtrList<Incidence> delSel = getSelectedIncidences( true, true, false, true ); // no journals, only due todos Incidence* inc = delSel.first(); @@ -524,3 +533,3 @@ void KOListView::setAlarm() } else { - QPtrList<Alarm> alarms = inc->alarms(); + Q3PtrList<Alarm> alarms = inc->alarms(); Alarm *alarm; @@ -554,3 +563,3 @@ void KOListView::setCategories( bool removeOld ) delete csd; - QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; + Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; Incidence* inc = delSel.first(); @@ -574,3 +583,3 @@ void KOListView::beamSelected() { - QPtrList<Incidence> delSel = getSelectedIncidences() ; + Q3PtrList<Incidence> delSel = getSelectedIncidences() ; if ( delSel.count() ) @@ -589,3 +598,3 @@ void KOListView::saveDescriptionToFile() } - QPtrList<Incidence> delSel = getSelectedIncidences() ; + Q3PtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); @@ -647,3 +656,3 @@ void KOListView::saveDescriptionToFile() QFile file( fn ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); @@ -651,3 +660,3 @@ void KOListView::saveDescriptionToFile() } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; @@ -669,8 +678,8 @@ void KOListView::saveToFile() } -QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos ) +Q3PtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool includeTodos, bool includeJournals, bool onlyDueTodos ) { - QPtrList<Incidence> delSel ; + Q3PtrList<Incidence> delSel ; bool addSubTodos = false; bool askSubTodos = true; - QListViewItem *item = mListView->firstChild (); + Q3ListViewItem *item = mListView->firstChild (); while ( item ) { @@ -708,3 +717,3 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool if ( addSubTodos ) { - QPtrList<Incidence> tempSel ; + Q3PtrList<Incidence> tempSel ; inc->addRelationsToList( &tempSel ); @@ -732,3 +741,3 @@ void KOListView::writeToFile( bool iCal ) { - QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; + Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; if ( !iCal ) { @@ -805,4 +814,4 @@ void KOListView::hideAll() { - QPtrList<QListViewItem> delSel ; - QListViewItem *item = mListView->firstChild (); + Q3PtrList<Q3ListViewItem> delSel ; + Q3ListViewItem *item = mListView->firstChild (); while ( item ) { @@ -815,3 +824,3 @@ void KOListView::hideAll() while ( item ) { - QListViewItem * del = item; + Q3ListViewItem * del = item; item = delSel.next(); @@ -826,3 +835,3 @@ void KOListView::deleteAll() { - QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;; + Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;; if ( delSel.count() ) { @@ -840,3 +849,3 @@ void KOListView::deleteAll() QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); @@ -844,3 +853,3 @@ void KOListView::deleteAll() lay.addWidget( &lab); - QProgressBar bar( icount, &dia ); + Q3ProgressBar bar( icount, &dia ); lay.addWidget( &bar); @@ -886,6 +895,6 @@ int KOListView::currentDateCount() -QPtrList<Incidence> KOListView::selectedIncidences() +Q3PtrList<Incidence> KOListView::selectedIncidences() { - QPtrList<Incidence> eventList; - QListViewItem *item = mListView->firstChild (); + Q3PtrList<Incidence> eventList; + Q3ListViewItem *item = mListView->firstChild (); while ( item ) { @@ -989,3 +998,3 @@ void KOListView::showDates(const QDate &start, const QDate &end) -void KOListView::addEvents(QPtrList<Event> eventList) +void KOListView::addEvents(Q3PtrList<Event> eventList) { @@ -1001,3 +1010,3 @@ void KOListView::addEvents(QPtrList<Event> eventList) -void KOListView::addTodos(QPtrList<Todo> eventList) +void KOListView::addTodos(Q3PtrList<Todo> eventList) { @@ -1011,3 +1020,3 @@ void KOListView::addTodos(QPtrList<Todo> eventList) } -void KOListView::addJournals(QPtrList<Journal> eventList) +void KOListView::addJournals(Q3PtrList<Journal> eventList) { @@ -1046,3 +1055,3 @@ void KOListView::addIncidence(Incidence *incidence) -void KOListView::showEvents(QPtrList<Event> eventList) +void KOListView::showEvents(Q3PtrList<Event> eventList) { @@ -1097,3 +1106,3 @@ KOListViewItem *KOListView::getItemForEvent(Incidence *event) -void KOListView::defaultItemAction(QListViewItem *i) +void KOListView::defaultItemAction(Q3ListViewItem *i) { @@ -1104,3 +1113,3 @@ void KOListView::defaultItemAction(QListViewItem *i) -void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) +void KOListView::popupMenu(Q3ListViewItem *item,const QPoint &,int) { @@ -1133,3 +1142,3 @@ void KOListView::writeSettings(KConfig *config, QString setting) -void KOListView::processSelectionChange(QListViewItem *) +void KOListView::processSelectionChange(Q3ListViewItem *) { @@ -1182,4 +1191,4 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) case Qt::Key_Down: - if ( e->state() == ShiftButton ) { - QListViewItem* cn = currentItem(); + if ( e->state() == Qt::ShiftButton ) { + Q3ListViewItem* cn = currentItem(); if ( !cn ) @@ -1196,6 +1205,6 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) } - if ( e->state() == ControlButton ) { + if ( e->state() == Qt::ControlButton ) { int count = childCount (); int jump = count / 5; - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); @@ -1213,3 +1222,3 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) } else - QListView::keyPressEvent ( e ) ; + Q3ListView::keyPressEvent ( e ) ; e->accept(); @@ -1218,4 +1227,4 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) case Qt::Key_Up: - if ( e->state() == ShiftButton ) { - QListViewItem* cn = firstChild(); + if ( e->state() == Qt::ShiftButton ) { + Q3ListViewItem* cn = firstChild(); if ( cn ) { @@ -1227,6 +1236,6 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) } - if ( e->state() == ControlButton ) { + if ( e->state() == Qt::ControlButton ) { int count = childCount (); int jump = count / 5; - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); @@ -1243,3 +1252,3 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) } else - QListView::keyPressEvent ( e ) ; + Q3ListView::keyPressEvent ( e ) ; e->accept(); @@ -1247,3 +1256,3 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) case Qt::Key_I: { - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); @@ -1267,3 +1276,3 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) { - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); @@ -1272,3 +1281,3 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) if ( ci ){ - if ( e->state() == ShiftButton ) + if ( e->state() == Qt::ShiftButton ) ci->setSelected( false ); @@ -1302,8 +1311,8 @@ KOListViewListView::KOListViewListView(KOListView * lv ) #endif - setSelectionMode( QListView::Multi ); + setSelectionMode( Q3ListView::Multi ); setMultiSelection( true); } -bool KOListViewListView::hasMultiSelection(QListViewItem* item) +bool KOListViewListView::hasMultiSelection(Q3ListViewItem* item) { - QListViewItem *qitem = firstChild (); + Q3ListViewItem *qitem = firstChild (); while ( qitem ) { @@ -1319,3 +1328,3 @@ void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt(vp); + Q3ListViewItem *item = itemAt(vp); if (!item) { @@ -1331,4 +1340,4 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) KListView::contentsMousePressEvent( e ); - if ( e->button() == RightButton ) { - QListViewItem* ci = currentItem(); + if ( e->button() == Qt::RightButton ) { + Q3ListViewItem* ci = currentItem(); clearSelection () ; @@ -1350,3 +1359,3 @@ void KOListViewListView::popupMenu() mPopupTimer->stop(); - QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton ); + QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, Qt::RightButton , Qt::RightButton ); QApplication::postEvent( this->viewport(), e ); @@ -1358,3 +1367,3 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) mYMousePos = mapToGlobal( (e->pos())).y(); - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { mPopupTimer->start( 600 ); @@ -1364,4 +1373,4 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) KListView::contentsMousePressEvent( e ); - if ( e->button() == RightButton ) { - QListViewItem* ci = currentItem(); + if ( e->button() == Qt::RightButton ) { + Q3ListViewItem* ci = currentItem(); //clearSelection(); @@ -1392,3 +1401,3 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) #define protected public -#include <qheader.h> +#include <q3header.h> #undef protected @@ -1409,3 +1418,3 @@ void KOListViewListView::printList() p.setFont(font()); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -1445,3 +1454,3 @@ void KOListViewListView::printList() int align = columnAlignment( iii ); - if ( align == AlignAuto ) align = AlignLeft; + if ( align == Qt::AlignLeft ) align = Qt::AlignLeft; p.restore(); diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index 99d0561..9fb0b00 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h @@ -26,5 +26,11 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qmap.h> -#include <qdict.h> +#include <q3dict.h> +//Added by qt3to4: +#include <QMouseEvent> +#include <Q3PtrList> +#include <Q3PopupMenu> +#include <QKeyEvent> +#include <Q3VBoxLayout> @@ -49,3 +55,3 @@ class KOListViewWhatsThis; #include <qcheckbox.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qlabel.h> @@ -62,3 +68,3 @@ class KOAlarmPrefs : public QDialog setCaption( i18n("Alarm Options") ); - QVBoxLayout* alarmLayout = new QVBoxLayout( this ); + Q3VBoxLayout* alarmLayout = new Q3VBoxLayout( this ); alarmLayout->setSpacing( 3 ); @@ -76,3 +82,3 @@ class KOAlarmPrefs : public QDialog alarmLayout->addWidget(mAlarmIncrCombo); - QHBox * hb = new QHBox ( parent ); + Q3HBox * hb = new Q3HBox ( parent ); alarmLayout->addWidget(hb); @@ -212,3 +218,3 @@ class KOListViewListView : public KListView KOListViewListView(KOListView * lv ); - bool hasMultiSelection(QListViewItem*); + bool hasMultiSelection(Q3ListViewItem*); void printList(); @@ -242,3 +248,3 @@ class KOListView : public KOEventView virtual int currentDateCount(); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); virtual DateList selectedDates(); @@ -247,4 +253,4 @@ class KOListView : public KOEventView Incidence* currentItem(); - void addTodos(QPtrList<Todo> eventList); - void addJournals(QPtrList<Journal> eventList); + void addTodos(Q3PtrList<Todo> eventList); + void addJournals(Q3PtrList<Journal> eventList); virtual void printPreview(CalPrinter *calPrinter, @@ -259,3 +265,3 @@ class KOListView : public KOEventView QString getWhatsThisText(QPoint p); - QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); + Q3PtrList<Incidence> getSelectedIncidences( bool includeEvents = true, bool includeTodos = true , bool includeJournals = true, bool onlyDueTodos = false ); void showCompletedTodos(); @@ -263,3 +269,3 @@ class KOListView : public KOEventView void signalNewEvent(); - void beamIncidenceList(QPtrList<Incidence>); + void beamIncidenceList(Q3PtrList<Incidence>); @@ -271,3 +277,3 @@ class KOListView : public KOEventView virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void clearSelection(); @@ -289,4 +295,4 @@ class KOListView : public KOEventView - void defaultItemAction(QListViewItem *item); - void popupMenu(QListViewItem *item,const QPoint &,int); + void defaultItemAction(Q3ListViewItem *item); + void popupMenu(Q3ListViewItem *item,const QPoint &,int); void setCalendar( int c ); @@ -295,3 +301,3 @@ class KOListView : public KOEventView protected slots: - void processSelectionChange(QListViewItem *); + void processSelectionChange(Q3ListViewItem *); void catChanged( Incidence* ); @@ -300,3 +306,3 @@ class KOListView : public KOEventView void writeToFile( bool iCal ); - void addEvents(QPtrList<Event> eventList); + void addEvents(Q3PtrList<Event> eventList); void addIncidence(Incidence *); @@ -306,3 +312,3 @@ class KOListView : public KOEventView bool mForceShowCompletedTodos; - QPopupMenu* mCalPopup; + Q3PopupMenu* mCalPopup; KOListViewWhatsThis *mKOListViewWhatsThis; @@ -311,3 +317,3 @@ class KOListView : public KOEventView KOListViewItem *mActiveItem; - QDict<Incidence> mUidDict; + Q3Dict<Incidence> mUidDict; QDate mStartDate; diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 85e9166..ca55c43 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -19,9 +19,9 @@ -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qfont.h> #include <qfontmetrics.h> -#include <qkeycode.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qwidgetstack.h> +#include <qnamespace.h> +#include <q3hbox.h> +#include <q3vbox.h> +#include <q3widgetstack.h> #include <qpushbutton.h> @@ -30,3 +30,3 @@ #include <qtimer.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #ifndef DESKTOP_VERSION @@ -35,2 +35,14 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> +#include <QPixmap> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QKeyEvent> +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3PointArray> +#include <Q3PtrList> #endif @@ -61,6 +73,6 @@ QToolTipGroup *MonthViewCell::mToolTipGroup = 0; #endif -class KNOWhatsThis :public QWhatsThis +class KNOWhatsThis :public Q3WhatsThis { public: - KNOWhatsThis( KNoScrollListBox* sbox ) : QWhatsThis( sbox ), _wid( sbox) { }; + KNOWhatsThis( KNoScrollListBox* sbox ) : Q3WhatsThis( sbox ), _wid( sbox) { }; //~KNOWhatsThis( ) {qDebug("~KNOWhatsThis( ) "); }; @@ -79,3 +91,3 @@ private: KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) - : QListBox(parent, name, WRepaintNoErase) + : Q3ListBox(parent, name, Qt::WNoAutoErase) { @@ -87,4 +99,4 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) resetOnFocusIn = true; - setVScrollBarMode(QScrollView::AlwaysOff); - setHScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); } @@ -102,3 +114,3 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) { - QListBox::focusInEvent ( e ); + Q3ListBox::focusInEvent ( e ); if ( count() ){ @@ -114,3 +126,3 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { - QListBoxItem *fi = firstItem (); + Q3ListBoxItem *fi = firstItem (); if (fi ) { @@ -119,15 +131,15 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) if ( hei < height() - horizontalScrollBar()->height () ) { - setVScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); } else - setVScrollBarMode(QScrollView::Auto); + setVScrollBarMode(Q3ScrollView::Auto); if ( ihei *3 > height() ) { - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); } else { - setHScrollBarMode(QScrollView::Auto); + setHScrollBarMode(Q3ScrollView::Auto); } } else { - setVScrollBarMode(QScrollView::Auto); - setHScrollBarMode(QScrollView::Auto); + setVScrollBarMode(Q3ScrollView::Auto); + setHScrollBarMode(Q3ScrollView::Auto); } @@ -143,6 +155,6 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) } - QListBox::focusOutEvent ( e ); + Q3ListBox::focusOutEvent ( e ); } - setVScrollBarMode(QScrollView::AlwaysOff); - setHScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); if ( ! mBlockDeselect ) @@ -154,3 +166,3 @@ QString KNoScrollListBox::getWhatsThisText(QPoint p) { - QListBoxItem* item = itemAt ( p ); + Q3ListBoxItem* item = itemAt ( p ); if ( ! item ) { @@ -167,3 +179,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) switch(e->key()) { - case Key_Right: + case Qt::Key_Right: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) @@ -175,3 +187,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; - case Key_Left: + case Qt::Key_Left: if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) @@ -183,3 +195,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; - case Key_Up: + case Qt::Key_Up: if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { @@ -203,3 +215,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; - case Key_Down: + case Qt::Key_Down: if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { @@ -223,3 +235,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; - case Key_I: + case Qt::Key_I: QTimer::singleShot( 1, this, SLOT ( oneDown() ) ); @@ -227,4 +239,4 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { @@ -238,3 +250,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; - case Key_Shift: + case Qt::Key_Shift: emit shiftDown(); @@ -268,3 +280,3 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) switch(e->key()) { - case Key_Shift: + case Qt::Key_Shift: emit shiftUp(); @@ -278,5 +290,5 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) { - QListBox::mousePressEvent(e); + Q3ListBox::mousePressEvent(e); - if(e->button() == RightButton) { + if(e->button() == Qt::RightButton) { emit rightClick(); @@ -286,3 +298,3 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s) - : QListBoxItem() + : Q3ListBoxItem() { @@ -397,3 +409,3 @@ void MonthViewItem::paint(QPainter *p) if ( mMultiday == 2 || mMultiday == 3 ) { - QPointArray pa ( 3 ); + Q3PointArray pa ( 3 ); pa.setPoint (0, x, yyy ); @@ -404,3 +416,3 @@ void MonthViewItem::paint(QPainter *p) if ( mMultiday == 2 || mMultiday == 1 ) { - QPointArray pa ( 3 ); + Q3PointArray pa ( 3 ); pa.setPoint (0, x+sizeM +sizeM/2, yyy ); @@ -464,3 +476,3 @@ void MonthViewItem::paint(QPainter *p) -int MonthViewItem::height(const QListBox *lb) const +int MonthViewItem::height(const Q3ListBox *lb) const { @@ -472,3 +484,3 @@ int MonthViewItem::height(const QListBox *lb) const -int MonthViewItem::width(const QListBox *lb) const +int MonthViewItem::width(const Q3ListBox *lb) const { @@ -516,6 +528,6 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) mLabel->setFlat( true ); - mLabel->setFocusPolicy(NoFocus); + mLabel->setFocusPolicy(Qt::NoFocus); //mItemList = new KNoScrollListBox( this ); setMinimumSize( 10, 10 ); - setFrameStyle( QFrame::Panel | QFrame::Plain ); + setFrameStyle( Q3Frame::Panel | Q3Frame::Plain ); setLineWidth( 1 ); @@ -531,9 +543,9 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) connect( mLabel, SIGNAL( clicked( )), SLOT( showDay() )); - connect( this , SIGNAL( doubleClicked( QListBoxItem *) ), - SLOT( defaultAction( QListBoxItem * ) ) ); - connect( this, SIGNAL( rightButtonPressed( QListBoxItem *, + connect( this , SIGNAL( doubleClicked( Q3ListBoxItem *) ), + SLOT( defaultAction( Q3ListBoxItem * ) ) ); + connect( this, SIGNAL( rightButtonPressed( Q3ListBoxItem *, const QPoint &) ), - SLOT( contextMenu( QListBoxItem * ) ) ); - connect( this, SIGNAL( highlighted( QListBoxItem *) ), - SLOT( selection( QListBoxItem * ) ) ); + SLOT( contextMenu( Q3ListBoxItem * ) ) ); + connect( this, SIGNAL( highlighted( Q3ListBoxItem *) ), + SLOT( selection( Q3ListBoxItem * ) ) ); @@ -547,3 +559,3 @@ QToolTipGroup *MonthViewCell::toolTipGroup() { - if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); + /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */ return mToolTipGroup; @@ -639,3 +651,3 @@ void MonthViewCell::startUpdateCell() mdayCount = 0; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); if ( !mMonthView->isUpdatePossible() ) @@ -694,3 +706,3 @@ int MonthViewCell::insertEvent(Event *event) QString mToolTipText; - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); if ( !(event->doesRecur() == Recurrence::rNone) ) { @@ -836,3 +848,3 @@ int MonthViewCell::insertEvent(Event *event) // qDebug("i %d mday %u count %d ",i,itcount,mdayCount ); - QListBoxItem* it = this->item ( i ); + Q3ListBoxItem* it = this->item ( i ); if ( it && text < it->text() ) { @@ -852,3 +864,3 @@ void MonthViewCell::insertTodo(Todo *todo) { - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); QString text; @@ -924,3 +936,3 @@ void MonthViewCell::finishUpdateCell() mToolTip.sort(); - QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); + /* TODO: hacker: QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); */ } @@ -940,3 +952,3 @@ void MonthViewCell::updateCell() //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); - QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); + Q3PtrList<Event> events = mMonthView->calendar()->events( mDate, true ); Event *event; @@ -946,3 +958,3 @@ void MonthViewCell::updateCell() // insert due todos - QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); + Q3PtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); Todo *todo; @@ -994,3 +1006,3 @@ void MonthViewCell::enableScrollBars( bool enabled ) if ( enabled ) { - QListBoxItem *fi = firstItem (); + Q3ListBoxItem *fi = firstItem (); if (fi ) { @@ -999,19 +1011,19 @@ void MonthViewCell::enableScrollBars( bool enabled ) if ( hei < height() - horizontalScrollBar()->height () ) { - setVScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); } else - setVScrollBarMode(QScrollView::Auto); + setVScrollBarMode(Q3ScrollView::Auto); if ( ihei *3 > height() ) { - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); } else { - setHScrollBarMode(QScrollView::Auto); + setHScrollBarMode(Q3ScrollView::Auto); } } else { - setVScrollBarMode(QScrollView::Auto); - setHScrollBarMode(QScrollView::Auto); + setVScrollBarMode(Q3ScrollView::Auto); + setHScrollBarMode(Q3ScrollView::Auto); } } else { - setVScrollBarMode(QScrollView::AlwaysOff); - setHScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); } @@ -1085,3 +1097,3 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e ) -void MonthViewCell::defaultAction( QListBoxItem *item ) +void MonthViewCell::defaultAction( Q3ListBoxItem *item ) { @@ -1107,3 +1119,3 @@ void MonthViewCell::newEvent() } -void MonthViewCell::cellClicked( QListBoxItem *item ) +void MonthViewCell::cellClicked( Q3ListBoxItem *item ) { @@ -1118,3 +1130,3 @@ void MonthViewCell::cellClicked( QListBoxItem *item ) -void MonthViewCell::contextMenu( QListBoxItem *item ) +void MonthViewCell::contextMenu( Q3ListBoxItem *item ) { @@ -1135,3 +1147,3 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) -void MonthViewCell::selection( QListBoxItem *item ) +void MonthViewCell::selection( Q3ListBoxItem *item ) { @@ -1187,4 +1199,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); - mWidStack = new QWidgetStack( this ); - QVBoxLayout* hb = new QVBoxLayout( this ); + mWidStack = new Q3WidgetStack( this ); + Q3VBoxLayout* hb = new Q3VBoxLayout( this ); mMonthView = new QWidget( mWidStack ); @@ -1217,5 +1229,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) label->setFont(bfont); - label->setFrameStyle(QFrame::Panel|QFrame::Raised); + label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised); label->setLineWidth(1); - label->setAlignment(AlignCenter); + label->setAlignment(Qt::AlignCenter); mDayLabels.insert( i, label ); @@ -1223,5 +1235,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) label->setFont(bfont); - label->setFrameStyle(QFrame::Panel|QFrame::Raised); + label->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised); label->setLineWidth(1); - label->setAlignment(AlignCenter); + label->setAlignment(Qt::AlignCenter); mDayLabelsW.insert( i, label ); @@ -1234,3 +1246,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) KOWeekButton *label = new KOWeekButton( mMonthView ); - label->setFocusPolicy(NoFocus); + label->setFocusPolicy(Qt::NoFocus); label->setFont(bfont); @@ -1238,3 +1250,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) label->setFlat(true); - QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); + Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); //label->setFrameStyle(QFrame::Panel|QFrame::Raised); @@ -1245,4 +1257,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) mWeekLabels[mNumWeeks]->setText( i18n("W")); - mWeekLabels[mNumWeeks]->setFocusPolicy(WheelFocus); - QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); + mWeekLabels[mNumWeeks]->setFocusPolicy(Qt::WheelFocus); + Q3WhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); @@ -1250,3 +1262,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) KOWeekButton *label = new KOWeekButton( mWeekView ); - label->setFocusPolicy(NoFocus); + label->setFocusPolicy(Qt::NoFocus); label->setFont(bfont); @@ -1254,3 +1266,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) label->setFlat(true); - QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); + Q3WhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); //label->setFrameStyle(QFrame::Panel|QFrame::Raised); @@ -1261,3 +1273,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) mWeekLabelsW[1]->setText( i18n("W")); - mWeekLabelsW[1]->setFocusPolicy(WheelFocus); + mWeekLabelsW[1]->setFocusPolicy(Qt::WheelFocus); @@ -1307,9 +1319,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) mContextMenu = eventPopup(); - mContextMenu->addAdditionalItem(QIconSet(QPixmap()), + mContextMenu->addAdditionalItem(QIcon(QPixmap()), i18n("New Event..."),this, SLOT(slotNewEvent()),false); - mContextMenu->addAdditionalItem(QIconSet(QPixmap()), + mContextMenu->addAdditionalItem(QIcon(QPixmap()), i18n("New Todo..."),this, SLOT(slotNewTodo()),false); - mContextMenu->addAdditionalItem(QIconSet(QPixmap()), + mContextMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Journal"),this, @@ -1327,3 +1339,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) pathString += "iconsmini/"; - mNewItemMenu = new QPopupMenu( this ); + mNewItemMenu = new Q3PopupMenu( this ); mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent())); @@ -1399,3 +1411,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int } - QPtrVector<MonthViewCell> *cells; + Q3PtrVector<MonthViewCell> *cells; if ( weekview ) @@ -1497,5 +1509,5 @@ int KOMonthView::currentDateCount() -QPtrList<Incidence> KOMonthView::selectedIncidences() +Q3PtrList<Incidence> KOMonthView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; @@ -1563,3 +1575,3 @@ void KOMonthView::updateConfig() #ifdef DESKTOP_VERSION - MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); + /* TODO:hacker: MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); */ #endif @@ -1571,3 +1583,3 @@ void KOMonthView::updateDayLabels() - QPtrVector<QLabel> *mDayLabelsT; + Q3PtrVector<QLabel> *mDayLabelsT; @@ -1612,5 +1624,5 @@ void KOMonthView::showDates(const QDate &start, const QDate &) - QPtrVector<MonthViewCell> *cells; - QPtrVector<QLabel> *dayLabels; - QPtrVector<KOWeekButton> *weekLabels; + Q3PtrVector<MonthViewCell> *cells; + Q3PtrVector<QLabel> *dayLabels; + Q3PtrVector<KOWeekButton> *weekLabels; uint weekNum = 6; @@ -1670,3 +1682,3 @@ void KOMonthView::showDates(const QDate &start, const QDate &) -void KOMonthView::showEvents(QPtrList<Event>) +void KOMonthView::showEvents(Q3PtrList<Event>) { @@ -1692,3 +1704,3 @@ void KOMonthView::updateView() clearSelection(); - QPtrVector<MonthViewCell> *cells; + Q3PtrVector<MonthViewCell> *cells; if ( mShowWeekView ) { @@ -1707,3 +1719,3 @@ void KOMonthView::updateView() - QPtrList<Event> events = calendar()->events(); + Q3PtrList<Event> events = calendar()->events(); Event *event; @@ -1771,3 +1783,3 @@ void KOMonthView::updateView() // insert due todos - QPtrList<Todo> todos = calendar()->todos( ); + Q3PtrList<Todo> todos = calendar()->todos( ); Todo *todo; @@ -2227,3 +2239,3 @@ void KOMonthView::processSelectionChange() { - QPtrList<Incidence> incidences = selectedIncidences(); + Q3PtrList<Incidence> incidences = selectedIncidences(); if (incidences.count() > 0) { @@ -2263,3 +2275,3 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) switch(e->key()) { - case Key_Up: + case Qt::Key_Up: { @@ -2274,3 +2286,3 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) break; - case Key_Down: + case Qt::Key_Down: { @@ -2286,4 +2298,4 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { @@ -2293,3 +2305,3 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) break; - case Key_D: + case Qt::Key_D: if ( mSelectedCell ) { diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 1a9d16d..bca76e5 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -23,13 +23,20 @@ #include <qlabel.h> -#include <qframe.h> +#include <q3frame.h> #include <qdatetime.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpoint.h> -#include <qwidgetstack.h> +#include <q3widgetstack.h> #include <qlayout.h> #include <qtimer.h> -#include <qintdict.h> +#include <q3intdict.h> #include <qpushbutton.h> -#include <qvaluelist.h> -#include <qptrvector.h> +#include <q3valuelist.h> +#include <q3ptrvector.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <Q3PtrList> +#include <Q3PopupMenu> +#include <QKeyEvent> @@ -74,3 +81,3 @@ private slots : -class KNoScrollListBox: public QListBox +class KNoScrollListBox: public Q3ListBox { @@ -105,3 +112,3 @@ class KNoScrollListBox: public QListBox -class MonthViewItem: public QListBoxItem +class MonthViewItem: public Q3ListBoxItem { @@ -128,4 +135,4 @@ class MonthViewItem: public QListBoxItem virtual void paint(QPainter *); - virtual int height(const QListBox *) const; - virtual int width(const QListBox *) const; + virtual int height(const Q3ListBox *) const; + virtual int width(const Q3ListBox *) const; @@ -200,6 +207,6 @@ public slots: protected slots: - void defaultAction( QListBoxItem * ); - void contextMenu( QListBoxItem * ); - void selection( QListBoxItem * ); - void cellClicked( QListBoxItem * ); + void defaultAction( Q3ListBoxItem * ); + void contextMenu( Q3ListBoxItem * ); + void selection( Q3ListBoxItem * ); + void cellClicked( Q3ListBoxItem * ); void newEvent(); @@ -208,3 +215,3 @@ public slots: int mdayCount; - QPtrList <MonthViewItem> mAvailItemList; + Q3PtrList <MonthViewItem> mAvailItemList; KOMonthView *mMonthView; @@ -249,3 +256,3 @@ class KOMonthView: public KOEventView /** returns the currently selected events */ - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); @@ -271,3 +278,3 @@ class KOMonthView: public KOEventView virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); @@ -313,3 +320,3 @@ class KOMonthView: public KOEventView bool clPending; - QWidgetStack * mWidStack; + Q3WidgetStack * mWidStack; QWidget* mMonthView; @@ -327,8 +334,8 @@ class KOMonthView: public KOEventView - QPtrVector<MonthViewCell> mCells; - QPtrVector<QLabel> mDayLabels; - QPtrVector<KOWeekButton> mWeekLabels; - QPtrVector<MonthViewCell> mCellsW; - QPtrVector<QLabel> mDayLabelsW; - QPtrVector<KOWeekButton> mWeekLabelsW; + Q3PtrVector<MonthViewCell> mCells; + Q3PtrVector<QLabel> mDayLabels; + Q3PtrVector<KOWeekButton> mWeekLabels; + Q3PtrVector<MonthViewCell> mCellsW; + Q3PtrVector<QLabel> mDayLabelsW; + Q3PtrVector<KOWeekButton> mWeekLabelsW; @@ -344,3 +351,3 @@ class KOMonthView: public KOEventView KOEventPopupMenu *mContextMenu; - QPopupMenu *mNewItemMenu; + Q3PopupMenu *mNewItemMenu; void keyPressEvent ( QKeyEvent * ) ; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 5078c57..0bd46ea 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -28,3 +28,3 @@ #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -307,3 +307,3 @@ KOPrefs::KOPrefs() : - addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); + addItemStringList("SelectedPlugins",&mSelectedPlugins,QStringList("holidays")); @@ -313,3 +313,3 @@ KOPrefs::KOPrefs() : addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); - addItemStringList("AdditionalMails",&mAdditionalMails,""); + addItemStringList("AdditionalMails",&mAdditionalMails,QStringList()); addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); @@ -568,3 +568,3 @@ void KOPrefs::usrWriteConfig() config()->setGroup("Category Colors"); - QDictIterator<QColor> it(mCategoryColors); + Q3DictIterator<QColor> it(mCategoryColors); while (it.current()) { diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 94bdd33..35c6110 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -27,5 +27,8 @@ #include <libkdepim/kpimprefs.h> -#include <qdict.h> +#include <q3dict.h> #include <qdir.h> #include <qobject.h> +#include <QDateTime> +//Added by qt3to4: +#include <Q3PtrList> @@ -349,3 +352,3 @@ class KOPrefs : public KPimPrefs int mCurrentDisplayedView; - QPtrList<KopiCalendarFile> mCalendars; + Q3PtrList<KopiCalendarFile> mCalendars; int mNextAvailableCalendar; @@ -364,4 +367,4 @@ class KOPrefs : public KPimPrefs private: - QDict<QColor> mCategoryColors; - QArray<KopiCalendarFile*> mDefCalColors; + Q3Dict<QColor> mCategoryColors; + QVector<KopiCalendarFile*> mDefCalColors; QColor mDefaultCategoryColor; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index f1a6c3d..43c488f 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -25,4 +25,4 @@ #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> @@ -31,6 +31,6 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qcombobox.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qregexp.h> @@ -41,4 +41,10 @@ #include <qpushbutton.h> -#include <qstrlist.h> +#include <q3strlist.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <QPixmap> +#include <Q3Frame> @@ -118,4 +124,4 @@ void KOPrefsDialog::setupLocaleDateTab() #if 0 -QFrame *topFrame = addPage(i18n("Date Format"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,3,2); +Q3Frame *topFrame = addPage(i18n("Date Format"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2); topLayout->setSpacing(mSpacingHint); @@ -174,4 +180,4 @@ void KOPrefsDialog::setupLocaleTab() #if 0 - QFrame *topFrame = addPage(i18n("Locale"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3Frame *topFrame = addPage(i18n("Locale"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(mSpacingHint); @@ -213,3 +219,3 @@ void KOPrefsDialog::setupLocaleTab() QWidget * hb = new QWidget( topFrame ); - QHBoxLayout *hbLayout = new QHBoxLayout(hb); + Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); sb = @@ -238,6 +244,6 @@ void KOPrefsDialog::setupMainTab() { - QFrame *topFrame = addPage(i18n("General"),0,0); + Q3Frame *topFrame = addPage(i18n("General"),0,0); // DesktopIcon("identity",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); topLayout->setSpacing(mSpacingHint); @@ -289,3 +295,3 @@ void KOPrefsDialog::setupMainTab() topFrame = addPage(i18n("General") +" 2",0,0); - topLayout = new QGridLayout(topFrame,4,2); + topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(2); @@ -294,3 +300,3 @@ void KOPrefsDialog::setupMainTab() } - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); @@ -315,3 +321,3 @@ void KOPrefsDialog::setupMainTab() - QHBox *intervalBox = new QHBox(topFrame); + Q3HBox *intervalBox = new Q3HBox(topFrame); // intervalBox->setSpacing(mSpacingHint); @@ -404,6 +410,6 @@ void KOPrefsDialog::setupTimeTab() { - QFrame *topFrame = addPage(i18n("Time"),0,0); + Q3Frame *topFrame = addPage(i18n("Time"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(mSpacingHint); @@ -411,3 +417,3 @@ void KOPrefsDialog::setupTimeTab() - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); KPrefsDialogWidTime *dayBegins = @@ -443,3 +449,3 @@ void KOPrefsDialog::setupTimeTab() topFrame = addPage(i18n("Time") +" 2",0,0); - topLayout = new QGridLayout(topFrame,1,2); + topLayout = new Q3GridLayout(topFrame,1,2); topLayout->setSpacing(2); @@ -449,3 +455,3 @@ void KOPrefsDialog::setupTimeTab() - QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, + Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, i18n("Working Hours"), @@ -455,3 +461,3 @@ void KOPrefsDialog::setupTimeTab() workingHoursGroup->layout()->setMargin( 4 ); - QHBox *workStartBox = new QHBox(workingHoursGroup); + Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); // workStartBox->setMargin( 0 ); @@ -460,3 +466,3 @@ void KOPrefsDialog::setupTimeTab() - QHBox *workEndBox = new QHBox(workingHoursGroup); + Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); //workEndBox->setMargin( 0 ); @@ -464,3 +470,3 @@ void KOPrefsDialog::setupTimeTab() &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); - QVBox *excludeBox = new QVBox(workingHoursGroup); + Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); //excludeBox->setMargin( 0 ); @@ -484,6 +490,6 @@ void KOPrefsDialog::setupViewsTab() - QFrame *topFrame = addPage(i18n("Views"),0,0); + Q3Frame *topFrame = addPage(i18n("Views"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,1); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(mSpacingHint); @@ -532,3 +538,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,6,1); + topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(mSpacingHint); @@ -596,3 +602,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); @@ -654,3 +660,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); @@ -659,3 +665,3 @@ void KOPrefsDialog::setupViewsTab() QLabel *lab; - QHBox *habo = new QHBox( topFrame ); + Q3HBox *habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { @@ -679,3 +685,3 @@ void KOPrefsDialog::setupViewsTab() - habo = new QHBox( topFrame ); + habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { @@ -732,3 +738,3 @@ void KOPrefsDialog::setupViewsTab() topFrame = addPage(i18n("Month View") +" 2",0,0); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(2); @@ -766,3 +772,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); @@ -772,3 +778,3 @@ void KOPrefsDialog::setupViewsTab() - QHBox* hdummy = new QHBox(topFrame); + Q3HBox* hdummy = new Q3HBox(topFrame); new QLabel(i18n("Days in What's Next:"),hdummy); @@ -778,3 +784,3 @@ void KOPrefsDialog::setupViewsTab() - QHBox *prioBox = new QHBox(topFrame); + Q3HBox *prioBox = new Q3HBox(topFrame); // intervalBox->setSpacing(mSpacingHint); @@ -820,3 +826,3 @@ void KOPrefsDialog::setupViewsTab() - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); @@ -857,3 +863,3 @@ dummy = &(KOPrefs::instance()->mTodoRunColor),wid); - QHBoxLayout *widLayout = new QHBoxLayout(wid); + Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoRunColor->label() ); @@ -867,3 +873,3 @@ dummy = &(KOPrefs::instance()->mTodoDueTodayColor),wid); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); @@ -875,3 +881,3 @@ dummy = wid = new QWidget( topFrame ); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); KPrefsDialogWidColor *todoOverdueColor = @@ -892,3 +898,3 @@ dummy = - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); @@ -931,3 +937,3 @@ dummy = - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(mSpacingHint); @@ -938,5 +944,5 @@ dummy = topLayout->addWidget(dummy->checkBox(), ii++,0); - topFrame = new QFrame( topFrame ); + topFrame = new Q3Frame( topFrame ); topLayout->addWidget(topFrame ,ii++,0); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); @@ -972,3 +978,3 @@ dummy = - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(mSpacingHint); @@ -991,3 +997,3 @@ dummy = #else - lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); + lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); @@ -995,3 +1001,3 @@ dummy = - QHBox* dummyBox = new QHBox(topFrame); + Q3HBox* dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); @@ -1000,3 +1006,3 @@ dummy = - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); @@ -1005,3 +1011,3 @@ dummy = - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); @@ -1010,3 +1016,3 @@ dummy = - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); @@ -1017,3 +1023,3 @@ dummy = - QHBox* hbo = new QHBox ( topFrame ); + Q3HBox* hbo = new Q3HBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); @@ -1057,6 +1063,6 @@ void KOPrefsDialog::setupFontsTab() - QFrame *topFrame = addPage(i18n("Fonts"),0,0); + Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,7,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); @@ -1127,3 +1133,3 @@ void KOPrefsDialog::setupFontsTab() - topLayout = new QGridLayout(topFrame,7,3); + topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); @@ -1195,6 +1201,6 @@ void KOPrefsDialog::setupColorsTab() { - QFrame *topFrame = addPage(i18n("Colors"),0,0); + Q3Frame *topFrame = addPage(i18n("Colors"),0,0); // DesktopIcon("colorize",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); // topLayout->setSpacing(mSpacingHint); @@ -1206,5 +1212,5 @@ void KOPrefsDialog::setupColorsTab() int ii = 1; - QGroupBox *categoryGroup ; + Q3GroupBox *categoryGroup ; - categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), + categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"), topFrame); @@ -1252,3 +1258,3 @@ void KOPrefsDialog::setupColorsTab() - topLayout = new QGridLayout(topFrame,5,2); + topLayout = new Q3GridLayout(topFrame,5,2); // topLayout->setSpacing(mSpacingHint); @@ -1319,3 +1325,3 @@ void KOPrefsDialog::setupPrinterTab() - QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); topLayout->setSpacing(mSpacingHint); @@ -1329,6 +1335,6 @@ void KOPrefsDialog::setupGroupSchedulingTab() #if 0 - QFrame *topFrame = addPage(i18n("Group Scheduling"),0, + Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0, DesktopIcon("personal",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(mSpacingHint); @@ -1355,3 +1361,3 @@ void KOPrefsDialog::setupGroupSchedulingTab() topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); - mAMails = new QListView(topFrame); + mAMails = new Q3ListView(topFrame); mAMails->addColumn(i18n("Email"),300); @@ -1373,3 +1379,3 @@ void KOPrefsDialog::setupGroupSchedulingTab() connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); - connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); + connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); #endif @@ -1380,6 +1386,6 @@ void KOPrefsDialog::setupGroupAutomationTab() return; - QFrame *topFrame = addPage(i18n("Group Automation"),0, + Q3Frame *topFrame = addPage(i18n("Group Automation"),0, DesktopIcon("personal",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,1); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); @@ -1517,3 +1523,3 @@ void KOPrefsDialog::usrWriteConfig() } - QDictIterator<QColor> it(mCategoryDict); + Q3DictIterator<QColor> it(mCategoryDict); while (it.current()) { diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index ee7a7aa..ccc1726 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h @@ -25,6 +25,8 @@ -#include <qframe.h> -#include <qdict.h> +#include <q3frame.h> +#include <q3dict.h> #include <qcolor.h> -#include <qlistview.h> +#include <q3listview.h> +//Added by qt3to4: +#include <QLabel> @@ -96,3 +98,3 @@ class KOPrefsDialog : public KPrefsDialog - QFrame *mPrinterTab; + Q3Frame *mPrinterTab; @@ -123,3 +125,3 @@ class KOPrefsDialog : public KPrefsDialog KColorButton *mCategoryButton; - QDict<QColor> mCategoryDict; + Q3Dict<QColor> mCategoryDict; diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro index df8f8d7..0f3b328 100644 --- a/korganizer/korganizer.pro +++ b/korganizer/korganizer.pro @@ -1,3 +1,3 @@ TEMPLATE = app -CONFIG = qt warn_on +CONFIG += qt warn_on TARGET = kopi @@ -19,16 +19,16 @@ staticlib: { TARGET = kopi_linux -LIBS += ../bin/libmicrokabc_qtopia.a -LIBS += ../bin/libmicrokabc_file.a -LIBS += ../bin/libmicrokabc_dir.a -LIBS += ../bin/libmicrokdepim.a -LIBS += ../bin/libmicrokcal.a -LIBS += ../bin/libmicrokabc.a -LIBS += ../bin/libmicrokde.a -LIBS += ../bin/libmicrokabc_qtopia.a -LIBS += ../bin/libmicrokabc_file.a -LIBS += ../bin/libmicrokabc_dir.a -LIBS += ../bin/libmicrokdepim.a -LIBS += ../bin/libmicrokcal.a -LIBS += ../bin/libmicrokabc.a -LIBS += ../bin/libmicrokde.a +LIBS += ../bin/libxmicrokabc_qtopia.a +LIBS += ../bin/libxmicrokabc_file.a +LIBS += ../bin/libxmicrokabc_dir.a +LIBS += ../bin/libxmicrokdepim.a +LIBS += ../bin/libxmicrokcal.a +LIBS += ../bin/libxmicrokabc.a +LIBS += ../bin/libxmicrokde.a +LIBS += ../bin/libxmicrokabc_qtopia.a +LIBS += ../bin/libxmicrokabc_file.a +LIBS += ../bin/libxmicrokabc_dir.a +LIBS += ../bin/libxmicrokdepim.a +LIBS += ../bin/libxmicrokcal.a +LIBS += ../bin/libxmicrokabc.a +LIBS += ../bin/libxmicrokde.a LIBS += ../libical/lib/libical.a @@ -36,6 +36,6 @@ LIBS += ../libical/lib/libicalss.a } else { -LIBS += ../bin/libmicrokdepim.so -LIBS += ../bin/libmicrokcal.so -LIBS += ../bin/libmicrokde.so -LIBS += ../bin/libmicrokabc.so +LIBS += ../bin/libxmicrokdepim.so +LIBS += ../bin/libxmicrokcal.so +LIBS += ../bin/libxmicrokde.so +LIBS += ../bin/libxmicrokabc.so #LIBS += -lbluetooth @@ -51,6 +51,6 @@ RC_FILE = winicons.rc DEFINES += _WIN32_ -LIBS += ../bin/microkdepim.lib -LIBS += ../bin/microkcal.lib -LIBS += ../bin/microkde.lib -LIBS += ../bin/microkabc.lib +LIBS += ../bin/xmicrokdepim.lib +LIBS += ../bin/xmicrokcal.lib +LIBS += ../bin/xmicrokde.lib +LIBS += ../bin/xmicrokabc.lib LIBS += ../libical/lib/ical.lib @@ -87,3 +87,4 @@ TARGET = kopi_me -INTERFACES = kofilterview_base.ui +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = kofilterview_base.ui #filteredit_base.ui @@ -212,3 +213,4 @@ filteredit_base.cpp \ HEADERS += calprintbase.h calprinter.h calprintplugins.h cellitem.h -INTERFACES += calprintdayconfig_base.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 += calprintdayconfig_base.ui \ calprintmonthconfig_base.ui \ @@ -218 +220,6 @@ SOURCES += calprintbase.cpp calprinter.cpp calprintplugins.cpp cellitem.cpp +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +CONFIG += uic3 + diff --git a/korganizer/korganizerE.pro b/korganizer/korganizerE.pro index 553c265..2c1cd42 100644 --- a/korganizer/korganizerE.pro +++ b/korganizer/korganizerE.pro @@ -13,5 +13,5 @@ DEFINES += KORG_NOLVALTERNATION #KORG_NOKABC -LIBS += -lmicrokdepim -LIBS += -lmicrokcal -LIBS += -lmicrokde +LIBS += -lxmicrokdepim +LIBS += -lxmicrokcal +LIBS += -lxmicrokde LIBS += -lmicroqtcompat diff --git a/korganizer/kotimespanview.cpp b/korganizer/kotimespanview.cpp index 3265a3a..a214720 100644 --- a/korganizer/kotimespanview.cpp +++ b/korganizer/kotimespanview.cpp @@ -1,2 +1,6 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3ValueList> +#include <Q3PtrList> @@ -13,3 +17,3 @@ KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent, { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); @@ -36,3 +40,3 @@ void KOTimeSpanView::readSettings(KConfig *config) - QValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); + Q3ValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); if (sizes.count() == 2) { @@ -48,3 +52,3 @@ void KOTimeSpanView::writeSettings(KConfig *config) - QValueList<int> list = mTimeSpanView->splitterSizes(); + Q3ValueList<int> list = mTimeSpanView->splitterSizes(); config->writeEntry("Separator TimeSpanView",list); @@ -62,5 +66,5 @@ int KOTimeSpanView::currentDateCount() -QPtrList<Incidence> KOTimeSpanView::selectedIncidences() +Q3PtrList<Incidence> KOTimeSpanView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; @@ -86,5 +90,5 @@ void KOTimeSpanView::insertItems(const QDate &start, const QDate &end) mTimeSpanView->clear(); - mTimeSpanView->setDateRange( start, end ); + mTimeSpanView->setDateRange( (QDateTime)start, (QDateTime)end ); - QPtrList<Event> events = calendar()->events( start, end ); + Q3PtrList<Event> events = calendar()->events( start, end ); Event *event = events.first(); @@ -102,3 +106,3 @@ void KOTimeSpanView::insertItems(const QDate &start, const QDate &end) -void KOTimeSpanView::showEvents(QPtrList<Event> eventList) +void KOTimeSpanView::showEvents(Q3PtrList<Event> eventList) { diff --git a/korganizer/kotimespanview.h b/korganizer/kotimespanview.h index c682ed8..c3e4b41 100644 --- a/korganizer/kotimespanview.h +++ b/korganizer/kotimespanview.h @@ -4,2 +4,4 @@ #include "koeventview.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -18,3 +20,3 @@ class KOTimeSpanView : public KOEventView virtual int currentDateCount(); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); DateList selectedDates() @@ -30,3 +32,3 @@ class KOTimeSpanView : public KOEventView virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 20a35d2..aeab92a 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -25,6 +25,6 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> #include <qlayout.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qtimer.h> @@ -33,3 +33,8 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qtabwidget.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> @@ -83,4 +88,4 @@ void KOTodoEditor::setupRecurrence() { - QFrame *topFrame = addPage( i18n("Recurrence") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = addPage( i18n("Recurrence") ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); @@ -113,5 +118,5 @@ void KOTodoEditor::setupGeneral() if (KOPrefs::instance()->mCompactDialogs) { - QFrame *topFrame = addPage(i18n("General")); + Q3Frame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); if ( QApplication::desktop()->width() < 480 ) { @@ -133,13 +138,13 @@ void KOTodoEditor::setupGeneral() - QBoxLayout *priorityLayout; + Q3BoxLayout *priorityLayout; if ( QApplication::desktop()->width() < 500 ) - priorityLayout = new QVBoxLayout( topLayout ); + priorityLayout = new Q3VBoxLayout( topLayout ); else - priorityLayout = new QHBoxLayout( topLayout ); + priorityLayout = new Q3HBoxLayout( topLayout ); QWidget* prioWidget = new QWidget (topFrame); priorityLayout->addWidget( prioWidget ); - QHBoxLayout* priorityLayout2 = new QHBoxLayout( prioWidget); + Q3HBoxLayout* priorityLayout2 = new Q3HBoxLayout( prioWidget); - QIconSet icon; + QIcon icon; if ( QApplication::desktop()->width() < 321 ) @@ -166,5 +171,5 @@ void KOTodoEditor::setupGeneral() - QFrame *topFrame2 = addPage(i18n("Details")); + Q3Frame *topFrame2 = addPage(i18n("Details")); - QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); + Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2); topLayout2->setMargin(marginHint()); @@ -172,3 +177,3 @@ void KOTodoEditor::setupGeneral() - QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); + Q3HBoxLayout *completionLayout = new Q3HBoxLayout( topLayout2 ); mGeneral->initCompletion(topFrame2,completionLayout); @@ -187,5 +192,5 @@ void KOTodoEditor::setupGeneral() } else { - QFrame *topFrame = addPage(i18n("General")); + Q3Frame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); @@ -195,6 +200,6 @@ void KOTodoEditor::setupGeneral() mGeneral->initStatus(topFrame,topLayout); - QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout); mGeneral->initAlarm(topFrame,alarmLineLayout); mGeneral->initDescription(topFrame,topLayout); - QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout); mGeneral->initCategories( topFrame, detailsLayout ); @@ -429,3 +434,3 @@ void KOTodoEditor::slotLoadTemplate() } - QPtrList<Todo> todos = cal.todos(); + Q3PtrList<Todo> todos = cal.todos(); Todo * todo = todos.first(); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ba94057..2b8fbd3 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -23,6 +23,8 @@ +#include <QDesktopWidget> + #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qcursor.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qdialog.h> @@ -33,3 +35,17 @@ -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QFocusEvent> +#include <QDragLeaveEvent> +#include <QMouseEvent> +#include <QDragEnterEvent> +#include <QKeyEvent> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> +#include <QDropEvent> +#include <QDragMoveEvent> +#include <QPaintEvent> +#include <Q3PopupMenu> +#include <Q3PtrList> #include <kdebug.h> @@ -70,3 +86,3 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na setCaption( i18n("Start todo") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -75,3 +91,3 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na lay->addWidget( lab ); - lab->setAlignment( AlignCenter ); + lab->setAlignment( Qt::AlignCenter ); @@ -100,3 +116,3 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name setCaption( i18n("Stop todo") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -105,3 +121,3 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name lay->addWidget( lab ); - lab->setAlignment( AlignHCenter ); + lab->setAlignment( Qt::AlignHCenter ); lab = new QLabel( i18n("Additional Comment:"), this ); @@ -110,6 +126,6 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name lay->addWidget( mComment ); - QHBox * start = new QHBox ( this ); + Q3HBox * start = new Q3HBox ( this ); lay->addWidget( start ); lab = new QLabel( i18n("Start:"), start ); - QHBox * end = new QHBox ( this ); + Q3HBox * end = new Q3HBox ( this ); lay->addWidget( end ); @@ -175,6 +191,6 @@ void KOStopTodoPrefs::doNotSave() -class KOTodoViewWhatsThis :public QWhatsThis +class KOTodoViewWhatsThis :public Q3WhatsThis { public: - KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; + KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { }; @@ -216,3 +232,3 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); @@ -232,3 +248,3 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); @@ -257,3 +273,3 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); @@ -302,3 +318,3 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) QString text; - if (QTextDrag::decode(e,text)) { + if (Q3TextDrag::decode(e,text)) { //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); @@ -325,3 +341,3 @@ void KOTodoListView::wheelEvent (QWheelEvent *e) { - QListView::wheelEvent (e); + Q3ListView::wheelEvent (e); } @@ -332,3 +348,3 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) QPoint p(contentsToViewport(e->pos())); - QListViewItem *i = itemAt(p); + Q3ListViewItem *i = itemAt(p); bool rootClicked = true; @@ -350,3 +366,3 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) mMousePressed = false; - if (! rootClicked && !( e->button() == RightButton) ) { + if (! rootClicked && !( e->button() == Qt::RightButton) ) { mPressPos = e->pos(); @@ -360,5 +376,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) if (!( e->button() == RightButton && rootClicked) ) - QListView::contentsMousePressEvent(e); + Q3ListView::contentsMousePressEvent(e); #else - QListView::contentsMousePressEvent(e); + Q3ListView::contentsMousePressEvent(e); #endif @@ -368,3 +384,3 @@ void KOTodoListView::paintEvent(QPaintEvent* e) emit paintNeeded(); - QListView::paintEvent( e); + Q3ListView::paintEvent( e); } @@ -378,3 +394,3 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) mMousePressed = false; - QListViewItem *item = itemAt(contentsToViewport(mPressPos)); + Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos)); if (item) { @@ -424,3 +440,3 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) mFlagKeyPressed = true; - QListViewItem* cn; + Q3ListViewItem* cn; if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { @@ -430,3 +446,3 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) if ( ci ){ - if ( e->state() == ShiftButton ) + if ( e->state() == Qt::ShiftButton ) ci->setOn( false ); @@ -451,3 +467,3 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) case Qt::Key_Up: - QListView::keyPressEvent ( e ); + Q3ListView::keyPressEvent ( e ); e->accept(); @@ -456,3 +472,3 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) case Qt::Key_Right: - QListView::keyPressEvent ( e ); + Q3ListView::keyPressEvent ( e ); e->accept(); @@ -470,3 +486,3 @@ void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) { - QListView::contentsMouseReleaseEvent(e); + Q3ListView::contentsMouseReleaseEvent(e); mMousePressed = false; @@ -480,3 +496,3 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) - QListViewItem *item = itemAt(vp); + Q3ListViewItem *item = itemAt(vp); @@ -494,3 +510,3 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) : setText(i18n("Click to add new Todo")); - setFocusPolicy ( QWidget::ClickFocus ); + setFocusPolicy ( Qt::ClickFocus ); } @@ -525,3 +541,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mNavigator = 0; - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); mName = QString ( name ); @@ -532,3 +548,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mQuickAdd = new KOQuickTodo(mQuickBar); - QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); + Q3BoxLayout *quickLayout = new Q3HBoxLayout(mQuickBar); quickLayout->addWidget( mQuickAdd ); @@ -570,15 +586,15 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - flat->setFocusPolicy( NoFocus ); - s_done->setFocusPolicy( NoFocus ); - allopen->setFocusPolicy( NoFocus ); - allclose->setFocusPolicy( NoFocus ); - s_run->setFocusPolicy( NoFocus ); - mNewSubBut->setFocusPolicy( NoFocus ); + flat->setFocusPolicy( Qt::NoFocus ); + s_done->setFocusPolicy( Qt::NoFocus ); + allopen->setFocusPolicy( Qt::NoFocus ); + allclose->setFocusPolicy( Qt::NoFocus ); + s_run->setFocusPolicy( Qt::NoFocus ); + mNewSubBut->setFocusPolicy( Qt::NoFocus ); - QWhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); - QWhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); - QWhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); - QWhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); - QWhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); - QWhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); + Q3WhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); + Q3WhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); + Q3WhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); + Q3WhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); + Q3WhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); + Q3WhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); @@ -603,15 +619,15 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mTodoListView->addColumn(i18n("Prio")); - mTodoListView->setColumnAlignment(1,AlignHCenter); + mTodoListView->setColumnAlignment(1,Qt::AlignHCenter); mTodoListView->addColumn(i18n("Complete")); - mTodoListView->setColumnAlignment(2,AlignCenter); + mTodoListView->setColumnAlignment(2,Qt::AlignCenter); mTodoListView->addColumn(i18n("Due Date")); - mTodoListView->setColumnAlignment(3,AlignLeft); + mTodoListView->setColumnAlignment(3,Qt::AlignLeft); mTodoListView->addColumn(i18n("Due Time")); - mTodoListView->setColumnAlignment(4,AlignHCenter); + mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); mTodoListView->addColumn(i18n("Start Date")); - mTodoListView->setColumnAlignment(5,AlignLeft); + mTodoListView->setColumnAlignment(5,Qt::AlignLeft); mTodoListView->addColumn(i18n("Start Time")); - mTodoListView->setColumnAlignment(6,AlignHCenter); + mTodoListView->setColumnAlignment(6,Qt::AlignHCenter); @@ -625,3 +641,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mTodoListView->addColumn(i18n("Sort Id")); - mTodoListView->setColumnAlignment(4,AlignHCenter); + mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); #endif @@ -634,3 +650,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : for ( iii = 0; iii< 12 ; ++iii ) - mTodoListView->setColumnWidthMode( iii, QListView::Manual ); + mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual ); @@ -639,3 +655,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mPriorityPopupMenu = new QPopupMenu(this); + mPriorityPopupMenu = new Q3PopupMenu(this); for (int i = 1; i <= 5; i++) { @@ -646,3 +662,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mPercentageCompletedPopupMenu = new QPopupMenu(this); + mPercentageCompletedPopupMenu = new Q3PopupMenu(this); for (int i = 0; i <= 100; i+=20) { @@ -654,3 +670,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mCategoryPopupMenu = new QPopupMenu (this); + mCategoryPopupMenu = new Q3PopupMenu (this); mCategoryPopupMenu->setCheckable (true); @@ -659,3 +675,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mCalPopupMenu = new QPopupMenu (this); + mCalPopupMenu = new Q3PopupMenu (this); mCalPopupMenu->setCheckable (true); @@ -667,3 +683,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu = new Q3PopupMenu(this); mItemPopupMenu->insertItem(i18n("Show"), this, @@ -712,3 +728,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : #endif - mPopupMenu = new QPopupMenu(this); + mPopupMenu = new Q3PopupMenu(this); mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, @@ -748,4 +764,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : // Double clicking conflicts with opening/closing the subtree - connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), - SLOT( editItem( QListViewItem *) ) ); + connect( mTodoListView, SIGNAL( doubleClicked( Q3ListViewItem *) ), + SLOT( editItem( Q3ListViewItem *) ) ); /* @@ -755,9 +771,9 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : */ - connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, + connect( mTodoListView, SIGNAL( contextRequest ( Q3ListViewItem *, const QPoint &,int ) ), - SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); - connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( itemClicked( QListViewItem * ) ) ); - connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), - SLOT( itemDoubleClicked( QListViewItem * ) ) ); + SLOT( popupMenu( Q3ListViewItem *, const QPoint & ,int) ) ); + connect( mTodoListView, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( itemClicked( Q3ListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( double_Clicked( Q3ListViewItem * ) ), + SLOT( itemDoubleClicked( Q3ListViewItem * ) ) ); connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), @@ -766,6 +782,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : SLOT( todoModified(Todo *, int) ) ); - connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), - SLOT( itemStateChanged( QListViewItem * ) ) ); - connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), - SLOT( itemStateChanged( QListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( expanded( Q3ListViewItem * ) ), + SLOT( itemStateChanged( Q3ListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( collapsed( Q3ListViewItem * ) ), + SLOT( itemStateChanged( Q3ListViewItem * ) ) ); connect( mTodoListView, SIGNAL( paintNeeded() ), @@ -774,8 +790,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : #if 0 - connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); - connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); - connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); + connect(mTodoListView,SIGNAL(selectionChanged(Q3ListViewItem *)), + SLOT(selectionChanged(Q3ListViewItem *))); + connect(mTodoListView,SIGNAL(clicked(Q3ListViewItem *)), + SLOT(selectionChanged(Q3ListViewItem *))); + connect(mTodoListView,SIGNAL(pressed(Q3ListViewItem *)), + SLOT(selectionChanged(Q3ListViewItem *))); #endif @@ -883,3 +899,3 @@ void KOTodoView::updateView() //mTodoListView->header()->setMaximumHeight(fm.height()); - QPtrList<Todo> todoList = calendar()->todos(); + Q3PtrList<Todo> todoList = calendar()->todos(); @@ -1046,3 +1062,3 @@ bool KOTodoView::checkTodo( Todo * todo ) -void KOTodoView::restoreItemState( QListViewItem *item ) +void KOTodoView::restoreItemState( Q3ListViewItem *item ) { @@ -1098,5 +1114,5 @@ void KOTodoView::updateConfig() -QPtrList<Incidence> KOTodoView::selectedIncidences() +Q3PtrList<Incidence> KOTodoView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; @@ -1109,5 +1125,5 @@ QPtrList<Incidence> KOTodoView::selectedIncidences() -QPtrList<Todo> KOTodoView::selectedTodos() +Q3PtrList<Todo> KOTodoView::selectedTodos() { - QPtrList<Todo> selected; + Q3PtrList<Todo> selected; @@ -1129,3 +1145,3 @@ void KOTodoView::showDates(const QDate &, const QDate &) -void KOTodoView::showEvents(QPtrList<Event>) +void KOTodoView::showEvents(Q3PtrList<Event>) { @@ -1142,3 +1158,3 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, -void KOTodoView::editItem(QListViewItem *item ) +void KOTodoView::editItem(Q3ListViewItem *item ) { @@ -1148,3 +1164,3 @@ void KOTodoView::editItem(QListViewItem *item ) -void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) +void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int) { @@ -1154,3 +1170,3 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) -void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) +void KOTodoView::popupMenu(Q3ListViewItem *item,const QPoint &p,int column) { @@ -1363,3 +1379,3 @@ void KOTodoView::toggleRunningItemQuick() } -void KOTodoView::itemDoubleClicked(QListViewItem *item) +void KOTodoView::itemDoubleClicked(Q3ListViewItem *item) { @@ -1430,3 +1446,3 @@ void KOTodoView::toggleRunningItem() -void KOTodoView::itemClicked(QListViewItem *item) +void KOTodoView::itemClicked(Q3ListViewItem *item) { @@ -1443,3 +1459,3 @@ void KOTodoView::itemClicked(QListViewItem *item) bool allowReparent = true; - QListViewItem *par = item; + Q3ListViewItem *par = item; while ( par ) { @@ -1471,3 +1487,3 @@ void KOTodoView::setDocumentId( const QString &id ) -void KOTodoView::itemStateChanged( QListViewItem *item ) +void KOTodoView::itemStateChanged( Q3ListViewItem *item ) { @@ -1544,3 +1560,3 @@ void KOTodoView::setAllClose() } -void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) +void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI) { @@ -1565,3 +1581,3 @@ void KOTodoView::displayAllFlat() isFlatDisplay = true; - QPtrList<Todo> todoList = calendar()->todos(); + Q3PtrList<Todo> todoList = calendar()->todos(); Todo *todo; diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 0cbc087..a9e7f30 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -28,6 +28,6 @@ #include <qlineedit.h> -#include <qptrlist.h> -#include <qstrlist.h> -#include <qlistbox.h> -#include <qpopupmenu.h> +#include <q3ptrlist.h> +#include <q3strlist.h> +#include <q3listbox.h> +#include <q3popupmenu.h> #include <qlabel.h> @@ -36,3 +36,13 @@ #include <qlabel.h> -#include <qlistview.h> +#include <q3listview.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QDragLeaveEvent> +#include <QWheelEvent> +#include <QPaintEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QDragEnterEvent> #include <klistview.h> @@ -103,3 +113,3 @@ class KOTodoListView : public KListView void todoDropped(Todo *, int); - void double_Clicked(QListViewItem *item); + void double_Clicked(Q3ListViewItem *item); void reparentTodoSignal( Todo *,Todo * ); @@ -126,3 +136,3 @@ class KOTodoListView : public KListView bool mMousePressed; - QListViewItem *mOldCurrent; + Q3ListViewItem *mOldCurrent; bool mFlagKeyPressed; @@ -159,4 +169,4 @@ class KOTodoView : public KOrg::BaseView - QPtrList<Incidence> selectedIncidences(); - QPtrList<Todo> selectedTodos(); + Q3PtrList<Incidence> selectedIncidences(); + Q3PtrList<Todo> selectedTodos(); @@ -186,3 +196,3 @@ class KOTodoView : public KOrg::BaseView void showDates(const QDate &start, const QDate &end); - void showEvents(QPtrList<Event> eventList); + void showEvents(Q3PtrList<Event> eventList); @@ -191,5 +201,5 @@ class KOTodoView : public KOrg::BaseView - void editItem(QListViewItem *item); - void showItem(QListViewItem *item,const QPoint &,int); - void popupMenu(QListViewItem *item,const QPoint &,int); + void editItem(Q3ListViewItem *item); + void showItem(Q3ListViewItem *item,const QPoint &,int); + void popupMenu(Q3ListViewItem *item,const QPoint &,int); void newTodo(); @@ -221,6 +231,6 @@ class KOTodoView : public KOrg::BaseView - void itemClicked(QListViewItem *); - void itemStateChanged(QListViewItem *); + void itemClicked(Q3ListViewItem *); + void itemStateChanged(Q3ListViewItem *); void modified(bool); - void itemDoubleClicked(QListViewItem *item); + void itemDoubleClicked(Q3ListViewItem *item); void resetFocusToList(); @@ -275,3 +285,3 @@ class KOTodoView : public KOrg::BaseView QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); - void restoreItemState( QListViewItem * ); + void restoreItemState( Q3ListViewItem * ); @@ -279,10 +289,10 @@ class KOTodoView : public KOrg::BaseView bool isFlatDisplay; - void setOpen( QListViewItem*, bool setOpen); + void setOpen( Q3ListViewItem*, bool setOpen); KOTodoListView *mTodoListView; - QPopupMenu *mItemPopupMenu; - QPopupMenu *mPopupMenu; - QPopupMenu *mPriorityPopupMenu; - QPopupMenu *mPercentageCompletedPopupMenu; - QPopupMenu *mCategoryPopupMenu; - QPopupMenu *mCalPopupMenu; + Q3PopupMenu *mItemPopupMenu; + Q3PopupMenu *mPopupMenu; + Q3PopupMenu *mPriorityPopupMenu; + Q3PopupMenu *mPercentageCompletedPopupMenu; + Q3PopupMenu *mCategoryPopupMenu; + Q3PopupMenu *mCalPopupMenu; diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 519bb16..c21816d 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -21,3 +21,7 @@ #include <kdebug.h> -#include <qapp.h> +#include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3PointArray> +#include <QPixmap> #include <kglobal.h> @@ -29,4 +33,4 @@ -KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo) - : QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) +KOTodoViewItem::KOTodoViewItem( Q3ListView *parent, Todo *todo, KOTodoView *kotodo) + : Q3CheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) { @@ -36,3 +40,3 @@ KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotod KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo ) - : QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) + : Q3CheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo ) { @@ -82,3 +86,3 @@ void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, { - QListViewItem::paintBranches(p,cg,w,y,h); + Q3ListViewItem::paintBranches(p,cg,w,y,h); } @@ -318,3 +322,3 @@ void KOTodoViewItem::stateChange(bool state) if ( state ) { - QListViewItem * myChild = firstChild(); + Q3ListViewItem * myChild = firstChild(); KOTodoViewItem *item; @@ -327,3 +331,3 @@ void KOTodoViewItem::stateChange(bool state) } else { - QListViewItem * myChild = parent(); + Q3ListViewItem * myChild = parent(); if ( myChild ) @@ -385,8 +389,8 @@ bool KOTodoViewItem::isAlternate() bool previous = true; - if (QListViewItem::parent()) + if (Q3ListViewItem::parent()) { - item = static_cast<KOTodoViewItem *>(QListViewItem::parent()); + item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent()); if (item) previous = item->m_odd; - item = static_cast<KOTodoViewItem *>(QListViewItem::parent()->firstChild()); + item = static_cast<KOTodoViewItem *>(Q3ListViewItem::parent()->firstChild()); } @@ -478,3 +482,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i if ( mTodo->percentComplete() == 100 ) - fc = darkGreen; + fc = Qt::darkGreen; p->drawRect( 2, 2, width-4, height()-4); @@ -484,3 +488,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i } else { - QCheckListItem::paintCell(p, _cg, column, width, alignment); + Q3CheckListItem::paintCell(p, _cg, column, width, alignment); } @@ -496,3 +500,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i - QListView *lv = listView(); + Q3ListView *lv = listView(); if ( !lv ) @@ -501,3 +505,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i int r = 0; - QCheckListItem::Type myType = QCheckListItem::CheckBox; + Q3CheckListItem::Type myType = Q3CheckListItem::CheckBox; int BoxSize = 20; @@ -524,3 +528,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i } else { - ASSERT( lv ); //### + Q_ASSERT( lv ); //### // QFontMetrics fm( lv->font() ); @@ -541,3 +545,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i if ( isOn() ) { - QPointArray a( 7*2 ); + Q3PointArray a( 7*2 ); int i, xx, yy; @@ -557,3 +561,3 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i } - p->setPen( darkGreen ); + p->setPen( Qt::darkGreen ); p->drawLineSegments( a ); @@ -567,5 +571,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i p->setPen( QPen( _cg.text() ) ); - QListViewItem::paintCell( p, _cg, column, width - r, align ); + Q3ListViewItem::paintCell( p, _cg, column, width - r, align ); if ( mTodo->cancelled () ) { - p->setPen( black ); + p->setPen( Qt::black ); QRect br = p->boundingRect( 1,1,1,1,0,mTodo->summary() ); diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h index bd024c8..62a635c 100644 --- a/korganizer/kotodoviewitem.h +++ b/korganizer/kotodoviewitem.h @@ -24,9 +24,9 @@ #include <qlineedit.h> -#include <qptrlist.h> -#include <qstrlist.h> -#include <qlistbox.h> -#include <qpopupmenu.h> +#include <q3ptrlist.h> +#include <q3strlist.h> +#include <q3listbox.h> +#include <q3popupmenu.h> #include <qlabel.h> #include <qmap.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpainter.h> @@ -47,3 +47,3 @@ class KOTodoView; */ -class KOTodoViewItem : public QCheckListItem +class KOTodoViewItem : public Q3CheckListItem { @@ -56,3 +56,3 @@ class KOTodoViewItem : public QCheckListItem */ - KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo); + KOTodoViewItem(Q3ListView *parent, Todo *todo, KOTodoView *kotodo); KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 4057ae0..07c4295 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -25,3 +25,5 @@ -#include <qwidgetstack.h> +#include <q3widgetstack.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -459,4 +461,4 @@ void KOViewManager::showListView() mMainView, SLOT ( beamIncidence( Incidence * ) ) ); - connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), - mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); + connect( mListView, SIGNAL( beamIncidenceList( Q3PtrList<Incidence> ) ), + mMainView, SLOT ( beamIncidenceList( Q3PtrList<Incidence> ) ) ); } diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index f88403c..bfe930f 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -20,3 +20,3 @@ #include <qlayout.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qtextcodec.h> @@ -26,4 +26,10 @@ #include <qapplication.h> +#include <QDesktopWidget> #ifdef DESKTOP_VERSION -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> +//Added by qt3to4: +#include <Q3PtrList> +#include <QHideEvent> +#include <Q3VBoxLayout> +#include <QShowEvent> #endif @@ -44,3 +50,3 @@ #include "koeventviewer.h" -#include <qstylesheet.h> +#include <q3stylesheet.h> #include "kowhatsnextview.h" @@ -58,3 +64,3 @@ void WhatsNextTextBrowser::setSource(const QString& n) } else { - QTextBrowser::setSource(n); + Q3TextBrowser::setSource(n); } @@ -74,3 +80,3 @@ void WhatsNextTextBrowser::printMe() p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; @@ -105,7 +111,7 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); - QStyleSheet* stsh = mView->styleSheet(); - QStyleSheetItem * style ; + Q3StyleSheet* stsh = mView->styleSheet(); + Q3StyleSheetItem * style ; style = stsh->item ("h2" ); if ( style ) { - style->setMargin(QStyleSheetItem::MarginAll,0); + style->setMargin(Q3StyleSheetItem::MarginAll,0); } @@ -113,3 +119,3 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, if ( style ) { - style->setMargin(QStyleSheetItem::MarginAll,0); + style->setMargin(Q3StyleSheetItem::MarginAll,0); } @@ -117,3 +123,3 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); // topLayout->addWidget(mDateLabel); @@ -146,5 +152,5 @@ void KOWhatsNextView::clearList() } -QPtrList<Incidence> KOWhatsNextView::selectedIncidences() +Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences() { - QPtrList<Incidence> eventList; + Q3PtrList<Incidence> eventList; @@ -221,4 +227,4 @@ void KOWhatsNextView::updateView() mTodos.clear(); - QPtrList<Event> events; - QPtrList<Todo> todos = calendar()->todos(); + Q3PtrList<Event> events; + Q3PtrList<Todo> todos = calendar()->todos(); Todo * todo; @@ -456,3 +462,3 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &) -void KOWhatsNextView::showEvents(QPtrList<Event>) +void KOWhatsNextView::showEvents(Q3PtrList<Event>) { @@ -743,3 +749,3 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) } - QPtrList<Incidence> Relations = ev->relations(); + Q3PtrList<Incidence> Relations = ev->relations(); Incidence *to; diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 93574ef..49fc448 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h @@ -21,4 +21,10 @@ -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qtimer.h> +//Added by qt3to4: +#include <QShowEvent> +#include <QHideEvent> +#include <QLabel> +#include <Q3ValueList> +#include <Q3PtrList> @@ -26,3 +32,3 @@ -class QListView; +class Q3ListView; class QLabel; @@ -33,6 +39,6 @@ class KOEventViewerDialog; #include <qwidget.h> -class WhatsNextTextBrowser : public QTextBrowser { +class WhatsNextTextBrowser : public Q3TextBrowser { Q_OBJECT public: - WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}; + WhatsNextTextBrowser(QWidget *parent) : Q3TextBrowser(parent) {}; @@ -60,3 +66,3 @@ class KOWhatsNextView : public KOrg::BaseView void setEventViewer(KOEventViewerDialog* v ); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); void clearList(); @@ -72,3 +78,3 @@ class KOWhatsNextView : public KOrg::BaseView virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void updateConfig(); @@ -98,3 +104,3 @@ class KOWhatsNextView : public KOrg::BaseView - QValueList<Incidence *> mTodos; + Q3ValueList<Incidence *> mTodos; }; diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp index df9b2fc..e2ae4a6 100644 --- a/korganizer/ktimeedit.cpp +++ b/korganizer/ktimeedit.cpp @@ -23,3 +23,3 @@ -#include <qkeycode.h> +#include <qnamespace.h> #include <qcombobox.h> @@ -27,4 +27,7 @@ #include <qlineedit.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QKeyEvent> @@ -47,3 +50,3 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) - : QComboBox(TRUE, parent, name) + : Q3ComboBox(TRUE, parent, name) { @@ -66,3 +69,3 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) timeEntry = timeEntry.addSecs(60*15); - } while (!timeEntry.isNull()); + } while ( !( timeEntry.hour() || timeEntry.minute() ) ); // Add end of day. @@ -71,3 +74,3 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) updateText(); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(Qt::StrongFocus); @@ -210,4 +213,4 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // Tap -> Focus Next Widget - if ( e->key() == Key_Tab ) { - QComboBox::keyPressEvent(e); + if ( e->key() == Qt::Key_Tab ) { + Q3ComboBox::keyPressEvent(e); return; @@ -222,8 +225,8 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) switch(e->key()) { - case Key_Escape: + case Qt::Key_Escape: lineEdit()->deselect(); - case Key_Tab: - QComboBox::keyPressEvent(e); + case Qt::Key_Tab: + Q3ComboBox::keyPressEvent(e); break; - case Key_Up: + case Qt::Key_Up: if ( e->state () == Qt::ControlButton ) { @@ -269,3 +272,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; - case Key_Down: + case Qt::Key_Down: if ( e->state () == Qt::ControlButton ) { @@ -312,3 +315,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // set cursor to correct place - case Key_Left: + case Qt::Key_Left: if ( cpos == 3 ) @@ -323,3 +326,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // set cursor to correct place - case Key_Right: + case Qt::Key_Right: if ( cpos == 1 ) @@ -332,9 +335,9 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // rest - case Key_Prior: + case Qt::Key_Prior: subTime(QTime(1,0,0)); break; - case Key_Next: + case Qt::Key_Next: addTime(QTime(1,0,0)); break; - case Key_Backspace: + case Qt::Key_Backspace: if ( cpos > 0) { @@ -344,3 +347,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) cpos = 5; - text.at( cpos-1 ) = '0'; + text[ cpos-1 ] = '0'; lineEdit()->setText( text ); @@ -354,3 +357,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // if cursor at string end, alltext market and keyEvent don't ArrowLeft -> deselect and cpos - if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Key_Left ) { + if( cpos > 4 && lineEdit()->markedText().length() == 5 && e->key() != Qt::Key_Left ) { lineEdit()->deselect(); @@ -369,4 +372,4 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) switch(e->key()) { - case Key_Delete: - text.at( cpos ) = '0'; + case Qt::Key_Delete: + text[ cpos ] = '0'; lineEdit()->setText( text ); @@ -376,6 +379,6 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; - case Key_9: - case Key_8: - case Key_7: - case Key_6: + case Qt::Key_9: + case Qt::Key_8: + case Qt::Key_7: + case Qt::Key_6: if ( !(cpos == 1 || cpos == 4) ) @@ -383,6 +386,6 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) if ( cpos == 1 && text.at( 0 ) > '1') - text.at( 0 ) = '1'; - case Key_5: - case Key_4: - case Key_3: + text[ 0 ] = '1'; + case Qt::Key_5: + case Qt::Key_4: + case Qt::Key_3: if ( cpos < 1 ) @@ -391,3 +394,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) return; - case Key_2: + case Qt::Key_2: if ( hour12Format && cpos == 0 ) @@ -395,12 +398,12 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) if ( cpos == 0 && text.at( 1 ) > '3') - text.at( 1 ) = '3'; - case Key_1: - case Key_0: + text[ 1 ] = '3'; + case Qt::Key_1: + case Qt::Key_0: if ( hour12Format ) { - if ( e->key() == Key_0 && cpos == 1 && text.at( 0 ) == '0' ) + if ( e->key() == Qt::Key_0 && cpos == 1 && text.at( 0 ) == '0' ) return; - if ( e->key() == Key_0 && cpos == 0 && text.at( 1 ) == '0' ) - text.at( 1 ) = '1'; + if ( e->key() == Qt::Key_0 && cpos == 0 && text.at( 1 ) == '0' ) + text[ 1 ] = '1'; } - text.at( cpos ) = QChar ( e->key() ); + text[ cpos ] = QChar ( e->key() ); lineEdit()->setText( text ); @@ -413,3 +416,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; - case Key_Home: + case Qt::Key_Home: lineEdit()->setCursorPosition(0); @@ -417,3 +420,3 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; - case Key_End: + case Qt::Key_End: lineEdit()->setCursorPosition(5); @@ -427,4 +430,4 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) if ( hour12Format ) { - if ( e->key() == Key_A ) { - text.at( 5 ) = 'a'; + if ( e->key() == Qt::Key_A ) { + text[ 5 ] = 'a'; lineEdit()->setText( text ); @@ -432,4 +435,4 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) - } else if ( e->key() == Key_P ) { - text.at( 5 ) = 'p'; + } else if ( e->key() == Qt::Key_P ) { + text[ 5 ] = 'p'; lineEdit()->setText( text ); diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h index b3d842d..1c7d18d 100644 --- a/korganizer/ktimeedit.h +++ b/korganizer/ktimeedit.h @@ -26,3 +26,3 @@ #include <qevent.h> -#include <qkeycode.h> +#include <qnamespace.h> #include <qstring.h> @@ -30,2 +30,5 @@ #include <qcombobox.h> +#include <Q3ComboBox> +//Added by qt3to4: +#include <QKeyEvent> @@ -40,3 +43,3 @@ */ -class KOTimeEdit : public QComboBox +class KOTimeEdit : public Q3ComboBox { diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp index e72e41c..012455e 100644 --- a/korganizer/lineview.cpp +++ b/korganizer/lineview.cpp @@ -9,3 +9,3 @@ LineView::LineView( QWidget *parent, const char *name ) : - QScrollView( parent, name ) + Q3ScrollView( parent, name ) { diff --git a/korganizer/lineview.h b/korganizer/lineview.h index aa34dbc..52ae9cf 100644 --- a/korganizer/lineview.h +++ b/korganizer/lineview.h @@ -3,6 +3,6 @@ -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> -class LineView : public QScrollView +class LineView : public Q3ScrollView { @@ -30,3 +30,3 @@ class LineView : public QScrollView - QPtrList<Line> mLines; + Q3PtrList<Line> mLines; int mPixelWidth; diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 4a0e24f..211fde6 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -6,2 +6,4 @@ #include <qpe/global.h> +//Added by qt3to4: +#include <Q3CString> #include <stdlib.h> @@ -11,4 +13,2 @@ #include <qwindowsstyle.h> -#include <qplatinumstyle.h> -#include <qsgistyle.h> #include <stdlib.h> @@ -28,2 +28,3 @@ int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION @@ -33,3 +34,2 @@ int main( int argc, char **argv ) QApplication a( argc, argv ); - QApplication::setStyle( new QPlatinumStyle ()); #ifdef _WIN32_ @@ -91,3 +91,3 @@ int main( int argc, char **argv ) - QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(receiveStart( const QCString&, const QByteArray& ))); + QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&m, SLOT(receiveStart( const Q3CString&, const QByteArray& ))); a.showMainWidget(&m ); @@ -100,3 +100,3 @@ int main( int argc, char **argv ) if ( argc > 1 ) { - QCString command = argv[1]; + Q3CString command = argv[1]; if ( argc > 2 ) diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 69ccde1..2004939 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -3,5 +3,6 @@ #include <qaction.h> -#include <qpopupmenu.h> +#include <Q3Action> +#include <q3popupmenu.h> #include <qpainter.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qpushbutton.h> @@ -12,3 +13,3 @@ #include <qdir.h> -#include <qapp.h> +#include <qapplication.h> #include <qfileinfo.h> @@ -18,5 +19,5 @@ #include <qmap.h> -#include <qwmatrix.h> -#include <qtextbrowser.h> -#include <qtextstream.h> +#include <qmatrix.h> +#include <q3textbrowser.h> +#include <q3textstream.h> #ifndef DESKTOP_VERSION @@ -30,4 +31,13 @@ #else -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QPixmap> +#include <QCloseEvent> +#include <QKeyEvent> +#include <Q3VBoxLayout> +#include <QHideEvent> +#include <Q3CString> +#include <Q3PtrList> //#include <resource.h> @@ -82,3 +92,3 @@ class KOex2phonePrefs : public QDialog setCaption( i18n("Export to phone options") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -87,5 +97,5 @@ class KOex2phonePrefs : public QDialog lay->addWidget(lab = new QLabel( i18n("Please read Help-Sync Howto\nto know what settings to use."), this ) ); - lab->setAlignment (AlignHCenter ); - QHBox* temphb; - temphb = new QHBox( this ); + lab->setAlignment (Qt::AlignHCenter ); + Q3HBox* temphb; + temphb = new Q3HBox( this ); new QLabel( i18n("I/O device: "), temphb ); @@ -93,3 +103,3 @@ class KOex2phonePrefs : public QDialog lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Connection: "), temphb ); @@ -97,3 +107,3 @@ class KOex2phonePrefs : public QDialog lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Model(opt.): "), temphb ); @@ -104,3 +114,3 @@ class KOex2phonePrefs : public QDialog lay->addWidget( mWriteBackFuture ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Max. weeks in future: ") , temphb ); @@ -110,3 +120,3 @@ class KOex2phonePrefs : public QDialog lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); - lab->setAlignment (AlignHCenter ); + lab->setAlignment (Qt::AlignHCenter ); QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); @@ -136,3 +146,3 @@ int globalFlagBlockStartup; MainWindow::MainWindow( QWidget *parent, const char *name ) : - QMainWindow( parent, name ) + Q3MainWindow( parent, name ) { @@ -187,8 +197,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : p->mHourSize = 22; - QMainWindow::ToolBarDock tbd; + Qt::ToolBarDock tbd; if ( p->mToolBarHor ) { if ( p->mToolBarUp ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } @@ -196,5 +206,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUp ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } @@ -215,5 +225,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpF ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } @@ -221,5 +231,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpF ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } @@ -232,3 +242,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : #endif - filterPopupMenu = new QPopupMenu( this ); + filterPopupMenu = new Q3PopupMenu( this ); filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); @@ -261,5 +271,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpV ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } @@ -267,5 +277,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpV ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } @@ -275,5 +285,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpN ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } @@ -281,5 +291,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarUpN ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } @@ -442,5 +452,5 @@ void MainWindow::loadDataAfterStart() #ifndef DESKTOP_VERSION - connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); - connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); - disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); + connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const Q3CString &, const QByteArray & ))); + connect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(recieve( const Q3CString&, const QByteArray& ))); + disconnect( qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), this, SLOT(receiveStart( const Q3CString&, const QByteArray& ))); if ( !mCStringMess.isEmpty() ) @@ -511,3 +521,3 @@ void MainWindow::toggleBeamReceive() infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; - QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); + QObject::connect( infrared, SIGNAL (received ( const Q3CString &, const QByteArray & )),this, SLOT(recieve( const Q3CString&, const QByteArray& ))); #endif @@ -602,3 +612,3 @@ void MainWindow::closeEvent( QCloseEvent* ce ) } -void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) +void MainWindow::receiveStart( const Q3CString& cmsg, const QByteArray& data ) { @@ -608,5 +618,5 @@ void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) } -void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) +void MainWindow::recieve( const Q3CString& cmsg, const QByteArray& data ) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); @@ -617,3 +627,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) if ( cmsg == "setDocument(QString)" ) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); QString fileName; @@ -746,17 +756,17 @@ void MainWindow::initActions() - QPopupMenu *viewMenu = new QPopupMenu( this ); - QPopupMenu *actionMenu = new QPopupMenu( this ); - mCurrentItemMenu = new QPopupMenu ( this ); - QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); - QPopupMenu *importMenu = new QPopupMenu( this ); - QPopupMenu *importMenu_X = new QPopupMenu( this ); - QPopupMenu *exportMenu_X = new QPopupMenu( this ); - QPopupMenu *beamMenu_X = new QPopupMenu( this ); - selectFilterMenu = new QPopupMenu( this ); + Q3PopupMenu *viewMenu = new Q3PopupMenu( this ); + Q3PopupMenu *actionMenu = new Q3PopupMenu( this ); + mCurrentItemMenu = new Q3PopupMenu ( this ); + Q3PopupMenu *nextConflictMenu = new Q3PopupMenu ( this ); + Q3PopupMenu *importMenu = new Q3PopupMenu( this ); + Q3PopupMenu *importMenu_X = new Q3PopupMenu( this ); + Q3PopupMenu *exportMenu_X = new Q3PopupMenu( this ); + Q3PopupMenu *beamMenu_X = new Q3PopupMenu( this ); + selectFilterMenu = new Q3PopupMenu( this ); selectFilterMenu->setCheckable( true ); - syncMenu = new QPopupMenu( this ); - configureAgendaMenu = new QPopupMenu( this ); - configureToolBarMenu = new QPopupMenu( this ); - QPopupMenu *helpMenu = new QPopupMenu( this ); - QIconSet icon; + syncMenu = new Q3PopupMenu( this ); + configureAgendaMenu = new Q3PopupMenu( this ); + configureToolBarMenu = new Q3PopupMenu( this ); + Q3PopupMenu *helpMenu = new Q3PopupMenu( this ); + QIcon icon; int pixWid = 22, pixHei = 22; @@ -793,3 +803,3 @@ void MainWindow::initActions() menuBar1 = new KMenuBar( iconToolBar ); - QPopupMenu *menuBar = new QPopupMenu( this ); + Q3PopupMenu *menuBar = new Q3PopupMenu( this ); icon = loadPixmap( pathString + "z_menu" ); @@ -820,3 +830,3 @@ void MainWindow::initActions() icon = mWeekPixmap; - mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); + mWeekAction = new Q3Action( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); if ( p-> mShowIconWeekNum ) @@ -842,3 +852,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "filter" ); - actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); + actionFilterMenuTB = new Q3Action( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); connect( actionFilterMenuTB, SIGNAL( activated() ), @@ -846,3 +856,3 @@ void MainWindow::initActions() actionFilterMenuTB->addTo( iconToolBar ); - selectFilterMenuTB = new QPopupMenu( this ); + selectFilterMenuTB = new Q3PopupMenu( this ); selectFilterMenuTB->setCheckable( true ); @@ -853,3 +863,3 @@ void MainWindow::initActions() // ****************** - QAction *action; + Q3Action *action; // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); @@ -868,3 +878,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "today" ); - QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); + Q3Action* today_action = new Q3Action( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); today_action->addTo( actionMenu ); @@ -874,3 +884,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "picker" ); - QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); + Q3Action* dPickerAction = new Q3Action( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); dPickerAction->addTo( actionMenu ); @@ -880,3 +890,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "search" ); - QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); + Q3Action* search_action = new Q3Action( i18n("Search"), icon, i18n("Search..."), 0, this ); search_action->addTo( actionMenu ); @@ -886,3 +896,3 @@ void MainWindow::initActions() - action = new QAction( "Undo Delete", i18n("All events"), 0, this ); + action = new Q3Action( "Undo Delete", i18n("All events"), 0, this ); action->addTo( nextConflictMenu ); @@ -891,3 +901,3 @@ void MainWindow::initActions() - action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); + action = new Q3Action( "Undo Delete", i18n("Allday events"), 0, this ); action->addTo( nextConflictMenu ); @@ -896,3 +906,3 @@ void MainWindow::initActions() - action = new QAction( "Undo Delete", i18n("Events with time"), 0, this ); + action = new Q3Action( "Undo Delete", i18n("Events with time"), 0, this ); action->addTo( nextConflictMenu ); @@ -904,3 +914,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "newevent" ); - QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); + Q3Action* ne_action = new Q3Action( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); ne_action->addTo( mCurrentItemMenu ); @@ -909,3 +919,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "newtodo" ); - QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); + Q3Action* nt_action = new Q3Action( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); nt_action->addTo( mCurrentItemMenu ); @@ -913,3 +923,3 @@ void MainWindow::initActions() mView, SLOT( newTodo() ) ); - mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, + mNewSubTodoAction = new Q3Action( "new_subtodo", i18n("New Sub-Todo..."), 0, this ); @@ -932,3 +942,3 @@ void MainWindow::initActions() //actionMenu->insertItem ( i18n("Selected Item"), mCurrentItemMenu); - mShowAction = new QAction( "show_incidence", i18n("Show"), 0, this ); + mShowAction = new Q3Action( "show_incidence", i18n("Show"), 0, this ); mShowAction->addTo( mCurrentItemMenu ); @@ -937,3 +947,3 @@ void MainWindow::initActions() - mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); + mEditAction = new Q3Action( "edit_incidence", i18n("Edit..."), 0, this ); mEditAction->addTo( mCurrentItemMenu ); @@ -942,3 +952,3 @@ void MainWindow::initActions() - mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); + mDeleteAction = new Q3Action( "delete_incidence", i18n("Delete..."), 0, this ); mDeleteAction->addTo( mCurrentItemMenu ); @@ -948,3 +958,3 @@ void MainWindow::initActions() - mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); + mCloneAction = new Q3Action( "clone_incidence", i18n("Clone..."), 0, this ); mCloneAction->addTo( mCurrentItemMenu ); @@ -952,3 +962,3 @@ void MainWindow::initActions() mView, SLOT( cloneIncidence() ) ); - mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); + mMoveAction = new Q3Action( "Move_incidence", i18n("Move..."), 0, this ); mMoveAction->addTo( mCurrentItemMenu ); @@ -957,3 +967,3 @@ void MainWindow::initActions() #ifndef DESKTOP_VERSION - mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); + mBeamAction = new Q3Action( "Beam_incidence", i18n("Beam..."), 0, this ); mBeamAction->addTo(mCurrentItemMenu ); @@ -962,3 +972,3 @@ void MainWindow::initActions() #endif - mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); + mCancelAction = new Q3Action( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); mCancelAction->addTo( mCurrentItemMenu ); @@ -969,3 +979,3 @@ void MainWindow::initActions() mCurrentItemMenu->insertSeparator(); - action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); + action = new Q3Action( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); action->addTo( mCurrentItemMenu ); @@ -981,3 +991,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); - QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); + Q3Action* FSaction = new Q3Action( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); FSaction->addTo( viewMenu ); @@ -989,3 +999,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "configure" ); - action = new QAction( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); + action = new Q3Action( i18n("Toggle Resource View"), icon, i18n("Toggle Resource View"), 0, this ); action->addTo( viewMenu ); @@ -996,3 +1006,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); - action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); + action = new Q3Action( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); action->addTo( viewMenu ); @@ -1003,3 +1013,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); - action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); + action = new Q3Action( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); action->addTo( viewMenu ); @@ -1033,3 +1043,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); - QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); + Q3Action* whatsnext_action = new Q3Action( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); whatsnext_action->addTo( viewMenu ); @@ -1040,3 +1050,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); - QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); + Q3Action* xdays_action = new Q3Action( i18n("Next days"), icon, i18n("Next days"), 0, this ); xdays_action->addTo( viewMenu ); @@ -1048,3 +1058,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); - QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); + Q3Action* viewjournal_action = new Q3Action( i18n("Journal"), icon, i18n("Journal"), 0, this ); viewjournal_action->addTo( viewMenu ); @@ -1056,3 +1066,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); - QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); + Q3Action* day1_action = new Q3Action( i18n("Day View"), icon, i18n("Day View"), 0, this ); day1_action->addTo( viewMenu ); @@ -1064,3 +1074,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); - QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); + Q3Action* day5_action = new Q3Action( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); day5_action->addTo( viewMenu ); @@ -1071,3 +1081,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); - QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); + Q3Action* day7_action = new Q3Action( i18n("Week"), icon, i18n("Week"), 0, this ); day7_action->addTo( viewMenu ); @@ -1078,3 +1088,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); - QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); + Q3Action* day6_action = new Q3Action( i18n("List week"), icon, i18n("List week"), 0, this ); day6_action->addTo( viewMenu ); @@ -1085,3 +1095,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); - QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); + Q3Action* month_action = new Q3Action( i18n("Month"), icon, i18n("Month"), 0, this ); month_action->addTo( viewMenu ); @@ -1092,3 +1102,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); - QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); + Q3Action* showlist_action = new Q3Action( i18n("List View"), icon, i18n("List View"), 0, this ); showlist_action->addTo( viewMenu ); @@ -1099,3 +1109,3 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); - QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); + Q3Action* todoview_action = new Q3Action( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); todoview_action->addTo( viewMenu ); @@ -1107,3 +1117,3 @@ void MainWindow::initActions() #if 0 - action = new QAction( "view_timespan", "Time Span", 0, this ); + action = new Q3Action( "view_timespan", "Time Span", 0, this ); action->addTo( viewMenu ); @@ -1115,3 +1125,3 @@ void MainWindow::initActions() - action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, + action = new Q3Action( "purge_completed", i18n("Purge Completed..."), 0, this ); @@ -1127,3 +1137,3 @@ void MainWindow::initActions() actionMenu->insertSeparator(); - action = new QAction( "manage cat", i18n("Edit category list..."), 0, + action = new Q3Action( "manage cat", i18n("Edit category list..."), 0, this ); @@ -1132,3 +1142,3 @@ void MainWindow::initActions() - action = new QAction( "manage cat", i18n("Manage new categories..."), 0, + action = new Q3Action( "manage cat", i18n("Manage new categories..."), 0, this ); @@ -1140,3 +1150,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "configure" ); - action = new QAction( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); + action = new Q3Action( i18n("Configure"),icon, i18n("Configure KO/Pi..."), 0, this ); action->addTo( actionMenu ); @@ -1144,3 +1154,3 @@ void MainWindow::initActions() mView, SLOT( edit_options() ) ); - action = new QAction( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); + action = new Q3Action( i18n("Configure"),icon, i18n("Configure Calendar Files..."), 0, this ); action->addTo( actionMenu ); @@ -1148,3 +1158,3 @@ void MainWindow::initActions() this, SLOT( calHint() ) ); - action = new QAction( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); + action = new Q3Action( i18n("Configure"),icon, i18n("Global Settings..."), 0, this ); action->addTo( actionMenu ); @@ -1157,3 +1167,3 @@ void MainWindow::initActions() // actionMenu->insertSeparator(); - action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, + action = new Q3Action( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, this ); @@ -1161,3 +1171,3 @@ void MainWindow::initActions() connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); - action = new QAction( "import_quick", i18n("Import last file"), 0, + action = new Q3Action( "import_quick", i18n("Import last file"), 0, this ); @@ -1166,3 +1176,3 @@ void MainWindow::initActions() importMenu_X->insertSeparator(); - action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, + action = new Q3Action( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, this ); @@ -1172,3 +1182,3 @@ void MainWindow::initActions() importMenu_X->insertSeparator(); - action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, + action = new Q3Action( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, this ); @@ -1179,3 +1189,3 @@ void MainWindow::initActions() importMenu_X->insertSeparator(); - action = new QAction( "import_ol", i18n("Import from OL"), 0, + action = new Q3Action( "import_ol", i18n("Import from OL"), 0, this ); @@ -1188,3 +1198,3 @@ void MainWindow::initActions() #if 0 - action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, + action = new Q3Action( "load_cal", i18n("Load Calendar Backup"), 0, this ); @@ -1193,3 +1203,3 @@ void MainWindow::initActions() #endif - action = new QAction( "save_cal", i18n("Save Backup..."), 0, + action = new Q3Action( "save_cal", i18n("Save Backup..."), 0, this ); @@ -1200,3 +1210,3 @@ void MainWindow::initActions() //importMenu->insertSeparator(); - action = new QAction( "export ical", i18n("Export All Data"), 0, + action = new Q3Action( "export ical", i18n("Export All Data"), 0, this ); @@ -1204,3 +1214,3 @@ void MainWindow::initActions() connect( action, SIGNAL( activated() ), SLOT( exportICalendar() ) ); - action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, + action = new Q3Action( "import_qtopia", i18n("Export VCalendar"), 0, this ); @@ -1211,3 +1221,3 @@ void MainWindow::initActions() //LR - QPopupMenu *ex2phone = new QPopupMenu( this ); + Q3PopupMenu *ex2phone = new Q3PopupMenu( this ); ex2phone->insertItem(i18n("Complete calendar..."), 1 ); @@ -1221,3 +1231,3 @@ void MainWindow::initActions() //importMenu->insertSeparator(); - brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, + brAction = new Q3Action( "beam toggle", i18n("Beam receive enabled"), 0, this ); @@ -1227,3 +1237,3 @@ void MainWindow::initActions() - action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, + action = new Q3Action( "beam all", i18n("Beam complete calendar..."), 0, this ); @@ -1232,3 +1242,3 @@ void MainWindow::initActions() - action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, + action = new Q3Action( "beam all", i18n("Beam filtered calendar..."), 0, this ); @@ -1240,3 +1250,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "print" ); - action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); + action = new Q3Action( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); action->addTo( beamMenu_X ); @@ -1246,3 +1256,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "week" ); - action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); + action = new Q3Action( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); action->addTo( beamMenu_X ); @@ -1251,3 +1261,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "whatsnext" ); - action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); + action = new Q3Action( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); action->addTo( beamMenu_X ); @@ -1258,3 +1268,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "list" ); - action = new QAction( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); + action = new Q3Action( i18n("Print List View..."),icon,i18n("Print List View..."), 0, this ); action->addTo( beamMenu_X ); @@ -1264,3 +1274,3 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "newevent" ); - action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); + action = new Q3Action( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); action->addTo( beamMenu_X ); @@ -1273,3 +1283,3 @@ void MainWindow::initActions() importMenu->insertSeparator(); - action = new QAction( "beam all", i18n("Save"), 0, + action = new Q3Action( "beam all", i18n("Save"), 0, this ); @@ -1277,3 +1287,3 @@ void MainWindow::initActions() connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); - action = new QAction( "beam all", i18n("Exit (+save)"), 0, + action = new Q3Action( "beam all", i18n("Exit (+save)"), 0, this ); @@ -1286,3 +1296,3 @@ void MainWindow::initActions() - action = new QAction( "Whats New", i18n("What's new?"), 0,this ); + action = new Q3Action( "Whats New", i18n("What's new?"), 0,this ); action->addTo( helpMenu ); @@ -1290,3 +1300,3 @@ void MainWindow::initActions() SLOT( whatsNew() ) ); - action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); + action = new Q3Action( "featureHowto", i18n("Features + hints..."), 0,this ); action->addTo( helpMenu ); @@ -1294,3 +1304,3 @@ void MainWindow::initActions() SLOT( features() ) ); - action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); + action = new Q3Action( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); action->addTo( helpMenu ); @@ -1298,3 +1308,3 @@ void MainWindow::initActions() SLOT( keyBindings() ) ); - action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); + action = new Q3Action( "Storage Howto", i18n("Storage HowTo..."), 0,this ); action->addTo( helpMenu ); @@ -1302,3 +1312,3 @@ void MainWindow::initActions() SLOT( storagehowto() ) ); - action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); + action = new Q3Action( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); action->addTo( helpMenu ); @@ -1306,3 +1316,3 @@ void MainWindow::initActions() SLOT( timetrackinghowto() ) ); - action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); + action = new Q3Action( "Sync Howto", i18n("Sync HowTo..."), 0,this ); action->addTo( helpMenu ); @@ -1310,3 +1320,3 @@ void MainWindow::initActions() SLOT( synchowto() ) ); - action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); + action = new Q3Action( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); action->addTo( helpMenu ); @@ -1314,3 +1324,3 @@ void MainWindow::initActions() SLOT( kdesynchowto() ) ); - action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); + action = new Q3Action( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); action->addTo( helpMenu ); @@ -1318,3 +1328,3 @@ void MainWindow::initActions() SLOT( multisynchowto() ) ); - action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); + action = new Q3Action( "Auto saving", i18n("Auto saving..."), 0, this ); action->addTo( helpMenu ); @@ -1322,3 +1332,3 @@ void MainWindow::initActions() SLOT( aboutAutoSaving() ) ); - action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); + action = new Q3Action( "Problemd", i18n("Known Problems..."), 0,this ); action->addTo( helpMenu ); @@ -1326,3 +1336,3 @@ void MainWindow::initActions() SLOT( aboutKnownBugs() ) ); - action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); + action = new Q3Action( "Translate Howto", i18n("User translation..."), 0,this ); action->addTo( helpMenu ); @@ -1330,3 +1340,3 @@ void MainWindow::initActions() SLOT( usertrans() ) ); - action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); + action = new Q3Action( "Frequently asked questions", i18n("FAQ..."), 0,this ); action->addTo( helpMenu ); @@ -1334,3 +1344,3 @@ void MainWindow::initActions() SLOT( faq() ) ); - action = new QAction( "licence", i18n("Licence..."), 0, this ); + action = new Q3Action( "licence", i18n("Licence..."), 0, this ); action->addTo( helpMenu ); @@ -1338,3 +1348,3 @@ void MainWindow::initActions() SLOT( licence() ) ); - action = new QAction( "about", i18n("About..."), 0, this ); + action = new Q3Action( "about", i18n("About..."), 0, this ); action->addTo( helpMenu ); @@ -1358,3 +1368,3 @@ void MainWindow::initActions() if (p-> mShowIconWhatsThis) - QWhatsThis::whatsThisButton ( iconToolBar ); + Q3WhatsThis::whatsThisButton ( iconToolBar ); if (p-> mShowIconNext) @@ -1383,3 +1393,3 @@ void MainWindow::initActions() if (p-> mShowIconBackFast) { - action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); + action = new Q3Action( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); connect( action, SIGNAL( activated() ), @@ -1391,3 +1401,3 @@ void MainWindow::initActions() if (p-> mShowIconBack) { - action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); + action = new Q3Action( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); connect( action, SIGNAL( activated() ), @@ -1403,3 +1413,3 @@ void MainWindow::initActions() if (p-> mShowIconForward) { - action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); + action = new Q3Action( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); connect( action, SIGNAL( activated() ), @@ -1411,3 +1421,3 @@ void MainWindow::initActions() if (p-> mShowIconForwardFast) { - action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); + action = new Q3Action( i18n("Next month"), icon, i18n("Next month"),0 , this ); connect( action, SIGNAL( activated() ), @@ -1526,3 +1536,3 @@ void MainWindow::exportToPhone( int mode ) inFuture = ex2phone.mWriteBackFutureWeeks->value(); - QPtrList<Incidence> delSel; + Q3PtrList<Incidence> delSel; if ( mode == 1 ) @@ -1597,6 +1607,6 @@ void MainWindow::displayText( QString text ,QString cap ) dia.setCaption( cap ); - QVBoxLayout* lay = new QVBoxLayout( &dia ); + Q3VBoxLayout* lay = new Q3VBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); - QTextBrowser tb ( &dia ); + Q3TextBrowser tb ( &dia ); lay->addWidget( &tb ); @@ -1779,5 +1789,5 @@ void MainWindow::updateWeek(QDate seda) p.setFont( mWeekFont ); - p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),AlignCenter, QString::number( weekNum) ); + p.drawText( 0,0,mWeekPixmap.width(), mWeekPixmap.height(),Qt::AlignCenter, QString::number( weekNum) ); p.end(); - QIconSet icon3 ( mWeekPixmap ); + QIcon icon3 ( mWeekPixmap ); mWeekAction->setIconSet ( icon3 ); @@ -1814,3 +1824,3 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) bool ok; - QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); + QDateTime noc = incidence->getNextOccurence( (QDateTime)mView->startDate().addDays(-1), &ok ); if ( ok ) { @@ -1848,9 +1858,9 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) static QPixmap tP = SmallIcon( "newtodo" ); - QIconSet icon; + QIcon icon; if ( incidence->typeID() == todoID ) - icon = QIconSet ( tP ); + icon = QIcon ( tP ); else if ( incidence->typeID() == eventID ) - icon = QIconSet ( eP ); + icon = QIcon ( eP ); else if ( incidence->typeID() == journalID ) - icon = QIconSet ( jP ); + icon = QIcon ( jP ); mPrintSelAction->setIconSet ( icon ); @@ -2047,3 +2057,3 @@ void MainWindow::backupAllFiles() // backup ok - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); @@ -2343,3 +2353,3 @@ void MainWindow::fillFilterMenuTB() selectFilterMenuTB->insertSeparator(); - QPtrList<CalFilter> fili = mView->filters(); + Q3PtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); @@ -2388,3 +2398,3 @@ void MainWindow::fillFilterMenu() selectFilterMenu->insertSeparator(); - QPtrList<CalFilter> fili = mView->filters(); + Q3PtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); @@ -2409,3 +2419,3 @@ void MainWindow::fillFilterMenuPopup() filterPopupMenu->insertSeparator(); - QPtrList<CalFilter> fili = mView->filters(); + Q3PtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); @@ -2821,3 +2831,3 @@ void MainWindow::resizeEvent( QResizeEvent* e) #endif - QMainWindow::resizeEvent( e); + Q3MainWindow::resizeEvent( e); } diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a533d8b..6756216 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -3,9 +3,17 @@ -#include <qmainwindow.h> +#include <q3mainwindow.h> #include <qtimer.h> -#include <qdict.h> +#include <q3dict.h> #include <qfile.h> #include <qmenubar.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qregexp.h> +//Added by qt3to4: +#include <Q3CString> +#include <QCloseEvent> +#include <QResizeEvent> +#include <QPixmap> +#include <Q3PopupMenu> +#include <QHideEvent> +#include <QKeyEvent> @@ -17,3 +25,3 @@ #endif -class QAction; +class Q3Action; class CalendarView; @@ -22,3 +30,3 @@ class KSyncProfile; -#define QPEToolBar QToolBar +#define QPEToolBar Q3ToolBar #endif @@ -33,3 +41,3 @@ using namespace KCal; -class MainWindow : public QMainWindow +class MainWindow : public Q3MainWindow { @@ -51,4 +59,4 @@ class MainWindow : public QMainWindow void configureAgenda( int ); - void recieve( const QCString& msg, const QByteArray& data ); - void receiveStart( const QCString& msg, const QByteArray& data ); + void recieve( const Q3CString& msg, const QByteArray& data ); + void receiveStart( const Q3CString& msg, const QByteArray& data ); protected slots: @@ -126,3 +134,3 @@ class MainWindow : public QMainWindow bool checkAutosave(); - QCString mCStringMess; + Q3CString mCStringMess; QByteArray mByteData; @@ -134,3 +142,3 @@ class MainWindow : public QMainWindow #endif - QAction* brAction; + Q3Action* brAction; KSyncManager* mSyncManager; @@ -146,4 +154,4 @@ class MainWindow : public QMainWindow KMenuBar *filterMenubar; - QPopupMenu * filterPopupMenu; - QPopupMenu * mCurrentItemMenu; + Q3PopupMenu * filterPopupMenu; + Q3PopupMenu * mCurrentItemMenu; void initActions(); @@ -153,10 +161,10 @@ class MainWindow : public QMainWindow void keyReleaseEvent ( QKeyEvent * ) ; - QPopupMenu *configureToolBarMenu; - QPopupMenu *selectFilterMenu; - QPopupMenu *selectFilterMenuTB; - QPopupMenu *configureAgendaMenu, *syncMenu; + Q3PopupMenu *configureToolBarMenu; + Q3PopupMenu *selectFilterMenu; + Q3PopupMenu *selectFilterMenuTB; + Q3PopupMenu *configureAgendaMenu, *syncMenu; CalendarLocal *mCalendar; CalendarView *mView; - QAction *mNewSubTodoAction; - QAction *mWeekAction; + Q3Action *mNewSubTodoAction; + Q3Action *mWeekAction; QFont mWeekFont; @@ -165,15 +173,15 @@ class MainWindow : public QMainWindow - QAction *mShowAction; - QAction *mEditAction; - QAction *mDeleteAction; - QAction *mCloneAction; - QAction *mMoveAction; - QAction *mBeamAction; - QAction *mCancelAction; - QAction *mPrintSelAction; + Q3Action *mShowAction; + Q3Action *mEditAction; + Q3Action *mDeleteAction; + Q3Action *mCloneAction; + Q3Action *mMoveAction; + Q3Action *mBeamAction; + Q3Action *mCancelAction; + Q3Action *mPrintSelAction; - QAction *mToggleNav; - QAction *mToggleFilter; - QAction *mToggleAllday; - QAction *actionFilterMenuTB; + Q3Action *mToggleNav; + Q3Action *mToggleFilter; + Q3Action *mToggleAllday; + Q3Action *actionFilterMenuTB; diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index f6a1a6a..59c3e45 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -28,6 +28,9 @@ #include <qlayout.h> -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> @@ -55,7 +58,7 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam { - QBoxLayout *topLayout = new QHBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3HBoxLayout( this ); // Set up the control buttons and date label - mCtrlFrame = new QFrame( this ); - mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); + mCtrlFrame = new Q3Frame( this ); + mCtrlFrame->setFrameStyle(Q3Frame::Panel|Q3Frame::Raised); mCtrlFrame->setLineWidth(1); @@ -131,3 +134,3 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam // set up control frame layout - QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); + Q3BoxLayout *ctrlLayout = new Q3HBoxLayout( mCtrlFrame, 1 ); ctrlLayout->addWidget( mPrevYear, 3 ); @@ -152,9 +155,9 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); - mPrevYear->setFocusPolicy(NoFocus); - mPrevMonth->setFocusPolicy(NoFocus); - mNextMonth->setFocusPolicy(NoFocus); - mPrevWeek->setFocusPolicy(NoFocus); - mNextWeek->setFocusPolicy(NoFocus); - mNextYear->setFocusPolicy(NoFocus); - mSelectMonth->setFocusPolicy(NoFocus); + mPrevYear->setFocusPolicy(Qt::NoFocus); + mPrevMonth->setFocusPolicy(Qt::NoFocus); + mNextMonth->setFocusPolicy(Qt::NoFocus); + mPrevWeek->setFocusPolicy(Qt::NoFocus); + mNextWeek->setFocusPolicy(Qt::NoFocus); + mNextYear->setFocusPolicy(Qt::NoFocus); + mSelectMonth->setFocusPolicy(Qt::NoFocus); setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h index 9ccef14..a1880f5 100644 --- a/korganizer/navigatorbar.h +++ b/korganizer/navigatorbar.h @@ -29,5 +29,8 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3Frame> +#include <QLabel> class QPushButton; -class QFrame; +class Q3Frame; class QLabel; @@ -62,3 +65,3 @@ class NavigatorBar: public QWidget int mCurrentButtonMinWid; - QFrame *mCtrlFrame; + Q3Frame *mCtrlFrame; diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp index 7253c8e..ab31274 100644 --- a/korganizer/outgoingdialog.cpp +++ b/korganizer/outgoingdialog.cpp @@ -23,3 +23,3 @@ #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> @@ -46,6 +46,6 @@ -ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev, +ScheduleItemOut::ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev, Scheduler::Method method, const QString &recipients) - : QListViewItem(parent) + : Q3ListViewItem(parent) { @@ -125,3 +125,3 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent, const char* name,bool modal, - WFlags fl) + Qt::WFlags fl) : OutgoingDialog_base(parent,name,modal,fl) @@ -141,8 +141,8 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent, } - mMessageListView->setColumnAlignment(1,AlignHCenter); - mMessageListView->setColumnAlignment(2,AlignHCenter); - mMessageListView->setColumnAlignment(3,AlignHCenter); - mMessageListView->setColumnAlignment(4,AlignHCenter); - QObject::connect(mMessageListView,SIGNAL(doubleClicked(QListViewItem *)), - this,SLOT(showEvent(QListViewItem *))); + mMessageListView->setColumnAlignment(1,Qt::AlignHCenter); + mMessageListView->setColumnAlignment(2,Qt::AlignHCenter); + mMessageListView->setColumnAlignment(3,Qt::AlignHCenter); + mMessageListView->setColumnAlignment(4,Qt::AlignHCenter); + QObject::connect(mMessageListView,SIGNAL(doubleClicked(Q3ListViewItem *)), + this,SLOT(showEvent(Q3ListViewItem *))); mDocPrefs = new DocPrefs("groupschedule"); @@ -238,3 +238,3 @@ void OutgoingDialog::deleteItem() -void OutgoingDialog::showEvent(QListViewItem *qitem) +void OutgoingDialog::showEvent(Q3ListViewItem *qitem) { @@ -296,3 +296,3 @@ bool OutgoingDialog::saveMessage(IncidenceBase *incidence,Scheduler::Method meth QString messageText = mFormat->createScheduleMessage(incidence,method); - QTextStream *qts = ktfile.textStream(); + Q3TextStream *qts = ktfile.textStream(); *qts << messageText; @@ -332,3 +332,3 @@ void OutgoingDialog::loadMessages() if (!inserted) { - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'" @@ -336,3 +336,3 @@ void OutgoingDialog::loadMessages() } else { - QTextStream t(&f); + Q3TextStream t(&f); QString messageString = t.read(); diff --git a/korganizer/outgoingdialog.h b/korganizer/outgoingdialog.h index a3d561a..e727087 100644 --- a/korganizer/outgoingdialog.h +++ b/korganizer/outgoingdialog.h @@ -25,3 +25,3 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qmap.h> @@ -36,6 +36,6 @@ using namespace KCal; -class ScheduleItemOut : public QListViewItem +class ScheduleItemOut : public Q3ListViewItem { public: - ScheduleItemOut(QListView *parent,IncidenceBase *ev, + ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev, Scheduler::Method method, const QString &recipients=QString::null); @@ -58,3 +58,3 @@ class OutgoingDialog : public OutgoingDialog_base OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0, - bool modal=false,WFlags fl=0); + bool modal=false,Qt::WFlags fl=0); ~OutgoingDialog(); @@ -74,3 +74,3 @@ class OutgoingDialog : public OutgoingDialog_base void deleteItem(); - void showEvent(QListViewItem *); + void showEvent(Q3ListViewItem *); 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 @@ -13,4 +13,4 @@ #include <qvariant.h> -#include <qheader.h> -#include <qlistview.h> +#include <q3header.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -18,3 +18,5 @@ #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> @@ -27,3 +29,3 @@ */ -OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) +OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, name, modal, fl ) @@ -33,5 +35,5 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo setName( "OutgoingDialog_base" ); - OutgoingDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout"); + OutgoingDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "OutgoingDialog_baseLayout"); - mMessageListView = new QListView( this, "mMessageListView" ); + mMessageListView = new Q3ListView( this, "mMessageListView" ); mMessageListView->addColumn( tr2i18n( "Summary" ) ); @@ -42,4 +44,4 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo mMessageListView->addColumn( tr2i18n( "Method" ) ); - mMessageListView->setFrameShape( QListView::StyledPanel ); - mMessageListView->setFrameShadow( QListView::Sunken ); + mMessageListView->setFrameShape( Q3ListView::StyledPanel ); + mMessageListView->setFrameShadow( Q3ListView::Sunken ); mMessageListView->setAllColumnsShowFocus( TRUE ); 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 @@ -14,8 +14,12 @@ #include <qdialog.h> - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QListView; -class QListViewItem; +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> + +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; +class Q3ListView; +class Q3ListViewItem; class QPushButton; @@ -27,6 +31,6 @@ class OutgoingDialog_base : public QDialog public: - OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + OutgoingDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~OutgoingDialog_base(); - QListView* mMessageListView; + Q3ListView* mMessageListView; QPushButton* PushButton5; @@ -36,3 +40,3 @@ public: protected: - QGridLayout* OutgoingDialog_baseLayout; + Q3GridLayout* OutgoingDialog_baseLayout; diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp index 2ae6720..ede9840 100644 --- a/korganizer/publishdialog.cpp +++ b/korganizer/publishdialog.cpp @@ -37,3 +37,3 @@ PublishDialog::PublishDialog(QWidget* parent, const char* name, - bool modal, WFlags fl) + bool modal, Qt::WFlags fl) : PublishDialog_base(parent,name,modal,fl) @@ -43,3 +43,3 @@ PublishDialog::PublishDialog(QWidget* parent, const char* name, mEmailLineEdit->setEnabled(false); - connect(mAddressListView,SIGNAL(selectionChanged(QListViewItem *)), + connect(mAddressListView,SIGNAL(selectionChanged(Q3ListViewItem *)), SLOT(updateInput())); @@ -55,3 +55,3 @@ void PublishDialog::addAttendee(Attendee *attendee) mEmailLineEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAddressListView); + Q3ListViewItem *item = new Q3ListViewItem(mAddressListView); item->setText(0,attendee->name()); @@ -64,3 +64,3 @@ QString PublishDialog::addresses() QString to = ""; - QListViewItem *item; + Q3ListViewItem *item; int i, count; @@ -82,3 +82,3 @@ void PublishDialog::addItem() mEmailLineEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAddressListView); + Q3ListViewItem *item = new Q3ListViewItem(mAddressListView); mAddressListView->insertItem(item); @@ -91,3 +91,3 @@ void PublishDialog::removeItem() { - QListViewItem *item; + Q3ListViewItem *item; item = mAddressListView->selectedItem(); @@ -121,3 +121,3 @@ void PublishDialog::openAddressbook() mEmailLineEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAddressListView); + Q3ListViewItem *item = new Q3ListViewItem(mAddressListView); mAddressListView->setSelected(item,true); @@ -133,3 +133,3 @@ void PublishDialog::updateItem() { - QListViewItem *item; + Q3ListViewItem *item; item = mAddressListView->selectedItem(); @@ -142,3 +142,3 @@ void PublishDialog::updateInput() { - QListViewItem *item; + Q3ListViewItem *item; item = mAddressListView->selectedItem(); diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h index 338603c..3ffeec4 100644 --- a/korganizer/publishdialog.h +++ b/korganizer/publishdialog.h @@ -25,3 +25,3 @@ -#include <qlistview.h> +#include <q3listview.h> #include <libkcal/attendee.h> @@ -37,3 +37,3 @@ class PublishDialog : public PublishDialog_base PublishDialog(QWidget* parent=0,const char* name=0, - bool modal=true,WFlags fl=0); + bool modal=true,Qt::WFlags fl=0); ~PublishDialog(); 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 @@ -13,7 +13,7 @@ #include <qvariant.h> -#include <qframe.h> -#include <qheader.h> +#include <q3frame.h> +#include <q3header.h> #include <qlabel.h> #include <qlineedit.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -21,3 +21,6 @@ #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> @@ -30,3 +33,3 @@ */ -PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) +PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, name, modal, fl ) @@ -36,5 +39,5 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool setName( "PublishDialog_base" ); - PublishDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout"); + PublishDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "PublishDialog_baseLayout"); - mAddressListView = new QListView( this, "mAddressListView" ); + mAddressListView = new Q3ListView( this, "mAddressListView" ); mAddressListView->addColumn( tr2i18n( "Name" ) ); @@ -74,6 +77,6 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool - Line2 = new QFrame( this, "Line2" ); - Line2->setFrameShape( QFrame::HLine ); - Line2->setFrameShadow( QFrame::Sunken ); - Line2->setFrameShape( QFrame::HLine ); + Line2 = new Q3Frame( this, "Line2" ); + Line2->setFrameShape( Q3Frame::HLine ); + Line2->setFrameShadow( Q3Frame::Sunken ); + Line2->setFrameShape( Q3Frame::HLine ); @@ -81,3 +84,3 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool - layout95 = new QHBoxLayout( 0, 0, 6, "layout95"); + layout95 = new Q3HBoxLayout( 0, 0, 6, "layout95"); QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 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 @@ -14,11 +14,17 @@ #include <qdialog.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <QLabel> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QFrame; +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; +class Q3Frame; class QLabel; class QLineEdit; -class QListView; -class QListViewItem; +class Q3ListView; +class Q3ListViewItem; class QPushButton; @@ -30,6 +36,6 @@ class PublishDialog_base : public QDialog public: - PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + PublishDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~PublishDialog_base(); - QListView* mAddressListView; + Q3ListView* mAddressListView; QLabel* TextLabel1; @@ -41,3 +47,3 @@ public: QPushButton* PushButton11; - QFrame* Line2; + Q3Frame* Line2; QPushButton* PushButton9; @@ -46,4 +52,4 @@ public: protected: - QGridLayout* PublishDialog_baseLayout; - QHBoxLayout* layout95; + Q3GridLayout* PublishDialog_baseLayout; + Q3HBoxLayout* layout95; diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp index 3544081..35bedba 100644 --- a/korganizer/savetemplatedialog.cpp +++ b/korganizer/savetemplatedialog.cpp @@ -24,2 +24,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> @@ -37,4 +40,4 @@ SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent ) { - QFrame *topFrame = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); + Q3Frame *topFrame = plainPage(); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( topFrame, 0, spacingHint() ); diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 9cfdc35..105b844 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -26,10 +26,17 @@ #include <qcheckbox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> -#include <qlistview.h> -#include <qwhatsthis.h> +#include <q3listview.h> +#include <q3whatsthis.h> #include <qlineedit.h> #include <qpushbutton.h> -#include <qhbuttongroup.h> +//#include <qhbuttongroup.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3Frame> +#include <Q3PtrList> +#include <QKeyEvent> +#include <Q3VBoxLayout> #include <klocale.h> @@ -48,3 +55,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) - : QVBox( 0 ) + : Q3VBox( 0 ) @@ -52,7 +59,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mCalendar = calendar; - QFrame *topFrame = new QFrame( this ) ;//plainPage(); - QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); + Q3Frame *topFrame = new Q3Frame( this ) ;//plainPage(); + Q3VBoxLayout *layout = new Q3VBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); // Search expression - QHBoxLayout *subLayout = new QHBoxLayout(); + Q3HBoxLayout *subLayout = new Q3HBoxLayout(); layout->addLayout(subLayout); @@ -100,3 +107,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) - incidenceGroup = new QHBox( topFrame ); + incidenceGroup = new Q3HBox( topFrame ); layout->addWidget(incidenceGroup); @@ -108,3 +115,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) - subjectGroup = new QHBox( topFrame ); + subjectGroup = new Q3HBox( topFrame ); layout->addWidget(subjectGroup); @@ -116,3 +123,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) - attendeeGroup = new QHBox( topFrame ); + attendeeGroup = new Q3HBox( topFrame ); layout->addWidget(attendeeGroup ); @@ -129,3 +136,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) if ( QApplication::desktop()->width() <= 240 ) space = 1; - QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,space); + Q3HBoxLayout *rangeLayout = new Q3HBoxLayout(rangeWidget,0,space); rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); @@ -137,3 +144,3 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) rangeLayout->addWidget(mEndDate); - QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); + QToolButton *wt = Q3WhatsThis::whatsThisButton ( rangeWidget ); rangeLayout->addWidget( (QWidget*)wt ); @@ -343,3 +350,3 @@ void SearchDialog::search(const QRegExp &re) { - QPtrList<Event> events; + Q3PtrList<Event> events; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { @@ -421,3 +428,3 @@ void SearchDialog::search(const QRegExp &re) if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { - QPtrList<Attendee> tmpAList = ev->attendees(); + Q3PtrList<Attendee> tmpAList = ev->attendees(); Attendee *a; @@ -460,3 +467,3 @@ void SearchDialog::search(const QRegExp &re) } - QPtrList<Todo> todos; + Q3PtrList<Todo> todos; @@ -514,3 +521,3 @@ void SearchDialog::search(const QRegExp &re) if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { - QPtrList<Attendee> tmpAList = tod->attendees(); + Q3PtrList<Attendee> tmpAList = tod->attendees(); Attendee *a; @@ -550,3 +557,3 @@ void SearchDialog::search(const QRegExp &re) - QPtrList<Journal> journals; + Q3PtrList<Journal> journals; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h index 945ff65..5df6116 100644 --- a/korganizer/searchdialog.h +++ b/korganizer/searchdialog.h @@ -28,4 +28,8 @@ #include <qradiobutton.h> +//Added by qt3to4: +#include <QLabel> +#include <QKeyEvent> +#include <Q3PtrList> #include <kdialogbase.h> -#include <qvbox.h> +#include <q3vbox.h> @@ -43,3 +47,3 @@ class CalendarView; using namespace KCal; -class SearchDialog : public QVBox +class SearchDialog : public Q3VBox { @@ -74,3 +78,3 @@ class SearchDialog : public QVBox - QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; + Q3HBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; void search(const QRegExp &); @@ -79,5 +83,5 @@ class SearchDialog : public QVBox - QPtrList<Event> mMatchedEvents; - QPtrList<Todo> mMatchedTodos; - QPtrList<Journal> mMatchedJournals; + Q3PtrList<Event> mMatchedEvents; + Q3PtrList<Todo> mMatchedTodos; + Q3PtrList<Journal> mMatchedJournals; diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp index 7137c49..8186ebb 100644 --- a/korganizer/statusdialog.cpp +++ b/korganizer/statusdialog.cpp @@ -23,2 +23,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3HBoxLayout> @@ -34,3 +37,3 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) : - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( spacingHint() ); @@ -38,3 +41,3 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) : - QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *statusLayout = new Q3HBoxLayout( topLayout ); @@ -47,3 +50,3 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) : - QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *buttonLayout = new Q3HBoxLayout( topLayout ); diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp index 11be432..a6c3cdc 100644 --- a/korganizer/timeline.cpp +++ b/korganizer/timeline.cpp @@ -7,3 +7,3 @@ TimeLine::TimeLine( QWidget *parent, const char *name ) : - QScrollView( parent, name ) + Q3ScrollView( parent, name ) { @@ -13,3 +13,3 @@ TimeLine::TimeLine( QWidget *parent, const char *name ) : - viewport()->setBackgroundMode( PaletteBackground ); + viewport()->setBackgroundMode( Qt::PaletteBackground ); @@ -60,3 +60,3 @@ void TimeLine::setContentsPos( int pos ) { - QScrollView::setContentsPos ( pos, 0 ); + Q3ScrollView::setContentsPos ( pos, 0 ); } diff --git a/korganizer/timeline.h b/korganizer/timeline.h index ab3e5d3..bf301fa 100644 --- a/korganizer/timeline.h +++ b/korganizer/timeline.h @@ -3,6 +3,6 @@ -#include <qscrollview.h> +#include <q3scrollview.h> #include <qdatetime.h> -class TimeLine : public QScrollView +class TimeLine : public Q3ScrollView { diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp index df8ff88..0908056 100644 --- a/korganizer/timespanview.cpp +++ b/korganizer/timespanview.cpp @@ -6,6 +6,10 @@ #endif -#include <qlistview.h> +#include <q3listview.h> #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> +#include <Q3ValueList> @@ -23,3 +27,3 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); #ifndef DESKTOP_VERSION @@ -31,3 +35,3 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : - mList = new QListView( mSplitter ); + mList = new Q3ListView( mSplitter ); mList->addColumn( i18n("Summary") ); @@ -35,3 +39,3 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : QWidget *rightPane = new QWidget( mSplitter ); - QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); + Q3BoxLayout *rightPaneLayout = new Q3VBoxLayout( rightPane ); @@ -44,3 +48,3 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : - QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); + Q3BoxLayout *buttonLayout = new Q3HBoxLayout( rightPaneLayout ); @@ -66,3 +70,3 @@ TimeSpanView::~TimeSpanView() -QValueList<int> TimeSpanView::splitterSizes() +Q3ValueList<int> TimeSpanView::splitterSizes() { @@ -71,3 +75,3 @@ QValueList<int> TimeSpanView::splitterSizes() -void TimeSpanView::setSplitterSizes( QValueList<int> sizes ) +void TimeSpanView::setSplitterSizes( Q3ValueList<int> sizes ) { @@ -78,3 +82,3 @@ void TimeSpanView::addItem( KCal::Event *event ) { - new QListViewItem( mList, event->summary() ); + new Q3ListViewItem( mList, event->summary() ); diff --git a/korganizer/timespanview.h b/korganizer/timespanview.h index 34cb1f7..f652374 100644 --- a/korganizer/timespanview.h +++ b/korganizer/timespanview.h @@ -4,2 +4,4 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -14,3 +16,3 @@ class QSplitter; #endif -class QListView; +class Q3ListView; class LineView; @@ -28,4 +30,4 @@ class TimeSpanView : public QWidget - QValueList<int> splitterSizes(); - void setSplitterSizes( QValueList<int> ); + Q3ValueList<int> splitterSizes(); + void setSplitterSizes( Q3ValueList<int> ); @@ -50,3 +52,3 @@ class TimeSpanView : public QWidget QKSplitter *mSplitter; - QListView *mList; + Q3ListView *mList; TimeLine *mTimeLine; diff --git a/libetpan/libetpan.pro b/libetpan/libetpan.pro index 10f51da..909d064 100644 --- a/libetpan/libetpan.pro +++ b/libetpan/libetpan.pro @@ -1 +1,2 @@ +include( ../variables.pri ) ###################################################################### @@ -5,3 +6,3 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj @@ -450 +451,3 @@ SOURCES += src/data-types/base64.c \ src/driver/implementation/pop3/pop3storage.c +#The following line was inserted by qt3to4 +QT += xml qt3support diff --git a/libetpan/libetpanE.pro b/libetpan/libetpanE.pro index 4b82196..9ba1a6d 100644 --- a/libetpan/libetpanE.pro +++ b/libetpan/libetpanE.pro @@ -5,3 +5,3 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj/$(PLATFORM) 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 @@ -71 +71,3 @@ SOURCES += caldate.c \ # vsnprintf.c +#The following line was inserted by qt3to4 +QT += 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 @@ -44 +44,3 @@ SOURCES += icalcalendar.c \ icalssyacc.c +#The following line was inserted by qt3to4 +QT += xml qt3support diff --git a/libkcal/alarm.cpp b/libkcal/alarm.cpp index 3157214..3c4a81c 100644 --- a/libkcal/alarm.cpp +++ b/libkcal/alarm.cpp @@ -28,2 +28,4 @@ #include "alarm.h" +//Added by qt3to4: +#include <Q3ValueList> @@ -214,3 +216,3 @@ QString Alarm::programArguments() const void Alarm::setEmailAlarm(const QString &subject, const QString &text, - const QValueList<Person> &addressees, const QStringList &attachments) + const Q3ValueList<Person> &addressees, const QStringList &attachments) { @@ -233,3 +235,3 @@ void Alarm::setMailAddress(const Person &mailAddress) -void Alarm::setMailAddresses(const QValueList<Person> &mailAddresses) +void Alarm::setMailAddresses(const Q3ValueList<Person> &mailAddresses) { @@ -249,5 +251,5 @@ void Alarm::addMailAddress(const Person &mailAddress) -QValueList<Person> Alarm::mailAddresses() const +Q3ValueList<Person> Alarm::mailAddresses() const { - return (mType == Email) ? mMailAddresses : QValueList<Person>(); + return (mType == Email) ? mMailAddresses : Q3ValueList<Person>(); } diff --git a/libkcal/alarm.h b/libkcal/alarm.h index ac6ea0d..b24f0f7 100644 --- a/libkcal/alarm.h +++ b/libkcal/alarm.h @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> @@ -41,3 +41,3 @@ class Alarm : public CustomProperties enum Type { Invalid, Display, Procedure, Email, Audio }; - typedef QValueList<Alarm *> List; + typedef Q3ValueList<Alarm *> List; @@ -114,3 +114,3 @@ class Alarm : public CustomProperties */ - void setEmailAlarm(const QString &subject, const QString &text, const QValueList<Person> &addressees, + void setEmailAlarm(const QString &subject, const QString &text, const Q3ValueList<Person> &addressees, const QStringList &attachments = QStringList()); @@ -124,3 +124,3 @@ class Alarm : public CustomProperties */ - void setMailAddresses(const QValueList<Person> &mailAlarmAddresses); + void setMailAddresses(const Q3ValueList<Person> &mailAlarmAddresses); /** Add this address to the list of addresses to send mail to when the alarm is triggered. @@ -130,3 +130,3 @@ class Alarm : public CustomProperties /** return the addresses to send mail to when an alarm goes off */ - QValueList<Person> mailAddresses() const; + Q3ValueList<Person> mailAddresses() const; @@ -228,3 +228,3 @@ class Alarm : public CustomProperties QStringList mMailAttachFiles; // filenames to attach to email - QValueList<Person> mMailAddresses; // who to mail for reminder + Q3ValueList<Person> mMailAddresses; // who to mail for reminder QString mMailSubject; // subject of email diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 9b38d3f..bf095cf 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -32,2 +32,4 @@ #include "syncdefines.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -273,5 +275,5 @@ CalFilter *Calendar::filter() -QPtrList<Incidence> Calendar::incidences() +Q3PtrList<Incidence> Calendar::incidences() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -279,9 +281,9 @@ QPtrList<Incidence> Calendar::incidences() - QPtrList<Event> e = events(); + Q3PtrList<Event> e = events(); for( i = e.first(); i; i = e.next() ) incidences.append( i ); - QPtrList<Todo> t = todos(); + Q3PtrList<Todo> t = todos(); for( i = t.first(); i; i = t.next() ) incidences.append( i ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); @@ -293,3 +295,3 @@ void Calendar::resetPilotStat(int id ) { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -297,9 +299,9 @@ void Calendar::resetPilotStat(int id ) - QPtrList<Event> e = rawEvents(); + Q3PtrList<Event> e = rawEvents(); for( i = e.first(); i; i = e.next() ) i->setPilotId( id ); - QPtrList<Todo> t = rawTodos(); + Q3PtrList<Todo> t = rawTodos(); for( i = t.first(); i; i = t.next() ) i->setPilotId( id ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) i->setPilotId( id ); @@ -308,3 +310,3 @@ void Calendar::resetTempSyncStat() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -312,14 +314,14 @@ void Calendar::resetTempSyncStat() - QPtrList<Event> e = rawEvents(); + Q3PtrList<Event> e = rawEvents(); for( i = e.first(); i; i = e.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - QPtrList<Todo> t = rawTodos(); + Q3PtrList<Todo> t = rawTodos(); for( i = t.first(); i; i = t.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) i->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); } -QPtrList<Incidence> Calendar::rawIncidences() +Q3PtrList<Incidence> Calendar::rawIncidences() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; @@ -327,9 +329,9 @@ QPtrList<Incidence> Calendar::rawIncidences() - QPtrList<Event> e = rawEvents(); + Q3PtrList<Event> e = rawEvents(); for( i = e.first(); i; i = e.next() ) incidences.append( i ); - QPtrList<Todo> t = rawTodos(); + Q3PtrList<Todo> t = rawTodos(); for( i = t.first(); i; i = t.next() ) incidences.append( i ); - QPtrList<Journal> j = journals(); + Q3PtrList<Journal> j = journals(); for( i = j.first(); i; i = j.next() ) incidences.append( i ); @@ -339,5 +341,5 @@ QPtrList<Incidence> Calendar::rawIncidences() -QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) +Q3PtrList<Event> Calendar::events( const QDate &date, bool sorted ) { - QPtrList<Event> el = rawEventsForDate(date,sorted); + Q3PtrList<Event> el = rawEventsForDate(date,sorted); mFilter->apply(&el); @@ -346,5 +348,5 @@ QPtrList<Event> Calendar::events( const QDate &date, bool sorted ) -QPtrList<Event> Calendar::events( const QDateTime &qdt ) +Q3PtrList<Event> Calendar::events( const QDateTime &qdt ) { - QPtrList<Event> el = rawEventsForDate(qdt); + Q3PtrList<Event> el = rawEventsForDate(qdt); mFilter->apply(&el); @@ -353,6 +355,6 @@ QPtrList<Event> Calendar::events( const QDateTime &qdt ) -QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, +Q3PtrList<Event> Calendar::events( const QDate &start, const QDate &end, bool inclusive) { - QPtrList<Event> el = rawEvents(start,end,inclusive); + Q3PtrList<Event> el = rawEvents(start,end,inclusive); mFilter->apply(&el); @@ -361,5 +363,5 @@ QPtrList<Event> Calendar::events( const QDate &start, const QDate &end, -QPtrList<Event> Calendar::events() +Q3PtrList<Event> Calendar::events() { - QPtrList<Event> el = rawEvents(); + Q3PtrList<Event> el = rawEvents(); mFilter->apply(&el); @@ -371,3 +373,3 @@ void Calendar::addIncidenceBranch(Incidence *i) Incidence * inc; - QPtrList<Incidence> Relations = i->relations(); + Q3PtrList<Incidence> Relations = i->relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -409,5 +411,5 @@ Incidence* Calendar::incidence( const QString& uid ) -QPtrList<Todo> Calendar::todos() +Q3PtrList<Todo> Calendar::todos() { - QPtrList<Todo> tl = rawTodos(); + Q3PtrList<Todo> tl = rawTodos(); mFilter->apply( &tl ); @@ -457,3 +459,3 @@ void Calendar::removeRelations( Incidence *incidence ) - QPtrList<Incidence> relations = incidence->relations(); + Q3PtrList<Incidence> relations = incidence->relations(); for( Incidence* i = relations.first(); i; i = relations.next() ) @@ -473,3 +475,3 @@ void Calendar::removeRelations( Incidence *incidence ) QString r2uid = incidence->relatedToUid(); - QPtrList<Incidence> tempList; + Q3PtrList<Incidence> tempList; while( Incidence* i = mOrphans[ r2uid ] ) { @@ -489,3 +491,3 @@ void Calendar::removeRelations( Incidence *incidence ) // Removing wasn't that easy - for( QDictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { + for( Q3DictIterator<Incidence> it( mOrphans ); it.current(); ++it ) { if( it.current()->uid() == uid ) { diff --git a/libkcal/calendar.h b/libkcal/calendar.h index fbc40ad..5845f44 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -27,4 +27,4 @@ #include <qdatetime.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> @@ -90,3 +90,3 @@ public: virtual void save() = 0; - virtual QPtrList<Event> getExternLastSyncEvents() = 0; + virtual Q3PtrList<Event> getExternLastSyncEvents() = 0; virtual void removeSyncInfo( QString syncProfile) = 0; @@ -157,3 +157,3 @@ public: */ - virtual QPtrList<Incidence> incidences(); + virtual Q3PtrList<Incidence> incidences(); @@ -162,3 +162,3 @@ public: */ - virtual QPtrList<Incidence> rawIncidences(); + virtual Q3PtrList<Incidence> rawIncidences(); @@ -187,3 +187,3 @@ public: */ - QPtrList<Event> events( const QDate &date, bool sorted = false); + Q3PtrList<Event> events( const QDate &date, bool sorted = false); /** @@ -192,3 +192,3 @@ public: */ - QPtrList<Event> events( const QDateTime &qdt ); + Q3PtrList<Event> events( const QDateTime &qdt ); /** @@ -198,3 +198,3 @@ public: */ - QPtrList<Event> events( const QDate &start, const QDate &end, + Q3PtrList<Event> events( const QDate &start, const QDate &end, bool inclusive = false); @@ -203,3 +203,3 @@ public: */ - virtual QPtrList<Event> events(); + virtual Q3PtrList<Event> events(); /** @@ -207,3 +207,3 @@ public: */ - virtual QPtrList<Event> rawEvents() = 0; + virtual Q3PtrList<Event> rawEvents() = 0; @@ -224,3 +224,3 @@ public: */ - virtual QPtrList<Todo> todos(); + virtual Q3PtrList<Todo> todos(); /** @@ -234,3 +234,3 @@ public: */ - virtual QPtrList<Todo> todos( const QDate &date ) = 0; + virtual Q3PtrList<Todo> todos( const QDate &date ) = 0; /** @@ -238,3 +238,3 @@ public: */ - virtual QPtrList<Todo> rawTodos() = 0; + virtual Q3PtrList<Todo> rawTodos() = 0; @@ -250,3 +250,3 @@ public: virtual Journal *journal( const QDate & ) = 0; - virtual QPtrList<Journal> journals4Date( const QDate & ) = 0; + virtual Q3PtrList<Journal> journals4Date( const QDate & ) = 0; /** @@ -258,3 +258,3 @@ public: */ - virtual QPtrList<Journal> journals() = 0; + virtual Q3PtrList<Journal> journals() = 0; @@ -337,3 +337,3 @@ public: */ - virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; + virtual Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; /** @@ -341,3 +341,3 @@ public: */ - virtual QPtrList<Event> rawEventsForDate( const QDate &date, + virtual Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ) = 0; @@ -347,3 +347,3 @@ public: */ - virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, + virtual Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ) = 0; @@ -378,4 +378,4 @@ private: // This list is used to put together related todos - QDict<Incidence> mOrphans; - QDict<Incidence> mOrphanUids; + Q3Dict<Incidence> mOrphans; + Q3Dict<Incidence> mOrphanUids; }; diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index ce3cd09..cb52b7c 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -194,3 +194,3 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) // if not in local, add it to default calendar - QPtrList<Incidence> localInc = rawIncidences(); + Q3PtrList<Incidence> localInc = rawIncidences(); Incidence* inL = localInc.first(); @@ -202,3 +202,3 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) } - QPtrList<Incidence> er = remote->rawIncidences(); + Q3PtrList<Incidence> er = remote->rawIncidences(); Incidence* inR = er.first(); @@ -261,5 +261,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) setSyncEventsEnabled(); - QPtrList<Incidence> incList; + Q3PtrList<Incidence> incList; { - QPtrList<Event> EventList = cal->rawEvents(); + Q3PtrList<Event> EventList = cal->rawEvents(); Event * ev = EventList.first(); @@ -281,3 +281,3 @@ void CalendarLocal::addCalendar( Calendar* cal ) - QPtrList<Todo> TodoList = cal->rawTodos(); + Q3PtrList<Todo> TodoList = cal->rawTodos(); Todo * ev = TodoList.first(); @@ -301,3 +301,3 @@ void CalendarLocal::addCalendar( Calendar* cal ) { - QPtrList<Journal> JournalList = cal->journals(); + Q3PtrList<Journal> JournalList = cal->journals(); Journal * ev = JournalList.first(); @@ -483,5 +483,5 @@ void CalendarLocal::deleteTodo( Todo *todo ) -QPtrList<Todo> CalendarLocal::rawTodos() +Q3PtrList<Todo> CalendarLocal::rawTodos() { - QPtrList<Todo> el; + Q3PtrList<Todo> el; for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) @@ -501,3 +501,3 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) { - QPtrList<Incidence> all = rawIncidences() ; + Q3PtrList<Incidence> all = rawIncidences() ; Incidence *inc; @@ -507,3 +507,3 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) if ( syncProfile.isEmpty() ) { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; @@ -522,5 +522,5 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) } -QPtrList<Event> CalendarLocal::getExternLastSyncEvents() +Q3PtrList<Event> CalendarLocal::getExternLastSyncEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; @@ -687,5 +687,5 @@ void CalendarLocal::deRegisterAlarm() -QPtrList<Todo> CalendarLocal::todos( const QDate &date ) +Q3PtrList<Todo> CalendarLocal::todos( const QDate &date ) { - QPtrList<Todo> todos; + Q3PtrList<Todo> todos; @@ -788,3 +788,3 @@ void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, { - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; @@ -807,3 +807,3 @@ void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms, - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; @@ -846,5 +846,5 @@ void CalendarLocal::insertEvent( Event *event ) -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) { - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; @@ -880,3 +880,3 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) // now, we have to sort it based on dtStart.time() - QPtrList<Event> eventListSorted; + Q3PtrList<Event> eventListSorted; Event *sortEvent; @@ -896,3 +896,3 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) -QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, +Q3PtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, bool inclusive ) @@ -901,3 +901,3 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; @@ -925,3 +925,3 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, bool founOne; - QDate next = event->getNextOccurence( start, &founOne ).date(); + QDate next = event->getNextOccurence( (QDateTime)start, &founOne ).date(); if ( founOne ) { @@ -974,3 +974,3 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) { @@ -979,5 +979,5 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) -QPtrList<Event> CalendarLocal::rawEvents() +Q3PtrList<Event> CalendarLocal::rawEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; for ( Event *it = mEventList.first(); it; it = mEventList.next() ) @@ -1008,5 +1008,5 @@ void CalendarLocal::deleteJournal( Journal *journal ) -QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) +Q3PtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) { - QPtrList<Journal> el; + Q3PtrList<Journal> el; for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) @@ -1042,5 +1042,5 @@ Journal *CalendarLocal::journal( const QString &uid ) -QPtrList<Journal> CalendarLocal::journals() +Q3PtrList<Journal> CalendarLocal::journals() { - QPtrList<Journal> el; + Q3PtrList<Journal> el; for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) @@ -1053,3 +1053,3 @@ void CalendarLocal::setCalendarRemove( int id ) { - QPtrList<Event> EventList = mEventList; + Q3PtrList<Event> EventList = mEventList; Event * ev = EventList.first(); @@ -1063,3 +1063,3 @@ void CalendarLocal::setCalendarRemove( int id ) - QPtrList<Todo> TodoList = mTodoList; + Q3PtrList<Todo> TodoList = mTodoList; Todo * ev = TodoList.first(); @@ -1072,3 +1072,3 @@ void CalendarLocal::setCalendarRemove( int id ) { - QPtrList<Journal> JournalList = mJournalList; + Q3PtrList<Journal> JournalList = mJournalList; Journal * ev = JournalList.first(); diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 1ceabce..1df65c7 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -25,2 +25,4 @@ #include "calendar.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -95,4 +97,4 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEvents(); - QPtrList<Event> getExternLastSyncEvents(); + Q3PtrList<Event> rawEvents(); + Q3PtrList<Event> getExternLastSyncEvents(); /** @@ -114,3 +116,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Todo> rawTodos(); + Q3PtrList<Todo> rawTodos(); /** @@ -118,3 +120,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Todo> todos( const QDate &date ); + Q3PtrList<Todo> todos( const QDate &date ); /** @@ -124,3 +126,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Todo> todos() { return Calendar::todos(); } + Q3PtrList<Todo> todos() { return Calendar::todos(); } @@ -138,3 +140,3 @@ class CalendarLocal : public Calendar Journal *journal( const QDate & ); - QPtrList<Journal> journals4Date( const QDate & ); + Q3PtrList<Journal> journals4Date( const QDate & ); /** @@ -146,3 +148,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Journal> journals(); + Q3PtrList<Journal> journals(); @@ -176,3 +178,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); + Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); /** @@ -180,3 +182,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); + Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ); /** @@ -185,3 +187,3 @@ class CalendarLocal : public Calendar */ - QPtrList<Event> rawEvents( const QDate &start, const QDate &end, + Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ); @@ -226,5 +228,5 @@ public slots: - QPtrList<Event> mEventList; - QPtrList<Todo> mTodoList; - QPtrList<Journal> mJournalList; + Q3PtrList<Event> mEventList; + Q3PtrList<Todo> mTodoList; + Q3PtrList<Journal> mJournalList; }; diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp index 72f70c2..fa1dbd5 100644 --- a/libkcal/calfilter.cpp +++ b/libkcal/calfilter.cpp @@ -23,2 +23,4 @@ #include "calfilter.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -43,3 +45,3 @@ CalFilter::~CalFilter() -void CalFilter::apply(QPtrList<Event> *eventlist) +void CalFilter::apply(Q3PtrList<Event> *eventlist) { @@ -63,3 +65,3 @@ void CalFilter::apply(QPtrList<Event> *eventlist) // TODO: avoid duplicating apply() code -void CalFilter::apply(QPtrList<Todo> *eventlist) +void CalFilter::apply(Q3PtrList<Todo> *eventlist) { diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h index e349770..821149f 100644 --- a/libkcal/calfilter.h +++ b/libkcal/calfilter.h @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -57,3 +57,3 @@ class CalFilter { */ - void apply(QPtrList<Event> *eventlist); + void apply(Q3PtrList<Event> *eventlist); @@ -63,5 +63,5 @@ class CalFilter { */ - void apply(QPtrList<Todo> *todolist); - bool CalFilter::filterCalendarItem(Incidence *in); - bool CalFilter::filterJournal(Journal *in); + void apply(Q3PtrList<Todo> *todolist); + bool filterCalendarItem(Incidence *in); + bool filterJournal(Journal *in); /** diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp index adc1710..16f4a28 100644 --- a/libkcal/customproperties.cpp +++ b/libkcal/customproperties.cpp @@ -21,2 +21,4 @@ #include "customproperties.h" +//Added by qt3to4: +#include <Q3CString> @@ -37,3 +39,3 @@ CustomProperties::~CustomProperties() -void CustomProperties::setCustomProperty(const QCString &app, const QCString &key, +void CustomProperties::setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value) @@ -42,3 +44,3 @@ void CustomProperties::setCustomProperty(const QCString &app, const QCString &ke return; - QCString property = "X-KDE-" + app + "-" + key; + Q3CString property = "X-KDE-" + app + "-" + key; if (!checkName(property)) @@ -48,13 +50,13 @@ void CustomProperties::setCustomProperty(const QCString &app, const QCString &ke -void CustomProperties::removeCustomProperty(const QCString &app, const QCString &key) +void CustomProperties::removeCustomProperty(const Q3CString &app, const Q3CString &key) { - removeNonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); + removeNonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key)); } -QString CustomProperties::customProperty(const QCString &app, const QCString &key) const +QString CustomProperties::customProperty(const Q3CString &app, const Q3CString &key) const { - return nonKDECustomProperty(QCString("X-KDE-" + app + "-" + key)); + return nonKDECustomProperty(Q3CString("X-KDE-" + app + "-" + key)); } -void CustomProperties::setNonKDECustomProperty(const QCString &name, const QString &value) +void CustomProperties::setNonKDECustomProperty(const Q3CString &name, const QString &value) { @@ -65,5 +67,5 @@ void CustomProperties::setNonKDECustomProperty(const QCString &name, const QStri -void CustomProperties::removeNonKDECustomProperty(const QCString &name) +void CustomProperties::removeNonKDECustomProperty(const Q3CString &name) { - QMap<QCString, QString>::Iterator it = mProperties.find(name); + QMap<Q3CString, QString>::Iterator it = mProperties.find(name); if (it != mProperties.end()) @@ -72,5 +74,5 @@ void CustomProperties::removeNonKDECustomProperty(const QCString &name) -QString CustomProperties::nonKDECustomProperty(const QCString &name) const +QString CustomProperties::nonKDECustomProperty(const Q3CString &name) const { - QMap<QCString, QString>::ConstIterator it = mProperties.find(name); + QMap<Q3CString, QString>::ConstIterator it = mProperties.find(name); if (it == mProperties.end()) @@ -80,5 +82,5 @@ QString CustomProperties::nonKDECustomProperty(const QCString &name) const -void CustomProperties::setCustomProperties(const QMap<QCString, QString> &properties) +void CustomProperties::setCustomProperties(const QMap<Q3CString, QString> &properties) { - for (QMap<QCString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { + for (QMap<Q3CString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { // Validate the property name and convert any null string to empty string @@ -90,3 +92,3 @@ void CustomProperties::setCustomProperties(const QMap<QCString, QString> &proper -QMap<QCString, QString> CustomProperties::customProperties() const +QMap<Q3CString, QString> CustomProperties::customProperties() const { @@ -95,3 +97,3 @@ QMap<QCString, QString> CustomProperties::customProperties() const -bool CustomProperties::checkName(const QCString &name) +bool CustomProperties::checkName(const Q3CString &name) { diff --git a/libkcal/customproperties.h b/libkcal/customproperties.h index 0cbfdcd..75eb3ad 100644 --- a/libkcal/customproperties.h +++ b/libkcal/customproperties.h @@ -25,2 +25,4 @@ #include <qmap.h> +//Added by qt3to4: +#include <Q3CString> @@ -51,3 +53,3 @@ class CustomProperties */ - void setCustomProperty(const QCString &app, const QCString &key, + void setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value); @@ -57,3 +59,3 @@ class CustomProperties */ - void removeCustomProperty(const QCString &app, const QCString &key); + void removeCustomProperty(const Q3CString &app, const Q3CString &key); /** Return the value of a custom calendar property. @@ -63,3 +65,3 @@ class CustomProperties */ - QString customProperty(const QCString &app, const QCString &key) const; + QString customProperty(const Q3CString &app, const Q3CString &key) const; @@ -70,3 +72,3 @@ class CustomProperties */ - void setNonKDECustomProperty(const QCString &name, const QString &value); + void setNonKDECustomProperty(const Q3CString &name, const QString &value); /** Delete a non-KDE or non-standard custom calendar property. @@ -74,3 +76,3 @@ class CustomProperties */ - void removeNonKDECustomProperty(const QCString &name); + void removeNonKDECustomProperty(const Q3CString &name); /** Return the value of a non-KDE or non-standard custom calendar property. @@ -79,3 +81,3 @@ class CustomProperties */ - QString nonKDECustomProperty(const QCString& name) const; + QString nonKDECustomProperty(const Q3CString& name) const; @@ -84,10 +86,10 @@ class CustomProperties */ - void setCustomProperties(const QMap<QCString, QString> &properties); + void setCustomProperties(const QMap<Q3CString, QString> &properties); /** Return all custom calendar property key/value pairs. */ - QMap<QCString, QString> customProperties() const; + QMap<Q3CString, QString> customProperties() const; private: - static bool checkName(const QCString& name); + static bool checkName(const Q3CString& name); - QMap<QCString, QString> mProperties; // custom calendar properties + QMap<Q3CString, QString> mProperties; // custom calendar properties }; diff --git a/libkcal/dndfactory.cpp b/libkcal/dndfactory.cpp index cdcfae4..ca7e212 100644 --- a/libkcal/dndfactory.cpp +++ b/libkcal/dndfactory.cpp @@ -24,2 +24,5 @@ #include <qclipboard.h> +//Added by qt3to4: +#include <QDropEvent> +#include <Q3PtrList> @@ -70,3 +73,3 @@ Event *DndFactory::createDrop(QDropEvent *de) - QPtrList<Event> events = cal.events(); + Q3PtrList<Event> events = cal.events(); if ( !events.isEmpty() ) { @@ -89,3 +92,3 @@ Todo *DndFactory::createDropTodo(QDropEvent *de) - QPtrList<Todo> todos = cal.todos(); + Q3PtrList<Todo> todos = cal.todos(); if ( !todos.isEmpty() ) { @@ -135,3 +138,3 @@ Incidence *DndFactory::pasteIncidence(const QDate &newDate, const QTime *newTime - QPtrList<Incidence> incList = cal.incidences(); + Q3PtrList<Incidence> incList = cal.incidences(); Incidence *inc = incList.first(); diff --git a/libkcal/dndfactory.h b/libkcal/dndfactory.h index 2df5259..a873c37 100644 --- a/libkcal/dndfactory.h +++ b/libkcal/dndfactory.h @@ -1 +1,3 @@ +//Added by qt3to4: +#include <QDropEvent> /* 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 @@ -27,2 +27,4 @@ #include "vcalformat.h" +//Added by qt3to4: +#include <QDropEvent> diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp index ae40e6d..73eb3d0 100644 --- a/libkcal/dummyscheduler.cpp +++ b/libkcal/dummyscheduler.cpp @@ -25,3 +25,5 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -70,4 +72,4 @@ bool DummyScheduler::saveMessage(const QString &message) QFile f("dummyscheduler.store"); - if (f.open(IO_WriteOnly | IO_Append)) { - QTextStream t(&f); + if (f.open(QIODevice::WriteOnly | QIODevice::Append)) { + Q3TextStream t(&f); t << message << endl; @@ -80,8 +82,8 @@ bool DummyScheduler::saveMessage(const QString &message) -QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() +Q3PtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() { - QPtrList<ScheduleMessage> messageList; + Q3PtrList<ScheduleMessage> messageList; QFile f("dummyscheduler.store"); - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { kdDebug(5800) << "DummyScheduler::retrieveTransactions(): Can't open file" @@ -89,3 +91,3 @@ QPtrList<ScheduleMessage> DummyScheduler::retrieveTransactions() } else { - QTextStream t(&f); + Q3TextStream t(&f); QString messageString; diff --git a/libkcal/dummyscheduler.h b/libkcal/dummyscheduler.h index df42153..f86d583 100644 --- a/libkcal/dummyscheduler.h +++ b/libkcal/dummyscheduler.h @@ -26,2 +26,4 @@ #include "scheduler.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -41,3 +43,3 @@ class DummyScheduler : public Scheduler { bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients); - QPtrList<ScheduleMessage> retrieveTransactions(); + Q3PtrList<ScheduleMessage> retrieveTransactions(); diff --git a/libkcal/event.cpp b/libkcal/event.cpp index fdf5657..060df81 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -386,3 +386,3 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { diff --git a/libkcal/event.h b/libkcal/event.h index 6a58618..da44f81 100644 --- a/libkcal/event.h +++ b/libkcal/event.h @@ -27,2 +27,4 @@ #include "incidence.h" +//Added by qt3to4: +#include <Q3CString> namespace KCal { @@ -42,3 +44,3 @@ class Event : public Incidence - QCString type() const { return "Event"; } + Q3CString type() const { return "Event"; } IncTypeID typeID() const { return eventID; } diff --git a/libkcal/filestorage.cpp b/libkcal/filestorage.cpp index a139124..3d1309f 100644 --- a/libkcal/filestorage.cpp +++ b/libkcal/filestorage.cpp @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp index ba15d6d..e4e9ec9 100644 --- a/libkcal/freebusy.cpp +++ b/libkcal/freebusy.cpp @@ -23,2 +23,5 @@ #include "freebusy.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> @@ -45,3 +48,3 @@ FreeBusy::FreeBusy( Calendar *calendar, const QDateTime &start, const QDateTime //Gets all the events in the calendar - QPtrList<Event> eventList = mCalendar->events(); + Q3PtrList<Event> eventList = mCalendar->events(); Event *event; @@ -115,3 +118,3 @@ QDateTime FreeBusy::dtEnd() const -QValueList<Period> FreeBusy::busyPeriods() const +Q3ValueList<Period> FreeBusy::busyPeriods() const { @@ -148,3 +151,3 @@ bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &even -FreeBusy::FreeBusy(QValueList<Period> busyPeriods) +FreeBusy::FreeBusy(Q3ValueList<Period> busyPeriods) { @@ -155,3 +158,3 @@ void FreeBusy::sortList() { - typedef QValueList<Period> PeriodList; + typedef Q3ValueList<Period> PeriodList; diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h index d741c72..bd14cb7 100644 --- a/libkcal/freebusy.h +++ b/libkcal/freebusy.h @@ -26,4 +26,6 @@ #include <qdatetime.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <q3valuelist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -45,3 +47,3 @@ class FreeBusy : public IncidenceBase FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end); - FreeBusy(QValueList<Period> busyPeriods); + FreeBusy(Q3ValueList<Period> busyPeriods); @@ -49,3 +51,3 @@ class FreeBusy : public IncidenceBase - QCString type() const { return "FreeBusy"; } + Q3CString type() const { return "FreeBusy"; } IncTypeID typeID() const { return freebusyID; } @@ -55,3 +57,3 @@ class FreeBusy : public IncidenceBase - QValueList<Period> busyPeriods() const; + Q3ValueList<Period> busyPeriods() const; @@ -66,3 +68,3 @@ class FreeBusy : public IncidenceBase QDateTime mDtEnd; - QValueList<Period> mBusyPeriods; + Q3ValueList<Period> mBusyPeriods; Calendar *mCalendar; diff --git a/libkcal/icaldrag.cpp b/libkcal/icaldrag.cpp index 446a115..7f5a796 100644 --- a/libkcal/icaldrag.cpp +++ b/libkcal/icaldrag.cpp @@ -30,3 +30,3 @@ using namespace KCal; ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/calendar", parent, name ) + : Q3StoredDrag( "text/calendar", parent, name ) { diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h index fdf32b7..c1f73f4 100644 --- a/libkcal/icaldrag.h +++ b/libkcal/icaldrag.h @@ -24,3 +24,3 @@ -#include <qdragobject.h> +#include <q3dragobject.h> #include "calendar.h" @@ -30,3 +30,3 @@ namespace KCal { /** iCalendar drag&drop class. */ -class ICalDrag : public QStoredDrag +class ICalDrag : public Q3StoredDrag { diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 6f3a799..3829bc1 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp @@ -22,3 +22,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -26,3 +26,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -72,3 +72,3 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { setException(new ErrorFormat(ErrorFormat::LoadError)); @@ -76,6 +76,6 @@ bool ICalFormat::load( Calendar *calendar, const QString &fileName) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); QString text; - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); text = ts.read(); @@ -100,3 +100,3 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName ) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, @@ -105,5 +105,5 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName ) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); ts << text; @@ -158,3 +158,3 @@ Incidence *ICalFormat::fromString( const QString &text ) Incidence *ical = 0; - QPtrList<Event> elist = cal.events(); + Q3PtrList<Event> elist = cal.events(); if ( elist.count() > 0 ) { @@ -162,3 +162,3 @@ Incidence *ICalFormat::fromString( const QString &text ) } else { - QPtrList<Todo> tlist = cal.todos(); + Q3PtrList<Todo> tlist = cal.todos(); if ( tlist.count() > 0 ) { @@ -166,3 +166,3 @@ Incidence *ICalFormat::fromString( const QString &text ) } else { - QPtrList<Journal> jlist = cal.journals(); + Q3PtrList<Journal> jlist = cal.journals(); if ( jlist.count() > 0 ) { @@ -174,3 +174,3 @@ Incidence *ICalFormat::fromString( const QString &text ) } -#include <qapp.h> +#include <qapplication.h> @@ -186,4 +186,4 @@ QString ICalFormat::toString( Calendar *cal ) // todos - QPtrList<Todo> todoList = cal->rawTodos(); - QPtrListIterator<Todo> qlt(todoList); + Q3PtrList<Todo> todoList = cal->rawTodos(); + Q3PtrListIterator<Todo> qlt(todoList); for (; qlt.current(); ++qlt) { @@ -198,3 +198,3 @@ QString ICalFormat::toString( Calendar *cal ) // events - QPtrList<Event> events = cal->rawEvents(); + Q3PtrList<Event> events = cal->rawEvents(); Event *ev; @@ -209,3 +209,3 @@ QString ICalFormat::toString( Calendar *cal ) // journals - QPtrList<Journal> journals = cal->journals(); + Q3PtrList<Journal> journals = cal->journals(); Journal *j; diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h index a770dbb..a454b35 100644 --- a/libkcal/icalformat.h +++ b/libkcal/icalformat.h @@ -23,2 +23,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3CString> @@ -108,3 +110,3 @@ class ICalFormat : public CalFormat { QString mTimeZoneId; - QCString mTzString; + Q3CString mTzString; int tzOffsetMin; diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 65eabc8..ea144ee 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -22,4 +22,7 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3CString> @@ -223,4 +226,4 @@ icalcomponent *ICalFormatImpl::writeFreeBusy(FreeBusy *freebusy, //Loops through all the periods in the freebusy object - QValueList<Period> list = freebusy->busyPeriods(); - QValueList<Period>::Iterator it; + Q3ValueList<Period> list = freebusy->busyPeriods(); + Q3ValueList<Period>::Iterator it; icalperiodtype period; @@ -386,3 +389,3 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) // attachments - QPtrList<Attachment> attachments = incidence->attachments(); + Q3PtrList<Attachment> attachments = incidence->attachments(); for (Attachment *at = attachments.first(); at; at = attachments.next()) @@ -391,3 +394,3 @@ void ICalFormatImpl::writeIncidence(icalcomponent *parent,Incidence *incidence) // alarms - QPtrList<Alarm> alarms = incidence->alarms(); + Q3PtrList<Alarm> alarms = incidence->alarms(); Alarm* alarm; @@ -425,4 +428,4 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc if (incidenceBase->attendeeCount() != 0) { - QPtrList<Attendee> al = incidenceBase->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = incidenceBase->attendees(); + Q3PtrListIterator<Attendee> ai(al); for (; ai.current(); ++ai) { @@ -438,4 +441,4 @@ void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomPropertie { - QMap<QCString, QString> custom = properties->customProperties(); - for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { + QMap<Q3CString, QString> custom = properties->customProperties(); + for (QMap<Q3CString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { icalproperty *p = icalproperty_new_x(c.data().utf8()); @@ -548,4 +551,4 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur) - QPtrList<Recurrence::rMonthPos> tmpPositions; - QPtrList<int> tmpDays; + Q3PtrList<Recurrence::rMonthPos> tmpPositions; + Q3PtrList<int> tmpDays; int *tmpDay; @@ -706,4 +709,4 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) action = ICAL_ACTION_EMAIL; - QValueList<Person> addresses = alarm->mailAddresses(); - for (QValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { + Q3ValueList<Person> addresses = alarm->mailAddresses(); + for (Q3ValueList<Person>::Iterator ad = addresses.begin(); ad != addresses.end(); ++ad) { icalproperty *p = icalproperty_new_attendee("MAILTO:" + (*ad).email().utf8()); @@ -765,4 +768,4 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) // Custom properties - QMap<QCString, QString> custom = alarm->customProperties(); - for (QMap<QCString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { + QMap<Q3CString, QString> custom = alarm->customProperties(); + for (QMap<Q3CString, QString>::Iterator c = custom.begin(); c != custom.end(); ++c) { icalproperty *p = icalproperty_new_x(c.data().utf8()); @@ -1341,3 +1344,3 @@ void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties { - QMap<QCString, QString> customProperties; + QMap<Q3CString, QString> customProperties; diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h index 203c302..3a35b4c 100644 --- a/libkcal/icalformatimpl.h +++ b/libkcal/icalformatimpl.h @@ -23,2 +23,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -95,4 +97,4 @@ class ICalFormatImpl { - QPtrList<Event> mEventsRelate; // events with relations - QPtrList<Todo> mTodosRelate; // todos with relations + Q3PtrList<Event> mEventsRelate; // events with relations + Q3PtrList<Todo> mTodosRelate; // todos with relations diff --git a/libkcal/imipscheduler.cpp b/libkcal/imipscheduler.cpp index e186f8e..e6d56a6 100644 --- a/libkcal/imipscheduler.cpp +++ b/libkcal/imipscheduler.cpp @@ -28,2 +28,4 @@ #include "imipscheduler.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -52,5 +54,5 @@ bool IMIPScheduler::performTransaction(IncidenceBase *incidence,Method method) -QPtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() +Q3PtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() { - QPtrList<ScheduleMessage> messageList; + Q3PtrList<ScheduleMessage> messageList; diff --git a/libkcal/imipscheduler.h b/libkcal/imipscheduler.h index f142060..5a2d38e 100644 --- a/libkcal/imipscheduler.h +++ b/libkcal/imipscheduler.h @@ -25,3 +25,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -42,3 +42,3 @@ class IMIPScheduler : public Scheduler { bool performTransaction(IncidenceBase *incidence,Method method); - QPtrList<ScheduleMessage> retrieveTransactions(); + Q3PtrList<ScheduleMessage> retrieveTransactions(); }; diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 7dd9bd2..8fcdc69 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -28,2 +28,4 @@ #include "todo.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -61,3 +63,3 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mExDates = i.mExDates; - QPtrListIterator<Attachment> itat( i.mAttachments ); + Q3PtrListIterator<Attachment> itat( i.mAttachments ); Attachment *at; @@ -75,3 +77,3 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mHasStartDate = i.mHasStartDate; - QPtrListIterator<Alarm> it( i.mAlarms ); + Q3PtrListIterator<Alarm> it( i.mAlarms ); const Alarm *a; @@ -100,3 +102,3 @@ Incidence::~Incidence() Incidence *ev; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (ev=Relations.first();ev;ev=Relations.next()) { @@ -218,4 +220,4 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) #if 0 - QPtrListIterator<Alarm> a1( i1.alarms() ); - QPtrListIterator<Alarm> a2( i2.alarms() ); + Q3PtrListIterator<Alarm> a1( i1.alarms() ); + Q3PtrListIterator<Alarm> a2( i2.alarms() ); for( ; a1.current() && a2.current(); ++a1, ++a2 ) { @@ -324,3 +326,3 @@ void Incidence::cloneRelations( Incidence * newInc ) Incidence * cloneInc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -358,3 +360,3 @@ QDateTime Incidence::lastModifiedSub() Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -449,3 +451,3 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -464,3 +466,3 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -552,3 +554,3 @@ Incidence *Incidence::relatedTo() const -QPtrList<Incidence> Incidence::relations() const +Q3PtrList<Incidence> Incidence::relations() const { @@ -557,6 +559,6 @@ QPtrList<Incidence> Incidence::relations() const -void Incidence::addRelationsToList(QPtrList<Incidence> *rel) +void Incidence::addRelationsToList(Q3PtrList<Incidence> *rel) { Incidence* inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { @@ -649,3 +651,3 @@ void Incidence::deleteAttachments(const QString& mime) -QPtrList<Attachment> Incidence::attachments() const +Q3PtrList<Attachment> Incidence::attachments() const { @@ -654,6 +656,6 @@ QPtrList<Attachment> Incidence::attachments() const -QPtrList<Attachment> Incidence::attachments(const QString& mime) const +Q3PtrList<Attachment> Incidence::attachments(const QString& mime) const { - QPtrList<Attachment> attachments; - QPtrListIterator<Attachment> it( mAttachments ); + Q3PtrList<Attachment> attachments; + Q3PtrListIterator<Attachment> it( mAttachments ); Attachment *at; @@ -739,3 +741,3 @@ QStringList Incidence::secrecyList() -QPtrList<Alarm> Incidence::alarms() const +Q3PtrList<Alarm> Incidence::alarms() const { @@ -773,3 +775,3 @@ bool Incidence::isAlarmEnabled() const Alarm* alarm; - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f89942f..2940129 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h @@ -27,3 +27,5 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -115,3 +117,3 @@ class Incidence : public IncidenceBase virtual void cloneRelations( Incidence * ); - void addRelationsToList(QPtrList<Incidence> *rel); + void addRelationsToList(Q3PtrList<Incidence> *rel); void clearRelations(); @@ -179,3 +181,3 @@ class Incidence : public IncidenceBase /** All events that are related to this event */ - QPtrList<Incidence> relations() const; + Q3PtrList<Incidence> relations() const; /** Add an event which is related to this event */ @@ -204,5 +206,5 @@ class Incidence : public IncidenceBase /** return list of all associated attachments */ - QPtrList<Attachment> attachments() const; + Q3PtrList<Attachment> attachments() const; /** find a list of attachments with this mime type */ - QPtrList<Attachment> attachments(const QString& mime) const; + Q3PtrList<Attachment> attachments(const QString& mime) const; @@ -237,3 +239,3 @@ class Incidence : public IncidenceBase /** All alarms that are associated with this incidence */ - QPtrList<Alarm> alarms() const; + Q3PtrList<Alarm> alarms() const; /** Create a new alarm which is associated with this incidence */ @@ -290,4 +292,4 @@ class Incidence : public IncidenceBase protected: - QPtrList<Alarm> mAlarms; - QPtrList<Incidence> mRelations; + Q3PtrList<Alarm> mAlarms; + Q3PtrList<Incidence> mRelations; QDateTime mRecurrenceID; @@ -310,3 +312,3 @@ protected: DateList mExDates; - QPtrList<Attachment> mAttachments; + Q3PtrList<Attachment> mAttachments; QStringList mResources; diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 56c0560..f11ec54 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -29,2 +29,4 @@ #include "incidencebase.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -66,3 +68,3 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) : mCalID = i.mCalID; - QPtrList<Attendee> attendees = i.attendees(); + Q3PtrList<Attendee> attendees = i.attendees(); for( Attendee *a = attendees.first(); a; a = attendees.next() ) { @@ -302,3 +304,3 @@ bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -345,3 +347,3 @@ Attendee *IncidenceBase::getAttendee(const char *n) const { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -359,3 +361,3 @@ Attendee *IncidenceBase::attendeeByMail(const QString &email) { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -372,3 +374,3 @@ Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QStrin { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); @@ -493,3 +495,3 @@ void IncidenceBase::updated() { - QPtrListIterator<Observer> it(mObservers); + Q3PtrListIterator<Observer> it(mObservers); while( it.current() ) { diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 3edc03b..d97f524 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h @@ -27,4 +27,6 @@ #include <qstringlist.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <q3valuelist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -35,3 +37,3 @@ namespace KCal { -typedef QValueList<QDate> DateList; +typedef Q3ValueList<QDate> DateList; enum IncTypeID { eventID,todoID,journalID,freebusyID }; @@ -53,3 +55,3 @@ class IncidenceBase : public CustomProperties - virtual QCString type() const = 0; + virtual Q3CString type() const = 0; virtual IncTypeID typeID() const = 0; @@ -111,3 +113,3 @@ class IncidenceBase : public CustomProperties /** Return list of attendees. */ - QPtrList<Attendee> attendees() const { return mAttendees; }; + Q3PtrList<Attendee> attendees() const { return mAttendees; }; /** Return number of attendees. */ @@ -170,3 +172,3 @@ class IncidenceBase : public CustomProperties QDateTime mLastModified; - QPtrList<Attendee> mAttendees; + Q3PtrList<Attendee> mAttendees; @@ -183,3 +185,3 @@ class IncidenceBase : public CustomProperties - QPtrList<Observer> mObservers; + Q3PtrList<Observer> mObservers; }; diff --git a/libkcal/journal.h b/libkcal/journal.h index 1cd0a22..c83356f 100644 --- a/libkcal/journal.h +++ b/libkcal/journal.h @@ -26,2 +26,4 @@ #include "incidence.h" +//Added by qt3to4: +#include <Q3CString> @@ -38,3 +40,3 @@ class Journal : public Incidence - QCString type() const { return "Journal"; } + Q3CString type() const { return "Journal"; } IncTypeID typeID() const { return journalID; } diff --git a/libkcal/kincidenceformatter.cpp b/libkcal/kincidenceformatter.cpp index 733b897..bce68b0 100644 --- a/libkcal/kincidenceformatter.cpp +++ b/libkcal/kincidenceformatter.cpp @@ -6,2 +6,4 @@ #include <kabc/stdaddressbook.h> +//Added by qt3to4: +#include <Q3PtrList> #define size count @@ -312,3 +314,3 @@ void KIncidenceFormatter::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; @@ -341,3 +343,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) { - QPtrList<Attendee> attendees = event->attendees(); + Q3PtrList<Attendee> attendees = event->attendees(); if (attendees.count()) { @@ -364,3 +366,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " <a href=\"mailto:" + event->organizer() + "\">"; @@ -404,3 +406,3 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; diff --git a/libkcal/libkcal.pro b/libkcal/libkcal.pro index 33c63c3..1f43b10 100644 --- a/libkcal/libkcal.pro +++ b/libkcal/libkcal.pro @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal @@ -108 +108,5 @@ dndfactory.cpp \ +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +QT += diff --git a/libkcal/libkcalE.pro b/libkcal/libkcalE.pro index 737be53..fe46656 100644 --- a/libkcal/libkcalE.pro +++ b/libkcal/libkcalE.pro @@ -2,3 +2,3 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal diff --git a/libkcal/listbase.h b/libkcal/listbase.h index 085b13d..6c942ef 100644 --- a/libkcal/listbase.h +++ b/libkcal/listbase.h @@ -23,3 +23,5 @@ -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -33,3 +35,3 @@ namespace KCal { template<class T> -class ListBase : public QValueList<T *> +class ListBase : public Q3ValueList<T *> { @@ -37,3 +39,3 @@ class ListBase : public QValueList<T *> ListBase() - : QValueList<T *>(), mAutoDelete( false ) + : Q3ValueList<T *>(), mAutoDelete( false ) { @@ -42,3 +44,3 @@ class ListBase : public QValueList<T *> ListBase( const ListBase &l ) - : QValueList<T *>( l ), mAutoDelete( false ) + : Q3ValueList<T *>( l ), mAutoDelete( false ) { @@ -49,4 +51,4 @@ class ListBase : public QValueList<T *> if ( mAutoDelete ) { - QValueListIterator<T *> it; - for( it = QValueList<T*>::begin(); it != QValueList<T*>::end(); ++it ) { + Q3ValueListIterator<T *> it; + for( it = Q3ValueList<T*>::begin(); it != Q3ValueList<T*>::end(); ++it ) { delete *it; @@ -59,3 +61,3 @@ class ListBase : public QValueList<T *> if ( this == &l ) return *this; - QValueList<T *>::operator=( l ); + Q3ValueList<T *>::operator=( l ); return *this; @@ -70,4 +72,4 @@ class ListBase : public QValueList<T *> { - QValueListIterator<T *> it = find( t ); - if ( it == QValueList<T*>::end() ) { + Q3ValueListIterator<T *> it = find( t ); + if ( it == Q3ValueList<T*>::end() ) { return false; @@ -79,4 +81,4 @@ class ListBase : public QValueList<T *> } - void fill ( QPtrList<T> list ) { - QPtrListIterator<T> it (list); + void fill ( Q3PtrList<T> list ) { + Q3PtrListIterator<T> it (list); T *item; diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 900fc04..794e4b4 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -24,3 +24,3 @@ #include <qapplication.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -29,3 +29,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -33,2 +33,3 @@ #include <qlabel.h> +#include <QDesktopWidget> @@ -203,3 +204,3 @@ ulong PhoneFormat::getCsumEvent( Event* event ) int count = 1; - QPtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<Recurrence::rMonthPos> rmp; rmp = rec->monthPositions(); @@ -243,3 +244,3 @@ ulong PhoneFormat::getCsumEvent( Event* event ) list.append( "1" ); - list.append( PhoneParser::dtToString( rec->endDate()) ); + list.append( PhoneParser::dtToString( (QDateTime)rec->endDate()) ); } else { @@ -307,3 +308,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) return false; - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); @@ -342,3 +343,3 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) qDebug("reading todos... "); - QPtrList<Todo> tr = calendar->rawTodos(); + Q3PtrList<Todo> tr = calendar->rawTodos(); Todo* ev = tr.first(); @@ -467,3 +468,3 @@ void PhoneFormat::copyTodo( Todo* to, Todo* from ) } -#include <qcstring.h> +#include <q3cstring.h> @@ -499,3 +500,3 @@ bool PhoneFormat::save( Calendar *calendar) // 1 remove events which should be deleted - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); @@ -510,3 +511,3 @@ bool PhoneFormat::save( Calendar *calendar) // 2 remove todos which should be deleted - QPtrList<Todo> tl = calendar->rawTodos(); + Q3PtrList<Todo> tl = calendar->rawTodos(); Todo* to = tl.first(); @@ -554,3 +555,3 @@ bool PhoneFormat::save( Calendar *calendar) message = i18n(" Comparing event # "); - QPtrList<Event> er1 = calendarTemp->rawEvents(); + Q3PtrList<Event> er1 = calendarTemp->rawEvents(); Event* ev1; @@ -582,3 +583,3 @@ bool PhoneFormat::save( Calendar *calendar) procCount = 0; - QPtrList<Todo> tl1 = calendarTemp->rawTodos(); + Q3PtrList<Todo> tl1 = calendarTemp->rawTodos(); Todo* to1 ; diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index 0a4a031..2dfe1a4 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -23,3 +23,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -27,3 +27,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qxml.h> @@ -311,3 +311,3 @@ bool QtopiaFormat::save( Calendar *calendar, const QString &fileName ) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, @@ -316,3 +316,3 @@ bool QtopiaFormat::save( Calendar *calendar, const QString &fileName ) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 6ee5499..9a4e540 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -31,2 +31,5 @@ #include "recurrence.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> @@ -58,3 +61,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) rWeekStart(r.rWeekStart), - rDays(r.rDays.copy()), + rDays(r.rDays), rFreq(r.rFreq), @@ -72,3 +75,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) { - for (QPtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { + for (Q3PtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { rMonthPos *tmp = new rMonthPos; @@ -76,6 +79,6 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) tmp->negative = mp.current()->negative; - tmp->rDays = mp.current()->rDays.copy(); + tmp->rDays = mp.current()->rDays; rMonthPositions.append(tmp); } - for (QPtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { + for (Q3PtrListIterator<int> md(r.rMonthDays); md.current(); ++md) { int *tmp = new int; @@ -84,3 +87,3 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) } - for (QPtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { + for (Q3PtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { int *tmp = new int; @@ -126,4 +129,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rMonthlyPos: { - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) @@ -135,4 +138,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rMonthlyDay: { - QPtrList<int> MonthDays = rMonthDays ; - QPtrList<int> MonthDays2 = r2.rMonthDays ; + Q3PtrList<int> MonthDays = rMonthDays ; + Q3PtrList<int> MonthDays2 = r2.rMonthDays ; if ( !MonthDays.count() ) @@ -145,8 +148,8 @@ bool Recurrence::operator==( const Recurrence& r2 ) const - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; if ( *YearNums.first() != *YearNums2.first() ) return false; - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) @@ -159,4 +162,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyMonth: { - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() && mFeb29YearlyType == r2.mFeb29YearlyType); @@ -164,4 +167,4 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyDay: { - QPtrList<int> YearNums = rYearNums; - QPtrList<int> YearNums2 = r2.rYearNums; + Q3PtrList<int> YearNums = rYearNums; + Q3PtrList<int> YearNums2 = r2.rYearNums; return ( *YearNums.first() == *YearNums2.first() ); @@ -359,3 +362,3 @@ QDateTime Recurrence::endDateTime() const case rDaily: - return dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); + return (QDateTime)dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); @@ -508,3 +511,3 @@ const QBitArray &Recurrence::days() const -const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const { @@ -513,3 +516,3 @@ const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const -const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const { @@ -518,3 +521,3 @@ const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const -const QPtrList<int> &Recurrence::monthDays() const +const Q3PtrList<int> &Recurrence::monthDays() const { @@ -761,3 +764,3 @@ void Recurrence::addYearlyMonthPos(short _rPos, const QBitArray &_rDays) -const QPtrList<int> &Recurrence::yearNums() const +const Q3PtrList<int> &Recurrence::yearNums() const { @@ -1049,3 +1052,3 @@ bool Recurrence::recursMonthly(const QDate &qd) const // The date queried falls within the range of the event. - QValueList<int> days; + Q3ValueList<int> days; int daysInMonth = qd.daysInMonth(); @@ -1055,3 +1058,3 @@ bool Recurrence::recursMonthly(const QDate &qd) const getMonthlyPosDays(days, daysInMonth, QDate(year, month, 1).dayOfWeek()); - for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) @@ -1103,3 +1106,3 @@ bool Recurrence::recursYearlyByMonth(const QDate &qd) const int i = qmonth; - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) @@ -1129,8 +1132,8 @@ bool Recurrence::recursYearlyByPos(const QDate &qd) const // The date queried falls within the range of the event. - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (month == *qlin.current()) { // The month recurs - QValueList<int> days; + Q3ValueList<int> days; getMonthlyPosDays(days, qd.daysInMonth(), QDate(year, month, 1).dayOfWeek()); - for (QValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { + for (Q3ValueList<int>::Iterator it = days.begin(); it != days.end(); ++it) { if (*it == day) @@ -1159,3 +1162,3 @@ bool Recurrence::recursYearlyByDay(const QDate &qd) const int i = qd.dayOfYear(); - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) @@ -1551,3 +1554,3 @@ int Recurrence::recurCalc(PeriodFunc func, QDate &enddate) const if (count == 0) - endtime = QDate(); + endtime = QDateTime(); else if (timed) @@ -1795,4 +1798,4 @@ struct Recurrence::MonthlyData { private: - QValueList<int> days28, days29, days30, days31; // recurring days in months of each length - QValueList<int> *recurDays[4]; + Q3ValueList<int> days28, days29, days30, days31; // recurring days in months of each length + Q3ValueList<int> *recurDays[4]; public: @@ -1807,3 +1810,3 @@ struct Recurrence::MonthlyData { } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { if (!varies) @@ -1812,3 +1815,3 @@ struct Recurrence::MonthlyData { int daysInMonth = startOfMonth.daysInMonth(); - QValueList<int>* days = recurDays[daysInMonth - 28]; + Q3ValueList<int>* days = recurDays[daysInMonth - 28]; if (recurrence->recurs == rMonthlyPos) @@ -1846,4 +1849,4 @@ int Recurrence::monthlyCalcEndDate(QDate &enddate, MonthlyData &data) const int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -1912,4 +1915,4 @@ int Recurrence::monthlyCalcToDate(const QDate &enddate, MonthlyData &data) const int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -1971,4 +1974,4 @@ int Recurrence::monthlyCalcNextAfter(QDate &enddate, MonthlyData &data) const int endYearMonth = endYear*12 + enddate.month() - 1; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); @@ -2054,4 +2057,4 @@ struct Recurrence::YearlyMonthData { private: - QValueList<int> months; // recurring months in non-leap years 1..12 - QValueList<int> leapMonths; // recurring months in leap years 1..12 + Q3ValueList<int> months; // recurring months in non-leap years 1..12 + Q3ValueList<int> leapMonths; // recurring months in leap years 1..12 public: @@ -2062,5 +2065,5 @@ struct Recurrence::YearlyMonthData { } - const QValueList<int>* monthList() const + const Q3ValueList<int>* monthList() const { return leapyear ? &leapMonths : &months; } - const QValueList<int>* leapMonthList() const { return &leapMonths; } + const Q3ValueList<int>* leapMonthList() const { return &leapMonths; } QDate date() const { return QDate(year, month, day); } @@ -2090,4 +2093,4 @@ int Recurrence::yearlyMonthCalcEndDate(QDate &enddate, YearlyMonthData &data) co int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); // get recurring months for this year + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); // get recurring months for this year @@ -2201,4 +2204,4 @@ int Recurrence::yearlyMonthCalcToDate(const QDate &enddate, YearlyMonthData &dat } - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); @@ -2272,4 +2275,4 @@ int Recurrence::yearlyMonthCalcNextAfter(QDate &enddate, YearlyMonthData &data) } - QValueList<int>::ConstIterator it; - const QValueList<int>* mons = data.monthList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* mons = data.monthList(); @@ -2392,3 +2395,3 @@ struct Recurrence::YearlyPosData { private: - mutable QValueList<int> days; + mutable Q3ValueList<int> days; public: @@ -2400,3 +2403,3 @@ struct Recurrence::YearlyPosData { } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { QDate startOfMonth(year, month, 1); @@ -2430,4 +2433,4 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const int countGone = 0; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2435,3 +2438,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2468,3 +2471,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2498,3 +2501,3 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // Check the last year in the recurrence. - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (static_cast<uint>(data.daysPerMonth) >= countTogo) { @@ -2533,4 +2536,4 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2538,3 +2541,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2578,3 +2581,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2613,3 +2616,3 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // Check the last year in the recurrence. - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2648,4 +2651,4 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons int endYearMonth = endYear*12 + endMonth; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; @@ -2655,3 +2658,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check the next year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2691,3 +2694,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check what remains of the start year - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { if (*im.current() >= data.month) { @@ -2736,3 +2739,3 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons // Check the last year in the recurrence - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); @@ -2810,3 +2813,3 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2848,3 +2851,3 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; @@ -2871,3 +2874,3 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2910,3 +2913,3 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { if (*it.current() > endDay) @@ -2930,3 +2933,3 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); @@ -2979,3 +2982,3 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; @@ -2997,3 +3000,3 @@ ex: // startDayOfWeek = day of week for first day of month. -void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int startDayOfWeek) const +void Recurrence::getMonthlyPosDays(Q3ValueList<int> &list, int daysInMonth, int startDayOfWeek) const { @@ -3003,3 +3006,3 @@ void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int s Q_UINT32 days = 0; - for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos - 1; // get 0-based week number @@ -3041,3 +3044,3 @@ int Recurrence::countMonthlyPosDays() const Q_UINT8 negative[4] = { 0, 0, 0, 0 }; - for (QPtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { + for (Q3PtrListIterator<rMonthPos> pos(rMonthPositions); pos.current(); ++pos) { int weeknum = pos.current()->rPos; @@ -3074,3 +3077,3 @@ int Recurrence::countMonthlyPosDays() const // Reply = true if day numbers varies from month to month. -bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const +bool Recurrence::getMonthlyDayDays(Q3ValueList<int> &list, int daysInMonth) const { @@ -3079,3 +3082,3 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const Q_UINT32 days = 0; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3108,3 +3111,3 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const // Reply = true if February 29th also recurs. -bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList<int> &leaplist) const +bool Recurrence::getYearlyMonthMonths(int day, Q3ValueList<int> &list, Q3ValueList<int> &leaplist) const { @@ -3113,3 +3116,3 @@ bool Recurrence::getYearlyMonthMonths(int day, QValueList<int> &list, QValueList bool feb29 = false; - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int month = *it.current(); @@ -3189,3 +3192,3 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const int minday = daysInMonth + 1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3203,5 +3206,5 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const QDate monthBegin(earliestDate.addDays(1 - earliestDay)); - QValueList<int> dayList; + Q3ValueList<int> dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) @@ -3226,3 +3229,3 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const int maxday = -1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); @@ -3240,5 +3243,5 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const QDate monthBegin(latestDate.addDays(1 - latestDay)); - QValueList<int> dayList; + Q3ValueList<int> dayList; getMonthlyPosDays(dayList, daysInMonth, monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) @@ -3258,3 +3261,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { @@ -3294,3 +3297,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int earliestYear = earliestDate.year(); @@ -3303,3 +3306,3 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { + for (Q3ValueList<int>::ConstIterator id = dayList.begin(); id != dayList.end(); ++id) { if (*id >= earliestDay) @@ -3331,3 +3334,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { @@ -3366,3 +3369,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int latestYear = latestDate.year(); @@ -3375,3 +3378,3 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const getMonthlyPosDays(dayList, monthBegin.daysInMonth(), monthBegin.dayOfWeek()); - for (QValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { + for (Q3ValueList<int>::ConstIterator id = dayList.fromLast(); id != dayList.end(); --id) { if (*id <= latestDay) diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h index b13d14f..5b5aab1 100644 --- a/libkcal/recurrence.h +++ b/libkcal/recurrence.h @@ -26,3 +26,5 @@ #include <qbitarray.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -250,5 +252,5 @@ class Recurrence /** Returns list of day positions in months. */ - const QPtrList<rMonthPos> &monthPositions() const; + const Q3PtrList<rMonthPos> &monthPositions() const; /** Returns list of day numbers of a month. */ - const QPtrList<int> &monthDays() const; + const Q3PtrList<int> &monthDays() const; @@ -281,5 +283,5 @@ class Recurrence /** Returns positions of days or months in year. */ - const QPtrList<int> &yearNums() const; + const Q3PtrList<int> &yearNums() const; /** Returns list of day positions in months, for a recursYearlyPos recurrence rule. */ - const QPtrList<rMonthPos> &yearMonthPositions() const; + const Q3PtrList<rMonthPos> &yearMonthPositions() const; /** Returns how yearly recurrences of February 29th are handled. */ @@ -296,4 +298,4 @@ class Recurrence QString recurrenceText() const; - bool getYearlyMonthMonths(int day, QValueList<int>&, - QValueList<int> &leaplist) const; + bool getYearlyMonthMonths(int day, Q3ValueList<int>&, + Q3ValueList<int> &leaplist) const; @@ -347,5 +349,5 @@ class Recurrence int countMonthlyPosDays() const; - void getMonthlyPosDays(QValueList<int>&, int daysInMonth, + void getMonthlyPosDays(Q3ValueList<int>&, int daysInMonth, int startDayOfWeek) const; - bool getMonthlyDayDays(QValueList<int>&, int daysInMonth) const; + bool getMonthlyDayDays(Q3ValueList<int>&, int daysInMonth) const; @@ -368,9 +370,9 @@ class Recurrence - QPtrList<rMonthPos> rMonthPositions; // list of positions during a month + Q3PtrList<rMonthPos> rMonthPositions; // list of positions during a month // on which an event recurs - QPtrList<int> rMonthDays; // list of days during a month on + Q3PtrList<int> rMonthDays; // list of days during a month on // which the event recurs - QPtrList<int> rYearNums; // either months/days to recur on for rYearly, + Q3PtrList<int> rYearNums; // either months/days to recur on for rYearly, // sorted in numerical order diff --git a/libkcal/scheduler.cpp b/libkcal/scheduler.cpp index 253d8b7..234cfcf 100644 --- a/libkcal/scheduler.cpp +++ b/libkcal/scheduler.cpp @@ -22,3 +22,5 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -266,4 +268,4 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status sta kdDebug(5800) << "Scheduler::acceptTransaction match found!" << endl; - QPtrList<Attendee> attendeesIn = incidence->attendees(); - QPtrList<Attendee> attendeesEv; + Q3PtrList<Attendee> attendeesIn = incidence->attendees(); + Q3PtrList<Attendee> attendeesEv; if (ev) attendeesEv = ev->attendees(); @@ -344,3 +346,3 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method) - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { kdDebug() << "acceptFreeBusy: Can't open:" << filename << " for writing" << endl; @@ -348,3 +350,3 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method) } - QTextStream t(&f); + Q3TextStream t(&f); t << messageText; diff --git a/libkcal/scheduler.h b/libkcal/scheduler.h index a9f43b9..357e98e 100644 --- a/libkcal/scheduler.h +++ b/libkcal/scheduler.h @@ -25,3 +25,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -97,3 +97,3 @@ class Scheduler { /** Retrieve incoming iTIP transactions */ - virtual QPtrList<ScheduleMessage> retrieveTransactions() = 0; + virtual Q3PtrList<ScheduleMessage> retrieveTransactions() = 0; diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp index 9b757f7..b8c2aa7 100644 --- a/libkcal/sharpformat.cpp +++ b/libkcal/sharpformat.cpp @@ -24,3 +24,3 @@ #include <qapplication.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -29,3 +29,3 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -368,3 +368,3 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -372,3 +372,3 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -390,3 +390,3 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) file.setName( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -477,3 +477,3 @@ bool SharpFormat::save( Calendar *calendar) QString command; - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); @@ -505,6 +505,6 @@ bool SharpFormat::save( Calendar *calendar) QFile fileIn( fileNameIn ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); @@ -519,3 +519,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -523,3 +523,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -546,3 +546,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -550,3 +550,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -564,3 +564,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -568,3 +568,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -582,3 +582,3 @@ bool SharpFormat::save( Calendar *calendar) qApp->processEvents(); - QPtrList<Todo> tl = calendar->rawTodos(); + Q3PtrList<Todo> tl = calendar->rawTodos(); Todo* to = tl.first(); @@ -607,6 +607,6 @@ bool SharpFormat::save( Calendar *calendar) QFile fileIn( fileNameIn ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); @@ -617,6 +617,6 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -644,3 +644,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -648,3 +648,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -662,3 +662,3 @@ bool SharpFormat::save( Calendar *calendar) QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; @@ -666,3 +666,3 @@ bool SharpFormat::save( Calendar *calendar) } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -785,3 +785,3 @@ QString SharpFormat::getEventString( Event* event ) int count = 1; - QPtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<Recurrence::rMonthPos> rmp; rmp = rec->monthPositions(); diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index cc1c5ae..5a0c32e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -625,3 +625,3 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { diff --git a/libkcal/todo.h b/libkcal/todo.h index 2131732..cea976c 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -28,2 +28,4 @@ #include <qtimer.h> +//Added by qt3to4: +#include <Q3CString> @@ -42,3 +44,3 @@ namespace KCal { typedef ListBase<Todo> List; - QCString type() const { return "Todo"; } + Q3CString type() const { return "Todo"; } IncTypeID typeID() const { return todoID; } diff --git a/libkcal/vcaldrag.cpp b/libkcal/vcaldrag.cpp index f01f332..324981e 100644 --- a/libkcal/vcaldrag.cpp +++ b/libkcal/vcaldrag.cpp @@ -28,3 +28,3 @@ using namespace KCal; VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/x-vCalendar", parent, name ) + : Q3StoredDrag( "text/x-vCalendar", parent, name ) { diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h index 3048124..68a320d 100644 --- a/libkcal/vcaldrag.h +++ b/libkcal/vcaldrag.h @@ -24,3 +24,3 @@ -#include <qdragobject.h> +#include <q3dragobject.h> @@ -32,3 +32,3 @@ class Calendar; /** vCalendar drag&drop class. */ -class VCalDrag : public QStoredDrag { +class VCalDrag : public Q3StoredDrag { public: diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 2e19740..9cbaf16 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -24,3 +24,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> @@ -29,2 +29,4 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3CString> @@ -110,4 +112,4 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName) // TODO STUFF - QPtrList<Todo> todoList = mCalendar->rawTodos(); - QPtrListIterator<Todo> qlt(todoList); + Q3PtrList<Todo> todoList = mCalendar->rawTodos(); + Q3PtrListIterator<Todo> qlt(todoList); for (; qlt.current(); ++qlt) { @@ -118,3 +120,3 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName) // EVENT STUFF - QPtrList<Event> events = mCalendar->rawEvents(); + Q3PtrList<Event> events = mCalendar->rawEvents(); Event *ev; @@ -140,3 +142,3 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text ) - QCString data = text.utf8(); + Q3CString data = text.utf8(); @@ -212,3 +214,3 @@ QString VCalFormat::toString( Calendar *calendar ) // TODO: Use all data. - QPtrList<Event> events = calendar->events(); + Q3PtrList<Event> events = calendar->events(); Event *event = events.first(); @@ -273,4 +275,4 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) if (anEvent->attendeeCount() != 0) { - QPtrList<Attendee> al = anEvent->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = anEvent->attendees(); + Q3PtrListIterator<Attendee> ai(al); Attendee *curAttendee; @@ -328,3 +330,3 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vtodo, VCRelatedToProp, @@ -357,3 +359,3 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) kdDebug(5800) << "vcalformat::eventToVTodo was called" << endl; - QPtrList<Alarm> alarms = anEvent->alarms(); + Q3PtrList<Alarm> alarms = anEvent->alarms(); Alarm* alarm; @@ -435,4 +437,4 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) if (anEvent->attendeeCount() != 0) { - QPtrList<Attendee> al = anEvent->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = anEvent->attendees(); + Q3PtrListIterator<Attendee> ai(al); Attendee *curAttendee; @@ -463,4 +465,4 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // some more variables - QPtrList<Recurrence::rMonthPos> tmpPositions; - QPtrList<int> tmpDays; + Q3PtrList<Recurrence::rMonthPos> tmpPositions; + Q3PtrList<int> tmpDays; int *tmpDay; @@ -547,3 +549,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) } else { - tmpStr += qDateTimeToISO(anEvent->recurrence()->endDate(), FALSE); + tmpStr += qDateTimeToISO((QDateTime)anEvent->recurrence()->endDate(), FALSE); } @@ -627,3 +629,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // TODO: handle binary attachments! - QPtrList<Attachment> attachments = anEvent->attachments(); + Q3PtrList<Attachment> attachments = anEvent->attachments(); for ( Attachment *at = attachments.first(); at; at = attachments.next() ) @@ -638,3 +640,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // alarm stuff - QPtrList<Alarm> alarms = anEvent->alarms(); + Q3PtrList<Alarm> alarms = anEvent->alarms(); Alarm* alarm; @@ -674,3 +676,3 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vevent, VCRelatedToProp, @@ -1410,3 +1412,3 @@ QString VCalFormat::qDateToISO(const QDate &qd) - ASSERT(qd.isValid()); + Q_ASSERT(qd.isValid()); @@ -1422,4 +1424,4 @@ QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu) - ASSERT(qdt.date().isValid()); - ASSERT(qdt.time().isValid()); + Q_ASSERT(qdt.date().isValid()); + Q_ASSERT(qdt.time().isValid()); if (zulu && !useLocalTime ) { @@ -1456,4 +1458,4 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr) - ASSERT(tmpDate.isValid()); - ASSERT(tmpTime.isValid()); + Q_ASSERT(tmpDate.isValid()); + Q_ASSERT(tmpTime.isValid()); QDateTime tmpDT(tmpDate, tmpTime); @@ -1650,3 +1652,3 @@ Attendee::Role VCalFormat::readRole(const char *s) const -QCString VCalFormat::writeRole(Attendee::Role role) const +Q3CString VCalFormat::writeRole(Attendee::Role role) const { @@ -1688,3 +1690,3 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const -QCString VCalFormat::writeStatus(Attendee::PartStat status) const +Q3CString VCalFormat::writeStatus(Attendee::PartStat status) const { diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h index 6dae3d2..cac9634 100644 --- a/libkcal/vcalformat.h +++ b/libkcal/vcalformat.h @@ -25,2 +25,5 @@ #include "calformat.h" +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> @@ -97,6 +100,6 @@ class VCalFormat : public CalFormat { int numFromDay(const QString &day); - Attendee::Role VCalFormat::readRole(const char *s) const; - QCString writeRole(Attendee::Role role) const; + Attendee::Role readRole(const char *s) const; + Q3CString writeRole(Attendee::Role role) const; Attendee::PartStat readStatus(const char *s) const; - QCString writeStatus(Attendee::PartStat status) const; + Q3CString writeStatus(Attendee::PartStat status) const; @@ -106,4 +109,4 @@ class VCalFormat : public CalFormat { - QPtrList<Event> mEventsRelate; // events with relations - QPtrList<Todo> mTodosRelate; // todos with relations + Q3PtrList<Event> mEventsRelate; // events with relations + Q3PtrList<Todo> mTodosRelate; // todos with relations }; diff --git a/libkdepim/categoryeditdialog.cpp b/libkdepim/categoryeditdialog.cpp index e2325d2..92a1737 100644 --- a/libkdepim/categoryeditdialog.cpp +++ b/libkdepim/categoryeditdialog.cpp @@ -25,6 +25,7 @@ #include <qlineedit.h> -#include <qlistview.h> -#include <qheader.h> +#include <q3listview.h> +#include <q3header.h> #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> @@ -38,3 +39,3 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, const char* name, bool modal, - WFlags fl ) + Qt::WFlags fl ) : CategoryEditDialog_base( parent, name, modal, fl ), @@ -48,3 +49,3 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, it != mPrefs->mCustomCategories.end(); ++it ) { - new QListViewItem(mCategories,*it); + new Q3ListViewItem(mCategories,*it); categoriesExist=true; @@ -52,4 +53,4 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, - connect(mCategories,SIGNAL(selectionChanged(QListViewItem *)), - SLOT(editItem(QListViewItem *))); + connect(mCategories,SIGNAL(selectionChanged(Q3ListViewItem *)), + SLOT(editItem(Q3ListViewItem *))); connect(mEdit,SIGNAL(textChanged ( const QString & )),this,SLOT(slotTextChanged(const QString &))); @@ -84,3 +85,3 @@ void CategoryEditDialog::add() if (!mEdit->text().isEmpty()) { - new QListViewItem(mCategories,mEdit->text()); + new Q3ListViewItem(mCategories,mEdit->text()); mEdit->setText(""); @@ -123,3 +124,3 @@ void CategoryEditDialog::slotApply() - QListViewItem *item = mCategories->firstChild(); + Q3ListViewItem *item = mCategories->firstChild(); while(item) { @@ -133,3 +134,3 @@ void CategoryEditDialog::slotApply() -void CategoryEditDialog::editItem(QListViewItem *item) +void CategoryEditDialog::editItem(Q3ListViewItem *item) { diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h index 9bb3201..828894f 100644 --- a/libkdepim/categoryeditdialog.h +++ b/libkdepim/categoryeditdialog.h @@ -26,3 +26,3 @@ #include <categoryeditdialog_base.h> -#include <qlistview.h> +#include <q3listview.h> @@ -32,3 +32,3 @@ namespace KPIM { - class CategorySelectItem :public QObject, public QCheckListItem + class CategorySelectItem :public QObject, public Q3CheckListItem { @@ -38,4 +38,4 @@ namespace KPIM { - CategorySelectItem(QListView * parent, const QString & text, Type tt) : QObject( parent ), - QCheckListItem (parent, text, tt ) + CategorySelectItem(Q3ListView * parent, const QString & text, Type tt) : QObject( parent ), + Q3CheckListItem (parent, text, tt ) {;} @@ -43,3 +43,3 @@ namespace KPIM { signals: - void stateChanged( QListViewItem*); + void stateChanged( Q3ListViewItem*); @@ -49,3 +49,3 @@ namespace KPIM { { - QCheckListItem::stateChange(b); + Q3CheckListItem::stateChange(b); emit stateChanged( this ); @@ -61,3 +61,3 @@ class CategoryEditDialog : public CategoryEditDialog_base const char* name = 0, - bool modal = FALSE, WFlags fl = 0 ); + bool modal = FALSE, Qt::WFlags fl = 0 ); ~CategoryEditDialog(); @@ -77,5 +77,5 @@ class CategoryEditDialog : public CategoryEditDialog_base private slots: - void editItem(QListViewItem *item); + void editItem(Q3ListViewItem *item); void slotTextChanged(const QString &text); - + private: KPimPrefs *mPrefs; 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 @@ -13,5 +13,5 @@ #include <qvariant.h> -#include <qheader.h> +#include <q3header.h> #include <qlineedit.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -19,3 +19,7 @@ #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -28,3 +32,3 @@ */ -CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) +CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, name, true, fl ) @@ -34,3 +38,3 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n setName( "CategoryEditDialog_base" ); - CategoryEditDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout"); + CategoryEditDialog_baseLayout = new Q3GridLayout( this, 1, 1, 11, 6, "CategoryEditDialog_baseLayout"); @@ -40,3 +44,3 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n - Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13"); + Layout13 = new Q3HBoxLayout( 0, 0, 6, "Layout13"); @@ -62,3 +66,3 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n - mCategories = new QListView( this, "mCategories" ); + mCategories = new Q3ListView( this, "mCategories" ); mCategories->addColumn( tr2i18n( "Category" ) ); @@ -67,3 +71,3 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n - layout103 = new QVBoxLayout( 0, 0, 6, "layout103"); + layout103 = new Q3VBoxLayout( 0, 0, 6, "layout103"); 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 @@ -14,9 +14,13 @@ #include <qdialog.h> - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> +#include <Q3HBoxLayout> + +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; class QLineEdit; -class QListView; -class QListViewItem; +class Q3ListView; +class Q3ListViewItem; class QPushButton; @@ -28,3 +32,3 @@ class CategoryEditDialog_base : public QDialog public: - CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + CategoryEditDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~CategoryEditDialog_base(); @@ -36,3 +40,3 @@ public: QPushButton* mButtonCancel; - QListView* mCategories; + Q3ListView* mCategories; QPushButton* mButtonAdd; @@ -49,5 +53,5 @@ public slots: protected: - QGridLayout* CategoryEditDialog_baseLayout; - QHBoxLayout* Layout13; - QVBoxLayout* layout103; + Q3GridLayout* CategoryEditDialog_baseLayout; + Q3HBoxLayout* Layout13; + Q3VBoxLayout* layout103; diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index 2a9b43e..4f72880 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -23,7 +23,10 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> -#include <qheader.h> -#include <qapp.h> +#include <q3header.h> +#include <qapplication.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <QPixmap> +#include <QDesktopWidget> #include <kmessagebox.h> @@ -40,3 +43,3 @@ CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, const char* name, - bool modal, WFlags fl ) + bool modal, Qt::WFlags fl ) : CategorySelectDialog_base( parent, name, true, fl ), @@ -83,4 +86,4 @@ void CategorySelectDialog::setCategories() it != mPrefs->mCustomCategories.end(); ++it ) { - CategorySelectItem * item = new CategorySelectItem(mCategories,*it,QCheckListItem::CheckBox); - QObject::connect( item, SIGNAL( stateChanged(QListViewItem *) ), this, SLOT( clicked(QListViewItem *) ) ); + CategorySelectItem * item = new CategorySelectItem(mCategories,*it,Q3CheckListItem::CheckBox); + QObject::connect( item, SIGNAL( stateChanged(Q3ListViewItem *) ), this, SLOT( clicked(Q3ListViewItem *) ) ); @@ -102,3 +105,3 @@ void CategorySelectDialog::setSelected(const QStringList &selList) //qDebug(" CategorySelectDialog::setSelected("); - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); while (item) { @@ -111,3 +114,3 @@ void CategorySelectDialog::setSelected(const QStringList &selList) } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } @@ -139,3 +142,3 @@ void CategorySelectDialog::setColorCat() { - QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem (); + Q3CheckListItem * newColorItem = (Q3CheckListItem * )mCategories->currentItem (); if ( !newColorItem ) { @@ -149,3 +152,3 @@ void CategorySelectDialog::setColorCat() } -void CategorySelectDialog::clicked ( QListViewItem * it ) +void CategorySelectDialog::clicked ( Q3ListViewItem * it ) { @@ -153,6 +156,6 @@ void CategorySelectDialog::clicked ( QListViewItem * it ) return; - QCheckListItem *i = (QCheckListItem *) it; + Q3CheckListItem *i = (Q3CheckListItem *) it; if ( !i->isOn() && i==mColorItem) { setColorItem( 0); - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); while (item) { @@ -162,3 +165,3 @@ void CategorySelectDialog::clicked ( QListViewItem * it ) } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } @@ -168,3 +171,3 @@ void CategorySelectDialog::clicked ( QListViewItem * it ) } -void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem ) +void CategorySelectDialog::setColorItem( Q3CheckListItem * newColorItem ) { @@ -188,3 +191,3 @@ void CategorySelectDialog::slotApply() QStringList categories; - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); QString colcat; @@ -197,3 +200,3 @@ void CategorySelectDialog::slotApply() } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } @@ -222,6 +225,6 @@ void CategorySelectDialog::clear() { - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); while (item) { item->setOn(false); - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } @@ -232,3 +235,3 @@ void CategorySelectDialog::updateCategoryConfig() QStringList selected; - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); while (item) { @@ -237,3 +240,3 @@ void CategorySelectDialog::updateCategoryConfig() } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } diff --git a/libkdepim/categoryselectdialog.h b/libkdepim/categoryselectdialog.h index 680a093..ff7ac58 100644 --- a/libkdepim/categoryselectdialog.h +++ b/libkdepim/categoryselectdialog.h @@ -28,3 +28,3 @@ class KPimPrefs; -class QCheckListItem; +class Q3CheckListItem; @@ -38,3 +38,3 @@ class CategorySelectDialog : public CategorySelectDialog_base const char* name = 0, - bool modal = FALSE, WFlags fl = 0 ); + bool modal = FALSE, Qt::WFlags fl = 0 ); ~CategorySelectDialog(); @@ -55,3 +55,3 @@ class CategorySelectDialog : public CategorySelectDialog_base void setColorCat(); - void clicked ( QListViewItem * ); + void clicked ( Q3ListViewItem * ); signals: @@ -65,4 +65,4 @@ class CategorySelectDialog : public CategorySelectDialog_base QStringList mCategoryList; - QCheckListItem *mColorItem; - void setColorItem( QCheckListItem * ); + Q3CheckListItem *mColorItem; + void setColorItem( Q3CheckListItem * ); 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 @@ -13,4 +13,4 @@ #include <qvariant.h> -#include <qheader.h> -#include <qlistview.h> +#include <q3header.h> +#include <q3listview.h> #include <qpushbutton.h> @@ -18,3 +18,6 @@ #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3HBoxLayout> @@ -27,3 +30,3 @@ */ -CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl ) +CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog( parent, name, modal, fl ) @@ -33,5 +36,5 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha setName( "CategorySelectDialog_base" ); - CategorySelectDialog_baseLayout = new QVBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout"); + CategorySelectDialog_baseLayout = new Q3VBoxLayout( this, 11, 6, "CategorySelectDialog_baseLayout"); - mCategories = new QListView( this, "mCategories" ); + mCategories = new Q3ListView( this, "mCategories" ); mCategories->addColumn( i18n( "Category" ) ); @@ -40,3 +43,3 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha CategorySelectDialog_baseLayout->addWidget( mSetColorCat ); - Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12"); + Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12"); @@ -51,3 +54,3 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha - Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11"); + Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11"); 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 @@ -14,8 +14,12 @@ #include <qdialog.h> - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QListView; -class QListViewItem; +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> +#include <Q3HBoxLayout> + +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; +class Q3ListView; +class Q3ListViewItem; class QPushButton; @@ -27,6 +31,6 @@ class CategorySelectDialog_base : public QDialog public: - CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + CategorySelectDialog_base( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~CategorySelectDialog_base(); - QListView* mCategories; + Q3ListView* mCategories; QPushButton* mClear; @@ -45,5 +49,5 @@ public slots: protected: - QVBoxLayout* CategorySelectDialog_baseLayout; - QHBoxLayout* Layout12; - QHBoxLayout* Layout11; + Q3VBoxLayout* CategorySelectDialog_baseLayout; + Q3HBoxLayout* Layout12; + Q3HBoxLayout* Layout11; diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index f376e6c..3fc548a 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -41,3 +41,5 @@ $Id$ #include <qapplication.h> -#include <qprocess.h> +#include <q3process.h> +//Added by qt3to4: +#include <Q3CString> #endif @@ -125,3 +127,3 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel) /*********************************************************************************/ -bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) +bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data ) { @@ -148,3 +150,3 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); @@ -228,3 +230,3 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap<QSt /*********************************************************************************/ -bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) +bool QCopMapTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data ) { @@ -234,3 +236,3 @@ bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& da { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); @@ -307,3 +309,3 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString /*********************************************************************************/ -bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) +bool QCopListTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data ) { @@ -316,3 +318,3 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); @@ -520,5 +522,5 @@ void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& la -QList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) +Q3PtrList<DefaultAppItem> ExternalAppHandler::getAvailableDefaultItems(Types type) { - QList<DefaultAppItem> list; + Q3PtrList<DefaultAppItem> list; @@ -748,3 +750,3 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS //KMessageBox::sorry( 0, message2 ); - QProcess * proc = new QProcess( this ); + Q3Process * proc = new Q3Process( this ); int i = 0; @@ -774,3 +776,3 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS proc->addArgument( arg); - proc->launch(""); + proc->launch(QString()); #endif @@ -833,3 +835,3 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e //KMessageBox::sorry( 0,channel ); - QProcess * proc = new QProcess( this ); + Q3Process * proc = new Q3Process( this ); proc->addArgument( channel ); @@ -852,3 +854,3 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e proc->addArgument( parameters ); - proc->launch(""); + proc->launch(QString()); #endif @@ -1234,3 +1236,3 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete -void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) +void ExternalAppHandler::appMessage( const Q3CString& cmsg, const QByteArray& data ) { diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index b899ad7..3247fe4 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h @@ -36,2 +36,5 @@ $Id$ #include <qmap.h> +#include <Q3PtrList> +//Added by qt3to4: +#include <Q3CString> @@ -52,3 +55,3 @@ class QCopTransferItem : public QObject - virtual bool appMessage( const QCString& msg, const QByteArray& data ); + virtual bool appMessage( const Q3CString& msg, const QByteArray& data ); @@ -85,3 +88,3 @@ class QCopMapTransferItem : public QCopTransferItem - virtual bool appMessage( const QCString& msg, const QByteArray& data ); + virtual bool appMessage( const Q3CString& msg, const QByteArray& data ); @@ -106,3 +109,3 @@ class QCopListTransferItem : public QCopTransferItem - virtual bool appMessage( const QCString& msg, const QByteArray& data ); + virtual bool appMessage( const Q3CString& msg, const QByteArray& data ); @@ -227,3 +230,3 @@ class ExternalAppHandler : public QObject - QList<DefaultAppItem> getAvailableDefaultItems(Types); + Q3PtrList<DefaultAppItem> getAvailableDefaultItems(Types); DefaultAppItem* getDefaultItem(Types, int); @@ -231,3 +234,3 @@ class ExternalAppHandler : public QObject public slots: - void appMessage( const QCString& msg, const QByteArray& data ); + void appMessage( const Q3CString& msg, const QByteArray& data ); @@ -264,3 +267,3 @@ class ExternalAppHandler : public QObject ExternalAppHandler(); - QList<DefaultAppItem> mDefaultItems; + Q3PtrList<DefaultAppItem> mDefaultItems; 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 @@ -32,2 +32,4 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -56,3 +58,3 @@ KCMKdePimConfig::KCMKdePimConfig(QWidget *parent, const char *name ) //abort(); - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mConfigWidget = new KDEPIMConfigWidget( (KPimGlobalPrefs*)getPreferences(), this, "KDEPIMConfigWidget" ); 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 @@ -33,9 +33,9 @@ $Id$ #include <qcombobox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlineedit.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qdir.h> @@ -43,2 +43,7 @@ $Id$ #include <qspinbox.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3VBoxLayout> @@ -103,3 +108,3 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); @@ -123,6 +128,6 @@ void KDEPIMConfigWidget::setupBackupTab() { - QVBox *colorPage = new QVBox( this ); + Q3VBox *colorPage = new Q3VBox( this ); tabWidget->addTab( colorPage, i18n( "Backup" ) ); QWidget* topFrame = new QWidget( colorPage ); - QVBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3VBoxLayout *topLayout = new Q3VBoxLayout(topFrame); KPrefsWidBool *sb = addWidBool(i18n("Backup enabled"), @@ -133,3 +138,3 @@ void KDEPIMConfigWidget::setupBackupTab() QObject::connect ( sb->checkBox(), SIGNAL (toggled ( bool ) ), bupFrame, SLOT ( setEnabled( bool ) ) ); - QVBoxLayout *bupLayout = new QVBoxLayout(bupFrame); + Q3VBoxLayout *bupLayout = new Q3VBoxLayout(bupFrame); sb = addWidBool(i18n("Use standard backup dir"), @@ -145,3 +150,3 @@ void KDEPIMConfigWidget::setupBackupTab() bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); - QHBox *dummy = new QHBox(bupFrame); + Q3HBox *dummy = new Q3HBox(bupFrame); new QLabel(i18n("Number of Backups:"),dummy); @@ -151,3 +156,3 @@ void KDEPIMConfigWidget::setupBackupTab() - dummy = new QHBox(bupFrame); + dummy = new Q3HBox(bupFrame); new QLabel(i18n("Make backup every "),dummy); @@ -169,3 +174,3 @@ void KDEPIMConfigWidget::setupStoreTab() { - QVBox *colorPage = new QVBox( this ); + Q3VBox *colorPage = new Q3VBox( this ); tabWidget->addTab( colorPage, i18n( "Colors" ) ); @@ -175,3 +180,3 @@ void KDEPIMConfigWidget::setupStoreTab() &(KPimGlobalPrefs::instance()->mAlternateColor),cw); - QHBoxLayout *topLayout = new QHBoxLayout(cw); + Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw); topLayout->addWidget(holidayColor->label()); @@ -180,3 +185,3 @@ void KDEPIMConfigWidget::setupStoreTab() - QVBox *storePage = new QVBox( this ); + Q3VBox *storePage = new Q3VBox( this ); if ( QApplication::desktop()->height() > 240 ) @@ -202,3 +207,3 @@ void KDEPIMConfigWidget::setupStoreTab() new QLabel( i18n("New dirs are created automatically"), storePage ); - QHBox *bb = new QHBox( storePage ); + Q3HBox *bb = new Q3HBox( storePage ); QPushButton * pb; @@ -272,3 +277,3 @@ void KDEPIMConfigWidget::setupExternalAppTab() QWidget *externalAppsPage = new QWidget( this ); - QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), + Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -287,4 +292,4 @@ void KDEPIMConfigWidget::setupExternalAppTab() - mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); - QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); + mExternalAppGroupBox = new Q3GroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); + Q3GridLayout *boxLayout = new Q3GridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); mExternalAppGroupBox->layout()->setMargin(4); @@ -354,3 +359,3 @@ void KDEPIMConfigWidget::setupLocaleDateTab() QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); + Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2); @@ -422,3 +427,3 @@ void KDEPIMConfigWidget::setupLocaleTab() QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); @@ -444,3 +449,3 @@ void KDEPIMConfigWidget::setupLocaleTab() topFrame = new QWidget( this ); - topLayout = new QGridLayout(topFrame,4,2); + topLayout = new Q3GridLayout(topFrame,4,2); @@ -473,3 +478,3 @@ void KDEPIMConfigWidget::setupTimeZoneTab() QWidget *topFrame; - QGridLayout *topLayout ; + Q3GridLayout *topLayout ; @@ -481,3 +486,3 @@ void KDEPIMConfigWidget::setupTimeZoneTab() topFrame = new QWidget( this ); - topLayout = new QGridLayout( topFrame, 5, 2); + topLayout = new Q3GridLayout( topFrame, 5, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); @@ -485,3 +490,3 @@ void KDEPIMConfigWidget::setupTimeZoneTab() - QHBox *timeZoneBox = new QHBox( topFrame ); + Q3HBox *timeZoneBox = new Q3HBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); @@ -552,3 +557,3 @@ void KDEPIMConfigWidget::setupTimeZoneTab() topFrame = new QWidget( this ); - topLayout = new QGridLayout( topFrame, 3, 2); + topLayout = new Q3GridLayout( topFrame, 3, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); @@ -713,3 +718,3 @@ void KDEPIMConfigWidget::updateClientWidgets() - QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); + Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); DefaultAppItem* dai; 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 @@ -36,2 +36,4 @@ $Id$ #include <qmap.h> +//Added by qt3to4: +#include <QLabel> @@ -43,3 +45,3 @@ class QLineEdit; class KPimGlobalPrefs; -class QGroupBox; +class Q3GroupBox; class QTabWidget; @@ -108,3 +110,3 @@ class KDEPIMConfigWidget : public KPrefsWidget QComboBox* mExternalApps; - QGroupBox* mExternalAppGroupBox; + Q3GroupBox* mExternalAppGroupBox; diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index bf38479..28c88d4 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp @@ -29,2 +29,5 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3Frame> +#include <QKeyEvent> @@ -38,2 +41,3 @@ #include <qpalette.h> +#include <QDesktopWidget> @@ -43,3 +47,3 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) - : QHBox(parent, name) + : Q3HBox(parent, name) { @@ -74,5 +78,5 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) - mDateFrame = new QVBox(0,0,WType_Popup); + mDateFrame = new Q3VBox(0,0,Qt::WType_Popup); // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); - mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); + mDateFrame->setFrameStyle( Q3Frame::WinPanel |Q3Frame::Raised ); mDateFrame->setLineWidth(3); @@ -88,3 +92,3 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); - mDateButton->setFocusPolicy( QWidget::NoFocus ); + mDateButton->setFocusPolicy( Qt::NoFocus ); mDateButton->setAutoDefault( false ); @@ -227,6 +231,6 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm case 'A': - if(key == Key_Up) { + if(key == Qt::Key_Up) { setDate( date.addDays( 1 ) ); } - else if(key == Key_Down) { + else if(key == Qt::Key_Down) { setDate( date.addDays( -1 ) ); @@ -238,3 +242,3 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm case 'B': - if(key == Key_Up) { + if(key == Qt::Key_Up) { int year = ((date.month()+1)>12)?date.year()+1:date.year(); @@ -243,3 +247,3 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm setDate( QDate( year, month, day ) ); - } else if(key == Key_Down) { + } else if(key == Qt::Key_Down) { int year = ((date.month()-1)<1)?date.year()-1:date.year(); @@ -252,6 +256,6 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm case 'Y': - if(key == Key_Up) { + if(key == Qt::Key_Up) { setDate( QDate( date.year() + 1, date.month() , date.day()) ); } - else if(key == Key_Down) { + else if(key == Qt::Key_Down) { setDate( QDate( date.year() - 1, date.month() , date.day()) ); @@ -346,8 +350,8 @@ void KDateEdit::keyPressEvent(QKeyEvent *e) { - case Key_Escape: + case Qt::Key_Escape: mDateEdit->deselect(); - case Key_Tab: - QHBox::keyPressEvent(e); + case Qt::Key_Tab: + Q3HBox::keyPressEvent(e); break; - case Key_Up: + case Qt::Key_Up: // when date invalid then set to currend and return @@ -362,5 +366,5 @@ void KDateEdit::keyPressEvent(QKeyEvent *e) } - setDate(date, &cpos, Key_Up, dateFormShort); + setDate(date, &cpos, Qt::Key_Up, dateFormShort); break; - case Key_Down: + case Qt::Key_Down: // when date invalid then set to current and return @@ -375,6 +379,6 @@ void KDateEdit::keyPressEvent(QKeyEvent *e) } - setDate(date, &cpos, Key_Down, dateFormShort); + setDate(date, &cpos, Qt::Key_Down, dateFormShort); break; default: - QHBox::keyPressEvent(e); + Q3HBox::keyPressEvent(e); break; diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h index 2d8c452..38eacde 100644 --- a/libkdepim/kdateedit.h +++ b/libkdepim/kdateedit.h @@ -26,6 +26,9 @@ -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qdatetime.h> #include <qmap.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <QEvent> @@ -51,3 +54,3 @@ class KDateValidator; */ -class KDateEdit : public QHBox +class KDateEdit : public Q3HBox { @@ -130,3 +133,3 @@ class KDateEdit : public QHBox KDatePicker *mDatePicker; - QVBox *mDateFrame; + Q3VBox *mDateFrame; int maxDay; diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 68ef943..28b65cf 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -25,3 +25,3 @@ #include <kiconloader.h> -#include <qframe.h> +#include <q3frame.h> #include <qpainter.h> @@ -33,2 +33,6 @@ #include <qvalidator.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QKeyEvent> +#include <QDesktopWidget> #include <kdebug.h> @@ -42,3 +46,3 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) - : QFrame(parent,name), + : Q3Frame(parent,name), yearForward(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 @@ -22,4 +22,7 @@ #include <qdatetime.h> -#include <qframe.h> +#include <q3frame.h> #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QKeyEvent> @@ -50,3 +53,3 @@ class KDateEdit; **/ -class KDatePicker: public QFrame +class KDatePicker: public Q3Frame { diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 9c28425..3677e87 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -40,3 +40,3 @@ $Id$ #include <stdlib.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qapplication.h> @@ -144,5 +144,5 @@ void KPimGlobalPrefs::setGlobalConfig() QFile file( fileName ); - if (file.open( IO_ReadOnly ) ) { - QTextStream ts( &file ); - ts.setEncoding( QTextStream::Latin1 ); + if (file.open( QIODevice::ReadOnly ) ) { + Q3TextStream ts( &file ); + ts.setEncoding( Q3TextStream::Latin1 ); //ts.setCodec( QTextCodec::latin1 ); @@ -160,3 +160,3 @@ void KPimGlobalPrefs::setGlobalConfig() int se, ee, st, et; - mLocaleDict = new QDict<QString>; + mLocaleDict = new Q3Dict<QString>; mLocaleDict->setAutoDelete( true ); diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index 94ac8ae..01f5ab0 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -34,3 +34,3 @@ $Id$ #include "kprefs.h" -#include <qdict.h> +#include <q3dict.h> @@ -87,3 +87,3 @@ class KPimGlobalPrefs : public KPrefs static KPimGlobalPrefs *sInstance; - QDict<QString> *mLocaleDict; + Q3Dict<QString> *mLocaleDict; diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp index 6dc741d..358acbd 100644 --- a/libkdepim/kprefsdialog.cpp +++ b/libkdepim/kprefsdialog.cpp @@ -27,4 +27,4 @@ #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> @@ -33,8 +33,8 @@ #include <qfile.h> -#include <qtextstream.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3textstream.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qspinbox.h> #include <qdatetime.h> -#include <qframe.h> +#include <q3frame.h> #include <qcombobox.h> @@ -44,2 +44,3 @@ #include <qapplication.h> +#include <QDesktopWidget> @@ -130,3 +131,3 @@ KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString mPreview = new QLabel(sampleText,parent); - mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); + mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken); @@ -214,3 +215,3 @@ KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference, - mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); + mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent); } @@ -226,3 +227,3 @@ void KPrefsDialogWidRadios::addRadio(const QString &text) -QButtonGroup *KPrefsDialogWidRadios::groupBox() +Q3ButtonGroup *KPrefsDialogWidRadios::groupBox() { diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h index 52ec809..cc95dd4 100644 --- a/libkdepim/kprefsdialog.h +++ b/libkdepim/kprefsdialog.h @@ -26,4 +26,6 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qlineedit.h> +//Added by qt3to4: +#include <QLabel> @@ -38,3 +40,3 @@ class QLabel; class QSpinBox; -class QButtonGroup; +class Q3ButtonGroup; @@ -260,3 +262,3 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid */ - QButtonGroup *groupBox(); + Q3ButtonGroup *groupBox(); @@ -268,3 +270,3 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid - QButtonGroup *mBox; + Q3ButtonGroup *mBox; }; @@ -441,3 +443,3 @@ class KPrefsDialog : public KDialogBase - QPtrList<KPrefsDialogWid> mPrefsWids; + Q3PtrList<KPrefsDialogWid> mPrefsWids; }; diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp index f6a0b38..51431e2 100644 --- a/libkdepim/kprefswidget.cpp +++ b/libkdepim/kprefswidget.cpp @@ -27,4 +27,4 @@ #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> @@ -33,8 +33,8 @@ #include <qfile.h> -#include <qtextstream.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3textstream.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qspinbox.h> #include <qdatetime.h> -#include <qframe.h> +#include <q3frame.h> #include <qcombobox.h> @@ -44,2 +44,3 @@ #include <qapplication.h> +#include <QDesktopWidget> @@ -133,3 +134,3 @@ KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText, mPreview = new QLabel(sampleText,parent); - mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); + mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken); @@ -220,3 +221,3 @@ KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference, - mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); + mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent); connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) ); @@ -233,3 +234,3 @@ void KPrefsWidRadios::addRadio(const QString &text) -QButtonGroup *KPrefsWidRadios::groupBox() +Q3ButtonGroup *KPrefsWidRadios::groupBox() { diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h index 8543a39..9de1be5 100644 --- a/libkdepim/kprefswidget.h +++ b/libkdepim/kprefswidget.h @@ -27,3 +27,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qlineedit.h> @@ -32,2 +32,4 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QLabel> @@ -39,3 +41,3 @@ class QLabel; class QSpinBox; -class QButtonGroup; +class Q3ButtonGroup; @@ -267,3 +269,3 @@ class KPrefsWidRadios : public KPrefsWid */ - QButtonGroup *groupBox(); + Q3ButtonGroup *groupBox(); @@ -275,3 +277,3 @@ class KPrefsWidRadios : public KPrefsWid - QButtonGroup *mBox; + Q3ButtonGroup *mBox; }; @@ -451,3 +453,3 @@ class KPrefsWidget : public QWidget - QPtrList<KPrefsWid> mPrefsWids; + Q3PtrList<KPrefsWid> mPrefsWids; }; diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 5708dfc..c844627 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -37,7 +37,7 @@ #include <qdir.h> -#include <qprogressbar.h> -#include <qpopupmenu.h> +#include <q3progressbar.h> +#include <q3popupmenu.h> #include <qpushbutton.h> #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qtimer.h> @@ -52,2 +52,5 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -61,3 +64,3 @@ QDateTime KSyncManager::mRequestedSyncEvent; -KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu) +KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu) : QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu) @@ -65,3 +68,3 @@ KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, Targ mServerSocket = 0; - bar = new QProgressBar ( 1, 0 ); + bar = new Q3ProgressBar ( 1, 0 ); bar->setCaption (""); @@ -91,3 +94,3 @@ void KSyncManager::fillSyncMenu() mSyncMenu->insertSeparator(); - QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); + Q3PopupMenu *clearMenu = new Q3PopupMenu ( mSyncMenu ); mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); @@ -357,3 +360,3 @@ void KSyncManager::enableQuick( bool ask ) QLineEdit lab ( &dia ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lab.setText( mPrefs->mPassiveSyncPort ); @@ -806,3 +809,3 @@ bool KSyncManager::edit_pisync_options() dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); - QVBoxLayout lay ( &dia ); + Q3VBoxLayout lay ( &dia ); lay.setSpacing( 5 ); @@ -840,4 +843,4 @@ bool KSyncManager::edit_sync_options() dia.setCaption( i18n("Device: " ) +mCurrentSyncDevice ); - QButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia); - QVBoxLayout lay ( &dia ); + Q3ButtonGroup gr ( 1, Qt::Horizontal, i18n("Sync preferences"), &dia); + Q3VBoxLayout lay ( &dia ); lay.setSpacing( 2 ); @@ -893,3 +896,3 @@ QString KSyncManager::getPassword( ) lab.setEchoMode( QLineEdit::Password ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); @@ -1336,3 +1339,3 @@ void KSyncManager::readFileFromSocket() -KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name ) +KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : Q3ServerSocket( port, backlog, parent, name ) { @@ -1352,3 +1355,3 @@ void KServerSocket::waitForSocketFinish() } - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); @@ -1374,3 +1377,3 @@ void KServerSocket::newConnection ( int socket ) mPendingConnect = 0; - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); @@ -1464,7 +1467,7 @@ void KServerSocket::error_connect( QString errmess ) { - QTextStream os( mSocket ); - os.setEncoding( QTextStream::Latin1 ); + Q3TextStream os( mSocket ); + os.setEncoding( Q3TextStream::Latin1 ); os << errmess ; mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) { + if ( mSocket->state() == Q3Socket::Idle ) { QTimer::singleShot( 0, this , SLOT ( discardClient())); @@ -1486,3 +1489,3 @@ void KServerSocket::send_file() label->setAlignment ( Qt::AlignHCenter ); - QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); + Q3VBoxLayout* lay = new Q3VBoxLayout( mSyncActionDialog ); lay->addWidget( label); @@ -1538,3 +1541,3 @@ void KServerSocket::send_file() QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { mErrorMessage = 0; @@ -1545,7 +1548,7 @@ void KServerSocket::send_file() mSyncActionDialog->setCaption( i18n("Sending file...") ); - QTextStream ts( &file ); - ts.setEncoding( QTextStream::Latin1 ); + Q3TextStream ts( &file ); + ts.setEncoding( Q3TextStream::Latin1 ); - QTextStream os( mSocket ); - os.setEncoding( QTextStream::Latin1 ); + Q3TextStream os( mSocket ); + os.setEncoding( Q3TextStream::Latin1 ); while ( ! ts.atEnd() ) { @@ -1558,3 +1561,3 @@ void KServerSocket::send_file() mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); @@ -1590,3 +1593,3 @@ void KServerSocket::readBackFileFromSocket() QFile file ( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { delete mSyncActionDialog; @@ -1603,4 +1606,4 @@ void KServerSocket::readBackFileFromSocket() // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); - QTextStream ts ( &file ); - ts.setEncoding( QTextStream::Latin1 ); + Q3TextStream ts ( &file ); + ts.setEncoding( Q3TextStream::Latin1 ); mSyncActionDialog->setCaption( i18n("Writing file to disk...") ); @@ -1608,3 +1611,3 @@ void KServerSocket::readBackFileFromSocket() mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); @@ -1650,4 +1653,4 @@ void KCommandSocket::sendFileRequest() mTimerSocket->start( 100, true ); - QTextStream os( mSocket ); - os.setEncoding( QTextStream::Latin1 ); + Q3TextStream os( mSocket ); + os.setEncoding( Q3TextStream::Latin1 ); @@ -1660,3 +1663,3 @@ void KCommandSocket::readFile( QString fn ) if ( !mSocket ) { - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); //qDebug("KCS: read file - new socket"); @@ -1698,3 +1701,3 @@ void KCommandSocket::writeFile( QString fileName ) if ( !mSocket ) { - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); @@ -1711,3 +1714,3 @@ void KCommandSocket::writeFileToSocket() QFile file2( mFileName ); - if (!file2.open( IO_ReadOnly ) ) { + if (!file2.open( QIODevice::ReadOnly ) ) { mConnectProgress.hide(); @@ -1716,3 +1719,3 @@ void KCommandSocket::writeFileToSocket() mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( deleteSocket())); @@ -1726,6 +1729,6 @@ void KCommandSocket::writeFileToSocket() mConnectProgress.blockSignals( true ); - QTextStream ts2( &file2 ); - ts2.setEncoding( QTextStream::Latin1 ); - QTextStream os2( mSocket ); - os2.setEncoding( QTextStream::Latin1 ); + Q3TextStream ts2( &file2 ); + ts2.setEncoding( Q3TextStream::Latin1 ); + Q3TextStream os2( mSocket ); + os2.setEncoding( Q3TextStream::Latin1 ); os2 << "PUT " << mPassWord << " " << mRemoteResource << "\r\n\r\n";; @@ -1750,3 +1753,3 @@ void KCommandSocket::writeFileToSocket() mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( deleteSocket())); @@ -1757,3 +1760,3 @@ void KCommandSocket::sendStop() if ( !mSocket ) { - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); @@ -1761,7 +1764,7 @@ void KCommandSocket::sendStop() mSocket->connectToHost( mHost, mPort ); - QTextStream os2( mSocket ); - os2.setEncoding( QTextStream::Latin1 ); + Q3TextStream os2( mSocket ); + os2.setEncoding( Q3TextStream::Latin1 ); os2 << "STOP\r\n\r\n"; mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( deleteSocket())); @@ -1831,3 +1834,3 @@ void KCommandSocket::readFileFromSocket() QFile file ( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { mFileString = ""; @@ -1840,4 +1843,4 @@ void KCommandSocket::readFileFromSocket() // mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); - QTextStream ts ( &file ); - ts.setEncoding( QTextStream::Latin1 ); + Q3TextStream ts ( &file ); + ts.setEncoding( Q3TextStream::Latin1 ); ts << mFileString; @@ -1849,3 +1852,3 @@ void KCommandSocket::readFileFromSocket() // connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) deleteSocket(); diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 71d17e9..32c6557 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h @@ -26,11 +26,13 @@ #include <qstring.h> -#include <qsocket.h> +#include <q3socket.h> #include <qdatetime.h> -#include <qserversocket.h> -#include <qtextstream.h> +#include <q3serversocket.h> +#include <q3textstream.h> #include <qregexp.h> -#include <qprogressdialog.h> +#include <q3progressdialog.h> +//Added by qt3to4: +#include <Q3PopupMenu> #include <kdialog.h> -class QPopupMenu; +class Q3PopupMenu; class KSyncProfile; @@ -40,6 +42,6 @@ class KSyncManager; class KSyncInterface; -class QProgressBar; +class Q3ProgressBar; -class KServerSocket : public QServerSocket +class KServerSocket : public Q3ServerSocket { @@ -76,3 +78,3 @@ class KServerSocket : public QServerSocket QDialog* mSyncActionDialog; - QSocket* mSocket; + Q3Socket* mSocket; QString mPassWord; @@ -110,3 +112,3 @@ class KCommandSocket : public QObject QWidget* tlw; - QSocket* mSocket; + Q3Socket* mSocket; QString mPassWord; @@ -134,3 +136,3 @@ class KSyncManager : public QObject - KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); + KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu); ~KSyncManager() ; @@ -221,4 +223,4 @@ class KSyncManager : public QObject TargetApp mTargetApp; - QPopupMenu* mSyncMenu; - QProgressBar* bar; + Q3PopupMenu* mSyncMenu; + Q3ProgressBar* bar; bool mSyncWithDesktop; diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 2b87298..fd5bbca 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -25,4 +25,4 @@ #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> @@ -32,6 +32,6 @@ #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qcombobox.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qspinbox.h> @@ -41,8 +41,12 @@ #include <qpushbutton.h> -#include <qstrlist.h> +#include <q3strlist.h> #include <qapplication.h> #include <qlayout.h> -#include <qscrollview.h> -#include <qvgroupbox.h> -#include <qhgroupbox.h> +#include <q3scrollview.h> +#include <q3vgroupbox.h> +#include <q3hgroupbox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3Frame> @@ -91,7 +95,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() //QFrame *page = addPage(i18n("Sync Prefs"),0,0); - QVBox * mainbox = new QVBox( this ); - QScrollView* sv = new QScrollView( mainbox ); - QHBoxLayout * lay = new QHBoxLayout( this ); + Q3VBox * mainbox = new Q3VBox( this ); + Q3ScrollView* sv = new Q3ScrollView( mainbox ); + Q3HBoxLayout * lay = new Q3HBoxLayout( this ); lay->addWidget( mainbox ); - QHBox * b_box = new QHBox( mainbox ); + Q3HBox * b_box = new Q3HBox( mainbox ); @@ -103,7 +107,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() //sl->addWidget ( sv ); - sv->setResizePolicy ( QScrollView::AutoOneFit ); - QFrame *topFrame = new QFrame ( sv ); + sv->setResizePolicy ( Q3ScrollView::AutoOneFit ); + Q3Frame *topFrame = new Q3Frame ( sv ); sv->addChild( topFrame ); mSetupSyncAlgTab = topFrame; - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); @@ -122,3 +126,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - QHBox* buttonbox = new QHBox( topFrame); + Q3HBox* buttonbox = new Q3HBox( topFrame); topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); @@ -147,3 +151,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); + Q3HGroupBox *iims = new Q3HGroupBox( i18n("Multiple Sync options"), topFrame); new QLabel( i18n("Include in multiple "), iims ); @@ -155,8 +159,8 @@ void KSyncPrefsDialog::setupSyncAlgTab() ++iii; - QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); + Q3VGroupBox* gb0 = new Q3VGroupBox( i18n("Sync algo options"), topFrame); topLayout->addMultiCellWidget(gb0, iii,iii,0,1); ++iii; - QButtonGroup* gr; + Q3ButtonGroup* gr; { - QVGroupBox* topFrame = gb0; + Q3VGroupBox* topFrame = gb0; @@ -167,3 +171,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() //++iii; - gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); + gr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); //topLayout->addMultiCellWidget(gr, iii,iii,0,1); @@ -183,8 +187,8 @@ void KSyncPrefsDialog::setupSyncAlgTab() #if 0 - QHGroupBox* gb51 = new QHGroupBox( i18n("Local resources to sync with:"), topFrame); + Q3HGroupBox* gb51 = new Q3HGroupBox( i18n("Local resources to sync with:"), topFrame); { - QVBox * fibo2 = new QVBox ( gb51 ); + Q3VBox * fibo2 = new Q3VBox ( gb51 ); new QLabel ( i18n("Calendar resources:"), fibo2 ); //mFilterInCal = new QComboBox( fibo2 ); - fibo2 = new QVBox ( gb51 ); + fibo2 = new Q3VBox ( gb51 ); new QLabel ( i18n("Addressbook resources:"), fibo2 ); @@ -193,7 +197,7 @@ void KSyncPrefsDialog::setupSyncAlgTab() #endif - QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame); - QVBox * fibo2 = new QVBox ( gb5 ); + Q3HGroupBox* gb5 = new Q3HGroupBox( i18n("Apply filter when adding data to local:"), topFrame); + Q3VBox * fibo2 = new Q3VBox ( gb5 ); new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); mFilterInCal = new QComboBox( fibo2 ); - fibo2 = new QVBox ( gb5 ); + fibo2 = new Q3VBox ( gb5 ); new QLabel ( i18n("Incoming addressbook filter:"), fibo2 ); @@ -205,3 +209,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); + Q3VGroupBox* gb2 = new Q3VGroupBox( i18n("Write back options"), topFrame); //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); @@ -209,9 +213,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() { - QVGroupBox*topFrame = gb2; + Q3VGroupBox*topFrame = gb2; mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); - QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); - QVBox * fibo = new QVBox ( gb4 ); + Q3HGroupBox* gb4 = new Q3HGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); + Q3VBox * fibo = new Q3VBox ( gb4 ); new QLabel ( i18n("Outgoing calendar filter:"), fibo ); mFilterOutCal = new QComboBox( fibo ); - fibo = new QVBox ( gb4 ); + fibo = new Q3VBox ( gb4 ); new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); @@ -223,3 +227,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() //++iii; - QVGroupBox* gb3 = new QVGroupBox( i18n("Time period"), topFrame); + Q3VGroupBox* gb3 = new Q3VGroupBox( i18n("Time period"), topFrame); connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); @@ -227,3 +231,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() new QLabel( i18n("From ") , gb3 ); - QHBox * tf1 = new QHBox ( gb3 ); + Q3HBox * tf1 = new Q3HBox ( gb3 ); mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 ); @@ -231,3 +235,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() new QLabel( i18n(" weeks in the past to ") ,tf1 ); - QHBox * tf2 = new QHBox ( gb3 ); + Q3HBox * tf2 = new Q3HBox ( gb3 ); mWriteBackFutureWeeks= new QSpinBox(1,104, 1, tf2); @@ -243,3 +247,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() } - proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); + proGr = new Q3ButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); gr = proGr; @@ -257,3 +261,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - QVGroupBox* gb1 = new QVGroupBox( i18n("Profile kind specific settings"), topFrame); + Q3VGroupBox* gb1 = new Q3VGroupBox( i18n("Profile kind specific settings"), topFrame); topLayout->addMultiCellWidget(gb1, iii,iii,0,1); @@ -265,4 +269,4 @@ void KSyncPrefsDialog::setupSyncAlgTab() // *** phone ******************************* - QVGroupBox* topFrame = gb1; - phoneWidget = new QVBox( topFrame); + Q3VGroupBox* topFrame = gb1; + phoneWidget = new Q3VBox( topFrame); //topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); @@ -270,3 +274,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); - QHBox* temphb = new QHBox( phoneWidget ); + Q3HBox* temphb = new Q3HBox( phoneWidget ); new QLabel( i18n("I/O device: "), temphb ); @@ -277,3 +281,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - temphb = new QHBox( phoneWidget ); + temphb = new Q3HBox( phoneWidget ); new QLabel( i18n("Connection: "), temphb ); @@ -284,3 +288,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() - temphb = new QHBox( phoneWidget ); + temphb = new Q3HBox( phoneWidget ); new QLabel( i18n("Model(opt.): "), temphb ); @@ -291,6 +295,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() // *** local******************************* - localFileWidget = new QVBox( topFrame); + localFileWidget = new Q3VBox( topFrame); //topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); //++iii; - temphb = new QHBox( localFileWidget ); + temphb = new Q3HBox( localFileWidget ); @@ -299,3 +303,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Local file PWMgr:"), temphb ); - temphb = new QHBox( localFileWidget ); + temphb = new Q3HBox( localFileWidget ); button = new QPushButton( i18n("Choose..."), temphb ); @@ -306,3 +310,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); - temphb = new QHBox( localFileWidget ); + temphb = new Q3HBox( localFileWidget ); @@ -315,6 +319,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() // *** remote******************************* - remoteFileWidget = new QVBox( topFrame); + remoteFileWidget = new Q3VBox( topFrame); //topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); //++iii; - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); new QLabel( i18n("Calendar:"), temphb); @@ -324,3 +328,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); mRemotePrecommand = new QLineEdit(temphb); @@ -330,3 +334,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); mLocalTempFile = new QLineEdit(temphb); @@ -336,3 +340,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); mRemotePostcommand = new QLineEdit(temphb ); @@ -342,3 +346,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); button = new QPushButton( i18n("ssh/scp"), temphb ); @@ -350,6 +354,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() // *** pi-sync******************************* - piWidget = new QVBox( topFrame); + piWidget = new Q3VBox( topFrame); //topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); //++iii; - temphb = new QHBox( piWidget ); + temphb = new Q3HBox( piWidget ); new QLabel( i18n("Calendar:"), temphb); @@ -359,3 +363,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); - temphb = new QHBox( piWidget ); + temphb = new Q3HBox( piWidget ); mRemotePw = new QLineEdit(temphb); @@ -365,3 +369,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); - temphb = new QHBox( piWidget ); + temphb = new Q3HBox( piWidget ); mRemoteIP = new QLineEdit(temphb); @@ -371,3 +375,3 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); - temphb = new QHBox( piWidget ); + temphb = new Q3HBox( piWidget ); mRemotePort = new QLineEdit(temphb); @@ -377,6 +381,6 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Local/remote Resource sync partners (Leave empty to not sync)"), piWidget); - mTableBox = new QHBox( piWidget ); - mResTableKopi = new QTable( 1, 1, mTableBox ); - mResTableKapi = new QTable( 1, 1, mTableBox ); - mResTablePwmpi = new QTable( 1, 1, mTableBox ); + mTableBox = new Q3HBox( piWidget ); + mResTableKopi = new Q3Table( 1, 1, mTableBox ); + mResTableKapi = new Q3Table( 1, 1, mTableBox ); + mResTablePwmpi = new Q3Table( 1, 1, mTableBox ); mResTableKopi->horizontalHeader()->setLabel( 0, i18n("Remote") ); @@ -470,3 +474,3 @@ void KSyncPrefsDialog::slotOK() for (i = 0; i < mSyncProfileNames.count(); ++ i) { - if ( mSyncProfileNames.contains( mSyncProfileNames[i]) > 1 ) { + if ( mSyncProfileNames.count( mSyncProfileNames[i]) > 1 ) { KMessageBox::error(this,i18n("Multiple profiles with same name!\nPlease use unique profile names!"),i18n("KO/Pi config error")); diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index d8c02de..1d7503e 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h @@ -27,5 +27,5 @@ #include <kdialogbase.h> -#include <qptrlist.h> -#include <qtable.h> -#include <qhbox.h> +#include <q3ptrlist.h> +#include <q3table.h> +#include <q3hbox.h> @@ -40,5 +40,5 @@ class KURLRequester; class QComboBox; -class QButtonGroup; +class Q3ButtonGroup; class QLineEdit; -class QVBox; +class Q3VBox; class QStringList; @@ -88,3 +88,3 @@ class KSyncPrefsDialog : public KDialog int currentSelection; - QPtrList<KSyncProfile> mSyncProfiles; + Q3PtrList<KSyncProfile> mSyncProfiles; QStringList mSyncProfileNames; @@ -107,7 +107,7 @@ class KSyncPrefsDialog : public KDialog void saveProfile(); - QButtonGroup* proGr; - QHBox * mTableBox; - QTable* mResTableKopi; - QTable* mResTableKapi; - QTable* mResTablePwmpi; + Q3ButtonGroup* proGr; + Q3HBox * mTableBox; + Q3Table* mResTableKopi; + Q3Table* mResTableKapi; + Q3Table* mResTablePwmpi; @@ -154,6 +154,6 @@ class KSyncPrefsDialog : public KDialog QWidget* mSetupSyncAlgTab; - QVBox* localFileWidget; - QVBox* remoteFileWidget; - QVBox* phoneWidget; - QVBox* piWidget; + Q3VBox* localFileWidget; + Q3VBox* remoteFileWidget; + Q3VBox* phoneWidget; + Q3VBox* piWidget; QCheckBox* mWriteBackFile; diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index 91fcfc5..1e41662 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -22,3 +22,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qcolor.h> diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro index 7160d0e..fb27311 100644 --- a/libkdepim/libkdepim.pro +++ b/libkdepim/libkdepim.pro @@ -3,3 +3,3 @@ CONFIG = qt warn_on DEFINES +=KORG_NOKABC -TARGET = microkdepim +TARGET = xmicrokdepim INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . .. @@ -76 +76,3 @@ SOURCES += ol_access.cpp } +#The following line was inserted by qt3to4 +QT += xml qt3support diff --git a/libkdepim/libkdepimE.pro b/libkdepim/libkdepimE.pro index f3db68e..4b42184 100644 --- a/libkdepim/libkdepimE.pro +++ b/libkdepim/libkdepimE.pro @@ -2,6 +2,6 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkdepim +TARGET = xmicrokdepim INCLUDEPATH += . $(KDEPIMDIR) $(KDEPIMDIR)/microkde $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kdeui $(QPEDIR)/include -LIBS += -lmicrokde -#LIBS += -lmicrokcal +LIBS += -lxmicrokde +#LIBS += -lxmicrokcal LIBS += -L$(QPEDIR)/lib 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 @@ -24,8 +24,8 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> #include <qlayout.h> -#include <qprogressbar.h> -#include <qprogressdialog.h> -#include <qwidgetstack.h> +#include <q3progressbar.h> +#include <q3progressdialog.h> +#include <q3widgetstack.h> #include <qdatetime.h> @@ -35,6 +35,6 @@ #include <qapplication.h> -#include <qhbox.h> -#include <qheader.h> +#include <q3hbox.h> +#include <q3header.h> #include <qdatetime.h> -#include <qlistview.h> +#include <q3listview.h> @@ -56,9 +56,9 @@ -class OLEListViewItem : public QCheckListItem +class OLEListViewItem : public Q3CheckListItem { public: - OLEListViewItem( QListView *parent, QString text ) : - QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; - OLEListViewItem( QListViewItem *after, QString text ) : - QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; + OLEListViewItem( Q3ListView *parent, QString text ) : + Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; }; + OLEListViewItem( Q3ListViewItem *after, QString text ) : + Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; }; ~OLEListViewItem() {}; @@ -80,5 +80,5 @@ class OLEFolderSelect : public KDialogBase { - QHBox * mw = new QHBox( this ); + Q3HBox * mw = new Q3HBox( this ); setMainWidget( mw ); - mListView = new QListView( mw ); + mListView = new Q3ListView( mw ); mListView->addColumn(i18n("Select Folder")); @@ -86,5 +86,5 @@ class OLEFolderSelect : public KDialogBase } - QListView* listView() { return mListView;} + Q3ListView* listView() { return mListView;} private: - QListView* mListView; + Q3ListView* mListView; }; @@ -151,3 +151,3 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li } - QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 ); + Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 ); bar.setCaption (i18n("Accessing OL") ); @@ -175,3 +175,3 @@ QStringList OL_access::getFolderSelection( int type , QString caption ) OLEFolderSelect folder_dialog; - QListView * listView = folder_dialog.listView(); + Q3ListView * listView = folder_dialog.listView(); MAPIFolder mfInbox; @@ -1137,9 +1137,9 @@ DATE Qdt2date( QDateTime dt ) -class OLEListViewItem : public QCheckListItem +class OLEListViewItem : public Q3CheckListItem { public: - OLEListViewItem( QListView *parent, QString text ) : - QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; }; - OLEListViewItem( QListViewItem *after, QString text ) : - QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; }; + OLEListViewItem( Q3ListView *parent, QString text ) : + Q3CheckListItem( parent, text, Q3CheckListItem::CheckBox ) { ; }; + OLEListViewItem( Q3ListViewItem *after, QString text ) : + Q3CheckListItem( after, text, Q3CheckListItem::CheckBox ) { ; }; ~OLEListViewItem() {}; @@ -1161,5 +1161,5 @@ KAImportOLdialog::KAImportOLdialog( const QString &caption, mSyncMode = false; - QHBox * mw = new QHBox( this ); + Q3HBox * mw = new Q3HBox( this ); setMainWidget( mw ); - mListView = new QListView( mw ); + mListView = new Q3ListView( mw ); mListView->addColumn(i18n("Select Folder")); @@ -1305,3 +1305,3 @@ void KAImportOLdialog::readContactData( DWORD folder ) } - QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this); + Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this); bar.setCaption (i18n("Accessing OL") ); 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 @@ -39,3 +39,3 @@ class QDateTime; -class QListView; +class Q3ListView; class OLEListViewItem; @@ -134,3 +134,3 @@ class KAImportOLdialog : public KDialogBase KABC::AddressBook * mABook; - QListView * mListView; + Q3ListView * mListView; KABC::Addressee::List mAList; diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index 89db22b..0ea73f5 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -24,3 +24,4 @@ #include <qapplication.h> -#include <qptrlist.h> +#include <QDesktopWidget> +#include <q3ptrlist.h> #include <qregexp.h> @@ -28,3 +29,3 @@ #include <qlabel.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -48,3 +49,3 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model if ( QFile::exists( fileName) ) { - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { qDebug("Error: cannot open %s ", fileName.latin1() ); @@ -53,3 +54,5 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model QString line; - while ( file.readLine( line, 1024 ) > 0 ) { + char tmp[1024]; + while ( file.readLine( tmp, 1024 ) > 0 ) { + line = tmp; //qDebug("*%s* ", line.latin1() ); @@ -117,3 +120,3 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model if ( write ) { - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { qDebug("Error: cannot write file %s ", fileName.latin1() ); @@ -122,3 +125,3 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model qDebug("Writing file %s ", fileName.latin1() ); - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << content ; diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp index 72c4e60..4172cd0 100644 --- a/microkde/KDGanttMinimizeSplitter.cpp +++ b/microkde/KDGanttMinimizeSplitter.cpp @@ -40,4 +40,4 @@ #if QT_VERSION >= 0x030000 -#include "qptrlist.h" -#include "qmemarray.h" +#include "q3ptrlist.h" +#include "q3memarray.h" #else @@ -45,12 +45,21 @@ #include <qarray.h> -#define QPtrList QList -#define QMemArray QArray +#define Q3PtrList QList +#define Q3MemArray QArray #endif #include "qlayoutengine_p.h" -#include "qobjectlist.h" +#include "qobject.h" #include "qstyle.h" #include "qapplication.h" //sendPostedEvents -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qcursor.h> -#include <qframe.h> +#include <q3frame.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3PointArray> +#include <QPixmap> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QChildEvent> +#include <QEvent> +#include <QPaintEvent> #ifndef KDGANTT_MASTER_CVS @@ -67,6 +76,6 @@ static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit ri -class KDRubberBand: public QFrame +class KDRubberBand: public Q3Frame { public: - KDRubberBand( QWidget *parent, const char * name, WFlags f ) :QFrame ( parent, name, f ) {;} + KDRubberBand( QWidget *parent, const char * name, Qt::WFlags f ) :Q3Frame ( parent, name, f ) {;} @@ -82,5 +91,6 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o, KDGanttMinimizeSplitter *parent, const char * name ) - : QWidget( parent, name ), _activeButton( 0 ), _collapsed( false ) + : _activeButton( 0 ), _collapsed( false ) { - + setObjectName(name); + setParent(parent); if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->width() < 650 ) { @@ -108,6 +118,6 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) #ifndef QT_NO_CURSOR - if ( o == KDGanttMinimizeSplitter::Horizontal ) - setCursor( splitHCursor ); + if ( o == Qt::Horizontal ) + setCursor( Qt::splitHCursor ); else - setCursor( splitVCursor ); + setCursor( Qt::splitVCursor ); #endif @@ -119,3 +129,3 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) updateCursor( e->pos() ); - if ( !(e->state()&LeftButton) ) + if ( !(e->state()&Qt::LeftButton) ) return; @@ -139,3 +149,3 @@ void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e ) { - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { _activeButton = onButton( e->pos() ); @@ -151,9 +161,9 @@ void KDGanttSplitterHandle::updateCursor( const QPoint& p) if ( onButton( p ) != 0 ) { - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); } else { - if ( orient == KDGanttMinimizeSplitter::Horizontal ) - setCursor( splitHCursor ); + if ( orient == Qt::Horizontal ) + setCursor( Qt::splitHCursor ); else - setCursor( splitVCursor ); + setCursor( Qt::splitVCursor ); } @@ -197,3 +207,3 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) else { - if ( !opaque() && e->button() == LeftButton ) { + if ( !opaque() && e->button() == Qt::LeftButton ) { QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) @@ -213,6 +223,6 @@ int KDGanttSplitterHandle::onButton( const QPoint& p ) { - QValueList<QPointArray> list = buttonRegions(); + Q3ValueList<Q3PointArray> list = buttonRegions(); int index = 1; int add = 12; - for( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { + for( Q3ValueList<Q3PointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { QRect rect = (*it).boundingRect(); @@ -231,5 +241,5 @@ int KDGanttSplitterHandle::onButton( const QPoint& p ) -QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() +Q3ValueList<Q3PointArray> KDGanttSplitterHandle::buttonRegions() { - QValueList<QPointArray> list; + Q3ValueList<Q3PointArray> list; @@ -240,3 +250,3 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() for ( int i = 0; i < 2; i++ ) { - QPointArray arr; + Q3PointArray arr; if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right || @@ -313,3 +323,3 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) - QValueList<QPointArray> list = buttonRegions(); + Q3ValueList<Q3PointArray> list = buttonRegions(); int index = 1; @@ -317,3 +327,3 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) p.translate( 0, 1 ); - for ( QValueList<QPointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( Q3ValueList<Q3PointArray>::Iterator it = list.begin(); it != list.end(); ++it ) { if ( index == _activeButton ) { @@ -379,3 +389,3 @@ public: - QPtrList<QSplitterLayoutStruct> list; + Q3PtrList<QSplitterLayoutStruct> list; bool opaque; @@ -384,3 +394,3 @@ public: -void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, +void kdganttGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos, int space, int spacer ); @@ -463,4 +473,5 @@ static QSize minSizeHint( const QWidget* w ) KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *name ) - :QFrame(parent,name,WPaintUnclipped) + :Q3Frame(parent,name) { + setAttribute(Qt::WA_PaintUnclipped); mRubberBand = 0; @@ -468,3 +479,3 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n #if QT_VERSION >= 232 - orient = Horizontal; + orient = Qt::Horizontal; init(); @@ -477,6 +488,6 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n */ -KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent, const char *name ) - :QFrame(parent,name,WPaintUnclipped) +KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, QWidget *parent, const char *name ) + :Q3Frame(parent,name) { - + setAttribute(Qt::WA_PaintUnclipped); mRubberBand = 0; @@ -507,3 +518,3 @@ void KDGanttMinimizeSplitter::init() data = new QSplitterData; - if ( orient == Horizontal ) + if ( orient == Qt::Horizontal ) setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) ); @@ -536,3 +547,3 @@ void KDGanttMinimizeSplitter::toggle() */ -void KDGanttMinimizeSplitter::setOrientation( Orientation o ) +void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o ) { @@ -543,3 +554,3 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o ) - if ( orient == Horizontal ) + if ( orient == Qt::Horizontal ) setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); @@ -588,4 +599,4 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() ); - if ( ! mFirstHandle ) - mFirstHandle = newHandle; + if ( ! mFirstHandle ) + mFirstHandle = newHandle; s->wid = newHandle; @@ -602,3 +613,3 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs s->wid = w; - if ( !testWState( WState_Resized ) && w->sizeHint().isValid() ) + if ( !testAttribute( Qt::WA_Resized ) && w->sizeHint().isValid() ) s->sizer = pick( w->sizeHint() ); @@ -623,3 +634,3 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) { - if ( c->type() == QEvent::ChildInserted ) { + if ( c->type() == QEvent::ChildAdded ) { if ( !c->child()->isWidgetType() ) @@ -627,3 +638,9 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) - if ( ((QWidget*)c->child())->testWFlags( WType_TopLevel ) ) + QWidget *cw = (QWidget*)c->child(); + + if ( (cw->windowFlags())&Qt::Window ) + return; + + // avoid infinite recursion + if(cw->objectName().startsWith("qt_splithandle_")) return; @@ -632,3 +649,3 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) while ( s ) { - if ( s->wid == c->child() ) + if ( s->wid == cw ) return; @@ -636,3 +653,3 @@ void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) } - addWidget( (QWidget*)c->child() ); + addWidget( cw ); recalc( isVisible() ); @@ -672,5 +689,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) QPainter paint( this ); - paint.setPen( gray ); - paint.setBrush( gray ); - paint.setRasterOp( XorROP ); + paint.setPen( Qt::gray ); + paint.setBrush( Qt::gray ); + paint.setCompositionMode( QPainter::CompositionMode_Xor ); QRect r = contentsRect(); @@ -678,3 +695,3 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) #if QT_VERSION >= 0x030000 - int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); + int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this); #else @@ -682,3 +699,3 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) #endif - if ( orient == Horizontal ) { + if ( orient == Qt::Horizontal ) { if ( opaqueOldPos >= 0 ) @@ -698,3 +715,3 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) if ( !mRubberBand ) { - mRubberBand = new KDRubberBand( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop); + mRubberBand = new KDRubberBand( 0, "rubber", Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop); mRubberBand->setFrameStyle( Box | Raised ); @@ -712,3 +729,3 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) int sw = style().splitterWidth(); - if ( orient == Horizontal ) { + if ( orient == Qt::Horizontal ) { if ( p >= 0 ) { @@ -734,3 +751,3 @@ bool KDGanttMinimizeSplitter::event( QEvent *e ) { - if ( e->type() == QEvent::LayoutHint || ( e->type() == QEvent::Show && data->firstShow ) ) { + if ( e->type() == QEvent::LayoutRequest || ( e->type() == QEvent::Show && data->firstShow ) ) { recalc( isVisible() ); @@ -757,3 +774,3 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p, (orientation() == Qt::Horizontal ? - QStyle::Style_Horizontal : 0)); + QStyle::State_Horizontal : 0)); #endif @@ -798,5 +815,5 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id ) QSplitterLayoutStruct *s = data->list.at(id); - int oldP = orient == Horizontal ? s->wid->x() : s->wid->y(); + int oldP = orient == Qt::Horizontal ? s->wid->x() : s->wid->y(); bool upLeft; - if ( false && orient == Horizontal ) { + if ( false && orient == Qt::Horizontal ) { p += s->wid->width(); @@ -815,4 +832,4 @@ void KDGanttMinimizeSplitter::setG( QWidget *w, int p, int s, bool isSplitter ) { - if ( orient == Horizontal ) { - if ( false && orient == Horizontal && !isSplitter ) + if ( orient == Qt::Horizontal ) { + if ( false && orient == Qt::Horizontal && !isSplitter ) p = contentsRect().width() - p - s; @@ -842,3 +859,3 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) int dd = s->sizer; - if( false && orient == Horizontal ) { + if( false && orient == Qt::Horizontal ) { pos1 = pos; @@ -858,3 +875,3 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) int dd, newLeft, nextPos; - if( false && orient == Horizontal ) { + if( false && orient == Qt::Horizontal ) { dd = w->geometry().right() - pos; @@ -895,3 +912,3 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) int pos1, pos2; - if( false && orient == Horizontal ) { + if( false && orient == Qt::Horizontal ) { pos2 = pos - dd; @@ -912,3 +929,3 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) int right, dd,/* newRight,*/ newLeft, nextPos; - if ( false && orient == Horizontal ) { + if ( false && orient == Qt::Horizontal ) { dd = pos - left + 1; @@ -990,5 +1007,5 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) QRect r = contentsRect(); - if ( orient == Horizontal && false ) { + if ( orient == Qt::Horizontal && false ) { #if QT_VERSION >= 0x030000 - int splitterWidth = style().pixelMetric(QStyle::PM_SplitterWidth, this); + int splitterWidth = style()->pixelMetric(QStyle::PM_SplitterWidth, 0,this); #else @@ -1032,3 +1049,3 @@ void KDGanttMinimizeSplitter::doResize() int n = data->list.count(); - QMemArray<QLayoutStruct> a( n ); + Q3MemArray<QLayoutStruct> a( n ); for ( i = 0; i< n; i++ ) { @@ -1134,3 +1151,3 @@ void KDGanttMinimizeSplitter::recalc( bool update ) - if ( orient == Horizontal ) { + if ( orient == Qt::Horizontal ) { setMaximumSize( maxl, maxt ); @@ -1269,9 +1286,6 @@ QSize KDGanttMinimizeSplitter::sizeHint() const int t = 0; - if ( children() ) { - const QObjectList * c = children(); - QObjectListIt it( *c ); - QObject * o; - - while( (o=it.current()) != 0 ) { - ++it; + if ( !children().empty() ) { + const QObjectList c = children(); + for(QObjectList::const_iterator i=c.begin();i!=c.end();++i) { + QObject * o = *i; if ( o->isWidgetType() && @@ -1286,3 +1300,3 @@ QSize KDGanttMinimizeSplitter::sizeHint() const } - return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); + return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l ); } @@ -1299,9 +1313,6 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const int t = 0; - if ( children() ) { - const QObjectList * c = children(); - QObjectListIt it( *c ); - QObject * o; - - while( (o=it.current()) != 0 ) { - ++it; + if ( !children().empty() ) { + const QObjectList c = children(); + for(QObjectList::const_iterator i=c.begin();i!=c.end();++i) { + QObject * o = *i; if ( o->isWidgetType() && @@ -1316,3 +1327,3 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const } - return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); + return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l ); } @@ -1404,4 +1415,5 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const -QValueList<int> KDGanttMinimizeSplitter::sizes() const +Q3ValueList<int> KDGanttMinimizeSplitter::sizes() const { + /* TODO: hacker if ( !testWState(WState_Polished) ) { @@ -1409,4 +1421,4 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const that->polish(); - } - QValueList<int> list; + } */ + Q3ValueList<int> list; QSplitterLayoutStruct *s = data->list.first(); @@ -1435,6 +1447,6 @@ QValueList<int> KDGanttMinimizeSplitter::sizes() const -void KDGanttMinimizeSplitter::setSizes( QValueList<int> list ) +void KDGanttMinimizeSplitter::setSizes( Q3ValueList<int> list ) { processChildEvents(); - QValueList<int>::Iterator it = list.begin(); + Q3ValueList<int>::Iterator it = list.begin(); QSplitterLayoutStruct *s = data->list.first(); @@ -1458,3 +1470,3 @@ void KDGanttMinimizeSplitter::processChildEvents() { - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + QApplication::sendPostedEvents( this, QEvent::ChildAdded ); } @@ -1470,3 +1482,3 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old ) #if QT_VERSION >= 0x030000 - int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); + int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this); #else @@ -1481,3 +1493,3 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old ) doResize(); - QFrame::styleChange( old ); + Q3Frame::styleChange( old ); } @@ -1514,3 +1526,3 @@ static inline int fRound( int i ) { } -void kdganttGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, +void kdganttGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos, int space, int spacer ) diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h index 3042e0a..338d965 100644 --- a/microkde/KDGanttMinimizeSplitter.h +++ b/microkde/KDGanttMinimizeSplitter.h @@ -1 +1,8 @@ +//Added by qt3to4: +#include <Q3PointArray> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QChildEvent> +#include <QMouseEvent> +#include <QEvent> /* -*- Mode: C++ -*- @@ -37,4 +44,4 @@ #ifndef QT_H -#include "qframe.h" -#include "qvaluelist.h" +#include "q3frame.h" +#include "q3valuelist.h" #endif // QT_H @@ -46,3 +53,3 @@ class KDGanttSplitterHandle; class KDRubberBand; -class KDGanttMinimizeSplitter : public QFrame +class KDGanttMinimizeSplitter : public Q3Frame { @@ -58,7 +65,7 @@ public: KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 ); - KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 ); + KDGanttMinimizeSplitter( Qt::Orientation, QWidget* parent=0, const char* name=0 ); ~KDGanttMinimizeSplitter(); - virtual void setOrientation( Orientation ); - Orientation orientation() const { return orient; } + virtual void setOrientation( Qt::Orientation ); + Qt::Orientation orientation() const { return orient; } @@ -79,4 +86,4 @@ public: - QValueList<int> sizes() const; - void setSizes( QValueList<int> ); + Q3ValueList<int> sizes() const; + void setSizes( Q3ValueList<int> ); KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} @@ -116,10 +123,10 @@ private: QCOORD pick( const QPoint &p ) const - { return orient == Horizontal ? p.x() : p.y(); } + { return orient == Qt::Horizontal ? p.x() : p.y(); } QCOORD pick( const QSize &s ) const - { return orient == Horizontal ? s.width() : s.height(); } + { return orient == Qt::Horizontal ? s.width() : s.height(); } QCOORD trans( const QPoint &p ) const - { return orient == Vertical ? p.x() : p.y(); } + { return orient == Qt::Vertical ? p.x() : p.y(); } QCOORD trans( const QSize &s ) const - { return orient == Vertical ? s.width() : s.height(); } + { return orient == Qt::Vertical ? s.width() : s.height(); } KDGanttSplitterHandle* mFirstHandle; @@ -129,3 +136,3 @@ private: private: - Orientation orient; + Qt::Orientation orient; Direction _direction; @@ -165,3 +172,3 @@ public: protected: - QValueList<QPointArray> buttonRegions(); + Q3ValueList<Q3PointArray> buttonRegions(); void paintEvent( QPaintEvent * ); diff --git a/microkde/fncolordialog.h b/microkde/fncolordialog.h index 615d2ed..52356be 100755 --- a/microkde/fncolordialog.h +++ b/microkde/fncolordialog.h @@ -37,3 +37,3 @@ //-----------------------------------------------------------------------------
-class Q_EXPORT FNPaletteBase : public QWidget
+class /* Q_EXPORT */ FNPaletteBase : public QWidget
{
@@ -42,3 +42,3 @@ public: - FNPaletteBase(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNPaletteBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
@@ -80,3 +80,3 @@ signals: //-----------------------------------------------------------------------------
-class Q_EXPORT FNColorPalette : public FNPaletteBase
+class /* Q_EXPORT */ FNColorPalette : public FNPaletteBase
{
@@ -84,3 +84,3 @@ class Q_EXPORT FNColorPalette : public FNPaletteBase public:
- FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNColorPalette(QColor c, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
virtual ~FNColorPalette();
@@ -94,3 +94,3 @@ public: //-----------------------------------------------------------------------------
-class Q_EXPORT FNHSVPalette : public FNPaletteBase
+class /*Q_EXPORT */ FNHSVPalette : public FNPaletteBase
{
@@ -98,3 +98,3 @@ class Q_EXPORT FNHSVPalette : public FNPaletteBase public:
- FNHSVPalette(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNHSVPalette(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
virtual ~FNHSVPalette();
@@ -113,3 +113,3 @@ protected: //-----------------------------------------------------------------------------
-class Q_EXPORT FNColorDialog : public QDialog
+class /*Q_EXPORT */FNColorDialog : public QDialog
{
@@ -117,3 +117,3 @@ class Q_EXPORT FNColorDialog : public QDialog public:
- FNColorDialog(QWidget* parent=0, const char* name=0, WFlags f=0);
+ FNColorDialog(QWidget* parent=0, const char* name=0, Qt::WFlags f=0);
virtual ~FNColorDialog();
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index d7c12bb..b058d54 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -8,7 +8,10 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qdialog.h> #include <qlayout.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qregexp.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -77,6 +80,6 @@ void KApplication::showFile(QString caption, QString fn) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); text = ts.read(); @@ -91,3 +94,3 @@ bool KApplication::convert2latin1(QString fileName) QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -95,11 +98,11 @@ bool KApplication::convert2latin1(QString fileName) } - QTextStream ts( &file ); - ts.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream ts( &file ); + ts.setEncoding( Q3TextStream::UnicodeUTF8 ); text = ts.read(); file.close(); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream tsIn( &file ); - tsIn.setEncoding( QTextStream::Latin1 ); + Q3TextStream tsIn( &file ); + tsIn.setEncoding( Q3TextStream::Latin1 ); tsIn << text.latin1(); @@ -114,3 +117,3 @@ void KApplication::showText(QString caption, QString text) dia.setCaption( caption ); - QVBoxLayout* lay = new QVBoxLayout( &dia ); + Q3VBoxLayout* lay = new Q3VBoxLayout( &dia ); lay->setSpacing( 3 ); @@ -118,3 +121,3 @@ void KApplication::showText(QString caption, QString text) KTextEdit tb ( &dia ); - tb.setWordWrap( QMultiLineEdit::WidgetWidth ); + tb.setWordWrap( Q3MultiLineEdit::WidgetWidth ); lay->addWidget( &tb ); @@ -135,3 +138,3 @@ void KApplication::showText(QString caption, QString text) #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include "kglobal.h" @@ -146,3 +149,3 @@ class KBackupPrefs : public QDialog setCaption( i18n("Backup Failed!") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); @@ -151,3 +154,3 @@ class KBackupPrefs : public QDialog lay->addWidget( lab ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Choose action"), this ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Choose action"), this ); lay->addWidget( format ); diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp index 197bea2..16618fc 100644 --- a/microkde/kcolorbutton.cpp +++ b/microkde/kcolorbutton.cpp @@ -3,2 +3,3 @@ #include "qapplication.h" +#include <QDesktopWidget> @@ -8,2 +9,4 @@ #include <qcolordialog.h> +//Added by qt3to4: +#include <QPixmap> #endif diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 940196e..12063ca 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp @@ -1,4 +1,6 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -55,3 +57,3 @@ QString KConfig::group() const { //US added method -QValueList<int> KConfig::readIntListEntry( const QString & key) +Q3ValueList<int> KConfig::readIntListEntry( const QString & key) { @@ -59,3 +61,3 @@ QValueList<int> KConfig::readIntListEntry( const QString & key) - QValueList<int> result; + Q3ValueList<int> result; @@ -113,3 +115,3 @@ QSize KConfig::readSizeEntry( const QString &key, QSize* def ) { - QValueList<int> intlist = readIntListEntry(key); + Q3ValueList<int> intlist = readIntListEntry(key); @@ -196,3 +198,3 @@ QDateTime KConfig::readDateTimeEntry( const QString &key, const QDateTime *def ) //US added method -void KConfig::writeEntry( const QString &key, const QValueList<int> &value) +void KConfig::writeEntry( const QString &key, const Q3ValueList<int> &value) { @@ -200,3 +202,3 @@ void KConfig::writeEntry( const QString &key, const QValueList<int> &value) - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; @@ -248,3 +250,3 @@ void KConfig::writeEntry( const QString & e, const QSize & s ) { - QValueList<int> intlist; + Q3ValueList<int> intlist; intlist << s.width() << s.height(); @@ -273,3 +275,3 @@ void KConfig::load() QFile f( mFileName ); - if ( !f.open( IO_ReadOnly ) ) { + if ( !f.open( QIODevice::ReadOnly ) ) { //qDebug("KConfig: could not open file %s ",mFileName.latin1() ); @@ -281,4 +283,4 @@ void KConfig::load() - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); + Q3TextStream t( &f ); + t.setEncoding( Q3TextStream::Latin1 ); QString line = t.readLine(); @@ -286,3 +288,3 @@ void KConfig::load() while ( !line.isNull() ) { - QStringList tokens = QStringList::split( ",", line ); + QStringList tokens = line.split(','); if ( tokens[0] == "bool" ) { @@ -325,3 +327,3 @@ void KConfig::sync() QFile f( mFileName ); - if ( !f.open( IO_WriteOnly ) ) { + if ( !f.open( QIODevice::WriteOnly ) ) { @@ -332,4 +334,4 @@ void KConfig::sync() - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); + Q3TextStream t( &f ); + t.setEncoding( Q3TextStream::Latin1 ); QMap<QString,bool>::ConstIterator itBool; diff --git a/microkde/kconfig.h b/microkde/kconfig.h index 1a1038f..7b91e44 100644 --- a/microkde/kconfig.h +++ b/microkde/kconfig.h @@ -5,3 +5,3 @@ #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qcolor.h> @@ -59,3 +59,3 @@ class KConfig //US added method readIntListEntry - QValueList<int> readIntListEntry( const QString &); + Q3ValueList<int> readIntListEntry( const QString &); @@ -71,3 +71,3 @@ class KConfig - void writeEntry( const QString &, const QValueList<int>& ); + void writeEntry( const QString &, const Q3ValueList<int>& ); void writeEntry( const QString &, int ); diff --git a/microkde/kdatepickernew.cpp b/microkde/kdatepickernew.cpp index f60a422..8f8001e 100644 --- a/microkde/kdatepickernew.cpp +++ b/microkde/kdatepickernew.cpp @@ -315,3 +315,3 @@ KDatePicker::selectMonthClicked() - QPopupMenu popup(selectMonth); + Q3PopupMenu popup(selectMonth); diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 353f78d..10dc449 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp @@ -46,2 +46,10 @@ #include <qdialog.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QFocusEvent> +#include <Q3Frame> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> #include <assert.h> @@ -71,3 +79,3 @@ KDateValidator::date(const QString& text, QDate& d) const } else - return Valid; + return QValidator::Intermediate; } @@ -80,4 +88,4 @@ KDateValidator::fixup( QString& ) const -KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) - : QGridView(parent, name, f) +KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, Qt::WFlags f) + : Q3GridView(parent, name, f) { @@ -88,3 +96,3 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) } - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( Qt::StrongFocus ); setNumRows(7); // 6 weeks max + headline @@ -95,3 +103,3 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) #if 0 - viewport()->setEraseColor(lightGray); + viewport()->setEraseColor(Qt::lightGray); #endif @@ -110,3 +118,3 @@ KDateTable::paintCell(QPainter *painter, int row, int col) int pos; - QBrush brushBlue(blue); + QBrush brushBlue(Qt::blue); QBrush brushLightblue(QColor(220,245,255)); @@ -135,14 +143,13 @@ KDateTable::paintCell(QPainter *painter, int row, int col) painter->drawRect(0, 0, w, h); - painter->setPen(blue); + painter->setPen(Qt::blue); } else { - painter->setPen(blue); + painter->setPen(Qt::blue); painter->setBrush(brushBlue); painter->drawRect(0, 0, w, h); - painter->setPen(white); + painter->setPen(Qt::white); } - painter->drawText(0, 0, w, h-1, AlignCenter, + painter->drawText(0, 0, w, h-1, Qt::AlignCenter, daystr, -1, &rect); - painter->setPen(black); - painter->moveTo(0, h-1); - painter->lineTo(w-1, h-1); + painter->setPen(Qt::black); + painter->drawLine(0, h-1, w-1, h-1); // ----- draw the weekday: @@ -163,6 +170,6 @@ KDateTable::paintCell(QPainter *painter, int row, int col) } - painter->setPen(gray); + painter->setPen(Qt::gray); } else { // paint a day of the current month text.setNum(pos-firstday+1); - painter->setPen(black); + painter->setPen(Qt::black); } @@ -173,12 +180,12 @@ KDateTable::paintCell(QPainter *painter, int row, int col) if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos) - painter->setPen(green); + painter->setPen(Qt::green); else - painter->setPen(red); + painter->setPen(Qt::red); if(hasFocus()) { - painter->setBrush(darkRed); - pen=white; + painter->setBrush(Qt::darkRed); + pen=QColor(Qt::white); } else { - painter->setBrush(darkGray); - pen=white; + painter->setBrush(Qt::darkGray); + pen=QColor(Qt::white); } @@ -187,5 +194,5 @@ KDateTable::paintCell(QPainter *painter, int row, int col) { - painter->setPen(green); - painter->setBrush(darkGreen); - pen=white; + painter->setPen(Qt::green); + painter->setBrush(Qt::darkGreen); + pen=QColor(Qt::white); } else { @@ -197,3 +204,3 @@ KDateTable::paintCell(QPainter *painter, int row, int col) painter->setPen(pen); - painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect); + painter->drawText(0, 0, w, h, Qt::AlignCenter, text, -1, &rect); } @@ -276,3 +283,3 @@ KDateTable::viewportResizeEvent(QResizeEvent * e) { - QGridView::viewportResizeEvent(e); + Q3GridView::viewportResizeEvent(e); @@ -411,3 +418,3 @@ void KDateTable::focusInEvent( QFocusEvent *e ) repaintContents(false); - QGridView::focusInEvent( e ); + Q3GridView::focusInEvent( e ); } @@ -417,3 +424,3 @@ void KDateTable::focusOutEvent( QFocusEvent *e ) repaintContents(false); - QGridView::focusOutEvent( e ); + Q3GridView::focusOutEvent( e ); } @@ -434,3 +441,3 @@ KDateInternalMonthPicker::KDateInternalMonthPicker (QWidget* parent, const char* name) - : QGridView(parent, name), + : Q3GridView(parent, name), result(0) // invalid @@ -453,3 +460,3 @@ KDateInternalMonthPicker::KDateInternalMonthPicker setVScrollBarMode(AlwaysOff); - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); setNumRows(4); @@ -459,3 +466,3 @@ KDateInternalMonthPicker::KDateInternalMonthPicker #if 0 - viewport()->setEraseColor(lightGray); // for consistency with the datepicker + viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker #endif @@ -489,3 +496,3 @@ KDateInternalMonthPicker::setupPainter(QPainter *p) { - p->setPen(black); + p->setPen(Qt::black); } @@ -507,3 +514,3 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col) text=KGlobal::locale()->monthName(index, false); - painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text); + painter->drawText(0, 0, cellWidth(), cellHeight(), Qt::AlignCenter, text); if ( activeCol == col && activeRow == row ) @@ -515,3 +522,3 @@ KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e) { - if(!isEnabled() || e->button() != LeftButton) + if(!isEnabled() || e->button() != Qt::LeftButton) { @@ -542,3 +549,3 @@ KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e) { - if (e->state() & LeftButton) + if (e->state() & Qt::LeftButton) { @@ -616,3 +623,3 @@ KDateInternalYearSelector::KDateInternalYearSelector #if 0 - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); #endif @@ -663,3 +670,3 @@ KDateInternalYearSelector::setYear(int year) KPopupFrame::KPopupFrame(QWidget* parent, const char* name) - : QFrame(parent, name, WType_Popup), + : Q3Frame(parent, name, Qt::WType_Popup), result(0), // rejected @@ -667,3 +674,3 @@ KPopupFrame::KPopupFrame(QWidget* parent, const char* name) { - setFrameStyle(QFrame::Box|QFrame::Raised); + setFrameStyle(Q3Frame::Box|Q3Frame::Raised); setMidLineWidth(2); @@ -674,3 +681,3 @@ KPopupFrame::keyPressEvent(QKeyEvent* e) { - if(e->key()==Key_Escape) + if(e->key()==Qt::Key_Escape) { @@ -758,3 +765,3 @@ KDateInternalWeekPicker::KDateInternalWeekPicker (QWidget* parent, const char* name) - : QGridView(parent, name), + : Q3GridView(parent, name), result(0) // invalid @@ -775,3 +782,3 @@ KDateInternalWeekPicker::KDateInternalWeekPicker setVScrollBarMode(AlwaysOff); - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); if ( QApplication::desktop()->height() > 240 ) { @@ -786,3 +793,3 @@ KDateInternalWeekPicker::KDateInternalWeekPicker #if 0 - viewport()->setEraseColor(lightGray); // for consistency with the datepicker + viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker #endif @@ -820,3 +827,3 @@ KDateInternalWeekPicker::setupPainter(QPainter *p) { - p->setPen(black); + p->setPen(Qt::black); } @@ -838,3 +845,3 @@ KDateInternalWeekPicker::paintCell(QPainter* painter, int row, int col) text=QString::number( index ); - painter->drawText(0, 0, cellWidth(), cellHeight(), AlignCenter, text); + painter->drawText(0, 0, cellWidth(), cellHeight(), Qt::AlignCenter, text); if ( activeCol == col && activeRow == row ) @@ -846,3 +853,3 @@ KDateInternalWeekPicker::contentsMousePressEvent(QMouseEvent *e) { - if(!isEnabled() || e->button() != LeftButton) + if(!isEnabled() || e->button() != Qt::LeftButton) { @@ -873,3 +880,3 @@ KDateInternalWeekPicker::contentsMouseMoveEvent(QMouseEvent *e) { - if (e->state() & LeftButton) + if (e->state() & Qt::LeftButton) { diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h index 87808df..2d3d2cf 100644 --- a/microkde/kdatetbl.h +++ b/microkde/kdatetbl.h @@ -23,5 +23,11 @@ #include <qvalidator.h> -#include <qgridview.h> +#include <q3gridview.h> #include <qlineedit.h> #include <qdatetime.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QMouseEvent> +#include <Q3Frame> +#include <QKeyEvent> +#include <QFocusEvent> @@ -33,3 +39,3 @@ */ -class KDateInternalMonthPicker : public QGridView +class KDateInternalMonthPicker : public Q3GridView { @@ -129,3 +135,3 @@ private: */ -class KPopupFrame : public QFrame +class KPopupFrame : public Q3Frame { @@ -184,3 +190,3 @@ private: - virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); } + virtual bool close(bool alsoDelete) { return Q3Frame::close(alsoDelete); } protected: @@ -217,3 +223,3 @@ public: */ -class KDateTable : public QGridView +class KDateTable : public Q3GridView { @@ -226,3 +232,3 @@ public: QDate date=QDate::currentDate(), - const char* name=0, WFlags f=0); + const char* name=0, Qt::WFlags f=0); /** @@ -309,3 +315,3 @@ private: #endif // KDATETBL_H -class KDateInternalWeekPicker : public QGridView +class KDateInternalWeekPicker : public Q3GridView { diff --git a/microkde/kdebug.h b/microkde/kdebug.h index bb9cfe3..534943c 100644 --- a/microkde/kdebug.h +++ b/microkde/kdebug.h @@ -6,2 +6,4 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3CString> @@ -66,3 +68,3 @@ class kdbgstream { } - kdbgstream &operator<<(const QCString&) { + kdbgstream &operator<<(const Q3CString&) { return *this; 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 @@ -22,2 +22,4 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3CString> @@ -90,3 +92,3 @@ void KCatalogue::setFileName( const QString & fileName ) - QCString newFileName = QFile::encodeName( fileName ); + Q3CString newFileName = QFile::encodeName( fileName ); 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 @@ -28,2 +28,4 @@ #include "kconfig.h" +//Added by qt3to4: +#include <Q3CString> @@ -84,3 +86,3 @@ public: - KConfigGroupSaver( KConfig* config, const QCString &group ) + KConfigGroupSaver( KConfig* config, const Q3CString &group ) : _config(config), _oldgroup(config->group()) 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 @@ -22,5 +22,8 @@ #include <qtimer.h> -#include <qobjectdict.h> -#include <qwidgetlist.h> +#include <q3objectdict.h> #include <qwidget.h> +#include <qwidget.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> @@ -47,3 +50,3 @@ -template class QAsciiDict<KLibrary>; +template class Q3AsciiDict<KLibrary>; @@ -122,3 +125,3 @@ KLibrary::~KLibrary() { - QPtrListIterator<QObject> it( m_objs ); + Q3PtrListIterator<QObject> it( m_objs ); for ( ; it.current() ; ++it ) @@ -154,3 +157,3 @@ KLibFactory* KLibrary::factory() - QCString symname; + Q3CString symname; symname.sprintf("init_%s", name().latin1() ); @@ -307,4 +310,4 @@ class KLibLoaderPrivate public: - QPtrList<KLibWrapPrivate> loaded_stack; - QPtrList<KLibWrapPrivate> pending_close; + Q3PtrList<KLibWrapPrivate> loaded_stack; + Q3PtrList<KLibWrapPrivate> pending_close; enum {UNKNOWN, UNLOAD, DONT_UNLOAD} unload_mode; @@ -350,3 +353,3 @@ KLibLoader::~KLibLoader() - QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); + Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs ); for (; it.current(); ++it ) @@ -366,3 +369,3 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta { - QCString libname( name ); + Q3CString libname( name ); @@ -423,3 +426,3 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta kdDebug(150) << "library=" << libname << ": No file names " << libname.data() << " found in paths." << endl; - self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(libname); + self()->d->errorMessage = i18n("Library files for \"%1\" not found in paths").arg(QString(libname)); @@ -471,3 +474,3 @@ KLibrary* KLibLoader::library( const char *name ) unloaded meanwhile, whithout being dlclose()'ed. */ - QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); + Q3PtrListIterator<KLibWrapPrivate> it(d->loaded_stack); for (; it.current(); ++it) { @@ -552,3 +555,3 @@ void KLibLoader::slotLibraryDestroyed() - QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); + Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs ); for (; it.current(); ++it ) @@ -571,3 +574,3 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) the DSO behind it. */ - QPtrListIterator<KLibWrapPrivate> it(d->pending_close); + Q3PtrListIterator<KLibWrapPrivate> it(d->pending_close); for (; it.current(); ++it) { 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 @@ -23,4 +23,4 @@ #include <qstringlist.h> -#include <qasciidict.h> -#include <qptrlist.h> +#include <q3asciidict.h> +#include <q3ptrlist.h> #include <kglobal.h> @@ -54,3 +54,3 @@ class KLibrary : public QObject friend class KLibLoader; - friend class QAsciiDict<KLibrary>; + friend class Q3AsciiDict<KLibrary>; @@ -129,3 +129,3 @@ private: QLibrary* m_handle; - QPtrList<QObject> m_objs; + Q3PtrList<QObject> m_objs; QTimer *m_timer; @@ -289,3 +289,3 @@ private: void close_pending( KLibWrapPrivate * ); - QAsciiDict<KLibWrapPrivate> m_libs; + Q3AsciiDict<KLibWrapPrivate> m_libs; 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 @@ -2,2 +2,3 @@ #include <qapplication.h> +#include <QDesktopWidget> @@ -13,4 +14,4 @@ -QDict<QString> *mLocaleDict = 0; -void setLocaleDict( QDict<QString> * dict ) +Q3Dict<QString> *mLocaleDict = 0; +void setLocaleDict( Q3Dict<QString> * dict ) { @@ -47,3 +48,3 @@ void addExist(const char *text,QString trans ) #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -55,6 +56,6 @@ void dumpMissing() QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -72,6 +73,6 @@ void dumpMissing() QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -469,3 +470,3 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime, format = "%1 %2"; - else if ( intIntDateFormat == ISODate ) + else if ( intIntDateFormat == Qt::ISODate ) format = "%1T%2"; @@ -529,3 +530,3 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con c = fmt.at(fmtpos++); - switch (c) + switch (c.unicode()) { @@ -640,3 +641,3 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const c = Format.at(Formatpos++); - switch (c) + switch (c.unicode()) { @@ -736,3 +737,3 @@ QDateTime KLocale::readDateTime(const QString &intstr, QDate m_date = readDate(date, dformat, &ok1); - QTime m_time = readTime(time, tformat, &ok2); + QTime m_time = readTime(time, !tformat.isEmpty(), &ok2); 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 @@ -6,3 +6,3 @@ #include <qdatetime.h> -#include <qdict.h> +#include <q3dict.h> @@ -13,3 +13,3 @@ class KCalendarSystem; -void setLocaleDict( QDict<QString> * dict ); +void setLocaleDict( Q3Dict<QString> * dict ); QString i18n(const char *text); 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 @@ -41,2 +41,4 @@ #include "kmdcodec.h" +//Added by qt3to4: +#include <Q3CString> @@ -149,3 +151,3 @@ static int rikFindChar(register const char * _s, const char c) -QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) +Q3CString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) { @@ -153,6 +155,6 @@ QCString KCodecs::quotedPrintableEncode(const QByteArray& in, bool useCRLF) quotedPrintableEncode (in, out, useCRLF); - return QCString (out.data(), out.size()+1); + return Q3CString (out.data(), out.size()+1); } -QCString KCodecs::quotedPrintableEncode(const QCString& str, bool useCRLF) +Q3CString KCodecs::quotedPrintableEncode(const Q3CString& str, bool useCRLF) { @@ -282,3 +284,3 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool -QCString KCodecs::quotedPrintableDecode(const QByteArray & in) +Q3CString KCodecs::quotedPrintableDecode(const QByteArray & in) { @@ -286,6 +288,6 @@ QCString KCodecs::quotedPrintableDecode(const QByteArray & in) quotedPrintableDecode (in, out); - return QCString (out.data(), out.size()+1); + return Q3CString (out.data(), out.size()+1); } -QCString KCodecs::quotedPrintableDecode(const QCString & str) +Q3CString KCodecs::quotedPrintableDecode(const Q3CString & str) { @@ -357,3 +359,3 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out) -QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) +Q3CString KCodecs::base64Encode( const Q3CString& str, bool insertLFs ) { @@ -367,3 +369,3 @@ QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) -QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) +Q3CString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) { @@ -371,3 +373,3 @@ QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) base64Encode( in, out, insertLFs ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -407,11 +409,11 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, if ( count && (count%76) == 0 ) - out.at(didx++) = '\n'; + out[didx++] = '\n'; count += 4; } - out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077]; + out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = Base64EncMap[(data[sidx+2] >> 6) & 003 | + out[didx++] = Base64EncMap[(data[sidx+2] >> 6) & 003 | (data[sidx+1] << 2) & 077]; - out.at(didx++) = Base64EncMap[data[sidx+2] & 077]; + out[didx++] = Base64EncMap[data[sidx+2] & 077]; sidx += 3; @@ -423,10 +425,10 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, if ( insertLFs && (count > 0) && (count%76) == 0 ) - out.at(didx++) = '\n'; + out[didx++] = '\n'; - out.at(didx++) = Base64EncMap[(data[sidx] >> 2) & 077]; + out[didx++] = Base64EncMap[(data[sidx] >> 2) & 077]; if (sidx < len-1) { - out.at(didx++) = Base64EncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = Base64EncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = Base64EncMap[(data[sidx+1] << 2) & 077]; + out[didx++] = Base64EncMap[(data[sidx+1] << 2) & 077]; } @@ -434,3 +436,3 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, { - out.at(didx++) = Base64EncMap[(data[sidx] << 4) & 077]; + out[didx++] = Base64EncMap[(data[sidx] << 4) & 077]; } @@ -440,9 +442,6 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, while (didx < out.size()) - { - out.at(didx) = '='; - didx++; - } + out[didx++] = '='; } -QCString KCodecs::base64Decode( const QCString& str ) +Q3CString KCodecs::base64Decode( const Q3CString& str ) { @@ -456,3 +455,3 @@ QCString KCodecs::base64Decode( const QCString& str ) -QCString KCodecs::base64Decode( const QByteArray& in ) +Q3CString KCodecs::base64Decode( const QByteArray& in ) { @@ -460,3 +459,3 @@ QCString KCodecs::base64Decode( const QByteArray& in ) base64Decode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -507,3 +506,3 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) { - out.at(outIdx++) = Base64DecMap[ch]; + out[outIdx++] = Base64DecMap[ch]; } @@ -525,5 +524,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) { - out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); - out.at(didx+1) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); - out.at(didx+2) = (((out.at(sidx+2) << 6) & 255) | (out.at(sidx+3) & 077)); + out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003)); + out[didx+1] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017)); + out[didx+2] = (((out[sidx+2] << 6) & 255) | (out[sidx+3] & 077)); sidx += 4; @@ -534,6 +533,6 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) if (didx < len) - out.at(didx) = (((out.at(sidx) << 2) & 255) | ((out.at(sidx+1) >> 4) & 003)); + out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx+1] >> 4) & 003)); if (++didx < len ) - out.at(didx) = (((out.at(sidx+1) << 4) & 255) | ((out.at(sidx+2) >> 2) & 017)); + out[didx] = (((out[sidx+1] << 4) & 255) | ((out[sidx+2] >> 2) & 017)); @@ -544,3 +543,3 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) -QCString KCodecs::uuencode( const QCString& str ) +Q3CString KCodecs::uuencode( const Q3CString& str ) { @@ -555,3 +554,3 @@ QCString KCodecs::uuencode( const QCString& str ) -QCString KCodecs::uuencode( const QByteArray& in ) +Q3CString KCodecs::uuencode( const QByteArray& in ) { @@ -559,3 +558,3 @@ QCString KCodecs::uuencode( const QByteArray& in ) uuencode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -582,3 +581,3 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) // line length - out.at(didx++) = UUEncMap[line_len]; + out[didx++] = UUEncMap[line_len]; @@ -587,8 +586,8 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | + out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 | (data[sidx+1] << 2) & 077]; - out.at(didx++) = UUEncMap[data[sidx+2] & 077]; + out[didx++] = UUEncMap[data[sidx+2] & 077]; } @@ -597,3 +596,3 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) //for (unsigned int idx=0; idx < nl_len; idx++) - //out.at(didx++) = nl[idx]; + //out[didx++] = nl[idx]; memcpy(out.data()+didx, nl, nl_len); @@ -603,3 +602,3 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) // line length - out.at(didx++) = UUEncMap[len-sidx]; + out[didx++] = UUEncMap[len-sidx]; // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion @@ -607,8 +606,8 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+2] >> 6) & 003 | + out[didx++] = UUEncMap[(data[sidx+2] >> 6) & 003 | (data[sidx+1] << 2) & 077]; - out.at(didx++) = UUEncMap[data[sidx+2] & 077]; + out[didx++] = UUEncMap[data[sidx+2] & 077]; sidx += 3; @@ -618,7 +617,7 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] >> 4) & 017 | + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx+1] >> 4) & 017 | (data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[(data[sidx+1] << 2) & 077]; - out.at(didx++) = UUEncMap[0]; + out[didx++] = UUEncMap[(data[sidx+1] << 2) & 077]; + out[didx++] = UUEncMap[0]; } @@ -626,6 +625,6 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) { - out.at(didx++) = UUEncMap[(data[sidx] >> 2) & 077]; - out.at(didx++) = UUEncMap[(data[sidx] << 4) & 077]; - out.at(didx++) = UUEncMap[0]; - out.at(didx++) = UUEncMap[0]; + out[didx++] = UUEncMap[(data[sidx] >> 2) & 077]; + out[didx++] = UUEncMap[(data[sidx] << 4) & 077]; + out[didx++] = UUEncMap[0]; + out[didx++] = UUEncMap[0]; } @@ -641,3 +640,3 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) -QCString KCodecs::uudecode( const QCString& str ) +Q3CString KCodecs::uudecode( const Q3CString& str ) { @@ -652,3 +651,3 @@ QCString KCodecs::uudecode( const QCString& str ) -QCString KCodecs::uudecode( const QByteArray& in ) +Q3CString KCodecs::uudecode( const QByteArray& in ) { @@ -656,3 +655,3 @@ QCString KCodecs::uudecode( const QByteArray& in ) uudecode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -707,5 +706,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) D = UUDecMap[(unsigned char) data[sidx+3]]; - out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); - out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); - out.at(didx++) = ( ((C << 6) & 255) | (D & 077) ); + out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) ); + out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) ); + out[didx++] = ( ((C << 6) & 255) | (D & 077) ); sidx += 4; @@ -718,3 +717,3 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) B = UUDecMap[(unsigned char) data[sidx+1]]; - out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); + out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) ); } @@ -725,3 +724,3 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) C = UUDecMap[(unsigned char) data[sidx+2]]; - out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); + out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) ); } @@ -763,3 +762,3 @@ KMD5::KMD5(const QByteArray& in) -KMD5::KMD5(const QCString& in) +KMD5::KMD5(const Q3CString& in) { @@ -774,3 +773,3 @@ void KMD5::update(const QByteArray& in) -void KMD5::update(const QCString& in) +void KMD5::update(const Q3CString& in) { @@ -875,3 +874,3 @@ bool KMD5::verify( const KMD5::Digest& digest) -bool KMD5::verify( const QCString& hexdigest) +bool KMD5::verify( const Q3CString& hexdigest) { @@ -894,5 +893,5 @@ void KMD5::rawDigest( KMD5::Digest& bin ) -QCString KMD5::hexDigest() +Q3CString KMD5::hexDigest() { - QCString s(33); + Q3CString s(33); @@ -907,3 +906,3 @@ QCString KMD5::hexDigest() -void KMD5::hexDigest(QCString& s) +void KMD5::hexDigest(Q3CString& s) { @@ -917,3 +916,3 @@ void KMD5::hexDigest(QCString& s) -QCString KMD5::base64Digest() +Q3CString KMD5::base64Digest() { @@ -958,3 +957,3 @@ void KMD5::transform( const unsigned char block[64] ) //US Q_ASSERT(!m_finalized); // not just a user error, since the method is private - ASSERT(!m_finalized); // not just a user error, since the method is private + Q_ASSERT(!m_finalized); // not just a user error, since the method is private 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 @@ -41,2 +41,4 @@ #include <qiodevice.h> +//Added by qt3to4: +#include <Q3CString> @@ -83,3 +85,3 @@ public: */ - static QCString quotedPrintableEncode(const QByteArray & in, + static Q3CString quotedPrintableEncode(const QByteArray & in, bool useCRLF = true); @@ -98,3 +100,3 @@ public: */ - static QCString quotedPrintableEncode(const QCString & str, + static Q3CString quotedPrintableEncode(const Q3CString & str, bool useCRLF = true); @@ -131,3 +133,3 @@ public: */ - static QCString quotedPrintableDecode(const QByteArray & in); + static Q3CString quotedPrintableDecode(const QByteArray & in); @@ -142,3 +144,3 @@ public: */ - static QCString quotedPrintableDecode(const QCString & str); + static Q3CString quotedPrintableDecode(const Q3CString & str); @@ -177,3 +179,3 @@ public: */ - static QCString uuencode( const QByteArray& in ); + static Q3CString uuencode( const QByteArray& in ); @@ -188,3 +190,3 @@ public: */ - static QCString uuencode( const QCString& str ); + static Q3CString uuencode( const Q3CString& str ); @@ -217,3 +219,3 @@ public: */ - static QCString uudecode( const QByteArray& in ); + static Q3CString uudecode( const QByteArray& in ); @@ -228,3 +230,3 @@ public: */ - static QCString uudecode( const QCString& str ); + static Q3CString uudecode( const Q3CString& str ); @@ -265,3 +267,3 @@ public: */ - static QCString base64Encode( const QByteArray& in, bool insertLFs = false); + static Q3CString base64Encode( const QByteArray& in, bool insertLFs = false); @@ -277,3 +279,3 @@ public: */ - static QCString base64Encode( const QCString& str, bool insertLFs = false ); + static Q3CString base64Encode( const Q3CString& str, bool insertLFs = false ); @@ -310,3 +312,3 @@ public: */ - static QCString base64Decode( const QByteArray& in ); + static Q3CString base64Decode( const QByteArray& in ); @@ -321,3 +323,3 @@ public: */ - static QCString base64Decode( const QCString& str ); + static Q3CString base64Decode( const Q3CString& str ); @@ -433,3 +435,3 @@ public: */ - KMD5(const QCString& a ); + KMD5(const Q3CString& a ); @@ -462,3 +464,3 @@ public: */ - void update(const QCString& in ); + void update(const Q3CString& in ); @@ -504,3 +506,3 @@ public: */ - QCString hexDigest (); + Q3CString hexDigest (); @@ -509,3 +511,3 @@ public: */ - void hexDigest(QCString&); + void hexDigest(Q3CString&); @@ -515,3 +517,3 @@ public: */ - QCString base64Digest (); + Q3CString base64Digest (); @@ -526,3 +528,3 @@ public: */ - bool verify(const QCString&); + bool verify(const Q3CString&); 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 @@ -23,2 +23,4 @@ #include <qcolor.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -142,4 +144,4 @@ class KPrefsItemIntList : public KPrefsItem { public: - KPrefsItemIntList(const QString &group,const QString &name,QValueList<int> *, - const QValueList<int> &defaultValue=QValueList<int>()); + KPrefsItemIntList(const QString &group,const QString &name,Q3ValueList<int> *, + const Q3ValueList<int> &defaultValue=Q3ValueList<int>()); virtual ~KPrefsItemIntList() {} @@ -151,4 +153,4 @@ class KPrefsItemIntList : public KPrefsItem { private: - QValueList<int> *mReference; - QValueList<int> mDefault; + Q3ValueList<int> *mReference; + Q3ValueList<int> mDefault; }; @@ -366,3 +368,3 @@ void KPrefsItemStringList::readConfig(KConfig *config) KPrefsItemIntList::KPrefsItemIntList(const QString &group,const QString &name, - QValueList<int> *reference,const QValueList<int> &defaultValue) : + Q3ValueList<int> *reference,const Q3ValueList<int> &defaultValue) : KPrefsItem(group,name) @@ -507,4 +509,4 @@ void KPrefs::addItemStringList(const QString &key,QStringList *reference, -void KPrefs::addItemIntList(const QString &key,QValueList<int> *reference, - const QValueList<int> &defaultValue) +void KPrefs::addItemIntList(const QString &key,Q3ValueList<int> *reference, + const Q3ValueList<int> &defaultValue) { 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 @@ -23,3 +23,3 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qcolor.h> @@ -28,2 +28,4 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -285,4 +287,4 @@ class KPrefs { */ - void addItemIntList(const QString &key,QValueList<int> *reference, - const QValueList<int> &defaultValue=QValueList<int>()); + void addItemIntList(const QString &key,Q3ValueList<int> *reference, + const Q3ValueList<int> &defaultValue=Q3ValueList<int>()); @@ -312,3 +314,3 @@ class KPrefs { - QPtrList<KPrefsItem> mItems; + Q3PtrList<KPrefsItem> mItems; }; 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 @@ -565,3 +565,3 @@ class KShortcut */ - KShortcut( int keyQt ) {} + KShortcut( int /*keyQt */) {} @@ -601,3 +601,3 @@ class KShortcut */ - KShortcut( const char* shortcut ) {} + KShortcut( const char* /*shortcut */) {} @@ -610,3 +610,3 @@ class KShortcut */ - KShortcut( const QString& shortcut ) {} + KShortcut( const QString& /*shortcut */) {} ~KShortcut() {} @@ -818,3 +818,3 @@ class KShortcut */ - QString toStringInternal( const KShortcut* pcutDefault = 0 ) const + QString toStringInternal( const KShortcut* /*pcutDefault*/ = 0 ) const { 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 @@ -39,4 +39,4 @@ #include <qregexp.h> -#include <qasciidict.h> -#include <qdict.h> +#include <q3asciidict.h> +#include <q3dict.h> #include <qdir.h> @@ -48,2 +48,4 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <Q3CString> @@ -61,11 +63,11 @@ QString KStandardDirs::mAppDir = QString::null; -template class QDict<QStringList>; +template class Q3Dict<QStringList>; #if 0 -#include <qtextedit.h> +#include <q3textedit.h> void ddd( QString op ) { - static QTextEdit * dot = 0; + static Q3TextEdit * dot = 0; if ( ! dot ) - dot = new QTextEdit(); + dot = new Q3TextEdit(); @@ -87,3 +89,3 @@ public: bool dataRestrictionActive; - QAsciiDict<bool> restrictions; + Q3AsciiDict<bool> restrictions; QStringList xdgdata_prefixes; @@ -447,3 +449,3 @@ static void lookupDirectory(const QString& path, const QString &relPart, //US this should do the same: - int pos = regexp.match(fn); + int pos = regexp.exactMatch(fn); if (!recursive && !pos == 0) @@ -484,3 +486,3 @@ static void lookupDirectory(const QString& path, const QString &relPart, //US this should do the same: - pos = regexp.match(fn); + pos = regexp.exactMatch(fn); if (!pos == 0) @@ -1110,3 +1112,3 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode) base += target.mid(i - 1, pos - i + 1); - QCString baseEncoded = QFile::encodeName(base); + Q3CString baseEncoded = QFile::encodeName(base); // bail out if we encountered a problem @@ -1210,3 +1212,3 @@ QString readEnvPath(const char *env) //#else - QCString c_path; + Q3CString c_path; if ( getenv(env) != NULL ) 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 @@ -26,3 +26,3 @@ #include <qstring.h> -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> @@ -576,7 +576,7 @@ public: // Directory dictionaries - QDict<QStringList> absolutes; - QDict<QStringList> relatives; + Q3Dict<QStringList> absolutes; + Q3Dict<QStringList> relatives; - mutable QDict<QStringList> dircache; - mutable QDict<QString> savelocations; + mutable Q3Dict<QStringList> dircache; + mutable Q3Dict<QString> savelocations; 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 @@ -30,2 +30,5 @@ #include <qtooltip.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> //US#include <qwhatsthis.h> @@ -44,5 +47,5 @@ #include <qmenubar.h> -#include <qtoolbar.h> -#include <qpopupmenu.h> -#include <qiconset.h> +#include <q3toolbar.h> +#include <q3popupmenu.h> +#include <qicon.h> @@ -89,3 +92,3 @@ public: KAccel *m_kaccel; - QValueList<KAccel*> m_kaccelList; + Q3ValueList<KAccel*> m_kaccelList; @@ -109,3 +112,3 @@ public: - QValueList<Container> m_containers; + Q3ValueList<Container> m_containers; }; @@ -132,3 +135,3 @@ KAction::KAction( const QString& text, const QString& sIconName, const KShortcut -KAction::KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, +KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, @@ -166,3 +169,3 @@ KAction::KAction( const QString& text, const KShortcut& cut, } -KAction::KAction( const QString& text, const QIconSet& pix, +KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -184,3 +187,3 @@ KAction::KAction( const QString& text, const QString& pix, -KAction::KAction( const QString& text, const QIconSet& pix, +KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -508,4 +511,4 @@ void KAction::updateShortcut( int i ) QWidget* w = container( i ); - if ( w->inherits( "QPopupMenu" ) ) { - QPopupMenu* menu = static_cast<QPopupMenu*>(w); + if ( w->inherits( "Q3PopupMenu" ) ) { + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>(w); updateShortcut( menu, id ); @@ -520,3 +523,3 @@ void KAction::updateShortcut( int i ) -void KAction::updateShortcut( QPopupMenu* menu, int id ) +void KAction::updateShortcut( Q3PopupMenu* menu, int id ) { @@ -623,3 +626,3 @@ void KAction::updateToolTip( int i ) QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); - else if ( w->inherits( "QToolBar" ) ) + else if ( w->inherits( "Q3ToolBar" ) ) QToolTip::add( static_cast<KToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); @@ -648,5 +651,5 @@ int KAction::plug( QWidget *w, int index ) - if ( w->inherits("QPopupMenu") ) + if ( w->inherits("Q3PopupMenu") ) { - QPopupMenu* menu = static_cast<QPopupMenu*>( w ); + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( w ); int id; @@ -723,3 +726,3 @@ int KAction::plug( QWidget *w, int index ) } - bar->getButton( id_ )->setName( QCString("toolbutton_")+name() ); + bar->getButton( id_ )->setName( Q3CString("toolbutton_")+name() ); @@ -751,5 +754,5 @@ void KAction::unplug( QWidget *w ) - if ( w->inherits( "QPopupMenu" ) ) + if ( w->inherits( "Q3PopupMenu" ) ) { - QPopupMenu *menu = static_cast<QPopupMenu *>( w ); + Q3PopupMenu *menu = static_cast<Q3PopupMenu *>( w ); menu->removeItem( id ); @@ -864,4 +867,4 @@ void KAction::updateEnabled( int i ) - if ( w->inherits("QPopupMenu") ) - static_cast<QPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); + if ( w->inherits("Q3PopupMenu") ) + static_cast<Q3PopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); else if ( w->inherits("QMenuBar") ) @@ -908,6 +911,6 @@ void KAction::updateText( int i ) - if ( w->inherits( "QPopupMenu" ) ) { + if ( w->inherits( "Q3PopupMenu" ) ) { int id = itemId( i ); - static_cast<QPopupMenu*>(w)->changeItem( id, d->text() ); - updateShortcut( static_cast<QPopupMenu*>(w), id ); + static_cast<Q3PopupMenu*>(w)->changeItem( id, d->text() ); + updateShortcut( static_cast<Q3PopupMenu*>(w), id ); } @@ -949,6 +952,6 @@ void KAction::updateIcon( int id ) - if ( w->inherits( "QPopupMenu" ) ) { + if ( w->inherits( "Q3PopupMenu" ) ) { int itemId_ = itemId( id ); - static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() ); - updateShortcut( static_cast<QPopupMenu*>(w), itemId_ ); + static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() ); + updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ ); } @@ -958,3 +961,3 @@ void KAction::updateIcon( int id ) static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); - else if ( w->inherits( "QToolBar" ) ) + else if ( w->inherits( "Q3ToolBar" ) ) { @@ -970,3 +973,3 @@ QString KAction::icon() const -void KAction::setIconSet( const QIconSet &iconset ) +void KAction::setIconSet( const QIcon &iconset ) { @@ -984,7 +987,7 @@ void KAction::updateIconSet( int id ) - if ( w->inherits( "QPopupMenu" ) ) + if ( w->inherits( "Q3PopupMenu" ) ) { int itemId_ = itemId( id ); - static_cast<QPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() ); - updateShortcut( static_cast<QPopupMenu*>(w), itemId_ ); + static_cast<Q3PopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() ); + updateShortcut( static_cast<Q3PopupMenu*>(w), itemId_ ); } @@ -1001,3 +1004,3 @@ void KAction::updateIconSet( int id ) -QIconSet KAction::iconSet( KIcon::Group group, int size ) const +QIcon KAction::iconSet( KIcon::Group group, int size ) const { @@ -1024,3 +1027,3 @@ void KAction::updateWhatsThis( int i ) qDebug("KAction::updateWhatsThis ...1 has top be fixed"); - QPopupMenu* pm = popupMenu( i ); + Q3PopupMenu* pm = popupMenu( i ); if ( pm ) @@ -1066,6 +1069,6 @@ KToolBar* KAction::toolBar( int index ) const -QPopupMenu* KAction::popupMenu( int index ) const +Q3PopupMenu* KAction::popupMenu( int index ) const { //US return dynamic_cast<QPopupMenu *>( d->m_containers[ index ].m_container ); - return (QPopupMenu *)( d->m_containers[ index ].m_container ); + return (Q3PopupMenu *)( d->m_containers[ index ].m_container ); } @@ -1157,3 +1160,3 @@ int KAction::findContainer( const QWidget* widget ) const int pos = 0; - QValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin(); + Q3ValueList<KActionPrivate::Container>::ConstIterator it = d->m_containers.begin(); while( it != d->m_containers.end() ) @@ -1172,3 +1175,3 @@ void KAction::removeContainer( int index ) int i = 0; - QValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin(); + Q3ValueList<KActionPrivate::Container>::Iterator it = d->m_containers.begin(); while( it != d->m_containers.end() ) 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 @@ -31,4 +31,6 @@ #include <qobject.h> -#include <qvaluelist.h> -#include <qguardedptr.h> +#include <q3valuelist.h> +#include <qpointer.h> +//Added by qt3to4: +#include <Q3PopupMenu> #include <kguiitem.h> @@ -42,6 +44,6 @@ class QMenuBar; -class QPopupMenu; +class Q3PopupMenu; //USclass QComboBox; //USclass QPoint; -class QIconSet; +class QIcon; class QString; @@ -261,3 +263,3 @@ public: - KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, @@ -310,3 +312,3 @@ public: */ - KAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -320,3 +322,3 @@ public: */ - KAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); @@ -463,6 +465,6 @@ public: */ - virtual QIconSet iconSet( KIcon::Group group, int size=0 ) const; + virtual QIcon iconSet( KIcon::Group group, int size=0 ) const; #ifndef KDE_NO_COMPAT - QIconSet iconSet() const + QIcon iconSet() const { @@ -520,3 +522,3 @@ public slots: */ - virtual void setIconSet( const QIconSet &iconSet ); + virtual void setIconSet( const QIcon &iconSet ); @@ -548,3 +550,3 @@ protected: KToolBar* toolBar( int index ) const; - QPopupMenu* popupMenu( int index ) const; + Q3PopupMenu* popupMenu( int index ) const; void removeContainer( int index ); @@ -557,3 +559,3 @@ protected: virtual void updateShortcut( int i ); - virtual void updateShortcut( QPopupMenu* menu, int id ); + virtual void updateShortcut( Q3PopupMenu* menu, int id ); virtual void updateGroup( int id ); 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 @@ -30,5 +30,7 @@ #include <qfontdatabase.h> -#include <qobjectlist.h> +#include <qobject.h> //US#include <qwhatsthis.h> #include <qtimer.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -50,9 +52,9 @@ #include <qwidget.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qmenubar.h> -#include <qmainwindow.h> -#include <qtoolbar.h> +#include <q3mainwindow.h> +#include <q3toolbar.h> #include <qcombobox.h> -#include <qmainwindow.h> - +#include <q3mainwindow.h> +#include <qcoreapplication.h> @@ -85,3 +87,3 @@ static void get_fonts( QStringList &lst ) -static QValueList<int> get_standard_font_sizes() +static Q3ValueList<int> get_standard_font_sizes() { @@ -122,3 +124,3 @@ KToggleAction::KToggleAction( const QString& text, const KShortcut& cut, -KToggleAction::KToggleAction( const QString& text, const QIconSet& pix, +KToggleAction::KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -138,3 +140,3 @@ KToggleAction::KToggleAction( const QString& text, const QString& pix, -KToggleAction::KToggleAction( const QString& text, const QIconSet& pix, +KToggleAction::KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -171,3 +173,3 @@ int KToggleAction::plug( QWidget* widget, int index ) { - if ( !widget->inherits("QPopupMenu") && !widget->inherits("KToolBar") ) + if ( !widget->inherits("Q3PopupMenu") && !widget->inherits("KToolBar") ) { @@ -186,3 +188,3 @@ int KToggleAction::plug( QWidget* widget, int index ) - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("Q3PopupMenu") ) { @@ -190,3 +192,3 @@ int KToggleAction::plug( QWidget* widget, int index ) - static_cast<QPopupMenu*>(widget)->setItemChecked( id, d->m_checked ); + static_cast<Q3PopupMenu*>(widget)->setItemChecked( id, d->m_checked ); } else if ( widget->inherits( "KToolBar" ) ) { @@ -216,9 +218,8 @@ void KToggleAction::setChecked( bool c ) if ( c && parent() && !exclusiveGroup().isEmpty() ) { - const QObjectList *list = parent()->children(); - if ( list ) { - QObjectListIt it( *list ); - for( ; it.current(); ++it ) { - if ( it.current()->inherits( "KToggleAction" ) && it.current() != this && - static_cast<KToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { - KToggleAction *a = static_cast<KToggleAction*>(it.current()); + const QObjectList list = parent()->children(); + if ( !list.empty() ) { + for(QObjectList::const_iterator it=list.begin();it!=list.end();++it) { + if ( (*it)->inherits( "KToggleAction" ) && (*it) != this && + static_cast<KToggleAction*>((*it))->exclusiveGroup() == exclusiveGroup() ) { + KToggleAction *a = static_cast<KToggleAction*>(*it); if( a->isChecked() ) { @@ -237,4 +238,4 @@ void KToggleAction::updateChecked( int id ) - if ( w->inherits( "QPopupMenu" ) ) - static_cast<QPopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked ); + if ( w->inherits( "Q3PopupMenu" ) ) + static_cast<Q3PopupMenu*>(w)->setItemChecked( itemId( id ), d->m_checked ); else if ( w->inherits( "QMenuBar" ) ) @@ -285,3 +286,3 @@ KRadioAction::KRadioAction( const QString& text, const KShortcut& cut, -KRadioAction::KRadioAction( const QString& text, const QIconSet& pix, +KRadioAction::KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -299,3 +300,3 @@ KRadioAction::KRadioAction( const QString& text, const QString& pix, -KRadioAction::KRadioAction( const QString& text, const QIconSet& pix, +KRadioAction::KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -351,3 +352,3 @@ public: bool m_menuAccelsEnabled; - QPopupMenu *m_menu; + Q3PopupMenu *m_menu; int m_current; @@ -389,3 +390,3 @@ KSelectAction::KSelectAction( const QString& text, const KShortcut& cut, -KSelectAction::KSelectAction( const QString& text, const QIconSet& pix, +KSelectAction::KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -405,3 +406,3 @@ KSelectAction::KSelectAction( const QString& text, const QString& pix, -KSelectAction::KSelectAction( const QString& text, const QIconSet& pix, +KSelectAction::KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -441,3 +442,3 @@ void KSelectAction::setCurrentItem( int id ) if ( id >= (int)d->m_list.count() ) { - ASSERT(id < (int)d->m_list.count()); + Q_ASSERT(id < (int)d->m_list.count()); return; @@ -481,3 +482,3 @@ void KSelectAction::setComboWidth( int width ) } -QPopupMenu* KSelectAction::popupMenu() const +Q3PopupMenu* KSelectAction::popupMenu() const { @@ -487,3 +488,3 @@ QPopupMenu* KSelectAction::popupMenu() const //US d->m_menu = new KPopupMenu(0L, "KSelectAction::popupMenu()"); - d->m_menu = new QPopupMenu(0L, "QSelectAction::popupMenu()"); + d->m_menu = new Q3PopupMenu(0L, "QSelectAction::popupMenu()"); setupMenu(); @@ -645,3 +646,3 @@ int KSelectAction::plug( QWidget *widget, int index ) kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("Q3PopupMenu") ) { @@ -650,3 +651,3 @@ int KSelectAction::plug( QWidget *widget, int index ) - QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); int id; @@ -684,3 +685,3 @@ int KSelectAction::plug( QWidget *widget, int index ) cb->setMaximumHeight( 34 ); - if (!isEditable()) cb->setFocusPolicy(QWidget::NoFocus); + if (!isEditable()) cb->setFocusPolicy(Qt::NoFocus); cb->setMinimumWidth( cb->sizeHint().width() ); @@ -854,3 +855,3 @@ KListAction::KListAction( const QString& text, const KShortcut& cut, -KListAction::KListAction( const QString& text, const QIconSet& pix, +KListAction::KListAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -870,3 +871,3 @@ KListAction::KListAction( const QString& text, const QString& pix, -KListAction::KListAction( const QString& text, const QIconSet& pix, +KListAction::KListAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, @@ -967,3 +968,3 @@ KRecentFilesAction::KRecentFilesAction( const QString& text, KRecentFilesAction::KRecentFilesAction( const QString& text, - const QIconSet& pix, + const QIcon& pix, const KShortcut& cut, @@ -993,3 +994,3 @@ KRecentFilesAction::KRecentFilesAction( const QString& text, KRecentFilesAction::KRecentFilesAction( const QString& text, - const QIconSet& pix, + const QIcon& pix, const KShortcut& cut, @@ -1203,3 +1204,3 @@ KFontAction::KFontAction( const QString& text, const KShortcut& cut, -KFontAction::KFontAction( const QString& text, const QIconSet& pix, +KFontAction::KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -1225,3 +1226,3 @@ KFontAction::KFontAction( const QString& text, const QString& pix, -KFontAction::KFontAction( const QString& text, const QIconSet& pix, +KFontAction::KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -1363,3 +1364,3 @@ KFontSizeAction::KFontSizeAction( const QString& text, -KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, +KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -1379,3 +1380,3 @@ KFontSizeAction::KFontSizeAction( const QString& text, const QString& pix, -KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, +KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut, @@ -1416,5 +1417,5 @@ void KFontSizeAction::init() setEditable( true ); - QValueList<int> sizes = get_standard_font_sizes(); + Q3ValueList<int> sizes = get_standard_font_sizes(); QStringList lst; - for ( QValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) + for ( Q3ValueList<int>::Iterator it = sizes.begin(); it != sizes.end(); ++it ) lst.append( QString::number( *it ) ); @@ -1439,3 +1440,3 @@ void KFontSizeAction::setFontSize( int size ) // Insert at the correct position in the list (to keep sorting) - QValueList<int> lst; + Q3ValueList<int> lst; // Convert to list of ints @@ -1452,3 +1453,3 @@ qDebug("KFontSizeAction::setFontSize heapsort not found."); QStringList strLst; - for (QValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it) + for (Q3ValueList<int>::Iterator it = lst.begin() ; it != lst.end() ; ++it) strLst.append( QString::number(*it) ); @@ -1494,3 +1495,3 @@ public: //US m_popup = new KPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); - m_popup = new QPopupMenu(0L,"KActionMenu::KActionMenuPrivate"); + m_popup = new Q3PopupMenu(0L,"KActionMenu::KActionMenuPrivate"); m_delayed = true; @@ -1504,3 +1505,3 @@ public: //US KPopupMenu *m_popup; - QPopupMenu *m_popup; + Q3PopupMenu *m_popup; bool m_delayed; @@ -1524,3 +1525,3 @@ KActionMenu::KActionMenu( const QString& text, QObject* parent, -KActionMenu::KActionMenu( const QString& text, const QIconSet& icon, +KActionMenu::KActionMenu( const QString& text, const QIcon& icon, QObject* parent, const char* name ) @@ -1554,3 +1555,3 @@ void KActionMenu::popup( const QPoint& global ) //US KPopupMenu* KActionMenu::popupMenu() const -QPopupMenu* KActionMenu::popupMenu() const +Q3PopupMenu* KActionMenu::popupMenu() const { @@ -1594,5 +1595,5 @@ int KActionMenu::plug( QWidget* widget, int index ) kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("Q3PopupMenu") ) { - QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); int id; @@ -1783,3 +1784,3 @@ int KToolBarPopupAction::plug( QWidget *widget, int index ) //US KPopupMenu *KToolBarPopupAction::popupMenu() const -QPopupMenu *KToolBarPopupAction::popupMenu() const +Q3PopupMenu *KToolBarPopupAction::popupMenu() const { @@ -1788,3 +1789,3 @@ QPopupMenu *KToolBarPopupAction::popupMenu() const //US that->m_popup = new KPopupMenu; - that->m_popup = new QPopupMenu; + that->m_popup = new Q3PopupMenu; } @@ -1955,3 +1956,3 @@ void KWidgetAction::slotToolbarDestroyed() - ASSERT( isPlugged() ); + Q_ASSERT( isPlugged() ); if( !m_widget || !isPlugged() ) @@ -1976,5 +1977,5 @@ int KActionSeparator::plug( QWidget *widget, int index ) { - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("Q3PopupMenu") ) { - QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); 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 @@ -36,2 +36,5 @@ #include <kshortcut.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PopupMenu> //US#include <kstdaction.h> @@ -40,3 +43,3 @@ class QMenuBar; -class QPopupMenu; +class Q3PopupMenu; //USclass QComboBox; @@ -56,3 +59,3 @@ class KURL; //US class KToolBar needs to be replaced -class KToolBar; +#include "ktoolbar.h" class KActionCollection; @@ -107,3 +110,3 @@ public: */ - KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -129,3 +132,3 @@ public: */ - KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); @@ -248,3 +251,3 @@ public: */ - KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -270,3 +273,3 @@ public: */ - KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); @@ -354,3 +357,3 @@ public: */ - KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -376,3 +379,3 @@ public: */ - KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); @@ -440,3 +443,3 @@ public: - QPopupMenu* popupMenu() const; + Q3PopupMenu* popupMenu() const; @@ -569,3 +572,3 @@ public: */ - KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KListAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -591,3 +594,3 @@ public: */ - KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KListAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, QObject* parent, @@ -687,3 +690,3 @@ public: */ - KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut, QObject* parent, const char* name = 0, @@ -714,3 +717,3 @@ public: */ - KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, @@ -836,3 +839,3 @@ public: const char* name = 0 ); - KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -840,3 +843,3 @@ public: QObject* parent = 0, const char* name = 0 ); - KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, QObject* parent, @@ -875,3 +878,3 @@ public: const char* slot, QObject* parent, const char* name = 0 ); - KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), + KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 ); @@ -879,3 +882,3 @@ public: QObject* parent = 0, const char* name = 0 ); - KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut, + KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut, const QObject* receiver, const char* slot, @@ -933,3 +936,3 @@ public: const char* name = 0 ); - KActionMenu( const QString& text, const QIconSet& icon, + KActionMenu( const QString& text, const QIcon& icon, QObject* parent = 0, const char* name = 0 ); @@ -944,3 +947,3 @@ public: //US KPopupMenu* popupMenu() const; - QPopupMenu* popupMenu() const; + Q3PopupMenu* popupMenu() const; void popup( const QPoint& global ); @@ -1069,3 +1072,3 @@ public: //US KPopupMenu *popupMenu() const; - QPopupMenu *popupMenu() const; + Q3PopupMenu *popupMenu() const; @@ -1100,3 +1103,3 @@ private: //US KPopupMenu *m_popup; - QPopupMenu *m_popup; + Q3PopupMenu *m_popup; bool m_delayed:1; @@ -1149,4 +1152,4 @@ public slots: private: - QCString m_toolBarName; - QGuardedPtr<KToolBar> m_toolBar; + Q3CString m_toolBarName; + QPointer<KToolBar> m_toolBar; protected: @@ -1197,3 +1200,3 @@ protected slots: private: - QGuardedPtr<QWidget> m_widget; + QPointer<QWidget> m_widget; bool m_autoSized; 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 @@ -28,3 +28,5 @@ -#include <qptrdict.h> +#include <q3ptrdict.h> +//Added by qt3to4: +#include <Q3ValueList> //US#include <qvariant.h> @@ -38,4 +40,4 @@ //US I included the following files -#include <qasciidict.h> -#include <qptrlist.h> +#include <q3asciidict.h> +#include <q3ptrlist.h> #include "kaction.h" @@ -69,3 +71,3 @@ public: //QValueList<KAccel*> m_kaccelList; - QValueList<KActionCollection*> m_docList; + Q3ValueList<KActionCollection*> m_docList; QWidget *m_widget; @@ -74,4 +76,4 @@ public: - QAsciiDict<KAction> m_actionDict; - QPtrDict< QPtrList<KAction> > m_dctHighlightContainers; + Q3AsciiDict<KAction> m_actionDict; + Q3PtrDict< Q3PtrList<KAction> > m_dctHighlightContainers; bool m_highlight; @@ -135,3 +137,3 @@ KActionCollection::~KActionCollection() kdDebug(129) << "KActionCollection::~KActionCollection(): this = " << this << endl; - for ( QAsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { + for ( Q3AsciiDictIterator<KAction> it( d->m_actionDict ); it.current(); ++it ) { KAction* pAction = it.current(); @@ -367,3 +369,3 @@ void KActionCollection::_clear() { - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); while ( it.current() ) @@ -388,3 +390,3 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co else { - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) @@ -409,3 +411,3 @@ KAction* KActionCollection::action( int index ) const { - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); it += index; @@ -434,3 +436,3 @@ QStringList KActionCollection::groups() const - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) @@ -446,3 +448,3 @@ KActionPtrList KActionCollection::actions( const QString& group ) const - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) @@ -460,3 +462,3 @@ KActionPtrList KActionCollection::actions() const - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) @@ -510,3 +512,3 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action ) - QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; @@ -514,5 +516,5 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action ) { - actionList = new QPtrList<KAction>; + actionList = new Q3PtrList<KAction>; - if ( container->inherits( "QPopupMenu" ) ) + if ( container->inherits( "Q3PopupMenu" ) ) { @@ -524,3 +526,3 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action ) //US else if ( container->inherits( "KToolBar" ) ) - else if ( container->inherits( "QToolBar" ) ) + else if ( container->inherits( "Q3ToolBar" ) ) { @@ -544,3 +546,3 @@ void KActionCollection::disconnectHighlight( QWidget *container, KAction *action - QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; @@ -627,3 +629,3 @@ KAction *KActionCollection::findAction( QWidget *container, int id ) { - QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; + Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ reinterpret_cast<void *>( container ) ]; @@ -632,3 +634,3 @@ KAction *KActionCollection::findAction( QWidget *container, int id ) - QPtrListIterator<KAction> it( *actionList ); + Q3PtrListIterator<KAction> it( *actionList ); for (; it.current(); ++it ) @@ -646,5 +648,5 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons - QValueList<KAction *> actions = c.actions(); - QValueList<KAction *>::ConstIterator it = actions.begin(); - QValueList<KAction *>::ConstIterator end = actions.end(); + Q3ValueList<KAction *> actions = c.actions(); + Q3ValueList<KAction *>::ConstIterator it = actions.begin(); + Q3ValueList<KAction *>::ConstIterator end = actions.end(); for (; it != end; ++it ) @@ -672,3 +674,3 @@ KActionCollection &KActionCollection::operator+=( const KActionCollection &c ) kdWarning(129) << "KActionCollection::operator+=(): function is severely deprecated." << endl; - QAsciiDictIterator<KAction> it(c.d->m_actionDict); + Q3AsciiDictIterator<KAction> it(c.d->m_actionDict); for ( ; it.current(); ++it ) 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 @@ -32,2 +32,4 @@ #include <qobject.h> +//Added by qt3to4: +#include <Q3ValueList> //US#include <qvaluelist.h> @@ -62,3 +64,3 @@ class QWidget; -typedef QValueList<KAction *> KActionPtrList; +typedef Q3ValueList<KAction *> KActionPtrList; 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 @@ -51,3 +51,5 @@ #include <qpushbutton.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QResizeEvent> #include <assert.h> @@ -64,3 +66,3 @@ public: -template class QPtrList<KButtonBox::Item>; +template class Q3PtrList<KButtonBox::Item>; @@ -72,6 +74,6 @@ public: bool activated; - QPtrList<KButtonBox::Item> buttons; + Q3PtrList<KButtonBox::Item> buttons; }; -KButtonBox::KButtonBox(QWidget *parent, Orientation _orientation, +KButtonBox::KButtonBox(QWidget *parent, Qt::Orientation _orientation, int border, int autoborder) @@ -151,3 +153,3 @@ void KButtonBox::placeButtons() { - if(data->orientation == Horizontal) { + if(data->orientation == Qt::Horizontal) { // calculate free size and stretches @@ -253,3 +255,3 @@ QSize KButtonBox::sizeHint() const { - if(data->orientation == Horizontal) + if(data->orientation == Qt::Horizontal) dw += s.width(); @@ -263,3 +265,3 @@ QSize KButtonBox::sizeHint() const { - if(data->orientation == Horizontal) + if(data->orientation == Qt::Horizontal) return QSize(dw, bs.height() + 2 * data->border); @@ -272,3 +274,3 @@ QSizePolicy KButtonBox::sizePolicy() const { - return data->orientation == Horizontal? + return data->orientation == Qt::Horizontal? QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) : 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 @@ -23,2 +23,4 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QResizeEvent> class QPushButton; @@ -50,3 +52,3 @@ public: */ - KButtonBox(QWidget *parent, Orientation _orientation = Horizontal, + KButtonBox(QWidget *parent, Qt::Orientation _orientation = Qt::Horizontal, int border = 0, int _autoborder = 6); 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 @@ -22,3 +22,3 @@ #include <qstring.h> -#include <qiconset.h> +#include <qicon.h> #include <qpixmap.h> @@ -64,3 +64,3 @@ public: QString m_iconName; - QIconSet m_iconSet; + QIcon m_iconSet; bool m_hasIcon : 1; @@ -84,3 +84,3 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName, -KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet, +KGuiItem::KGuiItem( const QString &text, const QIcon &iconSet, const QString &toolTip, const QString &whatsThis ) @@ -126,3 +126,3 @@ QString KGuiItem::plainText() const { -QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const +QIcon KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const { @@ -150,3 +150,3 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instan else - return QIconSet(); + return QIcon(); } @@ -179,3 +179,3 @@ void KGuiItem::setText( const QString &text ) { -void KGuiItem::setIconSet( const QIconSet &iconset ) +void KGuiItem::setIconSet( const QIcon &iconset ) { @@ -189,3 +189,3 @@ void KGuiItem::setIconName( const QString &iconName ) d->m_iconName = iconName; - d->m_iconSet = QIconSet(); + d->m_iconSet = QIcon(); d->m_hasIcon = !iconName.isEmpty(); 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 @@ -25,5 +25,5 @@ #include <qstring.h> -#include <qiconset.h> +#include <qicon.h> #include <qpixmap.h> -#include <qvaluelist.h> +#include <q3valuelist.h> //US#include <kicontheme.h> @@ -44,3 +44,3 @@ public: - KGuiItem( const QString &text, const QIconSet &iconSet, + KGuiItem( const QString &text, const QIcon &iconSet, const QString &toolTip = QString::null, @@ -55,6 +55,6 @@ public: QString plainText() const; - QIconSet iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const; + QIcon iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const; #ifndef KDE_NO_COMPAT - QIconSet iconSet() const { return iconSet( KIcon::Small); } + QIcon iconSet() const { return iconSet( KIcon::Small); } #endif @@ -71,3 +71,3 @@ public: void setText( const QString &text ); - void setIconSet( const QIconSet &iconset ); + void setIconSet( const QIcon &iconset ); void setIconName( const QString &iconName ); 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 @@ -24,11 +24,19 @@ #include <qlabel.h> -#include <qwidgetstack.h> +#include <q3widgetstack.h> #include <qtabwidget.h> -#include <qlistview.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qgrid.h> +#include <q3listview.h> +#include <q3hbox.h> +#include <q3vbox.h> +#include <q3grid.h> #include <qpainter.h> -#include <qobjectlist.h> +#include <qobject.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3PtrList> +#include <Q3Frame> +#include <QEvent> +#include <Q3VBoxLayout> +#include <QShowEvent> /*US @@ -67,9 +75,9 @@ -class KJanusWidget::IconListItem : public QListBoxItem +class KJanusWidget::IconListItem : public Q3ListBoxItem { public: - IconListItem( QListBox *listbox, const QPixmap &pixmap, + IconListItem( Q3ListBox *listbox, const QPixmap &pixmap, const QString &text ); - virtual int height( const QListBox *lb ) const; - virtual int width( const QListBox *lb ) const; + virtual int height( const Q3ListBox *lb ) const; + virtual int width( const Q3ListBox *lb ) const; int expandMinimumWidth( int width ); @@ -100,3 +108,3 @@ public: -template class QPtrList<QListViewItem>; +template class Q3PtrList<Q3ListViewItem>; @@ -109,3 +117,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this ); if( mFace == TreeList || mFace == IconList ) @@ -114,3 +122,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) - QFrame *page = 0; + Q3Frame *page = 0; if( mFace == TreeList ) @@ -147,3 +155,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) { - QHBoxLayout *hbox = new QHBoxLayout( topLayout ); + Q3HBoxLayout *hbox = new Q3HBoxLayout( topLayout ); mIconList = new IconListBox( this ); @@ -158,3 +166,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) hbox->addSpacing( KDialog::marginHint() ); - page = new QFrame( this ); + page = new Q3Frame( this ); hbox->addWidget( page, 10 ); @@ -167,3 +175,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) - QVBoxLayout *vbox = new QVBoxLayout( page, 0, KDialog::spacingHint() ); + Q3VBoxLayout *vbox = new Q3VBoxLayout( page, 0, KDialog::spacingHint() ); @@ -177,6 +185,6 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) mTitleSep = new KSeparator( page ); - mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain ); + mTitleSep->setFrameStyle( Q3Frame::HLine|Q3Frame::Plain ); vbox->addWidget( mTitleSep ); - mPageStack = new QWidgetStack( page ); + mPageStack = new Q3WidgetStack( page ); connect(mPageStack, SIGNAL(aboutToShow(QWidget *)), @@ -201,3 +209,3 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) mFace = Plain; - mPlainPage = new QFrame( this ); + mPlainPage = new Q3Frame( this ); topLayout->addWidget( mPlainPage, 10 ); @@ -247,3 +255,3 @@ bool KJanusWidget::isValid() const -QFrame *KJanusWidget::plainPage() +Q3Frame *KJanusWidget::plainPage() { @@ -268,3 +276,3 @@ QWidget *KJanusWidget::FindParent() -QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header, +Q3Frame *KJanusWidget::addPage( const QStringList &items, const QString &header, const QPixmap &pixmap ) @@ -277,3 +285,3 @@ QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header, - QFrame *page = new QFrame( FindParent(), "page" ); + Q3Frame *page = new Q3Frame( FindParent(), "page" ); addPageWidget( page, items, header, pixmap ); @@ -289,3 +297,3 @@ void KJanusWidget::pageGone( QObject *obj ) -void KJanusWidget::slotReopen( QListViewItem * item ) +void KJanusWidget::slotReopen( Q3ListViewItem * item ) { @@ -295,3 +303,3 @@ void KJanusWidget::slotReopen( QListViewItem * item ) -QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header, +Q3Frame *KJanusWidget::addPage( const QString &itemName, const QString &header, const QPixmap &pixmap ) @@ -306,3 +314,3 @@ QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header, -QVBox *KJanusWidget::addVBoxPage( const QStringList &items, +Q3VBox *KJanusWidget::addVBoxPage( const QStringList &items, const QString &header, @@ -317,3 +325,3 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items, - QVBox *page = new QVBox(FindParent() , "vbox_page" ); + Q3VBox *page = new Q3VBox(FindParent() , "vbox_page" ); page->setSpacing( KDialog::spacingHintSmall() ); @@ -324,3 +332,3 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items, -QVBox *KJanusWidget::addVBoxPage( const QString &itemName, +Q3VBox *KJanusWidget::addVBoxPage( const QString &itemName, const QString &header, @@ -333,3 +341,3 @@ QVBox *KJanusWidget::addVBoxPage( const QString &itemName, -QHBox *KJanusWidget::addHBoxPage( const QStringList &items, +Q3HBox *KJanusWidget::addHBoxPage( const QStringList &items, const QString &header, @@ -342,3 +350,3 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items, - QHBox *page = new QHBox(FindParent(), "hbox_page"); + Q3HBox *page = new Q3HBox(FindParent(), "hbox_page"); page->setSpacing( KDialog::spacingHint() ); @@ -349,3 +357,3 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items, -QHBox *KJanusWidget::addHBoxPage( const QString &itemName, +Q3HBox *KJanusWidget::addHBoxPage( const QString &itemName, const QString &header, @@ -358,3 +366,3 @@ QHBox *KJanusWidget::addHBoxPage( const QString &itemName, -QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, +Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir, const QStringList &items, @@ -369,3 +377,3 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, - QGrid *page = new QGrid( n, dir, FindParent(), "page" ); + Q3Grid *page = new Q3Grid( n, dir, FindParent(), "page" ); page->setSpacing( KDialog::spacingHint() ); @@ -377,3 +385,3 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, -QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, +Q3Grid *KJanusWidget::addGridPage( int n, Qt::Orientation dir, const QString &itemName, @@ -387,6 +395,6 @@ QGrid *KJanusWidget::addGridPage( int n, QGrid::Direction dir, -void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page) +void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page) { bool isTop = true; - QListViewItem *curTop = 0, *child, *last, *newChild; + Q3ListViewItem *curTop = 0, *child, *last, *newChild; unsigned int index = 1; @@ -414,5 +422,5 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p if (isTop) - newChild = new QListViewItem(mTreeList, name); + newChild = new Q3ListViewItem(mTreeList, name); else - newChild = new QListViewItem(curTop, name); + newChild = new Q3ListViewItem(curTop, name); @@ -433,5 +441,5 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p if (isTop) - newChild = new QListViewItem(mTreeList, last, name); + newChild = new Q3ListViewItem(mTreeList, last, name); else - newChild = new QListViewItem(curTop, last, name); + newChild = new Q3ListViewItem(curTop, last, name); } @@ -461,3 +469,3 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p -void KJanusWidget::addPageWidget( QFrame *page, const QStringList &items, +void KJanusWidget::addPageWidget( Q3Frame *page, const QStringList &items, const QString &header,const QPixmap &pixmap ) @@ -552,3 +560,3 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget ) } - QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 ); + Q3GridLayout *gbox = new Q3GridLayout( mSwallowPage, 1, 1, 0 ); @@ -557,6 +565,6 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget ) // - QObjectList *l = (QObjectList*)mSwallowPage->children(); // silence please - for( uint i=0; i < l->count(); i++ ) + QObjectList l = mSwallowPage->children(); // silence please + for( uint i=0; i < l.count(); i++ ) { - QObject *o = l->at(i); + QObject *o = l.at(i); if( o->isWidgetType() ) @@ -599,3 +607,3 @@ bool KJanusWidget::slotShowPage() { - QListViewItem *node = mTreeList->selectedItem(); + Q3ListViewItem *node = mTreeList->selectedItem(); if( node == 0 ) { return( false ); } @@ -608,3 +616,3 @@ bool KJanusWidget::slotShowPage() { - QListBoxItem *node = mIconList->item( mIconList->currentItem() ); + Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() ); if( node == 0 ) { return( false ); } @@ -648,5 +656,5 @@ bool KJanusWidget::showPage( QWidget *w ) { - QMap<QListViewItem *, QWidget *>::Iterator it; + QMap<Q3ListViewItem *, QWidget *>::Iterator it; for (it = mTreeListToPageStack.begin(); it != mTreeListToPageStack.end(); ++it){ - QListViewItem *key = it.key(); + Q3ListViewItem *key = it.key(); QWidget *val = it.data(); @@ -660,5 +668,5 @@ bool KJanusWidget::showPage( QWidget *w ) { - QMap<QListBoxItem *, QWidget *>::Iterator it; + QMap<Q3ListBoxItem *, QWidget *>::Iterator it; for (it = mIconListToPageStack.begin(); it != mIconListToPageStack.end(); ++it){ - QListBoxItem *key = it.key(); + Q3ListBoxItem *key = it.key(); QWidget *val = it.data(); @@ -688,3 +696,3 @@ int KJanusWidget::activePageIndex() const if( mFace == TreeList) { - QListViewItem *node = mTreeList->selectedItem(); + Q3ListViewItem *node = mTreeList->selectedItem(); if( node == 0 ) { return -1; } @@ -694,3 +702,3 @@ int KJanusWidget::activePageIndex() const else if (mFace == IconList) { - QListBoxItem *node = mIconList->item( mIconList->currentItem() ); + Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() ); if( node == 0 ) { return( false ); } @@ -763,3 +771,3 @@ void KJanusWidget::slotFontChanged() // makes the treelist behave like the list of kcontrol -void KJanusWidget::slotItemClicked(QListViewItem *it) +void KJanusWidget::slotItemClicked(Q3ListViewItem *it) { @@ -897,7 +905,7 @@ void KJanusWidget::unfoldTreeList( bool persist ) if( persist ) - connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); + connect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) ); else - disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); + disconnect( mTreeList, SIGNAL( collapsed( Q3ListViewItem * ) ), this, SLOT( slotReopen( Q3ListViewItem * ) ) ); - for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() ) + for( Q3ListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() ) item->setOpen( true ); @@ -955,3 +963,3 @@ bool KJanusWidget::eventFilter( QObject *o, QEvent *e ) KJanusWidget::IconListBox::IconListBox( QWidget *parent, const char *name, - WFlags f ) + Qt::WFlags f ) :KListBox( parent, name, f ), mShowAll(false), mHeightValid(false), @@ -967,3 +975,3 @@ void KJanusWidget::IconListBox::updateMinimumHeight() int h = frameWidth()*2; - for( QListBoxItem *i = item(0); i != 0; i = i->next() ) + for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() ) { @@ -982,3 +990,3 @@ void KJanusWidget::IconListBox::updateWidth() int maxWidth = 10; - for( QListBoxItem *i = item(0); i != 0; i = i->next() ) + for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() ) { @@ -988,3 +996,3 @@ void KJanusWidget::IconListBox::updateWidth() - for( QListBoxItem *i = item(0); i != 0; i = i->next() ) + for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() ) { @@ -1024,5 +1032,5 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll ) -KJanusWidget::IconListItem::IconListItem( QListBox *listbox, const QPixmap &pixmap, +KJanusWidget::IconListItem::IconListItem( Q3ListBox *listbox, const QPixmap &pixmap, const QString &text ) - : QListBoxItem( listbox ) + : Q3ListBoxItem( listbox ) { @@ -1085,3 +1093,3 @@ void KJanusWidget::IconListItem::paint( QPainter *painter ) -int KJanusWidget::IconListItem::height( const QListBox *lb ) const +int KJanusWidget::IconListItem::height( const Q3ListBox *lb ) const { @@ -1098,3 +1106,3 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const -int KJanusWidget::IconListItem::width( const QListBox *lb ) const +int KJanusWidget::IconListItem::width( const Q3ListBox *lb ) const { @@ -1124,3 +1132,3 @@ void KJanusWidget::removePage( QWidget *page ) { - QMap<QListViewItem*, QWidget *>::Iterator i; + QMap<Q3ListViewItem*, QWidget *>::Iterator i; for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i ) @@ -1139,3 +1147,3 @@ void KJanusWidget::removePage( QWidget *page ) { - QMap<QListBoxItem*, QWidget *>::Iterator i; + QMap<Q3ListBoxItem*, QWidget *>::Iterator i; for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i ) 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 @@ -22,6 +22,12 @@ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qwidget.h> #include <qmap.h> -#include <qgrid.h> +#include <q3grid.h> +//Added by qt3to4: +#include <QShowEvent> +#include <Q3Frame> +#include <QPixmap> +#include <QLabel> +#include <QEvent> #include <klistbox.h> @@ -40,8 +46,8 @@ class KSeparator; class KListView; -class QWidgetStack; +class Q3WidgetStack; class QLabel; class QTabWidget; -class QListViewItem; -class QVBox; -class QHBox; +class Q3ListViewItem; +class Q3VBox; +class Q3HBox; @@ -104,3 +110,3 @@ class KJanusWidget : public QWidget public: - IconListBox( QWidget *parent=0, const char *name=0, WFlags f=0 ); + IconListBox( QWidget *parent=0, const char *name=0, Qt::WFlags f=0 ); void updateMinimumHeight(); @@ -195,3 +201,3 @@ class KJanusWidget : public QWidget */ - virtual QFrame *plainPage(); + virtual Q3Frame *plainPage(); @@ -216,3 +222,3 @@ class KJanusWidget : public QWidget */ - virtual QFrame *addPage(const QString &item,const QString &header=QString::null, + virtual Q3Frame *addPage(const QString &item,const QString &header=QString::null, const QPixmap &pixmap=QPixmap() ); @@ -233,3 +239,3 @@ class KJanusWidget : public QWidget **/ - virtual QFrame *addPage(const QStringList &items, const QString &header=QString::null, + virtual Q3Frame *addPage(const QStringList &items, const QString &header=QString::null, const QPixmap &pixmap=QPixmap() ); @@ -255,3 +261,3 @@ class KJanusWidget : public QWidget * Tabbed. */ - virtual QVBox *addVBoxPage( const QString &item, + virtual Q3VBox *addVBoxPage( const QString &item, const QString &header=QString::null, @@ -271,3 +277,3 @@ class KJanusWidget : public QWidget **/ - virtual QVBox *addVBoxPage( const QStringList &items, + virtual Q3VBox *addVBoxPage( const QStringList &items, const QString &header=QString::null, @@ -295,3 +301,3 @@ class KJanusWidget : public QWidget */ - virtual QHBox *addHBoxPage( const QString &itemName, + virtual Q3HBox *addHBoxPage( const QString &itemName, const QString &header=QString::null, @@ -311,3 +317,3 @@ class KJanusWidget : public QWidget **/ - virtual QHBox *addHBoxPage( const QStringList &items, + virtual Q3HBox *addHBoxPage( const QStringList &items, const QString &header=QString::null, @@ -339,3 +345,3 @@ class KJanusWidget : public QWidget //US changed Orientation into Direction for compatibility - virtual QGrid *addGridPage( int n, QGrid::Direction dir, + virtual Q3Grid *addGridPage( int n, Qt::Orientation dir, const QString &itemName, @@ -357,3 +363,3 @@ class KJanusWidget : public QWidget //US changed Orientation into Direction for compatibility - virtual QGrid *addGridPage( int n, QGrid::Direction dir, + virtual Q3Grid *addGridPage( int n, Qt::Orientation dir, const QStringList &items, @@ -519,5 +525,5 @@ class KJanusWidget : public QWidget //US not yet implemented void slotFontChanged(); - void slotItemClicked(QListViewItem *it); + void slotItemClicked(Q3ListViewItem *it); void pageGone( QObject *obj); // signal from the added page's "destroyed" signal - void slotReopen(QListViewItem *item); + void slotReopen(Q3ListViewItem *item); @@ -525,5 +531,5 @@ class KJanusWidget : public QWidget bool showPage( QWidget *w ); - void addPageWidget( QFrame *page, const QStringList &items, + void addPageWidget( Q3Frame *page, const QStringList &items, const QString &header, const QPixmap &pixmap ); - void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, QFrame *page); + void InsertTreeListItem(const QStringList &items, const QPixmap &pixmap, Q3Frame *page); QWidget *FindParent(); @@ -534,3 +540,3 @@ class KJanusWidget : public QWidget // Obsolete members. Remove in KDE 4. - QPtrList<QWidget> *mPageList; + Q3PtrList<QWidget> *mPageList; QStringList *mTitleList; @@ -540,6 +546,6 @@ class KJanusWidget : public QWidget IconListBox *mIconList; - QWidgetStack *mPageStack; + Q3WidgetStack *mPageStack; QLabel *mTitleLabel; QTabWidget *mTabControl; - QFrame *mPlainPage; + Q3Frame *mPlainPage; QWidget *mSwallowPage; @@ -549,4 +555,4 @@ class KJanusWidget : public QWidget bool mShowIconsInTreeList; - QMap<QListViewItem *, QWidget *> mTreeListToPageStack; - QMap<QListBoxItem *, QWidget *> mIconListToPageStack; + QMap<Q3ListViewItem *, QWidget *> mTreeListToPageStack; + QMap<Q3ListBoxItem *, QWidget *> mIconListToPageStack; QMap<QString, QPixmap> mFolderIconMap; 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 @@ -18,2 +18,7 @@ #include <qtimer.h> +//Added by qt3to4: +#include <QEvent> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QFocusEvent> @@ -28,2 +33,3 @@ #ifdef Q_WS_X11 +#include <QX11Info> #include <X11/Xlib.h> @@ -33,4 +39,4 @@ #endif -KListBox::KListBox( QWidget *parent, const char *name, WFlags f ) - : QListBox( parent, name, f ) +KListBox::KListBox( QWidget *parent, const char *name, Qt::WFlags f ) + : Q3ListBox( parent, name, f ) { @@ -38,8 +44,8 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f ) this, SLOT( slotOnViewport() ) ); - connect( this, SIGNAL( onItem( QListBoxItem * ) ), - this, SLOT( slotOnItem( QListBoxItem * ) ) ); + connect( this, SIGNAL( onItem( Q3ListBoxItem * ) ), + this, SLOT( slotOnItem( Q3ListBoxItem * ) ) ); - connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *, + connect( this, SIGNAL( mouseButtonClicked( int, Q3ListBoxItem *, const QPoint & ) ), - this, SLOT( slotMouseButtonClicked( int, QListBoxItem *, + this, SLOT( slotMouseButtonClicked( int, Q3ListBoxItem *, const QPoint & ) ) ); @@ -62,3 +68,3 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f ) -void KListBox::slotOnItem( QListBoxItem *item ) +void KListBox::slotOnItem( Q3ListBoxItem *item ) { @@ -141,3 +147,3 @@ void KListBox::slotAutoSelect() uint keybstate; - XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, + XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child, &root_x, &root_y, &win_x, &win_y, &keybstate ); @@ -145,3 +151,3 @@ void KListBox::slotAutoSelect() - QListBoxItem* previousItem = item( currentItem() ); + Q3ListBoxItem* previousItem = item( currentItem() ); setCurrentItem( m_pCurrentItem ); @@ -169,3 +175,3 @@ void KListBox::slotAutoSelect() bool down = index( previousItem ) < index( m_pCurrentItem ); - QListBoxItem* it = down ? previousItem : m_pCurrentItem; + Q3ListBoxItem* it = down ? previousItem : m_pCurrentItem; for (;it ; it = it->next() ) { @@ -188,3 +194,3 @@ void KListBox::slotAutoSelect() - if( selectionMode() == QListBox::Single ) + if( selectionMode() == Q3ListBox::Single ) emit selectionChanged( m_pCurrentItem ); @@ -215,3 +221,3 @@ void KListBox::slotAutoSelect() -void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos ) +void KListBox::emitExecute( Q3ListBoxItem *item, const QPoint &pos ) { @@ -222,3 +228,3 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos ) uint keybstate; - XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, + XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child, &root_x, &root_y, &win_x, &win_y, &keybstate ); @@ -248,3 +254,3 @@ void KListBox::keyPressEvent(QKeyEvent *e) { - if( e->key() == Key_Escape ) + if( e->key() == Qt::Key_Escape ) { @@ -252,3 +258,3 @@ void KListBox::keyPressEvent(QKeyEvent *e) } - else if( e->key() == Key_F1 ) + else if( e->key() == Qt::Key_F1 ) { @@ -258,3 +264,3 @@ void KListBox::keyPressEvent(QKeyEvent *e) { - QListBox::keyPressEvent(e); + Q3ListBox::keyPressEvent(e); } @@ -266,3 +272,3 @@ void KListBox::focusOutEvent( QFocusEvent *fe ) - QListBox::focusOutEvent( fe ); + Q3ListBox::focusOutEvent( fe ); } @@ -273,3 +279,3 @@ void KListBox::leaveEvent( QEvent *e ) - QListBox::leaveEvent( e ); + Q3ListBox::leaveEvent( e ); } @@ -278,3 +284,3 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e ) { - if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { + if( (selectionMode() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) ) { bool block = signalsBlocked(); @@ -287,3 +293,3 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e ) - QListBox::contentsMousePressEvent( e ); + Q3ListBox::contentsMousePressEvent( e ); } @@ -292,5 +298,5 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e ) { - QListBox::contentsMouseDoubleClickEvent( e ); + Q3ListBox::contentsMouseDoubleClickEvent( e ); - QListBoxItem* item = itemAt( e->pos() ); + Q3ListBoxItem* item = itemAt( e->pos() ); @@ -299,3 +305,3 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e ) - if( (e->button() == LeftButton) && !m_bUseSingle ) + if( (e->button() == Qt::LeftButton) && !m_bUseSingle ) emitExecute( item, e->globalPos() ); @@ -304,5 +310,5 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e ) -void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos ) +void KListBox::slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos ) { - if( (btn == LeftButton) && item ) + if( (btn == Qt::LeftButton) && item ) emitExecute( item, pos ); 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 @@ -20,3 +20,8 @@ -#include <qlistbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <QMouseEvent> +#include <QFocusEvent> +#include <QKeyEvent> +#include <QEvent> @@ -37,3 +42,3 @@ **/ -class KListBox : public QListBox +class KListBox : public Q3ListBox { @@ -42,3 +47,3 @@ class KListBox : public QListBox public: - KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + KListBox( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 ); @@ -56,3 +61,3 @@ signals: */ - void executed( QListBoxItem *item ); + void executed( Q3ListBoxItem *item ); @@ -69,3 +74,3 @@ signals: */ - void executed( QListBoxItem *item, const QPoint &pos ); + void executed( Q3ListBoxItem *item, const QPoint &pos ); @@ -85,6 +90,6 @@ signals: */ - void doubleClicked( QListBoxItem *item, const QPoint &pos ); + void doubleClicked( Q3ListBoxItem *item, const QPoint &pos ); protected slots: - void slotOnItem( QListBoxItem *item ); + void slotOnItem( Q3ListBoxItem *item ); void slotOnViewport(); @@ -99,3 +104,3 @@ protected slots: protected: - void emitExecute( QListBoxItem *item, const QPoint &pos ); + void emitExecute( Q3ListBoxItem *item, const QPoint &pos ); @@ -125,3 +130,3 @@ protected: - QListBoxItem* m_pCurrentItem; + Q3ListBoxItem* m_pCurrentItem; @@ -131,3 +136,3 @@ protected: private slots: - void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos ); + void slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos ); 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 @@ -20,5 +20,5 @@ -#include <qdragobject.h> +#include <q3dragobject.h> #include <qtimer.h> -#include <qheader.h> +#include <q3header.h> #include <qcursor.h> @@ -27,2 +27,16 @@ #include <qpainter.h> +//Added by qt3to4: +#include <QDragLeaveEvent> +#include <QKeyEvent> +#include <Q3ValueList> +#include <Q3PtrList> +#include <QPixmap> +#include <QDragEnterEvent> +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QEvent> +#include <QPaintEvent> @@ -40,3 +54,3 @@ #define private public -#include <qlistview.h> +#include <q3listview.h> #undef private @@ -48,5 +62,6 @@ #endif +#include <Q3Action> // /*US -class KListView::Tooltip : public QToolTip +class KListView::Tooltip /* TODO:hacker:TODO: : public QToolTip */ { @@ -69,3 +84,3 @@ private: KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group) - : QToolTip (parent, group), + : /* XXX:hacker:XXX: QToolTip (parent, group), */ mParent (parent) @@ -125,3 +140,3 @@ public: - QListViewItem* pCurrentItem; + Q3ListViewItem* pCurrentItem; @@ -131,3 +146,3 @@ public: QTimer dragExpand; - QListViewItem* dragOverItem; + Q3ListViewItem* dragOverItem; QPoint dragOverPoint; @@ -138,3 +153,3 @@ public: //US KListViewLineEdit *editor; - QValueList<int> renameable; + Q3ValueList<int> renameable; @@ -172,4 +187,4 @@ public: QRect mOldDropHighlighter; - QListViewItem *afterItemDrop; - QListViewItem *parentItemDrop; + Q3ListViewItem *afterItemDrop; + Q3ListViewItem *parentItemDrop; @@ -228,3 +243,3 @@ void KListViewLineEdit::load(QListViewItem *i, int c) -static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir) +static int nextCol (KListView *pl, Q3ListViewItem *pi, int start, int dir) { @@ -241,5 +256,5 @@ static int nextCol (KListView *pl, QListViewItem *pi, int start, int dir) -static QListViewItem *prevItem (QListViewItem *pi) +static Q3ListViewItem *prevItem (Q3ListViewItem *pi) { - QListViewItem *pa = pi->itemAbove(); + Q3ListViewItem *pa = pi->itemAbove(); @@ -254,3 +269,3 @@ static QListViewItem *prevItem (QListViewItem *pi) -static QListViewItem *lastQChild (QListViewItem *pi) +static Q3ListViewItem *lastQChild (Q3ListViewItem *pi) { @@ -262,3 +277,3 @@ static QListViewItem *lastQChild (QListViewItem *pi) */ - for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling()) + for (Q3ListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling()) pi = pt; @@ -330,6 +345,6 @@ bool KListViewLineEdit::event (QEvent *pe) p->tabOrderedRenaming() && p->itemsRenameable() && - !(k->state() & ControlButton || k->state() & AltButton)) + !(k->state() & Qt::ControlButton || k->state() & AltButton)) { selectNextCell(item, col, - (k->key() == Key_Tab && !(k->state() & ShiftButton))); + (k->key() == Key_Tab && !(k->state() & Qt::ShiftButton))); return true; @@ -408,3 +423,3 @@ void KListViewLineEdit::slotSelectionChanged() KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse ) - : QListView( parent, name ), + : Q3ListView( parent, name ), d (new KListViewPrivate (this)) @@ -419,4 +434,4 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse this, SLOT( slotOnViewport() ) ); - connect( this, SIGNAL( onItem( QListViewItem * ) ), - this, SLOT( slotOnItem( QListViewItem * ) ) ); + connect( this, SIGNAL( onItem( Q3ListViewItem * ) ), + this, SLOT( slotOnItem( Q3ListViewItem * ) ) ); @@ -447,4 +462,4 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse { - connect (this, SIGNAL (rightButtonPressed (QListViewItem*, const QPoint&, int)), - this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int))); + connect (this, SIGNAL (rightButtonPressed (Q3ListViewItem*, const QPoint&, int)), + this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int))); } @@ -452,8 +467,8 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse { - connect (this, SIGNAL (rightButtonClicked (QListViewItem*, const QPoint&, int)), - this, SLOT (emitContextMenu (QListViewItem*, const QPoint&, int))); + connect (this, SIGNAL (rightButtonClicked (Q3ListViewItem*, const QPoint&, int)), + this, SLOT (emitContextMenu (Q3ListViewItem*, const QPoint&, int))); } - connect (this, SIGNAL (menuShortCutPressed (KListView*, QListViewItem*)), - this, SLOT (emitContextMenu (KListView*, QListViewItem*))); + connect (this, SIGNAL (menuShortCutPressed (KListView*, Q3ListViewItem*)), + this, SLOT (emitContextMenu (KListView*, Q3ListViewItem*))); @@ -482,3 +497,3 @@ QSize KListView::sizeHint() const #ifdef DESKTOP_VERSION - return QListView::sizeHint(); + return Q3ListView::sizeHint(); #else @@ -505,3 +520,3 @@ bool KListView::isExecuteArea( int x ) -void KListView::slotOnItem( QListViewItem *item ) +void KListView::slotOnItem( Q3ListViewItem *item ) { @@ -536,8 +551,8 @@ void KListView::slotSettingsChanged(int category) - disconnect(this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), - this, SLOT (slotMouseButtonClicked (int, QListViewItem*, const QPoint &, int))); + disconnect(this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)), + this, SLOT (slotMouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int))); if( d->bUseSingle ) - connect (this, SIGNAL (mouseButtonClicked (int, QListViewItem*, const QPoint &, int)), - this, SLOT (slotMouseButtonClicked( int, QListViewItem*, const QPoint &, int))); + connect (this, SIGNAL (mouseButtonClicked (int, Q3ListViewItem*, const QPoint &, int)), + this, SLOT (slotMouseButtonClicked( int, Q3ListViewItem*, const QPoint &, int))); @@ -613,3 +628,3 @@ void KListView::slotAutoSelect() - QListViewItem* previousItem = currentItem(); + Q3ListViewItem* previousItem = currentItem(); setCurrentItem( d->pCurrentItem ); @@ -634,3 +649,3 @@ void KListView::slotAutoSelect() bool down = previousItem->itemPos() < d->pCurrentItem->itemPos(); - QListViewItemIterator lit( down ? previousItem : d->pCurrentItem ); + Q3ListViewItemIterator lit( down ? previousItem : d->pCurrentItem ); for ( ; lit.current(); ++lit ) { @@ -653,3 +668,3 @@ void KListView::slotAutoSelect() - if( selectionMode() == QListView::Single ) + if( selectionMode() == Q3ListView::Single ) emit selectionChanged( d->pCurrentItem ); @@ -686,3 +701,3 @@ void KListView::slotHeaderChanged() -void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c) +void KListView::emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c) { @@ -703,3 +718,3 @@ void KListView::emitExecute( int buttonstate, QListViewItem *item, const QPoint //Dont emit executed if in SC mode and Shift or Ctrl are pressed - if( !( (buttonstate==ShiftButton) || (buttonstate==ControlButton) )) { + if( !( (buttonstate==Qt::ShiftButton) || (buttonstate==Qt::ControlButton) )) { // if( !( ((keybstate & ShiftMask) || (keybstate & ControlMask)) ) ) { @@ -716,3 +731,3 @@ void KListView::focusInEvent( QFocusEvent *fe ) // kdDebug()<<"KListView::focusInEvent()"<<endl; - QListView::focusInEvent( fe ); + Q3ListView::focusInEvent( fe ); if ((d->selectedBySimpleMove) @@ -749,3 +764,3 @@ void KListView::focusOutEvent( QFocusEvent *fe ) - QListView::focusOutEvent( fe ); + Q3ListView::focusOutEvent( fe ); } @@ -756,3 +771,3 @@ void KListView::leaveEvent( QEvent *e ) - QListView::leaveEvent( e ); + Q3ListView::leaveEvent( e ); } @@ -767,3 +782,3 @@ bool KListView::event( QEvent *e ) - return QListView::event(e); + return Q3ListView::event(e); } @@ -773,3 +788,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) //qDebug("KListView::contentsMousePressEvent"); - if( (selectionModeExt() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) + if( (selectionModeExt() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) ) { @@ -795,3 +810,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) QPoint p( contentsToViewport( e->pos() ) ); - QListViewItem *at = itemAt (p); + Q3ListViewItem *at = itemAt (p); @@ -803,3 +818,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) - if (e->button() == LeftButton && !rootDecoClicked) + if (e->button() == Qt::LeftButton && !rootDecoClicked) { @@ -815,3 +830,3 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) - QListView::contentsMousePressEvent( e ); + Q3ListView::contentsMousePressEvent( e ); } @@ -821,3 +836,3 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e ) if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) { - QListView::contentsMouseMoveEvent (e); + Q3ListView::contentsMouseMoveEvent (e); return; @@ -826,3 +841,3 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e ) QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt( vp ); + Q3ListViewItem *item = itemAt( vp ); @@ -855,3 +870,3 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e ) { - QListView::contentsMouseReleaseEvent( 0 ); + Q3ListView::contentsMouseReleaseEvent( 0 ); startDrag(); @@ -864,3 +879,3 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) { - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { @@ -870,3 +885,3 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) QPoint p( contentsToViewport( e->pos() ) ); - QListViewItem *at = itemAt (p); + Q3ListViewItem *at = itemAt (p); if ( at ) @@ -892,3 +907,3 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) } - QListView::contentsMouseReleaseEvent( e ); + Q3ListView::contentsMouseReleaseEvent( e ); } @@ -903,4 +918,4 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e ) QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt( vp ); - emit QListView::doubleClicked( item ); // we do it now + Q3ListViewItem *item = itemAt( vp ); + emit Q3ListView::doubleClicked( item ); // we do it now @@ -913,3 +928,3 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e ) - if( (e->button() == LeftButton) && !d->bUseSingle ) { + if( (e->button() == Qt::LeftButton) && !d->bUseSingle ) { //qDebug("KListView::contentsMouseDoubleClickEvent: emitExecute"); @@ -921,3 +936,3 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e ) -void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c ) +void KListView::slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c ) { @@ -925,3 +940,3 @@ void KListView::slotMouseButtonClicked( int btn, QListViewItem *item, const QPoi - if( (btn == LeftButton) && item ) { + if( (btn == Qt::LeftButton) && item ) { //qDebug("KListView::slotMouseButtonClicked: emitExecute"); @@ -963,8 +978,8 @@ qDebug("KListView::contentsDropEvent drag&drop not supported yet"); -void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme) +void KListView::movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme) { - QPtrList<QListViewItem> items, afterFirsts, afterNows; - QListViewItem *current=currentItem(); + Q3PtrList<Q3ListViewItem> items, afterFirsts, afterNows; + Q3ListViewItem *current=currentItem(); bool hasMoved=false; - for (QListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext) + for (Q3ListViewItem *i = firstChild(), *iNext=0; i != 0; i = iNext) { @@ -981,3 +996,3 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme) - QListViewItem *afterFirst = i->itemAbove(); + Q3ListViewItem *afterFirst = i->itemAbove(); @@ -1002,3 +1017,3 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme) clearSelection(); - for (QListViewItem *i=items.first(); i != 0; i=items.next() ) + for (Q3ListViewItem *i=items.first(); i != 0; i=items.next() ) i->setSelected(true); @@ -1088,3 +1103,3 @@ int KListView::depthToPixels( int depth ) -void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after) +void KListView::findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after) { @@ -1093,5 +1108,5 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte // Get the position to put it in - QListViewItem *atpos = itemAt(p); + Q3ListViewItem *atpos = itemAt(p); - QListViewItem *above; + Q3ListViewItem *above; if (!atpos) // put it at the end @@ -1125,4 +1140,4 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte // sibling, but of an upper-level group, rather than the "above" item - QListViewItem * betterAbove = above->parent(); - QListViewItem * last = above; + Q3ListViewItem * betterAbove = above->parent(); + Q3ListViewItem * last = above; while ( betterAbove ) @@ -1148,5 +1163,5 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte -QListViewItem* KListView::lastChild () const +Q3ListViewItem* KListView::lastChild () const { - QListViewItem* lastchild = firstChild(); + Q3ListViewItem* lastchild = firstChild(); @@ -1158,7 +1173,7 @@ QListViewItem* KListView::lastChild () const -QListViewItem *KListView::lastItem() const +Q3ListViewItem *KListView::lastItem() const { - QListViewItem* last = lastChild(); + Q3ListViewItem* last = lastChild(); - for (QListViewItemIterator it (last); it.current(); ++it) + for (Q3ListViewItemIterator it (last); it.current(); ++it) last = it.current(); @@ -1189,3 +1204,3 @@ qDebug("KListView::startDrag drag&drop not supported yet."); -QDragObject *KListView::dragObject() +Q3DragObject *KListView::dragObject() { @@ -1194,3 +1209,3 @@ QDragObject *KListView::dragObject() - return new QStoredDrag("application/x-qlistviewitem", viewport()); + return new Q3StoredDrag("application/x-qlistviewitem", viewport()); } @@ -1248,6 +1263,6 @@ void KListView::setDropVisualizer(bool b) -QPtrList<QListViewItem> KListView::selectedItems() const +Q3PtrList<Q3ListViewItem> KListView::selectedItems() const { - QPtrList<QListViewItem> list; - for (QListViewItem *i=firstChild(); i!=0; i=i->itemBelow()) + Q3PtrList<Q3ListViewItem> list; + for (Q3ListViewItem *i=firstChild(); i!=0; i=i->itemBelow()) if (i->isSelected()) list.append(i); @@ -1257,6 +1272,6 @@ QPtrList<QListViewItem> KListView::selectedItems() const -void KListView::moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after) +void KListView::moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after) { // sanity check - don't move a item into it's own child structure - QListViewItem *i = parent; + Q3ListViewItem *i = parent; while(i) @@ -1298,4 +1313,4 @@ void KListView::setDropVisualizerWidth (int w) -QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, - QListViewItem *after) +QRect KListView::drawDropVisualizer(QPainter *p, Q3ListViewItem *parent, + Q3ListViewItem *after) { @@ -1310,3 +1325,3 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, { - QListViewItem* it = 0L; + Q3ListViewItem* it = 0L; if (after->isOpen()) @@ -1340,3 +1355,3 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, if (p) - p->fillRect(insertmarker, Dense4Pattern); + p->fillRect(insertmarker, Qt::Dense4Pattern); @@ -1345,3 +1360,3 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, -QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item) +QRect KListView::drawItemHighlighter(QPainter *painter, Q3ListViewItem *item) { @@ -1378,3 +1393,3 @@ void KListView::cleanItemHighlighter () -void KListView::rename(QListViewItem *item, int c) +void KListView::rename(Q3ListViewItem *item, int c) { @@ -1405,3 +1420,3 @@ void KListView::setRenameable (int col, bool yesno) -void KListView::doneEditing(QListViewItem *item, int row) +void KListView::doneEditing(Q3ListViewItem *item, int row) { @@ -1449,3 +1464,3 @@ bool KListView::dropHighlighter() const -bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const +bool KListView::showTooltip(Q3ListViewItem *item, const QPoint &, int column) const { @@ -1454,3 +1469,3 @@ bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) con -QString KListView::tooltip(QListViewItem *item, int column) const +QString KListView::tooltip(Q3ListViewItem *item, int column) const { @@ -1484,3 +1499,3 @@ void KListView::keyPressEvent (QKeyEvent* e) if (d->selectionMode != FileManager) - QListView::keyPressEvent (e); + Q3ListView::keyPressEvent (e); else @@ -1515,3 +1530,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) //don't care whether it's on the keypad or not - int e_state=(e->state() & ~Keypad); + int e_state=(e->state() & ~Qt::Keypad); @@ -1519,27 +1534,27 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - if ((e->key()!=Key_Shift) && (e->key()!=Key_Control) - && (e->key()!=Key_Meta) && (e->key()!=Key_Alt)) + if ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control) + && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt)) { - if ((e_state==ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove)) + if ((e_state==Qt::ShiftButton) && (!d->wasShiftEvent) && (!d->selectedBySimpleMove)) selectAll(FALSE); d->selectionDirection=0; - d->wasShiftEvent = (e_state == ShiftButton); + d->wasShiftEvent = (e_state == Qt::ShiftButton); }; - //d->wasShiftEvent = (e_state == ShiftButton); + //d->wasShiftEvent = (e_state == Qt::ShiftButton); - QListViewItem* item = currentItem(); + Q3ListViewItem* item = currentItem(); if (item==0) return; - QListViewItem* repaintItem1 = item; - QListViewItem* repaintItem2 = 0L; - QListViewItem* visItem = 0L; + Q3ListViewItem* repaintItem1 = item; + Q3ListViewItem* repaintItem2 = 0L; + Q3ListViewItem* visItem = 0L; - QListViewItem* nextItem = 0L; + Q3ListViewItem* nextItem = 0L; int items = 0; - bool shiftOrCtrl((e_state==ControlButton) || (e_state==ShiftButton)); + bool shiftOrCtrl((e_state==Qt::ControlButton) || (e_state==Qt::ShiftButton)); int selectedItems(0); - for (QListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling()) + for (Q3ListViewItem *tmpItem=firstChild(); tmpItem!=0; tmpItem=tmpItem->nextSibling()) if (tmpItem->isSelected()) selectedItems++; @@ -1547,9 +1562,9 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) if (((selectedItems==0) || ((selectedItems==1) && (d->selectedUsingMouse))) - && (e_state==NoButton) - && ((e->key()==Key_Down) - || (e->key()==Key_Up) - || (e->key()==Key_Next) - || (e->key()==Key_Prior) - || (e->key()==Key_Home) - || (e->key()==Key_End))) + && (e_state==Qt::NoButton) + && ((e->key()==Qt::Key_Down) + || (e->key()==Qt::Key_Up) + || (e->key()==Qt::Key_Next) + || (e->key()==Qt::Key_Prior) + || (e->key()==Qt::Key_Home) + || (e->key()==Qt::Key_End))) { @@ -1565,3 +1580,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) { - case Key_Escape: + case Qt::Key_Escape: selectAll(FALSE); @@ -1570,3 +1585,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Space: + case Qt::Key_Space: //toggle selection of current item @@ -1578,3 +1593,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Insert: + case Qt::Key_Insert: //toggle selection of current item and move to the next item @@ -1602,3 +1617,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Down: + case Qt::Key_Down: nextItem=item->itemBelow(); @@ -1635,3 +1650,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Up: + case Qt::Key_Up: nextItem=item->itemAbove(); @@ -1670,3 +1685,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_End: + case Qt::Key_End: //move to the last item and toggle selection of all items inbetween @@ -1695,3 +1710,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Home: + case Qt::Key_Home: // move to the first item and toggle selection of all items inbetween @@ -1717,3 +1732,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Next: + case Qt::Key_Next: items=visibleHeight()/item->height(); @@ -1753,3 +1768,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Prior: + case Qt::Key_Prior: items=visibleHeight()/item->height(); @@ -1787,3 +1802,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) - case Key_Minus: + case Qt::Key_Minus: if ( item->isOpen() ) @@ -1791,3 +1806,3 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Plus: + case Qt::Key_Plus: if ( !item->isOpen() && (item->isExpandable() || item->childCount()) ) @@ -1796,4 +1811,4 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) default: - bool realKey = ((e->key()!=Key_Shift) && (e->key()!=Key_Control) - && (e->key()!=Key_Meta) && (e->key()!=Key_Alt)); + bool realKey = ((e->key()!=Qt::Key_Shift) && (e->key()!=Qt::Key_Control) + && (e->key()!=Qt::Key_Meta) && (e->key()!=Qt::Key_Alt)); @@ -1803,5 +1818,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) //this is mainly for the "goto filename beginning with pressed char" feature (aleXXX) - QListView::SelectionMode oldSelectionMode = selectionMode(); - setSelectionMode (QListView::Multi); - QListView::keyPressEvent (e); + Q3ListView::SelectionMode oldSelectionMode = selectionMode(); + setSelectionMode (Q3ListView::Multi); + Q3ListView::keyPressEvent (e); setSelectionMode (oldSelectionMode); @@ -1852,3 +1867,3 @@ void KListView::setSelectionModeExt (SelectionModeExt mode) case NoSelection: - setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode))); + setSelectionMode (static_cast<Q3ListView::SelectionMode>(static_cast<int>(mode))); break; @@ -1856,3 +1871,3 @@ void KListView::setSelectionModeExt (SelectionModeExt mode) case FileManager: - setSelectionMode (QListView::Extended); + setSelectionMode (Q3ListView::Extended); break; @@ -1870,3 +1885,3 @@ KListView::SelectionModeExt KListView::selectionModeExt () const -int KListView::itemIndex( const QListViewItem *item ) const +int KListView::itemIndex( const Q3ListViewItem *item ) const { @@ -1878,3 +1893,3 @@ int KListView::itemIndex( const QListViewItem *item ) const else { - QListViewItemIterator it(firstChild()); + Q3ListViewItemIterator it(firstChild()); uint j = 0; @@ -1889,3 +1904,3 @@ int KListView::itemIndex( const QListViewItem *item ) const -QListViewItem* KListView::itemAtIndex(int index) +Q3ListViewItem* KListView::itemAtIndex(int index) { @@ -1895,3 +1910,3 @@ QListViewItem* KListView::itemAtIndex(int index) int j(0); - for (QListViewItemIterator it=firstChild(); it.current(); it++) + for (Q3ListViewItemIterator it=firstChild(); it.current(); it++) { @@ -1905,3 +1920,3 @@ QListViewItem* KListView::itemAtIndex(int index) -void KListView::emitContextMenu (KListView*, QListViewItem* i) +void KListView::emitContextMenu (KListView*, Q3ListViewItem* i) { @@ -1918,5 +1933,5 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i) -void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) +void KListView::emitContextMenu (Q3ListViewItem* i, const QPoint& p, int col) { - QListViewItem* item = i; + Q3ListViewItem* item = i; int c = col; @@ -1935,3 +1950,3 @@ void KListView::setAcceptDrops (bool val) { - QListView::setAcceptDrops (val); + Q3ListView::setAcceptDrops (val); viewport()->setAcceptDrops (val); @@ -1947,3 +1962,3 @@ void KListView::viewportPaintEvent(QPaintEvent *e) { - QListView::viewportPaintEvent(e); + Q3ListView::viewportPaintEvent(e); @@ -1954,3 +1969,3 @@ void KListView::viewportPaintEvent(QPaintEvent *e) // This is where we actually draw the drop-visualizer - painter.fillRect(d->mOldDropVisualizer, Dense4Pattern); + painter.fillRect(d->mOldDropVisualizer, Qt::Dense4Pattern); } @@ -1990,3 +2005,3 @@ int KListView::addColumn(const QString& label, int width) { - int result = QListView::addColumn(label, width); + int result = Q3ListView::addColumn(label, width); if (d->fullWidth) { @@ -1998,5 +2013,5 @@ int KListView::addColumn(const QString& label, int width) -int KListView::addColumn(const QIconSet& iconset, const QString& label, int width) +int KListView::addColumn(const QIcon& iconset, const QString& label, int width) { - int result = QListView::addColumn(iconset, label, width); + int result = Q3ListView::addColumn(iconset, label, width); if (d->fullWidth) { @@ -2010,3 +2025,3 @@ void KListView::removeColumn(int index) { - QListView::removeColumn(index); + Q3ListView::removeColumn(index); //US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1); @@ -2016,3 +2031,3 @@ void KListView::viewportResizeEvent(QResizeEvent* e) { - QListView::viewportResizeEvent(e); + Q3ListView::viewportResizeEvent(e); } @@ -2072,3 +2087,3 @@ void KListView::setSorting(int column, bool ascending) d->sortAscending = ascending; - QListView::setSorting(column, ascending); + Q3ListView::setSorting(column, ascending); } @@ -2085,4 +2100,4 @@ bool KListView::ascendingSort(void) const -KListViewItem::KListViewItem(QListView *parent) - : QListViewItem(parent) +KListViewItem::KListViewItem(Q3ListView *parent) + : Q3ListViewItem(parent) { @@ -2091,4 +2106,4 @@ KListViewItem::KListViewItem(QListView *parent) -KListViewItem::KListViewItem(QListViewItem *parent) - : QListViewItem(parent) +KListViewItem::KListViewItem(Q3ListViewItem *parent) + : Q3ListViewItem(parent) { @@ -2097,4 +2112,4 @@ KListViewItem::KListViewItem(QListViewItem *parent) -KListViewItem::KListViewItem(QListView *parent, QListViewItem *after) - : QListViewItem(parent, after) +KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after) + : Q3ListViewItem(parent, after) { @@ -2103,4 +2118,4 @@ KListViewItem::KListViewItem(QListView *parent, QListViewItem *after) -KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after) - : QListViewItem(parent, after) +KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after) + : Q3ListViewItem(parent, after) { @@ -2109,6 +2124,6 @@ KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after) -KListViewItem::KListViewItem(QListView *parent, +KListViewItem::KListViewItem(Q3ListView *parent, QString label1, QString label2, QString label3, QString label4, QString label5, QString label6, QString label7, QString label8) - : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) + : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { @@ -2117,6 +2132,6 @@ KListViewItem::KListViewItem(QListView *parent, -KListViewItem::KListViewItem(QListViewItem *parent, +KListViewItem::KListViewItem(Q3ListViewItem *parent, QString label1, QString label2, QString label3, QString label4, QString label5, QString label6, QString label7, QString label8) - : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) + : Q3ListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { @@ -2125,6 +2140,6 @@ KListViewItem::KListViewItem(QListViewItem *parent, -KListViewItem::KListViewItem(QListView *parent, QListViewItem *after, +KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after, QString label1, QString label2, QString label3, QString label4, QString label5, QString label6, QString label7, QString label8) - : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) + : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) { @@ -2133,6 +2148,6 @@ KListViewItem::KListViewItem(QListView *parent, QListViewItem *after, -KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after, +KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after, QString label1, QString label2, QString label3, QString label4, QString label5, QString label6, QString label7, QString label8) - : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) + : Q3ListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) { @@ -2214,3 +2229,3 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in //US if (listView()->viewport()->backgroundMode()==Qt::FixedColor) - if (listView()->viewport()->backgroundMode()==QWidget::PaletteBackground) + if (listView()->viewport()->backgroundMode()==Qt::PaletteBackground) _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); @@ -2219,3 +2234,3 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in } - QListViewItem::paintCell(p, _cg, column, width, alignment); + Q3ListViewItem::paintCell(p, _cg, column, width, alignment); } 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 @@ -22,5 +22,16 @@ -#include <qlistview.h> - -#include <qptrlist.h> +#include <q3listview.h> + +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QDragLeaveEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> +#include <QDragEnterEvent> @@ -32,3 +43,3 @@ class QDragEnterEvent; -class QDragObject; +class Q3DragObject; class KConfig; @@ -59,3 +70,3 @@ class KLineEdit; */ -class KListView : public QListView +class KListView : public Q3ListView { @@ -108,6 +119,6 @@ public: enum SelectionModeExt { - Single = QListView::Single, - Multi = QListView::Multi, - Extended = QListView::Extended, - NoSelection = QListView::NoSelection, + Single = Q3ListView::Single, + Multi = Q3ListView::Multi, + Extended = Q3ListView::Extended, + NoSelection = Q3ListView::NoSelection, FileManager @@ -116,3 +127,3 @@ public: { - QScrollView::repaintContents( contentsX(), contentsY(), + Q3ScrollView::repaintContents( contentsX(), contentsY(), visibleWidth(), visibleHeight(), erase ); @@ -163,3 +174,3 @@ public: */ - QPtrList<QListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?) + Q3PtrList<Q3ListViewItem> selectedItems() const; // ### BIC: KDE 4: use an implicitly shared class! (QValueList?) @@ -168,3 +179,3 @@ public: */ - void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after); + void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after); @@ -175,3 +186,3 @@ public: */ - QListViewItem *lastItem() const; + Q3ListViewItem *lastItem() const; @@ -182,3 +193,3 @@ public: */ - QListViewItem* lastChild () const; + Q3ListViewItem* lastChild () const; @@ -278,3 +289,3 @@ public: */ - int itemIndex( const QListViewItem *item ) const; + int itemIndex( const Q3ListViewItem *item ) const; @@ -285,3 +296,3 @@ public: */ - QListViewItem* itemAtIndex(int index); + Q3ListViewItem* itemAtIndex(int index); @@ -316,3 +327,3 @@ public: */ - virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1); + virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1); /** @@ -390,3 +401,3 @@ signals: */ - void executed( QListViewItem *item ); + void executed( Q3ListViewItem *item ); @@ -403,3 +414,3 @@ signals: */ - void executed( QListViewItem *item, const QPoint &pos, int c ); + void executed( Q3ListViewItem *item, const QPoint &pos, int c ); @@ -419,4 +430,4 @@ signals: */ - void doubleClicked( QListViewItem *item, const QPoint &pos, int c ); - void contextRequest( QListViewItem *item, const QPoint &pos, int c ); + void doubleClicked( Q3ListViewItem *item, const QPoint &pos, int c ); + void contextRequest( Q3ListViewItem *item, const QPoint &pos, int c ); @@ -432,3 +443,3 @@ signals: */ - void dropped (QDropEvent * e, QListViewItem *after); + void dropped (QDropEvent * e, Q3ListViewItem *after); @@ -446,3 +457,3 @@ signals: */ - void dropped (KListView* list, QDropEvent* e, QListViewItem* after); + void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after); @@ -460,3 +471,3 @@ signals: */ - void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after); + void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); @@ -473,3 +484,3 @@ signals: */ - void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after); + void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); @@ -504,3 +515,3 @@ signals: */ - void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow); + void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow); @@ -512,3 +523,3 @@ signals: */ - void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow); + void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow); @@ -521,3 +532,3 @@ signals: */ - void itemRenamed(QListViewItem* item, const QString &str, int col); + void itemRenamed(Q3ListViewItem* item, const QString &str, int col); @@ -526,3 +537,3 @@ signals: */ - void itemRenamed(QListViewItem* item); + void itemRenamed(Q3ListViewItem* item); void signalDelete(); @@ -539,3 +550,3 @@ signals: */ - void menuShortCutPressed (KListView* list, QListViewItem* item); + void menuShortCutPressed (KListView* list, Q3ListViewItem* item); @@ -549,3 +560,3 @@ signals: */ - void contextMenu (KListView* l, QListViewItem* i, const QPoint& p); + void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p); @@ -555,3 +566,3 @@ public slots: */ - virtual void rename(QListViewItem *item, int c); + virtual void rename(Q3ListViewItem *item, int c); @@ -675,3 +686,3 @@ protected: */ - inline bool below (QListViewItem* i, const QPoint& p) + inline bool below (Q3ListViewItem* i, const QPoint& p) { @@ -691,3 +702,3 @@ protected: //US I added buttonstate to pass the current keyboard status - void emitExecute( int buttonstate, QListViewItem *item, const QPoint &pos, int c); + void emitExecute( int buttonstate, Q3ListViewItem *item, const QPoint &pos, int c); @@ -723,3 +734,3 @@ protected: */ - virtual QString tooltip(QListViewItem* item, int column) const; + virtual QString tooltip(Q3ListViewItem* item, int column) const; @@ -728,3 +739,3 @@ protected: */ - virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const; + virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const; @@ -807,3 +818,3 @@ protected: */ - virtual QDragObject *dragObject(); + virtual Q3DragObject *dragObject(); @@ -823,3 +834,3 @@ protected: */ - virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after); + virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after); @@ -831,3 +842,3 @@ protected: */ - virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item); + virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item); @@ -888,4 +899,4 @@ protected slots: - void slotMouseButtonClicked( int btn, QListViewItem *item, const QPoint &pos, int c ); - void doneEditing(QListViewItem *item, int row); + void slotMouseButtonClicked( int btn, Q3ListViewItem *item, const QPoint &pos, int c ); + void doneEditing(Q3ListViewItem *item, int row); @@ -904,3 +915,3 @@ protected slots: */ - void emitContextMenu (QListViewItem*, const QPoint&, int); + void emitContextMenu (Q3ListViewItem*, const QPoint&, int); @@ -909,3 +920,3 @@ protected slots: */ - void emitContextMenu (KListView*, QListViewItem*); + void emitContextMenu (KListView*, Q3ListViewItem*); @@ -915,3 +926,3 @@ protected slots: */ - void slotOnItem( QListViewItem *item ); + void slotOnItem( Q3ListViewItem *item ); @@ -941,3 +952,3 @@ protected: */ - virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme); + virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme); @@ -949,3 +960,3 @@ protected: */ - virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after); + virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after); @@ -976,3 +987,3 @@ private: */ -class KListViewItem : public QListViewItem +class KListViewItem : public Q3ListViewItem { @@ -985,8 +996,8 @@ public: */ - KListViewItem(QListView *parent); - KListViewItem(QListViewItem *parent); - KListViewItem(QListView *parent, QListViewItem *after); - KListViewItem(QListViewItem *parent, QListViewItem *after); + KListViewItem(Q3ListView *parent); + KListViewItem(Q3ListViewItem *parent); + KListViewItem(Q3ListView *parent, Q3ListViewItem *after); + KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after); - KListViewItem(QListView *parent, + KListViewItem(Q3ListView *parent, QString, QString = QString::null, @@ -996,3 +1007,3 @@ public: - KListViewItem(QListViewItem *parent, + KListViewItem(Q3ListViewItem *parent, QString, QString = QString::null, @@ -1002,3 +1013,3 @@ public: - KListViewItem(QListView *parent, QListViewItem *after, + KListViewItem(Q3ListView *parent, Q3ListViewItem *after, QString, QString = QString::null, @@ -1008,3 +1019,3 @@ public: - KListViewItem(QListViewItem *parent, QListViewItem *after, + KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after, QString, 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 @@ -23,3 +23,3 @@ */ -#include <qobjectlist.h> +#include <qobject.h> #include <qstringlist.h> @@ -29,2 +29,8 @@ #include <qapplication.h> +//Added by qt3to4: +#include <QCloseEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QChildEvent> +#include <Q3PtrList> @@ -56,3 +62,3 @@ static bool no_query_exit = false; KMainWindow::KMainWindow( QWidget* parent, const char *name ) - : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ + : Q3MainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ { @@ -278,3 +284,3 @@ void KMainWindow::setPlainCaption( const QString &caption ) { - QMainWindow::setCaption( caption ); + Q3MainWindow::setCaption( caption ); #ifndef Q_WS_QWS @@ -423,6 +429,6 @@ void KMainWindow::createStandardStatusBarAction(){ -QToolBar *KMainWindow::tBar( ) +Q3ToolBar *KMainWindow::tBar( ) { if ( ! mQToolBar ) - mQToolBar = new QToolBar( this ); + mQToolBar = new Q3ToolBar( this ); return mQToolBar; @@ -445,12 +451,13 @@ KToolBar *KMainWindow::toolBar( const char * name ) */ - return new KToolBar(this, Top, false, name, honor_mode ); // non-XMLGUI + return new KToolBar(this, Qt::Top, false, name, honor_mode ); // non-XMLGUI } -QPtrListIterator<KToolBar> KMainWindow::toolBarIterator() +Q3PtrListIterator<KToolBar> KMainWindow::toolBarIterator() { toolbarList.clear(); - QPtrList<QToolBar> lst; - for ( int i = (int)QMainWindow::Unmanaged; i <= (int)Minimized; ++i ) { - lst = toolBars( (ToolBarDock)i ); - for ( QToolBar *tb = lst.first(); tb; tb = lst.next() ) { + QList<Q3ToolBar*> lst; + for ( int i = (int)Qt::Unmanaged; i <= (int)Qt::Minimized; ++i ) { + lst = toolBars( (Qt::ToolBarDock)i ); + for(QList<Q3ToolBar*>::iterator i=lst.begin();i!=lst.end();++i) { + Q3ToolBar *tb = *i; if ( !tb->inherits( "KToolBar" ) ) @@ -460,3 +467,3 @@ QPtrListIterator<KToolBar> KMainWindow::toolBarIterator() } - return QPtrListIterator<KToolBar>( toolbarList ); + return Q3PtrListIterator<KToolBar>( toolbarList ); } @@ -471,3 +478,3 @@ void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindo //US this, SLOT( setSettingsDirty() ) ); - connect( this, SIGNAL( toolBarPositionChanged(QToolBar *) ), + connect( this, SIGNAL( toolBarPositionChanged(Q3ToolBar *) ), this, SLOT( setSettingsDirty() ) ); @@ -505,3 +512,3 @@ void KMainWindow::saveAutoSaveSettings() { - ASSERT( d->autoSaveSettings ); + Q_ASSERT( d->autoSaveSettings ); //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl; @@ -641,3 +648,3 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG KToolBar *toolbar = 0; - QPtrListIterator<KToolBar> it( toolBarIterator() ); + Q3PtrListIterator<KToolBar> it( toolBarIterator() ); while ( ( toolbar = it.current() ) ) { @@ -716,10 +723,12 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config entryList = config->readListEntry (QString::fromLatin1("MenuBar")); - entry = entryList.first(); - if (entry==QString::fromLatin1("Disabled")) - { - mb->hide(); - } else - { - mb->show(); - } + if(!entryList.empty()) { + entry = entryList.first(); + if (entry==QString::fromLatin1("Disabled")) + { + mb->hide(); + } else + { + mb->show(); + } + } } @@ -728,3 +737,3 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config KToolBar *toolbar; - QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator + Q3PtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator @@ -758,3 +767,3 @@ void KMainWindow::finalizeGUI( bool force ) // Both the XMLGUI and applySettings call this, hence "force" for the latter. - QPtrListIterator<KToolBar> it( toolBarIterator() ); + Q3PtrListIterator<KToolBar> it( toolBarIterator() ); for ( ; it.current() ; ++ it ) @@ -853,3 +862,3 @@ void KMainWindow::resizeEvent( QResizeEvent * e) setSettingsDirty(); - QMainWindow::resizeEvent( e ); + Q3MainWindow::resizeEvent( e ); } @@ -871,3 +880,3 @@ QMenuBar *KMainWindow::menuBar() // setMenuBar method. - QMainWindow::menuBar(); + Q3MainWindow::menuBar(); } @@ -886,3 +895,3 @@ QStatusBar *KMainWindow::statusBar() // setStatusBar method. - QMainWindow::statusBar(); + Q3MainWindow::statusBar(); } @@ -910,12 +919,6 @@ QMenuBar *KMainWindow::internalMenuBar() //US QObjectList *l = queryList( "KMenuBar", 0, false, false ); - QObjectList *l = queryList( "QMenuBar", 0, false, false ); - if ( !l || !l->first() ) { - delete l; - return 0; - } - -//US KMenuBar *m = (KMenuBar*)l->first(); - QMenuBar *m = (QMenuBar*)l->first(); - delete l; - return m; + QObjectList l = queryList( "QMenuBar", 0, false, false ); + if(l.empty()) + return 0; + return (QMenuBar*)l.front(); } @@ -926,12 +929,6 @@ QStatusBar *KMainWindow::internalStatusBar() //US QObjectList *l = queryList( "KStatusBar", 0, false, false ); - QObjectList *l = queryList( "QStatusBar", 0, false, false ); - if ( !l || !l->first() ) { - delete l; - return 0; - } - -//US KStatusBar *s = (KStatusBar*)l->first(); - QStatusBar *s = (QStatusBar*)l->first(); - delete l; - return s; + QObjectList l = queryList( "QStatusBar", 0, false, false ); + if(l.empty()) + return 0; + return (QStatusBar*)l.front(); } @@ -940,3 +937,3 @@ void KMainWindow::childEvent( QChildEvent* e) { - QMainWindow::childEvent( e ); + Q3MainWindow::childEvent( e ); } @@ -945,3 +942,3 @@ void KMainWindow::paintEvent( QPaintEvent * e) { - QMainWindow::paintEvent( e ); + Q3MainWindow::paintEvent( e ); } 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 +1,6 @@ +//Added by qt3to4: +#include <QResizeEvent> +#include <QChildEvent> +#include <QCloseEvent> +#include <QPaintEvent> /* @@ -52,4 +57,4 @@ class KAction; #include <kxmlguiclient.h> -#include <qmainwindow.h> -#include <qptrlist.h> +#include <q3mainwindow.h> +#include <q3ptrlist.h> @@ -57,3 +62,3 @@ class KActionCollection; -class KMainWindow : public QMainWindow, virtual public KXMLGUIClient +class KMainWindow : public Q3MainWindow, virtual public KXMLGUIClient { @@ -322,3 +327,3 @@ public: // method for getting rid of KDE-Crap - QToolBar *tBar( ); + Q3ToolBar *tBar( ); @@ -327,3 +332,3 @@ public: */ - QPtrListIterator<KToolBar> toolBarIterator(); + Q3PtrListIterator<KToolBar> toolBarIterator(); @@ -760,3 +765,3 @@ private slots: private: - QToolBar * mQToolBar; + Q3ToolBar * mQToolBar; //US KMenuBar *internalMenuBar(); @@ -769,3 +774,3 @@ private: - QPtrList<KToolBar> toolbarList; + Q3PtrList<KToolBar> toolbarList; 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 @@ -44,2 +44,5 @@ #include <qstyle.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QEvent> @@ -108,7 +111,7 @@ void KNumInput::setLabel(const QString & label, int a) else m_label = new QLabel(label, this, "KNumInput::QLabel"); - m_label->setAlignment((a & (~(AlignTop|AlignBottom|AlignVCenter))) - | AlignVCenter); + m_label->setAlignment((a & (~(Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter))) + | Qt::AlignVCenter); // if no vertical alignment set, use Top alignment - if(!(a & (AlignTop|AlignBottom|AlignVCenter))) - a |= AlignTop; + if(!(a & (Qt::AlignTop|Qt::AlignBottom|Qt::AlignVCenter))) + a |= Qt::AlignTop; m_alignment = a; @@ -133,3 +136,3 @@ void KNumInput::layout(bool deep) - if(m_label && (m_alignment & AlignVCenter)) + if(m_label && (m_alignment & Qt::AlignVCenter)) m_colw1 = m_sizeLabel.width() + 4; @@ -204,3 +207,3 @@ KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name) { - editor()->setAlignment(AlignRight); + setAlignment(Qt::AlignRight); val_base = 10; @@ -217,3 +220,3 @@ KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base, { - editor()->setAlignment(AlignRight); + setAlignment(Qt::AlignRight); val_base = base; @@ -245,5 +248,5 @@ void KIntSpinBox::setEditFocus(bool mark) { - editor()->setFocus(); + setFocus(); if(mark) - editor()->selectAll(); + selectAll(); } @@ -327,3 +330,3 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider) - step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep? + step = m_spin->singleStep(); // maybe QRangeControl didn't like out lineStep? @@ -334,3 +337,3 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider) m_slider = new QSlider(lower, upper, step, m_spin->value(), - QSlider::Horizontal, this); + Qt::Horizontal, this); m_slider->setTickmarks(QSlider::Below); @@ -360,3 +363,3 @@ void KIntNumInput::setMinValue(int min) { - setRange(min, m_spin->maxValue(), m_spin->lineStep(), m_slider); + setRange(min, m_spin->maxValue(), m_spin->singleStep(), m_slider); } @@ -370,3 +373,3 @@ void KIntNumInput::setMaxValue(int max) { - setRange(m_spin->minValue(), max, m_spin->lineStep(), m_slider); + setRange(m_spin->minValue(), max, m_spin->singleStep(), m_slider); } @@ -417,3 +420,3 @@ QSize KIntNumInput::minimumSizeHint() const // if in extra row, then count it here - if(m_label && (m_alignment & (AlignBottom|AlignTop))) + if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop))) h += 4 + m_sizeLabel.height(); @@ -426,3 +429,3 @@ QSize KIntNumInput::minimumSizeHint() const - if(m_alignment & (AlignTop|AlignBottom)) + if(m_alignment & (Qt::AlignTop|Qt::AlignBottom)) w = QMAX(w, m_sizeLabel.width() + 4); @@ -446,3 +449,3 @@ void KIntNumInput::resizeEvent(QResizeEvent* e) - if(m_label && (m_alignment & AlignTop)) { + if(m_label && (m_alignment & Qt::AlignTop)) { m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); @@ -451,3 +454,3 @@ void KIntNumInput::resizeEvent(QResizeEvent* e) - if(m_label && (m_alignment & AlignVCenter)) + if(m_label && (m_alignment & Qt::AlignVCenter)) m_label->setGeometry(0, 0, w, m_sizeSpin.height()); @@ -462,3 +465,3 @@ void KIntNumInput::resizeEvent(QResizeEvent* e) - if(m_label && (m_alignment & AlignBottom)) + if(m_label && (m_alignment & Qt::AlignBottom)) m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); @@ -648,3 +651,3 @@ QSize KDoubleNumInput::minimumSizeHint() const // if in extra row, then count it here - if(m_label && (m_alignment & (AlignBottom|AlignTop))) + if(m_label && (m_alignment & (Qt::AlignBottom|Qt::AlignTop))) h += 4 + m_sizeLabel.height(); @@ -657,3 +660,3 @@ QSize KDoubleNumInput::minimumSizeHint() const - if(m_alignment & (AlignTop|AlignBottom)) + if(m_alignment & (Qt::AlignTop|Qt::AlignBottom)) w = QMAX(w, m_sizeLabel.width() + 4); @@ -668,3 +671,3 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e) - if(m_label && (m_alignment & AlignTop)) { + if(m_label && (m_alignment & Qt::AlignTop)) { m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); @@ -673,3 +676,3 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e) - if(m_label && (m_alignment & AlignVCenter)) + if(m_label && (m_alignment & Qt::AlignVCenter)) m_label->setGeometry(0, 0, w, m_sizeEdit.height()); @@ -685,3 +688,3 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e) - if(m_label && (m_alignment & AlignBottom)) + if(m_label && (m_alignment & Qt::AlignBottom)) m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); @@ -732,3 +735,3 @@ void KDoubleNumInput::setRange(double lower, double upper, double step, int slvalue = spin->value(); - int slstep = spin->lineStep(); + int slstep = spin->singleStep(); if (m_slider) { @@ -739,3 +742,3 @@ void KDoubleNumInput::setRange(double lower, double upper, double step, m_slider = new QSlider(slmin, slmax, slstep, slvalue, - QSlider::Horizontal, this); + Qt::Horizontal, this); m_slider->setTickmarks(QSlider::Below); @@ -914,3 +917,3 @@ KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name ) { - editor()->setAlignment( Qt::AlignRight ); + setAlignment( Qt::AlignRight ); d = new Private(); @@ -924,3 +927,3 @@ KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step, { - editor()->setAlignment( Qt::AlignRight ); + setAlignment( Qt::AlignRight ); d = new Private(); @@ -1029,3 +1032,3 @@ void KDoubleSpinBox::setMaxValue( double value ) { double KDoubleSpinBox::lineStep() const { - return d->mapToDouble( base::lineStep() ); + return d->mapToDouble( base::singleStep() ); } @@ -1074,3 +1077,3 @@ void KDoubleSpinBox::updateValidator() { this, "d->mValidator" ); - base::setValidator( d->mValidator ); + lineEdit()->setValidator( d->mValidator ); } else 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 @@ -31,2 +31,7 @@ #include <qspinbox.h> +#include <QLineEdit> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> +#include <QEvent> @@ -83,3 +88,3 @@ public: */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); @@ -304,3 +309,3 @@ public: */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); @@ -590,3 +595,3 @@ public: */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); /** @@ -760,2 +765,6 @@ public: + void setValidator(const QValidator *v) { + lineEdit()->setValidator(v); + } + protected: 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 @@ -3,2 +3,5 @@ #include <qtimer.h> +//Added by qt3to4: +#include <QFocusEvent> +#include <Q3PopupMenu> @@ -6,3 +9,3 @@ KPopupMenu::KPopupMenu ( QWidget * parent, const char * name ) - : QPopupMenu ( parent, name ) {;} + : Q3PopupMenu ( parent, name ) {;} 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 @@ -3,3 +3,5 @@ -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <QFocusEvent> #ifdef DESKTOP_VERSION @@ -11,3 +13,3 @@ -class KPopupMenu : public QPopupMenu +class KPopupMenu : public Q3PopupMenu { 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 @@ -20,2 +20,4 @@ #include <qstyle.h> +//Added by qt3to4: +#include <Q3Frame> @@ -28,4 +30,4 @@ -KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f) - : QFrame(parent, name, f) +KSeparator::KSeparator(QWidget* parent, const char* name, Qt::WFlags f) + : Q3Frame(parent, name, f) { @@ -38,4 +40,4 @@ KSeparator::KSeparator(QWidget* parent, const char* name, WFlags f) -KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, WFlags f) - : QFrame(parent, name, f) +KSeparator::KSeparator(int orientation, QWidget* parent, const char* name, Qt::WFlags f) + : Q3Frame(parent, name, f) { @@ -52,5 +54,5 @@ void KSeparator::setOrientation(int orientation) { - case Vertical: + case Qt::Vertical: case VLine: - setFrameStyle( QFrame::VLine | QFrame::Sunken ); + setFrameStyle( Q3Frame::VLine | Q3Frame::Sunken ); setMinimumSize(2, 0); @@ -61,5 +63,5 @@ void KSeparator::setOrientation(int orientation) - case Horizontal: + case Qt::Horizontal: case HLine: - setFrameStyle( QFrame::HLine | QFrame::Sunken ); + setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken ); setMinimumSize(0, 2); 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 @@ -22,3 +22,3 @@ -#include <qframe.h> +#include <q3frame.h> @@ -30,3 +30,3 @@ */ -class KSeparator : public QFrame +class KSeparator : public Q3Frame { @@ -38,3 +38,3 @@ class KSeparator : public QFrame **/ - KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0); + KSeparator(QWidget* parent=0, const char* name=0, Qt::WFlags f=0); /** @@ -46,3 +46,3 @@ class KSeparator : public QFrame KSeparator(int orientation, QWidget* parent=0, const char* name=0, - WFlags f=0); + Qt::WFlags f=0); 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 @@ -20,2 +20,5 @@ #include <qtooltip.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> 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 @@ -22,2 +22,4 @@ #include <qlabel.h> +//Added by qt3to4: +#include <QResizeEvent> 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 @@ -21,3 +21,3 @@ #include <qtoolbutton.h> -#include <qwhatsthis.h> +#include <q3whatsthis.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 @@ -27,5 +27,16 @@ #undef Always -#include <qdockwindow.h> +#include <q3dockwindow.h> #endif - +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> +#include <QPixmap> +#include <Q3Frame> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QChildEvent> +#include <QEvent> +#include <QShowEvent> +#include <QDesktopWidget> +#include <QBoxLayout> @@ -42,3 +53,3 @@ #include <qrect.h> -#include <qobjectlist.h> +#include <qobject.h> #include <qtimer.h> @@ -71,4 +82,4 @@ -#include <qpopupmenu.h> -#include <qmainwindow.h> +#include <q3popupmenu.h> +#include <q3mainwindow.h> @@ -104,3 +115,3 @@ public: //US oldPos = Qt::DockUnmanaged; - oldPos = QMainWindow::Unmanaged; + oldPos = Qt::Unmanaged; @@ -131,3 +142,3 @@ public: - QMainWindow::ToolBarDock oldPos; + Qt::ToolBarDock oldPos; @@ -138,5 +149,5 @@ public: //US ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {} - ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( QMainWindow::Top ) {} + ToolBarInfo() : index( 0 ), offset( -1 ), newline( FALSE ), dock( Qt::DockTop ) {} //US ToolBarInfo( Qt::Dock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {} - ToolBarInfo( QMainWindow::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {} + ToolBarInfo( Qt::ToolBarDock d, int i, bool n, int o ) : index( i ), offset( o ), newline( n ), dock( d ) {} int index, offset; @@ -144,3 +155,3 @@ public: //US Qt::Dock dock; - QMainWindow::ToolBarDock dock; + Qt::ToolBarDock dock; }; @@ -148,3 +159,3 @@ public: ToolBarInfo toolBarInfo; - QValueList<int> iconSizes; + Q3ValueList<int> iconSizes; QTimer repaintTimer; @@ -160,11 +171,11 @@ public: - QPtrList<QWidget> idleButtons; + Q3PtrList<QWidget> idleButtons; }; -KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent, +KToolBarSeparator::KToolBarSeparator(Qt::Orientation o , bool l, Q3ToolBar *parent, const char* name ) - :QFrame( parent, name ), line( l ) + :Q3Frame( parent, name ), line( l ) { - connect( parent, SIGNAL(orientationChanged(Orientation)), - this, SLOT(setOrientation(Orientation)) ); + connect( parent, SIGNAL(orientationChanged(Qt::Orientation)), + this, SLOT(setOrientation(Qt::Orientation)) ); setOrientation( o ); @@ -174,3 +185,3 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent, -void KToolBarSeparator::setOrientation( Orientation o ) +void KToolBarSeparator::setOrientation( Qt::Orientation o ) { @@ -178,3 +189,3 @@ void KToolBarSeparator::setOrientation( Orientation o ) if ( line ) { - if ( orientation() == Vertical ) + if ( orientation() == Qt::Vertical ) setFrameStyle( HLine + Sunken ); @@ -194,3 +205,3 @@ QSize KToolBarSeparator::sizeHint() const { - return orientation() == Vertical ? QSize( 0, 6 ) : QSize( 6, 0 ); + return orientation() == Qt::Vertical ? QSize( 0, 6 ) : QSize( 6, 0 ); } @@ -204,4 +215,4 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea #ifdef DESKTOP_VERSION - : QToolBar( QString::fromLatin1( name ), - parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0, + : Q3ToolBar( QString::fromLatin1( name ), + parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0, parent, FALSE, @@ -209,3 +220,3 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea #else - : QPEToolBar( parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0, + : QPEToolBar( parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0, QString::fromLatin1( name )) @@ -218,5 +229,5 @@ KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool rea -KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +KToolBar::KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) #ifdef DESKTOP_VERSION - : QToolBar( QString::fromLatin1( name ), + : Q3ToolBar( QString::fromLatin1( name ), parentWindow, dock, newLine, @@ -233,5 +244,5 @@ KToolBar::KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock, bo -KToolBar::KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) +KToolBar::KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine, const char *name, bool honorStyle, bool readConfig ) #ifdef DESKTOP_VERSION - : QToolBar( QString::fromLatin1( name ), + : Q3ToolBar( QString::fromLatin1( name ), parentWindow, dock, newLine, @@ -282,4 +293,4 @@ void KToolBar::init( bool readConfig, bool honorStyle ) if ( mainWindow() ) - connect( mainWindow(), SIGNAL( toolBarPositionChanged( QToolBar * ) ), - this, SLOT( toolBarPosChanged( QToolBar * ) ) ); + connect( mainWindow(), SIGNAL( toolBarPositionChanged( Q3ToolBar * ) ), + this, SLOT( toolBarPosChanged( Q3ToolBar * ) ) ); @@ -343,3 +354,3 @@ int KToolBar::insertButton(const QPixmap& pixmap, int id, const char *signal, -int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup, +int KToolBar::insertButton(const QString& icon, int id, Q3PopupMenu *popup, bool enabled, const QString &text, int index ) @@ -355,3 +366,3 @@ int KToolBar::insertButton(const QString& icon, int id, QPopupMenu *popup, -int KToolBar::insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup, +int KToolBar::insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup, bool enabled, const QString &text, int index ) @@ -542,3 +553,3 @@ void KToolBar::setButtonIcon( int id, const QString& _icon ) -void KToolBar::setButtonIconSet( int id, const QIconSet& iconset ) +void KToolBar::setButtonIconSet( int id, const QIcon& iconset ) { @@ -554,3 +565,3 @@ void KToolBar::setButtonIconSet( int id, const QIconSet& iconset ) -void KToolBar::setDelayedPopup (int id , QPopupMenu *_popup, bool toggle ) +void KToolBar::setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle ) { @@ -789,3 +800,3 @@ void KToolBar::clear () { - QToolBar::clear(); + Q3ToolBar::clear(); widget2id.clear(); @@ -878,3 +889,3 @@ void KToolBar::setBarPos (BarPosition bpos) //US mainWindow()->moveDockWindow( this, (Dock)bpos ); - mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos ); + mainWindow()->moveToolBar( this, (Qt::ToolBarDock)bpos ); } @@ -884,11 +895,11 @@ const KToolBar::BarPosition KToolBar::barPos() { - if ( !(QMainWindow*)mainWindow() ) + if ( !(Q3MainWindow*)mainWindow() ) return KToolBar::Top; //US Dock dock; - QMainWindow::ToolBarDock dock; + Qt::ToolBarDock dock; int dm1, dm2; bool dm3; - ((QMainWindow*)mainWindow())->getLocation( (QToolBar*)this, dock, dm1, dm3, dm2 ); + ((Q3MainWindow*)mainWindow())->getLocation( (Q3ToolBar*)this, dock, dm1, dm3, dm2 ); //US if ( dock == DockUnmanaged ) { - if ( dock == QMainWindow::Unmanaged ) { + if ( dock == Qt::Unmanaged ) { return (KToolBar::BarPosition)Top; @@ -969,3 +980,3 @@ void KToolBar::setIconText(IconText icontext, bool update) if ( mainWindow() ) { - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); mw->setUpdatesEnabled( FALSE ); @@ -1006,3 +1017,3 @@ void KToolBar::setIconSize(int size, bool update) if ( mainWindow() ) { - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); mw->setUpdatesEnabled( FALSE ); @@ -1064,6 +1075,6 @@ void KToolBar::setFlat (bool flag) //US mainWindow()->moveDockWindow( this, DockMinimized ); - mainWindow()->moveToolBar( this, QMainWindow::Minimized ); + mainWindow()->moveToolBar( this, Qt::Minimized ); else //US mainWindow()->moveDockWindow( this, DockTop ); - mainWindow()->moveToolBar( this, QMainWindow::Top ); + mainWindow()->moveToolBar( this, Qt::Top ); // And remember to save the new look later @@ -1251,5 +1262,5 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) return; - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); if ( mw->toolBarsMovable() && d->m_enableContext ) { - if ( m->button() == RightButton ) { + if ( m->button() == Qt::RightButton ) { int i = contextMenu()->exec( m->globalPos(), 0 ); @@ -1260,3 +1271,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) //US mw->moveDockWindow( this, DockLeft ); - mw->moveToolBar( this, QMainWindow::Left ); + mw->moveToolBar( this, Qt::Left ); break; @@ -1264,3 +1275,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) //US mw->moveDockWindow( this, DockRight ); - mw->moveToolBar( this, QMainWindow::Right ); + mw->moveToolBar( this, Qt::Right ); break; @@ -1268,3 +1279,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) //US mw->moveDockWindow( this, DockTop ); - mw->moveToolBar( this, QMainWindow::Top ); + mw->moveToolBar( this, Qt::Top ); break; @@ -1272,3 +1283,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) //US mw->moveDockWindow( this, DockBottom ); - mw->moveToolBar( this, QMainWindow::Bottom ); + mw->moveToolBar( this, Qt::Bottom ); break; @@ -1278,3 +1289,3 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) //US mw->moveDockWindow( this, DockMinimized ); - mw->moveToolBar( this, QMainWindow::Minimized ); + mw->moveToolBar( this, Qt::Minimized ); break; @@ -1334,3 +1345,3 @@ void KToolBar::rebuildLayout() } - if ( w->inherits( "QPopupMenu" ) ) + if ( w->inherits( "Q3PopupMenu" ) ) continue; @@ -1366,3 +1377,3 @@ void KToolBar::childEvent( QChildEvent *e ) if ( e->type() == QEvent::ChildInserted ) { - if ( !e->child()->inherits( "QPopupMenu" ) && + if ( !e->child()->inherits( "Q3PopupMenu" ) && ::qstrcmp( "qt_dockwidget_internal", e->child()->name() ) != 0 ) { @@ -1377,6 +1388,6 @@ void KToolBar::childEvent( QChildEvent *e ) } - } else { + } else if( e->type() == QEvent::ChildRemoved ) { removeWidgetInternal( w ); } - if ( isVisibleTo( 0 ) ) + /* TODO:hacker: if ( isVisibleTo( 0 ) ) { @@ -1392,5 +1403,5 @@ void KToolBar::childEvent( QChildEvent *e ) layoutTimer->start( 50, TRUE ); - } + } */ } - QToolBar::childEvent( e ); + Q3ToolBar::childEvent( e ); } @@ -1418,3 +1429,3 @@ void KToolBar::repaintMe() setUpdatesEnabled( true ); - QToolBar::repaint( true ); + Q3ToolBar::repaint( true ); qDebug(" KToolBar::repaintMe() "); @@ -1425,3 +1436,3 @@ void KToolBar::showEvent( QShowEvent *e ) rebuildLayout(); - QToolBar::showEvent( e ); + Q3ToolBar::showEvent( e ); } @@ -1430,3 +1441,3 @@ void KToolBar::setStretchableWidget( QWidget *w ) { - QToolBar::setStretchableWidget( w ); + Q3ToolBar::setStretchableWidget( w ); stretchableWidget = w; @@ -1436,3 +1447,3 @@ QSizePolicy KToolBar::sizePolicy() const { - if ( orientation() == Horizontal ) + if ( orientation() == Qt::Horizontal ) return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); @@ -1444,3 +1455,3 @@ QSize KToolBar::sizeHint() const { - QSize sh = QToolBar::sizeHint(); + QSize sh = Q3ToolBar::sizeHint(); //qDebug("%x KToolBar::sizeHint() %d %d ",this, QToolBar::sizeHint().width(),QToolBar::sizeHint().height() ); @@ -1510,3 +1521,3 @@ QSize KToolBar::sizeHint() const default: - minSize = QToolBar::sizeHint(); + minSize = Q3ToolBar::sizeHint(); break; @@ -1534,3 +1545,3 @@ void KToolBar::hide() { - QToolBar::hide(); + Q3ToolBar::hide(); } @@ -1539,3 +1550,3 @@ void KToolBar::show() { - QToolBar::show(); + Q3ToolBar::show(); } @@ -1546,3 +1557,3 @@ void KToolBar::resizeEvent( QResizeEvent *e ) setUpdatesEnabled( FALSE ); - QToolBar::resizeEvent( e ); + Q3ToolBar::resizeEvent( e ); if (b) @@ -1728,3 +1739,3 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); @@ -1807,15 +1818,15 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup) */ - QMainWindow::ToolBarDock pos(QMainWindow::Top); + Qt::ToolBarDock pos(Qt::DockTop); if ( position == "Top" ) - pos = QMainWindow::Top; + pos = Qt::Top; else if ( position == "Bottom" ) - pos = QMainWindow::Bottom; + pos = Qt::Bottom; else if ( position == "Left" ) - pos = QMainWindow::Left; + pos = Qt::Left; else if ( position == "Right" ) - pos = QMainWindow::Right; + pos = Qt::Right; else if ( position == "Floating" ) - pos = QMainWindow::TornOff; + pos = Qt::TornOff; else if ( position == "Flat" ) - pos = QMainWindow::Minimized; + pos = Qt::Minimized; @@ -1829,3 +1840,3 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup) { - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); @@ -1864,3 +1875,3 @@ bool KToolBar::event( QEvent *e ) - return QToolBar::event( e ); + return Q3ToolBar::event( e ); } @@ -1882,3 +1893,3 @@ void KToolBar::slotRepaint() -void KToolBar::toolBarPosChanged( QToolBar *tb ) +void KToolBar::toolBarPosChanged( Q3ToolBar *tb ) { @@ -1887,5 +1898,5 @@ void KToolBar::toolBarPosChanged( QToolBar *tb ) //US if ( d->oldPos == DockMinimized ) - if ( d->oldPos == QMainWindow::Minimized ) + if ( d->oldPos == Qt::Minimized ) rebuildLayout(); - d->oldPos = (QMainWindow::ToolBarDock)barPos(); + d->oldPos = (Qt::ToolBarDock)barPos(); /*US @@ -2033,3 +2044,3 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index ) if ( mainWindow() ) { - QMainWindow::ToolBarDock dock; + Qt::ToolBarDock dock; bool newLine; @@ -2102,3 +2113,3 @@ void KToolBar::positionYourself( bool force ) //US KPopupMenu *KToolBar::contextMenu() -QPopupMenu *KToolBar::contextMenu() +Q3PopupMenu *KToolBar::contextMenu() { @@ -2110,3 +2121,3 @@ QPopupMenu *KToolBar::contextMenu() //US context = new KPopupMenu( this, "qt_dockwidget_internal" ); - context = new QPopupMenu( this, "qt_dockwidget_internal" ); + context = new Q3PopupMenu( this, "qt_dockwidget_internal" ); //US context->insertTitle(i18n("Toolbar Menu")); @@ -2114,3 +2125,3 @@ QPopupMenu *KToolBar::contextMenu() //US KPopupMenu *orient = new KPopupMenu( context, "orient" ); - QPopupMenu *orient = new QPopupMenu( context, "orient" ); + Q3PopupMenu *orient = new Q3PopupMenu( context, "orient" ); orient->insertItem( i18n("toolbar position string","Top"), CONTEXT_TOP ); @@ -2124,3 +2135,3 @@ QPopupMenu *KToolBar::contextMenu() //US KPopupMenu *mode = new KPopupMenu( context, "mode" ); - QPopupMenu *mode = new QPopupMenu( context, "mode" ); + Q3PopupMenu *mode = new Q3PopupMenu( context, "mode" ); mode->insertItem( i18n("Icons Only"), CONTEXT_ICONS ); @@ -2131,6 +2142,6 @@ QPopupMenu *KToolBar::contextMenu() //US KPopupMenu *size = new KPopupMenu( context, "size" ); - QPopupMenu *size = new QPopupMenu( context, "size" ); + Q3PopupMenu *size = new Q3PopupMenu( context, "size" ); size->insertItem( i18n("Default"), CONTEXT_ICONSIZES ); // Query the current theme for available sizes - QValueList<int> avSizes; + Q3ValueList<int> avSizes; /*US @@ -2147,3 +2158,3 @@ QPopupMenu *KToolBar::contextMenu() - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for (it=avSizes.begin(); it!=avSizes.end(); it++) { @@ -2220,4 +2231,4 @@ void KToolBar::slotContextAboutToShow() - QValueList<int>::ConstIterator iIt = d->iconSizes.begin(); - QValueList<int>::ConstIterator iEnd = d->iconSizes.end(); + Q3ValueList<int>::ConstIterator iIt = d->iconSizes.begin(); + Q3ValueList<int>::ConstIterator iEnd = d->iconSizes.end(); for (; iIt != iEnd; ++iIt ) 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 @@ -28,3 +28,3 @@ #define private public -#include <qtoolbar.h> +#include <q3toolbar.h> #undef private @@ -32,3 +32,3 @@ #else -#include <qtoolbar.h> +#include <q3toolbar.h> #endif @@ -36,10 +36,18 @@ -#include <qmainwindow.h> +#include <q3mainwindow.h> #include <qcombobox.h> #include <qmap.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QPixmap> +#include <QResizeEvent> +#include <Q3PopupMenu> +#include <QMouseEvent> +#include <QChildEvent> +#include <QEvent> +#include <QShowEvent> #include <kglobal.h> -#include <qguardedptr.h> -#include <qframe.h> -#include <qiconset.h> +#include <qpointer.h> +#include <q3frame.h> +#include <qicon.h> @@ -48,3 +56,3 @@ class QSize; class QPixmap; -class QPopupMenu; +class Q3PopupMenu; class QStringList; @@ -65,3 +73,3 @@ class KToolBarPrivate; -class KToolBarSeparator : public QFrame +class KToolBarSeparator : public Q3Frame { @@ -69,6 +77,6 @@ class KToolBarSeparator : public QFrame public: - KToolBarSeparator( Orientation, bool l, QToolBar *parent, const char* name=0 ); + KToolBarSeparator( Qt::Orientation, bool l, Q3ToolBar *parent, const char* name=0 ); QSize sizeHint() const; - Orientation orientation() const { return orient; } + Qt::Orientation orientation() const { return orient; } QSizePolicy sizePolicy() const; @@ -76,3 +84,3 @@ public: public slots: - void setOrientation( Orientation ); + void setOrientation( Qt::Orientation ); protected: @@ -80,3 +88,3 @@ protected: private: - Orientation orient; + Qt::Orientation orient; bool line; @@ -113,6 +121,6 @@ private: #ifndef DESKTOP_VERSION -#define QToolBar QPEToolBar +#define Q3ToolBar QPEToolBar #endif - class KToolBar : public QToolBar + class KToolBar : public Q3ToolBar { @@ -129,3 +137,3 @@ private: #ifndef DESKTOP_VERSION -#undef QToolBar +#undef Q3ToolBar #endif @@ -177,3 +185,3 @@ public: */ - KToolBar( QMainWindow *parentWindow, QMainWindow::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false, + KToolBar( Q3MainWindow *parentWindow, Qt::ToolBarDock dock /*= QMainWindow::Top*/, bool newLine = false, const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE ); @@ -195,3 +203,3 @@ public: */ - KToolBar( QMainWindow *parentWindow, QWidget *dock, bool newLine = false, + KToolBar( Q3MainWindow *parentWindow, QWidget *dock, bool newLine = false, const char *name = 0, bool honor_style = FALSE, bool readConfig = TRUE ); @@ -305,3 +313,3 @@ public: */ - int insertButton(const QString& icon, int id, QPopupMenu *popup, + int insertButton(const QString& icon, int id, Q3PopupMenu *popup, bool enabled, const QString&_text, int index=-1); @@ -320,3 +328,3 @@ public: */ - int insertButton(const QPixmap& pixmap, int id, QPopupMenu *popup, + int insertButton(const QPixmap& pixmap, int id, Q3PopupMenu *popup, bool enabled, const QString&_text, int index=-1); @@ -361,3 +369,3 @@ public: int size=70, int index=-1, - QComboBox::Policy policy = QComboBox::AtBottom); + QComboBox::Policy policy = QComboBox::InsertAtBottom); @@ -377,3 +385,3 @@ public: int size=70, int index=-1, - QComboBox::Policy policy = QComboBox::AtBottom); + QComboBox::Policy policy = QComboBox::InsertAtBottom); @@ -467,3 +475,3 @@ public: */ - void setButtonIconSet( int id, const QIconSet& iconset ); + void setButtonIconSet( int id, const QIcon& iconset ); @@ -493,3 +501,3 @@ public: */ - void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false); + void setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle = false); @@ -1062,3 +1070,3 @@ public slots: virtual void setIconText( const QString &txt ) - { QToolBar::setIconText( txt ); } + { Q3ToolBar::setIconText( txt ); } void slotRepaint(); @@ -1079,3 +1087,3 @@ private slots: void slotIconChanged(int); - void toolBarPosChanged( QToolBar *tb ); + void toolBarPosChanged( Q3ToolBar *tb ); void slotContextAboutToShow(); @@ -1092,3 +1100,3 @@ private: //US KPopupMenu *contextMenu(); - QPopupMenu *contextMenu(); + Q3PopupMenu *contextMenu(); @@ -1098,6 +1106,6 @@ private: //US KPopupMenu *context; - QPopupMenu *context; - QPtrList<QWidget> widgets; + Q3PopupMenu *context; + Q3PtrList<QWidget> widgets; QTimer *layoutTimer; - QGuardedPtr<QWidget> stretchableWidget, rightAligned; + QPointer<QWidget> stretchableWidget, rightAligned; protected: 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 @@ -35,3 +35,3 @@ #include <qbitmap.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcursor.h> @@ -39,2 +39,6 @@ #include <qlayout.h> +//Added by qt3to4: +#include <QPixmap> +#include <QMouseEvent> +#include <QEvent> @@ -50,3 +54,3 @@ -template class QIntDict<KToolBarButton>; +template class Q3IntDict<KToolBarButton>; @@ -117,3 +121,3 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id, - setFocusPolicy( NoFocus ); + setFocusPolicy( Qt::NoFocus ); @@ -148,3 +152,3 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id, - setFocusPolicy( NoFocus ); + setFocusPolicy( Qt::NoFocus ); @@ -163,3 +167,3 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id, // set our pixmap and do our initial setup - setIconSet( QIconSet( pixmap )); + setIconSet( QIcon( pixmap )); modeChange(); @@ -294,3 +298,3 @@ void KToolBarButton::setIcon( const QString &icon ) -void KToolBarButton::setIconSet( const QIconSet &iconset ) +void KToolBarButton::setIconSet( const QIcon &iconset ) { @@ -307,4 +311,4 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap ) } - QIconSet set = iconSet(); - set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active ); + QIcon set = iconSet(); + set.setPixmap( pixmap, QIcon::Automatic, QIcon::Active ); QToolButton::setIconSet( set ); @@ -314,4 +318,4 @@ void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap ) { - QIconSet set = iconSet(); - set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Normal ); + QIcon set = iconSet(); + set.setPixmap( pixmap, QIcon::Automatic, QIcon::Normal ); QToolButton::setIconSet( set ); @@ -321,4 +325,4 @@ void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap ) { - QIconSet set = iconSet(); - set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Disabled ); + QIcon set = iconSet(); + set.setPixmap( pixmap, QIcon::Automatic, QIcon::Disabled ); QToolButton::setIconSet( set ); @@ -328,3 +332,3 @@ void KToolBarButton::setDefaultIcon( const QString& icon ) { - QIconSet set = iconSet(); + QIcon set = iconSet(); QPixmap pm; @@ -336,3 +340,3 @@ void KToolBarButton::setDefaultIcon( const QString& icon ) d->m_iconSize ); - set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal ); + set.setPixmap( pm, QIcon::Automatic, QIcon::Normal ); QToolButton::setIconSet( set ); @@ -342,3 +346,3 @@ void KToolBarButton::setDisabledIcon( const QString& icon ) { - QIconSet set = iconSet(); + QIcon set = iconSet(); QPixmap pm; @@ -350,3 +354,3 @@ void KToolBarButton::setDisabledIcon( const QString& icon ) d->m_iconSize ); - set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled ); + set.setPixmap( pm, QIcon::Automatic, QIcon::Disabled ); QToolButton::setIconSet( set ); @@ -354,3 +358,3 @@ void KToolBarButton::setDisabledIcon( const QString& icon ) -QPopupMenu *KToolBarButton::popup() +QMenu *KToolBarButton::popup() { @@ -361,3 +365,3 @@ QPopupMenu *KToolBarButton::popup() -void KToolBarButton::setPopup(QPopupMenu *p, bool) +void KToolBarButton::setPopup(Q3PopupMenu *p, bool) { @@ -368,3 +372,3 @@ void KToolBarButton::setPopup(QPopupMenu *p, bool) -void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool) +void KToolBarButton::setDelayedPopup (Q3PopupMenu *p, bool) { @@ -453,17 +457,23 @@ void KToolBarButton::drawButton( QPainter *_painter ) #ifdef DESKTOP_VERSION - QStyle::SFlags flags = QStyle::Style_Default; - QStyle::SCFlags active = QStyle::SC_None; + QStyle::State flags = QStyle::State_None; + QStyle::SubControls active = QStyle::SC_None; if (isDown()) { - flags |= QStyle::Style_Down; + flags |= QStyle::State_DownArrow; active |= QStyle::SC_ToolButton; } - if (isEnabled()) flags |= QStyle::Style_Enabled; - if (isOn()) flags |= QStyle::Style_On; - if (isEnabled() && d->m_isRaised) flags |= QStyle::Style_Raised; - if (hasFocus()) flags |= QStyle::Style_HasFocus; + if (isEnabled()) flags |= QStyle::State_Enabled; + if (isOn()) flags |= QStyle::State_On; + if (isEnabled() && d->m_isRaised) flags |= QStyle::State_Raised; + if (hasFocus()) flags |= QStyle::State_HasFocus; + + QStyleOptionToolButton qsotb; + qsotb.initFrom(this); + qsotb.state = flags; + qsotb.activeSubControls = active; + qsotb.rect = rect(); + qsotb.palette = palette(); // Draw a styled toolbutton - style().drawComplexControl(QStyle::CC_ToolButton, _painter, this, rect(), - colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption()); + style()->drawComplexControl(QStyle::CC_ToolButton, &qsotb, _painter, this); @@ -486,5 +496,5 @@ void KToolBarButton::drawButton( QPainter *_painter ) */ - QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic, - isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) : - QIconSet::Disabled); + QPixmap pixmap = iconSet().pixmap( QIcon::Automatic, + isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) : + QIcon::Disabled); @@ -510,5 +520,5 @@ void KToolBarButton::drawButton( QPainter *_painter ) */ - QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic, - isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) : - QIconSet::Disabled); + QPixmap pixmap = iconSet().pixmap( QIcon::Automatic, + isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) : + QIcon::Disabled); @@ -528,3 +538,3 @@ void KToolBarButton::drawButton( QPainter *_painter ) { - textFlags = AlignVCenter|AlignLeft; + textFlags = Qt::AlignVCenter|Qt::AlignLeft; if (!pixmap.isNull()) @@ -546,3 +556,3 @@ void KToolBarButton::drawButton( QPainter *_painter ) { - textFlags = AlignVCenter|AlignLeft; + textFlags = Qt::AlignVCenter|Qt::AlignLeft; dx = (width() - fm.width(textLabel())) / 2; @@ -565,5 +575,5 @@ void KToolBarButton::drawButton( QPainter *_painter ) */ - QPixmap pixmap = iconSet().pixmap( QIconSet::Automatic, - isEnabled() ? (d->m_isActive ? QIconSet::Active : QIconSet::Normal) : - QIconSet::Disabled); + QPixmap pixmap = iconSet().pixmap( QIcon::Automatic, + isEnabled() ? (d->m_isActive ? QIcon::Active : QIcon::Normal) : + QIcon::Disabled); @@ -583,3 +593,3 @@ void KToolBarButton::drawButton( QPainter *_painter ) { - textFlags = AlignBottom|AlignHCenter; + textFlags = Qt::AlignBottom|Qt::AlignHCenter; dx = (width() - fm.width(textLabel())) / 2; @@ -612,10 +622,14 @@ void KToolBarButton::drawButton( QPainter *_painter ) #ifdef DESKTOP_VERSION - QStyle::SFlags arrowFlags = QStyle::Style_Default; + QStyle::State arrowFlags = QStyle::State_None; + + if (isDown()) arrowFlags |= QStyle::State_DownArrow; + if (isEnabled()) arrowFlags |= QStyle::State_Enabled; - if (isDown()) arrowFlags |= QStyle::Style_Down; - if (isEnabled()) arrowFlags |= QStyle::Style_Enabled; + QStyleOption qso; + qso.initFrom(this); + qso.state = arrowFlags; + qso.rect = QRect(width()-7, height()-7, 7, 7); + qso.palette = palette(); - style().drawPrimitive(QStyle::PE_ArrowDown, _painter, - QRect(width()-7, height()-7, 7, 7), colorGroup(), - arrowFlags, QStyleOption() ); + style()->drawPrimitive(QStyle::PE_IndicatorArrowDown, &qso, _painter); #else 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 @@ -28,4 +28,7 @@ #include <qtoolbutton.h> -#include <qintdict.h> +#include <q3intdict.h> #include <qstring.h> +//Added by qt3to4: +#include <QEvent> +#include <Q3PopupMenu> #include <kglobal.h> @@ -36,3 +39,3 @@ class KToolBarButtonPrivate; class QEvent; -class QPopupMenu; +class Q3PopupMenu; class QPainter; @@ -152,3 +155,3 @@ public: */ - virtual void setIconSet( const QIconSet &iconset ); + virtual void setIconSet( const QIcon &iconset ); @@ -211,3 +214,3 @@ public: */ - QPopupMenu *popup(); + QMenu *popup(); @@ -226,3 +229,3 @@ public: */ - void setPopup (QPopupMenu *p, bool unused = false); + void setPopup (Q3PopupMenu *p, bool unused = false); @@ -237,3 +240,3 @@ public: */ - void setDelayedPopup(QPopupMenu *p, bool unused = false); + void setDelayedPopup(Q3PopupMenu *p, bool unused = false); @@ -305,3 +308,3 @@ private: */ -class KToolBarButtonList : public QIntDict<KToolBarButton> +class KToolBarButtonList : public Q3IntDict<KToolBarButton> { 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 @@ -20,3 +20,5 @@ -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3PtrList> #include <kapplication.h> @@ -46,3 +48,3 @@ namespace public: - BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, QPtrList<KToolBar> &oldToolBarList ) + BarActionBuilder( KActionCollection *actionCollection, KMainWindow *mainWindow, Q3PtrList<KToolBar> &oldToolBarList ) : m_actionCollection( actionCollection ), m_mainWindow( mainWindow ), m_needsRebuild( false ) @@ -72,8 +74,8 @@ namespace - QPtrList<KAction> create() + Q3PtrList<KAction> create() { if ( !m_needsRebuild ) - return QPtrList<KAction>(); + return Q3PtrList<KAction>(); - QPtrListIterator<KToolBar> toolBarIt( m_toolBars ); + Q3PtrListIterator<KToolBar> toolBarIt( m_toolBars ); for ( ; toolBarIt.current(); ++toolBarIt ) @@ -81,3 +83,3 @@ namespace - QPtrList<KAction> actions; + Q3PtrList<KAction> actions; @@ -93,3 +95,3 @@ namespace - QPtrListIterator<KAction> actionIt( m_toolBarActions ); + Q3PtrListIterator<KAction> actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) @@ -101,3 +103,3 @@ namespace - const QPtrList<KToolBar> &toolBars() const { return m_toolBars; } + const Q3PtrList<KToolBar> &toolBars() const { return m_toolBars; } @@ -117,4 +119,4 @@ namespace - QPtrList<KToolBar> m_toolBars; - QPtrList<KAction> m_toolBarActions; + Q3PtrList<KToolBar> m_toolBars; + Q3PtrList<KAction> m_toolBarActions; @@ -226,3 +228,3 @@ void ToolBarHandler::connectToActionContainers() { - QPtrListIterator<KAction> actionIt( m_actions ); + Q3PtrListIterator<KAction> actionIt( m_actions ); for ( ; actionIt.current(); ++actionIt ) @@ -241,3 +243,3 @@ void ToolBarHandler::connectToActionContainer( QWidget *container ) //US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container ); - QPopupMenu *popupMenu = (QPopupMenu *)( container ); + Q3PopupMenu *popupMenu = (Q3PopupMenu *)( container ); if ( !popupMenu ) 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 @@ -22,4 +22,4 @@ #include <qobject.h> -#include <qguardedptr.h> -#include <qptrlist.h> +#include <qpointer.h> +#include <q3ptrlist.h> #include <kxmlguiclient.h> @@ -59,5 +59,5 @@ private: - QGuardedPtr<KMainWindow> m_mainWindow; - QPtrList<KAction> m_actions; - QPtrList<KToolBar> m_toolBars; + QPointer<KMainWindow> m_mainWindow; + Q3PtrList<KAction> m_actions; + Q3PtrList<KToolBar> m_toolBars; }; 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 @@ -41,2 +41,4 @@ #include <assert.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -65,3 +67,3 @@ public: //QPtrList<KXMLGUIClient> m_supers; - QPtrList<KXMLGUIClient> m_children; + Q3PtrList<KXMLGUIClient> m_children; //US KXMLGUIBuilder *m_builder; @@ -87,3 +89,3 @@ KXMLGUIClient::~KXMLGUIClient() - QPtrListIterator<KXMLGUIClient> it( d->m_children ); + Q3PtrListIterator<KXMLGUIClient> it( d->m_children ); for ( ; it.current(); ++it ) { @@ -101,3 +103,3 @@ KAction *KXMLGUIClient::action( const char *name ) const if ( !act ) { - QPtrListIterator<KXMLGUIClient> childIt( d->m_children ); + Q3PtrListIterator<KXMLGUIClient> childIt( d->m_children ); for (; childIt.current(); ++childIt ) { @@ -590,3 +592,3 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child ) -const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients() +const Q3PtrList<KXMLGUIClient> *KXMLGUIClient::childClients() { @@ -608,3 +610,3 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const -void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList ) +void KXMLGUIClient::plugActionList( const QString &name, const Q3PtrList<KAction> &actionList ) { 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 @@ -23,3 +23,3 @@ //US #include <qdom.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qmap.h> @@ -163,3 +163,3 @@ public: */ - const QPtrList<KXMLGUIClient> *childClients(); + const Q3PtrList<KXMLGUIClient> *childClients(); @@ -230,3 +230,3 @@ public: */ - void plugActionList( const QString &name, const QPtrList<KAction> &actionList ); + void plugActionList( const QString &name, const Q3PtrList<KAction> &actionList ); diff --git a/microkde/kdialog.cpp b/microkde/kdialog.cpp index 8398956..57e7ea6 100644 --- a/microkde/kdialog.cpp +++ b/microkde/kdialog.cpp @@ -2,3 +2,3 @@ #include <kdialog.h> -#include <qapp.h> +#include <qapplication.h> #include <qlabel.h> @@ -6,3 +6,5 @@ #include <qlayout.h> -#include <qprogressbar.h> +#include <q3progressbar.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <klocale.h> @@ -32,5 +34,5 @@ KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal { - QVBoxLayout* lay= new QVBoxLayout ( this ); + Q3VBoxLayout* lay= new Q3VBoxLayout ( this ); mLabel = new QLabel ( "abc",this ); - mBar = new QProgressBar ( this ); + mBar = new Q3ProgressBar ( this ); mButton = new QPushButton ( i18n("Cancel"),this ); diff --git a/microkde/kdialog.h b/microkde/kdialog.h index bc80689..5f9bf0e 100644 --- a/microkde/kdialog.h +++ b/microkde/kdialog.h @@ -4,4 +4,6 @@ #include <qdialog.h> +//Added by qt3to4: +#include <QLabel> class QLabel; -class QProgressBar; +class Q3ProgressBar; class QPushButton ; @@ -31,3 +33,3 @@ class KProgressDialog : public QDialog QLabel * mLabel; - QProgressBar *mBar; + Q3ProgressBar *mBar; QPushButton *mButton; diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp index d5c7e61..a40bad6 100644 --- a/microkde/kdialogbase.cpp +++ b/microkde/kdialogbase.cpp @@ -3,3 +3,7 @@ #include <qlayout.h> -#include <qframe.h> +#include <q3frame.h> +//Added by qt3to4: +#include <QPixmap> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -137,3 +141,3 @@ void KDialogBase::initLayout() delete mTopLayout; - mTopLayout = new QVBoxLayout( this ); + mTopLayout = new Q3VBoxLayout( this ); mTopLayout->setMargin( marginHintSmall() ); @@ -143,3 +147,3 @@ void KDialogBase::initLayout() - QBoxLayout *buttonLayout = new QHBoxLayout; + Q3BoxLayout *buttonLayout = new Q3HBoxLayout; mTopLayout->addLayout( buttonLayout ); @@ -157,6 +161,6 @@ void KDialogBase::initLayout() -QFrame *KDialogBase::addPage( const QString &name ) +Q3Frame *KDialogBase::addPage( const QString &name ) { // kdDebug() << "KDialogBase::addPage(): " << name << endl; - QFrame *frame = new QFrame( tabWidget() ); + Q3Frame *frame = new Q3Frame( tabWidget() ); tabWidget()->addTab( frame, name ); @@ -165,3 +169,3 @@ QFrame *KDialogBase::addPage( const QString &name ) -QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) +Q3Frame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) { @@ -256,6 +260,6 @@ bool KDialogBase::showPage( int index ) -QFrame *KDialogBase::plainPage() +Q3Frame *KDialogBase::plainPage() { if ( !mPlainPage ) { - mPlainPage = new QFrame( this ); + mPlainPage = new Q3Frame( this ); setMainWidget( mPlainPage ); diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h index 17c186b..64cbd17 100644 --- a/microkde/kdialogbase.h +++ b/microkde/kdialogbase.h @@ -3,3 +3,5 @@ -#include <qframe.h> +#include <q3frame.h> +//Added by qt3to4: +#include <QPixmap> @@ -10,3 +12,3 @@ class QLayout; class QTabWidget; -class QBoxLayout; +class Q3BoxLayout; @@ -61,4 +63,4 @@ class KDialogBase : public KDialog - QFrame *addPage( const QString & ); - QFrame *addPage( const QString &, int, const QPixmap & ); + Q3Frame *addPage( const QString & ); + Q3Frame *addPage( const QString &, int, const QPixmap & ); @@ -79,3 +81,3 @@ class KDialogBase : public KDialog - QFrame *plainPage(); + Q3Frame *plainPage(); @@ -130,4 +132,4 @@ class KDialogBase : public KDialog QTabWidget *mTabWidget; - QFrame *mPlainPage; - QBoxLayout *mTopLayout; + Q3Frame *mPlainPage; + Q3BoxLayout *mTopLayout; diff --git a/microkde/keditlistbox.cpp b/microkde/keditlistbox.cpp index 55b7784..257a44a 100644 --- a/microkde/keditlistbox.cpp +++ b/microkde/keditlistbox.cpp @@ -23,6 +23,9 @@ #include <qlayout.h> -#include <qgroupbox.h> -#include <qlistbox.h> -#include <qwhatsthis.h> +#include <q3groupbox.h> +#include <q3listbox.h> +#include <q3whatsthis.h> #include <qlabel.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3StrList> @@ -49,3 +52,3 @@ KEditListBox::KEditListBox(QWidget *parent, const char *name, bool checkAtEntering, int buttons ) - :QGroupBox(parent, name ) + :Q3GroupBox(parent, name ) { @@ -56,3 +59,3 @@ KEditListBox::KEditListBox(const QString& title, QWidget *parent, const char *name, bool checkAtEntering, int buttons) - :QGroupBox(title, parent, name ) + :Q3GroupBox(title, parent, name ) { @@ -64,3 +67,3 @@ KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom, bool checkAtEntering, int buttons) - :QGroupBox(title, parent, name ) + :Q3GroupBox(title, parent, name ) { @@ -97,3 +100,3 @@ void KEditListBox::init( bool checkAtEntering, int buttons, QWidget * gb = this; - QGridLayout * grid = new QGridLayout(gb, 7 - lostButtons, 2, + Q3GridLayout * grid = new Q3GridLayout(gb, 7 - lostButtons, 2, KDialog::marginHint(), @@ -111,3 +114,3 @@ void KEditListBox::init( bool checkAtEntering, int buttons, - m_listBox = new QListBox(gb); + m_listBox = new Q3ListBox(gb); @@ -206,3 +209,3 @@ void KEditListBox::moveItemUp() - QListBoxItem *selItem = m_listBox->item(selIndex); + Q3ListBoxItem *selItem = m_listBox->item(selIndex); m_listBox->takeItem(selItem); @@ -229,3 +232,3 @@ void KEditListBox::moveItemDown() - QListBoxItem *selItem = m_listBox->item(selIndex); + Q3ListBoxItem *selItem = m_listBox->item(selIndex); m_listBox->takeItem(selItem); @@ -351,10 +354,12 @@ void KEditListBox::insertStringList(const QStringList& list, int index) -void KEditListBox::insertStrList(const QStrList* list, int index) +void KEditListBox::insertStrList(const Q3StrList* list, int index) { - m_listBox->insertStrList(list,index); + for(Q3StrList::const_iterator i=list->begin();i!=list->end();++i) + m_listBox->insertItem(*i,index++); } -void KEditListBox::insertStrList(const QStrList& list, int index) +void KEditListBox::insertStrList(const Q3StrList& list, int index) { - m_listBox->insertStrList(list,index); + for(Q3StrList::const_iterator i=list.begin();i!=list.end();++i) + m_listBox->insertItem(*i,index++); } diff --git a/microkde/keditlistbox.h b/microkde/keditlistbox.h index 130d933..e43d958 100644 --- a/microkde/keditlistbox.h +++ b/microkde/keditlistbox.h @@ -22,4 +22,6 @@ -#include <qgroupbox.h> -#include <qlistbox.h> +#include <q3groupbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <Q3StrList> @@ -38,3 +40,3 @@ class KEditListBoxPrivate; */ -class KEditListBox : public QGroupBox +class KEditListBox : public Q3GroupBox { @@ -128,3 +130,3 @@ public: */ - QListBox* listBox() const { return m_listBox; } + Q3ListBox* listBox() const { return m_listBox; } /** @@ -161,3 +163,3 @@ public: */ - void insertStrList(const QStrList* list, int index=-1); + void insertStrList(const Q3StrList* list, int index=-1); /** @@ -165,3 +167,3 @@ public: */ - void insertStrList(const QStrList& list, int index=-1); + void insertStrList(const Q3StrList& list, int index=-1); /** @@ -209,3 +211,3 @@ public: private: - QListBox *m_listBox; + Q3ListBox *m_listBox; QPushButton *servUpButton, *servDownButton; diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 383e711..c1bfdef 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp @@ -6,2 +6,4 @@ #include <qapplication.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -15,3 +17,3 @@ QString KFileDialog::getSaveFileName( const QString & fn, QDialog dia ( par, "input-dialog", true ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); @@ -44,3 +46,3 @@ QString KFileDialog::getOpenFileName( const QString & fn, // QLineEdit lab ( &dia ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); @@ -68,3 +70,3 @@ QString KFileDialog::getExistingDirectory( const QString & fn, -#include <qfiledialog.h> +#include <q3filedialog.h> @@ -73,3 +75,3 @@ QString KFileDialog::getSaveFileName( const QString & fn, { - return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); + return Q3FileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); } @@ -79,3 +81,3 @@ QString KFileDialog::getOpenFileName( const QString & fn, - return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); + return Q3FileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); } @@ -84,3 +86,3 @@ QString KFileDialog::getExistingDirectory( const QString & fn, { - return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); + return Q3FileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); } diff --git a/microkde/kfontdialog.cpp b/microkde/kfontdialog.cpp index 174123c..f83c2a8 100644 --- a/microkde/kfontdialog.cpp +++ b/microkde/kfontdialog.cpp @@ -9,2 +9,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3VBoxLayout> QFont KFontDialog::getFont( const QFont & f, bool & ok ) @@ -14,3 +16,3 @@ QFont KFontDialog::getFont( const QFont & f, bool & ok ) OFontSelector s ( true, &d, "fontsel"); - QVBoxLayout l ( &d ); + Q3VBoxLayout l ( &d ); l.addWidget( &s ); diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index 53edd08..9cc5835 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp @@ -2,4 +2,5 @@ #include "kstandarddirs.h" -#include <qkeycode.h> +#include <qnamespace.h> #include <qapplication.h> +#include <QDesktopWidget> @@ -15,3 +16,3 @@ KLocale *KGlobal::locale() if ( !mLocale ) { - ASSERT(mAppName); + Q_ASSERT(!mAppName.isEmpty()); diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index 2e483e9..1f08255 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp @@ -6,2 +6,3 @@ #include <qapplication.h> +#include <QDesktopWidget> diff --git a/microkde/kiconloader.cpp b/microkde/kiconloader.cpp index 4842d71..e7f657d 100644 --- a/microkde/kiconloader.cpp +++ b/microkde/kiconloader.cpp @@ -6,2 +6,4 @@ #include <qdir.h> +//Added by qt3to4: +#include <QPixmap> QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, @@ -16,3 +18,3 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, } -QIconSet KIconLoader::loadIconSet( const QString& name) const +QIcon KIconLoader::loadIconSet( const QString& name) const { @@ -23,3 +25,3 @@ QIconSet KIconLoader::loadIconSet( const QString& name) const //qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() ); - QIconSet is ( pixmapLoader ); + QIcon is ( pixmapLoader ); return is; @@ -79,3 +81,3 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, -QIconSet KIconLoader::loadIconSet( const QString& name) const +QIcon KIconLoader::loadIconSet( const QString& name) const { @@ -83,4 +85,4 @@ QIconSet KIconLoader::loadIconSet( const QString& name) const - QIconSet is ;//= Resource::loadIconSet( px ); - QIconSet* isPtr = 0;//LR&is; + QIcon is ;//= Resource::loadIconSet( px ); + QIcon* isPtr = 0;//LR&is; if (isPtr == 0) diff --git a/microkde/kiconloader.h b/microkde/kiconloader.h index 68fec4e..2abb667 100644 --- a/microkde/kiconloader.h +++ b/microkde/kiconloader.h @@ -6,3 +6,3 @@ //US -#include <qiconset.h> +#include <qicon.h> @@ -36,3 +36,3 @@ class KIconLoader QString iconPath( const QString &, int ) const; - QIconSet loadIconSet( const QString &name) const; + QIcon loadIconSet( const QString &name) const; 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 @@ -29,2 +29,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <QPixmap> @@ -184,3 +186,3 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent, KURLRequester::KURLRequester( QWidget *parent, const char *name ) - : QHBox( parent, name ) + : Q3HBox( parent, name ) { @@ -193,3 +195,3 @@ KURLRequester::KURLRequester( const QString& url, QWidget *parent, const char *name ) - : QHBox( parent, name ) + : Q3HBox( parent, name ) { @@ -218,4 +220,4 @@ void KURLRequester::init() myButton = new KURLDragPushButton( this, "kfile button"); - QIconSet iconSet = SmallIconSet("fileopen"); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + QIcon iconSet = SmallIconSet("fileopen"); + QPixmap pixMap = iconSet.pixmap( QIcon::Small, QIcon::Normal ); myButton->setIconSet( iconSet ); 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 @@ -22,3 +22,3 @@ -#include <qhbox.h> +#include <q3hbox.h> @@ -55,3 +55,3 @@ class QTimer; */ -class KURLRequester : public QHBox +class KURLRequester : public Q3HBox { 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 @@ -54,4 +54,4 @@ $Id$ #include <qfile.h> -#include <qintdict.h> -#include <qptrlist.h> +#include <q3intdict.h> +#include <q3ptrlist.h> #include <qsocketnotifier.h> @@ -59,2 +59,4 @@ $Id$ #include <qtimer.h> +//Added by qt3to4: +#include <Q3CString> @@ -186,3 +188,3 @@ KDirWatchPrivate::KDirWatchPrivate() KConfig *config = KGlobal::config(); - KConfigGroupSaver saver( config, QCString("DirWatch") ); + KConfigGroupSaver saver( config, Q3CString("DirWatch") ); @@ -733,3 +735,3 @@ void KDirWatchPrivate::removeEntries( KDirWatch* instance ) { - QPtrList<Entry> list; + Q3PtrList<Entry> list; int minfreq = 3600000; @@ -1009,3 +1011,3 @@ void KDirWatchPrivate::slotRescan() #ifdef HAVE_DNOTIFY - QPtrList<Entry> dList, cList; + Q3PtrList<Entry> dList, cList; 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 @@ -20,3 +20,3 @@ $Id$ -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -60,5 +60,5 @@ public: // instances interested in events - QPtrList<Client> m_clients; + Q3PtrList<Client> m_clients; // nonexistent entries of this directory - QPtrList<Entry> m_entries; + Q3PtrList<Entry> m_entries; QString path; @@ -126,3 +126,3 @@ private: bool delayRemove; - QPtrList<Entry> removeList; + Q3PtrList<Entry> removeList; @@ -143,3 +143,3 @@ private: QSocketNotifier *mSn; - QIntDict<Entry> fd_Entry; + Q3IntDict<Entry> fd_Entry; diff --git a/microkde/klineedit.h b/microkde/klineedit.h index 70c72d1..9eb749d 100644 --- a/microkde/klineedit.h +++ b/microkde/klineedit.h @@ -4,2 +4,4 @@ #include <qlineedit.h> +//Added by qt3to4: +#include <QKeyEvent> diff --git a/microkde/klineeditdlg.h b/microkde/klineeditdlg.h index 68e9252..d0004cd 100644 --- a/microkde/klineeditdlg.h +++ b/microkde/klineeditdlg.h @@ -9,2 +9,4 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -17,3 +19,3 @@ class KLineEditDlg : public QDialog mEdit = new KLineEdit( this ); - QVBoxLayout* vl = new QVBoxLayout( this ); + Q3VBoxLayout* vl = new Q3VBoxLayout( this ); vl->setSpacing(5); 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 @@ -27,3 +27,3 @@ -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> @@ -31,6 +31,9 @@ #include <qpushbutton.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qcheckbox.h> -#include <qscrollview.h> +#include <q3scrollview.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> @@ -57,3 +60,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, - QFrame *main; + Q3Frame *main; @@ -61,6 +64,6 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, - QVBoxLayout *mainLayout = new QVBoxLayout( main, 0, spacingHint() ); + Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main, 0, spacingHint() ); - QGroupBox *generalGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *generalGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); generalGroupBox->layout()->setSpacing( spacingHint() ); @@ -84,3 +87,3 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, - QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *resourceGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); resourceGroupBox->layout()->setSpacing( spacingHint()); 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 @@ -30,3 +30,3 @@ $Id$ -#include <qgroupbox.h> +#include <q3groupbox.h> @@ -39,2 +39,6 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3ValueList> +#include <Q3VBoxLayout> #include <kapplication.h> @@ -63,7 +67,7 @@ using namespace KRES; -class ConfigViewItem : public QCheckListItem +class ConfigViewItem : public Q3CheckListItem { public: - ConfigViewItem( QListView *parent, Resource* resource ) : - QCheckListItem( parent, resource->resourceName(), CheckBox ), + ConfigViewItem( Q3ListView *parent, Resource* resource ) : + Q3CheckListItem( parent, resource->resourceName(), CheckBox ), mResource( resource ), @@ -99,5 +103,5 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) - QVBoxLayout *mainLayout = new QVBoxLayout( this ); + Q3VBoxLayout *mainLayout = new Q3VBoxLayout( this ); - QGroupBox *groupBox = new QGroupBox( i18n( "Resources" ), this ); + Q3GroupBox *groupBox = new Q3GroupBox( i18n( "Resources" ), this ); groupBox->setColumnLayout(0, Qt::Vertical ); @@ -105,3 +109,3 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) groupBox->layout()->setMargin( 5 ); - QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 ); + Q3GridLayout *groupBoxLayout = new Q3GridLayout( groupBox->layout(), 4, 2 ); @@ -147,4 +151,4 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) SLOT( slotSelectionChanged() ) ); - connect( mListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( slotItemClicked( QListViewItem * ) ) ); + connect( mListView, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( slotItemClicked( Q3ListViewItem * ) ) ); @@ -161,3 +165,3 @@ ConfigPage::~ConfigPage() { - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) { @@ -232,3 +236,3 @@ void ConfigPage::save() - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) @@ -343,3 +347,3 @@ void ConfigPage::slotAdd() bool onlyReadOnly = true; - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { @@ -368,3 +372,3 @@ void ConfigPage::slotRemove() - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item ); @@ -395,3 +399,3 @@ void ConfigPage::slotEdit() - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); @@ -437,3 +441,3 @@ void ConfigPage::slotStandard() - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { @@ -484,3 +488,3 @@ void ConfigPage::resourceDeleted( Resource* resource ) -void ConfigPage::slotItemClicked( QListViewItem *item ) +void ConfigPage::slotItemClicked( Q3ListViewItem *item ) { @@ -506,3 +510,3 @@ void ConfigPage::saveResourceSettings() - QListViewItem *item = mListView->firstChild(); + Q3ListViewItem *item = mListView->firstChild(); while ( item ) { 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 @@ -27,2 +27,4 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -33,3 +35,3 @@ class KListView; -class QListViewItem; +class Q3ListViewItem; class QPushButton; @@ -75,3 +77,3 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> protected slots: - void slotItemClicked( QListViewItem * ); + void slotItemClicked( Q3ListViewItem * ); @@ -88,3 +90,3 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> QStringList mFamilyMap; - QValueList<ResourcePageInfo> mInfoMap; + Q3ValueList<ResourcePageInfo> mInfoMap; @@ -97,3 +99,3 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> - QListViewItem* mLastItem; + Q3ListViewItem* mLastItem; static const QString syncfamily; 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 @@ -43,4 +43,4 @@ using namespace KRES; -QDict<Factory> *Factory::mSelves = 0; -static KStaticDeleter< QDict<Factory> > staticDeleter; +Q3Dict<Factory> *Factory::mSelves = 0; +static KStaticDeleter< Q3Dict<Factory> > staticDeleter; @@ -53,3 +53,3 @@ Factory *Factory::self( const QString& resourceFamily) { - mSelves = staticDeleter.setObject( new QDict<Factory> ); + mSelves = staticDeleter.setObject( new Q3Dict<Factory> ); } 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 @@ -26,3 +26,3 @@ -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -116,3 +116,3 @@ class Factory private: - static QDict<Factory> *mSelves; + static Q3Dict<Factory> *mSelves; 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 @@ -22,2 +22,5 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> @@ -42,5 +45,5 @@ KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringLi { - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( main ); + Q3VBoxLayout *layout = new Q3VBoxLayout( main ); mConfigPage = new KRES::ConfigPage( main ); 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 @@ -34,4 +34,6 @@ $Id$ -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -177,3 +179,3 @@ class Manager : private ManagerImplListener - mListeners = new QPtrList<ManagerListener<T> >; + mListeners = new Q3PtrList<ManagerListener<T> >; } @@ -332,3 +334,3 @@ class Manager : private ManagerImplListener Factory *mFactory; - QPtrList<ManagerListener<T> > *mListeners; + Q3PtrList<ManagerListener<T> > *mListeners; }; 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 @@ -37,2 +37,4 @@ $Id$ #include <qfile.h> +//Added by qt3to4: +#include <Q3PtrList> @@ -234,5 +236,5 @@ Resource::List *ManagerImpl::resourceList() -QPtrList<Resource> ManagerImpl::resources() +Q3PtrList<Resource> ManagerImpl::resources() { - QPtrList<Resource> result; + Q3PtrList<Resource> result; @@ -245,5 +247,5 @@ QPtrList<Resource> ManagerImpl::resources() -QPtrList<Resource> ManagerImpl::resources( bool active ) +Q3PtrList<Resource> ManagerImpl::resources( bool active ) { - QPtrList<Resource> result; + Q3PtrList<Resource> result; 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 @@ -34,4 +34,4 @@ $Id$ #include <qstring.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> //US @@ -83,6 +83,6 @@ class ManagerImpl : public QObject - QPtrList<Resource> resources(); + Q3PtrList<Resource> resources(); // Get only active or passive resources - QPtrList<Resource> resources( bool active ); + Q3PtrList<Resource> resources( bool active ); 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 @@ -30,3 +30,3 @@ -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qwidget.h> @@ -241,3 +241,3 @@ class Resource : public QObject public: - typedef QValueList<Resource *> List; + typedef Q3ValueList<Resource *> List; 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 @@ -36,5 +36,9 @@ -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3PtrList> @@ -48,3 +52,3 @@ using namespace KRES; //US : KDialog( parent, name, true ) -SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, +SelectDialog::SelectDialog( Q3PtrList<Resource> list, QWidget *parent, const char *name ) @@ -59,3 +63,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); /*US @@ -67,3 +71,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US QVBoxLayout *mainLayout = new QVBoxLayout( this ); - QVBoxLayout *mainLayout = new QVBoxLayout( main ); + Q3VBoxLayout *mainLayout = new Q3VBoxLayout( main ); mainLayout->setMargin( marginHint() ); @@ -71,3 +75,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, this ); - QGroupBox *groupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *groupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); groupBox->setTitle( i18n( "Resources" ) ); @@ -75,3 +79,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US mResourceId = new KListBox( groupBox ); - mResourceId = new QListBox( groupBox ); + mResourceId = new Q3ListBox( groupBox ); @@ -103,3 +107,3 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, mResourceId->setCurrentItem( 0 ); - connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)), + connect( mResourceId, SIGNAL(returnPressed(Q3ListBoxItem*)), SLOT(accept()) ); @@ -115,3 +119,3 @@ Resource *SelectDialog::resource() -Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent ) +Resource *SelectDialog::getResource( Q3PtrList<Resource> list, QWidget *parent ) { 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 @@ -27,3 +27,3 @@ #include <qobject.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qmap.h> @@ -33,3 +33,3 @@ //US class KListBox; -class QListBox; +class Q3ListBox; @@ -64,3 +64,3 @@ class SelectDialog : KDialogBase */ - SelectDialog( QPtrList<Resource> list, QWidget *parent = 0, + SelectDialog( Q3PtrList<Resource> list, QWidget *parent = 0, const char *name = 0); @@ -78,3 +78,3 @@ class SelectDialog : KDialogBase */ - static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 ); + static Resource *getResource( Q3PtrList<Resource> list, QWidget *parent = 0 ); @@ -82,3 +82,3 @@ class SelectDialog : KDialogBase //US KListBox *mResourceId; - QListBox *mResourceId; + Q3ListBox *mResourceId; diff --git a/microkde/ksystemtray.cpp b/microkde/ksystemtray.cpp index 4f81d02..0d0045f 100644 --- a/microkde/ksystemtray.cpp +++ b/microkde/ksystemtray.cpp @@ -1,2 +1,5 @@ #include "ksystemtray.h" +//Added by qt3to4: +#include <QMouseEvent> +#include <QLabel> diff --git a/microkde/ksystemtray.h b/microkde/ksystemtray.h index f3e4f6a..6708c86 100644 --- a/microkde/ksystemtray.h +++ b/microkde/ksystemtray.h @@ -4,2 +4,4 @@ #include <qlabel.h> +//Added by qt3to4: +#include <QMouseEvent> diff --git a/microkde/ktempfile.cpp b/microkde/ktempfile.cpp index b9166bd..d61d22e 100644 --- a/microkde/ktempfile.cpp +++ b/microkde/ktempfile.cpp @@ -1,2 +1,2 @@ -#include <qtextstream.h> +#include <q3textstream.h> @@ -21,3 +21,3 @@ QString KTempFile::name() -QTextStream *KTempFile::textStream() +Q3TextStream *KTempFile::textStream() { diff --git a/microkde/ktempfile.h b/microkde/ktempfile.h index 20dfa82..1ac7258 100644 --- a/microkde/ktempfile.h +++ b/microkde/ktempfile.h @@ -5,3 +5,3 @@ -class QTextStream; +class Q3TextStream; @@ -16,3 +16,3 @@ class KTempFile - QTextStream *textStream(); + Q3TextStream *textStream(); }; diff --git a/microkde/ktextedit.cpp b/microkde/ktextedit.cpp index 4dd6875..d74706b 100644 --- a/microkde/ktextedit.cpp +++ b/microkde/ktextedit.cpp @@ -4,2 +4,4 @@ #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <QMouseEvent> #endif @@ -7,3 +9,3 @@ -KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent ) +KTextEdit::KTextEdit ( QWidget *parent ) : Q3MultiLineEdit( parent ) { @@ -19,3 +21,3 @@ void KTextEdit::mousePressEvent(QMouseEvent *e) { - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { mAllowPopupMenu = true; @@ -24,5 +26,5 @@ void KTextEdit::mousePressEvent(QMouseEvent *e) } - if ( e->button() == RightButton && !mAllowPopupMenu ) + if ( e->button() == Qt::RightButton && !mAllowPopupMenu ) return; - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { if ( hasMarkedText () ) @@ -34,3 +36,3 @@ void KTextEdit::mousePressEvent(QMouseEvent *e) } - QMultiLineEdit::mousePressEvent( e ); + Q3MultiLineEdit::mousePressEvent( e ); } @@ -39,3 +41,3 @@ void KTextEdit::mouseReleaseEvent(QMouseEvent *e) { - QMultiLineEdit::mouseReleaseEvent(e); + Q3MultiLineEdit::mouseReleaseEvent(e); } @@ -50,3 +52,3 @@ void KTextEdit::mouseMoveEvent(QMouseEvent *e) mAllowPopupMenu = false; - QMultiLineEdit::mouseMoveEvent(e); + Q3MultiLineEdit::mouseMoveEvent(e); } diff --git a/microkde/ktextedit.h b/microkde/ktextedit.h index 87c0602..b7c8924 100644 --- a/microkde/ktextedit.h +++ b/microkde/ktextedit.h @@ -3,5 +3,7 @@ -#include <qmultilineedit.h> +#include <q3multilineedit.h> +//Added by qt3to4: +#include <QMouseEvent> -class KTextEdit : public QMultiLineEdit +class KTextEdit : public Q3MultiLineEdit { diff --git a/microkde/kurl.cpp b/microkde/kurl.cpp index 2574e25..122ad71 100644 --- a/microkde/kurl.cpp +++ b/microkde/kurl.cpp @@ -36,3 +36,3 @@ #endif -#include <qurl.h> +#include <q3url.h> #include <qdir.h> @@ -43,2 +43,4 @@ #include <qtextcodec.h> +//Added by qt3to4: +#include <Q3CString> @@ -59,3 +61,3 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h - QCString local; + Q3CString local; if (encoding_hint==0) @@ -102,3 +104,3 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h else - new_segment[ new_length++ ] = local[i]; + new_segment[ new_length++ ] = character; } @@ -207,3 +209,3 @@ static void decode( const QString& segment, QString &decoded, QString &encoded, - QCString csegment = textCodec->fromUnicode(segment); + Q3CString csegment = textCodec->fromUnicode(segment); // Check if everything went ok @@ -280,3 +282,3 @@ static void decode( const QString& segment, QString &decoded, QString &encoded, array.resetRawData(new_segment, new_length); - QCString validate = textCodec->fromUnicode(decoded); + Q3CString validate = textCodec->fromUnicode(decoded); @@ -421,3 +423,3 @@ KURL::KURL( const char * url, int encoding_hint ) -KURL::KURL( const QCString& url, int encoding_hint ) +KURL::KURL( const Q3CString& url, int encoding_hint ) { @@ -462,3 +464,3 @@ QDataStream & operator>> (QDataStream & s, KURL & a) #ifndef QT_NO_NETWORKPROTOCOL -KURL::KURL( const QUrl &u ) +KURL::KURL( const Q3Url &u ) { @@ -591,3 +593,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) goto Node9; - if ( !isalpha( (int)x ) ) + if ( !x.isLetter() ) goto NodeErr; @@ -597,3 +599,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) // Proceed with :// :/ or : - while( pos < len && (isalpha((int)buf[pos]) || isdigit((int)buf[pos]) || + while( pos < len && ( buf[pos].isLetter() || buf[pos].isDigit() || buf[pos] == '+' || buf[pos] == '-')) pos++; @@ -771,3 +773,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) start = pos; - if ( !isdigit( buf[pos++] ) ) + if ( !buf[pos++].isDigit() ) goto NodeErr; @@ -775,3 +777,3 @@ void KURL::parse( const QString& _url, int encoding_hint ) // Node 8b: Accept any amount of digits - while( pos < len && isdigit( buf[pos] ) ) pos++; + while( pos < len && buf[pos].isDigit() ) pos++; port = QString( buf + start, pos - start ); @@ -850,3 +852,3 @@ KURL& KURL::operator=( const char * _url ) #ifndef QT_NO_NETWORKPROTOCOL -KURL& KURL::operator=( const QUrl & u ) +KURL& KURL::operator=( const Q3Url & u ) { @@ -1376,3 +1378,3 @@ KURL KURL::join( const KURL::List & lst ) { - if (!u.m_strRef_encoded) u.m_strRef_encoded = tmp.url(); + if (u.m_strRef_encoded.isEmpty()) u.m_strRef_encoded = tmp.url(); else u.m_strRef_encoded += "#" + tmp.url(); // Support more than one suburl thingy @@ -1420,3 +1422,3 @@ QString KURL::fileName( bool _strip_trailing_slash ) const QString fileName_encoded = m_strPath_encoded.mid(i+1); - n += fileName_encoded.contains("%2f", false); + n += fileName_encoded.count("%2f", Qt::CaseInsensitive); } diff --git a/microkde/kurl.h b/microkde/kurl.h index cd65a1c..016eb24 100644 --- a/microkde/kurl.h +++ b/microkde/kurl.h @@ -23,5 +23,7 @@ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3CString> -class QUrl; +class Q3Url; class QStringList; @@ -66,3 +68,3 @@ public: */ - class List : public QValueList<KURL> + class List : public Q3ValueList<KURL> { @@ -137,3 +139,3 @@ public: */ - KURL( const QCString& url, int encoding_hint = 0 ); + KURL( const Q3CString& url, int encoding_hint = 0 ); /** @@ -147,3 +149,3 @@ public: */ - KURL( const QUrl &u ); + KURL( const Q3Url &u ); /** @@ -660,3 +662,3 @@ public: KURL& operator=( const char * _url ); - KURL& operator=( const QUrl & u ); + KURL& operator=( const Q3Url & u ); 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 @@ -21,6 +21,8 @@ -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qcursor.h> #include <qlayout.h> +//Added by qt3to4: +#include <QPixmap> @@ -75,3 +77,3 @@ void KCMultiDialog::slotDefault() - QPtrListIterator<KCModule> it(modules); + Q3PtrListIterator<KCModule> it(modules); for (; it.current(); ++it) @@ -93,3 +95,3 @@ void KCMultiDialog::slotApply() { - QPtrListIterator<KCModule> it(modules); + Q3PtrListIterator<KCModule> it(modules); for (; it.current(); ++it) @@ -107,3 +109,3 @@ qDebug("KCMultiDialog::slotOk clicked"); - QPtrListIterator<KCModule> it(modules); + Q3PtrListIterator<KCModule> it(modules); for (; it.current(); ++it) @@ -155,5 +157,5 @@ void KCMultiDialog::addModule(const QString& path, bool withfallback) */ -QVBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) +Q3VBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) { - QVBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() ); + Q3VBox *page = mMainWidget->addVBoxPage(modulename , QString::null,QPixmap() ); return page; 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 @@ -24,4 +24,4 @@ -#include <qptrlist.h> -#include <qptrdict.h> +#include <q3ptrlist.h> +#include <q3ptrdict.h> @@ -77,3 +77,3 @@ public: void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); - QVBox* getNewVBoxPage(const QString & modulename) ; + Q3VBox* getNewVBoxPage(const QString & modulename) ; @@ -135,3 +135,3 @@ private: */ - QPtrList<KCModule> modules; + Q3PtrList<KCModule> modules; /* diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 7120bdd..4ff06a3 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro @@ -8,3 +8,3 @@ INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio -TARGET = microkde +TARGET = xmicrokde DESTDIR= ../bin @@ -180 +180,3 @@ KDGanttMinimizeSplitter.cpp \ kidmanager.cpp +#The following line was inserted by qt3to4 +QT += xml qt3support diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro index 8fe2bd5..514e7b3 100644 --- a/microkde/microkdeE.pro +++ b/microkde/microkdeE.pro @@ -9,3 +9,3 @@ DEFINES += KDE_QT_ONLY -TARGET = microkde +TARGET = xmicrokde OBJECTS_DIR = obj/$(PLATFORM) 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 @@ -267,3 +267,3 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st /* let's fill device parts */ - QPopupMenu* pop = new QPopupMenu(this); + Q3PopupMenu* pop = new Q3PopupMenu(this); connect(pop, SIGNAL( activated(int) ), 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 @@ -139,3 +139,3 @@ private: OFileSelector* m_sel; - QPopupMenu* m_fsPop; + Q3PopupMenu* m_fsPop; bool compliesMime( const QString& ); 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 +1,3 @@ +//Added by qt3to4: +#include <Q3MemArray> // THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter @@ -57,6 +59,2 @@ -#ifndef QT_H -#include "qabstractlayout.h" -#endif // QT_H - #ifndef QT_NO_LAYOUT @@ -83,3 +81,3 @@ struct QLayoutStruct -void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, int pos, +void qGeomCalc( Q3MemArray<QLayoutStruct> &chain, int start, int count, int pos, int space, int spacer ); 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 @@ -70 +70,3 @@ SOURCES += ../crypt/ath.c \ #LIBS += -lgcrypt -lmpi -lerror +#The following line was inserted by qt3to4 +QT += 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 @@ -31,2 +31,4 @@ SOURCES += code-from-errno.c \ # mkerrcodes.h - # mkerrcodes.c \
\ No newline at end of file + # mkerrcodes.c \ +#The following line was inserted by qt3to4 +QT += 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 @@ -42 +42,3 @@ SOURCES += mpi-add.c \ generic/udiv-w-sdiv.c +#The following line was inserted by qt3to4 +QT += 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 @@ -36 +36,3 @@ SOURCES += adler32.c \ zutil.c +#The following line was inserted by qt3to4 +QT += 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 @@ -31,3 +31,6 @@ $Id$ #include <qtabwidget.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3VBoxLayout> #include <klocale.h> @@ -36,3 +39,3 @@ $Id$ #include <qpushbutton.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> @@ -51,3 +54,3 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) QWidget *page = plainPage(); - QVBoxLayout *pageLayout = new QVBoxLayout( page ); + Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page ); @@ -60,3 +63,3 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) - QGridLayout *layout = new QGridLayout( tab1, 3, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab1, 3, 1 ); layout->setMargin( KDialogBase::marginHint() ); @@ -79,3 +82,3 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) categoryComboBox->setEditable( TRUE ); - categoryComboBox->setSizeLimit( 8 ); + categoryComboBox->setMaxVisibleItems( 8 ); categoryComboBox->setAutoCompletion( TRUE ); @@ -119,3 +122,3 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) - layout = new QGridLayout( tab2, 3, 1 ); + layout = new Q3GridLayout( tab2, 3, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -124,3 +127,3 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) - commentTextEdit = new QMultiLineEdit(tab2); + commentTextEdit = new Q3MultiLineEdit(tab2); layout->addMultiCellWidget( commentTextEdit, i, i, 0, 0 ); @@ -136,3 +139,3 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) - layout = new QGridLayout( tab3, 3, 1 ); + layout = new Q3GridLayout( tab3, 3, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); 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 @@ -29,7 +29,12 @@ $Id$ #include <qvariant.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <QLabel> #include <kdialogbase.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; class QSpacerItem; @@ -39,4 +44,4 @@ class KComboBox; class QLabel; -class QGroupBox; -class QMultiLineEdit; +class Q3GroupBox; +class Q3MultiLineEdit; class PwMDoc; @@ -63,3 +68,3 @@ public: QPushButton* revealButton; - QMultiLineEdit* commentTextEdit; + Q3MultiLineEdit* commentTextEdit; PwMDoc* doc; 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 @@ -198,3 +198,3 @@ void AddEntryWndImpl::switchComment(bool toAdvanced) - commentTextEdit = new QTextEdit(commentDummy); + commentTextEdit = new Q3TextEdit(commentDummy); commentTextEdit->setTextFormat(Qt::PlainText); @@ -218,4 +218,4 @@ void AddEntryWndImpl::editAdvCommentButton_slot() -#ifndef PWM_EMBEDDED -#include "addentrywndimpl.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_addentrywndimpl.cpp" #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 @@ -25,3 +25,3 @@ #include <qlineedit.h> -#include <qtextedit.h> +#include <q3textedit.h> #include <qcombobox.h> @@ -31,3 +31,3 @@ #include <kcombobox.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include "addentrywnd_emb.h" @@ -88,3 +88,3 @@ public slots: #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN /** OK button pressed */ @@ -93,3 +93,3 @@ public slots: void cancelButton_slot(); -//MOC_SKIP_END +#endif #else @@ -112,3 +112,3 @@ protected: #ifndef PWM_EMBEDDED - QTextEdit *commentTextEdit; + Q3TextEdit *commentTextEdit; #else 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 @@ -23,3 +23,3 @@ -#include <qcstring.h> +#include <q3cstring.h> 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 @@ -28,5 +28,5 @@ #include <khtmlview.h> -#include <qtextedit.h> +#include <q3textedit.h> #else -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif @@ -139,3 +139,3 @@ void CommentBox::switchTo(commentBoxMode newMode) case mode_text: - textDta = new QTextEdit(parentWidget); + textDta = new Q3TextEdit(parentWidget); textDta->setTextFormat(Qt::PlainText); @@ -231,3 +231,3 @@ QSize CommentBox::size() CommentBox::CommentBox(QWidget *_parentWidget) - : QTextBrowser(_parentWidget) + : Q3TextBrowser(_parentWidget) @@ -235,3 +235,3 @@ CommentBox::CommentBox(QWidget *_parentWidget) //this->setReadOnly(true); - setFocusPolicy( QWidget::ClickFocus ); + setFocusPolicy( Qt::ClickFocus ); } @@ -250,3 +250,3 @@ void CommentBox::setText(const QString &text) { - QTextBrowser::setText( text); + Q3TextBrowser::setText( text); if (!isVisible()) 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 @@ -25,3 +25,3 @@ class QWidget; -class QTextEdit; +class Q3TextEdit; class KHTMLPart; @@ -87,3 +87,3 @@ protected: /** if the comment box is a normal textbox, data is stored here */ - QTextEdit *textDta; + Q3TextEdit *textDta; /** if the comment box is a HTML box, data is stored here */ @@ -93,3 +93,3 @@ protected: #else -#include <qtextbrowser.h> +#include <q3textbrowser.h> /** Implementation of the advanced HTML comment box */ @@ -98,3 +98,3 @@ protected: -class CommentBox : public QTextBrowser +class CommentBox : public Q3TextBrowser { 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 @@ -25,2 +25,4 @@ #include <klocale.h> +//Added by qt3to4: +#include <Q3CString> @@ -44,3 +46,3 @@ bool Csv::importData(const QString &filepath, QFile f(filepath); - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { KMessageBox::error(parent, @@ -91,3 +93,3 @@ bool Csv::doImport(const QByteArray &d, int ret; - QCString s, curCat; + Q3CString s, curCat; int fieldIndex = 0; @@ -123,3 +125,3 @@ bool Csv::doImport(const QByteArray &d, case 1: // desc - di.desc = s; + di.desc = std::string(s); ++fieldIndex; @@ -127,3 +129,3 @@ bool Csv::doImport(const QByteArray &d, case 2: // name - di.name = s; + di.name = std::string(s); ++fieldIndex; @@ -131,3 +133,3 @@ bool Csv::doImport(const QByteArray &d, case 3: // pw - di.pw = s; + di.pw = std::string(s); ++fieldIndex; @@ -135,3 +137,3 @@ bool Csv::doImport(const QByteArray &d, case 4: // url - di.url = s; + di.url = std::string(s); ++fieldIndex; @@ -139,3 +141,3 @@ bool Csv::doImport(const QByteArray &d, case 5: // launcher - di.launcher = s; + di.launcher = std::string(s); ++fieldIndex; @@ -143,3 +145,3 @@ bool Csv::doImport(const QByteArray &d, case 6: // comment - di.comment = s; + di.comment = std::string(s); ++fieldIndex; @@ -156,3 +158,3 @@ bool Csv::doImport(const QByteArray &d, if (fieldIndex == 6) - di.comment = s; + di.comment = std::string(s); inRecord = false; @@ -177,3 +179,3 @@ bool Csv::doImport(const QByteArray &d, -int Csv::nextField(QCString *ret, +int Csv::nextField(Q3CString *ret, const QByteArray &in, @@ -355,3 +357,3 @@ bool Csv::exportData(const QString &filepath, QFile f(filepath); - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { KMessageBox::error(parent, @@ -378,3 +380,3 @@ bool Csv::doExport(QFile &f, PwMDataItem d; - QCString s, catName; + Q3CString s, catName; QByteArray b; @@ -403,3 +405,3 @@ bool Csv::doExport(QFile &f, #ifndef PWM_EMBEDDED - b.resize(b.size() - 1, QGArray::SpeedOptim); + b.resize(b.size() - 1, Q3GArray::SpeedOptim); #else @@ -414,7 +416,7 @@ bool Csv::doExport(QFile &f, -QCString Csv::newField(QCString s) +Q3CString Csv::newField(Q3CString s) { if (s.isEmpty()) - return QCString(); - QCString ret("\""); + return Q3CString(); + Q3CString ret("\""); #ifndef PWM_EMBEDDED @@ -422,3 +424,3 @@ QCString Csv::newField(QCString s) #else - s.replace(QRegExp("\""), "\"\""); + s.replace("\"", "\"\""); #endif 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 @@ -23,3 +23,3 @@ -#include <qcstring.h> +#include <q3cstring.h> #include <qfile.h> @@ -75,3 +75,3 @@ protected: */ - int nextField(QCString *ret, + int nextField(Q3CString *ret, const QByteArray &in, @@ -83,3 +83,3 @@ protected: /** generate a new data field string. */ - QCString newField(QCString s); + Q3CString newField(Q3CString s); 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 @@ -30,3 +30,5 @@ $Id$ #include <qlabel.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <klocale.h> @@ -57,3 +59,3 @@ editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name) QWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 3, 1 ); + Q3GridLayout *layout = new Q3GridLayout( page, 3, 1 ); layout->setMargin( KDialogBase::marginHint() ); @@ -68,3 +70,3 @@ editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name) categoryComboBox->setEditable( FALSE ); - categoryComboBox->setSizeLimit( 100 ); + categoryComboBox->setMaxVisibleItems( 100 ); connect(categoryComboBox,SIGNAL(activated(const QString&)), SLOT(categorySelected(const QString&))); 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 @@ -29,7 +29,12 @@ $Id$ #include <qvariant.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <QLabel> #include <kdialogbase.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; +class Q3VBoxLayout; +class Q3HBoxLayout; +class Q3GridLayout; class QSpacerItem; @@ -39,4 +44,4 @@ class KComboBox; class QLabel; -class QGroupBox; -class QMultiLineEdit; +class Q3GroupBox; +class Q3MultiLineEdit; class PwMDoc; 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 @@ -30,5 +30,7 @@ $Id$ #include <qcheckbox.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qradiobutton.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <klineedit.h> @@ -59,3 +61,3 @@ findWnd::findWnd( QWidget* parent, const char* name ) QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); layout->setMargin( KDialogBase::marginHint() ); @@ -70,3 +72,3 @@ findWnd::findWnd( QWidget* parent, const char* name ) - QButtonGroup* buttonGroup1 = new QButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page ); + Q3ButtonGroup* buttonGroup1 = new Q3ButtonGroup(1, Qt::Horizontal, i18n( "Search in Column" ), page ); layout->addWidget( 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 @@ -135,4 +135,4 @@ void FindWndImpl::selectionChanged_slot() -#ifndef PWM_EMBEDDED -#include "findwndimpl.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_findwndimpl.cpp" #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 @@ -23,2 +23,4 @@ #include "globalstuff.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -160,3 +162,3 @@ GenPasswd::dynCharset_element * GenPasswd::selectNextCharset() // find out which charsets are allowed (filtering) - QPtrList<dynCharset_element> allowedCharsets; + Q3PtrList<dynCharset_element> allowedCharsets; // QPtrList<dynCharset_element>::iterator is not available in QT-3.1 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 @@ -23,3 +23,3 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> @@ -72,3 +72,3 @@ protected: /** dynamic charset used for generating the password */ - QPtrList<dynCharset_element> dynCharset; + Q3PtrList<dynCharset_element> dynCharset; }; 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 @@ -22,2 +22,5 @@ #include <qmessagebox.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> @@ -27,8 +30,8 @@ GetKeyCardWnd::GetKeyCardWnd(QWidget *parent, - const char *name, bool modal, WFlags f) + const char *name, bool modal, Qt::WFlags f) : QDialog(parent, name, modal, f) { - vbox1 = new QVBox(this); + vbox1 = new Q3VBox(this); text_label = new QLabel(vbox1); - hbox1 = new QHBox(vbox1); + hbox1 = new Q3HBox(vbox1); okButton = new QPushButton(i18n("&Ok"), hbox1); @@ -64,4 +67,4 @@ void GetKeyCardWnd::okButton_slot() -#ifndef PWM_EMBEDDED -#include "getkeycardwnd.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_getkeycardwnd.cpp" #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 @@ -22,4 +22,4 @@ -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qdialog.h> @@ -28,2 +28,4 @@ #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> @@ -35,3 +37,3 @@ public: GetKeyCardWnd(QWidget *parent = 0, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~GetKeyCardWnd(); @@ -42,4 +44,4 @@ protected slots: protected: - QVBox *vbox1; - QHBox *hbox1; + Q3VBox *vbox1; + Q3HBox *hbox1; QLabel *text_label; 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 @@ -45,2 +45,5 @@ $Id$ #include <qapplication.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3VBoxLayout> @@ -56,3 +59,3 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) QWidget *page = plainPage(); - QVBoxLayout *pageLayout = new QVBoxLayout( page ); + Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page ); @@ -62,3 +65,3 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); - textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); + textLabel1->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) ); pageLayout->addWidget(textLabel1); @@ -78,3 +81,3 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) - QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); + Q3GridLayout* numberLayout = new Q3GridLayout( numberBox, 4, 3 ); numberLayout->setMargin( 0 ); 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 @@ -57,4 +57,4 @@ void GetMasterPwWndImpl::slotOk() -#ifndef PWM_EMBEDDED -#include "getmasterpwwndimpl.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_getmasterpwwndimpl.cpp" #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 @@ -36,3 +36,3 @@ #include <qstring.h> -#include <qtextstream.h> +#include <QTextOStream> #endif @@ -99,3 +99,3 @@ std::string tostr(const T &t) QString result; - QTextOStream(&result) << t; + QTextOStream tmp(&result); tmp << t; return result.latin1(); 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 @@ -62,3 +62,3 @@ QString HtmlGen::escapeHtmlText(const QString &str) for (i = 0; i < len; ++i) { - c = str.at(i); + c = str.at(i).toLatin1(); switch (c) { 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 @@ -30,3 +30,3 @@ #else -#include <qsocket.h> +#include <q3socket.h> #endif @@ -79,3 +79,3 @@ Ipc::Ipc() #endif - QSocket* qsock = new QSocket(); + Q3Socket* qsock = new Q3Socket(); qsock->setSocket(sock[0]); @@ -90,3 +90,3 @@ Ipc::Ipc() - qsock = new QSocket(); + qsock = new Q3Socket(); qsock->setSocket(sock[0]); @@ -154,3 +154,3 @@ Ipc::Ipc(const Ipc *ipc) - qSock = new QSocket(); + qSock = new Q3Socket(); qSock->setSocket(sock[0]); @@ -214,4 +214,4 @@ void Ipc::receiveData(int s) -#ifndef PWM_EMBEDDED -#include "ipc.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_ipc.cpp" #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 @@ -31,3 +31,3 @@ #else -#include <qsocket.h> +#include <q3socket.h> #endif @@ -76,3 +76,3 @@ protected: #else - QSocket* qSock; + Q3Socket* qSock; /** current receive buffer size */ 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 @@ -24,2 +24,4 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -44,3 +46,3 @@ KCMPwmConfig::KCMPwmConfig(QWidget *parent, const char *name ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mConfigWidget = new PWMConfigWidget( (PWMPrefs*)getPreferences(), this, "mConfigWidget" ); 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 @@ -24,4 +24,4 @@ #include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> +#include <q3frame.h> +#include <q3groupbox.h> #include <qlayout.h> @@ -34,3 +34,6 @@ #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3VBoxLayout> @@ -54,3 +57,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n { - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); @@ -63,3 +66,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n QWidget *windowStylePage = new QWidget( this ); - QGridLayout *windowStyleLayout = new QGridLayout( windowStylePage, 3, 3); + Q3GridLayout *windowStyleLayout = new Q3GridLayout( windowStylePage, 3, 3); @@ -100,3 +103,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n QWidget *filePage = new QWidget( this ); - QGridLayout *fileLayout = new QGridLayout( filePage, 3, 2); + Q3GridLayout *fileLayout = new Q3GridLayout( filePage, 3, 2); @@ -156,3 +159,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n QWidget *timeoutPage = new QWidget( this ); - QGridLayout *timeoutLayout = new QGridLayout( timeoutPage, 3, 2); + Q3GridLayout *timeoutLayout = new Q3GridLayout( timeoutPage, 3, 2); @@ -185,3 +188,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n QWidget *autostartPage = new QWidget( this ); - QGridLayout *autostartLayout = new QGridLayout( autostartPage, 3, 2); + Q3GridLayout *autostartLayout = new Q3GridLayout( autostartPage, 3, 2); @@ -205,3 +208,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n QWidget *externalappPage = new QWidget( this ); - QGridLayout *externalappLayout = new QGridLayout( externalappPage, 3, 2); + Q3GridLayout *externalappLayout = new Q3GridLayout( externalappPage, 3, 2); @@ -225,3 +228,3 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n QWidget *miscPage = new QWidget( this ); - QGridLayout *miscLayout = new QGridLayout( miscPage, 3, 2); + Q3GridLayout *miscLayout = new Q3GridLayout( miscPage, 3, 2); @@ -361,4 +364,4 @@ void PWMConfigWidget::setFilePermissions(int perm) -#ifndef PWM_EMBEDDED -#include "pwmconfigwidget.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmconfigwidget.cpp" #endif //PWM_EMBEDDED 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 @@ -22,2 +22,5 @@ #include <klocale.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> @@ -26,10 +29,10 @@ ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleT QWidget *parent, bool multiSel, const char *name, - bool modal, WFlags f) + bool modal, Qt::WFlags f) : QDialog(parent, name, modal, f) { - vbox1 = new QVBox(this); + vbox1 = new Q3VBox(this); title = new QLabel(vbox1); - list = new QListBox(vbox1); + list = new Q3ListBox(vbox1); if (multiSel) { - hbox2 = new QHBox(vbox1); + hbox2 = new Q3HBox(vbox1); selAllButton = new QPushButton(i18n("&Select all"), hbox2); @@ -37,3 +40,3 @@ ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleT } - hbox1 = new QHBox(vbox1); + hbox1 = new Q3HBox(vbox1); okButton = new QPushButton(i18n("&Ok"), hbox1); @@ -47,3 +50,3 @@ ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleT if (multiSel) { - list->setSelectionMode(QListBox::Multi); + list->setSelectionMode(Q3ListBox::Multi); } @@ -128,4 +131,4 @@ void ListObjSelectWnd::setList(const QStringList &_list) -#ifndef PWM_EMBEDDED -#include "listobjselectwnd.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_listobjselectwnd.cpp" #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 @@ -23,8 +23,10 @@ #include <qdialog.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qlabel.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpushbutton.h> #include <qstringlist.h> +//Added by qt3to4: +#include <QResizeEvent> @@ -39,3 +41,3 @@ public: const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~ListObjSelectWnd(); @@ -64,7 +66,7 @@ public: protected: - QVBox *vbox1; - QHBox *hbox1; - QHBox *hbox2; + Q3VBox *vbox1; + Q3HBox *hbox1; + Q3HBox *hbox2; QLabel *title; - QListBox *list; + Q3ListBox *list; QPushButton *okButton; 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 @@ -25,2 +25,5 @@ #include <qpixmap.h> +//Added by qt3to4: +#include <QEvent> +#include <QKeyEvent> @@ -41,3 +44,3 @@ bool ListViewPwM::event(QEvent *e) { - if (e->type() == QEvent::LayoutHint) + if (e->type() == QEvent::LayoutRequest) emit layoutChanged(); @@ -66,4 +69,4 @@ QPixmap * ListViewItemPwM::offPix = 0; -ListViewItemPwM::ListViewItemPwM(QListView *parent) - : QCheckListItem(parent, "", QCheckListItem::CheckBox) +ListViewItemPwM::ListViewItemPwM(Q3ListView *parent) + : Q3CheckListItem(parent, "", Q3CheckListItem::CheckBox) { @@ -99,3 +102,3 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, if (column != COLUMN_DESC) { - QCheckListItem::paintCell(p, cg, column, width, align); + Q3CheckListItem::paintCell(p, cg, column, width, align); return; @@ -122,3 +125,3 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, #endif - QListViewItem::paintCell(p, cg, column, width - pixSpace, align); + Q3ListViewItem::paintCell(p, cg, column, width - pixSpace, align); @@ -126,4 +129,4 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, -#ifndef PWM_EMBEDDED -#include "listviewpwm.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_listviewpwm.cpp" #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 @@ -23,2 +23,5 @@ #include <klistview.h> +//Added by qt3to4: +#include <QEvent> +#include <QPixmap> @@ -43,6 +46,6 @@ protected: -class ListViewItemPwM : public QCheckListItem +class ListViewItemPwM : public Q3CheckListItem { public: - ListViewItemPwM(QListView *parent); + ListViewItemPwM(Q3ListView *parent); 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 @@ -144,2 +144,3 @@ int main(int argc, char *argv[]) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); printDebugConfigureInfo(); 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 @@ -17,3 +17,3 @@ #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qrect.h> @@ -44,3 +44,3 @@ protected: /** metrics */ - QPaintDeviceMetrics *metrics; + Q3PaintDeviceMetrics *metrics; /** left 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 @@ -28,3 +28,3 @@ $Id$ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qcheckbox.h> @@ -34,2 +34,5 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -48,5 +51,5 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name) QWidget *page = plainPage(); - QVBoxLayout* pwGenWndLayout = new QVBoxLayout( page, 11, 6, "pwGenWndLayout"); + Q3VBoxLayout* pwGenWndLayout = new Q3VBoxLayout( page, 11, 6, "pwGenWndLayout"); - QGroupBox* groupBox1 = new QGroupBox( page, "groupBox1" ); + Q3GroupBox* groupBox1 = new Q3GroupBox( page, "groupBox1" ); groupBox1->setTitle( i18n( "Character set:" ) ); @@ -55,3 +58,3 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name) groupBox1->layout()->setMargin( 11 ); - QVBoxLayout* groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); + Q3VBoxLayout* groupBox1Layout = new Q3VBoxLayout( groupBox1->layout() ); groupBox1Layout->setAlignment( Qt::AlignTop ); @@ -82,3 +85,3 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name) - QHBoxLayout* layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); + Q3HBoxLayout* layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7"); @@ -94,3 +97,3 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name) - QHBoxLayout* layout8 = new QHBoxLayout( 0, 0, 6, "layout8"); + Q3HBoxLayout* layout8 = new Q3HBoxLayout( 0, 0, 6, "layout8"); 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 @@ -36,3 +36,3 @@ PwGenWndImpl::PwGenWndImpl(QWidget *parent, bool modal, - WFlags fl) + Qt::WFlags fl) : pwGenWnd(parent, name, modal, fl) 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 @@ -35,3 +35,3 @@ public: bool modal = FALSE, - WFlags fl = 0); + Qt::WFlags fl = 0); #else 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 @@ -27,2 +27,8 @@ #include <qstatusbar.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3ValueList> +#include <QHideEvent> +#include <QFocusEvent> +#include <QCloseEvent> @@ -188,3 +194,3 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc, setVirgin(virginity); - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(Qt::WheelFocus); #ifndef PWM_EMBEDDED @@ -242,9 +248,9 @@ void PwM::initMenubar() // "file" popup menu - filePopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)), i18n("&New"), this, SLOT(new_slot()), 0, BUTTON_POPUP_FILE_NEW); - filePopup->insertItem(QIconSet(picons->loadIcon("fileopen", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileopen", KIcon::Small)), i18n("&Open"), this, SLOT(open_slot()), 0, BUTTON_POPUP_FILE_OPEN); - filePopup->insertItem(QIconSet(picons->loadIcon("fileclose", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileclose", KIcon::Small)), i18n("&Close"), this, @@ -252,6 +258,6 @@ void PwM::initMenubar() filePopup->insertSeparator(); - filePopup->insertItem(QIconSet(picons->loadIcon("filesave", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("filesave", KIcon::Small)), i18n("&Save"), this, SLOT(save_slot()), 0, BUTTON_POPUP_FILE_SAVE); - filePopup->insertItem(QIconSet(picons->loadIcon("filesaveas", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("filesaveas", KIcon::Small)), i18n("Save &as..."), @@ -271,3 +277,3 @@ void PwM::initMenubar() #endif - filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileexport", KIcon::Small)), i18n("E&xport"), exportPopup, @@ -285,3 +291,3 @@ void PwM::initMenubar() #endif - filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileimport", KIcon::Small)), i18n("I&mport"), importPopup, @@ -290,3 +296,3 @@ void PwM::initMenubar() #if 0 - filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileprint", KIcon::Small)), i18n("&Print..."), this, @@ -295,3 +301,3 @@ void PwM::initMenubar() #endif - filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("exit", KIcon::Small)), i18n("&Quit"), this, @@ -300,3 +306,3 @@ void PwM::initMenubar() // "manage" popup menu - managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), + managePopup->insertItem(QIcon(picons->loadIcon("pencil", KIcon::Small)), i18n("&Add password"), this, @@ -305,6 +311,6 @@ void PwM::initMenubar() managePopup->insertSeparator(); - managePopup->insertItem(QIconSet(picons->loadIcon("edit", KIcon::Small)), + managePopup->insertItem(QIcon(picons->loadIcon("edit", KIcon::Small)), i18n("&Edit"), this, SLOT(editPwd_slot()), 0, BUTTON_POPUP_MANAGE_EDIT); - managePopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), + managePopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)), i18n("&Delete"), this, SLOT(deletePwd_slot()), @@ -312,3 +318,3 @@ void PwM::initMenubar() managePopup->insertSeparator(); - managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), + managePopup->insertItem(QIcon(picons->loadIcon("rotate", KIcon::Small)), i18n("Change &Master Password"), this, @@ -319,3 +325,3 @@ void PwM::initMenubar() #ifdef CONFIG_KEYCARD - chipcardPopup->insertItem(QIconSet(picons->loadIcon("filenew", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("filenew", KIcon::Small)), i18n("&Generate new key-card"), this, @@ -323,3 +329,3 @@ void PwM::initMenubar() BUTTON_POPUP_CHIPCARD_GENNEW); - chipcardPopup->insertItem(QIconSet(picons->loadIcon("editdelete", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("editdelete", KIcon::Small)), i18n("&Erase key-card"), this, @@ -327,3 +333,3 @@ void PwM::initMenubar() BUTTON_POPUP_CHIPCARD_DEL); - chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("", KIcon::Small)), i18n("Read card-&ID"), this, @@ -332,3 +338,3 @@ void PwM::initMenubar() chipcardPopup->insertSeparator(); - chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("2rightarrow", KIcon::Small)), i18n("&Make card backup-image"), this, @@ -336,3 +342,3 @@ void PwM::initMenubar() BUTTON_POPUP_CHIPCARD_SAVEBACKUP); - chipcardPopup->insertItem(QIconSet(picons->loadIcon("2leftarrow", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("2leftarrow", KIcon::Small)), i18n("&Replay card backup-image"), this, @@ -343,3 +349,3 @@ void PwM::initMenubar() // "view" popup menu - viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), + viewPopup->insertItem(QIcon(picons->loadIcon("find", KIcon::Small)), i18n("&Find"), this, @@ -347,3 +353,3 @@ void PwM::initMenubar() viewPopup->insertSeparator(); - viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), + viewPopup->insertItem(QIcon(picons->loadIcon("halfencrypted", KIcon::Small)), i18n("&Lock all entries"), this, @@ -351,3 +357,3 @@ void PwM::initMenubar() BUTTON_POPUP_VIEW_LOCK); - viewPopup->insertItem(QIconSet(picons->loadIcon("encrypted", KIcon::Small)), + viewPopup->insertItem(QIcon(picons->loadIcon("encrypted", KIcon::Small)), i18n("&Deep-lock all entries"), this, @@ -355,3 +361,3 @@ void PwM::initMenubar() BUTTON_POPUP_VIEW_DEEPLOCK); - viewPopup->insertItem(QIconSet(picons->loadIcon("decrypted", KIcon::Small)), + viewPopup->insertItem(QIcon(picons->loadIcon("decrypted", KIcon::Small)), i18n("&Unlock all entries"), this, @@ -361,3 +367,3 @@ void PwM::initMenubar() // "options" popup menu - optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), i18n("&Configure PwM/Pi..."), this, @@ -365,3 +371,3 @@ void PwM::initMenubar() BUTTON_POPUP_OPTIONS_CONFIG); - optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), i18n("Global Settings..."), this, @@ -378,3 +384,3 @@ void PwM::initMenubar() #else - optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), i18n("C&ategories..."), this, @@ -924,8 +930,8 @@ void PwM::config_slot() - const QValueList<PwM *> *ml = init->mainWndList(); + const Q3ValueList<PwM *> *ml = init->mainWndList(); #ifndef PWM_EMBEDDED - QValueList<PwM *>::const_iterator i2 = ml->begin(), + Q3ValueList<PwM *>::const_iterator i2 = ml->begin(), end2 = ml->end(); #else - QValueList<PwM *>::ConstIterator i2 = ml->begin(), + Q3ValueList<PwM *>::ConstIterator i2 = ml->begin(), end2 = ml->end(); @@ -1596,4 +1602,4 @@ void PwM::removeSyncInfo( QString syncProfile) -#ifndef PWM_EMBEDDED -#include "pwm.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwm.cpp" #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 @@ -38,2 +38,7 @@ #include <qglobal.h> +//Added by qt3to4: +#include <QCloseEvent> +#include <QFocusEvent> +#include <Q3PopupMenu> +#include <QHideEvent> @@ -52,5 +57,5 @@ class KSyncManager; #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class PwM : public KMainWindow -//MOC_SKIP_END +#endif #else @@ -286,3 +291,3 @@ protected: // sync stuff! - QPopupMenu *syncPopup; + Q3PopupMenu *syncPopup; KSyncManager* syncManager; 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 @@ -13,4 +13,4 @@ LIBS += -L../libcrypt/ LIBS += -L../../bin/ -LIBS += -lmicrokde -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokdepim LIBS += -lzlib @@ -177 +177,3 @@ kcmconfigs/pwmconfigwidget.cpp +#The following line was inserted by qt3to4 +QT += 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 @@ -16,5 +16,5 @@ DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY LIBS += -L../libcrypt/$(PLATFORM) -LIBS += -lmicrokde +LIBS += -lxmicrokde LIBS += -lmicroqtcompat -LIBS += -lmicrokdepim +LIBS += -lxmicrokdepim LIBS += -L$(QPEDIR)/lib 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 @@ -50,2 +50,3 @@ #include <qfile.h> +#include <QDesktopWidget> @@ -483,3 +484,4 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file) rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF); - tmpFileMoved = filename + "." + rnd_buf + ".mv"; + tmpFileMoved = filename; tmpFileMoved += '.'; + tmpFileMoved += rnd_buf; tmpFileMoved += ".mv"; if (!copyFile(filename, tmpFileMoved)) @@ -493,3 +495,3 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file) f.setName(filename); - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { ret = e_openFile; @@ -636,3 +638,3 @@ PwMerror PwMDoc::openDoc(const QString *file, int openLocked) - if (!f.open(IO_ReadOnly)) + if (!f.open(QIODevice::ReadOnly)) return e_openFile; @@ -1005,6 +1007,6 @@ bool PwMDoc::copyFile(const QString &src, const QString &dst) QFile srcFd(src); - if (!srcFd.open(IO_ReadOnly)) + if (!srcFd.open(QIODevice::ReadOnly)) return false; QFile dstFd(dst); - if (!dstFd.open(IO_ReadWrite)) { + if (!dstFd.open(QIODevice::ReadWrite)) { srcFd.close(); @@ -1487,3 +1489,3 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw, - unsigned int cryptLen = f->size() - pos; + size_t cryptLen = f->size() - pos; byte *encrypted = new byte[cryptLen]; @@ -1527,5 +1529,5 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw, PwMerror err; - err = gc.decrypt(&decrypted, + err = gc.decrypt((unsigned char **)&decrypted, &cryptLen, - encrypted, + (unsigned char*)encrypted, cryptLen, @@ -2435,3 +2437,3 @@ PwMerror PwMDoc::exportToText(const QString *file) QFile f(*file); - if (!f.open(IO_ReadWrite)) + if (!f.open(QIODevice::ReadWrite)) return e_openFile; @@ -2709,3 +2711,3 @@ PwMerror PwMDoc::importText_PwM(const QString *file) PwMDataItem currItem; - bool res = f.open(IO_ReadOnly); + bool res = f.open(QIODevice::ReadOnly); if (res == false) @@ -3631,4 +3633,4 @@ QStringList PwMDoc::getIDEntryList() -#ifndef PWM_EMBEDDED -#include "pwmdoc.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmdoc.cpp" #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 @@ -214,3 +214,3 @@ struct PwMDataItem - bool PwMDataItem::operator==( const PwMDataItem &a ) const + bool operator==( const PwMDataItem &a ) const { @@ -229,3 +229,3 @@ struct PwMDataItem //does with two exceptions: listViewPos will not be changed, and the launcher only if required. - bool PwMDataItem::syncItem(const PwMDataItem &a, bool syncLauncher=true ) + bool syncItem(const PwMDataItem &a, bool syncLauncher=true ) { 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 @@ -467,4 +467,4 @@ QString PwMDocUi::string_defaultTitle() -#ifndef PWM_EMBEDDED -#include "pwmdocui.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmdocui.cpp" #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 @@ -22,2 +22,4 @@ #include <qdir.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -94,3 +96,3 @@ PwMInit::~PwMInit() // close all open mainwnds - QValueList<PwM *>::iterator i = _mainWndList.begin(), + Q3ValueList<PwM *>::iterator i = _mainWndList.begin(), end = _mainWndList.end(); @@ -99,3 +101,3 @@ PwMInit::~PwMInit() // close all open mainwnds - QValueList<PwM *>::Iterator i = _mainWndList.begin(), + Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(), end = _mainWndList.end(); @@ -428,3 +430,3 @@ again: // find the closed window in the "mainWndList" and delete it. - QValueList<PwM *>::iterator i = _mainWndList.begin(), + Q3ValueList<PwM *>::iterator i = _mainWndList.begin(), end = _mainWndList.end(); @@ -432,3 +434,3 @@ again: // find the closed window in the "mainWndList" and delete it. - QValueList<PwM *>::Iterator i = _mainWndList.begin(), + Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(), end = _mainWndList.end(); @@ -575,8 +577,8 @@ void PwMInit::minimizeAllMainWnd(bool toTray) #endif - const QValueList<PwM *> *ml = mainWndList(); + const Q3ValueList<PwM *> *ml = mainWndList(); #ifndef PWM_EMBEDDED - QValueList<PwM *>::const_iterator it = ml->begin(), + Q3ValueList<PwM *>::const_iterator it = ml->begin(), end = ml->end(); #else - QValueList<PwM *>::ConstIterator it = ml->begin(), + Q3ValueList<PwM *>::ConstIterator it = ml->begin(), end = ml->end(); @@ -626,3 +628,2 @@ PwMApplication::PwMApplication(int & argc, char ** argv) { - setStyle( new QPlatinumStyle ()); QString hdir = QDir::homeDirPath(); @@ -658,4 +659,4 @@ PwMApplication::~PwMApplication() -#ifndef PWM_EMBEDDED -#include "pwminit.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwminit.cpp" #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 @@ -22,3 +22,3 @@ -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qobject.h> @@ -32,3 +32,2 @@ #include <qapplication.h> -#include <qplatinumstyle.h> #endif //DESKTOP_VERSION @@ -52,3 +51,3 @@ class PwMInit; #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class PwMApplication : public KUniqueApplication @@ -70,3 +69,3 @@ protected: }; -//MOC_SKIP_END +#endif #else //PWM_EMBEDDED @@ -156,3 +155,3 @@ public: /** returns a list of all open main windows */ - const QValueList<PwM *> * mainWndList() + const Q3ValueList<PwM *> * mainWndList() { return &_mainWndList; } @@ -216,3 +215,3 @@ protected: /** list of all open main windows */ - QValueList<PwM *> _mainWndList; + Q3ValueList<PwM *> _mainWndList; /** saved command line options. */ 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 @@ -30,2 +30,4 @@ #include <qsize.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -152,4 +154,4 @@ public: //US ENH - QValueList<int> mCommentSplitter; - QValueList<int> mCategorySplitter; + Q3ValueList<int> mCommentSplitter; + Q3ValueList<int> mCategorySplitter; 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 @@ -34,2 +34,5 @@ #include <klocale.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <QMouseEvent> @@ -89,8 +92,8 @@ void ActiveTreeItem::execIt() // search if there is already an open window. - const QValueList<PwM *> *wl = tray->init->mainWndList(); + const Q3ValueList<PwM *> *wl = tray->init->mainWndList(); #ifndef PWM_EMBEDDED - QValueList<PwM *>::const_iterator i = wl->begin(), + Q3ValueList<PwM *>::const_iterator i = wl->begin(), end = wl->end(); #else - QValueList<PwM *>::ConstIterator i = wl->begin(), + Q3ValueList<PwM *>::ConstIterator i = wl->begin(), end = wl->end(); @@ -180,3 +183,3 @@ void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, int docCategory, int docEntry, - QValueList<int> *activeItemsList) + Q3ValueList<int> *activeItemsList) { @@ -198,3 +201,3 @@ void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, void PwMTray::rebuildTree(KPopupMenu *popup, PwMDoc *doc, - QValueList<int> *activeItems) + Q3ValueList<int> *activeItems) { @@ -336,7 +339,7 @@ void PwMTray::updateTree(PwMDoc *document) KPopupMenu *ctxMenu = contextMenu(); - QValueList<int> *oldItems = &tree[treeItemNum].activeItems; + Q3ValueList<int> *oldItems = &tree[treeItemNum].activeItems; #ifndef PWM_EMBEDDED - QValueList<int>::iterator i = oldItems->begin(); + Q3ValueList<int>::iterator i = oldItems->begin(); #else - QValueList<int>::Iterator i = oldItems->begin(); + Q3ValueList<int>::Iterator i = oldItems->begin(); #endif @@ -483,4 +486,4 @@ void PwMTray::undock() -#ifndef PWM_EMBEDDED -#include "pwmtray.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmtray.cpp" #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 @@ -29,3 +29,6 @@ #include <qpainter.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <QMouseEvent> +#include <QMenuItem> @@ -38,4 +41,3 @@ class PwMTray; /* wrapper to workaround MOC problems */ -class __ActiveTreeItem : public QCustomMenuItem - , public QObject +class __ActiveTreeItem : public QMenuItem { @@ -89,4 +91,4 @@ public: p->setFont(font); - p->drawText(x, y, w, h, AlignLeft | AlignVCenter | - DontClip | ShowPrefix, text); + p->drawText(x, y, w, h, Qt::AlignLeft | Qt::AlignVCenter | + Qt::DontClip | Qt::ShowPrefix, text); } @@ -95,4 +97,4 @@ public: { - return QFontMetrics(font).size(AlignLeft | AlignVCenter | - ShowPrefix | DontClip, text); + return QFontMetrics(font).size(Qt::AlignLeft | Qt::AlignVCenter | + Qt::ShowPrefix | Qt::DontClip, text); } @@ -124,3 +126,3 @@ protected: #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class PwMTray : public KSystemTray @@ -136,3 +138,3 @@ class PwMTray : public KSystemTray KPopupMenu *menu; - QValueList<int> activeItems; // ids of all active items + Q3ValueList<int> activeItems; // ids of all active items }; @@ -172,3 +174,3 @@ protected: */ - QValueList<struct treeItem> tree; + Q3ValueList<struct treeItem> tree; /** pointer to init */ @@ -187,3 +189,3 @@ protected: void rebuildTree(KPopupMenu *popup, PwMDoc *doc, - QValueList<int> *activeItems); + Q3ValueList<int> *activeItems); /** insert a new tree-entry for the given doc and returns the ID.*/ @@ -196,3 +198,3 @@ protected: int docCategory, int docEntry, - QValueList<int> *activeItemsList); + Q3ValueList<int> *activeItemsList); /** mouse event on icon */ @@ -204,3 +206,3 @@ protected: }; -//MOC_SKIP_END +#endif #else @@ -217,3 +219,3 @@ class PwMTray : public QWidget KPopupMenu *menu; - QValueList<int> activeItems; // ids of all active items + Q3ValueList<int> activeItems; // ids of all active items }; @@ -257,3 +259,3 @@ protected: */ - QValueList<struct treeItem> tree; + Q3ValueList<struct treeItem> tree; /** pointer to init */ @@ -272,3 +274,3 @@ protected: void rebuildTree(KPopupMenu *popup, PwMDoc *doc, - QValueList<int> *activeItems); + Q3ValueList<int> *activeItems); /** insert a new tree-entry for the given doc and returns the ID.*/ @@ -281,3 +283,3 @@ protected: int docCategory, int docEntry, - QValueList<int> *activeItemsList); + Q3ValueList<int> *activeItemsList); /** mouse event on icon */ 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 @@ -37,3 +37,11 @@ #include <qapplication.h> +#include <QDesktopWidget> #include <qlayout.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QKeyEvent> +#include <QLabel> +#include <QResizeEvent> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> @@ -78,3 +86,3 @@ void PwMView::initCtxMenu() { - ctxMenu = new QPopupMenu(this); + ctxMenu = new Q3PopupMenu(this); ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot())); @@ -108,3 +116,3 @@ void PwMView::resizeEvent(QResizeEvent *) -void PwMView::refreshCommentTextEdit(QListViewItem *curItem) +void PwMView::refreshCommentTextEdit(Q3ListViewItem *curItem) { @@ -138,3 +146,3 @@ bool PwMView::getCurEntryIndex(unsigned int *index) { - QListViewItem *current = lv->currentItem(); + Q3ListViewItem *current = lv->currentItem(); if (!current) @@ -145,3 +153,3 @@ bool PwMView::getCurEntryIndex(unsigned int *index) bool PwMView::getDocEntryIndex(unsigned int *index, - const QListViewItem *item) + const Q3ListViewItem *item) { @@ -168,3 +176,3 @@ bool PwMView::getDocEntryIndex(unsigned int *index, -void PwMView::handleToggle(QListViewItem *item) +void PwMView::handleToggle(Q3ListViewItem *item) { @@ -173,3 +181,3 @@ void PwMView::handleToggle(QListViewItem *item) return; - QCheckListItem *clItem = (QCheckListItem *)item; + Q3CheckListItem *clItem = (Q3CheckListItem *)item; QString curCat(getCurrentCategory()); @@ -197,3 +205,3 @@ void PwMView::handleToggle(QListViewItem *item) -void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int) +void PwMView::handleRightClick(Q3ListViewItem *item, const QPoint &point, int) { @@ -276,3 +284,3 @@ void PwMView::shiftToView() - QCheckListItem *newItem; + Q3CheckListItem *newItem; vector<PwMDataItem>::iterator it = tmpSorted.begin(), @@ -315,3 +323,3 @@ void PwMView::reorgLp() PWM_ASSERT(!doc->isDocEmpty()); - QListViewItem *currItem; + Q3ListViewItem *currItem; vector<unsigned int> foundPos; @@ -357,3 +365,3 @@ void PwMView::selAt(int index) { - QListViewItem *item = lv->itemAtIndex(index); + Q3ListViewItem *item = lv->itemAtIndex(index); if (!item) @@ -481,3 +489,3 @@ void PwMView::copyCommentToClip() PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name ) - : QTextBrowser( parent, name ) + : Q3TextBrowser( parent, name ) @@ -568,9 +576,9 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t setMainWidget( topframe ); - QBoxLayout* bl; + Q3BoxLayout* bl; if ( QApplication::desktop()->width() < 640 ) { - bl = new QVBoxLayout( topframe ); + bl = new Q3VBoxLayout( topframe ); } else { - bl = new QHBoxLayout( topframe ); + bl = new Q3HBoxLayout( topframe ); } - QVBox* subframe = new QVBox( topframe ); + Q3VBox* subframe = new Q3VBox( topframe ); bl->addWidget(subframe ); @@ -578,6 +586,6 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t if ( takeloc ) - lab->setBackgroundColor(Qt::green.light() ); + lab->setBackgroundColor(QColor(Qt::green).light() ); PwMDataItemView * av = new PwMDataItemView( subframe ); av->setPwMDataItem( loc ); - subframe = new QVBox( topframe ); + subframe = new Q3VBox( topframe ); bl->addWidget(subframe ); @@ -585,3 +593,3 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t if ( !takeloc ) - lab->setBackgroundColor(Qt::green.light() ); + lab->setBackgroundColor(QColor(Qt::green).light() ); av = new PwMDataItemView( subframe ); @@ -620,4 +628,4 @@ void PwMDataItemChooser::slot_local() -#ifndef PWM_EMBEDDED -#include "pwmview.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmview.cpp" #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 @@ -43,3 +43,7 @@ #include <qobject.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QKeyEvent> +#include <Q3PopupMenu> @@ -79,3 +83,3 @@ public: bool getDocEntryIndex(unsigned int *index, - const QListViewItem *item); + const Q3ListViewItem *item); @@ -91,5 +95,5 @@ public slots: /** handle clicking on an item */ - void handleToggle(QListViewItem *item); + void handleToggle(Q3ListViewItem *item); /** handle right-clicking on an item */ - void handleRightClick(QListViewItem *item, const QPoint &point, int); + void handleRightClick(Q3ListViewItem *item, const QPoint &point, int); /** selects the item at "index" */ @@ -103,3 +107,3 @@ protected: /** right-click context-menu */ - QPopupMenu *ctxMenu; + Q3PopupMenu *ctxMenu; @@ -126,3 +130,3 @@ protected slots: /** changes the comment text-edit, because a new item has been selected */ - void refreshCommentTextEdit(QListViewItem *curItem); + void refreshCommentTextEdit(Q3ListViewItem *curItem); /** copy pw to clipboard */ @@ -154,3 +158,3 @@ private: //But might be oif interest for other functionalities as well. -class PwMDataItemView : public QTextBrowser +class PwMDataItemView : public Q3TextBrowser { 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 @@ -63,3 +63,3 @@ PwMViewStyle::~PwMViewStyle() -void PwMViewStyle::editPassWord( QListViewItem * i ) +void PwMViewStyle::editPassWord( Q3ListViewItem * i ) { @@ -95,12 +95,12 @@ void PwMViewStyle::initStyle(style_t style) curStyle = style; - connect(lv, SIGNAL(pressed(QListViewItem *)), - v, SLOT(handleToggle(QListViewItem *))); - connect(lv, SIGNAL(rightButtonClicked(QListViewItem *, const QPoint &, int)), - v, SLOT(handleRightClick(QListViewItem *, const QPoint &, int))); - connect(lv, SIGNAL(clicked(QListViewItem *)), - v, SLOT(refreshCommentTextEdit(QListViewItem *))); - connect(lv, SIGNAL(returnPressed(QListViewItem *)), - this, SLOT(editPassWord(QListViewItem *))); - connect(lv, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(editPassWord(QListViewItem *))); + connect(lv, SIGNAL(pressed(Q3ListViewItem *)), + v, SLOT(handleToggle(Q3ListViewItem *))); + connect(lv, SIGNAL(rightButtonClicked(Q3ListViewItem *, const QPoint &, int)), + v, SLOT(handleRightClick(Q3ListViewItem *, const QPoint &, int))); + connect(lv, SIGNAL(clicked(Q3ListViewItem *)), + v, SLOT(refreshCommentTextEdit(Q3ListViewItem *))); + connect(lv, SIGNAL(returnPressed(Q3ListViewItem *)), + this, SLOT(editPassWord(Q3ListViewItem *))); + connect(lv, SIGNAL(doubleClicked(Q3ListViewItem *)), + this, SLOT(editPassWord(Q3ListViewItem *))); connect(lv, SIGNAL(insertPW()), @@ -251,4 +251,4 @@ int PwMViewStyle::numCategories() -#ifndef PWM_EMBEDDED -#include "pwmviewstyle.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmviewstyle.cpp" #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 @@ -25,10 +25,10 @@ #include <qsplitter.h> -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qpushbutton.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #ifndef PWM_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> #else -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif @@ -36,3 +36,3 @@ #include <qlabel.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qcombobox.h> @@ -44,3 +44,3 @@ class PwMViewStyle_1; class PwMView; -class QListViewItem; +class Q3ListViewItem; class CommentBox; @@ -96,3 +96,3 @@ protected: protected slots: - void editPassWord( QListViewItem * ); + void editPassWord( Q3ListViewItem * ); 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 @@ -28,2 +28,5 @@ #include "pwmprefs.h" +//Added by qt3to4: +#include <QLabel> +#include <Q3ValueList> @@ -32,5 +35,5 @@ PwMViewStyle_0::PwMViewStyle_0(PwMView *view) { - vbox1 = new QVBox(view); + vbox1 = new Q3VBox(view); vbox1->setSpacing(0); - hbox1 = new QHBox(vbox1); + hbox1 = new Q3HBox(vbox1); hbox1->setSpacing(0); @@ -48,4 +51,4 @@ PwMViewStyle_0::PwMViewStyle_0(PwMView *view) delCatButton->setMinimumSize( maxsi, maxsi ); - delCatButton->setFocusPolicy( QWidget::NoFocus ); - renCatButton->setFocusPolicy( QWidget::NoFocus ); + delCatButton->setFocusPolicy( Qt::NoFocus ); + renCatButton->setFocusPolicy( Qt::NoFocus ); @@ -83,5 +86,5 @@ void PwMViewStyle_0::toggleSplitter() - QValueList<int> si = splitter1->sizes(); + Q3ValueList<int> si = splitter1->sizes(); splitter1->toggle(); - QValueList<int> si2 = splitter1->sizes(); + Q3ValueList<int> si2 = splitter1->sizes(); //qDebug("PwMViewStyle_0::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] ); 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 @@ -22,10 +22,10 @@ -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qpushbutton.h> #ifndef PWM_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> #include <qsplitter.h> #else -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include <KDGanttMinimizeSplitter.h> @@ -89,5 +89,5 @@ protected: /** hbox1 for widget style */ - QHBox *hbox1; + Q3HBox *hbox1; /** vbox1 for widget style */ - QVBox *vbox1; + Q3VBox *vbox1; /** splitter for commentTextEdit */ 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 @@ -31,2 +31,8 @@ #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QLabel> +#include <Q3ValueList> +#include <Q3Frame> +#include <Q3PopupMenu> #endif @@ -56,5 +62,5 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) - vbox1 = new QVBox(splitter); + vbox1 = new Q3VBox(splitter); categoriesTitle = new QLabel(vbox1); - categoriesList = new QListBox(vbox1); + categoriesList = new Q3ListBox(vbox1); #ifndef PWM_EMBEDDED @@ -72,3 +78,3 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) //US commentBox->resize(commentBox->size().width(), 60); - QValueList<int> sizes; + Q3ValueList<int> sizes; #ifndef PWM_EMBEDDED @@ -83,3 +89,3 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) #ifndef PWM_EMBEDDED - categoriesTitle->setFrameShape(QFrame::MenuBarPanel); + categoriesTitle->setFrameShape(Q3Frame::MenuBarPanel); #else @@ -88,3 +94,3 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) categoriesTitle->setText(i18n("Category:")); - catCtxMenu = new QPopupMenu(view); + catCtxMenu = new Q3PopupMenu(view); catCtxMenu->insertItem(i18n("&Rename"), @@ -102,5 +108,5 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) connect(categoriesList, - SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)), + SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)), this, - SLOT(catRightClick(QListBoxItem *, const QPoint &))); + SLOT(catRightClick(Q3ListBoxItem *, const QPoint &))); @@ -117,5 +123,5 @@ void PwMViewStyle_1::toggleSplitter() { - QValueList<int> si = splitter2->sizes(); + Q3ValueList<int> si = splitter2->sizes(); splitter2->toggle(); - QValueList<int> si2 = splitter2->sizes(); + Q3ValueList<int> si2 = splitter2->sizes(); //qDebug("PwMViewStyle_1::toggleSplitter() %d %d %d %d", si[0],si[1],si2[0],si2[1] ); @@ -132,3 +138,3 @@ void PwMViewStyle_1::toggleSplitter() -void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point) +void PwMViewStyle_1::catRightClick(Q3ListBoxItem *item, const QPoint &point) { @@ -189,4 +195,4 @@ void PwMViewStyle_1::saveSettings(PWMPrefs* prefs) -#ifndef PWM_EMBEDDED -#include "pwmviewstyle_1.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_pwmviewstyle_1.cpp" #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 @@ -22,9 +22,9 @@ -#include <qvbox.h> +#include <q3vbox.h> #ifndef PWM_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> #include <qsplitter.h> #else -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include <KDGanttMinimizeSplitter.h> @@ -33,4 +33,4 @@ #include <qlabel.h> -#include <qlistbox.h> -#include <qpopupmenu.h> +#include <q3listbox.h> +#include <q3popupmenu.h> @@ -84,3 +84,3 @@ protected slots: /** user clicked right button in category list */ - void catRightClick(QListBoxItem *item, const QPoint &point); + void catRightClick(Q3ListBoxItem *item, const QPoint &point); @@ -102,3 +102,3 @@ protected: /** categories list-box */ - QListBox *categoriesList; + Q3ListBox *categoriesList; /** title string for the categories combo or list box */ @@ -106,3 +106,3 @@ protected: /** hbox1 for widget style */ - QVBox *vbox1; + Q3VBox *vbox1; /** text-edit to display the comment */ @@ -110,3 +110,3 @@ protected: /** category list context menu */ - QPopupMenu *catCtxMenu; + Q3PopupMenu *catCtxMenu; }; 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 @@ -55,3 +55,3 @@ Randomizer::Randomizer() if (rndDev->exists() && - rndDev->open(IO_ReadOnly)) { + rndDev->open(QIODevice::ReadOnly)) { printDebug("Randomizer: using /dev/urandom"); @@ -63,3 +63,3 @@ Randomizer::Randomizer() if (rndDev->exists() && - rndDev->open(IO_ReadOnly)) { + rndDev->open(QIODevice::ReadOnly)) { printDebug("Randomizer: using /dev/random"); @@ -73,3 +73,3 @@ Randomizer::Randomizer() if (rndDev->exists() && - rndDev->open(IO_ReadOnly)) { + rndDev->open(QIODevice::ReadOnly)) { printDebug(string("Randomizer: using $RANDFILE \"") 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 @@ -22,2 +22,5 @@ #include <klocale.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> @@ -25,9 +28,9 @@ RenCatWnd::RenCatWnd(QWidget *parent, - const char *name, bool modal, WFlags f) + const char *name, bool modal, Qt::WFlags f) : QDialog(parent, name, true, f) { - vbox1 = new QVBox(this); + vbox1 = new Q3VBox(this); label = new QLabel(vbox1); newName = new QLineEdit(vbox1); - hbox1 = new QHBox(vbox1); + hbox1 = new Q3HBox(vbox1); okButton = new QPushButton(i18n("&Ok"), hbox1); @@ -67,4 +70,4 @@ void RenCatWnd::cancelButton_slot() -#ifndef PWM_EMBEDDED -#include "rencatwnd.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_rencatwnd.cpp" #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 @@ -22,4 +22,4 @@ -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qdialog.h> @@ -29,2 +29,4 @@ #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> @@ -37,3 +39,3 @@ public: RenCatWnd(QWidget *parent = 0, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~RenCatWnd(); @@ -48,4 +50,4 @@ protected slots: protected: - QVBox *vbox1; - QHBox *hbox1; + Q3VBox *vbox1; + Q3HBox *hbox1; QLabel *label; 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 @@ -26,2 +26,4 @@ #include <klocale.h> +//Added by qt3to4: +#include <Q3CString> #endif @@ -148,3 +150,3 @@ Serializer::Serializer() -Serializer::Serializer(const QCString &buffer) +Serializer::Serializer(const Q3CString &buffer) { @@ -179,3 +181,3 @@ void Serializer::clear() -bool Serializer::parseXml(const QCString &buffer) +bool Serializer::parseXml(const Q3CString &buffer) { @@ -200,3 +202,3 @@ bool Serializer::parseXml(const QCString &buffer) -QCString Serializer::getXml() +Q3CString Serializer::getXml() { @@ -206,3 +208,3 @@ QCString Serializer::getXml() #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 - QCString tmp(domDoc->toCString(8)); + Q3CString tmp(domDoc->toCString(8)); printDebug("<BEGIN Serializer::getXml() dump>\n"); @@ -212,3 +214,3 @@ QCString Serializer::getXml() - QCString ret(domDoc->toCString(0)); + Q3CString ret(domDoc->toCString(0)); ret.replace('\n', ""); @@ -218,3 +220,3 @@ QCString Serializer::getXml() #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 - QCString tmp(" " + domDoc->toCString()); + Q3CString tmp(" " + domDoc->toCString()); printDebug("<BEGIN Serializer::getXml() dump>\n"); @@ -225,4 +227,4 @@ QCString Serializer::getXml() - QCString ret(domDoc->toCString()); - ret.replace(QRegExp("\n"), ""); + Q3CString ret(domDoc->toByteArray()); + ret.replace("\n", ""); return ret; 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 @@ -25,3 +25,3 @@ -#include <qcstring.h> +#include <q3cstring.h> #include <qdom.h> @@ -42,3 +42,3 @@ public: /** construct a serializer document and parse "buffer" */ - Serializer(const QCString &buffer); + Serializer(const Q3CString &buffer); /** destructor */ @@ -49,5 +49,5 @@ public: /** parse the given data buffer */ - bool parseXml(const QCString &buffer); + bool parseXml(const Q3CString &buffer); /** returns the current XML data */ - QCString getXml(); + Q3CString getXml(); /** serialize "dta" and store it as XML data */ 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 @@ -33,2 +33,5 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> @@ -59,3 +62,3 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) QWidget *page = plainPage(); - QVBoxLayout *pageLayout = new QVBoxLayout( page ); + Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page ); @@ -72,3 +75,3 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) - QGridLayout *layout = new QGridLayout( tab, 5, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab, 5, 1 ); layout->setMargin( KDialogBase::marginHint() ); @@ -77,3 +80,3 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) QLabel* label = new QLabel( i18n( "Using a normal password-string to encrypt the data." ), tab ); - label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); + label->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) ); layout->addWidget(label, 0, 0); @@ -101,3 +104,3 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) - layout = new QGridLayout( tab_2, 5, 1 ); + layout = new Q3GridLayout( tab_2, 5, 1 ); layout->setMargin( KDialogBase::marginHint() ); @@ -106,3 +109,3 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) label = new QLabel( i18n( "Using a PwM key-card to encrypt the data." ), tab_2 ); - label->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); + label->setAlignment( int( Qt::WordBreak | Qt::AlignCenter ) ); layout->addWidget(label, 0, 0); @@ -110,3 +113,3 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) label = new QLabel( i18n( "selected card:" ), tab_2 ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label->setAlignment( int( Qt::AlignVCenter | Qt::AlignRight ) ); layout->addWidget(label, 1, 0); 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 @@ -29,2 +29,4 @@ $Id$ #include <kdialogbase.h> +//Added by qt3to4: +#include <QLabel> 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 @@ -190,4 +190,4 @@ string SetMasterPwWndImpl::getPw(bool *useCard) -#ifndef PWM_EMBEDDED -#include "setmasterpwwndimpl.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_setmasterpwwndimpl.cpp" #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 @@ -24,2 +24,6 @@ #include <qmessagebox.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QCloseEvent> +#include <QLabel> @@ -31,3 +35,3 @@ WaitWnd::WaitWnd(QString caption, QString _staticText, QWidget *parent, - const char *name, bool modal, WFlags f) + const char *name, bool modal, Qt::WFlags f) : QDialog(parent, name, modal, f) @@ -35,3 +39,3 @@ WaitWnd::WaitWnd(QString caption, QString _staticText, canClose = false; - vbox1 = new QVBox(this); + vbox1 = new Q3VBox(this); staticText = new QLabel(vbox1); @@ -91,4 +95,4 @@ void WaitWnd::updateGenericText(const QString &text) -#ifndef PWM_EMBEDDED -#include "waitwnd.moc" +#ifndef PWM_EMBEDDED_ +#include "moc_waitwnd.cpp" #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 @@ -22,3 +22,3 @@ -#include <qvbox.h> +#include <q3vbox.h> #include <qdialog.h> @@ -27,2 +27,5 @@ #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QCloseEvent> @@ -36,3 +39,3 @@ public: QWidget *parent = 0, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~WaitWnd(); @@ -48,3 +51,3 @@ protected slots: protected: - QVBox *vbox1; + Q3VBox *vbox1; QLabel *staticText; diff --git a/qtcompat/qptrlist.h b/qtcompat/qptrlist.h index 8ce6868..c3d3ca2 100644 --- a/qtcompat/qptrlist.h +++ b/qtcompat/qptrlist.h @@ -3,2 +3,4 @@ +#if 0 + #include <qlist.h> @@ -10 +12,3 @@ #endif + +#endif diff --git a/qtcompat/qptrstack.h b/qtcompat/qptrstack.h index 92070b3..b0afdf1 100644 --- a/qtcompat/qptrstack.h +++ b/qtcompat/qptrstack.h @@ -3,2 +3,4 @@ +#if 0 + #include <qstack.h> @@ -9 +11,3 @@ #endif + +#endif |