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 @@ -171,5 +171,5 @@ phone/symbian/mroutgen.c DEFINES += DESKTOP_VERSION -TARGET = microgammu +TARGET = xmicrogammu CONFIG = warn_off release console DESTDIR = ../../../bin @@ -193,2 +193,4 @@ SOURCES += device/serial/ser_w32.c \ device/bluetoth/blue_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 @@ -89,5 +89,5 @@ static GSM_Error bluetooth_checkdevice(GSM_StateMachine *s, char *address, WSAPR DWORD bufferLength, addressSize; WSAQUERYSET *pResults = (WSAQUERYSET*)&buffer; - HANDLE handle; + Qt::HANDLE handle; GSM_Error error; @@ -139,5 +139,5 @@ GSM_Error bluetooth_findchannel(GSM_StateMachine *s) int i, protocolInfoSize, result; WSAPROTOCOL_INFO protocolInfo; - HANDLE handle; + Qt::HANDLE handle; DWORD flags; WSAQUERYSET querySet; 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 @@ -120,5 +120,5 @@ WSALookupServiceBeginA( WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceNextA( - IN HANDLE hLookup, + IN Qt::HANDLE hLookup, IN DWORD dwControlFlags, IN OUT LPDWORD lpdwBufferLength, @@ -128,5 +128,5 @@ WSALookupServiceNextA( #define WSALookupServiceNext WSALookupServiceNextA -WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(IN HANDLE hLookup); +WINSOCK_API_LINKAGE INT WSAAPI WSALookupServiceEnd(IN Qt::HANDLE hLookup); #define MAX_PROTOCOL_CHAIN 7 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 @@ -7,5 +7,5 @@ typedef struct { - HANDLE hPhone; + Qt::HANDLE hPhone; DCB old_settings; OVERLAPPED osWrite,osRead; 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 @@ -48,5 +48,5 @@ SOURCES += gammu.c \ depend/nokia/dct3trac/wmx.c unix : { -LIBS += ../../../bin/libmicrogammu.so /usr/lib/libpthread.so +LIBS += ../../../bin/libxmicrogammu.so -lpthread # bluetooth disabled for now #/usr/lib/libbluetooth.so /usr/lib/libsdp.so @@ -64,2 +64,4 @@ OBJECTS_DIR = obj/win 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 @@ -33,5 +33,5 @@ $Id$ #include <qregexp.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> // template tags for address formatting localization @@ -69,6 +69,6 @@ class Address List of addresses. */ - 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 @@ -38,6 +38,6 @@ $Id$ #include "errorhandler.h" */ -#include <qptrlist.h> -#include <qtextstream.h> +#include <q3ptrlist.h> +#include <q3textstream.h> #include <qfile.h> #include <qregexp.h> @@ -245,5 +245,5 @@ void AddressBook::init(const QString &config, const QString &family ) d = new AddressBookData; QString fami = family; - if (config != 0) { + if (!config.isEmpty()) { if ( family == "syncContact" ) { qDebug("creating sync config "); @@ -382,11 +382,11 @@ 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>" ); KMessageBox::error( 0, text.arg( fileName ) ); return ; } - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); Iterator it; KABC::VCardConverter::Version version; @@ -469,8 +469,8 @@ 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; t << "\r\n\r\n"; @@ -491,5 +491,5 @@ int AddressBook::importFromFile( QString fileName, bool replaceLabel, bool remo KABC::Addressee::List list; QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); file.close(); @@ -635,5 +635,5 @@ void AddressBook::findNewExtIds( QString fileName, QString currentSyncDevice ) KABC::Addressee::List list; QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); file.close(); @@ -1219,7 +1219,7 @@ 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 ) { KABC::Resource *res = it.current(); @@ -1241,7 +1241,7 @@ bool AddressBook::removeResource( Resource *resource ) } -QPtrList<Resource> AddressBook::resources() +Q3PtrList<Resource> AddressBook::resources() { - QPtrList<Resource> list; + Q3PtrList<Resource> list; // qDebug("AddressBook::resources() 1"); diff --git a/kabc/addressbook.h b/kabc/addressbook.h index a8a9fc1..56fce4d 100644 --- a/kabc/addressbook.h +++ b/kabc/addressbook.h @@ -32,5 +32,5 @@ $Id$ #include <kresources/manager.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include "addressee.h" @@ -281,5 +281,5 @@ class AddressBook : public QObject Return pointer list of all resources. */ - 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 @@ -392,5 +392,5 @@ void Addressee::mergeContact( const Addressee& ad , bool isSubSet) // = false) if ( mData->familyName.isEmpty() ) mData->familyName = ad.mData->familyName; 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; if ( mData->suffix.isEmpty() ) mData->suffix = ad.mData->suffix; diff --git a/kabc/addressee.h b/kabc/addressee.h index 0ea1803..30dcd5d 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -34,5 +34,5 @@ $Id$ #include <qregexp.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include <ksharedptr.h> @@ -85,5 +85,5 @@ 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 @@ -21,9 +21,12 @@ #include <qlayout.h> #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> #include <klocale.h> @@ -39,6 +42,6 @@ using namespace KABC; -AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) : - QListViewItem( parent ), +AddresseeItem::AddresseeItem( Q3ListView *parent, const Addressee &addressee ) : + Q3ListViewItem( parent ), mAddressee( addressee ) { @@ -72,5 +75,5 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : QWidget *listWidget = new QWidget( mMiniSplitter ); - QVBoxLayout *listLayout = new QVBoxLayout (listWidget) ; + Q3VBoxLayout *listLayout = new Q3VBoxLayout (listWidget) ; //topLayout->addLayout( listLayout ); @@ -82,8 +85,8 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : mAddresseeList->setFullWidth( true ); 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 ); mAddresseeEdit = new QLineEdit( hb ); @@ -102,7 +105,7 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ), // 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() ) ); @@ -112,8 +115,8 @@ 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 * ) ) ); } @@ -127,5 +130,5 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) : #endif loadAddressBook(); - QValueList<int> splitterSize; + Q3ValueList<int> splitterSize; splitterSize.append( ( width() / 5 ) * 3 ); splitterSize.append( ( width() / 5 ) *2 ); @@ -173,5 +176,5 @@ void AddresseeDialog::loadAddressBook() } -void AddresseeDialog::addCompletionItem( const QString &str, QListViewItem *item ) +void AddresseeDialog::addCompletionItem( const QString &str, Q3ListViewItem *item ) { if ( str.isEmpty() ) return; @@ -185,5 +188,5 @@ void AddresseeDialog::selectItem( const QString &str ) if ( str.isEmpty() ) return; - QListViewItem *item = mItemDict.find( str ); + Q3ListViewItem *item = mItemDict.find( str ); if ( item ) { mAddresseeList->blockSignals( true ); @@ -194,5 +197,5 @@ void AddresseeDialog::selectItem( const QString &str ) } -void AddresseeDialog::updateEdit( QListViewItem *item ) +void AddresseeDialog::updateEdit( Q3ListViewItem *item ) { mAddresseeEdit->setText( item->text( 0 ) ); @@ -200,8 +203,8 @@ 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 ) { next->setSelected( true ); @@ -210,5 +213,5 @@ void AddresseeDialog::selectNextItem( QListViewItem *item ) } } -void AddresseeDialog::addSelected( QListViewItem *item ) +void AddresseeDialog::addSelected( Q3ListViewItem *item ) { AddresseeItem *addrItem = (AddresseeItem *)( item ); @@ -217,5 +220,5 @@ void AddresseeDialog::addSelected( QListViewItem *item ) Addressee a = addrItem->addressee(); - QListViewItem *selectedItem = mSelectedDict.find( a.uid() ); + Q3ListViewItem *selectedItem = mSelectedDict.find( a.uid() ); if ( !selectedItem ) { selectedItem = new AddresseeItem( mSelectedList, a ); @@ -227,8 +230,8 @@ void AddresseeDialog::addSelected( QListViewItem *item ) 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() ); delete addrItem; @@ -256,5 +259,5 @@ Addressee::List AddresseeDialog::addressees() if ( mMultiple ) { - QListViewItem *item = mSelectedList->firstChild(); + Q3ListViewItem *item = mSelectedList->firstChild(); while( item ) { aItem = (AddresseeItem *)( item ); diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h index 6fab62d..be7bbb4 100644 --- a/kabc/addresseedialog.h +++ b/kabc/addresseedialog.h @@ -22,5 +22,5 @@ #define KABC_ADDRESSEEDIALOG_H -#include <qdict.h> +#include <q3dict.h> #include <kdialogbase.h> @@ -35,5 +35,5 @@ namespace KABC { @short Special ListViewItem, that is used by the AddresseeDialog. */ -class AddresseeItem : public QListViewItem +class AddresseeItem : public Q3ListViewItem { public: @@ -52,5 +52,5 @@ class AddresseeItem : public QListViewItem @param addressee The associated addressee. */ - AddresseeItem( QListView *parent, const Addressee &addressee ); + AddresseeItem( Q3ListView *parent, const Addressee &addressee ); /** @@ -130,7 +130,7 @@ class AddresseeDialog : public KDialogBase private slots: 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(); void loadAddressBook(); @@ -140,5 +140,5 @@ class AddresseeDialog : public KDialogBase private: - void addCompletionItem( const QString &str, QListViewItem *item ); + void addCompletionItem( const QString &str, Q3ListViewItem *item ); bool mMultiple; @@ -151,6 +151,6 @@ class AddresseeDialog : public KDialogBase AddressBook *mAddressBook; - QDict<QListViewItem> mItemDict; - QDict<QListViewItem> mSelectedDict; + Q3Dict<Q3ListViewItem> mItemDict; + Q3Dict<Q3ListViewItem> mSelectedDict; class AddresseeDialogPrivate; diff --git a/kabc/addresseelist.cpp b/kabc/addresseelist.cpp index 097e162..e1ba1ce 100644 --- a/kabc/addresseelist.cpp +++ b/kabc/addresseelist.cpp @@ -29,5 +29,7 @@ $Id$ #include <kdebug.h> //US -#include <qtl.h> +#include <q3tl.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -122,5 +124,5 @@ bool SortingTraits::GivenName::lt( const Addressee &a1, const Addressee &a2 ) AddresseeList::AddresseeList() - : QValueList<Addressee>() + : Q3ValueList<Addressee>() { mReverseSorting = false; @@ -134,5 +136,5 @@ AddresseeList::~AddresseeList() AddresseeList::AddresseeList( const AddresseeList &l ) - : QValueList<Addressee>( l ) + : Q3ValueList<Addressee>( l ) { mReverseSorting = l.reverseSorting(); @@ -140,6 +142,6 @@ AddresseeList::AddresseeList( const AddresseeList &l ) } -AddresseeList::AddresseeList( const QValueList<Addressee> &l ) - : QValueList<Addressee>( l ) +AddresseeList::AddresseeList( const Q3ValueList<Addressee> &l ) + : Q3ValueList<Addressee>( l ) { mReverseSorting = false; diff --git a/kabc/addresseelist.h b/kabc/addresseelist.h index 2df252c..6106804 100644 --- a/kabc/addresseelist.h +++ b/kabc/addresseelist.h @@ -30,5 +30,5 @@ $Id$ #define KABC_ADDRESSEELIST_H -#include <qvaluelist.h> +#include <q3valuelist.h> #include "addressee.h" @@ -115,5 +115,5 @@ typedef enum { Uid, Name, FormattedName, FamilyName, GivenName } SortingCriterio * @author Jost Schenck jost@schenck.de */ -class AddresseeList : public QValueList<Addressee> +class AddresseeList : public Q3ValueList<Addressee> { public: @@ -121,5 +121,5 @@ class AddresseeList : public QValueList<Addressee> ~AddresseeList(); 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 @@ -28,8 +28,8 @@ #include <klocale.h> //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> #include <qwidget.h> @@ -38,11 +38,16 @@ #include <qpushbutton.h> #ifdef DESKTOP_VERSION -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qprinter.h> #include <qpainter.h> #endif +#include <QDesktopWidget> -#include <qstylesheet.h> +#include <q3stylesheet.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QPixmap> +#include <Q3VBoxLayout> #include "externalapphandler.h" #include <kabc/addresseeview.h> @@ -60,5 +65,5 @@ bool AddresseeView::sFullDetailsMode = false; AddresseeView::AddresseeView( QWidget *parent, const char *name ) - : QTextBrowser( parent, name ) + : Q3TextBrowser( parent, name ) @@ -83,5 +88,5 @@ void AddresseeView::printMe() QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -403,5 +408,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) picString = "<img src=\"myimage\" width=\"50\" height=\"70\">"; if ( picAvailintern ) { - QMimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); + Q3MimeSourceFactory::defaultFactory()->setImage( "myimage", picture.data() ); int wid = picture.data().width(); int hei = picture.data().height(); @@ -419,5 +424,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( picAvailUrl ) { QPixmap picPix( picture.url() ); - QMimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); + Q3MimeSourceFactory::defaultFactory()->setPixmap( "myimage", picPix ); int wid = picPix.width(); int hei = picPix.height(); @@ -436,5 +441,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) static bool setDefaultImageChildren = false; 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; } @@ -444,5 +449,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) static bool setDefaultImagepouses = false; 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; } @@ -453,5 +458,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) static bool setDefaultImageMale = false; 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; } @@ -461,5 +466,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) static bool setDefaultImageFemale = false; 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; } @@ -470,5 +475,5 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee ) if ( !setDefaultImage ) { //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; } @@ -654,5 +659,5 @@ void AddresseeView::addTag(const QString & tag,const QString & text) if ( text.isEmpty() ) return; - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; QString tmpText=text; @@ -689,22 +694,22 @@ AddresseeChooser::AddresseeChooser( KABC::Addressee loc, KABC::Addressee rem, bo QWidget* topframe = new QWidget( this ); 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 ); QLabel* lab = new QLabel( i18n("Local Addressee"), subframe ); 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 ); lab = new QLabel( i18n("Remote Addressee"), subframe ); if ( !takeloc ) - lab->setBackgroundColor(Qt::green.light() ); + lab->setBackgroundColor(QColor(Qt::green).light() ); av = new AddresseeView( subframe ); av->setAddressee( rem ); diff --git a/kabc/addresseeview.h b/kabc/addresseeview.h index a4de085..f7ce2e0 100644 --- a/kabc/addresseeview.h +++ b/kabc/addresseeview.h @@ -27,10 +27,10 @@ //US #include <ktextbrowser.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> 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 @@ -24,4 +24,6 @@ #include "distributionlist.h" +//Added by qt3to4: +#include <Q3ValueList> using namespace KABC; @@ -55,5 +57,5 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email ) em = a.preferredEmail(); Entry e( a, em ); - QValueList<Entry>::Iterator it; + Q3ValueList<Entry>::Iterator it; for( it = mEntries.begin(); it != mEntries.end(); ++it ) { if ( (*it).addressee.uid() == a.uid() ) { @@ -75,5 +77,5 @@ void DistributionList::insertEntry( const Addressee &a, const QString &email ) 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 ) { if ( (*it).addressee.uid() == a.uid() && (*it).email == email ) { diff --git a/kabc/distributionlist.h b/kabc/distributionlist.h index c81e543..8d21a17 100644 --- a/kabc/distributionlist.h +++ b/kabc/distributionlist.h @@ -25,4 +25,7 @@ #include "addressbook.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> namespace KABC { @@ -49,5 +52,5 @@ class DistributionList struct Entry { - typedef QValueList<Entry> List; + typedef Q3ValueList<Entry> List; Entry() {} @@ -168,5 +171,5 @@ class DistributionListManager AddressBook *mAddressBook; - 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 @@ -19,11 +19,17 @@ */ -#include <qlistview.h> +#include <q3listview.h> #include <qlayout.h> #include <qlabel.h> #include <qpushbutton.h> #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> @@ -61,8 +67,8 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString ¤t, parent ) { - 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 ); topLayout->addWidget( mButtonGroup ); @@ -79,5 +85,5 @@ EmailSelector::EmailSelector( const QStringList &emails, const QString ¤t, QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); return QString::null; @@ -97,10 +103,10 @@ 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 ), mEmail( email ) @@ -137,8 +143,8 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address kdDebug(5700) << "DistributionListEditor()" << endl; - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); - QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; + Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ; mNameCombo = new QComboBox( this ); @@ -158,5 +164,5 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeList() ) ); - QGridLayout *gridLayout = new QGridLayout( topLayout, 3, 3 ); + Q3GridLayout *gridLayout = new Q3GridLayout( topLayout, 3, 3 ); gridLayout->setColStretch(1, 1); @@ -167,5 +173,5 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address gridLayout->addMultiCellWidget( mListLabel, 0, 0, 1, 2 ); - mAddresseeView = new QListView( this ); + mAddresseeView = new Q3ListView( this ); mAddresseeView->addColumn( i18n("Name") ); mAddresseeView->addColumn( i18n("Preferred Email") ); @@ -174,5 +180,5 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address connect( mAddresseeView, SIGNAL( selectionChanged() ), SLOT( slotSelectionAddresseeViewChanged() ) ); - connect( mAddresseeView, SIGNAL( doubleClicked( QListViewItem * ) ), + connect( mAddresseeView, SIGNAL( doubleClicked( Q3ListViewItem * ) ), SLOT( addEntry() ) ); @@ -182,5 +188,5 @@ DistributionListEditorWidget::DistributionListEditorWidget( AddressBook *address connect( mAddEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); - mEntryView = new QListView( this ); + mEntryView = new Q3ListView( this ); mEntryView->addColumn( i18n("Name") ); mEntryView->addColumn( i18n("Email") ); diff --git a/kabc/distributionlistdialog.h b/kabc/distributionlistdialog.h index b6d3c80..3627431 100644 --- a/kabc/distributionlistdialog.h +++ b/kabc/distributionlistdialog.h @@ -23,11 +23,13 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QLabel> #include <kdialogbase.h> -class QListView; +class Q3ListView; class QLabel; class QComboBox; -class QButtonGroup; +class Q3ButtonGroup; namespace KABC { @@ -94,5 +96,5 @@ class EmailSelector : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; @@ -125,6 +127,6 @@ class DistributionListEditorWidget : public QWidget QComboBox *mNameCombo; QLabel *mListLabel; - QListView *mEntryView; - QListView *mAddresseeView; + Q3ListView *mEntryView; + Q3ListView *mAddresseeView; AddressBook *mAddressBook; diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp index 9f5840b..ca5ecb7 100644 --- a/kabc/distributionlisteditor.cpp +++ b/kabc/distributionlisteditor.cpp @@ -19,5 +19,5 @@ */ -#include <qlistview.h> +#include <q3listview.h> #include <qlayout.h> #include <qpushbutton.h> @@ -28,6 +28,10 @@ #include <qtcompat/qinputdialog.h> #endif -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qradiobutton.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> #include <klocale.h> @@ -49,8 +53,8 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString & parent ) { - 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 ); topLayout->addWidget( mButtonGroup ); @@ -67,5 +71,5 @@ EmailSelectDialog::EmailSelectDialog( const QStringList &emails, const QString & QString EmailSelectDialog::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); return QString::null; @@ -86,10 +90,10 @@ 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 ), mEmail( email ) @@ -126,9 +130,9 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge kdDebug(5700) << "DistributionListEditor()" << endl; - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setMargin( KDialog::marginHint() ); topLayout->setSpacing( KDialog::spacingHint() ); - QBoxLayout *nameLayout = new QHBoxLayout( topLayout) ; + Q3BoxLayout *nameLayout = new Q3HBoxLayout( topLayout) ; mNameCombo = new QComboBox( this ); @@ -144,5 +148,5 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge connect( removeButton, SIGNAL( clicked() ), SLOT( removeList() ) ); - mEntryView = new QListView( this ); + mEntryView = new Q3ListView( this ); mEntryView->addColumn( i18n("Name") ); mEntryView->addColumn( i18n("Email") ); @@ -163,5 +167,5 @@ DistributionListEditor::DistributionListEditor( AddressBook *addressBook, QWidge connect( addEntryButton, SIGNAL( clicked() ), SLOT( addEntry() ) ); - mAddresseeView = new QListView( this ); + mAddresseeView = new Q3ListView( this ); mAddresseeView->addColumn( i18n("Name") ); mAddresseeView->addColumn( i18n("Preferred Email") ); diff --git a/kabc/distributionlisteditor.h b/kabc/distributionlisteditor.h index e0b4221..e672a14 100644 --- a/kabc/distributionlisteditor.h +++ b/kabc/distributionlisteditor.h @@ -25,7 +25,7 @@ #include <kdialogbase.h> -class QListView; +class Q3ListView; class QComboBox; -class QButtonGroup; +class Q3ButtonGroup; namespace KABC { @@ -46,5 +46,5 @@ class EmailSelectDialog : public KDialogBase private: - QButtonGroup *mButtonGroup; + Q3ButtonGroup *mButtonGroup; }; @@ -73,6 +73,6 @@ class DistributionListEditor : public QWidget private: QComboBox *mNameCombo; - QListView *mEntryView; - QListView *mAddresseeView; + Q3ListView *mEntryView; + Q3ListView *mAddresseeView; AddressBook *mAddressBook; diff --git a/kabc/field.cpp b/kabc/field.cpp index 7c6d7a9..203f696 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -34,4 +34,6 @@ $Id$ #include "field.h" #include "resource.h" +//Added by qt3to4: +#include <Q3ValueList> using namespace KABC; @@ -378,5 +380,5 @@ 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); } return true; @@ -494,5 +496,5 @@ void Field::saveFields( KConfig *cfg, const QString &identifier, const Field::List &fields ) { - QValueList<int> fieldIds; + Q3ValueList<int> fieldIds; //US @@ -534,5 +536,5 @@ Field::List Field::restoreFields( const QString &identifier ) Field::List Field::restoreFields( KConfig *cfg, const QString &identifier ) { - QValueList<int> fieldIds = cfg->readIntListEntry( identifier); + Q3ValueList<int> fieldIds = cfg->readIntListEntry( identifier); //US // qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1()); @@ -541,5 +543,5 @@ 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 ) { FieldImpl *f = 0; diff --git a/kabc/field.h b/kabc/field.h index 9e06597..55cc705 100644 --- a/kabc/field.h +++ b/kabc/field.h @@ -30,5 +30,5 @@ $Id$ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include "addressee.h" @@ -44,5 +44,5 @@ 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 @@ -103,5 +103,5 @@ QStringList FormatFactory::formats() retval << "vcard"; - QDictIterator<FormatInfo> it( mFormatList ); + Q3DictIterator<FormatInfo> it( mFormatList ); for ( ; it.current(); ++it ) if ( it.currentKey() != "vcard" ) diff --git a/kabc/formatfactory.h b/kabc/formatfactory.h index 9612374..de15b17 100644 --- a/kabc/formatfactory.h +++ b/kabc/formatfactory.h @@ -22,5 +22,5 @@ #define KABC_FORMATFACTORY_H -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -98,5 +98,5 @@ class FormatFactory static FormatFactory *mSelf; - 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 @@ -9,5 +9,5 @@ OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -lmicrokabc +LIBS += -lxmicrokde -lxmicrokabc LIBS += -L$(QPEDIR)/lib DEFINES += KAB_EMBEDDED 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 @@ -12,5 +12,5 @@ $Id$ #include "vcardparser/vcardtool.h" -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> @@ -38,6 +38,6 @@ bool VCardFormatPlugin2::load( Addressee &addressee, QFile *file ) QString data; - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); data = t.read(); @@ -59,6 +59,6 @@ bool VCardFormatPlugin2::loadAll( AddressBook *addressBook, Resource *resource, QString data; - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); data = t.read(); @@ -87,6 +87,6 @@ void VCardFormatPlugin2::save( const Addressee &addressee, QFile *file ) vcardlist.append( addressee ); - QTextStream t( file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( file ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t << tool.createVCards( vcardlist ); } @@ -106,6 +106,6 @@ 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 ); } @@ -115,5 +115,5 @@ bool VCardFormatPlugin2::checkFormat( QFile *file ) const QString line; - file->readLine( line, 1024 ); + char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp; line = line.stripWhiteSpace(); if ( line == "BEGIN:VCARD" ) diff --git a/kabc/kabc.pro b/kabc/kabc.pro index 17ebff8..846ed8a 100644 --- a/kabc/kabc.pro +++ b/kabc/kabc.pro @@ -4,5 +4,5 @@ CONFIG += qt warn_on DESTDIR=../bin -TARGET = microkabc +TARGET = xmicrokabc include( ../variables.pri ) @@ -10,5 +10,5 @@ include( ../variables.pri ) INCLUDEPATH += . ./vcard/include ./vcard/include/generated ../microkde ../microkde/kdecore ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim ../qtcompat ../microkde/kdeui .. -#LIBS += -lmicrokde -lldap +#LIBS += -lxmicrokde -lldap LIBS += -L$(QPEDIR)/lib DEFINES += KAB_EMBEDDED DESKTOP_VERSION @@ -217,2 +217,6 @@ 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 @@ -1,5 +1,5 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc +TARGET = xmicrokabc @@ -8,6 +8,6 @@ OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokdepim #LIBS += -lldap LIBS += -L$(QPEDIR)/lib @@ -195,2 +195,4 @@ vcard/TextListValue.cpp # plugins/ldap/resourceldap.cpp \ # plugins/ldap/resourceldapconfig.cpp \ +#The following line was inserted by qt3to4 +QT += qt3support @@ -29,5 +29,5 @@ $Id$ #define KABC_KEY_H -#include <qvaluelist.h> +#include <q3valuelist.h> namespace KABC { @@ -42,6 +42,6 @@ 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 @@ -29,5 +29,5 @@ $Id$ #define KABC_PHONENUMBER_H -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qstring.h> @@ -47,6 +47,6 @@ 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 @@ -27,4 +27,6 @@ $Id$ #include "picture.h" +//Added by qt3to4: +#include <QPixmap> using namespace KABC; diff --git a/kabc/picture.h b/kabc/picture.h index 714d1e2..1b63610 100644 --- a/kabc/picture.h +++ b/kabc/picture.h @@ -30,4 +30,6 @@ $Id$ #include <qimage.h> +//Added by qt3to4: +#include <QPixmap> namespace KABC { 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 @@ -5,8 +5,8 @@ CONFIG += qt warn_on release 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 @@ -30,7 +30,11 @@ DEFINES += _WIN32_ 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 @@ -3,10 +3,10 @@ CONFIG += qt warn_on release #release debug -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 OBJECTS_DIR = obj/$(PLATFORM) 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 @@ -171,5 +171,5 @@ bool ResourceDir::doOpen() QFile file( mPath + "/" + testName ); - if ( file.open( IO_ReadOnly ) ) + if ( file.open( QIODevice::ReadOnly ) ) return true; @@ -197,5 +197,5 @@ bool ResourceDir::load() QFile file( mPath + "/" + (*it) ); - if ( !file.open( IO_ReadOnly ) ) { + if ( !file.open( QIODevice::ReadOnly ) ) { addressBook()->error( i18n( "Unable to open file '%1' for reading" ).arg( file.name() ) ); ok = false; @@ -224,5 +224,5 @@ 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() ) ); continue; @@ -268,5 +268,5 @@ bool ResourceDir::lock( const QString &path ) // Create unique file 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 @@ -28,4 +28,6 @@ $Id$ #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kdebug.h> @@ -45,5 +47,5 @@ ResourceDirConfig::ResourceDirConfig( QWidget* parent, const char* name ) : KRES::ConfigWidget( parent, 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 @@ -5,9 +5,9 @@ CONFIG += qt warn_on release include( ../../../variables.pri ) -TARGET = microkabc_file +TARGET = xmicrokabc_file 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,7 +31,11 @@ DEFINES += _WIN32_ 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 @@ -3,10 +3,10 @@ CONFIG += qt warn_on release #release debug -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 OBJECTS_DIR = obj/$(PLATFORM) 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 @@ -202,5 +202,5 @@ bool ResourceFile::doOpen() if ( !file.exists() ) { // try to create the file - bool ok = file.open( IO_WriteOnly ); + bool ok = file.open( QIODevice::WriteOnly ); if ( ok ) file.close(); @@ -208,5 +208,5 @@ bool ResourceFile::doOpen() return ok; } else { - if ( !file.open( IO_ReadWrite ) ) + if ( !file.open( QIODevice::ReadWrite ) ) return false; @@ -231,5 +231,5 @@ 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() ) ); return false; @@ -312,5 +312,5 @@ bool ResourceFile::save( Ticket *ticket ) QFile info; info.setName( fileName() ); - bool ok = info.open( IO_WriteOnly ); + bool ok = info.open( QIODevice::WriteOnly ); if ( ok ) { mFormat->saveAll( addressBook(), this, &info ); @@ -364,5 +364,5 @@ bool ResourceFile::lock( const QString &fileName ) // Create unique file 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 @@ -29,4 +29,6 @@ $Id$ #include <qlayout.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kdebug.h> @@ -51,5 +53,5 @@ ResourceFileConfig::ResourceFileConfig( QWidget* parent, const char* name ) //qDebug("ResourceFileConfig::ResourceFileConfig"); - 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 @@ -3,10 +3,10 @@ CONFIG += qt warn_on release #release debug -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 OBJECTS_DIR = obj/$(PLATFORM) 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 @@ -1,5 +1,5 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_olaccess +TARGET = xmicrokabc_olaccess include( ../../../variables.pri ) @@ -29,7 +29,7 @@ DEFINES += _WIN32_ 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 @@ -2,5 +2,5 @@ TEMPLATE = lib CONFIG += qt warn_on #release debug -TARGET = microkabc_opie +TARGET = xmicrokabc_opie INCLUDEPATH += $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include $(OPIEDIR)/include @@ -10,6 +10,6 @@ OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc +LIBS += -lxmicrokde +LIBS += -lxmicrokabc LIBS += -L$(QPEDIR)/lib LIBS += -L$(OPIEDIR)/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 @@ -4,11 +4,11 @@ CONFIG += qt warn_on release include( ../../../variables.pri ) -TARGET = microkabc_qtopia +TARGET = xmicrokabc_qtopia INCLUDEPATH += ../.. ../../.. ../../../kabc ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources DESTDIR = ../../../bin -#LIBS += -lmicrokde -#LIBS += -lkamicrokabc +#LIBS += -lxmicrokde +#LIBS += -lxkamicrokabc DEFINES += KAB_EMBEDDED DESKTOP_VERSION @@ -37,7 +37,11 @@ DEFINES += _WIN32_ 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 @@ -2,5 +2,5 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_qtopia +TARGET = xmicrokabc_qtopia INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include @@ -9,6 +9,6 @@ OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc +LIBS += -lxmicrokde +LIBS += -lxmicrokabc LIBS += -L$(QPEDIR)/lib LIBS += -lqpe 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 @@ -35,5 +35,7 @@ $Id$ #include <qfile.h> #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3ValueList> //#include <.h> @@ -72,6 +74,6 @@ QString QtopiaConverter::categoriesToNumber( const QStringList &list, const QStr startover: 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; for ( QStringList::ConstIterator listIt = list.begin(); listIt != list.end(); ++listIt ) { @@ -193,5 +195,5 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr ) QDate date = dateFromString( el.attribute( "Birthday" ) ); if ( date.isValid() ) - adr.setBirthday( date ); + adr.setBirthday( (QDateTime)date ); adr.setRole( el.attribute( "JobTitle" ) ); @@ -318,5 +320,5 @@ bool QtopiaConverter::qtopiaToAddressee( const QDomElement& el, Addressee &adr ) } -bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, QTextStream *stream ) +bool QtopiaConverter::addresseeToQtopia( const Addressee &ab, Q3TextStream *stream ) { *stream << "<Contact "; @@ -485,11 +487,11 @@ void CategoryEdit::save(const QString& fileName)const{ QFile file( fileName ); 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; stream << "<!DOCTYPE CategoryList>" << endl; stream << "<Categories>" << endl; - for ( QValueList<OpieCategories>::ConstIterator it = m_categories.begin(); + for ( Q3ValueList<OpieCategories>::ConstIterator it = m_categories.begin(); it != m_categories.end(); ++it ) { @@ -538,5 +540,5 @@ void CategoryEdit::parse( const QString &tempFile ){ QDomDocument doc( "mydocument" ); QFile f( tempFile ); - if ( !f.open( IO_ReadOnly ) ) + if ( !f.open( QIODevice::ReadOnly ) ) return; @@ -588,5 +590,5 @@ void CategoryEdit::clear() QString CategoryEdit::categoryById( const QString &id, const QString &app )const { - QValueList<OpieCategories>::ConstIterator it; + Q3ValueList<OpieCategories>::ConstIterator it; QString category; QString fallback; 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 @@ -29,4 +29,7 @@ $Id$ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3TextStream> #include "addressee.h" @@ -77,5 +80,5 @@ class OpieCategories { void clear(); - QValueList<OpieCategories> categories()const { return m_categories; }; + Q3ValueList<OpieCategories> categories()const { return m_categories; }; private: /** @@ -84,5 +87,5 @@ class OpieCategories { void updateKDE( const QString& app, const QStringList& categories ); QMap<int, bool> ids; // from tt Qtopia::UidGen - QValueList<OpieCategories> m_categories; + Q3ValueList<OpieCategories> m_categories; }; @@ -118,5 +121,5 @@ public: * @param contact The qtopia contact. */ - bool addresseeToQtopia( const Addressee &ab, QTextStream *stream ); + bool addresseeToQtopia( const Addressee &ab, Q3TextStream *stream ); private: 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 @@ -32,5 +32,5 @@ $Id$ #include <qdir.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfileinfo.h> #include <qregexp.h> @@ -157,5 +157,5 @@ bool ResourceQtopia::load() QFile file( fileName() ); - if ( !file.open(IO_ReadOnly ) ) { + if ( !file.open(QIODevice::ReadOnly ) ) { return false; } @@ -204,10 +204,10 @@ bool ResourceQtopia::save( Ticket *ticket ) bool res; 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; *stream << " <Groups>" << endl; @@ -261,5 +261,5 @@ bool ResourceQtopia::lock( const QString &lockfileName ) // Create unique file 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 @@ -28,4 +28,6 @@ $Id$ #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kdebug.h> @@ -47,5 +49,5 @@ ResourceQtopiaConfig::ResourceQtopiaConfig( QWidget* parent, const char* name ) : ConfigWidget( parent, 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 @@ -1,5 +1,5 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkabc_sharpdtm +TARGET = xmicrokabc_sharpdtm INCLUDEPATH += $(KDEPIMDIR) $(KDEPIMDIR)/kabc $(SHARPDTMSDK)/include $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/microkde/kio/kfile $(KDEPIMDIR)/microkde/kio/kio $(KDEPIMDIR)/microkde/kresources $(KDEPIMDIR)/qtcompat $(QPEDIR)/include @@ -9,7 +9,7 @@ OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib -LIBS += -lmicrokde -LIBS += -lmicrokabc -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokabc +LIBS += -lxmicrokdepim LIBS += -lmicroqtcompat LIBS += -L$(QPEDIR)/lib diff --git a/kabc/secrecy.h b/kabc/secrecy.h index b2ff565..0fe956e 100644 --- a/kabc/secrecy.h +++ b/kabc/secrecy.h @@ -29,5 +29,5 @@ $Id$ #define KABC_SECRECY_H -#include <qvaluelist.h> +#include <q3valuelist.h> namespace KABC { @@ -39,5 +39,5 @@ 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 @@ -29,5 +29,5 @@ $Id$ #define KABC_SOUND_H -#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 @@ -25,5 +25,5 @@ Copyright (c) 2004 Ulf Schenk $Id$ */ -#include <qptrlist.h> +#include <q3ptrlist.h> #include "tmpaddressbook.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 @@ -25,4 +25,6 @@ #include <VCardAdrParam.h> #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -39,5 +41,5 @@ AdrParam::AdrParam(const AdrParam & x) } -AdrParam::AdrParam(const QCString & s) +AdrParam::AdrParam(const Q3CString & s) : Param(s) { @@ -57,5 +59,5 @@ AdrParam::operator = (AdrParam & x) AdrParam & -AdrParam::operator = (const QCString & s) +AdrParam::operator = (const Q3CString & s) { Param::operator = (s); @@ -78,5 +80,5 @@ AdrParam::operator == (AdrParam & x) return false; - QStrListIterator it(x.adrTypeList_); + Q3StrListIterator it(x.adrTypeList_); for (; it.current(); ++it) @@ -115,5 +117,5 @@ AdrParam::_assemble() } - QStrListIterator it(adrTypeList_); + Q3StrListIterator it(adrTypeList_); for (; it.current(); ++it) { 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 @@ -26,4 +26,7 @@ #include <VCardValue.h> #include <VCardDefines.h> +//Added by qt3to4: +#include <Q3StrList> +#include <Q3CString> using namespace VCARD; @@ -46,5 +49,5 @@ AdrValue::AdrValue(const AdrValue & x) } -AdrValue::AdrValue(const QCString & s) +AdrValue::AdrValue(const Q3CString & s) : Value(s) { @@ -69,5 +72,5 @@ AdrValue::operator = (AdrValue & x) AdrValue & -AdrValue::operator = (const QCString & s) +AdrValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -106,5 +109,5 @@ AdrValue::_parse() vDebug("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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -40,5 +42,5 @@ AgentParam::AgentParam(const AgentParam & x) } -AgentParam::AgentParam(const QCString & s) +AgentParam::AgentParam(const Q3CString & s) : Param(s) { @@ -58,5 +60,5 @@ AgentParam::operator = (AgentParam & x) AgentParam & -AgentParam::operator = (const QCString & s) +AgentParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ AgentValue::AgentValue(const AgentValue & x) } -AgentValue::AgentValue(const QCString & s) +AgentValue::AgentValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ AgentValue::operator = (AgentValue & x) AgentValue & -AgentValue::operator = (const QCString & s) +AgentValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -27,4 +27,6 @@ #include <kdebug.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -41,5 +43,5 @@ ClassValue::ClassValue(const ClassValue & x) } -ClassValue::ClassValue(const QCString & s) +ClassValue::ClassValue(const Q3CString & s) : Value(s) { @@ -59,5 +61,5 @@ ClassValue::operator = (ClassValue & x) ClassValue & -ClassValue::operator = (const QCString & s) +ClassValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -22,6 +22,6 @@ */ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <qregexp.h> @@ -99,5 +99,5 @@ ContentLine::ContentLine(const ContentLine & x) } -ContentLine::ContentLine(const QCString & s) +ContentLine::ContentLine(const Q3CString & s) : Entity(s), value_(0), @@ -130,5 +130,5 @@ ContentLine::operator = (ContentLine & x) ContentLine & -ContentLine::operator = (const QCString & s) +ContentLine::operator = (const Q3CString & s) { Entity::operator = (s); @@ -143,5 +143,5 @@ ContentLine::operator == (ContentLine & x) x.parse(); - QPtrListIterator<Param> it(x.paramList()); + Q3PtrListIterator<Param> it(x.paramList()); if (!paramList_.find(it.current())) @@ -164,9 +164,9 @@ ContentLine::_parse() // Unfold folded lines // 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" ); int split = strRep_.find(':'); @@ -177,6 +177,6 @@ ContentLine::_parse() } - QCString firstPart(strRep_.left(split)); - QCString valuePart(strRep_.mid(split + 1)); + Q3CString firstPart(strRep_.left(split)); + Q3CString valuePart(strRep_.mid(split + 1)); split = firstPart.find('.'); @@ -193,5 +193,5 @@ ContentLine::_parse() // Now we have the group, the name and param list together and the value. - QStrList l; + Q3StrList l; RTokenise(firstPart, ";", l); @@ -215,9 +215,9 @@ ContentLine::_parse() // For each parameter, create a new parameter of the correct type. - QStrListIterator it(l); + Q3StrListIterator it(l); for (; it.current(); ++it, i++) { - QCString str = *it; + Q3CString str = *it; split = str.find("="); @@ -227,11 +227,11 @@ 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 ); for(; it2.current(); ++it2) { @@ -310,5 +310,5 @@ ContentLine::_assemble() strRep_.truncate(0); - QCString line; + Q3CString line; if (!group_.isEmpty()) 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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ DateParam::DateParam(const DateParam & x) } -DateParam::DateParam(const QCString & s) +DateParam::DateParam(const Q3CString & s) : Param(s) { @@ -53,5 +55,5 @@ DateParam::operator = (DateParam & x) DateParam & -DateParam::operator = (const QCString & s) +DateParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -23,4 +23,6 @@ #include <qregexp.h> +//Added by qt3to4: +#include <Q3CString> #include <kdebug.h> @@ -106,5 +108,5 @@ DateValue::DateValue(const DateValue & x) } -DateValue::DateValue(const QCString & s) +DateValue::DateValue(const Q3CString & s) : Value(s) { @@ -121,5 +123,5 @@ DateValue::operator = (DateValue & x) DateValue & -DateValue::operator = (const QCString & s) +DateValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -155,6 +157,6 @@ DateValue::_parse() int timeSep = strRep_.find('T'); - QCString dateStr; - QCString timeStr; + Q3CString dateStr; + Q3CString timeStr; if (timeSep == -1) { @@ -174,5 +176,5 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// DATE - dateStr.replace(QRegExp("-"), ""); + dateStr.replace("-", ""); kdDebug(5710) << "dateStr: " << dateStr << endl; @@ -197,5 +199,5 @@ DateValue::_parse() if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { - QCString zoneStr(timeStr.mid(zoneSep + 1)); + Q3CString zoneStr(timeStr.mid(zoneSep + 1)); vDebug("zoneStr == " + zoneStr); @@ -212,5 +214,5 @@ 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(); } @@ -218,5 +220,5 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// HMS - timeStr.replace(QRegExp(":"), ""); + timeStr.replace(":", ""); hour_ = timeStr.left(2).toInt(); @@ -230,7 +232,7 @@ DateValue::_assemble() vDebug("DateValue::_assemble"); - QCString year; - QCString month; - QCString day; + Q3CString year; + Q3CString month; + Q3CString day; year.setNum( year_ ); @@ -244,7 +246,7 @@ DateValue::_assemble() if ( hasTime_ ) { - QCString hour; - QCString minute; - QCString second; + Q3CString hour; + Q3CString minute; + Q3CString second; hour.setNum( hour_ ); 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 @@ -25,4 +25,6 @@ #include <VCardParam.h> #include <VCardDefines.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -41,5 +43,5 @@ EmailParam::EmailParam(const EmailParam & x) } -EmailParam::EmailParam(const QCString & s) +EmailParam::EmailParam(const Q3CString & s) : Param(s) { @@ -59,5 +61,5 @@ EmailParam::operator = (EmailParam & x) EmailParam & -EmailParam::operator = (const QCString & s) +EmailParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -23,4 +23,6 @@ #include <VCardEntity.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -41,5 +43,5 @@ Entity::Entity(const Entity & e) } -Entity::Entity(const QCString & s) +Entity::Entity(const Q3CString & s) : strRep_ (s), parsed_ (false), @@ -62,5 +64,5 @@ Entity::operator = (const Entity & e) Entity & -Entity::operator = (const QCString & s) +Entity::operator = (const Q3CString & s) { strRep_ = s; @@ -84,5 +86,5 @@ Entity::operator != (Entity & e) bool -Entity::operator == (const QCString & s) +Entity::operator == (const Q3CString & s) { return asString() == s; @@ -90,5 +92,5 @@ Entity::operator == (const QCString & s) bool -Entity::operator != (const QCString & s) +Entity::operator != (const Q3CString & s) { return !(*this == s); @@ -100,5 +102,5 @@ 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 @@ -22,5 +22,5 @@ */ -#include <qcstring.h> +#include <q3cstring.h> #include <ctype.h> @@ -30,5 +30,5 @@ using namespace VCARD; // There are 31 possible types, not including extensions. - const QCString + const Q3CString VCARD::paramNames [] = { @@ -223,5 +223,5 @@ VCARD::EntityTypeToValueType(EntityType e) } - QCString + Q3CString VCARD::EntityTypeToParamName(EntityType e) { @@ -231,5 +231,5 @@ VCARD::EntityTypeToParamName(EntityType e) EntityType -VCARD::EntityNameToEntityType(const QCString & s) +VCARD::EntityNameToEntityType(const Q3CString & s) { if (s.isEmpty()) return EntityUnknown; 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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -46,5 +48,5 @@ FloatValue::FloatValue(const FloatValue & x) } -FloatValue::FloatValue(const QCString & s) +FloatValue::FloatValue(const Q3CString & s) : Value(s) { @@ -64,5 +66,5 @@ FloatValue::operator = (FloatValue & x) FloatValue & -FloatValue::operator = (const QCString & s) +FloatValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -102,5 +104,5 @@ FloatValue::_parse() 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 @@ -24,4 +24,6 @@ #include <kdebug.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -37,5 +39,5 @@ GeoValue::GeoValue(const GeoValue & x) } -GeoValue::GeoValue(const QCString & s) +GeoValue::GeoValue(const Q3CString & s) : Value(s) { @@ -55,5 +57,5 @@ GeoValue::operator = (GeoValue & x) GeoValue & -GeoValue::operator = (const QCString & s) +GeoValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ ImageParam::ImageParam(const ImageParam & x) } -ImageParam::ImageParam(const QCString & s) +ImageParam::ImageParam(const Q3CString & s) : Param(s) { @@ -53,5 +55,5 @@ ImageParam::operator = (ImageParam & x) ImageParam & -ImageParam::operator = (const QCString & s) +ImageParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ ImageValue::ImageValue(const ImageValue & x) } -ImageValue::ImageValue(const QCString & s) +ImageValue::ImageValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ ImageValue::operator = (ImageValue & x) ImageValue & -ImageValue::operator = (const QCString & s) +ImageValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ ImgValue::ImgValue(const ImgValue & x) } -ImgValue::ImgValue(const QCString & s) +ImgValue::ImgValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ ImgValue::operator = (ImgValue & x) ImgValue & -ImgValue::operator = (const QCString & s) +ImgValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -27,4 +27,7 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3StrList> using namespace VCARD; @@ -40,5 +43,5 @@ LangValue::LangValue(const LangValue & x) } -LangValue::LangValue(const QCString & s) +LangValue::LangValue(const Q3CString & s) : Value(s) { @@ -55,5 +58,5 @@ LangValue::operator = (LangValue & x) LangValue & -LangValue::operator = (const QCString & s) +LangValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -75,5 +78,5 @@ LangValue::~LangValue() LangValue::_parse() { - QStrList l; + Q3StrList l; RTokenise(strRep_, "-", l); @@ -92,11 +95,12 @@ LangValue::_assemble() strRep_ = primary_; - 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() { @@ -105,5 +109,5 @@ LangValue::primary() } - QStrList + Q3StrList LangValue::subtags() { @@ -113,5 +117,5 @@ LangValue::subtags() void -LangValue::setPrimary(const QCString & s) +LangValue::setPrimary(const Q3CString & s) { parse(); @@ -120,5 +124,5 @@ LangValue::setPrimary(const QCString & s) void -LangValue::setSubTags(const QStrList & l) +LangValue::setSubTags(const Q3StrList & l) { parse(); 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 @@ -22,5 +22,7 @@ */ -#include <qstrlist.h> +#include <q3strlist.h> +//Added by qt3to4: +#include <Q3CString> #include <VCardRToken.h> @@ -47,5 +49,5 @@ NValue::NValue(const NValue & x) } -NValue::NValue(const QCString & s) +NValue::NValue(const Q3CString & s) : Value(s) { @@ -69,5 +71,5 @@ NValue::operator = (NValue & x) NValue & -NValue::operator = (const QCString & s) +NValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -101,5 +103,5 @@ NValue::clone() 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 @@ -27,4 +27,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -40,5 +42,5 @@ OrgValue::OrgValue(const OrgValue & x) } -OrgValue::OrgValue(const QCString & s) +OrgValue::OrgValue(const Q3CString & s) : Value(s) { @@ -55,5 +57,5 @@ OrgValue::operator = (OrgValue & x) OrgValue & -OrgValue::operator = (const QCString & s) +OrgValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -83,5 +85,5 @@ OrgValue::_assemble() bool first(true); - QStrListIterator it(valueList_); + Q3StrListIterator it(valueList_); for (; it.current(); ++it) { @@ -99,5 +101,5 @@ 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 @@ -27,4 +27,6 @@ #include <VCardRToken.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -44,5 +46,5 @@ Param::Param(const Param & x) } -Param::Param(const QCString & s) +Param::Param(const Q3CString & s) : Entity(s), name_(""), @@ -64,5 +66,5 @@ Param::operator = (Param & x) Param & -Param::operator = (const QCString & s) +Param::operator = (const Q3CString & s) { Entity::operator = (s); @@ -92,5 +94,5 @@ Param::_assemble() } -Param::Param(const QCString &name, const QCString &value) +Param::Param(const Q3CString &name, const Q3CString &value) : Entity(), name_(name), @@ -102,5 +104,5 @@ Param::Param(const QCString &name, const QCString &value) void -Param::setName(const QCString & name) +Param::setName(const Q3CString & name) { name_ = name; @@ -110,5 +112,5 @@ Param::setName(const QCString & name) void -Param::setValue(const QCString & value) +Param::setValue(const Q3CString & value) { value_ = value; @@ -117,5 +119,5 @@ Param::setValue(const QCString & value) } - QCString + Q3CString Param::name() { @@ -123,5 +125,5 @@ 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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ PhoneNumberValue::PhoneNumberValue(const PhoneNumberValue & x) } -PhoneNumberValue::PhoneNumberValue(const QCString & s) +PhoneNumberValue::PhoneNumberValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ PhoneNumberValue::operator = (PhoneNumberValue & x) PhoneNumberValue & -PhoneNumberValue::operator = (const QCString & s) +PhoneNumberValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -25,6 +25,6 @@ #include <string.h> #include <stddef.h> -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> namespace VCARD @@ -32,5 +32,5 @@ namespace VCARD Q_UINT32 -RTokenise(const char * str, const char * delim, QStrList & l) +RTokenise(const char * str, const char * delim, Q3StrList & l) { // FIXME no stderr ! 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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ SoundValue::SoundValue(const SoundValue & x) } -SoundValue::SoundValue(const QCString & s) +SoundValue::SoundValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ SoundValue::operator = (SoundValue & x) SoundValue & -SoundValue::operator = (const QCString & s) +SoundValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -42,5 +44,5 @@ SourceParam::SourceParam(const SourceParam & x) } -SourceParam::SourceParam(const QCString & s) +SourceParam::SourceParam(const Q3CString & s) : Param(s), type_(SourceParam::TypeUnknown) @@ -61,5 +63,5 @@ SourceParam::operator = (SourceParam & x) SourceParam & -SourceParam::operator = (const QCString & s) +SourceParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ TelParam::TelParam(const TelParam & x) } -TelParam::TelParam(const QCString & s) +TelParam::TelParam(const Q3CString & s) : Param(s) { @@ -53,5 +55,5 @@ TelParam::operator = (TelParam & x) TelParam & -TelParam::operator = (const QCString & s) +TelParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ TelValue::TelValue(const TelValue & x) } -TelValue::TelValue(const QCString & s) +TelValue::TelValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ TelValue::operator = (TelValue & x) TelValue & -TelValue::operator = (const QCString & s) +TelValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ TextBinParam::TextBinParam(const TextBinParam & x) } -TextBinParam::TextBinParam(const QCString & s) +TextBinParam::TextBinParam(const Q3CString & s) : Param(s) { @@ -53,5 +55,5 @@ TextBinParam::operator = (TextBinParam & x) TextBinParam & -TextBinParam::operator = (const QCString & s) +TextBinParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -26,4 +26,6 @@ #include <VCardTextBinValue.h> #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -42,5 +44,5 @@ TextBinValue::TextBinValue(const TextBinValue & x) } -TextBinValue::TextBinValue(const QCString & s) +TextBinValue::TextBinValue(const Q3CString & s) : Value(s) { @@ -61,5 +63,5 @@ TextBinValue::operator = (TextBinValue & x) TextBinValue & -TextBinValue::operator = (const QCString & s) +TextBinValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -27,4 +27,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -40,5 +42,5 @@ TextListValue::TextListValue(const TextListValue & x) } -TextListValue::TextListValue(const QCString & s) +TextListValue::TextListValue(const Q3CString & s) : Value(s) { @@ -55,5 +57,5 @@ TextListValue::operator = (TextListValue & x) TextListValue & -TextListValue::operator = (const QCString & s) +TextListValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -83,5 +85,5 @@ TextListValue::_assemble() bool first(true); - QStrListIterator it(valueList_); + Q3StrListIterator it(valueList_); for (; it.current(); ++it) { @@ -99,5 +101,5 @@ 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 @@ -25,4 +25,6 @@ #include <VCardParam.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ TextParam::TextParam(const TextParam & x) } -TextParam::TextParam(const QCString & s) +TextParam::TextParam(const Q3CString & s) : Param(s) { @@ -53,5 +55,5 @@ TextParam::operator = (TextParam & x) TextParam & -TextParam::operator = (const QCString & s) +TextParam::operator = (const Q3CString & s) { Param::operator = (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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -38,5 +40,5 @@ TextValue::TextValue(const TextValue & x) } -TextValue::TextValue(const QCString & s) +TextValue::TextValue(const Q3CString & s) : Value(s) { @@ -53,5 +55,5 @@ TextValue::operator = (TextValue & x) TextValue & -TextValue::operator = (const QCString & s) +TextValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -62,5 +64,5 @@ TextValue::operator = (const QCString & s) 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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -33,5 +35,5 @@ URIValue::URIValue() } -URIValue::URIValue(const QCString & scheme, const QCString & schemeSpecificPart) +URIValue::URIValue(const Q3CString & scheme, const Q3CString & schemeSpecificPart) : Value(), scheme_ (scheme), @@ -48,5 +50,5 @@ URIValue::URIValue(const URIValue & x) } -URIValue::URIValue(const QCString & s) +URIValue::URIValue(const Q3CString & s) : Value(s) { @@ -66,5 +68,5 @@ URIValue::operator = (URIValue & x) URIValue & -URIValue::operator = (const QCString & s) +URIValue::operator = (const Q3CString & s) { Value::operator = (s); @@ -104,5 +106,5 @@ URIValue::_assemble() } - QCString + Q3CString URIValue::scheme() { @@ -111,5 +113,5 @@ URIValue::scheme() } - QCString + Q3CString URIValue::schemeSpecificPart() { @@ -119,5 +121,5 @@ URIValue::schemeSpecificPart() void -URIValue::setScheme(const QCString & s) +URIValue::setScheme(const Q3CString & s) { parse(); @@ -126,5 +128,5 @@ URIValue::setScheme(const QCString & s) void -URIValue::setSchemeSpecificPart(const QCString & s) +URIValue::setSchemeSpecificPart(const Q3CString & s) { parse(); 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 @@ -25,4 +25,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -39,5 +41,5 @@ UTCValue::UTCValue(const UTCValue & x) } -UTCValue::UTCValue(const QCString & s) +UTCValue::UTCValue(const Q3CString & s) : Value(s) { @@ -58,5 +60,5 @@ UTCValue::operator = (UTCValue & x) UTCValue & -UTCValue::operator = (const QCString & s) +UTCValue::operator = (const Q3CString & s) { Value::operator = (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 @@ -24,4 +24,6 @@ #include <qregexp.h> #include <qdatetime.h> +//Added by qt3to4: +#include <Q3CString> #include <VCardDefines.h> @@ -42,5 +44,5 @@ VCardEntity::VCardEntity(const VCardEntity & x) } -VCardEntity::VCardEntity(const QCString & s) +VCardEntity::VCardEntity(const Q3CString & s) : Entity(s) { @@ -58,5 +60,5 @@ VCardEntity::operator = (VCardEntity & x) VCardEntity & -VCardEntity::operator = (const QCString & s) +VCardEntity::operator = (const Q3CString & s) { Entity::operator = (s); @@ -84,5 +86,5 @@ VCardEntity::_parse() // old code vDebug("parse"); - QCString s(strRep_); + Q3CString s(strRep_); int i = s.find(QRegExp("BEGIN:VCARD", false)); @@ -92,5 +94,5 @@ VCardEntity::_parse() i = s.find(QRegExp("BEGIN:VCARD", false), 11); - QCString cardStr(s.left(i)); + Q3CString cardStr(s.left(i)); VCard * v = new VCard(cardStr); @@ -133,5 +135,5 @@ VCardEntity::_parse() ++num; char* dat = strRep_.data()+start; - VCard * v = new VCard( QCString ( dat,i-start ) ); + VCard * v = new VCard( Q3CString ( dat,i-start ) ); start = i; cardList_.append(v); 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 @@ -22,9 +22,9 @@ */ -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <qstringlist.h> #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include <VCardEntity.h> @@ -49,5 +49,5 @@ VCard::VCard(const VCard & x) contentLineList_.setAutoDelete( TRUE ); - QPtrListIterator<ContentLine> it(x.contentLineList_); + Q3PtrListIterator<ContentLine> it(x.contentLineList_); for (; it.current(); ++it) { ContentLine * c = new ContentLine(*it.current()); @@ -57,5 +57,5 @@ VCard::VCard(const VCard & x) } -VCard::VCard(const QCString & s) +VCard::VCard(const Q3CString & s) : Entity(s) { @@ -69,5 +69,5 @@ VCard::operator = (VCard & x) group_ = x.group(); - QPtrListIterator<ContentLine> it(x.contentLineList_); + Q3PtrListIterator<ContentLine> it(x.contentLineList_); for (; it.current(); ++it) { ContentLine * c = new ContentLine(*it.current()); @@ -80,5 +80,5 @@ VCard::operator = (VCard & x) VCard & -VCard::operator = (const QCString & s) +VCard::operator = (const Q3CString & s) { Entity::operator = (s); @@ -102,5 +102,5 @@ VCard::_parse() QStringList l; - QStrList sl; + Q3StrList sl; RTokenise(strRep_, "\r\n", sl); @@ -110,5 +110,6 @@ VCard::_parse() return; } - l = QStringList::fromStrList( sl ); + for(Q3StrList::iterator i=sl.begin();i!=sl.end();++i) + l.push_back(*i); // Get the first line QString beginLine = l[0].stripWhiteSpace(); @@ -181,5 +182,5 @@ VCard::_parse() QStringList::Iterator it2 = refolded.begin(); for (; it2 != refolded.end(); ++it2) { - ContentLine * cl = new ContentLine(QCString((*it2).latin1())); + ContentLine * cl = new ContentLine(Q3CString((*it2).latin1())); cl->parse(); if (cl->value() == 0) @@ -229,5 +230,5 @@ VCard::_assemble() strRep_ += "VERSION:3.0\r\n"; - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) @@ -245,5 +246,5 @@ VCard::has(EntityType t) bool -VCard::has(const QCString & s) +VCard::has(const Q3CString & s) { parse(); @@ -260,5 +261,5 @@ VCard::add(const ContentLine & cl) void -VCard::add(const QCString & s) +VCard::add(const Q3CString & s) { parse(); @@ -271,5 +272,5 @@ VCard::contentLine(EntityType t) { parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) @@ -281,8 +282,8 @@ VCard::contentLine(EntityType t) ContentLine * -VCard::contentLine(const QCString & s) +VCard::contentLine(const Q3CString & s) { parse(); - QPtrListIterator<ContentLine> it(contentLineList_); + Q3PtrListIterator<ContentLine> it(contentLineList_); for (; it.current(); ++it) 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 @@ -24,4 +24,6 @@ #include <VCardEntity.h> #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> using namespace VCARD; @@ -37,5 +39,5 @@ Value::Value(const Value & x) } -Value::Value(const QCString & s) +Value::Value(const Q3CString & s) : Entity(s) { @@ -52,5 +54,5 @@ Value::operator = (Value & x) Value & -Value::operator = (const QCString & s) +Value::operator = (const Q3CString & s) { Entity::operator = (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 @@ -25,6 +25,6 @@ #define ADRPARAM_H -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <VCardParam.h> @@ -38,14 +38,14 @@ class AdrParam : public Param #include "AdrParam-generated.h" - 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; } @@ -57,6 +57,6 @@ class AdrParam : public Param private: - 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 @@ -25,5 +25,7 @@ #define ADRVALUE_H -#include <qstrlist.h> +#include <q3strlist.h> +//Added by qt3to4: +#include <Q3CString> #include <VCardValue.h> @@ -38,42 +40,42 @@ class AdrValue : public Value AdrValue *clone(); - 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_; } private: - 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 @@ -25,5 +25,5 @@ #define AGENTPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.h> @@ -47,5 +47,5 @@ class AgentParam : public Param { refer_ = b; assembled_ = false; } - 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 @@ -25,5 +25,5 @@ #define AGENTVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,5 +25,5 @@ #define CLASSVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,5 +25,7 @@ #define CONTENTLINE_H -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> #include "VCardEnum.h" @@ -40,6 +42,6 @@ class ContentLine : public Entity #include "ContentLine-generated.h" - 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_; } ParamList paramList() { parse(); return paramList_; } @@ -48,8 +50,8 @@ class ContentLine : public Entity EntityType entityType() { parse(); return entityType_; } - 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; } @@ -64,7 +66,7 @@ class ContentLine : public Entity private: - 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 @@ -25,5 +25,5 @@ #define DATEPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.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 @@ -25,5 +25,5 @@ #define DATEVALUE_H -#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 @@ -36,12 +36,12 @@ #if 0 #ifndef NDEBUG -# include <qcstring.h> +# include <q3cstring.h> # include <iostream> # ifdef __GNUG__ # 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 #else 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 @@ -25,5 +25,5 @@ #define EMAILPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.h> @@ -37,8 +37,8 @@ class EmailParam : public Param #include "EmailParam-generated.h" - 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; } @@ -48,5 +48,5 @@ class EmailParam : public Param private: - 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 @@ -25,5 +25,5 @@ #define ENTITY_H -#include <qcstring.h> +#include <q3cstring.h> namespace VCARD @@ -36,17 +36,17 @@ class Entity 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); virtual bool operator == (Entity & e); 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); virtual ~Entity(); - QCString asString(); + Q3CString asString(); virtual void parse(); @@ -58,5 +58,5 @@ class Entity protected: - QCString strRep_; + Q3CString strRep_; bool parsed_; bool assembled_; 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 @@ -25,10 +25,10 @@ #define ENUM_H -#include <qcstring.h> +#include <q3cstring.h> namespace VCARD { -extern const QCString paramNames []; +extern const Q3CString paramNames []; enum EntityType { @@ -109,6 +109,6 @@ extern const ParamType paramTypesTable[]; ParamType EntityTypeToParamType(EntityType); ValueType EntityTypeToValueType(EntityType); -QCString EntityTypeToParamName(EntityType); -EntityType EntityNameToEntityType(const QCString &); +Q3CString EntityTypeToParamName(EntityType); +EntityType EntityNameToEntityType(const Q3CString &); char * encodeBase64(const char *, unsigned long, unsigned long &); diff --git a/kabc/vcard/include/VCardFloatValue.h b/kabc/vcard/include/VCardFloatValue.h index 69fdc22..cac7a91 100644 --- a/kabc/vcard/include/VCardFloatValue.h +++ b/kabc/vcard/include/VCardFloatValue.h @@ -25,5 +25,5 @@ #define FLOATVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,5 +25,5 @@ #define IMGPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.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 @@ -25,5 +25,5 @@ #define IMAGEVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,6 +25,6 @@ #define LANGVALUE_H -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <VCardValue.h> @@ -37,12 +37,12 @@ class LangValue : public Value #include "LangValue-generated.h" - 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 @@ -26,4 +26,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> namespace VCARD @@ -35,19 +37,19 @@ class NValue : public Value NValue *clone(); - 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; } private: - 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 @@ -25,6 +25,6 @@ #define ORGVALUE_H -#include <qcstring.h> -#include <qstrlist.h> +#include <q3cstring.h> +#include <q3strlist.h> #include <VCardValue.h> @@ -39,9 +39,9 @@ class OrgValue : public Value unsigned int numValues(); - QCString value(unsigned int); + Q3CString value(unsigned int); private: - 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 @@ -25,6 +25,6 @@ #define PARAM_H -#include <qcstring.h> -#include <qptrlist.h> +#include <q3cstring.h> +#include <q3ptrlist.h> #include <VCardEntity.h> @@ -38,20 +38,20 @@ class Param : public Entity #include "Param-generated.h" - 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(); private: - 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 @@ -26,10 +26,10 @@ #define RTOKEN_H -#include <qstrlist.h> +#include <q3strlist.h> 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 @@ -25,5 +25,5 @@ #define SOUNDVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,5 +25,5 @@ #define SOURCEPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.h> @@ -40,10 +40,10 @@ 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; } private: @@ -51,5 +51,5 @@ class SourceParam : public Param SourceParamType type_; // 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 @@ -25,5 +25,7 @@ #define TELPARAM_H -#include <qcstring.h> +#include <q3cstring.h> +//Added by qt3to4: +#include <Q3PtrList> #include <VCardParam.h> @@ -44,5 +46,5 @@ class TelParam : public Param private: - 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 @@ -25,5 +25,5 @@ #define TELVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,5 +25,5 @@ #define TEXTBINPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.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 @@ -25,5 +25,5 @@ #define TEXTBINVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -25,7 +25,7 @@ #define TEXTLISTVALUE_H -#include <qstrlist.h> +#include <q3strlist.h> -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.h> @@ -40,9 +40,9 @@ class TextListValue : public Value unsigned int numValues(); - QCString value(unsigned int); + Q3CString value(unsigned int); private: - 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 @@ -25,5 +25,5 @@ #define TEXTPARAM_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardParam.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 @@ -26,4 +26,6 @@ #include <VCardValue.h> +//Added by qt3to4: +#include <Q3CString> namespace VCARD @@ -34,16 +36,16 @@ class URIValue : public Value #include "URIValue-generated.h" - 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 &); private: - 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 @@ -25,5 +25,5 @@ #define UTCVALUE_H -#include <qcstring.h> +#include <q3cstring.h> #include <VCardValue.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 @@ -26,5 +26,7 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> #include <VCardEnum.h> @@ -41,20 +43,20 @@ 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_; } private: - 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 @@ -26,5 +26,5 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <VCardEnum.h> @@ -35,6 +35,6 @@ namespace VCARD { -typedef QPtrList<VCard> VCardList; -typedef QPtrListIterator<VCard> VCardListIterator; +typedef Q3PtrList<VCard> VCardList; +typedef Q3PtrListIterator<VCard> VCardListIterator; class VCardEntity : public Entity 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 @@ -25,5 +25,5 @@ #define VALUE_H -#include <qptrlist.h> +#include <q3ptrlist.h> #include <VCardEntity.h> @@ -39,6 +39,6 @@ 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~AdrParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~AdrValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~AgentParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~AgentValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~ClassValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~ContentLine(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~DateParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~DateValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~EmailParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~FloatValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~GeoValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~Group(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~ImageParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~ImageValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~ImgParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~ImgValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~LangValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~NValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~V_Name(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~OrgValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~Param(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~V_ParamName(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~V_ParamValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~PhoneNumberValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~SoundValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~SourceParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TelParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TelValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TextBinParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TextBinValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TextListValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TextNSParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TextParam(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~TextValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~URIValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~UTCValue(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~VCard(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~VCardEntity(); 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3CString> // XXX Automatically generated. DO NOT EDIT! XXX // @@ -4,11 +6,11 @@ public: 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);} virtual ~Value(); 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 @@ -4,5 +4,7 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3CString> #include <VCard.h> @@ -19,12 +21,12 @@ int main(int argc, char * argv[]) QFile f(argv[1]); - QCString str; + Q3CString str; - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { cerr << "Couldn't open file \"" << argv[1] << endl; exit(1); } - QTextStream t(&f); + Q3TextStream t(&f); while (!t.eof()) @@ -53,5 +55,5 @@ int main(int argc, char * argv[]) cerr << "Email parameter found" << endl; - QCString s = v.contentLine(EntityEmail)->value()->asString(); + Q3CString s = v.contentLine(EntityEmail)->value()->asString(); cerr << "Email value == " << s << endl; 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 @@ -6,4 +6,6 @@ #include <VCard.h> +//Added by qt3to4: +#include <Q3CString> int main(int argc,char **argv) @@ -34,5 +36,5 @@ int main(int argc,char **argv) v.add(cl2); - QCString str = v.asString(); + Q3CString str = v.asString(); kdDebug() << "--- VCard begin ---" << endl diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index 60d02b8..e24a9dc 100644 --- a/kabc/vcard21parser.cpp +++ b/kabc/vcard21parser.cpp @@ -28,4 +28,6 @@ $Id$ #include <qmap.h> #include <qregexp.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kmdcodec.h> @@ -46,5 +48,5 @@ bool VCardLineX::isValid() const // This is long but it makes it a bit faster (and saves me from using // a tree which is probably the ideal situation, but a bit memory heavy) - switch( name[0] ) { + switch( name[0].unicode() ) { case 'a': if ( name == VCARD_ADR && qualified && @@ -270,5 +272,5 @@ 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 ) { int type = 0; @@ -309,5 +311,5 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) addressee.makePhoneNumbersOLcompatible(); //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 ) { int type = 0; @@ -328,5 +330,8 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) type |= Address::Pref; } - 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 ) ); } } @@ -409,8 +414,8 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) int _state = VC_STATE_BEGIN; - QValueList<VCardLineX> *_vcdata; - QValueList<QString> lines; + Q3ValueList<VCardLineX> *_vcdata; + QStringList lines; - _vcdata = new QValueList<VCardLineX>; + _vcdata = new Q3ValueList<VCardLineX>; lines = QStringList::split( QRegExp( "[\x0d\x0a]" ), vc ); @@ -502,6 +507,6 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) _vcl.parameters = QStringList::split( ';', value, true ); 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() ); } } @@ -544,5 +549,5 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const QString& vc, int *err ) } -VCard21ParserImpl::VCard21ParserImpl(QValueList<VCardLineX> *_vcd) : _vcdata(_vcd) +VCard21ParserImpl::VCard21ParserImpl(Q3ValueList<VCardLineX> *_vcd) : _vcdata(_vcd) { } @@ -555,5 +560,5 @@ QString VCard21ParserImpl::getValue(const QString& name, const QString& qualifie 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)) { if ((*i).parameters.count() > 0) @@ -571,5 +576,5 @@ QString VCard21ParserImpl::getValue(const QString& name) const QString lowname = name.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) { if ((*i).parameters.count() > 0) @@ -585,7 +590,8 @@ 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 ); + } } // failed. @@ -597,7 +603,7 @@ QStringList VCard21ParserImpl::getValues(const QString& name, const QString& qua const QString lowname = name.lower(); 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 ); } // failed. diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h index 77e69b6..80ba6ef 100644 --- a/kabc/vcard21parser.h +++ b/kabc/vcard21parser.h @@ -35,5 +35,5 @@ $Id$ #include <qstring.h> #include <kurl.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include "addressee.h" @@ -197,6 +197,6 @@ public: QString name; bool qualified; - QValueList<QString> qualifiers; - QValueList<QString> parameters; + Q3ValueList<QString> qualifiers; + Q3ValueList<QString> parameters; bool isValid() const; }; @@ -218,8 +218,8 @@ public: QStringList getValues(const QString& name); - 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 @@ -29,4 +29,7 @@ $Id$ #include <qregexp.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> #include <kdebug.h> @@ -55,5 +58,5 @@ 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); VCardEntity e( data ); @@ -76,5 +79,5 @@ 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 ); @@ -109,5 +112,5 @@ void VCardFormatImpl::save( const Addressee &addressee, QFile *file ) vcards.setCardList( vcardlist ); - QCString vcardData = vcards.asString(); + Q3CString vcardData = vcards.asString(); file->writeBlock( (const char*)vcardData, vcardData.length() ); } @@ -130,9 +133,9 @@ void VCardFormatImpl::saveAll( AddressBook *ab, Resource *resource, QFile *file bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) { - QPtrList<ContentLine> contentLines = v->contentLineList(); + Q3PtrList<ContentLine> contentLines = v->contentLineList(); ContentLine *cl; for( cl = contentLines.first(); cl; cl = contentLines.next() ) { - QCString n = cl->name(); + Q3CString n = cl->name(); if ( n.left( 2 ) == "X-" ) { n = n.mid( 2 ); @@ -220,5 +223,5 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCard *v ) case EntityBirthday: - addressee.setBirthday( readDateValue( cl ) ); + addressee.setBirthday( (QDateTime) readDateValue( cl ) ); break; @@ -531,5 +534,5 @@ int VCardFormatImpl::readAddressParam( ContentLine *cl ) ParamList params = cl->paramList(); ParamListIterator it( params ); - QCString tmpStr; + Q3CString tmpStr; for( ; it.current(); ++it ) { if ( (*it)->name().upper() == "TYPE" ) { @@ -610,5 +613,5 @@ PhoneNumber VCardFormatImpl::readTelephoneValue( ContentLine *cl ) ParamList params = cl->paramList(); ParamListIterator it( params ); - QCString tmpStr; + Q3CString tmpStr; for( ; it.current(); ++it ) { if ( (*it)->name() == "TYPE" ) { @@ -871,5 +874,5 @@ void VCardFormatImpl::addPictureValue( VCARD::VCard *vcard, VCARD::EntityType ty if ( intern ) { // only for vCard export we really write the data inline QByteArray data; - QDataStream s( data, IO_WriteOnly ); + QDataStream s( &data, QIODevice::WriteOnly ); s.setVersion( 4 ); // to produce valid png files s << img; @@ -960,5 +963,5 @@ void VCardFormatImpl::addSoundValue( VCARD::VCard *vcard, const Sound &sound, co } else { // save sound in cache QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_WriteOnly ) ) { + if ( file.open( QIODevice::WriteOnly ) ) { file.writeBlock( data ); } @@ -992,5 +995,5 @@ Sound VCardFormatImpl::readSoundValue( VCARD::ContentLine *cl, const Addressee & if ( v->asString() == "<dummy>" ) { // no sound inline stored => sound is in cache QFile file( locateLocal( "data", "kabc/sounds/" + addr.uid() ) ); - if ( file.open( IO_ReadOnly ) ) { + if ( file.open( QIODevice::ReadOnly ) ) { data = file.readAll(); file.close(); diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp index 8db8c11..0b97a08 100644 --- a/kabc/vcardformatplugin.cpp +++ b/kabc/vcardformatplugin.cpp @@ -62,5 +62,5 @@ bool VCardFormatPlugin::checkFormat( QFile *file ) const QString line; - file->readLine( line, 1024 ); + char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp; line = line.stripWhiteSpace(); if ( line == "BEGIN:VCARD" ) 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 @@ -25,5 +25,5 @@ #include <qmap.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> namespace KABC { @@ -32,5 +32,5 @@ 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 @@ -20,4 +20,6 @@ #include "vcardline.h" +//Added by qt3to4: +#include <Q3CString> using namespace KABC; @@ -44,5 +46,5 @@ VCardLine::VCardLine( const QString &identifier, const QString &value ) { mIdentifier = identifier; - mValue.assign( value.data(), value.length() ); + mValue = value; } @@ -87,5 +89,5 @@ void VCardLine::setValueString( const QString& value ) setValueCString( value.utf8() ); } -void VCardLine::setValueCString( const QCString& value ) +void VCardLine::setValueCString( const Q3CString& value ) { mValue.duplicate( value.data(), value.length() ); 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 @@ -23,6 +23,6 @@ #include <qstringlist.h> -#include <qvaluelist.h> -#include <qcstring.h> +#include <q3valuelist.h> +#include <q3cstring.h> #include <qvariant.h> #include <qmap.h> @@ -34,5 +34,5 @@ class VCardLine { public: - typedef QValueList<VCardLine> List; + typedef Q3ValueList<VCardLine> List; typedef QMap<QString, QStringList> ParamMap; @@ -60,5 +60,5 @@ 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 @@ -219,5 +219,5 @@ QString VCardParser::createVCards( const VCard::List& list ) KCodecs::base64Encode( input, output ); else if ( encodingType == "quoted-printable" ) - KCodecs::quotedPrintableEncode( input, output ); + KCodecs::quotedPrintableEncode( input, output, true ); textLine.append( ":" + QString( output ) ); } else 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 @@ -653,5 +653,5 @@ VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pi if ( !pic.data().isNull() ) { QByteArray input; - QDataStream s( input, IO_WriteOnly ); + QDataStream s( &input, QIODevice::WriteOnly ); s.setVersion( 4 ); s << pic.data(); diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp index 3dcd592..83908d0 100644 --- a/kaddressbook/addresseditwidget.cpp +++ b/kaddressbook/addresseditwidget.cpp @@ -23,22 +23,29 @@ */ -#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> #include <kbuttonbox.h> #else //KAB_EMBEDDED -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif //KAB_EMBEDDED @@ -68,7 +75,7 @@ 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 ); //label->setPixmap( KGlobal::iconLoader()->loadIcon( "gohome", KIcon::Desktop, 0 ) ); @@ -85,9 +92,9 @@ AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) #ifndef KAB_EMBEDDED - mAddressTextEdit = new QTextEdit( this ); + mAddressTextEdit = new Q3TextEdit( this ); mAddressTextEdit->setReadOnly( true ); mAddressTextEdit->setMinimumHeight( 20 ); #else //KAB_EMBEDDED - mAddressTextEdit = new QMultiLineEdit( this ); + mAddressTextEdit = new Q3MultiLineEdit( this ); mAddressTextEdit->setReadOnly( true ); mAddressTextEdit->setMinimumHeight( 20 ); @@ -127,11 +134,11 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, mTypeCombo->insertTypeList( list ); - QValueList<int> defaultTypes; + Q3ValueList<int> defaultTypes; defaultTypes << KABC::Address::Home; defaultTypes << KABC::Address::Work; 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 ) defaultTypes.remove( *it ); @@ -182,5 +189,5 @@ void AddressEditWidget::edit() mConfig->setUid( mAddressee.uid() ); - QValueList<int> configList; + Q3ValueList<int> configList; if ( !hasHome ) { configList << KABC::Address::Home; @@ -256,5 +263,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, QWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 8, 2 ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 8, 2 ); topLayout->setSpacing( spacingHintSmall() ); @@ -267,7 +274,7 @@ 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"); #endif //KAB_EMBEDDED @@ -312,5 +319,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, label->setBuddy( mCountryCombo ); topLayout->addWidget( mCountryCombo, 6, 1 ); - mCountryCombo->setSizeLimit( 8); + mCountryCombo->setMaxVisibleItems( 8); mPreferredCheckBox = new QCheckBox( i18n( "This is the preferred address" ), page ); topLayout->addMultiCellWidget( mPreferredCheckBox, 7, 7, 0, 1 ); @@ -319,5 +326,5 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, topLayout->addMultiCellWidget( sep, 8, 8, 0, 1 ); */ - QHBox *buttonBox = new QHBox( page ); + Q3HBox *buttonBox = new Q3HBox( page ); buttonBox->setSpacing( spacingHint() ); topLayout->addMultiCellWidget( buttonBox, 9, 9, 0, 1 ); @@ -584,7 +591,7 @@ 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 ); @@ -618,5 +625,5 @@ 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 @@ -34,11 +34,11 @@ #include "typecombo.h" -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 class QToolButton; @@ -82,7 +82,7 @@ class AddressEditWidget : public QWidget QPushButton *mEditButton; #ifndef KAB_EMBEDDED - QTextEdit *mAddressTextEdit; + Q3TextEdit *mAddressTextEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mAddressTextEdit; + Q3MultiLineEdit *mAddressTextEdit; #endif //KAB_EMBEDDED @@ -121,7 +121,7 @@ class AddressEditDialog : public KDialogBase AddressTypeCombo *mTypeCombo; #ifndef KAB_EMBEDDED - QTextEdit *mStreetTextEdit; + Q3TextEdit *mStreetTextEdit; #else //KAB_EMBEDDED - QMultiLineEdit *mStreetTextEdit; + Q3MultiLineEdit *mStreetTextEdit; #endif //KAB_EMBEDDED KComboBox *mCountryCombo; @@ -152,5 +152,5 @@ class AddressTypeDialog : public KDialogBase private: - QButtonGroup *mGroup; + Q3ButtonGroup *mGroup; KABC::Address::TypeList mTypeList; diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp index ea0436f..81b1bf4 100644 --- a/kaddressbook/addresseeconfig.cpp +++ b/kaddressbook/addresseeconfig.cpp @@ -27,4 +27,6 @@ #include <kstandarddirs.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3ValueList> using namespace KABC; @@ -78,5 +80,5 @@ void AddresseeConfig::setAutomaticNameParsing( bool value ) } -void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) +void AddresseeConfig::setNoDefaultAddrTypes( const Q3ValueList<int> &types ) { AddresseeConfig::config()->writeEntry( "NoDefaultAddrTypes", types ); @@ -84,5 +86,5 @@ void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) } - QValueList<int> AddresseeConfig::noDefaultAddrTypes() const + Q3ValueList<int> AddresseeConfig::noDefaultAddrTypes() const { return AddresseeConfig::config()->readIntListEntry( "NoDefaultAddrTypes" ); diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h index 47fbdd6..f6bb3e9 100644 --- a/kaddressbook/addresseeconfig.h +++ b/kaddressbook/addresseeconfig.h @@ -27,4 +27,6 @@ #include <kabc/addressee.h> #include <kconfig.h> +//Added by qt3to4: +#include <Q3ValueList> using namespace KABC; @@ -44,6 +46,6 @@ class AddresseeConfig bool automaticNameParsing(); - void setNoDefaultAddrTypes( const QValueList<int> &types ); - QValueList<int> noDefaultAddrTypes() const; + void setNoDefaultAddrTypes( const Q3ValueList<int> &types ); + Q3ValueList<int> noDefaultAddrTypes() const; void remove( const QString & uid); diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index b5a60f2..b925a07 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp @@ -24,4 +24,7 @@ #include <qlayout.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kdebug.h> @@ -44,5 +47,5 @@ AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); mEditorWidget = new AddresseeEditorWidget( core, false, page ); @@ -119,5 +122,5 @@ 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 @@ -23,8 +23,8 @@ #include <qcheckbox.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpushbutton.h> #include <qtabwidget.h> @@ -32,5 +32,9 @@ #ifndef KAB_EMBEDDED -#include <qtextedit.h> +#include <q3textedit.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> #include <kaccelmanager.h> @@ -39,5 +43,5 @@ #else //KAB_EMBEDDED -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif //KAB_EMBEDDED @@ -131,5 +135,5 @@ void AddresseeEditorWidget::textChanged( const QString& ) void AddresseeEditorWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mTabWidget = new QTabWidget( this ); @@ -161,5 +165,5 @@ void AddresseeEditorWidget::setupTab1() maxCol = 3; } - QGridLayout *layout = new QGridLayout( tab1, 7-maxCol, maxCol ); + Q3GridLayout *layout = new Q3GridLayout( tab1, 7-maxCol, maxCol ); layout->setMargin( KDialogBase::marginHintSmall() ); @@ -328,5 +332,5 @@ void AddresseeEditorWidget::setupTab1() */ /////////////////////////////////////// - QHBox *categoryBox = new QHBox( tab1 ,"cato"); + Q3HBox *categoryBox = new Q3HBox( tab1 ,"cato"); categoryBox->setSpacing( KDialogBase::spacingHint() ); categoryBox->setMargin( KDialogBase::marginHintSmall() ); @@ -338,5 +342,5 @@ void AddresseeEditorWidget::setupTab1() mCategoryEdit = new QPushButton ( categoryBox ); mCategoryEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Fixed ,FALSE) ); - mCatPopup = new QPopupMenu ( categoryBox ); + mCatPopup = new Q3PopupMenu ( categoryBox ); mCategoryEdit->setPopup( mCatPopup ); connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); @@ -412,5 +416,5 @@ 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() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); @@ -613,5 +617,5 @@ void AddresseeEditorWidget::setupTab2() QWidget *tab2 = new QWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab2, 8, 3 ); + Q3GridLayout *layout = new Q3GridLayout( tab2, 8, 3 ); layout->setMargin( KDialogBase::marginHintSmall() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); @@ -692,5 +696,5 @@ 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 ); mNicknameEdit = new KLineEdit( nbox ); @@ -736,5 +740,5 @@ void AddresseeEditorWidget::setupTab2() ++iii; if ( QApplication::desktop()->width() == 640 ) { - QHBox * nbox = new QHBox ( tab2 ); + Q3HBox * nbox = new Q3HBox ( tab2 ); label = new QLabel( i18n( "Birthday:" )+" ", nbox ); mBirthdayPicker = new KDateEdit( nbox ); @@ -805,5 +809,5 @@ void AddresseeEditorWidget::setupTab2_1() QWidget *tab2_2 = new QWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab2_2, 1, 2 ); + Q3GridLayout *layout = new Q3GridLayout( tab2_2, 1, 2 ); layout->setMargin( KDialogBase::marginHintSmall() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); @@ -927,10 +931,10 @@ void AddresseeEditorWidget::setupTab2_1() layout->addWidget( label, 0, 0 ); #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() ); #endif //KAB_EMBEDDED @@ -954,5 +958,5 @@ void AddresseeEditorWidget::setupTab3() QWidget *tab3 = new QWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab3, 1, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab3, 1, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); @@ -1006,5 +1010,5 @@ 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() ); layout->setSpacing( KDialogBase::spacingHint() ); @@ -1431,5 +1435,5 @@ 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 @@ -26,5 +26,5 @@ #include <qdatetime.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcombobox.h> @@ -41,7 +41,7 @@ class QTabWidget; #ifndef KAB_EMBEDDED -class QTextEdit; +class Q3TextEdit; #else //KAB_EMBEDDED -class QMultiLineEdit; +class Q3MultiLineEdit; #endif //KAB_EMBEDDED @@ -156,5 +156,5 @@ class AddresseeEditorWidget : public ExtensionWidget KLineEdit *mIMAddressEdit; QPushButton *mCategoryEdit; - QPopupMenu *mCatPopup; + Q3PopupMenu *mCatPopup; SecrecyWidget *mSecrecyWidget; KSqueezedTextLabel *mNameLabel; @@ -173,7 +173,7 @@ class AddresseeEditorWidget : public ExtensionWidget KDateEdit *mAnniversaryPicker; #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 @@ -47,5 +47,5 @@ QString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list 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 @@ -26,8 +26,10 @@ #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlabel.h> #include <qlineedit.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <klocale.h> @@ -36,5 +38,5 @@ #include "addviewdialog.h" -AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, +AddViewDialog::AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), @@ -49,5 +51,5 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 2, 2 ); + Q3GridLayout *layout = new Q3GridLayout( page, 2, 2 ); layout->setSpacing( spacingHint() ); layout->setRowStretch( 1, 1 ); @@ -62,10 +64,10 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, layout->addWidget( mViewNameEdit, 0, 1 ); - 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 ) ) ); layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); // Now create the radio buttons. This needs some layout work. - QDictIterator<ViewFactory> iter( *mViewFactoryDict ); + Q3DictIterator<ViewFactory> iter( *mViewFactoryDict ); for ( iter.toFirst(); iter.current(); ++iter ) { //US i am not quit sure, why I can nopt use (*iter)-> here @@ -114,5 +116,5 @@ 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 @@ -26,9 +26,9 @@ #include <kdialogbase.h> -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> class ViewFactory; -class QButtonGroup; +class Q3ButtonGroup; class QLineEdit; @@ -44,5 +44,5 @@ class AddViewDialog : public KDialogBase public: - AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent, + AddViewDialog( Q3Dict<ViewFactory> *viewFactoryDict, QWidget *parent, const char *name = 0 ); ~AddViewDialog(); @@ -64,7 +64,7 @@ class AddViewDialog : public KDialogBase private: - QDict<ViewFactory> *mViewFactoryDict; + Q3Dict<ViewFactory> *mViewFactoryDict; QLineEdit *mViewNameEdit; - QButtonGroup *mTypeGroup; + Q3ButtonGroup *mTypeGroup; int mTypeId; 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 @@ -23,8 +23,11 @@ #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> #include <kapplication.h> @@ -46,5 +49,5 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) : QWidget( parent, name ), mCurrentLook( 0 ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); //topLayout->setMargin( KDialog::marginHint() ); //topLayout->setSpacing( KDialog::spacingHint() ); @@ -52,5 +55,5 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) topLayout->setSpacing( 0 ); - QBoxLayout *styleLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *styleLayout = new Q3HBoxLayout( topLayout ); QLabel *label = new QLabel( i18n("Style:"), this ); @@ -60,10 +63,10 @@ ViewContainer::ViewContainer( QWidget *parent, const char* name ) styleLayout->addWidget( mStyleCombo ); - QFrame *frameRuler = new QFrame( this ); + Q3Frame *frameRuler = new Q3Frame( this ); //US frameRuler->setFrameShape( QFrame::HLine ); //US frameRuler->setFrameShadow( QFrame::Sunken ); //US topLayout->addWidget( frameRuler ); - mDetailsStack = new QWidgetStack( this ); + mDetailsStack = new Q3WidgetStack( this ); topLayout->addWidget( mDetailsStack, 1 ); @@ -160,5 +163,5 @@ 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 @@ -25,10 +25,10 @@ #define DETAILSVIEWCONTAINER_H -#include <qptrlist.h> +#include <q3ptrlist.h> #include "look_basic.h" class QComboBox; -class QWidgetStack; +class Q3WidgetStack; class ViewContainer : public QWidget @@ -95,8 +95,8 @@ class ViewContainer : public QWidget KABC::Addressee mCurrentAddressee; 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 @@ -27,5 +27,5 @@ KABBasicLook::KABBasicLook( QWidget *parent, const char *name ) - : QVBox( parent, name ), mReadOnly( false ) + : Q3VBox( parent, name ), mReadOnly( false ) { } @@ -71,5 +71,5 @@ 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 @@ -26,5 +26,5 @@ #include <kabc/addressbook.h> -#include <qvbox.h> +#include <q3vbox.h> class KConfig; @@ -42,5 +42,5 @@ class KConfig; calls will not delete the widgets background. */ -class KABBasicLook : public QVBox +class KABBasicLook : public Q3VBox { Q_OBJECT 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 @@ -190,8 +190,8 @@ void KABDetailedView::mouseMoveEvent( QMouseEvent *e ) 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 ); menu.insertItem( i18n( "Select Background" ), menuBG ); @@ -415,5 +415,5 @@ 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 @@ -131,6 +131,6 @@ class KABDetailedView : public KABBasicLook QStringList mTiles; - QPopupMenu *mMenuBorderedBG; - QPopupMenu *mMenuTiledBG; + Q3PopupMenu *mMenuBorderedBG; + Q3PopupMenu *mMenuTiledBG; static const QString mBorderedBGDir; 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 @@ -25,5 +25,5 @@ #include "look_html.h" -#include <qscrollview.h> +#include <q3scrollview.h> #include "kabprefs.h" #include <kabc/addresseeview.h> @@ -52,5 +52,5 @@ 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 @@ -29,5 +29,7 @@ #include <qtoolbutton.h> #include <qtooltip.h> -#include <qlistbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <Q3GridLayout> #ifndef KAB_EMBEDDED @@ -49,5 +51,5 @@ EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QGridLayout *topLayout = new QGridLayout( this, 2, 2 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 2, 2 ); topLayout->setSpacing( KDialog::spacingHint() ); QLabel* label = new QLabel( this ); @@ -56,5 +58,5 @@ 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); topLayout->addWidget( editButton, 0, 1 ); @@ -138,5 +140,5 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, QWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 4, 3 ); QLabel *label = new QLabel( i18n( "Email address:" ), page ); @@ -155,5 +157,5 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, topLayout->addWidget( mAddButton, 0, 2 ); - mEmailListBox = new QListBox( page ); + mEmailListBox = new Q3ListBox( page ); // Make sure there is room for the scrollbar @@ -273,5 +275,5 @@ 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 @@ -30,9 +30,9 @@ #include "addresseeconfig.h" -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; -class QListView; -class QListBox; -class QTextEdit; +class Q3ListView; +class Q3ListBox; +class Q3TextEdit; class QToolButton; @@ -90,5 +90,5 @@ class EmailEditDialog : public KDialogBase private: KLineEdit *mEmailEdit; - QListBox *mEmailListBox; + Q3ListBox *mEmailListBox; QPushButton *mAddButton; QPushButton *mRemoveButton; diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 46defa1..5356224 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -23,4 +23,6 @@ #include <qlayout.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3HBoxLayout> #include <kactionclasses.h> #include <kconfig.h> @@ -43,5 +45,5 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, const char *name ) - : QScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) + : Q3ScrollView( parent, name ), mCore( core ), mCurrentExtensionWidget( 0 ) { #ifdef KAB_EMBEDDED @@ -59,5 +61,5 @@ ExtensionManager::ExtensionManager( KABCore *core, QWidget *parent, SLOT( setActiveExtension( int ) ) ); mWidgetBox = new QWidget( viewport() ); - new QHBoxLayout (mWidgetBox ); + new Q3HBoxLayout (mWidgetBox ); addChild( mWidgetBox ); setResizePolicy(AutoOneFit); @@ -149,5 +151,5 @@ void ExtensionManager::createExtensionWidgets() // clear extension widget list mExtensionWidgetList.setAutoDelete( true ); - QPtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); + Q3PtrListIterator<ExtensionWidget> wdgIt( mExtensionWidgetList ); ExtensionWidget *wdg = 0; while ( ( wdg = wdgIt.current() ) != 0 ) @@ -160,5 +162,5 @@ void ExtensionManager::createExtensionWidgets() // add addressee editor as default - QHBoxLayout *hbl = (QHBoxLayout *) mWidgetBox->layout();; + Q3HBoxLayout *hbl = (Q3HBoxLayout *) mWidgetBox->layout();; wdg = new AddresseeEditorWidget( mCore, true, mWidgetBox ); @@ -245,5 +247,5 @@ 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 @@ -25,7 +25,7 @@ #define EXTENSIONMANAGER_H -#include <qhbox.h> -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3hbox.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> #include <extensionwidget.h> @@ -35,5 +35,5 @@ class KSelectAction; -class ExtensionManager : public QScrollView +class ExtensionManager : public Q3ScrollView { Q_OBJECT @@ -81,5 +81,5 @@ class ExtensionManager : public QScrollView ExtensionWidget *mCurrentExtensionWidget; - QPtrList<ExtensionWidget> mExtensionWidgetList; + Q3PtrList<ExtensionWidget> mExtensionWidgetList; KSelectAction *mActionExtensions; diff --git a/kaddressbook/extensionwidget.cpp b/kaddressbook/extensionwidget.cpp index 69f4aa8..7c3b415 100644 --- a/kaddressbook/extensionwidget.cpp +++ b/kaddressbook/extensionwidget.cpp @@ -79,6 +79,5 @@ 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 @@ -87,7 +87,7 @@ 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 class ExtensionFactory 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 @@ -22,11 +22,18 @@ */ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcombobox.h> #include <qlabel.h> #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> #ifndef KAB_EMBEDDED @@ -78,10 +85,10 @@ extern "C" { #endif //KAB_EMBEDDED -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { public: ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, const QString &email = QString::null ) : - QListViewItem( parent ), + Q3ListViewItem( parent ), mAddressee( addressee ), mEmail( email ) @@ -122,5 +129,5 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, : ExtensionWidget( core, parent, name ), mManager( 0 ) { - QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() ); @@ -167,6 +174,6 @@ DistributionListWidget::DistributionListWidget( KABCore *core, QWidget *parent, connect( mContactView, SIGNAL( selectionChanged() ), SLOT( selectionContactViewChanged() ) ); - connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), - SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); + connect( mContactView, SIGNAL( dropped( QDropEvent*, Q3ListViewItem* ) ), + SLOT( dropped( QDropEvent*, Q3ListViewItem* ) ) ); mAddContactButton->setEnabled( false ); @@ -411,5 +418,5 @@ QString DistributionListWidget::identifier() const } -void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) +void DistributionListWidget::dropped( QDropEvent *e, Q3ListViewItem* ) { dropEvent( e ); @@ -433,5 +440,5 @@ void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) { #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); #endif //KAB_EMBEDDED @@ -441,5 +448,5 @@ void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) { #ifndef KAB_EMBEDDED - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = Q3TextDrag::canDecode( e ); e->accept( canDecode ); #endif //KAB_EMBEDDED @@ -462,8 +469,8 @@ EmailSelector::EmailSelector( const QStringList &emails, parent ) { - 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 ); topLayout->addWidget( mButtonGroup ); @@ -480,5 +487,5 @@ EmailSelector::EmailSelector( const QStringList &emails, QString EmailSelector::selected() { - QButton *button = mButtonGroup->selected(); + QAbstractButton *button = mButtonGroup->selected(); if ( button ) return button->text(); @@ -497,5 +504,5 @@ 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 @@ -29,9 +29,14 @@ #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; class DistributionListView; @@ -58,5 +63,5 @@ class DistributionListWidget : public ExtensionWidget public slots: void save(); - void dropped( QDropEvent*, QListViewItem* ); + void dropped( QDropEvent*, Q3ListViewItem* ); private slots: @@ -121,5 +126,5 @@ 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 @@ -24,4 +24,6 @@ #include <qlayout.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> #ifndef KAB_EMBEDDED @@ -64,9 +66,9 @@ extern "C" { #endif //KAB_EMBEDDED -class ContactItem : public QListViewItem +class ContactItem : public Q3ListViewItem { public: ContactItem( KListView *parent, const KABC::Addressee &addressee ) - : QListViewItem( parent ), mAddressee( addressee ) + : Q3ListViewItem( parent ), mAddressee( addressee ) { KABC::Field::List fieldList = KABC::Field::defaultFields(); @@ -95,5 +97,5 @@ MergeWidget::MergeWidget( KABCore *core, QWidget *parent, const char *name ) #endif //KAB_EMBEDDED - QGridLayout *topLayout = new QGridLayout( this, 3, 2, KDialog::marginHint(), + Q3GridLayout *topLayout = new Q3GridLayout( this, 3, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -215,5 +217,5 @@ void MergeWidget::mergeAndRemove() mBlockUpdate = true; - core()->deleteContacts( oldUID ); + core()->deleteContacts( QStringList(oldUID) ); core()->setContactSelected( mMasterAddressee.uid() ); mBlockUpdate = false; @@ -370,5 +372,5 @@ 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 @@ -30,5 +30,5 @@ #include "extensionwidget.h" -class QListView; +class Q3ListView; class KABCore; diff --git a/kaddressbook/filter.cpp b/kaddressbook/filter.cpp index 12ab1e3..6462310 100644 --- a/kaddressbook/filter.cpp +++ b/kaddressbook/filter.cpp @@ -219,5 +219,5 @@ Filter::List Filter::restore( KConfig *config, QString baseGroup ) filter.mName = *it; filter.mEnabled = true; - filter.mCategoryList = *it; + filter.mCategoryList = QStringList(*it); filter.mMatchRule = Matching; filter.mInternal = true; diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h index f4ae123..508436d 100644 --- a/kaddressbook/filter.h +++ b/kaddressbook/filter.h @@ -27,5 +27,5 @@ #include <qstring.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include <kabc/addressee.h> @@ -43,5 +43,5 @@ class Filter void setCriteria(int c) { mCriteria = c ;} int criteria() const { return mCriteria;} - typedef QValueList<Filter> List; + typedef Q3ValueList<Filter> List; enum MatchRule { Matching = 0, NotMatching = 1 }; diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index ef9b979..40698a7 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -29,6 +29,6 @@ $Id$ */ -#include <qbuttongroup.h> -#include <qhbox.h> +#include <q3buttongroup.h> +#include <q3hbox.h> #include <qlabel.h> #include <qlayout.h> @@ -41,4 +41,6 @@ $Id$ #include <qtooltip.h> #include <qwidget.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kapplication.h> @@ -65,5 +67,5 @@ FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name ) QStringList::Iterator iter; 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() ); } @@ -78,8 +80,8 @@ 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 ); } @@ -106,7 +108,7 @@ 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() ) categories.append( item->text( 0 ) ); @@ -142,5 +144,5 @@ void FilterEditDialog::initGUI() QLabel *label; - QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 3, 2, 0, spacingHint() ); label = new QLabel( i18n( "Name" ), page ); @@ -156,5 +158,5 @@ void FilterEditDialog::initGUI() topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); - mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); + mMatchRuleGroup = new Q3HButtonGroup( i18n( "Category rule" ), page ); mMatchRuleGroup->setExclusive( true ); QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); @@ -165,5 +167,5 @@ void FilterEditDialog::initGUI() topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); - 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 ); mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); @@ -273,5 +275,5 @@ void FilterDialog::refresh() } -void FilterDialog::selectionChanged( QListBoxItem *item ) +void FilterDialog::selectionChanged( Q3ListBoxItem *item ) { bool state = ( item != 0 ); @@ -291,14 +293,14 @@ void FilterDialog::initGUI() QWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 2, 0, spacingHint() ); mFilterListBox = new KListBox( page ); 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() ) ); mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) ); @@ -311,5 +313,5 @@ 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 @@ -32,9 +32,9 @@ $Id$ #define FILTEREDITDIALOG_H -class QButtonGroup; +#include <Q3HButtonGroup> class QString; class QToolButton; class QWidget; -class QListBoxItem; +class Q3ListBoxItem; class QCheckBox; @@ -44,5 +44,4 @@ class KListView; #include <kdialogbase.h> -#include <qhbuttongroup.h> #include "filter.h" @@ -63,5 +62,5 @@ class FilterDialog : public KDialogBase void edit(); void remove(); - void selectionChanged( QListBoxItem* ); + void selectionChanged( Q3ListBoxItem* ); private: @@ -99,5 +98,5 @@ class FilterEditDialog : public KDialogBase KLineEdit *mNameEdit; KListView *mCategoriesView; - QHButtonGroup *mMatchRuleGroup; + Q3HButtonGroup *mMatchRuleGroup; QCheckBox *mPrivate; QCheckBox *mPublic; diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 13cd084..caff3b2 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -28,8 +28,15 @@ #else //KAB_EMBEDDED -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <QPaintEvent> +#include <Q3GridLayout> +#include <Q3Frame> +#include <QMouseEvent> #include <kglobal.h> #endif //KAB_EMBEDDED +#include <QDesktopWidget> + #include <knuminput.h> #include <kcombobox.h> @@ -42,8 +49,8 @@ #include <qfile.h> #include <qapplication.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qpainter.h> #include <qpixmap.h> @@ -60,5 +67,5 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) QLabel *label = 0; - QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 4, 3 ); topLayout->setMargin( KDialog::marginHint() ); topLayout->setSpacing( KDialog::spacingHint() ); @@ -70,5 +77,5 @@ GeoWidget::GeoWidget( QWidget *parent, const char *name ) label->setAlignment( Qt::AlignTop ); topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); @@ -168,7 +175,7 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) mUpdateSexagesimalInput( true ) { - QFrame *page = plainPage(); + Q3Frame *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 1, marginHintSmall(), + Q3GridLayout *topLayout = new Q3GridLayout( page, 1, 1, marginHintSmall(), spacingHint() ); //topLayout->setRowStretch( 1, 1 ); @@ -176,6 +183,6 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) mMapWidget = new GeoMapWidget( page ); 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() ); QLabel *label; @@ -430,6 +437,6 @@ void GeoDialog::loadCityList() QFile file( fileName); - if ( file.open( IO_ReadOnly ) ) { - QTextStream s( &file ); + if ( file.open( QIODevice::ReadOnly ) ) { + Q3TextStream s( &file ); QString line, country; @@ -553,5 +560,5 @@ GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) { - setBackgroundMode( NoBackground ); + setBackgroundMode( Qt::NoBackground ); setFixedSize( 240, 120 ); @@ -625,5 +632,5 @@ 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 @@ -28,4 +28,8 @@ #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 @@ -38,5 +38,5 @@ #include <qcheckbox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> @@ -44,4 +44,8 @@ #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> #include "imagewidget.h" @@ -50,9 +54,9 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) : QWidget( parent, 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() ); boxLayout->setRowStretch( 2, 1 ); @@ -64,5 +68,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mPhotoLabel->setFixedSize( 50*9/fac, 70*9/fac ); mPhotoLabel->setScaledContents( true ); - mPhotoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mPhotoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); boxLayout->addMultiCellWidget( mPhotoLabel, 0, 3, 0, 0 ); @@ -76,5 +80,5 @@ 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 ); mUsePhotoUrl->setEnabled( false ); @@ -87,6 +91,6 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) topLayout->addWidget( photoBox, 0, 0 ); - 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 ); @@ -94,5 +98,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) mLogoLabel->setFixedSize( 50*9/fac, 70*9/fac ); mLogoLabel->setScaledContents( true ); - mLogoLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mLogoLabel->setFrameStyle( Q3Frame::Panel | Q3Frame::Sunken ); boxLayout->addMultiCellWidget( mLogoLabel, 0, 3, 0, 0 ); @@ -105,5 +109,5 @@ ImageWidget::ImageWidget( QWidget *parent, const char *name ) boxLayout->addWidget( mLogoUrl, 0, 1 ); - QHBox *hb2 = new QHBox ( logoBox ); + Q3HBox *hb2 = new Q3HBox ( logoBox ); mUseLogoUrl = new QCheckBox( i18n( "Store as URL" ), hb2 ); mUseLogoUrl->setEnabled( false ); @@ -181,5 +185,5 @@ KABC::Picture ImageWidget::photo() const photo.setUrl( mPhotoUrl->url() ); else { - QPixmap *px = mPhotoLabel->pixmap(); + const QPixmap *px = mPhotoLabel->pixmap(); if ( px ) { #ifndef KAB_EMBEDDED @@ -233,5 +237,5 @@ KABC::Picture ImageWidget::logo() const logo.setUrl( mLogoUrl->url() ); else { - QPixmap *px = mLogoLabel->pixmap(); + const QPixmap *px = mLogoLabel->pixmap(); if ( px ) { #ifndef KAB_EMBEDDED @@ -293,5 +297,5 @@ 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 @@ -26,4 +26,7 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QPixmap> +#include <QLabel> #include <kabc/picture.h> diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index 5f8b83d..a54d1cd 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -26,5 +26,8 @@ #include <qtooltip.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qcombobox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> #include <kdialog.h> @@ -38,15 +41,16 @@ IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) { + setObjectName(name); + setParent(parent); #ifndef KAB_EMBEDDED //US setCaption( i18n( "Incremental Search" ) ); #endif //KAB_EMBEDDED - QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); + Q3HBoxLayout *layout = new Q3HBoxLayout( this, 2, KDialog::spacingHint() ); #ifdef DESKTOP_VERSION QLabel *label = new QLabel( i18n( "Search:" ), this ); - label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); + label->setAlignment( Qt::AlignVCenter | Qt::AlignRight ); layout->addWidget( label ); #endif //KAB_EMBEDDED @@ -177,5 +181,5 @@ int IncSearchWidget::currentItem() const return mFieldCombo->currentItem(); } -#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 @@ -26,6 +26,9 @@ #include <qpushbutton.h> #include <qstring.h> -#include <qtl.h> +#include <q3tl.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3GridLayout> #include <kabc/addressbook.h> @@ -74,7 +77,7 @@ JumpButtonBar::JumpButtonBar( KABCore *core, QWidget *parent, const char *name ) if ( QApplication::desktop()->width() < 480 ) - 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 ); @@ -253,5 +256,5 @@ 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 @@ -27,9 +27,12 @@ #include <qsizepolicy.h> #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; class QPushButton; @@ -77,7 +80,7 @@ class JumpButtonBar : public QWidget KABCore *mCore; - 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 @@ -40,5 +40,15 @@ $Id$ #include <qcheckbox.h> #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> @@ -48,8 +58,8 @@ $Id$ #include <qfile.h> #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> #include <kabc/errorhandler.h> @@ -89,5 +99,5 @@ $Id$ #include <addresseeview.h> -#include <qapp.h> +#include <qapplication.h> #include <qmenubar.h> //#include <qtoolbar.h> @@ -130,10 +140,10 @@ $Id$ #include <qdir.h> #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> #include <libkdepim/categoryselectdialog.h> @@ -176,10 +186,10 @@ class KABCatPrefs : public QDialog { setCaption( i18n("Manage new Categories") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\naddressees\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 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 ); format->setExclusive ( true ) ; @@ -208,10 +218,10 @@ class KABFormatPrefs : public QDialog { setCaption( i18n("Set formatted name") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("You can set the formatted name\nfor a list of contacts in one go."), this ); 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 ); format->setExclusive ( true ) ; @@ -246,20 +256,20 @@ class KAex2phonePrefs : public QDialog { setCaption( i18n("Export to phone options") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel *lab; 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 ); mPhoneDevice = new QLineEdit( temphb); lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Connection: "), temphb ); mPhoneConnection = new QLineEdit( temphb); lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Model(opt.): "), temphb ); mPhoneModel = new QLineEdit( temphb); @@ -268,5 +278,5 @@ class KAex2phonePrefs : public QDialog // lay->addWidget( mWriteToSim ); 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 ); lay->addWidget( ok ); @@ -408,5 +418,5 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); } -void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) +void KABCore::receiveStart( const Q3CString& cmsg, const QByteArray& data ) { //qDebug("KO: QCOP start message received: %s ", cmsg.data() ); @@ -422,7 +432,7 @@ 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() ) ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); @@ -454,9 +464,9 @@ KABCore::~KABCore() #endif } -void KABCore::receive( const QCString& cmsg, const QByteArray& data ) +void KABCore::receive( const Q3CString& cmsg, const QByteArray& data ) { //qDebug("KA: QCOP message received: %s ", cmsg.data() ); if ( cmsg == "setDocument(QString)" ) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); QString fileName; stream >> fileName; @@ -481,5 +491,5 @@ 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 } @@ -561,5 +571,5 @@ void KABCore::restoreSettings() wid = QApplication::desktop()->height(); #endif - QValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; + Q3ValueList<int> splitterSize;// = KABPrefs::instance()->mDetailsSplitter; if ( true /*splitterSize.count() == 0*/ ) { splitterSize.append( wid / 2 ); @@ -651,8 +661,8 @@ QStringList KABCore::selectedUIDs() const 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; while ( ( resource = resIt.current() ) != 0 ) { @@ -796,5 +806,5 @@ void KABCore::mailVCard( const QStringList& uids ) QFile outFile(fileName); - if ( outFile.open(IO_WriteOnly) ) { // file opened successfully + if ( outFile.open(QIODevice::WriteOnly) ) { // file opened successfully KABC::VCardConverter converter; QString vcard; @@ -802,6 +812,6 @@ void KABCore::mailVCard( const QStringList& uids ) converter.addresseeToVCard( a, vcard ); - QTextStream t( &outFile ); // use a text stream - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); // use a text stream + t.setEncoding( Q3TextStream::UnicodeUTF8 ); t << vcard; @@ -1017,9 +1027,9 @@ void KABCore::beamVCard(const QStringList& uids) #ifndef DESKTOP_VERSION 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(); outFile.close(); @@ -1298,8 +1308,8 @@ 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; while ( ( resource = it.current() ) != 0 ) { @@ -1857,5 +1867,5 @@ void KABCore::initGUI() { #ifndef KAB_EMBEDDED - QHBoxLayout *topLayout = new QHBoxLayout( this ); + Q3HBoxLayout *topLayout = new Q3HBoxLayout( this ); topLayout->setSpacing( KDialogBase::spacingHint() ); @@ -1865,5 +1875,5 @@ void KABCore::initGUI() mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); - QVBox *viewSpace = new QVBox( mDetailsSplitter ); + Q3VBox *viewSpace = new Q3VBox( mDetailsSplitter ); mIncSearchWidget = new IncSearchWidget( viewSpace ); connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), @@ -1889,17 +1899,17 @@ void KABCore::initGUI() //US initialize viewMenu before settingup viewmanager. // 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 ); //US since we have no splitter for the embedded system, setup // a layout with two frames. One left and one right. - QBoxLayout *topLayout; + Q3BoxLayout *topLayout; // = new QHBoxLayout( this ); @@ -1910,5 +1920,5 @@ void KABCore::initGUI() #ifdef DESKTOP_VERSION - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); @@ -1925,10 +1935,10 @@ void KABCore::initGUI() #else if ( QApplication::desktop()->width() > 480 ) { - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); } else { - topLayout = new QHBoxLayout( this ); + topLayout = new Q3HBoxLayout( this ); mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); @@ -2035,5 +2045,5 @@ void KABCore::initActions() mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); //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" ); @@ -2042,8 +2052,8 @@ void KABCore::initActions() SLOT( printView() ), actionCollection(), "kaddressbook_print2" ); - 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" ); @@ -2084,20 +2094,20 @@ void KABCore::initActions() // edit menu 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(), "kaddressbook_redo" ); @@ -2112,5 +2122,5 @@ void KABCore::initActions() mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", - Key_Delete, this, SLOT( deleteContacts() ), + Qt::Key_Delete, this, SLOT( deleteContacts() ), actionCollection(), "edit_delete" ); @@ -2247,7 +2257,7 @@ 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 ); KToolBar* tb = mMainWindow->toolBar(); @@ -2277,5 +2287,5 @@ void KABCore::addActionsManually() //US setup toolbar QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); - QPopupMenu *popupBarTB = new QPopupMenu( this ); + Q3PopupMenu *popupBarTB = new Q3PopupMenu( this ); menuBarTB->insertItem( SmallIcon( "z_menu" ) , popupBarTB); tb->insertWidget(-1, 0, menuBarTB); @@ -2632,5 +2642,5 @@ void KABCore::configureKeyBindings() void KABCore::configureResources() { - KRES::KCMKResources dlg( this, "" , 0 ); + KRES::KCMKResources dlg( this, "" , QStringList() ); if ( !dlg.exec() ) @@ -2728,5 +2738,5 @@ void KABCore::requestForBirthdayList(const QString& sourceChannel, const QString ++count; } - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; if ( QApplication::desktop()->width() < 320 ) @@ -2909,5 +2919,5 @@ KABC::Addressee KABCore::getLastSyncAddressee() lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); lse.setRevision( mLastAddressbookSync ); - lse.setCategories( i18n("SyncEvent") ); + lse.setCategories( QStringList(i18n("SyncEvent")) ); mAddressBook->insertAddressee( lse ); } @@ -3100,5 +3110,5 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo addresseeRSync.setUid("last-syncAddressee-"+mCurrentSyncName ); 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 @@ -29,9 +29,13 @@ #ifndef KAB_EMBEDDED #endif //KAB_EMBEDDED -#include <qdict.h> +#include <q3dict.h> #include <qtimer.h> #include <qwidget.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3CString> +#include <QPixmap> +#include <QResizeEvent> #include <ksyncmanager.h> #ifndef DESKTOP_VERSION @@ -86,7 +90,7 @@ class KABCore : public QWidget, public KSyncInterface #ifdef KAB_EMBEDDED //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(); #endif //KAB_EMBEDDED @@ -136,6 +140,6 @@ 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 @@ -367,6 +371,6 @@ class KABCore : public QWidget, public KSyncInterface void updateToolBar(); 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( ); void disableBR(bool); @@ -395,5 +399,5 @@ class KABCore : public QWidget, public KSyncInterface private: - QCString mCStringMess; + Q3CString mCStringMess; QByteArray mByteData; QString mEmailSourceChannel; @@ -487,12 +491,12 @@ class KABCore : public QWidget, public KSyncInterface KAction *mActionDeleteView; - 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 KAction *mActionRemoveVoice; @@ -525,5 +529,5 @@ class KABCore : public QWidget, public KSyncInterface // sync stuff! QString sentSyncFile(); - QPopupMenu *syncMenu; + Q3PopupMenu *syncMenu; KSyncManager* syncManager; int mGlobalSyncMode; diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 42d541b..6f9c995 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp @@ -26,5 +26,5 @@ //#endif //KAB_EMBEDDED -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> #include <qregexp.h> @@ -92,5 +92,5 @@ KABPrefs::KABPrefs() QString defaultView = i18n( "Default Table View" ); addItemString( "CurrentView", &mCurrentView, defaultView ); - addItemStringList( "ViewNames", &mViewNames, defaultView ); + addItemStringList( "ViewNames", &mViewNames, QStringList(defaultView) ); KPrefs::setCurrentGroup( "Filters" ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index ddbc0c0..aff725e 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -26,5 +26,7 @@ #include <qstringlist.h> -#include <qdict.h> +#include <q3dict.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libkdepim/kpimprefs.h> @@ -74,6 +76,6 @@ class KABPrefs : public KPimPrefs bool mHideSearchOnSwitch; bool mAskForDelete; - QValueList<int> mExtensionsSplitter; - QValueList<int> mDetailsSplitter; + Q3ValueList<int> mExtensionsSplitter; + Q3ValueList<int> mDetailsSplitter; // Extensions stuff diff --git a/kaddressbook/kaddressbook.pro b/kaddressbook/kaddressbook.pro index cd38e5f..4eb1f7f 100644 --- a/kaddressbook/kaddressbook.pro +++ b/kaddressbook/kaddressbook.pro @@ -14,26 +14,26 @@ unix : { 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 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 } @@ -44,8 +44,8 @@ win32: { 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 OBJECTS_DIR = obj/win @@ -205,2 +205,4 @@ xxport/sharpdtm_xxport.cpp \ # timespanview.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 @@ -13,8 +13,8 @@ DEFINES += KAB_EMBEDDED KAB_NOSPLITTER #DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER #DEFINES += KORG_NOLVALTERNATION -LIBS += -lmicrokdepim -LIBS += -lmicrokde +LIBS += -lxmicrokdepim +LIBS += -lxmicrokde LIBS += -lmicroqtcompat -LIBS += -lmicrokabc +LIBS += -lxmicrokabc LIBS += -lqpe LIBS += -ljpeg diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index c417226..b317974 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -26,6 +26,9 @@ #include <kglobal.h> #include <qmessagebox.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <QCloseEvent> #else //KAB_EMBEDDED #include <kedittoolbar.h> @@ -43,7 +46,7 @@ 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 { @@ -52,7 +55,7 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW //US for embedded systems, create the toolbar before we initiate KABCore. // 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 ); iconToolBar->setHorizontalStretchable(true); @@ -86,5 +89,5 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW mCore->restoreSettings(); #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 } @@ -236,6 +239,5 @@ 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 @@ -25,8 +25,10 @@ #define KADDRESSBOOKMAIN_H -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QCloseEvent> #ifdef KAB_EMBEDDED -class QToolBar; +class Q3ToolBar; #include <qaction.h> //#include <qmainwindow.h> @@ -53,7 +55,7 @@ class KConfig; 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 { @@ -74,7 +76,7 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface virtual void addEmail( QString addr ); #ifndef KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN virtual ASYNC showContactEditor( QString uid ); -//MOC_SKIP_END +#endif #endif //KAB_EMBEDDED virtual void newContact(); diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp index 86898e2..4823b37 100644 --- a/kaddressbook/kaddressbookview.cpp +++ b/kaddressbook/kaddressbookview.cpp @@ -33,4 +33,6 @@ #endif //KAB_EMBEDDED #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kabc/distributionlistdialog.h> @@ -134,5 +136,5 @@ void KAddressBookView::initGUI() { // Create the layout - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); // Add the view widget @@ -184,5 +186,5 @@ 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,2 +1,4 @@ +//Added by qt3to4: +#include <QDropEvent> /* This file is part of KAddressBook. @@ -41,5 +43,5 @@ class QDropEvent; #ifdef DESKTOP_VERSION -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qprinter.h> #include <qpainter.h> @@ -176,7 +178,7 @@ 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 //US my moc can not handle the default parameters. Is this a problem ??? @@ -263,7 +265,7 @@ 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 class ViewFactory 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 @@ -22,10 +22,14 @@ */ -#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> #include <kbuttonbox.h> @@ -46,5 +50,5 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, if (KGlobal::getOrientation() == KGlobal::Portrait) { - QGridLayout* layout = new QGridLayout( this, 1, 1, KDialog::marginHintSmall(), + Q3GridLayout* layout = new Q3GridLayout( this, 1, 1, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -52,5 +56,5 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, layout->addWidget( label, 0, 1 ); - mBox = new QListBox( this ); + mBox = new Q3ListBox( this ); mBox->setMaximumSize(70, 70); layout->addMultiCellWidget( mBox, 0, 1, 0, 0 ); @@ -71,11 +75,11 @@ NamePartWidget::NamePartWidget( const QString &title, QWidget *parent, else { - 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 ); groupLayout->addWidget( mBox, 0, 0 ); @@ -98,6 +102,6 @@ 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& ) ), SLOT( textChanged( const QString& ) ) ); @@ -144,5 +148,5 @@ void NamePartWidget::remove() } -void NamePartWidget::selectionChanged( QListBoxItem *item ) +void NamePartWidget::selectionChanged( Q3ListBoxItem *item ) { mRemoveButton->setEnabled( item != 0 ); @@ -158,5 +162,5 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QGridLayout *layout; + Q3GridLayout *layout; mPrefix = new NamePartWidget( i18n( "Prefixes" ), this ); @@ -179,5 +183,5 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) if (KGlobal::getOrientation() == KGlobal::Portrait) { - layout = new QGridLayout( this, 4, 2, KDialog::marginHintSmall(), + layout = new Q3GridLayout( this, 4, 2, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -191,5 +195,5 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) else { - layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + layout = new Q3GridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); @@ -234,5 +238,5 @@ 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 @@ -30,6 +30,6 @@ class KComboBox; class KLineEdit; -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QPushButton; @@ -53,5 +53,5 @@ class NamePartWidget : public QWidget void remove(); - void selectionChanged( QListBoxItem* ); + void selectionChanged( Q3ListBoxItem* ); void textChanged( const QString& ); @@ -59,5 +59,5 @@ class NamePartWidget : public QWidget KLineEdit *mEdit; - QListBox *mBox; + Q3ListBox *mBox; QPushButton *mAddButton; QPushButton *mRemoveButton; 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 @@ -23,4 +23,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> #include <klocale.h> @@ -35,6 +38,6 @@ ExtensionConfigDialog::ExtensionConfigDialog( ExtensionFactory *factory, KConfig name, true, true ), mWidget( 0 ), mConfig( config ) { - QFrame *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() ); + Q3Frame *page = plainPage(); + Q3GridLayout *layout = new Q3GridLayout( page, 1, 1, marginHint(), spacingHint() ); mWidget = factory->configureWidget( page, "ExtensionConfigWidget" ); @@ -55,5 +58,5 @@ 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 @@ -23,6 +23,6 @@ #include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> +#include <q3frame.h> +#include <q3groupbox.h> #include <qlayout.h> #include <qpushbutton.h> @@ -32,5 +32,9 @@ #include <qlabel.h> #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> #include <kconfig.h> @@ -58,13 +62,13 @@ #include <kglobalsettings.h> -class ExtensionItem : public QCheckListItem +class ExtensionItem : public Q3CheckListItem { public: #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 ); #endif //KAB_EMBEDDED @@ -91,5 +95,5 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * { - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHintSmall() ); @@ -99,10 +103,10 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * // General page QWidget *generalPage = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), + Q3VBoxLayout *layout = new Q3VBoxLayout( generalPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); QWidget *hBox = new QWidget( generalPage, "qhbox" ); - QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); + Q3HBoxLayout *hboxLayout = new Q3HBoxLayout( hBox); KPrefsWidFont *detailsFont = addWidFont(i18n("phone:123"),i18n("Details view font"), @@ -118,5 +122,5 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * //general groupbox QWidget *vBox = new QWidget( generalPage, "qvbox" ); - QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); + Q3VBoxLayout *boxLayout = new Q3VBoxLayout( vBox ); boxLayout->setAlignment( Qt::AlignTop ); boxLayout->setMargin(KDialog::marginHintSmall() ); @@ -155,11 +159,11 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * // Extension page QWidget *extensionPage = new QWidget( this ); - QVBoxLayout *extensionLayout = new QVBoxLayout( extensionPage, KDialog::marginHintSmall(), + Q3VBoxLayout *extensionLayout = new Q3VBoxLayout( extensionPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); //extensions groupbox - 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 ); boxLayout->setMargin(KDialog::marginHintSmall()); @@ -190,8 +194,8 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 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() ), SLOT( configureExtension() ) ); @@ -296,6 +300,6 @@ void KABConfigWidget::saveExtensionSettings() QStringList activeExtensions; - QPtrList<QListViewItem> list; - QListViewItemIterator it( mExtensionView ); + Q3PtrList<Q3ListViewItem> list; + Q3ListViewItemIterator it( mExtensionView ); while ( it.current() ) { ExtensionItem *item = static_cast<ExtensionItem*>( it.current() ); @@ -329,5 +333,5 @@ void KABConfigWidget::configureExtension() } -void KABConfigWidget::selectionChanged( QListViewItem *i ) +void KABConfigWidget::selectionChanged( Q3ListViewItem *i ) { ExtensionItem *item = static_cast<ExtensionItem*>( i ); @@ -338,5 +342,5 @@ void KABConfigWidget::selectionChanged( QListViewItem *i ) } -void KABConfigWidget::itemClicked( QListViewItem *item ) +void KABConfigWidget::itemClicked( Q3ListViewItem *item ) { if ( item != 0 ) @@ -345,6 +349,6 @@ 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 ) { } @@ -355,6 +359,6 @@ 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 ) { mName = name; @@ -419,6 +423,5 @@ 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 @@ -28,5 +28,5 @@ class QCheckBox; -class QListViewItem; +class Q3ListViewItem; class QPushButton; class QComboBox; @@ -54,6 +54,6 @@ class KABConfigWidget : public KPrefsWidget private slots: void configureExtension(); - void selectionChanged( QListViewItem* ); - void itemClicked( QListViewItem* ); + void selectionChanged( Q3ListViewItem* ); + void itemClicked( Q3ListViewItem* ); private: 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 @@ -23,4 +23,6 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #ifndef KAB_EMBEDDED @@ -49,5 +51,5 @@ 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" ); layout->addWidget( mConfigWidget ); @@ -88,5 +90,5 @@ const KAboutData* KCMKabConfig::aboutData() const #endif //KAB_EMBEDDED -#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 @@ -29,4 +29,6 @@ #include <qlayout.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3GridLayout> #ifndef KAB_EMBEDDED @@ -37,5 +39,5 @@ #include <qmap.h> #include <qmessagebox.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kurl.h> #endif //KAB_EMBEDDED @@ -53,5 +55,5 @@ KeyWidget::KeyWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QGridLayout *layout = new QGridLayout( this, 2, 2, KDialog::marginHint(), + Q3GridLayout *layout = new Q3GridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() ); @@ -137,5 +139,5 @@ void KeyWidget::addKey() if ( KIO::NetAccess::download( url, tmpFile ) ) { 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>" ) ); KMessageBox::error( this, text.arg( url.url() ) ); @@ -153,5 +155,5 @@ 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>" ) ); QString caption( i18n( "Error" ) ); @@ -164,8 +166,8 @@ void KeyWidget::addKey() - QTextStream s( &file ); + Q3TextStream s( &file ); QString data; - s.setEncoding( QTextStream::UnicodeUTF8 ); + s.setEncoding( Q3TextStream::UnicodeUTF8 ); s >> data; file.close(); @@ -222,6 +224,6 @@ void KeyWidget::exportKey() KTempFile tempFile; - QTextStream *s = tempFile.textStream(); - s->setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream *s = tempFile.textStream(); + s->setEncoding( Q3TextStream::UnicodeUTF8 ); (*s) << key.textData(); tempFile.close(); @@ -236,5 +238,5 @@ 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>" ) ); QString caption( i18n( "Error" ) ); @@ -243,6 +245,6 @@ void KeyWidget::exportKey() } - QTextStream s( &file ); - s.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream s( &file ); + s.setEncoding( Q3TextStream::UnicodeUTF8 ); s << key.textData(); file.close(); @@ -273,5 +275,5 @@ 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 @@ -6,6 +6,5 @@ #include <qapplication.h> #include <qwindowsstyle.h> -#include <qplatinumstyle.h> -#include <qmainwindow.h> +#include <q3mainwindow.h> #include <qmessagebox.h> #include <stdlib.h> @@ -25,4 +24,5 @@ void dumpMissing(); int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); @@ -30,5 +30,4 @@ int main( int argc, char **argv ) #else QApplication a( argc, argv ); - QApplication::setStyle( new QPlatinumStyle ()); #ifdef _WIN32_ QString hdir ( getenv( "HOME") ); diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index 199f3d6..96822d8 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -24,10 +24,12 @@ #include <qlayout.h> #include <qlabel.h> -#include <qlistbox.h> -#include <qlistview.h> +#include <q3listbox.h> +#include <q3listview.h> #include <qtooltip.h> #include <qpushbutton.h> #include <qcheckbox.h> #include <qstring.h> +//Added by qt3to4: +#include <Q3GridLayout> #ifndef KAB_EMBEDDED @@ -58,5 +60,5 @@ 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() ); layout->addColSpacing( 2, 100 ); @@ -296,5 +298,5 @@ 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 @@ -317,11 +317,11 @@ void MainWindow::initActions() KABPrefs *p = KABPrefs::instance(); 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 ); menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index df3b551..3661677 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -28,11 +28,17 @@ #include <qcheckbox.h> #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> #include <qtimer.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> #include <kbuttonbox.h> @@ -58,5 +64,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) : QWidget(parent,name) { - QGridLayout* gridLayout = new QGridLayout ( this, 2,2 ); + Q3GridLayout* gridLayout = new Q3GridLayout ( this, 2,2 ); QLabel *temp = new QLabel( "", this ); @@ -68,12 +74,12 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) connect(addBut,SIGNAL(clicked ()),SLOT(addNumber())); - sv = new QScrollView( this ); - sv->setFrameStyle ( QFrame::Plain ); + sv = new Q3ScrollView( this ); + sv->setFrameStyle ( Q3Frame::Plain ); sv->setLineWidth ( 0 ); sv->setMidLineWidth ( 0 ); mw = new QWidget ( sv->viewport() ); sv->addChild(mw); - sv->setResizePolicy( QScrollView::AutoOneFit ); - mainLayout = new QVBoxLayout ( mw ); + sv->setResizePolicy( Q3ScrollView::AutoOneFit ); + mainLayout = new Q3VBoxLayout ( mw ); mainLayout->setMargin( 0 ); mainLayout->setSpacing( 0 ); @@ -91,5 +97,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) setDefaults(); mTypeNumberEditList.setAutoDelete( true ); - mPopup = new QPopupMenu( this ); + mPopup = new Q3PopupMenu( this ); QStringList list = PhoneNumber::supportedTypeListNames(); mPopupCount = list.count(); @@ -227,5 +233,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QGridLayout *layout = new QGridLayout( this, 4, 1 ); + Q3GridLayout *layout = new Q3GridLayout( this, 4, 1 ); //US layout->setSpacing( KDialog::spacingHint() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); @@ -237,5 +243,5 @@ PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) //US label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop ) ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, 0 ) ); - label->setAlignment( AlignCenter ); + label->setAlignment( Qt::AlignCenter ); //US layout->addMultiCellWidget( label, 0, 1, 3, 3 ); layout->addWidget( label, 0, 0 ); @@ -328,5 +334,5 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) mPrefCombo->insertTypeList( list ); - QValueList<int> defaultTypes; + Q3ValueList<int> defaultTypes; defaultTypes << KABC::PhoneNumber::Home; defaultTypes << KABC::PhoneNumber::Work; @@ -338,5 +344,5 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &list ) // Doing this for mPrefCombo is enough because the list is shared by all // combos. - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; for( it = defaultTypes.begin(); it != defaultTypes.end(); ++it ) { if ( !mPrefCombo->hasType( *it ) ) @@ -488,8 +494,8 @@ void PhoneEditWidget::updateOtherEdit( PhoneTypeCombo *combo, PhoneTypeCombo *ot // PhoneEditDialog -class PhoneViewItem : public QListViewItem +class PhoneViewItem : public Q3ListViewItem { public: - PhoneViewItem( QListView *parent, const KABC::PhoneNumber &number ); + PhoneViewItem( Q3ListView *parent, const KABC::PhoneNumber &number ); void setPhoneNumber( const KABC::PhoneNumber &number ) @@ -512,6 +518,6 @@ 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 ) { #ifdef DESKTOP_VERSION @@ -545,5 +551,5 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * QWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 1, 2 ); + Q3GridLayout *layout = new Q3GridLayout( page, 1, 2 ); layout->setSpacing( spacingHint() ); @@ -553,5 +559,5 @@ PhoneEditDialog::PhoneEditDialog( const KABC::PhoneNumber::List &list, QWidget * mListView->addColumn( i18n( "Type" ) ); - KButtonBox *buttonBox = new KButtonBox( page, Vertical ); + KButtonBox *buttonBox = new KButtonBox( page, Qt::Vertical ); buttonBox->addButton( i18n( "&Add..." ), this, SLOT( slotAddPhoneNumber() ) ); @@ -566,5 +572,5 @@ 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())); KABC::PhoneNumber::List::Iterator it; @@ -589,5 +595,5 @@ void PhoneEditDialog::slotAddPhoneNumber() if ( dlg.exec() ) { - QListViewItem* i = mListView->firstChild(); + Q3ListViewItem* i = mListView->firstChild(); KABC::PhoneNumber phoneNumber = dlg.phoneNumber(); bool insert = true; @@ -621,5 +627,5 @@ void PhoneEditDialog::slotRemovePhoneNumber() mPhoneNumberList.remove( item->phoneNumber() ); - QListViewItem *currItem = mListView->currentItem(); + Q3ListViewItem *currItem = mListView->currentItem(); mListView->takeItem( currItem ); delete currItem; @@ -674,5 +680,5 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, QWidget *page = plainPage(); QLabel *label = 0; - QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); + Q3GridLayout *layout = new Q3GridLayout( page, 3, 2, marginHint(), spacingHint() ); label = new QLabel( i18n( "Number:" ), page ); @@ -684,5 +690,5 @@ PhoneTypeDialog::PhoneTypeDialog( const KABC::PhoneNumber &phoneNumber, layout->addMultiCellWidget( mPreferredBox, 1, 1, 0, 1 ); - mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); + mGroup = new Q3ButtonGroup( 2, Qt::Horizontal, i18n( "Types" ), page ); layout->addMultiCellWidget( mGroup, 2, 2, 0, 1 ); @@ -727,5 +733,5 @@ 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 @@ -28,14 +28,18 @@ #include <qpushbutton.h> #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> #include "addresseeconfig.h" #include "typecombo.h" -class QButtonGroup; +class Q3ButtonGroup; class QCheckBox; class PhoneTypeNumberEdit; @@ -77,6 +81,6 @@ class PhoneEditWidget : public QWidget private: - QScrollView* sv; - QPopupMenu *mPopup; + Q3ScrollView* sv; + Q3PopupMenu *mPopup; int mPopupCount; PhoneTypeNumberEdit* mPendingDelete; @@ -84,6 +88,6 @@ class PhoneEditWidget : public QWidget PhoneTypeNumberEdit* appendEditCombo(); QWidget* mw; - QVBoxLayout* mainLayout; - QPtrList <PhoneTypeNumberEdit> mTypeNumberEditList; + Q3VBoxLayout* mainLayout; + Q3PtrList <PhoneTypeNumberEdit> mTypeNumberEditList; }; @@ -96,5 +100,5 @@ public: PhoneTypeNumberEdit( QWidget *parent, const char *name = 0 ) :QWidget( parent ) { - QHBoxLayout * lay = new QHBoxLayout( this ); + Q3HBoxLayout * lay = new Q3HBoxLayout( this ); lay->setSpacing( 2 ); lay->setMargin( 0 ); @@ -103,5 +107,5 @@ public: mCombo = new KComboBox( this ); if ( QApplication::desktop()->width() <= 640 ) - mCombo->setSizeLimit ( 6 ); + mCombo->setMaxVisibleItems ( 6 ); mNumber = new KLineEdit( this ); mMinusButton->setMaximumHeight( mNumber->sizeHint().height() + 6); diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp index 4a2acc8..1c237c0 100644 --- a/kaddressbook/secrecywidget.cpp +++ b/kaddressbook/secrecywidget.cpp @@ -23,4 +23,6 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kabc/secrecy.h> @@ -33,5 +35,5 @@ SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), + Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); mSecrecyCombo = new KComboBox( this ); @@ -66,5 +68,5 @@ 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 @@ -115,5 +115,5 @@ 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 @@ -26,5 +26,5 @@ #include <qobject.h> -#include <qptrstack.h> +#include <q3ptrstack.h> #include <qstring.h> @@ -68,5 +68,5 @@ class StackBase : public QObject Command *pop(); - 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 @@ -22,5 +22,5 @@ */ -#include <qtextstream.h> +#include <q3textstream.h> #include <qapplication.h> diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp index 5daae1a..7366a0b 100644 --- a/kaddressbook/viewconfigurefieldspage.cpp +++ b/kaddressbook/viewconfigurefieldspage.cpp @@ -37,18 +37,22 @@ #include <qtoolbutton.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3BoxLayout> #include "viewconfigurefieldspage.h" -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 ) {} @@ -107,5 +111,5 @@ void ViewConfigureFieldsPage::slotShowFields( int index ) KABC::Field::List::ConstIterator it; for ( it = allFields.begin(); it != allFields.end(); ++it ) { - QListBoxItem *item = mSelectedBox->firstItem(); + Q3ListBoxItem *item = mSelectedBox->firstItem(); while( item ) { FieldItem *fieldItem = static_cast<FieldItem *>( item ); @@ -190,5 +194,5 @@ void ViewConfigureFieldsPage::slotMoveUp() int i = mSelectedBox->currentItem(); if ( i > 0 ) { - QListBoxItem *item = mSelectedBox->item( i ); + Q3ListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); mSelectedBox->insertItem( item, i - 1 ); @@ -202,5 +206,5 @@ void ViewConfigureFieldsPage::slotMoveDown() int i = mSelectedBox->currentItem(); if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { - QListBoxItem *item = mSelectedBox->item( i ); + Q3ListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); mSelectedBox->insertItem( item, i + 1 ); @@ -220,9 +224,9 @@ void ViewConfigureFieldsPage::initGUI() setCaption( i18n("Select Fields to Display") ); - 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() ); #ifndef KAB_EMBEDDED @@ -250,6 +254,6 @@ void ViewConfigureFieldsPage::initGUI() - mUnSelectedBox = new QListBox( this ); - mUnSelectedBox->setSelectionMode( QListBox::Extended ); + mUnSelectedBox = new Q3ListBox( this ); + mUnSelectedBox->setSelectionMode( Q3ListBox::Extended ); mUnSelectedBox->setMinimumHeight( 80 ); if (orientation == 0) @@ -258,10 +262,10 @@ void ViewConfigureFieldsPage::initGUI() gl->addWidget( mUnSelectedBox, 0, 1 ); - mSelectedBox = new QListBox( this ); + mSelectedBox = new Q3ListBox( this ); //if ( QApplication::desktop()->width() < 320 ) { // mUnSelectedBox->setMaximumWidth( 134 ); // mSelectedBox->setMaximumWidth( 134 ); //} - mSelectedBox->setSelectionMode( QListBox::Extended ); + mSelectedBox->setSelectionMode( Q3ListBox::Extended ); mSelectedBox->setMinimumHeight( 80 ); label->setBuddy( mSelectedBox ); @@ -271,9 +275,9 @@ void ViewConfigureFieldsPage::initGUI() gl->addWidget( mSelectedBox, 2, 1 ); - 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() ); vb1->addStretch(); @@ -302,9 +306,9 @@ void ViewConfigureFieldsPage::initGUI() gl->addLayout( vb1, 1, 1 ); - 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() ); vb2->addStretch(); @@ -341,5 +345,5 @@ void ViewConfigureFieldsPage::initGUI() connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); - connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); + connect( mSelectedBox, SIGNAL( currentChanged( Q3ListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); slotButtonsEnabled(); @@ -347,5 +351,5 @@ 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 @@ -36,6 +36,6 @@ class QComboBox; #endif //KAB_EMBEDDED -class QListBox; -class QListBoxItem; +class Q3ListBox; +class Q3ListBoxItem; class QPushButton; class QToolButton; @@ -69,6 +69,6 @@ class ViewConfigureFieldsPage : public QWidget QComboBox *mCategoryCombo; #endif //KAB_EMBEDDED - QListBox *mSelectedBox; - QListBox *mUnSelectedBox; + Q3ListBox *mSelectedBox; + Q3ListBox *mUnSelectedBox; QToolButton *mAddButton; QToolButton *mRemoveButton; diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp index b085a5e..cdb778b 100644 --- a/kaddressbook/viewconfigurefilterpage.cpp +++ b/kaddressbook/viewconfigurefilterpage.cpp @@ -28,8 +28,11 @@ #endif //KAB_EMBEDDED -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlabel.h> #include <qlayout.h> #include <qradiobutton.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> #include <kconfig.h> @@ -45,7 +48,7 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, : QWidget( parent, name ) { - 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 ) ) ); @@ -69,5 +72,5 @@ ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, topLayout->addWidget( button ); - QBoxLayout *comboLayout = new QHBoxLayout(); + Q3BoxLayout *comboLayout = new Q3HBoxLayout(); topLayout->addLayout( comboLayout ); button = new QRadioButton( i18n( "Use filter:" ), this ); @@ -133,5 +136,5 @@ 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 @@ -27,5 +27,5 @@ #include <qwidget.h> -class QButtonGroup; +class Q3ButtonGroup; #ifndef KAB_EMBEDDED @@ -58,5 +58,5 @@ class ViewConfigureFilterPage : public QWidget #endif //KAB_EMBEDDED - 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 @@ -25,5 +25,5 @@ #ifndef KAB_EMBEDDED -#include <qvbox.h> +#include <q3vbox.h> #include <kapplication.h> @@ -38,4 +38,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QPixmap> #include <kjanuswidget.h> @@ -51,5 +54,5 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent : ConfigureWidget( ab, parent, name ) { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this ); mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); @@ -58,5 +61,5 @@ 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", KIcon::Panel, 16 ) ); @@ -94,5 +97,5 @@ 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 ) { @@ -100,5 +103,5 @@ QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, } -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qlayout.h> @@ -153,7 +156,5 @@ 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 @@ -29,5 +29,5 @@ #include "configurewidget.h" -class QVBox; +class Q3VBox; #include <kdialogbase.h> @@ -75,5 +75,5 @@ class ViewConfigureWidget : public ConfigureWidget Use this method to add new pages to the widget. */ - 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 @@ -51,5 +51,8 @@ $Id$ #include <qaction.h> #include <qmessagebox.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QDropEvent> #include <kconfigbase.h> @@ -62,5 +65,6 @@ $Id$ #include <qlayout.h> #include <qapplication.h> -#include <qwidgetstack.h> +#include <QDesktopWidget> +#include <q3widgetstack.h> #include <kabc/addressbook.h> @@ -118,5 +122,5 @@ void ViewManager::restoreSettings() QString _oldgroup = mCore->config()->group(); - QDictIterator<KAddressBookView> it( mViewDict ); + Q3DictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); @@ -132,5 +136,5 @@ void ViewManager::saveSettings() QString _oldgroup = mCore->config()->group(); - QDictIterator<KAddressBookView> it( mViewDict ); + Q3DictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); @@ -162,5 +166,5 @@ QStringList ViewManager::selectedEmails() const { if ( mActiveView ) - return mActiveView->selectedEmails(); + return QStringList(mActiveView->selectedEmails()); else return QStringList(); @@ -557,5 +561,5 @@ 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; QStringList vcards; @@ -660,7 +664,7 @@ 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 @@ -739,10 +743,10 @@ void ViewManager::initActions() 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 ); } -#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 @@ -27,6 +27,8 @@ #include <qwidget.h> #include <qstringlist.h> +//Added by qt3to4: +#include <QDropEvent> #include <kaddressbookview.h> -#include <qdict.h> +#include <q3dict.h> #include "filter.h" @@ -35,5 +37,5 @@ class KSelectAction; class KABCore; -class QWidgetStack; +class Q3WidgetStack; class QDropEvent; @@ -146,9 +148,9 @@ class ViewManager : public QWidget Filter::List mFilterList; - 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 @@ -35,4 +35,12 @@ #include <qtooltip.h> #include <qapplication.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QMouseEvent> +#include <QEvent> +#include <QWheelEvent> #include "kabprefs.h" @@ -72,9 +80,9 @@ class CardViewTip : public QLabel { // item! Only the pointer value is unique in the list. // -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) { CardViewItem *cItem1 = (CardViewItem*)item1; @@ -162,5 +170,5 @@ class CardViewPrivate CardViewItemList mItemList; - QPtrList<CardViewSeparator> mSeparatorList; + Q3PtrList<CardViewSeparator> mSeparatorList; QFontMetrics *mFm; QFontMetrics *mBFm; // bold font @@ -209,5 +217,5 @@ class CardViewItemPrivate QString mCaption; - QPtrList< CardViewItem::Field > mFieldList; + Q3PtrList< CardViewItem::Field > mFieldList; bool mSelected; int x; // horizontal position, set by the view @@ -314,5 +322,5 @@ 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; int yPos = mg + 4 + bFm.height()/* + 1*/ + fm.height(); // why the + 1 ??? (anders) @@ -409,10 +417,10 @@ int CardViewItem::height( bool allowCache ) const int lines; int maxLines( mView->maxFieldLines() ); - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) { if ( !sef && (*iter)->second.isEmpty() ) continue; - lines = QMIN( (*iter)->second.contains('\n') + 1, maxLines ); + lines = QMIN( (*iter)->second.count('\n') + 1, maxLines ); fieldHeight += ( lines * fh ) + 2;//sp; } @@ -451,5 +459,5 @@ void CardViewItem::removeField(const QString &label) CardViewItem::Field *f; - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) { @@ -524,5 +532,5 @@ void CardViewItem::setCaption(const QString &caption) QString CardViewItem::fieldValue(const QString &label) { - QPtrListIterator< CardViewItem::Field > iter(d->mFieldList); + Q3PtrListIterator< CardViewItem::Field > iter(d->mFieldList); for (iter.toFirst(); iter.current(); ++iter) if ((*iter)->first == label) @@ -570,5 +578,5 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) for (_f = d->mFieldList.first(); _f != f; _f = d->mFieldList.next()) 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; // } if ( isLabel && itempos.y() > y + fh ) @@ -587,5 +595,5 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) } else { 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); } } @@ -627,5 +635,5 @@ 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 ) break; @@ -638,5 +646,5 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const CardView::CardView(QWidget *parent, const char *name) - : QScrollView(parent, name), + : Q3ScrollView(parent, name), d(new CardViewPrivate()) { @@ -657,11 +665,11 @@ CardView::CardView(QWidget *parent, const char *name) viewport()->setMouseTracking( true ); viewport()->setFocusProxy(this); - viewport()->setFocusPolicy(WheelFocus); - viewport()->setBackgroundMode(PaletteBase); + viewport()->setFocusPolicy(Qt::WheelFocus); + viewport()->setBackgroundMode(Qt::PaletteBase); connect( d->mTimer, SIGNAL(timeout()), this, SLOT(tryShowFullText()) ); //US setBackgroundMode(PaletteBackground, PaletteBase); - setBackgroundMode(PaletteBackground); + setBackgroundMode(Qt::PaletteBackground); // no reason for a vertical scrollbar @@ -740,5 +748,5 @@ CardViewItem *CardView::itemAt(const QPoint &viewPos) { CardViewItem *item = 0; - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); bool found = false; for (iter.toFirst(); iter.current() && !found; ++iter) @@ -788,5 +796,5 @@ CardView::SelectionMode CardView::selectionMode() const void CardView::selectAll(bool state) { - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); if (!state) { @@ -879,5 +887,5 @@ 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) { @@ -956,5 +964,5 @@ 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) { @@ -976,5 +984,5 @@ 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) { @@ -994,5 +1002,5 @@ void CardView::drawContents(QPainter *p, int clipx, int clipy, void CardView::resizeEvent(QResizeEvent *e) { - QScrollView::resizeEvent(e); + Q3ScrollView::resizeEvent(e); setLayoutDirty(true); @@ -1014,5 +1022,5 @@ void CardView::calcLayout() d->mSeparatorList.clear(); - QPtrListIterator<CardViewItem> iter(d->mItemList); + Q3PtrListIterator<CardViewItem> iter(d->mItemList); CardViewItem *item = 0; CardViewSeparator *sep = 0; @@ -1057,5 +1065,5 @@ void CardView::calcLayout() // Update the height of all the separators now that we know the // max height of a column - QPtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); + Q3PtrListIterator<CardViewSeparator> sepIter(d->mSeparatorList); for (sepIter.toFirst(); sepIter.current(); ++sepIter) { @@ -1102,5 +1110,5 @@ void CardView::setItemSpacing( uint spacing ) void CardView::contentsMousePressEvent(QMouseEvent *e) { - QScrollView::contentsMousePressEvent(e); + Q3ScrollView::contentsMousePressEvent(e); QPoint pos = e->pos(); @@ -1172,5 +1180,5 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) bool s = ! item->isSelected(); - if ( s && ! (e->state() & ControlButton) ) + if ( s && ! (e->state() & Qt::ControlButton) ) { bool b = signalsBlocked(); @@ -1220,5 +1228,5 @@ void CardView::contentsMousePressEvent(QMouseEvent *e) void CardView::contentsMouseReleaseEvent(QMouseEvent *e) { - QScrollView::contentsMouseReleaseEvent(e); + Q3ScrollView::contentsMouseReleaseEvent(e); if ( d->mResizeAnchor ) @@ -1258,5 +1266,5 @@ void CardView::contentsMouseReleaseEvent(QMouseEvent *e) void CardView::contentsMouseDoubleClickEvent(QMouseEvent *e) { - QScrollView::contentsMouseDoubleClickEvent(e); + Q3ScrollView::contentsMouseDoubleClickEvent(e); CardViewItem *item = itemAt(e->pos()); @@ -1303,10 +1311,10 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) if ( m >= colcontentw && m > 0 ) { - setCursor( SplitVCursor ); // Why does this fail sometimes? + setCursor( Qt::SplitVCursor ); // Why does this fail sometimes? d->mOnSeparator = true; } else { - setCursor( ArrowCursor ); + setCursor( Qt::ArrowCursor ); d->mOnSeparator = false; } @@ -1325,5 +1333,5 @@ void CardView::leaveEvent( QEvent * ) { d->mOnSeparator = false; - setCursor( ArrowCursor ); + setCursor( Qt::ArrowCursor ); } } @@ -1369,5 +1377,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) switch ( e->key() ) { - case Key_Up: + case Qt::Key_Up: if ( pos > 0 ) { @@ -1376,5 +1384,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) } break; - case Key_Down: + case Qt::Key_Down: if ( pos < d->mItemList.count() - 1 ) { @@ -1383,5 +1391,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) } break; - case Key_Left: + case Qt::Key_Left: { // look for an item in the previous/next column, starting from @@ -1401,5 +1409,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) } break; - case Key_Right: + case Qt::Key_Right: { // FIXME use nice calculated measures!!! @@ -1416,13 +1424,13 @@ void CardView::keyPressEvent( QKeyEvent *e ) } break; - case Key_Home: + case Qt::Key_Home: aItem = d->mItemList.first(); setCurrentItem( aItem ); break; - case Key_End: + case Qt::Key_End: aItem = d->mItemList.last(); setCurrentItem( aItem ); break; - case Key_Prior: // PageUp + case Qt::Key_Prior: // PageUp { // QListView: "Make the item above the top visible and current" @@ -1437,5 +1445,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) } break; - case Key_Next: // PageDown + case Qt::Key_Next: // PageDown { // QListView: "Make the item below the bottom visible and current" @@ -1459,10 +1467,10 @@ void CardView::keyPressEvent( QKeyEvent *e ) } break; - case Key_Space: + case Qt::Key_Space: setSelected( d->mCurrentItem, !d->mCurrentItem->isSelected() ); emit selectionChanged(); break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { emit returnPressed( d->mCurrentItem ); @@ -1471,5 +1479,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; default: - if ( (e->state() & ControlButton) && e->key() == Key_A ) + if ( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A ) { // select all @@ -1489,5 +1497,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) if ( d->mSelectionMode == CardView::Extended ) { - if ( (e->state() & ShiftButton) ) + if ( (e->state() & Qt::ShiftButton) ) { // shift button: toggle range @@ -1520,5 +1528,5 @@ void CardView::keyPressEvent( QKeyEvent *e ) emit selectionChanged(); } - else if ( (e->state() & ControlButton) ) + else if ( (e->state() & Qt::ControlButton) ) { // control button: do nothing @@ -1639,7 +1647,7 @@ 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; // erase @@ -1700,5 +1708,5 @@ QFont CardView::headerFont() const void CardView::setFont( const QFont &fnt ) { - QScrollView::setFont( fnt ); + Q3ScrollView::setFont( fnt ); delete d->mFm; d->mFm = new QFontMetrics( fnt ); @@ -1737,5 +1745,5 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) mFlagKeyPressed = false; } - QScrollView::keyReleaseEvent ( e ); + Q3ScrollView::keyReleaseEvent ( e ); } @@ -1746,5 +1754,5 @@ void CardView::keyReleaseEvent ( QKeyEvent * e ) //END Cardview -#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 @@ -2,10 +2,18 @@ #define CARDVIEW_H -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> #include <qstring.h> #include <qrect.h> #include <qpair.h> #include <qpoint.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QResizeEvent> +#include <QFocusEvent> +#include <QLabel> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> class QLabel; @@ -149,5 +157,5 @@ class CardViewItem * the CardView is also 100% independant of KDE. */ -class CardView : public QScrollView +class CardView : public Q3ScrollView { friend class CardViewItem; 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 @@ -20,4 +20,9 @@ #include <qpainter.h> +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> +#include <QDragMoveEvent> +#include <QDragLeaveEvent> #include <kcolordialog.h> @@ -32,9 +37,9 @@ #endif -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) { 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); } @@ -48,5 +53,5 @@ void ColorListBox::setEnabled( bool state ) } - QListBox::setEnabled( state ); + Q3ListBox::setEnabled( state ); for( uint i=0; i<count(); i++ ) { @@ -76,8 +81,8 @@ QColor ColorListBox::color( uint index ) const else { - return( black ); + return( Qt::black ); } } -void ColorListBox::slotNewColor(QListBoxItem * i) +void ColorListBox::slotNewColor(Q3ListBoxItem * i) { if ( i ) @@ -199,5 +204,5 @@ 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 ) { setText( text ); @@ -230,5 +235,5 @@ void ColorListItem::paint( QPainter *p ) -int ColorListItem::height(const QListBox *lb ) const +int ColorListItem::height(const Q3ListBox *lb ) const { return( lb->fontMetrics().lineSpacing()+1 ); @@ -236,10 +241,10 @@ int ColorListItem::height(const QListBox *lb ) const -int ColorListItem::width(const QListBox *lb ) const +int ColorListItem::width(const Q3ListBox *lb ) const { return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); } -#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 @@ -23,4 +23,9 @@ #include <klistbox.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDragLeaveEvent> +#include <QDropEvent> +#include <QDragEnterEvent> class QDragEnterEvent; @@ -34,5 +39,5 @@ 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 ); QColor color( uint index ) const; @@ -49,5 +54,5 @@ class ColorListBox : public KListBox private slots: void newColor( int index ); - void slotNewColor(QListBoxItem * i); + void slotNewColor(Q3ListBoxItem * i); private: @@ -57,5 +62,5 @@ class ColorListBox : public KListBox -class ColorListItem : public QListBoxItem +class ColorListItem : public Q3ListBoxItem { public: @@ -66,6 +71,6 @@ class ColorListItem : public QListBoxItem protected: 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; private: 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 @@ -26,9 +26,12 @@ #include <qlabel.h> #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> #include <kdebug.h> @@ -90,5 +93,5 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config ) // CardViewLookNFeelPage CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) - : QVBox( parent, name ) + : Q3VBox( parent, name ) { initGUI(); @@ -235,26 +238,26 @@ void CardViewLookNFeelPage::initGUI() // Layout - QVBox *loTab = new QVBox( this, "layouttab" ); + Q3VBox *loTab = new Q3VBox( this, "layouttab" ); loTab->setSpacing( spacing ); loTab->setMargin( margin ); - QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); + Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); - QHBox *hbSW = new QHBox( gbGeneral ); + Q3HBox *hbSW = new Q3HBox( gbGeneral ); QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); lSW->setBuddy( sbSepWidth); - QHBox *hbPadding = new QHBox( gbGeneral ); + Q3HBox *hbPadding = new Q3HBox( gbGeneral ); QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); lSpacing->setBuddy( sbSpacing ); - 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 ); sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); @@ -265,21 +268,21 @@ void CardViewLookNFeelPage::initGUI() loTab->setStretchFactor( new QWidget( loTab ), 1 ); - 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, " "incrementing the item margin will add space between the focus rectangle and the item data." ) ); - 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 " "borders, other items or column separators." ) ); - 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 ) ); */ tabs->addTab( loTab, i18n("&Layout") ); // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + Q3VBox *colorTab = new Q3VBox( this, "colortab" ); colorTab->setSpacing( spacing ); colorTab->setMargin( spacing ); @@ -289,14 +292,14 @@ void CardViewLookNFeelPage::initGUI() tabs->addTab( colorTab, i18n("&Colors") ); - QWhatsThis::add( cbEnableCustomColors, i18n( + Q3WhatsThis::add( cbEnableCustomColors, i18n( "If custom colors are enabled, you may choose the colors for the view below. " "Otherwise colors from your current KDE color scheme are used." ) ); - 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." ) ); // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); fntTab->setSpacing( spacing ); @@ -307,5 +310,5 @@ void CardViewLookNFeelPage::initGUI() vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); gFnts->setAutoAdd( true ); @@ -313,5 +316,5 @@ void CardViewLookNFeelPage::initGUI() QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED btnFont = new KPushButton( i18n("Choose..."), vbFonts ); @@ -326,5 +329,5 @@ void CardViewLookNFeelPage::initGUI() QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); @@ -337,5 +340,5 @@ void CardViewLookNFeelPage::initGUI() fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); - QWhatsThis::add( cbEnableCustomFonts, i18n( + Q3WhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " "Otherwise the default KDE font will be used, in bold style for the header and " @@ -346,5 +349,5 @@ void CardViewLookNFeelPage::initGUI() // Behaviour - QVBox *behaviourTab = new QVBox( this ); + Q3VBox *behaviourTab = new Q3VBox( this ); behaviourTab->setMargin( margin ); behaviourTab->setSpacing( spacing ); @@ -365,5 +368,5 @@ 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 @@ -27,7 +27,9 @@ #include "viewconfigurewidget.h" -#include <qvbox.h> +#include <q3vbox.h> #include <qwidget.h> #include <qfont.h> +//Added by qt3to4: +#include <QLabel> class QString; @@ -78,5 +80,5 @@ class ConfigureCardViewWidget : public ViewConfigureWidget */ -class CardViewLookNFeelPage : public QVBox { +class CardViewLookNFeelPage : public Q3VBox { Q_OBJECT 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 @@ -28,9 +28,12 @@ #include <qradiobutton.h> #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> #include <kglobal.h> @@ -85,5 +88,5 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config ) LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) - : QVBox(parent, name) + : Q3VBox(parent, name) { initGUI(); @@ -230,10 +233,10 @@ void LookAndFeelPage::initGUI() // General - QVBox *generalTab = new QVBox( this, "generaltab" ); + Q3VBox *generalTab = new Q3VBox( this, "generaltab" ); generalTab->setSpacing( spacing ); generalTab->setMargin( margin ); - QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, + Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal, i18n("Row Separator"), generalTab); @@ -263,5 +266,5 @@ void LookAndFeelPage::initGUI() // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + Q3VBox *colorTab = new Q3VBox( this, "colortab" ); colorTab->setSpacing( spacing ); colorTab->setMargin( spacing ); @@ -271,14 +274,14 @@ void LookAndFeelPage::initGUI() tabs->addTab( colorTab, i18n("&Colors") ); - QWhatsThis::add( cbEnableCustomColors, i18n( + Q3WhatsThis::add( cbEnableCustomColors, i18n( "If custom colors are enabled, you may choose the colors for the view below. " "Otherwise colors from your current KDE color scheme are used." ) ); - 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." ) ); // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + Q3VBox *fntTab = new Q3VBox( this, "fonttab" ); fntTab->setSpacing( spacing ); @@ -289,5 +292,5 @@ void LookAndFeelPage::initGUI() vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); gFnts->setAutoAdd( true ); @@ -295,5 +298,5 @@ void LookAndFeelPage::initGUI() QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED btnFont = new KPushButton( i18n("Choose..."), vbFonts ); @@ -308,5 +311,5 @@ void LookAndFeelPage::initGUI() QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken ); #ifndef KAB_EMBEDDED btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); @@ -319,5 +322,5 @@ void LookAndFeelPage::initGUI() fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); - QWhatsThis::add( cbEnableCustomFonts, i18n( + Q3WhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " "Otherwise the default KDE font will be used, in bold style for the header and " @@ -341,5 +344,5 @@ 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 @@ -27,5 +27,7 @@ #include "viewconfigurewidget.h" -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <QLabel> class QString; @@ -64,5 +66,5 @@ class ConfigureTableViewWidget : public ViewConfigureWidget Internal class. It is only defined here for moc */ -class LookAndFeelPage : public QVBox +class LookAndFeelPage : public Q3VBox { Q_OBJECT 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 @@ -22,8 +22,8 @@ */ -#include <qheader.h> -#include <qiconset.h> +#include <q3header.h> +#include <qicon.h> #include <qimage.h> -#include <qdragobject.h> +#include <q3dragobject.h> #include <qcombobox.h> #include <qpainter.h> @@ -31,4 +31,9 @@ #include <qevent.h> #include <qapplication.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QPixmap> +#include <QMouseEvent> +#include <QKeyEvent> #include <klocale.h> @@ -48,5 +53,5 @@ DynamicTip::DynamicTip( ContactListView *parent) - : QToolTip( parent ) + /* TODO:hacker:: QToolTip( parent ) */ { } @@ -54,4 +59,5 @@ DynamicTip::DynamicTip( ContactListView *parent) void DynamicTip::maybeTip( const QPoint &pos ) { + /* TODO:hacker: static bool ishidden = true; if (!parentWidget()->inherits( "ContactListView" )) @@ -64,5 +70,5 @@ void DynamicTip::maybeTip( const QPoint &pos ) QPoint posVp = plv->viewport()->pos(); - QListViewItem *lvi = plv->itemAt( pos - posVp ); + Q3ListViewItem *lvi = plv->itemAt( pos - posVp ); if (!lvi) return; @@ -152,5 +158,5 @@ void DynamicTip::maybeTip( const QPoint &pos ) hide(); ishidden = !ishidden; - + */ } @@ -174,5 +180,5 @@ QString ContactListViewItem::key(int column, bool ascending) const //qDebug("language %d ", lan); if ( lan == 1 ) { //GERMAN - QString ret = QListViewItem::key(column, ascending).lower().utf8(); + QString ret = Q3ListViewItem::key(column, ascending).lower().utf8(); int start = -1; while ( (start = ret.find( 'ä', start+1)) > 0 ) { @@ -198,5 +204,5 @@ QString ContactListViewItem::key(int column, bool ascending) const else #endif - return QListViewItem::key(column, ascending).lower(); + return Q3ListViewItem::key(column, ascending).lower(); } @@ -289,5 +295,5 @@ void ContactListView::printMe() QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -344,5 +350,5 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e) 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(); } @@ -354,5 +360,5 @@ bool ContactListView::acceptDrag(QDropEvent *e) const { #ifndef KAB_EMBEDDED - return QTextDrag::canDecode(e); + return Q3TextDrag::canDecode(e); #else //KAB_EMBEDDED qDebug("ContactListView::acceptDrag has to be fixed"); @@ -425,5 +431,5 @@ void ContactListView::keyReleaseEvent ( QKeyEvent * e ) KListView::keyReleaseEvent ( 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 @@ -6,4 +6,8 @@ #include <qtooltip.h> #include <qstring.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QMouseEvent> +#include <QKeyEvent> #include <klistview.h> @@ -21,5 +25,5 @@ class ContactListView; * hacked together to function. */ -class DynamicTip : public QToolTip +class DynamicTip /* TODO:hacker: : public QToolTip */ { public: 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 @@ -22,11 +22,16 @@ */ -#include <qdragobject.h> +#include <q3dragobject.h> #include <qevent.h> -#include <qiconview.h> +#include <q3iconview.h> #include <qlayout.h> #include <qstringlist.h> #include <qregexp.h> #include <qapplication.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QKeyEvent> +#include <Q3VBoxLayout> +#include <QDragEnterEvent> #include <kabc/addressbook.h> @@ -126,5 +131,5 @@ void AddresseeCardView::printMe() QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -149,5 +154,5 @@ void AddresseeCardView::dragEnterEvent(QDragEnterEvent *e) { #ifndef KAB_EMBEDDED - if (QTextDrag::canDecode(e)) + if (Q3TextDrag::canDecode(e)) e->accept(); #else //KAB_EMBEDDED @@ -177,5 +182,5 @@ KAddressBookCardView::KAddressBookCardView( KABC::AddressBook *ab, // Init the GUI - QVBoxLayout *layout = new QVBoxLayout(viewWidget()); + Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); mCardView = new AddresseeCardView(viewWidget(), "mCardView"); @@ -521,5 +526,5 @@ 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 @@ -26,4 +26,7 @@ #include <qstring.h> +//Added by qt3to4: +#include <QDragEnterEvent> +#include <QDropEvent> #ifndef KAB_EMBEDDED #include <kiconview.h> 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 @@ -23,5 +23,5 @@ #ifndef KAB_EMBEDDED -#include <qiconview.h> +#include <q3iconview.h> #include <qstringlist.h> @@ -36,4 +36,12 @@ #endif //KAB_EMBEDDED +//Added by qt3to4: +#include <QDropEvent> +#include <Q3ValueList> +#include <QPixmap> +#include <QKeyEvent> +#include <QEvent> +#include <Q3VBoxLayout> + #include <kabc/addressbook.h> #include "kabprefs.h" @@ -74,10 +82,10 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) #else //KAB_EMBEDDED AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) - : QIconView(parent, name) + : Q3IconView(parent, name) #endif //KAB_EMBEDDED { - setSelectionMode( QIconView::Extended ); - setResizeMode( QIconView::Adjust ); + setSelectionMode( Q3IconView::Extended ); + setResizeMode( Q3IconView::Adjust ); setWordWrapIconText( true ); setGridX( 100 ); @@ -90,6 +98,6 @@ AddresseeIconView::AddresseeIconView(QWidget *parent, const char *name) #ifndef KAB_EMBEDDED - 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 } @@ -101,10 +109,10 @@ AddresseeIconView::~AddresseeIconView() void AddresseeIconView::itemDropped(QDropEvent *e, - const QValueList<QIconDragItem> &) + const Q3ValueList<Q3IconDragItem> &) { emit addresseeDropped(e); } -QDragObject *AddresseeIconView::dragObject() +Q3DragObject *AddresseeIconView::dragObject() { emit startAddresseeDrag(); @@ -118,5 +126,5 @@ QDragObject *AddresseeIconView::dragObject() class AddresseeIconViewItem : public KIconViewItem #else //KAB_EMBEDDED -class AddresseeIconViewItem : public QIconViewItem +class AddresseeIconViewItem : public Q3IconViewItem #endif //KAB_EMBEDDED { @@ -125,11 +133,11 @@ class AddresseeIconViewItem : public QIconViewItem AddresseeIconViewItem(const KABC::Field::List &fields, KABC::AddressBook *doc, const KABC::Addressee &a, - QIconView *parent) + Q3IconView *parent) : KIconViewItem(parent), mFields( fields ), mDocument(doc), mAddressee(a) #else //KAB_EMBEDDED AddresseeIconViewItem(const KABC::Field::List &fields, 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 { @@ -201,5 +209,5 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, { // Init the GUI - QVBoxLayout *layout = new QVBoxLayout(viewWidget()); + Q3VBoxLayout *layout = new Q3VBoxLayout(viewWidget()); mIconView = new AddresseeIconView(viewWidget(), "mIconView"); @@ -211,6 +219,6 @@ KAddressBookIconView::KAddressBookIconView( KABC::AddressBook *ab, //US connect(mIconView, SIGNAL(executed(QIconViewItem *)), //US this, SLOT(addresseeExecuted(QIconViewItem *))); - connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); connect(mIconView, SIGNAL(selectionChanged()), @@ -249,6 +257,6 @@ void KAddressBookIconView::readConfig(KConfig *config) //US disconnect(mIconView, SIGNAL(executed(QIconViewItem *)), //US this, SLOT(addresseeExecuted(QIconViewItem *))); - disconnect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + disconnect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); //US method executed is part of KIconView. Use selectionChanged instead @@ -261,6 +269,6 @@ void KAddressBookIconView::readConfig(KConfig *config) this, SLOT(addresseeExecuted(QIconViewItem *))); */ - connect(mIconView, SIGNAL(selectionChanged(QIconViewItem *)), - this, SLOT(addresseeExecuted(QIconViewItem *))); + connect(mIconView, SIGNAL(selectionChanged(Q3IconViewItem *)), + this, SLOT(addresseeExecuted(Q3IconViewItem *))); } @@ -337,5 +345,5 @@ QStringList KAddressBookIconView::selectedUids() { QStringList uidList; - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -359,5 +367,5 @@ QStringList KAddressBookIconView::selectedUids() void KAddressBookIconView::refresh(QString uid) { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -407,5 +415,5 @@ void KAddressBookIconView::refresh(QString uid) void KAddressBookIconView::setSelected(QString uid, bool selected) { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -436,5 +444,5 @@ void KAddressBookIconView::setSelected(QString uid, bool selected) } -void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) +void KAddressBookIconView::addresseeExecuted(Q3IconViewItem *item) { #ifndef KAB_EMBEDDED @@ -451,5 +459,5 @@ void KAddressBookIconView::addresseeExecuted(QIconViewItem *item) void KAddressBookIconView::addresseeSelected() { - QIconViewItem *item; + Q3IconViewItem *item; AddresseeIconViewItem *aItem; @@ -477,5 +485,5 @@ 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 @@ -26,18 +26,21 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <QDropEvent> #ifndef KAB_EMBEDDED #include <kiconview.h> #else //KAB_EMBEDDED -#include <qiconview.h> -#include <qptrlist.h> +#include <q3iconview.h> +#include <q3ptrlist.h> #include <klocale.h> #endif //KAB_EMBEDDED #include "kaddressbookview.h" -class QIconViewItem; +class Q3IconViewItem; class KConfig; class AddresseeIconView; class AddresseeIconViewItem; -class QIconDragItem; +class Q3IconDragItem; class KAddressBookIconView; @@ -69,7 +72,7 @@ class KAddressBookIconView : public KAddressBookView void refresh(QString uid = QString::null); #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 //US my MOC do not like default parameters ??? @@ -78,19 +81,19 @@ class KAddressBookIconView : public KAddressBookView protected slots: - void addresseeExecuted(QIconViewItem *item); + void addresseeExecuted(Q3IconViewItem *item); void addresseeSelected(); private: AddresseeIconView *mIconView; - QPtrList<AddresseeIconViewItem> mIconList; + Q3PtrList<AddresseeIconViewItem> mIconList; }; #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 { @@ -106,8 +109,8 @@ 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 @@ -1,6 +1,6 @@ // $Id$ -#include <qvbox.h> -#include <qlistbox.h> +#include <q3vbox.h> +#include <q3listbox.h> #include <qwidget.h> #include <qfile.h> @@ -8,8 +8,12 @@ #include <qcombobox.h> #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> #include <kabc/addressbook.h> @@ -33,5 +37,5 @@ #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qregexp.h> @@ -43,5 +47,5 @@ KAddressBookTableView::KAddressBookTableView( KABC::AddressBook *ab, : KAddressBookView( ab, parent, name ) { - mainLayout = new QVBoxLayout( viewWidget(), 2 ); + mainLayout = new Q3VBoxLayout( viewWidget(), 2 ); // The list view will be created when the config is read. @@ -78,12 +82,12 @@ void KAddressBookTableView::reconstructListView() disconnect(mListView, SIGNAL(selectionChanged()), 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*))); disconnect(mListView, SIGNAL(addresseeDropped(QDropEvent*)), this, @@ -106,5 +110,5 @@ void KAddressBookTableView::reconstructListView() for( it = fieldList.begin(); it != fieldList.end(); ++it ) { mListView->addColumn( (*it)->label() ); - mListView->setColumnWidthMode(c++, QListView::Manual); + mListView->setColumnWidthMode(c++, Q3ListView::Manual); //US // qDebug("KAddressBookTableView::reconstructListView: field %s", (*it)->label().latin1()); @@ -120,13 +124,13 @@ void KAddressBookTableView::reconstructListView() if (KABPrefs::instance()->mHonorSingleClick) { // 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()), this, SLOT(addresseeDeleted())); @@ -345,5 +349,5 @@ void KAddressBookTableView::refresh(QString uid) // Only need to update on entry. Iterate through and try to find it ContactListViewItem *ceItem; - QListViewItemIterator it( mListView ); + Q3ListViewItemIterator it( mListView ); while ( it.current() ) { #ifndef KAB_EMBEDDED @@ -367,5 +371,5 @@ QStringList KAddressBookTableView::selectedUids() { QStringList uidList; - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; @@ -395,5 +399,5 @@ QStringList KAddressBookTableView::selectedUids() void KAddressBookTableView::setSelected(QString uid, bool selected) { - QListViewItem *item; + Q3ListViewItem *item; ContactListViewItem *ceItem; @@ -430,5 +434,5 @@ void KAddressBookTableView::addresseeSelected() // there is no way to figure out which one was // selected last. - QListViewItem *item; + Q3ListViewItem *item; bool found =false; for (item = mListView->firstChild(); item && !found; @@ -454,5 +458,5 @@ void KAddressBookTableView::addresseeSelected() } -void KAddressBookTableView::addresseeExecuted(QListViewItem *item) +void KAddressBookTableView::addresseeExecuted(Q3ListViewItem *item) { if (item) @@ -488,5 +492,5 @@ 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 @@ -11,10 +11,10 @@ #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> #include "undo.h" @@ -26,8 +26,10 @@ #include "klocale.h" #include "kaddressbookview.h" +//Added by qt3to4: +#include <Q3VBoxLayout> -class QListViewItem; -class QListBox; -class QVBoxLayout; +class Q3ListViewItem; +class Q3ListBox; +class Q3VBoxLayout; class KConfig; @@ -80,8 +82,8 @@ friend class ContactListView; * list view, this is probably a double click */ - 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 @@ -31,5 +31,5 @@ $Id$ #include <qfile.h> #include <qregexp.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> @@ -105,5 +105,5 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& } else { 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>" ); KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); @@ -125,5 +125,5 @@ 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>" ); KMessageBox::error( parentWidget(), txt.arg( fileName ) ); @@ -152,5 +152,5 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) { - QTextStream t( fp ); + Q3TextStream t( fp ); t.setCodec( QTextCodec::codecForName("utf8") ); @@ -188,7 +188,5 @@ 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 @@ -28,5 +28,5 @@ $Id$ -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qcheckbox.h> #include <qcombobox.h> @@ -40,8 +40,12 @@ $Id$ #include <qpushbutton.h> #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> #include <kapplication.h> @@ -57,5 +61,5 @@ $Id$ #ifdef DESKTOP_VERSION -#include "qtable.h" +#include "q3table.h" #else #include "qcombotableitem.h" @@ -162,5 +166,5 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, // if ( QApplication::desktop()->width() < 321 ) - QIconSet icon = SmallIcon("filesave"); + QIcon icon = SmallIcon("filesave"); findButton( User2 )->setIconSet (icon ) ; @@ -187,5 +191,5 @@ KABC::AddresseeList CSVImportDialog::contacts() const for ( int col = 0; col < mTable->numCols(); ++col ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, col ) ); if ( !item ) { @@ -230,5 +234,5 @@ KABC::AddresseeList CSVImportDialog::contacts() const { QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate - a.setBirthday(dt); + a.setBirthday(QDateTime(dt)); } break; @@ -383,7 +387,7 @@ void CSVImportDialog::initGUI() QWidget* page = plainPage(); - 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() ); @@ -398,9 +402,9 @@ 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 ); mDelimiterBox->layout()->setSpacing( spacingHint() ); mDelimiterBox->layout()->setMargin( marginHint() ); - QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); + Q3GridLayout *delimiterLayout = new Q3GridLayout( mDelimiterBox->layout() ); delimiterLayout->setAlignment( Qt::AlignTop ); layout->addMultiCellWidget( mDelimiterBox, 1, 1, 0, 2 ); @@ -451,6 +455,6 @@ void CSVImportDialog::initGUI() layout->addMultiCellWidget( mIgnoreDuplicates, 4, 4, 0, 2 ); - mTable = new QTable( 0, 0, page ); - mTable->setSelectionMode( QTable::NoSelection ); + mTable = new Q3Table( 0, 0, page ); + mTable->setSelectionMode( Q3Table::NoSelection ); //mTable->horizontalHeader()->hide(); layout->addMultiCellWidget( mTable, 5, 5, 0, 2 ); @@ -484,9 +488,9 @@ void CSVImportDialog::fillTable() // store previous assignment - QValueList<int> mTypeOld = mTypeStore; + Q3ValueList<int> mTypeOld = mTypeStore; mTypeStore.clear(); 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 ) ); if ( !item || mClearTypeStore ) @@ -507,12 +511,12 @@ 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 ); } @@ -527,5 +531,5 @@ void CSVImportDialog::fillTable() if ( x == mTextQuote ) { state = S_QUOTED_FIELD; - } else if ( x == mDelimiter ) { + } else if ( QString(x) == mDelimiter ) { if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) ) ++column; @@ -562,5 +566,5 @@ void CSVImportDialog::fillTable() field += x; state = S_QUOTED_FIELD; - } else if ( x == mDelimiter || x == '\n' ) { + } else if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); field = ""; @@ -579,5 +583,5 @@ void CSVImportDialog::fillTable() break; case S_END_OF_QUOTED_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); field = ""; @@ -602,5 +606,5 @@ void CSVImportDialog::fillTable() } case S_NORMAL_FIELD : - if ( x == mDelimiter || x == '\n' ) { + if ( QString(x) == mDelimiter || x == '\n' ) { setText( row - mStartLine + 1, column, field ); field = ""; @@ -618,5 +622,5 @@ void CSVImportDialog::fillTable() } } - if ( x != mDelimiter ) + if ( QString(x) != mDelimiter ) lastCharDelimiter = false; @@ -650,5 +654,5 @@ 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 ); if ( column < mTypeStore.count() ) @@ -765,5 +769,5 @@ 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 ) ); if ( item && posToType( item->currentItem() ) != Undefined ) @@ -837,5 +841,5 @@ void CSVImportDialog::applyTemplate() for ( uint column = 0; column < columnMap.count(); ++column ) { int type = columnMap[ column ]; - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + Q3ComboTableItem *item = static_cast<Q3ComboTableItem*>( mTable->item( 0, column ) ); if ( item ) @@ -879,5 +883,5 @@ 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 ) ); if ( item ) @@ -935,5 +939,5 @@ 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!" ) ); file.close(); @@ -965,5 +969,5 @@ 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 @@ -34,9 +34,9 @@ $Id$ #include <kdialogbase.h> -#include <qvaluelist.h> +#include <q3valuelist.h> class KURLRequester; -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; class QCheckBox; @@ -44,5 +44,5 @@ class QLineEdit; class QPushButton; class QRadioButton; -class QTable; +class Q3Table; class CSVImportDialog : public KDialogBase @@ -86,6 +86,6 @@ class CSVImportDialog : public KDialogBase }; - QTable* mTable; - QButtonGroup* mDelimiterBox; + Q3Table* mTable; + Q3ButtonGroup* mDelimiterBox; QRadioButton* mRadioComma; QRadioButton* mRadioSemicolon; @@ -120,5 +120,5 @@ class CSVImportDialog : public KDialogBase int mCustomCounter; 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 @@ -117,5 +117,5 @@ 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 @@ -30,6 +30,8 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> #include <kabc/vcardconverter.h> @@ -103,5 +105,5 @@ 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>" ); KMessageBox::error( parentWidget(), text.arg( fileName ) ); @@ -109,6 +111,6 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString } - QTextStream t( &outFile ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream t( &outFile ); + t.setEncoding( Q3TextStream::UnicodeUTF8 ); KABC::Addressee::List::ConstIterator it; @@ -154,5 +156,5 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const QFile file( fileName ); - file.open( IO_ReadOnly ); + file.open( QIODevice::ReadOnly ); QByteArray rawData = file.readAll(); file.close(); @@ -197,6 +199,6 @@ 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(); int start = 0; @@ -268,5 +270,5 @@ 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 @@ -31,4 +31,6 @@ $Id$ #include <qlayout.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kabc/addressbook.h> @@ -218,5 +220,5 @@ void XXPortManager::loadPlugins() #else //KAB_EMBEDDED - QList<XXPortFactory> factorylist; + QList<XXPortFactory*> factorylist; factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_csv_xxport())); factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_kde2_xxport())); @@ -226,8 +228,6 @@ void XXPortManager::loadPlugins() factorylist.append(static_cast<XXPortFactory*>(init_microkaddrbk_sharpdtm_xxport())); - 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 @@ -251,5 +251,5 @@ 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() ) ); connect( this, SIGNAL( user2Clicked() ), this, SLOT ( slotCancel() ) ); @@ -265,6 +265,5 @@ 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 @@ -33,5 +33,5 @@ $Id$ #define XXPORTMANAGER_H -#include <qdict.h> +#include <q3dict.h> #include <qobject.h> @@ -72,5 +72,5 @@ class XXPortManager : public QObject void loadPlugins(); - QDict<XXPortObject> mXXPortObjects; + Q3Dict<XXPortObject> mXXPortObjects; KABCore *mCore; diff --git a/kaddressbook/xxportobject.cpp b/kaddressbook/xxportobject.cpp index bd9d986..2d8d0ff 100644 --- a/kaddressbook/xxportobject.cpp +++ b/kaddressbook/xxportobject.cpp @@ -272,5 +272,5 @@ 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 @@ -37,14 +37,19 @@ $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> #include <qradiobutton.h> #include <qstringlist.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3Frame> +#include <Q3VBoxLayout> #include "kabcore.h" @@ -63,6 +68,6 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, connect( mFiltersCombo, SIGNAL( activated( int ) ), SLOT( filterChanged( int ) ) ); - connect( mCategoriesView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( categoryClicked( QListViewItem* ) ) ); + connect( mCategoriesView, SIGNAL( clicked( Q3ListViewItem* ) ), + SLOT( categoryClicked( Q3ListViewItem* ) ) ); // setup filters @@ -85,5 +90,5 @@ XXPortSelectDialog::XXPortSelectDialog( KABCore *core, bool sort, QStringList::Iterator it; 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 ); @@ -211,7 +216,7 @@ QStringList XXPortSelectDialog::categories() const QStringList list; - 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() ) list.append( it.current()->text( 0 ) ); @@ -226,7 +231,7 @@ 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() ) mUseCategories->setChecked( true ); @@ -245,7 +250,7 @@ void XXPortSelectDialog::slotHelp() 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() ); @@ -253,29 +258,29 @@ void XXPortSelectDialog::initGUI() topLayout->addWidget( label ); - mButtonGroup = new QButtonGroup( i18n( "Contact Selection" ), page ); + mButtonGroup = new Q3ButtonGroup( i18n( "Contact Selection" ), page ); mButtonGroup->setColumnLayout( 0, Qt::Vertical ); mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); mButtonGroup->layout()->setMargin( KDialog::marginHint() ); - QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); + Q3GridLayout *groupLayout = new Q3GridLayout( mButtonGroup->layout() ); groupLayout->setAlignment( Qt::AlignTop ); mUseWholeBook = new QRadioButton( i18n( "&All" ), mButtonGroup ); 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 ); 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." ) ); groupLayout->addWidget( mUseSelection, 1, 0 ); 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" ) ); groupLayout->addWidget( mUseFilters, 2, 0 ); 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." ) ); groupLayout->addWidget( mUseCategories, 3, 0 ); @@ -283,11 +288,11 @@ void XXPortSelectDialog::initGUI() mFiltersCombo = new QComboBox( false, mButtonGroup ); 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 ); mCategoriesView->setSizePolicy(QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); @@ -296,7 +301,7 @@ void XXPortSelectDialog::initGUI() topLayout->addWidget( mButtonGroup ); - 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() ); sortLayout->setAlignment( Qt::AlignTop ); @@ -336,7 +341,5 @@ 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 @@ -31,8 +31,8 @@ #include "filter.h" -class QButtonGroup; +class Q3ButtonGroup; class QComboBox; -class QListView; -class QListViewItem; +class Q3ListView; +class Q3ListViewItem; class QRadioButton; @@ -54,5 +54,5 @@ class XXPortSelectDialog : public KDialogBase private slots: void filterChanged( int ); - void categoryClicked( QListViewItem * i ); + void categoryClicked( Q3ListViewItem * i ); protected slots: @@ -63,5 +63,5 @@ class XXPortSelectDialog : public KDialogBase QStringList categories() const; - QButtonGroup* mButtonGroup; + Q3ButtonGroup* mButtonGroup; QRadioButton* mUseCategories; QRadioButton* mUseFilters; @@ -69,5 +69,5 @@ class XXPortSelectDialog : public KDialogBase QRadioButton* mUseSelection; QComboBox* mFiltersCombo; - QListView* mCategoriesView; + Q3ListView* mCategoriesView; KComboBox *mFieldCombo; diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index 18ce9da..467fef7 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp @@ -24,7 +24,8 @@ // $Id$ -#include <qhbox.h> -#include <qvbox.h> -#include <qapp.h> +#include <q3hbox.h> +#include <q3vbox.h> +#include <qapplication.h> +#include <QDesktopWidget> #include <qlabel.h> #include <qlayout.h> @@ -40,4 +41,7 @@ #else #include <qspinbox.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> #endif #include <stdlib.h> @@ -63,8 +67,8 @@ 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 ); int fs = 18; @@ -84,8 +88,8 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) fo.setPointSize( fs ); 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); playSoundTimer = new QTimer( this ); @@ -104,5 +108,5 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) labb->setFont ( fo ); #endif - labb->setAlignment(AlignCenter); + labb->setAlignment(Qt::AlignCenter); //layout->addWidget ( labb ); fo = font(); @@ -123,5 +127,5 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 ); mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); - QHBoxLayout* layoutSpin = new QHBoxLayout( layout ); + Q3HBoxLayout* layoutSpin = new Q3HBoxLayout( layout ); layoutSpin->addStretch (); layoutSpin->addWidget ( labb ); @@ -129,9 +133,9 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) layoutSpin->addStretch (); - QVBox * bbox = new QVBox ( this ); + Q3VBox * bbox = new Q3VBox ( this ); layout->addWidget ( bbox ); bbox->layout()->setSpacing( 2 ); labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox); - labb->setAlignment(AlignCenter); + labb->setAlignment(Qt::AlignCenter); mSuspendButton = new QPushButton( "Suspend", bbox); QPushButton* silen = new QPushButton( " Stop sound ", bbox); diff --git a/kalarmd/alarmdialog.h b/kalarmd/alarmdialog.h index 52e681a..c3e0966 100644 --- a/kalarmd/alarmdialog.h +++ b/kalarmd/alarmdialog.h @@ -31,4 +31,6 @@ #include <qcombobox.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <QLabel> #include "sharp_char.h" diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 15eff28..74a53cb 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp @@ -53,5 +53,5 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) { mAlarmDialog = new AlarmDialog( 0 ); - mPopUp = new QPopupMenu( this ); + mPopUp = new Q3PopupMenu( this ); mPopUp->insertItem( "What's Next?", this, SLOT ( showWN() ) ); mPopUp->insertItem( "Next Days!", this, SLOT ( showKO() ) ); @@ -67,10 +67,10 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mPopUp->insertSeparator(); 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 ); mFontsizePopup->insertItem( "12", 12 ); @@ -86,5 +86,5 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mFontsizePopup->insertItem( "32", 32 ); mFontsizePopup->insertItem( "36", 36 ); - QPopupMenu* savePopUp = new QPopupMenu( this ); + QPopupMenu* savePopUp = new Q3PopupMenu( this ); savePopUp->insertItem( "Save", 0 ); savePopUp->insertItem( "Load", 1 ); @@ -100,5 +100,5 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mPausePopUp->insertItem( " 1 min", 60 ); mPausePopUp->insertItem( " 5 min", 300 ); - mSuspendPopUp = new QPopupMenu( this ); + mSuspendPopUp = new Q3PopupMenu( this ); mSuspendPopUp->insertItem( "Off", 0 ); mSuspendPopUp->insertItem( " 1x", 1 ); diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index 06ef91b..ac65797 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h @@ -31,5 +31,4 @@ class QLabel; class QTimer; -class QPopupMenu; class AlarmDialog; class SimpleAlarmDaemonImpl : public QLabel @@ -77,5 +76,5 @@ class SimpleAlarmDaemonImpl : public QLabel int mTimerTime; int getFileNameLen( QString ); - QPopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; + Q3PopupMenu* mPopUp, *mBeepPopUp, *mTimerPopUp, *mSoundPopUp,*mPausePopUp,*mSuspendPopUp, *mFontsizePopup; QDateTime mRunningTimer; void fillTimerPopUp(); diff --git a/kdepim-desktop.pro b/kdepim-desktop.pro index 4a5ceef..05d8357 100644 --- a/kdepim-desktop.pro +++ b/kdepim-desktop.pro @@ -20,5 +20,7 @@ win32:{ 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 @@ -13,6 +13,8 @@ /* QT */ -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kiconloader.h> #include <klocale.h> @@ -55,5 +57,5 @@ AbstractMail *POP3viewItem::getWrapper() } -void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & ) +void POP3viewItem::refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > & ) { refresh(); @@ -63,14 +65,14 @@ 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(); delete tmp; } - QValueList<FolderP>::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList<FolderP>::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) { @@ -87,7 +89,7 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) } -QPopupMenu * POP3viewItem::getContextMenu() +Q3PopupMenu * POP3viewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -109,8 +111,8 @@ QPopupMenu * POP3viewItem::getContextMenu() void POP3viewItem::disconnect() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; @@ -158,5 +160,5 @@ POP3folderItem::~POP3folderItem() {} -POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , QListViewItem*after ) +POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , Q3ListViewItem*after ) : AccountViewItem(folderInit,parent,after ) { @@ -173,5 +175,5 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , } -void POP3folderItem::refresh(QValueList<RecMailP>&target) +void POP3folderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) @@ -184,7 +186,7 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail) } -QPopupMenu * POP3folderItem::getContextMenu() +Q3PopupMenu * POP3folderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -262,5 +264,5 @@ AbstractMail *NNTPviewItem::getWrapper() } -void NNTPviewItem::refresh( QValueList<RecMailP> & ) +void NNTPviewItem::refresh( Q3ValueList<RecMailP> & ) { refresh(); @@ -270,15 +272,15 @@ 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(); delete tmp; } - QValueList<FolderP>::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList<FolderP>::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) { @@ -295,7 +297,7 @@ RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail ) } -QPopupMenu * NNTPviewItem::getContextMenu() +Q3PopupMenu * NNTPviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -327,8 +329,8 @@ void NNTPviewItem::subscribeGroups() void NNTPviewItem::disconnect() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; @@ -369,5 +371,5 @@ NNTPfolderItem::~NNTPfolderItem() {} -NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , QListViewItem*after ) +NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , Q3ListViewItem*after ) : AccountViewItem( folderInit, parent,after ) { @@ -384,5 +386,5 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent } -void NNTPfolderItem::refresh(QValueList<RecMailP>&target) +void NNTPfolderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) @@ -395,7 +397,7 @@ RECBODYP NNTPfolderItem::fetchBody(const RecMailP&aMail) } -QPopupMenu * NNTPfolderItem::getContextMenu() +Q3PopupMenu * NNTPfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -454,5 +456,5 @@ AbstractMail *IMAPviewItem::getWrapper() } -void IMAPviewItem::refresh(QValueList<RecMailP>&) +void IMAPviewItem::refresh(Q3ValueList<RecMailP>&) { refreshFolders(false); @@ -471,9 +473,9 @@ void IMAPviewItem::refreshFolders(bool force) removeChilds(); 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; int pos; @@ -514,7 +516,7 @@ void IMAPviewItem::refreshFolders(bool force) } -QPopupMenu * IMAPviewItem::getContextMenu() +Q3PopupMenu * IMAPviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -616,5 +618,5 @@ 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 ) { @@ -631,5 +633,5 @@ 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 ) { @@ -654,5 +656,5 @@ const QString& IMAPfolderItem::Delemiter()const } -void IMAPfolderItem::refresh(QValueList<RecMailP>&target) +void IMAPfolderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) @@ -671,7 +673,7 @@ RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail) } -QPopupMenu * IMAPfolderItem::getContextMenu() +Q3PopupMenu * IMAPfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -722,5 +724,5 @@ void IMAPfolderItem::deleteFolder() if (imap->getWrapper()->deleteMbox(folder)) { - QListView*v=listView(); + Q3ListView*v=listView(); IMAPviewItem * box = imap; /* be carefull - after that this object is destroyd so don't use @@ -801,5 +803,5 @@ AbstractMail *MHviewItem::getWrapper() } -void MHviewItem::refresh( QValueList<RecMailP> & target) +void MHviewItem::refresh( Q3ValueList<RecMailP> & target) { refresh(false); @@ -812,6 +814,6 @@ void MHviewItem::refresh(bool force) removeChilds(); currentFolders.clear(); - QValueList<FolderP> *folders = wrapper->listFolders(); - QValueList<FolderP>::ConstIterator it; + Q3ValueList<FolderP> *folders = wrapper->listFolders(); + Q3ValueList<FolderP>::ConstIterator it; MHfolderItem*item = 0; MHfolderItem*pmaster = 0; @@ -858,7 +860,7 @@ RECBODYP MHviewItem::fetchBody( const RecMailP &mail ) } -QPopupMenu * MHviewItem::getContextMenu() +Q3PopupMenu * MHviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -921,5 +923,5 @@ MHfolderItem::~MHfolderItem() {} -MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after ) +MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , Q3ListViewItem*after ) : AccountViewItem(folderInit, parent,after ) { @@ -928,5 +930,5 @@ 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 ) { @@ -968,5 +970,5 @@ const FolderP&MHfolderItem::getFolder()const } -void MHfolderItem::refresh(QValueList<RecMailP>&target) +void MHfolderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) @@ -990,5 +992,5 @@ void MHfolderItem::deleteFolder() if (mbox->getWrapper()->deleteMbox(folder)) { - QListView*v=listView(); + Q3ListView*v=listView(); MHviewItem * box = mbox; /* be carefull - after that this object is destroyd so don't use @@ -1003,7 +1005,7 @@ void MHfolderItem::deleteFolder() } -QPopupMenu * MHfolderItem::getContextMenu() +Q3PopupMenu * MHfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -1032,5 +1034,5 @@ void MHfolderItem::createFolder() if (mbox->getWrapper()->createMbox(ndir,folder)) { - QListView*v=listView(); + Q3ListView*v=listView(); MHviewItem * box = mbox; /* be carefull - after that this object is destroyd so don't use @@ -1079,5 +1081,5 @@ const QString AccountViewItem::contextName="AccountViewItem"; AccountViewItem::AccountViewItem( AccountView *parent ) - : QListViewItem( parent ) + : Q3ListViewItem( parent ) { init(); @@ -1085,18 +1087,18 @@ AccountViewItem::AccountViewItem( AccountView *parent ) } -AccountViewItem::AccountViewItem( QListViewItem *parent) - : QListViewItem( parent),folder(0) +AccountViewItem::AccountViewItem( Q3ListViewItem *parent) + : Q3ListViewItem( parent),folder(0) { init(); } -AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) - :QListViewItem( parent,after ),folder(0) +AccountViewItem::AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after ) + :Q3ListViewItem( parent,after ),folder(0) { init(); } -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) { init(); @@ -1141,8 +1143,8 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder) void AccountViewItem::removeChilds() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h index 4c92bfc..bbfd05f 100644 --- a/kmicromail/accountitem.h +++ b/kmicromail/accountitem.h @@ -3,6 +3,9 @@ -#include <qlistview.h> +#include <q3listview.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PopupMenu> #include <opie2/osmartpointer.h> #include <libmailwrapper/mailwrapper.h> @@ -11,5 +14,5 @@ class POP3wrapper; class RecMail; class RecBody; -class QPopupMenu; +class Q3PopupMenu; class Selectstore; class AccountView; @@ -22,17 +25,17 @@ class Folder; #define RECBODYP Opie::Core::OSmartPointer<RecBody> -class AccountViewItem : public QListViewItem +class AccountViewItem : public Q3ListViewItem { 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){} virtual AccountView*accountView(); @@ -57,8 +60,8 @@ public: POP3viewItem( POP3account *a, AccountView *parent ); 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); @@ -75,9 +78,9 @@ 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); @@ -94,8 +97,8 @@ public: NNTPviewItem( NNTPaccount *a, AccountView *parent ); 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); @@ -113,9 +116,9 @@ 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); @@ -133,8 +136,8 @@ public: IMAPviewItem( IMAPaccount *a, AccountView *parent ); 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); const QStringList&subFolders(); @@ -153,10 +156,10 @@ 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); virtual const QString& Delemiter()const; @@ -175,8 +178,8 @@ public: MHviewItem( const QString&aMboxPath, AccountView *parent ); 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); QStringList subFolders(); @@ -195,10 +198,10 @@ 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); virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index d1d4f7e..eea1f65 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp @@ -14,23 +14,25 @@ /* QT */ #include <qmessagebox.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcheckbox.h> #include <qtimer.h> #include <qspinbox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <klocale.h> #include <kmessagebox.h> 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 ) { //connect( this, SIGNAL( selectionChanged(QListViewItem*) ), // 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); } @@ -49,10 +51,10 @@ 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) { if (button==1) {return;} if (!item) return; AccountViewItem *view = static_cast<AccountViewItem *>(item); - QPopupMenu*m = view->getContextMenu(); + Q3PopupMenu*m = view->getContextMenu(); if (!m) return; connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); @@ -94,5 +96,5 @@ void AccountView::populate( QList<Account> list ) } -void AccountView::refresh(QListViewItem *item) +void AccountView::refresh(Q3ListViewItem *item) { if ( item ) @@ -146,5 +148,5 @@ void AccountView::refreshCurrentSelected() { if ( !m_currentItem ) return; - QValueList<RecMailP> headerlist; + Q3ValueList<RecMailP> headerlist; AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); view->refresh(headerlist); @@ -167,5 +169,5 @@ void AccountView::refreshAll() RecBodyP AccountView::fetchBody(const RecMailP&aMail) { - QListViewItem*item = selectedItem (); + Q3ListViewItem*item = selectedItem (); if (!item) return new RecBody(); AccountViewItem *view = static_cast<AccountViewItem *>(item); diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h index 33f3479..14b0ff9 100644 --- a/kmicromail/accountview.h +++ b/kmicromail/accountview.h @@ -2,6 +2,8 @@ #define ACCOUNTVIEW_H -#include <qlistview.h> +#include <q3listview.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> #include <opie2/osmartpointer.h> #include <libmailwrapper/mailtypes.h> @@ -14,10 +16,10 @@ class IMAPviewItem; class MHviewItem; -class AccountView : public QListView +class AccountView : public Q3ListView { Q_OBJECT 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(); virtual void populate( QList<Account> list ); @@ -26,22 +28,22 @@ public: virtual void downloadMailsInbox(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); 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(); virtual void refreshCurrentSelected(); virtual void refreshOutgoing(); - virtual void slotHold(int, QListViewItem *,const QPoint&,int); + virtual void slotHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotContextMenu(int id); void setupFolderselect(Selectstore*sels); 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 @@ -39,12 +39,12 @@ #include <qcombobox.h> #include <qcheckbox.h> -#include <qiconset.h> +#include <qicon.h> #include <qtimer.h> #include <qmessagebox.h> #include <qpushbutton.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include <qlabel.h> #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> //using namespace Opie::Core; @@ -126,5 +126,5 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo mMail = 0; warnAttach = true; - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); icon = SmallIcon("filesave"); @@ -142,5 +142,5 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo #endif message->setFont ( KOPrefs::instance()->mComposeFont ); - message->setWordWrap (QMultiLineEdit::WidgetWidth); + message->setWordWrap (Q3MultiLineEdit::WidgetWidth); if ( smtpAccounts.count() > 0 ) { fillValues( smtpAccountBox->currentItem() ); @@ -535,6 +535,6 @@ void ComposeMail::reEditMail(const RecMailP¤t) } -AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) - : QListViewItem( parent ) +AttachViewItem::AttachViewItem( Q3ListView *parent, Attachment *att ) + : Q3ListViewItem( parent ) { attachment = att; diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h index 966ac3e..9aef4e1 100644 --- a/kmicromail/composemail.h +++ b/kmicromail/composemail.h @@ -3,5 +3,5 @@ #include <qlineedit.h> -#include <qlistview.h> +#include <q3listview.h> #include "composemailui.h" @@ -81,8 +81,8 @@ 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 @@ -17,5 +17,5 @@ #include <qlabel.h> #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> #include <qspinbox.h> #include <klocale.h> @@ -26,6 +26,6 @@ using namespace Opie::Core; -AccountListItem::AccountListItem( QListView *parent, Account *a) - : QListViewItem( parent ) +AccountListItem::AccountListItem( Q3ListView *parent, Account *a) + : Q3ListViewItem( parent ) { account = a; @@ -52,5 +52,5 @@ 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 ) { @@ -309,5 +309,5 @@ 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 ) { @@ -326,5 +326,5 @@ 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 ) { @@ -409,5 +409,5 @@ 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 ) { @@ -490,5 +490,5 @@ 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 ) { @@ -499,5 +499,5 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, // fillValues(); - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); icon = SmallIcon("fileopen"); @@ -573,5 +573,5 @@ 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 ) { @@ -594,6 +594,6 @@ void NNTPconfig::slotShowSub() ListViewGroups->clear(); 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 ); } @@ -607,7 +607,7 @@ void NNTPconfig::slotShowFilter() int count = 0; 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; if ( subscribedGroups.contains( (*it) ) >= 1 ) { @@ -630,6 +630,6 @@ 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 ) { item->setOn( true ); @@ -664,6 +664,6 @@ void NNTPconfig::fillValues() /* don't forget that - you will overwrite values if user clicks cancel! */ 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 ); } @@ -680,9 +680,9 @@ void NNTPconfig::save() data->setPassword( passLine->text() ); - QListViewItemIterator list_it( ListViewGroups ); + Q3ListViewItemIterator list_it( ListViewGroups ); for ( ; list_it.current(); ++list_it ) { - if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { + if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) { if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) subscribedGroups.append( list_it.current()->text(0) ); diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h index 465780c..3d01d23 100644 --- a/kmicromail/editaccounts.h +++ b/kmicromail/editaccounts.h @@ -3,5 +3,5 @@ #include <qstring.h> -#include <qlistview.h> +#include <q3listview.h> #include "editaccountsui.h" @@ -16,9 +16,9 @@ -class AccountListItem : public QListViewItem +class AccountListItem : public Q3ListViewItem { public: - AccountListItem( QListView *parent, Account *a); + AccountListItem( Q3ListView *parent, Account *a); Account *getAccount() { return account; } @@ -33,5 +33,5 @@ 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 ); public slots: @@ -61,5 +61,5 @@ 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 ); private slots: @@ -76,5 +76,5 @@ 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 ); public slots: @@ -95,5 +95,5 @@ 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 ); public slots: @@ -114,5 +114,5 @@ 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 ); public slots: @@ -134,5 +134,5 @@ 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 ); public slots: diff --git a/kmicromail/kmicromail.pro b/kmicromail/kmicromail.pro index 9f4d4bd..ce30bbf 100644 --- a/kmicromail/kmicromail.pro +++ b/kmicromail/kmicromail.pro @@ -42,5 +42,6 @@ SOURCES = main.cpp \ nntpgroupsdlg.cpp -INTERFACES = editaccountsui.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = editaccountsui.ui \ selectmailtypeui.ui \ imapconfigui.ui \ @@ -57,5 +58,5 @@ 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 DESTDIR= ../bin @@ -77,2 +78,7 @@ 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 @@ -56,5 +56,5 @@ 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) #LIBS += -lqtopia diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index e4b61dc..e2eed9a 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp @@ -27,5 +27,5 @@ #endif #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qstring.h> diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 017f1f7..e3102a4 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp @@ -24,14 +24,14 @@ #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #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> #include <qspinbox.h> @@ -40,6 +40,11 @@ #include <qradiobutton.h> #include <qpushbutton.h> -#include <qstrlist.h> +#include <q3strlist.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <QPixmap> +#include <Q3Frame> #include <kcolorbutton.h> @@ -112,7 +117,7 @@ void KOPrefsDialog::setupGlobalTab() 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()); topLayout->setMargin(marginHint()); @@ -137,7 +142,7 @@ void KOPrefsDialog::setupMainTab() 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()); topLayout->setMargin(marginHint()); @@ -183,8 +188,8 @@ 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); topLayout->setMargin(3); @@ -239,6 +244,6 @@ void KOPrefsDialog::usrWriteConfig() 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()); topLayout->setMargin(marginHint()); @@ -293,6 +298,6 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); 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()); topLayout->setMargin(marginHint()); @@ -332,5 +337,5 @@ void KOPrefsDialog::setupLocaleTab() else { QWidget * hb = new QWidget( topFrame ); - QHBoxLayout *hbLayout = new QHBoxLayout(hb); + Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); sb = addWidBool(i18n("Week starts on Sunday"), @@ -362,7 +367,7 @@ void KOPrefsDialog::setupSyncAlgTab() #if 0 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()); topLayout->setMargin(marginHint()); @@ -404,6 +409,6 @@ void KOPrefsDialog::setupSyncTab() #if 0 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()); topLayout->setMargin(marginHint()); @@ -452,8 +457,8 @@ void KOPrefsDialog::setupSyncTab() 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()); topLayout->setMargin(marginHint()); @@ -476,9 +481,9 @@ void KOPrefsDialog::setupMainTab() topLayout->addWidget(mEmailEdit,1,1); 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); } @@ -492,5 +497,5 @@ void KOPrefsDialog::setupMainTab() - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in What's Next:"),dummy); mWhatsNextSpin = new QSpinBox(1,14,1,dummy); @@ -500,5 +505,5 @@ void KOPrefsDialog::setupMainTab() - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); mNextXDaysSpin = new QSpinBox(2,14,1,dummy); @@ -506,5 +511,5 @@ void KOPrefsDialog::setupMainTab() topLayout->addMultiCellWidget(dummy,4,4,0,1); - QHBox *prioBox = new QHBox(topFrame); + Q3HBox *prioBox = new Q3HBox(topFrame); // intervalBox->setSpacing(spacingHint()); topLayout->addMultiCellWidget(prioBox,5,5,0,1); @@ -530,5 +535,5 @@ void KOPrefsDialog::setupMainTab() // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); - QHBox *intervalBox = new QHBox(topFrame); + Q3HBox *intervalBox = new Q3HBox(topFrame); // intervalBox->setSpacing(spacingHint()); topLayout->addMultiCellWidget(intervalBox,6,6,0,1); @@ -621,12 +626,12 @@ void KOPrefsDialog::setupMainTab() 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()); topLayout->setMargin(marginHint()); - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); KPrefsWidTime *dayBegins = addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), @@ -659,5 +664,5 @@ void KOPrefsDialog::setupTimeTab() - QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, + Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, i18n("Working Hours"), topFrame); @@ -665,14 +670,14 @@ void KOPrefsDialog::setupTimeTab() workingHoursGroup->layout()->setSpacing( 0 ); workingHoursGroup->layout()->setMargin( 4 ); - QHBox *workStartBox = new QHBox(workingHoursGroup); + Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); // workStartBox->setMargin( 0 ); addWidTime(i18n("Daily starting hour:"), &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); - QHBox *workEndBox = new QHBox(workingHoursGroup); + Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); //workEndBox->setMargin( 0 ); addWidTime(i18n("Daily ending hour:"), &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); - QVBox *excludeBox = new QVBox(workingHoursGroup); + Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); //excludeBox->setMargin( 0 ); addWidBool(i18n("Exclude holidays"), @@ -694,8 +699,8 @@ 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()); topLayout->setMargin(marginHint()); @@ -786,5 +791,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,6,1); + topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); @@ -839,10 +844,10 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; QLabel *lab; - QHBox *habo = new QHBox( topFrame ); + Q3HBox *habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() < 320 ) { lab = new QLabel ( i18n("Show events that recur "), topFrame ); @@ -866,5 +871,5 @@ void KOPrefsDialog::setupViewsTab() - habo = new QHBox( topFrame ); + habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() < 320 ) { lab = new QLabel (i18n("Show in every cell ") , topFrame ); @@ -934,5 +939,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); @@ -966,5 +971,5 @@ void KOPrefsDialog::setupViewsTab() addWidColor(i18n("Todo due today color:"), &(KOPrefs::instance()->mTodoDueTodayColor),wid); - QHBoxLayout *widLayout = new QHBoxLayout(wid); + Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); widLayout->addWidget( todoDueTodayColor->button() ); @@ -974,5 +979,5 @@ void KOPrefsDialog::setupViewsTab() // Todo overdue color wid = new QWidget( topFrame ); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); KPrefsWidColor *todoOverdueColor = addWidColor(i18n("Todo overdue color:"), @@ -998,5 +1003,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); @@ -1011,26 +1016,26 @@ void KOPrefsDialog::setupViewsTab() topLayout->addWidget(lab ,iii++,0); #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) ); #endif - QHBox* dummyBox = new QHBox(topFrame); + Q3HBox* dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); @@ -1043,5 +1048,5 @@ void KOPrefsDialog::setupViewsTab() - QHBox* hbo = new QHBox ( topFrame ); + Q3HBox* hbo = new Q3HBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); @@ -1083,8 +1088,8 @@ 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); topLayout->setMargin(3); @@ -1153,5 +1158,5 @@ void KOPrefsDialog::setupFontsTab() DesktopIcon("fonts",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,7,3); + topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); @@ -1221,8 +1226,8 @@ void KOPrefsDialog::setupFontsTab() 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()); // topLayout->setMargin(marginHint()); @@ -1232,7 +1237,7 @@ 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); topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); @@ -1327,5 +1332,5 @@ void KOPrefsDialog::setupPrinterTab() DesktopIcon("fileprint",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); @@ -1337,8 +1342,8 @@ 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()); topLayout->setMargin(marginHint()); @@ -1363,5 +1368,5 @@ 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); topLayout->addMultiCellWidget(mAMails,3,3,0,1); @@ -1381,5 +1386,5 @@ void KOPrefsDialog::setupGroupSchedulingTab() connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); - connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); + connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); #endif } @@ -1388,8 +1393,8 @@ 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()); topLayout->setMargin(marginHint()); @@ -1544,5 +1549,5 @@ void KOPrefsDialog::usrWriteConfig() //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); - QDictIterator<QColor> it(mCategoryDict); + Q3DictIterator<QColor> it(mCategoryDict); while (it.current()) { KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); @@ -1684,12 +1689,12 @@ void KOPrefsDialog::updateTimezoneOffset( int index ) 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()); topLayout->setMargin(marginHint()); - 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 @@ -24,8 +24,10 @@ #define _KOPREFSDIALOG_H -#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> #include <kdialogbase.h> @@ -120,5 +122,5 @@ protected: KPrefsWidBool *mEnableProjectView; - QFrame *mPrinterTab; + Q3Frame *mPrinterTab; QLineEdit *nameEdit; @@ -147,5 +149,5 @@ protected: QComboBox *mCategoryCombo; KColorButton *mCategoryButton; - QDict<QColor> mCategoryDict; + Q3Dict<QColor> mCategoryDict; QSlider *mHourSizeSlider; 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 @@ -4,5 +4,5 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj 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 @@ -4,5 +4,5 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj/$(PLATFORM) diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 870985e..746d2ae 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp @@ -9,11 +9,13 @@ -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qapplication.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <klocale.h> #include <kdecore/kstandarddirs.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <stdlib.h> #include <libetpan/mailmime_content.h> @@ -112,8 +114,8 @@ 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); return "{" + stream.read().stripWhiteSpace() + "}"; @@ -139,8 +141,8 @@ 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) { //qDebug("AbstractMail::deleteMailList:: Please reimplement! "); @@ -148,5 +150,5 @@ void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) int iii = 0; int count = target.count(); - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); wid.show(); @@ -178,5 +180,5 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe return; } - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); if ( t.count() == 0 ) { @@ -188,8 +190,8 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe qDebug(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); 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; int count = t.count(); @@ -222,5 +224,5 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe #if 0 - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; listMessages(fromFolder->getName(),t, maxSizeInKb); mvcpMailList( t,targetFolder,targetWrapper,moveit); @@ -231,10 +233,10 @@ void AbstractMail::mvcpAllMails(const FolderP&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) { - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; listMessages(fromFolder->getName(),t, maxSizeInKb); mvcpMailList( t,targetFolder,targetWrapper,moveit); } -void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, +void AbstractMail::mvcpMailList(const Q3ValueList<RecMailP>& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { @@ -247,5 +249,5 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Copying...")); wid.show(); 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 @@ -8,4 +8,6 @@ #include <qobject.h> +//Added by qt3to4: +#include <Q3ValueList> #include <opie2/osmartpointer.h> #include "mailtypes.h" @@ -26,6 +28,6 @@ public: AbstractMail(){}; 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; virtual RecBodyP fetchBody(const RecMailP&mail)=0; @@ -36,8 +38,8 @@ 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; virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; @@ -45,5 +47,5 @@ public: virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, 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); virtual void mvcpMail(const RecMailP&mail,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 @@ -8,4 +8,6 @@ #include <stdlib.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> using namespace Opie::Core; @@ -229,5 +231,5 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { mailmime_parameter *param; int err; - QCString __str; + Q3CString __str; //qDebug(" Generatemail::buildTxtPart %s", str.latin1()); param = mailmime_parameter_new( strdup( "charset" ), @@ -253,5 +255,5 @@ 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 @@ -7,4 +7,6 @@ #include <kglobal.h> #include <kstandarddirs.h> +//Added by qt3to4: +#include <Q3ValueList> @@ -183,5 +185,5 @@ 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) { if (current_rec >= 10) { @@ -201,5 +203,5 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m case MAILMIME_SINGLE: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); r = mailmessage_fetch_section(message,mime,&data,&len); @@ -251,5 +253,5 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m unsigned int ccount = 1; 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)) { cbody = (mailmime*)clist_content(cur); @@ -271,5 +273,5 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m case MAILMIME_MESSAGE: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); /* the own header is always at recursion 0 - we don't need that */ @@ -303,5 +305,5 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) //memset(&fields, 0, sizeof(struct mailmime_single_fields)); err = mailmessage_get_bodystructure(msg,&mime); - QValueList<int>recList; + Q3ValueList<int>recList; traverseBody(body,msg,mime,recList); return body; @@ -448,5 +450,5 @@ 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) { int r; 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 @@ -6,4 +6,6 @@ #include <qmap.h> #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libetpan/clist.h> @@ -52,9 +54,9 @@ protected: QString parseAddressList( mailimf_address_list *list ); - 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); static void fillParameters(RecPartP&target,clist*parameters); 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 @@ -4,8 +4,10 @@ #include <qpe/global.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> #include "imapwrapper.h" #include "mailtypes.h" #include "logindialog.h" -#include <qprogressbar.h> +#include <q3progressbar.h> #include "genericwrapper.h" #include <kglobal.h> @@ -240,5 +242,5 @@ 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) { @@ -321,5 +323,5 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma } -QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() { const char *path, *mask; @@ -330,5 +332,5 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() mailimap_mbx_list_flags*bflags = 0; - QValueList<FolderP>* folders = new QValueList<FolderP>(); + Q3ValueList<FolderP>* folders = new Q3ValueList<FolderP>(); login(); if (!m_imap) { @@ -614,5 +616,5 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) msg_att = (mailimap_msg_att*)current->data; 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; traverseBody(mail,body_desc,body,0,path); @@ -665,5 +667,5 @@ 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) { encodedString*res=new encodedString; @@ -739,5 +741,5 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int current_count means the position inside the internal loop! */ 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) { if (!body || current_recursion>=10) { @@ -747,5 +749,5 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t case MAILIMAP_BODY_1PART: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); RecPartP currentPart = new RecPart(); @@ -800,5 +802,5 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t case MAILIMAP_BODY_MPART: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; clistcell*current=0; mailimap_body*current_body=0; @@ -986,5 +988,5 @@ void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which target_part->setSize(which->bd_size); } -void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) +void IMAPwrapper::deleteMailList(const Q3ValueList<RecMailP>&target) { //#if 0 @@ -1006,5 +1008,5 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) progress( i18n("Delete")); - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); wid.show(); @@ -1115,5 +1117,5 @@ 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) { QString body(""); @@ -1300,5 +1302,5 @@ 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 @@ -4,4 +4,6 @@ #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> #include "mailwrapper.h" #include "abstractmail.h" @@ -25,10 +27,10 @@ public: IMAPwrapper( IMAPaccount *a ); 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"); virtual void deleteMail(const RecMailP&mail); - void deleteMailList(const QValueList<RecMailP>&target); + void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); @@ -60,6 +62,6 @@ protected: bool start_tls(bool force=true); - 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); @@ -69,5 +71,5 @@ protected: void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which); 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); /* just helpers */ 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 @@ -39,5 +39,6 @@ SOURCES = imapwrapper.cpp \ ../qpe/global.cpp -INTERFACES = logindialogui.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = logindialogui.ui \ sendmailprogressui.ui @@ -64,2 +65,7 @@ OBJECTS_DIR = obj/win 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 @@ -7,5 +7,5 @@ //using namespace Opie::Core; -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 @@ -9,5 +9,5 @@ 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; } QString getPassword() { return _pass; } 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 @@ -4,4 +4,6 @@ #include <stdlib.h> +//Added by qt3to4: +#include <Q3ValueList> using namespace Opie::Core; @@ -284,10 +286,10 @@ const QString RecPart::searchParamter(const QString&key)const } -void RecPart::setPositionlist(const QValueList<int>&poslist) +void RecPart::setPositionlist(const Q3ValueList<int>&poslist) { m_poslist = poslist; } -const QValueList<int>& RecPart::Positionlist()const +const Q3ValueList<int>& RecPart::Positionlist()const { return m_poslist; @@ -324,5 +326,5 @@ const QString& RecBody::Bodytext()const } -void RecBody::setParts(const QValueList<RecPartP>&parts) +void RecBody::setParts(const Q3ValueList<RecPartP>&parts) { m_PartsList.clear(); @@ -330,5 +332,5 @@ void RecBody::setParts(const QValueList<RecPartP>&parts) } -const QValueList<RecPartP>& RecBody::Parts()const +const Q3ValueList<RecPartP>& RecBody::Parts()const { return m_PartsList; 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 @@ -15,5 +15,5 @@ #include <qstringlist.h> #include <qmap.h> -#include <qvaluelist.h> +#include <q3valuelist.h> class AbstractMail; @@ -110,5 +110,5 @@ protected: part_plist_t m_Parameters; /* describes the position in the mail */ - QValueList<int> m_poslist; + Q3ValueList<int> m_poslist; public: @@ -137,6 +137,6 @@ public: void addParameter(const QString&key,const QString&value); 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; }; @@ -148,5 +148,5 @@ protected: QString m_BodyText; QString mCharset; - QValueList<RecPartP> m_PartsList; + Q3ValueList<RecPartP> m_PartsList; RecPartP m_description; @@ -163,6 +163,6 @@ public: const RecPartP& Description()const; - 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 @@ -6,4 +6,6 @@ #include <string.h> #include <qdir.h> +//Added by qt3to4: +#include <Q3CString> #include "mailwrapper.h" @@ -82,6 +84,6 @@ QString IMAPFolder::decodeFolderName( const QString &name ) unsigned char base64[256], utf8[6]; unsigned long srcPtr = 0; - QCString dst = ""; - QCString src = name.ascii(); + Q3CString dst = ""; + Q3CString src = name.ascii(); /* initialize modified base64 decoding table */ @@ -93,7 +95,7 @@ QString IMAPFolder::decodeFolderName( const QString &name ) /* loop until end of string */ 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 */ dst += c; @@ -106,5 +108,5 @@ QString IMAPFolder::decodeFolderName( const QString &name ) bitcount = 0; ucs4 = 0; - while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { + while ((c = base64[(unsigned char) src.at(srcPtr)]) != UNDEFINED) { ++srcPtr; bitbuf = (bitbuf << 6) | c; @@ -150,5 +152,5 @@ 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 @@ -7,4 +7,6 @@ #include <qdatetime.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <QPixmap> #include <kiconloader.h> @@ -62,5 +64,5 @@ public: virtual ~Mail(){} 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 ); } const QString&getName()const { return name; } @@ -87,5 +89,5 @@ public: private: - QList<Attachment> attList; + QList<Attachment*> attList; QString name, mail, to, cc, bcc, reply, subject, message, charset; QStringList m_in_reply_to; 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 @@ -4,4 +4,6 @@ #include <libetpan/libetpan.h> #include <qdir.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #include <klocale.h> @@ -24,5 +26,5 @@ MBOXwrapper::~MBOXwrapper() } -void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &target ) +void MBOXwrapper::listMessages(const QString & mailbox, Q3ValueList<RecMailP> &target ) { mailstorage*storage = mailstorage_new(NULL); @@ -49,7 +51,7 @@ 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); if (!dir.exists()) return folders; @@ -218,5 +220,5 @@ 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) { QString p = MBOXPath+"/"; @@ -232,9 +234,9 @@ 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) { if (!f) return; int r; - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it != target.end();++it) { r = mailmbox_delete_msg(f,(*it)->getNumber()); 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 @@ -4,4 +4,6 @@ #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> class encodedString; @@ -16,6 +18,6 @@ public: virtual ~MBOXwrapper(); - 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"); @@ -33,5 +35,5 @@ 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>&); virtual MAILLIB::ATYPE getType()const; @@ -40,5 +42,5 @@ public: protected: - static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); + static void deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target); QString MBOXPath; QString MBOXName; 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 @@ -6,4 +6,6 @@ #include <qdir.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #include <qpe/global.h> @@ -65,5 +67,5 @@ 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 ) { init_storage(); @@ -81,7 +83,7 @@ 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! */ if (m_storage) mailstorage_disconnect(m_storage); @@ -256,5 +258,5 @@ 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) { QString f = buildPath(mailbox); @@ -264,5 +266,5 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> & return; } - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it!=target.end();++it) { r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); 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 @@ -7,4 +7,6 @@ #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> class encodedString; @@ -17,6 +19,6 @@ public: virtual ~MHwrapper(); - 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"); @@ -37,5 +39,5 @@ 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>&); virtual MAILLIB::ATYPE getType()const; diff --git a/kmicromail/libmailwrapper/nntpwrapper.cpp b/kmicromail/libmailwrapper/nntpwrapper.cpp index 93cd2b5..b328ecd 100644 --- a/kmicromail/libmailwrapper/nntpwrapper.cpp +++ b/kmicromail/libmailwrapper/nntpwrapper.cpp @@ -5,4 +5,6 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> @@ -61,5 +63,5 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { msg_cache.remove(); } - msg_cache.open(IO_ReadWrite|IO_Truncate); + msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); last_msg_id = mail->getNumber(); err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg); @@ -68,5 +70,5 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { } else { QString msg=""; - msg_cache.open(IO_ReadOnly); + msg_cache.open(QIODevice::ReadOnly); message = new char[4096]; memset(message,0,4096); @@ -100,5 +102,5 @@ 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) { login(); @@ -187,7 +189,7 @@ 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; if (account) { 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 @@ -6,4 +6,6 @@ #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libetpan/clist.h> @@ -22,7 +24,7 @@ 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 */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 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 @@ -10,6 +10,8 @@ #include <qpe/global.h> #include <qfile.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> /* we don't fetch messages larger than 5 MB */ @@ -63,5 +65,5 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { msg_cache.remove(); } - msg_cache.open(IO_ReadWrite|IO_Truncate); + msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); last_msg_id = mail->getNumber(); err = mailsession_get_message(m_pop3->sto_session, mail->getNumber(), &mailmsg); @@ -70,5 +72,5 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { } else { QString msg=""; - msg_cache.open(IO_ReadOnly); + msg_cache.open(QIODevice::ReadOnly); message = new char[4096]; memset(message,0,4096); @@ -101,5 +103,5 @@ 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 ) { login(); @@ -188,6 +190,6 @@ 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","/"); folders->append(inb); @@ -195,5 +197,5 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { } -void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) +void POP3wrapper::deleteMailList(const Q3ValueList<RecMailP>&target) { login(); @@ -203,5 +205,5 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) int count = target.count(); - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); wid.show(); @@ -247,5 +249,5 @@ int POP3wrapper::deleteAllMail(const FolderP&) { - QProgressBar wid ( result ); + Q3ProgressBar wid ( result ); wid.setCaption( i18n("Deleting ...")); wid.show(); 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 @@ -6,4 +6,6 @@ #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> class encodedString; @@ -19,11 +21,11 @@ public: virtual ~POP3wrapper(); /* 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 */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); 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); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); 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,4 +1,4 @@ #include "sendmailprogress.h" -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlabel.h> #include <klocale.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 @@ -3,5 +3,5 @@ #include <qtextcodec.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> @@ -377,9 +377,9 @@ QString SMTPaccount::getSignature() QFile file( signature ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return QString(); } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); QString text = ts.read(); @@ -400,9 +400,9 @@ 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() ); return ; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); tsIn << b ; 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 @@ -10,4 +10,6 @@ #include <qapplication.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #ifndef DESKTOP_VERSION @@ -435,6 +437,6 @@ bool SMTPwrapper::flushOutbox() { } QString oldPw, oldUser; - QValueList<RecMailP> mailsToSend; - QValueList<RecMailP> mailsToRemove; + Q3ValueList<RecMailP> mailsToSend; + Q3ValueList<RecMailP> mailsToRemove; QString mbox("Outgoing"); wrap->listMessages(mbox,mailsToSend); diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp index 41cee52..d8eee7d 100644 --- a/kmicromail/mailistviewitem.cpp +++ b/kmicromail/mailistviewitem.cpp @@ -2,10 +2,10 @@ #include "mailistviewitem.h" #include <libmailwrapper/abstractmail.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kiconloader.h> #include "koprefs.h" //#include <qpe/resource.h> -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 @@ -10,5 +10,5 @@ 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 @@ -4,4 +4,6 @@ #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <Q3CString> #include <libkdepim/externalapphandler.h> #include <stdlib.h> @@ -24,4 +26,5 @@ void dumpMissing(); //using namespace Opie::Core; int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION @@ -52,5 +55,5 @@ int main( int argc, char **argv ) { #ifndef DESKTOP_VERSION //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 & ))); a.showMainWidget(&mw ); diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index d547dda..627d92e 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -2,8 +2,14 @@ // CHANGED 2004-08-06 Lutz Rogowski #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> #include <kiconloader.h> @@ -28,6 +34,6 @@ extern QStatusBar* globalSstatusBarMainWindow; #include "koprefs.h" -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 ) { #ifdef DESKTOP_VERSION @@ -37,9 +43,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) setToolBarsMovable( false ); //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 ); @@ -115,5 +121,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 0, 0, this ); editAccounts->addTo( settingsMenu ); - codecMenu = new QPopupMenu( menuBar ); + codecMenu = new Q3PopupMenu( menuBar ); codecMenu->insertItem( "Western (iso-8859-1)",0,0); codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); @@ -126,5 +132,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //setCentralWidget( view ); - QVBox* wrapperBox = new QVBox( this ); + Q3VBox* wrapperBox = new Q3VBox( this ); setCentralWidget( wrapperBox ); @@ -140,5 +146,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { QWidget* infoBox = new QWidget( splithor ); - QGridLayout *griLay = new QGridLayout( infoBox, 2,2); + Q3GridLayout *griLay = new Q3GridLayout( infoBox, 2,2); if ( KOPrefs::instance()->mShowInfoSub ) { griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); @@ -169,10 +175,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) mailView = new KListView( split ); 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); //mailView->setSorting(-1); @@ -180,5 +186,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) statusWidget = new StatusWidget( wrapperBox ); statusWidget->hide(); - mailView->setSelectionMode( QListView::Multi ); + mailView->setSelectionMode( Q3ListView::Multi ); mailView->setMultiSelection( true); mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor ); @@ -198,15 +204,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); #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*) ) ); connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); @@ -216,5 +222,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //mailView->setMultiSelection ( true ); //mailView->setSelectionMode( QListView::Extended ); - QValueList<int> list; + Q3ValueList<int> list; int fw = 100; if ( QApplication::desktop()->width() > 320 ) @@ -236,5 +242,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) - QPopupMenu* helpMenu = new QPopupMenu( menuBar ); + Q3PopupMenu* helpMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Help" ), helpMenu ); QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); @@ -260,5 +266,5 @@ MainWindow::~MainWindow() } -void MainWindow::setInfoFields(QListViewItem* item ) +void MainWindow::setInfoFields(Q3ListViewItem* item ) { if ( item == 0) { @@ -346,5 +352,5 @@ void MainWindow::showEtpanLicence() } -void MainWindow::appMessage(const QCString &, const QByteArray &) +void MainWindow::appMessage(const Q3CString &, const QByteArray &) { qDebug("appMessage implemented by subclass"); @@ -406,10 +412,10 @@ void MainWindow::slotShowFolders( bool ) } -void MainWindow::refreshMailView(const QValueList<RecMailP>&) +void MainWindow::refreshMailView(const Q3ValueList<RecMailP>&) { qDebug("not implemented: "); } -void MainWindow::mailLeftClicked(QListViewItem * ) +void MainWindow::mailLeftClicked(Q3ListViewItem * ) { qDebug("not implemented: "); @@ -426,5 +432,5 @@ void MainWindow::slotDeleteMail() } -void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) +void MainWindow::mailHold(int, Q3ListViewItem *,const QPoint&,int ) { qDebug("not implemented: "); diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index f65f3b4..1ccadc2 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h @@ -4,10 +4,14 @@ #define MAINWINDOW_H -#include <qmainwindow.h> +#include <q3mainwindow.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> +#include <Q3PopupMenu> #include <klistview.h> #include <qaction.h> #include <qlineedit.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #ifdef DESKTOP_VERSION #include <qmenubar.h> @@ -25,10 +29,10 @@ class RecMail; -class MainWindow : public QMainWindow +class MainWindow : public Q3MainWindow { Q_OBJECT 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(); @@ -36,13 +40,13 @@ public slots: virtual void slotAdjustColumns(); virtual void slotAdjustColumnsWide(); - virtual void appMessage(const QCString &msg, const QByteArray &data); + virtual void appMessage(const Q3CString &msg, const QByteArray &data); virtual void slotComposeMail(); protected slots: - virtual void setInfoFields(QListViewItem* ); + virtual void setInfoFields(Q3ListViewItem* ); virtual void slotSendQueued(); virtual void slotEditAccounts(); virtual void slotShowFolders( bool show ); - virtual void refreshMailView(const QValueList<RecMailP>&); + virtual void refreshMailView(const Q3ValueList<RecMailP>&); virtual void displayMail(); virtual void slotGetMail() = 0; @@ -51,9 +55,9 @@ protected slots: virtual void slotDeleteAllMail() = 0; virtual void slotSetCodec(int); - virtual void mailHold(int, QListViewItem *,const QPoint&,int); + virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotAdjustLayout(); virtual void slotEditSettings(); virtual void slotEditGlobalSettings(); - virtual void mailLeftClicked( QListViewItem * ); + virtual void mailLeftClicked( Q3ListViewItem * ); void showLicence(); void showAbout(); @@ -61,8 +65,8 @@ 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, *editSettings, *editAccounts, *syncFolders; diff --git a/kmicromail/nntpgroups.cpp b/kmicromail/nntpgroups.cpp index c729f79..d2213d4 100644 --- a/kmicromail/nntpgroups.cpp +++ b/kmicromail/nntpgroups.cpp @@ -2,10 +2,10 @@ #include <libmailwrapper/settings.h> -#include <qlistview.h> +#include <q3listview.h> #include <qlineedit.h> 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() { @@ -28,6 +28,6 @@ void NNTPGroups::slotGetNG() subscribedGroupsNotListed = subscribedGroups; 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 ) { item->setOn( true ); @@ -42,6 +42,6 @@ void NNTPGroups::fillGroups() subscribedGroups = m_Account->getGroups(); 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 ); } @@ -51,8 +51,8 @@ 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 @@ -13,5 +13,5 @@ class NNTPGroups:public NNTPGroupsUI Q_OBJECT 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(); /* must be called from external. diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp index f564b10..bfe1d35 100644 --- a/kmicromail/nntpgroupsdlg.cpp +++ b/kmicromail/nntpgroupsdlg.cpp @@ -6,4 +6,6 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name) @@ -12,5 +14,5 @@ NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * setCaption(i18n("Subscribed newsgroups")); m_Account = account; - QVBoxLayout*dlglayout = new QVBoxLayout(this); + Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this); dlglayout->setSpacing(2); dlglayout->setMargin(1); diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 75a75b9..f453be5 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -5,4 +5,9 @@ #define protected public #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3CString> +#include <QPixmap> +#include <Q3PopupMenu> #undef protected #include "koprefsdialog.h" @@ -28,5 +33,5 @@ #include <qtimer.h> #include <qcursor.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qregexp.h> #include <qpe/global.h> @@ -64,10 +69,10 @@ OpieMail::~OpieMail() } -void OpieMail::appMessage(const QCString &msg, const QByteArray &data) +void OpieMail::appMessage(const Q3CString &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) { // copied from old mail2 @@ -84,5 +89,5 @@ 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; // removing the whitespaces at beginning and end is needed! @@ -101,5 +106,5 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) { //qDebug(" newMail(QString)"); - QDataStream stream(data,IO_ReadOnly); + QDataStream stream(data,QIODevice::ReadOnly); stream >> mPendingName; // the format is @@ -280,5 +285,5 @@ void OpieMail::replyMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); @@ -332,5 +337,5 @@ void OpieMail::closeViewMail(ViewMail * vm) void OpieMail::slotDownloadMail( ) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { Global::statusMessage("Error: No item slected!"); @@ -373,5 +378,5 @@ void OpieMail::slotDownloadMail( ) void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { closeViewMail(vm); @@ -393,5 +398,5 @@ void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) void OpieMail::displayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); @@ -409,5 +414,5 @@ void OpieMail::displayNextMail(ViewMail * vm) void OpieMail::displayMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); @@ -433,5 +438,5 @@ void OpieMail::displayMail() else { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (item) ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); @@ -440,5 +445,5 @@ void OpieMail::displayMail() void OpieMail::slotGetAllMail() { - QListViewItem * item = folderView->firstChild(); + Q3ListViewItem * item = folderView->firstChild(); while ( item ){ ((AccountViewItem *)item)->contextMenuSelected( 101 ); @@ -448,5 +453,5 @@ void OpieMail::slotGetAllMail() void OpieMail::slotGetMail() { - QListViewItem * item = folderView->currentItem(); + Q3ListViewItem * item = folderView->currentItem(); if ( ! item ) return; ((AccountViewItem *)item)->contextMenuSelected( 101 ); @@ -465,5 +470,5 @@ 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 ) { @@ -493,5 +498,5 @@ void OpieMail::clearSelection() void OpieMail::selectAll() { - QListViewItem* item = mailView->firstChild (); + Q3ListViewItem* item = mailView->firstChild (); while ( item ) { mailView->setSelected ( item, true ); @@ -500,5 +505,5 @@ void OpieMail::selectAll() } -void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) +void OpieMail::mailHold(int button, Q3ListViewItem *item,const QPoint&,int ) { if (!mailView->currentItem()) return; @@ -507,5 +512,5 @@ void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) if (button!=2) {return;} if (!item) return; - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { @@ -554,10 +559,10 @@ void OpieMail::slotShowFolders( bool show ) } -void OpieMail::refreshMailView(const QValueList<RecMailP>&list) +void OpieMail::refreshMailView(const Q3ValueList<RecMailP>&list) { MailListViewItem*item = 0; mailView->clear(); - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it = list.begin(); it != list.end();++it) { @@ -569,5 +574,5 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list) } -void OpieMail::mailLeftClicked( QListViewItem *item ) +void OpieMail::mailLeftClicked( Q3ListViewItem *item ) { mailView->clearSelection(); @@ -615,5 +620,5 @@ 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 @@ -10,4 +10,7 @@ #include <viewmail.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> class ComposeMail; @@ -27,6 +30,6 @@ public slots: virtual void slotComposeMail(); 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); protected slots: @@ -44,8 +47,8 @@ protected slots: virtual void slotGetAllMail(); 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(); virtual void slotMoveCopyAllMail(); @@ -60,7 +63,7 @@ private: QString mPendingName; 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 @@ -15,5 +15,5 @@ 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 @@ -1,5 +1,5 @@ #include <qdialog.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qpushbutton.h> #include <klocale.h> @@ -7,5 +7,5 @@ #undef QDialog #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) { @@ -14,5 +14,5 @@ setOrientation ( Vertical ); - QHBox * hb = new QHBox ( this ); + Q3HBox * hb = new Q3HBox ( this ); QPushButton *ok = new QPushButton( i18n("OK"), hb ); QPushButton *cancel = new QPushButton( i18n("Cancel"), hb ); diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp index 10b6d79..ead723c 100644 --- a/kmicromail/selectsmtp.cpp +++ b/kmicromail/selectsmtp.cpp @@ -9,7 +9,7 @@ #include <qlabel.h> #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 @@ -12,5 +12,5 @@ class selectsmtp : public selectstoreui Q_OBJECT 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(); void setSelectionlist(QList<SMTPaccount>*list); diff --git a/kmicromail/selectstore.h b/kmicromail/selectstore.h index 447a6ae..d312c1d 100644 --- a/kmicromail/selectstore.h +++ b/kmicromail/selectstore.h @@ -3,5 +3,5 @@ #include "selectstoreui.h" -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qmap.h> #include <qstringlist.h> diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp index c593b48..889c490 100644 --- a/kmicromail/settingsdialog.cpp +++ b/kmicromail/settingsdialog.cpp @@ -3,4 +3,6 @@ #include <qlayout.h> #include <qtabwidget.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kconfig.h> @@ -13,5 +15,5 @@ -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 ) { @@ -19,5 +21,5 @@ SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, W QTabWidget *topFrame = TabWidget2; - QGridLayout *topLayout = new QGridLayout(topFrame,3,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,3); topLayout->setSpacing(2); topLayout->setMargin(3); diff --git a/kmicromail/settingsdialog.h b/kmicromail/settingsdialog.h index 042b69f..b168226 100644 --- a/kmicromail/settingsdialog.h +++ b/kmicromail/settingsdialog.h @@ -12,5 +12,5 @@ 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,4 +1,4 @@ #include <qtimer.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlabel.h> @@ -8,5 +8,5 @@ -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 @@ -10,5 +10,5 @@ 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 @@ -25,18 +25,21 @@ /* 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> //using namespace Opie::Ui; //using namespace Opie::Core; -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) { _path=path; @@ -47,7 +50,7 @@ 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) { _path=path; @@ -58,5 +61,5 @@ AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QStrin } -bool AttachItem::isParentof(const QValueList<int>&path) +bool AttachItem::isParentof(const Q3ValueList<int>&path) { /* if not set, then no parent */ @@ -71,7 +74,7 @@ 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 ) { @@ -155,5 +158,5 @@ void ViewMail::setBody(const RecBodyP&body ) QTextOStream o(&fsize); if (w>0) o.precision(2); else o.precision(0); - o.setf(QTextStream::fixed); + o.setf(Q3TextStream::fixed); o << s << " " << q << "Byte"; } @@ -196,5 +199,5 @@ void ViewMail::setBody(const RecBodyP&body ) QTextOStream o(&fsize); if (w>0) o.precision(2); else o.precision(0); - o.setf(QTextStream::fixed); + o.setf(Q3TextStream::fixed); o << s << " " << q << "Byte"; desc = body->Parts()[i]->Description(); @@ -240,5 +243,5 @@ void ViewMail::slotShowHtml( bool state ) } -void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) +void ViewMail::slotItemClicked( Q3ListViewItem * item , const QPoint & point, int ) { if (!item ) @@ -250,5 +253,5 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int return; } - QPopupMenu *menu = new QPopupMenu(); + Q3PopupMenu *menu = new Q3PopupMenu(); int ret=0; @@ -279,5 +282,5 @@ 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()); output.close(); @@ -298,5 +301,5 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int if (content) { QFile output(tmpfile); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); @@ -353,5 +356,5 @@ 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) { @@ -370,5 +373,5 @@ 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) ) ); attachments->setSorting(-1); @@ -558,8 +561,8 @@ 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); dlglayout->setMargin(1); diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index bb5b685..6cf6efb 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h @@ -8,26 +8,26 @@ #include <qapplication.h> -#include <qlistview.h> +#include <q3listview.h> #include <qmap.h> #include <klocale.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> //namespace Opie { namespace MM { class OImageScrollView; } } -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); private: int _partNum; /* needed for a better display of attachments */ - QValueList<int> _path; + Q3ValueList<int> _path; }; @@ -37,5 +37,5 @@ 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(); @@ -51,5 +51,5 @@ public: protected: QString deHtml(const QString &string); - AttachItem* searchParent(const QValueList<int>&path); + AttachItem* searchParent(const Q3ValueList<int>&path); AttachItem* lastChild(AttachItem*parent); @@ -59,5 +59,5 @@ protected slots: void slotForward(); void setText(); - void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); + void slotItemClicked( Q3ListViewItem * item , const QPoint & point, int c ); void slotDeleteMail( ); void slotShowHtml( bool ); @@ -84,5 +84,5 @@ class MailImageDlg:public QDialog Q_OBJECT 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(); void setName(const QString&); diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 3bb964e..371ee91 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -1,12 +1,15 @@ // 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> //#include <qpe/resource.h> @@ -16,13 +19,13 @@ //#include "opendiag.h" -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) { setToolBarsMovable(false); - 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 ); @@ -70,8 +73,8 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) closeMail->addTo(toolbar); 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; if ( QApplication::desktop()->width() > 320 ) @@ -86,5 +89,5 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) attachments->hide(); - browser = new QTextBrowser(view); + browser = new Q3TextBrowser(view); // openDiag = new OpenDiag(view); diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index 7c075eb..3f1dead 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h @@ -3,5 +3,8 @@ #define VIEWMAILBASE_H -#include <qmainwindow.h> +#include <q3mainwindow.h> +//Added by qt3to4: +#include <Q3PopupMenu> +#include <QKeyEvent> #ifndef DESKTOP_VERSION @@ -12,25 +15,25 @@ 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 { Q_OBJECT public: - ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); + ViewMailBase(QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0); 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; protected slots: diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 8385bcc..c1a2f76 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -33,20 +33,26 @@ #include <qapplication.h> #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qlayout.h> #include <qclipboard.h> #include <qcursor.h> #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> #include <qdir.h> #ifndef KORG_NOSPLITTER #include <qsplitter.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QKeyEvent> +#include <Q3Frame> +#include <QLabel> +#include <Q3ValueList> #endif @@ -129,5 +135,5 @@ #include <unistd.h> #else -#include <qprocess.h> +#include <q3process.h> #endif @@ -141,5 +147,5 @@ 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) { @@ -278,11 +284,11 @@ 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 ) ; vcal = new QRadioButton(" vCalendar ", format ); @@ -313,10 +319,10 @@ class KOCatPrefs : public QDialog { setCaption( i18n("Manage new Categories") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); 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 ); format->setExclusive ( true ) ; @@ -374,5 +380,5 @@ void CalendarView::init() flag_clearallviewsupdateView = false; mNextAlarmDateTime = QDateTime::currentDateTime(); - setFocusPolicy (NoFocus ); + setFocusPolicy (Qt::NoFocus ); mViewerCallerIsSearchDialog = false; mBlockShowDates = false; @@ -395,5 +401,5 @@ void CalendarView::init() mNavigator = new DateNavigator( this, "datevav", mViewManager ); - QBoxLayout *topLayout = (QBoxLayout*)layout(); + Q3BoxLayout *topLayout = (Q3BoxLayout*)layout(); #ifndef KORG_NOSPLITTER // create the main layout frames. @@ -426,7 +432,7 @@ void CalendarView::init() #endif 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 ); @@ -455,5 +461,5 @@ void CalendarView::init() topLayout->addWidget( mMainFrame ); #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 ); connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); @@ -502,6 +508,6 @@ void CalendarView::init() QWidget *rightBox = new QWidget( mMainFrame ); //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 ); @@ -617,7 +623,7 @@ void CalendarView::init() // kdDebug() << "CalendarView::CalendarView() done" << endl; - 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); mDateFrame->hide(); @@ -670,5 +676,5 @@ void CalendarView::nextConflict( bool all, bool allday ) if ( flag_blockConflict ) return; flag_blockConflict = true; - QPtrList<Event> testlist = mCalendar->events(); + Q3PtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); while ( test ) { @@ -686,5 +692,5 @@ void CalendarView::nextConflict( bool all, bool allday ) Event * cE = 0; Event * cE2 = 0; - QPtrList<Event> testlist2 = testlist; + Q3PtrList<Event> testlist2 = testlist; test = testlist.first(); bool skip = false; @@ -836,5 +842,5 @@ void CalendarView::checkFiles() { QString message; - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); while ( cal ) { @@ -858,5 +864,5 @@ void CalendarView::checkAlarms() config->setGroup( "AppRun" ); 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); dt = dt.addDays( days ); @@ -868,6 +874,6 @@ void CalendarView::checkAlarms() qDebug("KO: Last termination on %s ", latest.toString().latin1()); //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(); QDateTime cur = QDateTime::currentDateTime().addSecs(-59); @@ -887,7 +893,7 @@ 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 ); lay->setMargin( 0 ); @@ -1217,5 +1223,5 @@ void CalendarView::computeAlarm( QString msg ) } #else - QProcess* p = new QProcess(); + Q3Process* p = new Q3Process(); p->addArgument( tempfilename.latin1() ); p->start(); @@ -1267,8 +1273,8 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) QString fn = QDir::homeDirPath() + "/.kopi_suspend_alarm"; 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; file.close(); @@ -1295,8 +1301,8 @@ void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) QString fn = QDir::homeDirPath() + "/.kopi_next_alarm"; 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; file.close(); @@ -1571,5 +1577,5 @@ Event* CalendarView::getLastSyncEvent() // we check, if the to delete event has a id for a profile // 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 ) { if ( lastSync.count() == 0 ) { @@ -1601,5 +1607,5 @@ void CalendarView::checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* t void CalendarView::checkExternalId( Incidence * inc ) { - QPtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; + Q3PtrList<Event> lastSync = mCalendar->getExternLastSyncEvents() ; checkExternSyncEvent( lastSync, inc ); @@ -1625,6 +1631,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int Event* eventLSync; clearAllViews(); - QPtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); - QPtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); + Q3PtrList<Event> eventRSyncSharp = remote->getExternLastSyncEvents(); + Q3PtrList<Event> eventLSyncSharp = local->getExternLastSyncEvents(); bool fullDateRange = false; local->resetTempSyncStat(); @@ -1685,8 +1691,8 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int //qDebug("*************************** "); 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!") ); @@ -1832,5 +1838,5 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int inR = er.next(); } - QPtrList<Incidence> el = local->rawIncidences(); + Q3PtrList<Incidence> el = local->rawIncidences(); inL = el.first(); modulo = (el.count()/10)+1; @@ -2049,5 +2055,5 @@ void CalendarView::syncExternal( int mode ) if ( mSyncManager->mWriteBackFile ) { - QPtrList<Incidence> iL = mCalendar->rawIncidences(); + Q3PtrList<Incidence> iL = mCalendar->rawIncidences(); Incidence* inc = iL.first(); if ( phoneFormat ) { @@ -2116,5 +2122,5 @@ bool CalendarView::importBday() ++count; } - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; if ( QApplication::desktop()->width() < 320 ) @@ -2187,5 +2193,5 @@ void CalendarView::insertBirthdays(const QString& uid, const QStringList& birthd //qDebug("CalView 1 %i", count); - QProgressBar bar(count,0 ); + Q3ProgressBar bar(count,0 ); int w = 300; if ( QApplication::desktop()->width() < 320 ) @@ -2351,5 +2357,5 @@ void CalendarView::setSyncEventsReadOnly() bool CalendarView::loadCalendars() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); mCalendar->setDefaultCalendar( 1 ); @@ -2365,5 +2371,5 @@ bool CalendarView::loadCalendars() bool CalendarView::restoreCalendarSettings() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); while ( cal ) { @@ -2530,5 +2536,5 @@ void CalendarView::watchSavedFile() bool CalendarView::checkAllFileVersions() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); mCalendar->setDefaultCalendar( 1 ); @@ -2592,5 +2598,5 @@ bool CalendarView::checkFileVersion(QString fn) bool CalendarView::saveCalendars() { - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); mCalendar->setDefaultCalendar( 1 ); @@ -2696,5 +2702,5 @@ void CalendarView::readSettings() config->setGroup("KOrganizer Geometry"); - QValueList<int> sizes = config->readIntListEntry("Separator1"); + Q3ValueList<int> sizes = config->readIntListEntry("Separator1"); if (sizes.count() != 2) { sizes << mDateNavigator->minimumSizeHint().width(); @@ -2764,5 +2770,5 @@ void CalendarView::readSettings() int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); - QValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); + Q3ValueList<int> sizes = config->readIntListEntry("Left Splitter Frame"); int resetval = 0; @@ -2843,5 +2849,5 @@ void CalendarView::writeSettings() config->setGroup( "AppRun" ); 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 ); int secs = dt.secsTo( QDateTime::currentDateTime() ); @@ -2870,7 +2876,7 @@ void CalendarView::writeSettings() #endif - 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); #ifdef DESKTOP_VERSION @@ -3167,5 +3173,5 @@ void CalendarView::checkConflictForEvent() } } - QPtrList<Event> testlist = mCalendar->events(); + Q3PtrList<Event> testlist = mCalendar->events(); Event * test = testlist.first(); QDateTime conflict; @@ -3429,5 +3435,5 @@ void CalendarView::slotSelectPickerDate( QDate d) void CalendarView::removeCategories() { - QPtrList<Incidence> incList = mCalendar->rawIncidences(); + Q3PtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; QStringList catIncList; @@ -3450,5 +3456,5 @@ void CalendarView::removeCategories() int CalendarView::addCategories() { - QPtrList<Incidence> incList = mCalendar->rawIncidences(); + Q3PtrList<Incidence> incList = mCalendar->rawIncidences(); QStringList catList = KOPrefs::instance()->mCustomCategories; QStringList catIncList; @@ -3508,5 +3514,5 @@ void CalendarView::manageCategories() void CalendarView::beamIncidence(Incidence * Inc) { - QPtrList<Incidence> delSel ; + Q3PtrList<Incidence> delSel ; delSel.append(Inc); beamIncidenceList( delSel ); @@ -3514,5 +3520,5 @@ void CalendarView::beamIncidence(Incidence * Inc) void CalendarView::beamCalendar() { - QPtrList<Incidence> delSel = mCalendar->rawIncidences(); + Q3PtrList<Incidence> delSel = mCalendar->rawIncidences(); //qDebug("beamCalendar() "); beamIncidenceList( delSel ); @@ -3520,9 +3526,9 @@ void CalendarView::beamCalendar() void CalendarView::beamFilteredCalendar() { - QPtrList<Incidence> delSel = mCalendar->incidences(); + Q3PtrList<Incidence> delSel = mCalendar->incidences(); //qDebug("beamFilteredCalendar() "); beamIncidenceList( delSel ); } -void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) +void CalendarView::beamIncidenceList(Q3PtrList<Incidence> delSel ) { @@ -4316,5 +4322,5 @@ void CalendarView::schedule_publish(Incidence *incidence) PublishDialog *publishdlg = new PublishDialog(); if (incidence->attendeeCount()>0) { - QPtrList<Attendee> attendees = incidence->attendees(); + Q3PtrList<Attendee> attendees = incidence->attendees(); attendees.first(); while ( attendees.current()!=0 ) { @@ -4725,5 +4731,5 @@ void CalendarView::showDates(const DateList &selectedDates) } -QPtrList<CalFilter> CalendarView::filters() +Q3PtrList<CalFilter> CalendarView::filters() { return mFilters; @@ -4766,5 +4772,5 @@ void CalendarView::showFilter(bool visible) mCalEditView->readConfig(); mCalEditView->show(); - QValueList<int> sizes; + Q3ValueList<int> sizes; sizes = mLeftFrame->sizes(); if ( sizes.count() == 4 && sizes[3] < 20 ) { @@ -4847,5 +4853,5 @@ void CalendarView::takeOverCalendar() clearAllViews(); - QPtrList<Event> events = mCalendar->events(); + Q3PtrList<Event> events = mCalendar->events(); for(uint i=0; i<events.count(); ++i) { events.at(i)->setOrganizer(KOPrefs::instance()->email()); @@ -4854,5 +4860,5 @@ void CalendarView::takeOverCalendar() } - QPtrList<Todo> todos = mCalendar->todos(); + Q3PtrList<Todo> todos = mCalendar->todos(); for(uint i=0; i<todos.count(); ++i) { todos.at(i)->setOrganizer(KOPrefs::instance()->email()); @@ -4861,5 +4867,5 @@ void CalendarView::takeOverCalendar() } - QPtrList<Journal> journals = mCalendar->journals(); + Q3PtrList<Journal> journals = mCalendar->journals(); for(uint i=0; i<journals.count(); ++i) { journals.at(i)->setOrganizer(KOPrefs::instance()->email()); @@ -4876,5 +4882,5 @@ void CalendarView::showIntro() } -QWidgetStack *CalendarView::viewStack() +Q3WidgetStack *CalendarView::viewStack() { return mRightFrame; @@ -5061,5 +5067,5 @@ bool CalendarView::removeCompletedSubTodos( Todo* t ) { bool deleteTodo = true; - QPtrList<Incidence> subTodos; + Q3PtrList<Incidence> subTodos; Incidence *aTodo; subTodos = t->relations(); @@ -5087,6 +5093,6 @@ void CalendarView::purgeCompleted() if (result == KMessageBox::Continue) { - QPtrList<Todo> todoCal; - QPtrList<Todo> rootTodos; + Q3PtrList<Todo> todoCal; + Q3PtrList<Todo> rootTodos; //QPtrList<Incidence> rel; Todo *aTodo; diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 60b1276..b4eada7 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -25,11 +25,13 @@ #define CALENDARVIEW_H -#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 #include <qtopia/ir.h> @@ -48,5 +50,5 @@ //#include <koprefs.h> -class QWidgetStack; +class Q3WidgetStack; class QSplitter; class KopiCalendarFile; @@ -85,11 +87,11 @@ 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(); void setSource(const QString & n); @@ -97,5 +99,5 @@ class MissedAlarmTextBrowser : public QTextBrowser { private: Incidence * getNextInc(QDateTime start ); - QPtrList<Incidence> mAlarms; + Q3PtrList<Incidence> mAlarms; signals: void showIncidence( QString uid); @@ -128,5 +130,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser QDate endDate(); - QWidgetStack *viewStack(); + Q3WidgetStack *viewStack(); QWidget *leftFrame(); @@ -442,5 +444,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void editFilters(); void toggleFilerEnabled(); - QPtrList<CalFilter> filters(); + Q3PtrList<CalFilter> filters(); void toggleFilter(); void showFilter(bool visible); @@ -496,5 +498,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void beamCalendar() ; void beamFilteredCalendar() ; - void beamIncidenceList(QPtrList<Incidence>) ; + void beamIncidenceList(Q3PtrList<Incidence>) ; void manageCategories(); void editCategories(); @@ -576,5 +578,5 @@ 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 ); int mGlobalSyncMode; @@ -594,8 +596,8 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser QSplitter *mLeftSplitter; KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; - QWidgetStack *mRightFrame; + Q3WidgetStack *mRightFrame; KDatePicker* mDatePicker; - QVBox* mDateFrame; + Q3VBox* mDateFrame; DateNavigatorContainer *mDateNavigator; // widget showing small month view. @@ -619,5 +621,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser // Calendar filters - QPtrList<CalFilter> mFilters; + Q3PtrList<CalFilter> mFilters; // various housekeeping variables. diff --git a/korganizer/calprintbase.cpp b/korganizer/calprintbase.cpp index 7b7d54c..ecb9e03 100644 --- a/korganizer/calprintbase.cpp +++ b/korganizer/calprintbase.cpp @@ -26,9 +26,11 @@ #include <qpainter.h> #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> #include <kglobal.h> @@ -146,6 +148,6 @@ CalPrintBase::~CalPrintBase() 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 ); QLabel *title = new QLabel( description(), wdg ); @@ -286,5 +288,5 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd, // int lineSpacing = p.fontMetrics().lineSpacing(); 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 ) ); int cellWidth = width/7; @@ -302,5 +304,5 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd, tmpStr=calSys->weekDayName( monthDate2 )[0].upper(); p.drawText(x+col*cellWidth, y+height/4, cellWidth, cellHeight, - AlignCenter, tmpStr); + Qt::AlignCenter, tmpStr); monthDate2 = monthDate2.addDays(1); } @@ -319,5 +321,5 @@ void CalPrintBase::drawSmallMonth(QPainter &p, const QDate &qd, p.drawText( x+col*cellWidth, y+height/4+cellHeight+(row*cellHeight), - cellWidth, cellHeight, AlignCenter, + cellWidth, cellHeight, Qt::AlignCenter, tmpStr.setNum(monthDate.day()) ); monthDate = monthDate.addDays(1); @@ -359,5 +361,5 @@ void CalPrintBase::drawDaysOfWeekBox(QPainter &p, const QDate &qd, // width-2, height-2, // 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 ) ); } @@ -402,8 +404,8 @@ 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 { QTime time( curTime.hour(), 0 ); @@ -411,5 +413,5 @@ void CalPrintBase::drawTimeLine(QPainter &p, p.setFont(QFont("helvetica", 14, QFont::Bold)); p.drawText(x+2, (int)currY+2, width-4, (int)cellHeight/2-3, - AlignTop|AlignLeft, numStr); + Qt::AlignTop|Qt::AlignLeft, numStr); } currY+=cellHeight; @@ -473,5 +475,5 @@ 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 ); // reset the colors @@ -494,5 +496,5 @@ void CalPrintBase::drawAllDayBox(QPainter &p, Event::List &eventList, // p.fillRect(x+1, offset+1, width-2, height-2, QBrush(Dense5Pattern) ); p.drawText( x+5, offset+5, width-10, height-10, - AlignLeft | AlignTop | AlignJustify , + Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify , multiDayStr); } @@ -561,5 +563,5 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events, // overlapping events - QPtrList<KOrg::CellItem> cells; + Q3PtrList<KOrg::CellItem> cells; cells.setAutoDelete( true ); @@ -569,5 +571,5 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events, } - QPtrListIterator<KOrg::CellItem> it1( cells ); + Q3PtrListIterator<KOrg::CellItem> it1( cells ); for( it1.toFirst(); it1.current(); ++it1 ) { KOrg::CellItem *placeItem = it1.current(); @@ -594,5 +596,5 @@ void CalPrintBase::drawAgendaDayBox( QPainter &p, Event::List &events, } - p.setBrush( QBrush( NoBrush ) ); + p.setBrush( QBrush( Qt::NoBrush ) ); } @@ -636,5 +638,5 @@ void CalPrintBase::drawAgendaItem( PrintCellItem *item, QPainter &p, p.drawRect( currentX, currentyPos+1, currentWidth+1, eventLength+1 ); p.drawText( currentX+3, currentyPos+2, currentWidth-5, eventLength-3, - AlignLeft | AlignTop | AlignJustify | WordBreak, + Qt::AlignLeft | Qt::AlignTop | Qt::AlignJustify | Qt::TextWordWrap, text); // p.restore(); @@ -671,5 +673,5 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd, p.setFont( QFont( "helvetica", 8, QFont::Bold, true ) ); - p.drawText( x+5, y, width-25, mSubHeaderHeight, AlignLeft | AlignVCenter, + p.drawText( x+5, y, width-25, mSubHeaderHeight, Qt::AlignLeft | Qt::AlignVCenter, hstring ); } @@ -681,5 +683,5 @@ void CalPrintBase::drawDayBox(QPainter &p, const QDate &qd, dayNumStr = local->formatDate(qd, true); } - p.drawText(x+5, y, width-10, mSubHeaderHeight, AlignRight | AlignVCenter, + p.drawText(x+5, y, width-10, mSubHeaderHeight, Qt::AlignRight | Qt::AlignVCenter, dayNumStr); Event::List eventList; @@ -725,5 +727,5 @@ 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; } @@ -744,5 +746,5 @@ 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; } @@ -850,5 +852,5 @@ void CalPrintBase::drawMonth(QPainter &p, const QDate &qd, bool weeknumbers, int calWeek = weekDate.weekNumber(); 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); } @@ -898,5 +900,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & // This list keeps all starting points of the parent todos so the connection // 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) { startPoints.clear(); @@ -911,10 +913,10 @@ 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() ); if ( !item->description().isEmpty() && desc ) { outStr = item->description(); rect = p.boundingRect( left+20, rect.bottom()+5, width-(left+10-x), -1, - WordBreak, outStr ); + Qt::WordBreak, outStr ); } //qDebug("bottom2 %d y+h %d y %d ph %d", rect.bottom(), y+height, y , pageHeight ); @@ -934,6 +936,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & else start = p.viewport().top(); - p.moveTo( center, start ); - p.lineTo( center, to ); + p.drawLine( center, start, center, to ); rct->mSamePage=false; } @@ -952,10 +953,10 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & // Priority 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 rect.setWidth(19); rect.setHeight(19); if ( priority > 0 && pospriority>=0 ) { - p.drawText(rect, AlignCenter, outStr); + p.drawText(rect, Qt::AlignCenter, outStr); p.drawRect(rect); // cross out the rectangle for completed items @@ -965,5 +966,5 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & } else if (item->cancelled() ) { 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 ); p.setPen( pen ); @@ -982,7 +983,6 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & int to( rect.top() + (rect.height()/2)+1 ); 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); } @@ -1000,7 +1000,7 @@ 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); // p.setFont(ft); @@ -1017,6 +1017,6 @@ void CalPrintBase::drawTodo( bool completed, int &count, Todo * item, QPainter & outStr = item->description(); 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 ); } @@ -1139,6 +1139,6 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, KLocale *local = KGlobal::locale(); 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); int lineSpacing = p.fontMetrics().lineSpacing(); @@ -1162,5 +1162,5 @@ 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 ); title.truncate(0); @@ -1172,5 +1172,5 @@ void CalPrintBase::drawSplitHeaderRight( QPainter &p, const QDate &fd, p.setFont(QFont("Helvetica", 20, QFont::Bold, TRUE)); 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 ; } @@ -1198,5 +1198,5 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width, p.setFont(QFont("helvetica", 12, QFont::Bold, true)); p.drawText(offsetLeft, mHeaderHeight + 5, - width, mSubHeaderHeight, AlignHCenter | AlignVCenter, + width, mSubHeaderHeight, Qt::AlignHCenter | Qt::AlignVCenter, dayName); @@ -1255,8 +1255,8 @@ void CalPrintBase::drawSplitDay( QPainter &p, const QDate &qd, int width, width-4, cheight); 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 ; } @@ -1275,10 +1275,10 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth, QString numStr; 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)); if ( !KGlobal::locale()->use12Clock() ) { @@ -1290,8 +1290,8 @@ 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 { QTime time( i + startHour, 0 ); @@ -1299,5 +1299,5 @@ void CalPrintBase::drawSplitTimes( QPainter &p, int width, int timeWidth, p.setFont(QFont("helvetica", 12, QFont::Bold)); p.drawText(4, offset+i*cellHeight, 70, cellHeight/2, - AlignTop|AlignLeft, numStr); + Qt::AlignTop|Qt::AlignLeft, numStr); } } mSubHeaderHeight = tempStore ; diff --git a/korganizer/calprinter.cpp b/korganizer/calprinter.cpp index 0cdf28e..d4bf988 100644 --- a/korganizer/calprinter.cpp +++ b/korganizer/calprinter.cpp @@ -22,6 +22,6 @@ */ -#include <qvbuttongroup.h> -#include <qwidgetstack.h> +// #include <qvbuttongroup.h> +#include <q3widgetstack.h> #include <qradiobutton.h> #include <qlayout.h> @@ -29,6 +29,9 @@ #include <qcombobox.h> #include <qlabel.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qsplitter.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PtrList> #include <kprinter.h> @@ -175,12 +178,12 @@ void CalPrinter::updateConfig() /****************************************************************************/ -CalPrintDialog::CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, +CalPrintDialog::CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p, QWidget *parent, const char *name ) : KDialogBase( parent, name, /*modal*/true, i18n("Print"), Ok | Cancel ), mPrinter( p ), mPrintPlugins( plugins ) { - QVBox *page = new QVBox(this);//makeVBoxMainWidget(); + Q3VBox *page = new Q3VBox(this);//makeVBoxMainWidget(); setMainWidget( page ); - QHBox *printerLayout = new QHBox( page ); + Q3HBox *printerLayout = new Q3HBox( page ); mPrinterLabel = new QLabel( printerLayout ); @@ -192,7 +195,7 @@ 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 /* mTypeGroup->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, @@ -201,9 +204,9 @@ 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() ); splitterRightLayout->setSpacing( spacingHint() ); - 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,2 +1,4 @@ +//Added by qt3to4: +#include <QLabel> /* This file is part of KOrganizer. @@ -29,5 +31,5 @@ #ifndef KORG_NOPRINTER -#include <qptrlist.h> +#include <q3ptrlist.h> #include <kdialogbase.h> @@ -39,6 +41,6 @@ using namespace KCal; -class QVButtonGroup; -class QWidgetStack; +class Q3VButtonGroup; +class Q3WidgetStack; class KPrinter; class CalPrintDialog; @@ -95,5 +97,5 @@ class CalPrinter : public QObject, public KOrg::CalPrinterBase protected: - QPtrList<CalPrintBase> mPrintPlugins; + Q3PtrList<CalPrintBase> mPrintPlugins; private: @@ -110,5 +112,5 @@ class CalPrintDialog : public KDialogBase Q_OBJECT public: - CalPrintDialog( QPtrList<CalPrintBase> plugins, KPrinter *p, + CalPrintDialog( Q3PtrList<CalPrintBase> plugins, KPrinter *p, QWidget *parent = 0, const char *name = 0 ); virtual ~CalPrintDialog(); @@ -128,7 +130,7 @@ signals: private: KPrinter *mPrinter; - QVButtonGroup *mTypeGroup; - QWidgetStack *mConfigArea; - QPtrList<CalPrintBase> mPrintPlugins; + Q3VButtonGroup *mTypeGroup; + Q3WidgetStack *mConfigArea; + Q3PtrList<CalPrintBase> mPrintPlugins; QLabel *mPrinterLabel; QString mPreviewText; diff --git a/korganizer/calprintplugins.cpp b/korganizer/calprintplugins.cpp index bc35ca4..9b6dc6e 100644 --- a/korganizer/calprintplugins.cpp +++ b/korganizer/calprintplugins.cpp @@ -26,9 +26,9 @@ #include <qpainter.h> -#include <qdatetimeedit.h> +#include <q3datetimeedit.h> #include <qdatetime.h> #include <qcheckbox.h> #include <qlineedit.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <kglobal.h> diff --git a/korganizer/cellitem.cpp b/korganizer/cellitem.cpp index 61d06ac..1fd703c 100644 --- a/korganizer/cellitem.cpp +++ b/korganizer/cellitem.cpp @@ -28,5 +28,7 @@ #include <kdebug.h> -#include <qintdict.h> +#include <q3intdict.h> +//Added by qt3to4: +#include <Q3PtrList> using namespace KOrg; @@ -37,15 +39,15 @@ QString CellItem::label() const } -QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, +Q3PtrList<CellItem> CellItem::placeItem( Q3PtrList<CellItem> cells, CellItem *placeItem ) { kdDebug(5855) << "Placing " << placeItem->label() << endl; - 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 ) { KOrg::CellItem *item = it2.current(); @@ -84,5 +86,5 @@ QPtrList<CellItem> CellItem::placeItem( QPtrList<CellItem> cells, placeItem->setSubCells( maxSubCells ); - QPtrListIterator<KOrg::CellItem> it3( conflictItems ); + Q3PtrListIterator<KOrg::CellItem> it3( conflictItems ); for( it3.toFirst(); it3.current(); ++it3 ) { (*it3)->setSubCells( maxSubCells ); diff --git a/korganizer/cellitem.h b/korganizer/cellitem.h index 72773d0..b917bd5 100644 --- a/korganizer/cellitem.h +++ b/korganizer/cellitem.h @@ -26,5 +26,5 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> namespace KOrg { @@ -54,5 +54,5 @@ class CellItem \return Placed items */ - 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 @@ -35,4 +35,6 @@ #include "datenavigatorcontainer.h" #include "koprefs.h" +//Added by qt3to4: +#include <QResizeEvent> DateNavigatorContainer::DateNavigatorContainer( QWidget *parent, diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index 87cc59f..75d387c 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h @@ -1,2 +1,5 @@ +//Added by qt3to4: +#include <QResizeEvent> +#include <Q3PtrList> /* This file is part of KOrganizer. @@ -101,5 +104,5 @@ class DateNavigatorContainer: public QWidget KCal::Calendar *mCalendar; - QPtrList<KDateNavigator> mExtraViews; + Q3PtrList<KDateNavigator> mExtraViews; int mHorizontalCount; 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 @@ -12,14 +12,19 @@ #include <qvariant.h> #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> #include <qcheckbox.h> #include <qlayout.h> #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> #include "tr.h" @@ -28,24 +33,24 @@ * name 'name' and widget flags set to 'f'. */ -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 ) { if ( !name ) 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 ); ButtonGroup1->layout()->setSpacing( 6 ); 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"); mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" ); @@ -60,10 +65,10 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) ButtonGroup1Layout->addLayout( layout4, 0, 0 ); - mCatList = new QListBox( ButtonGroup1, "mCatList" ); + mCatList = new Q3ListBox( ButtonGroup1, "mCatList" ); ButtonGroup1Layout->addWidget( mCatList, 1, 0 ); mCriteriaFrameLayout->addWidget( ButtonGroup1 ); - layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); + layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7"); textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" ); @@ -77,5 +82,5 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) mCriteriaFrameLayout->addLayout( layout7 ); - layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); + layout9 = new Q3HBoxLayout( 0, 0, 6, "layout9"); textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" ); @@ -92,5 +97,5 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) mCriteriaFrameLayout->addLayout( layout9 ); - layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); + layout2 = new Q3HBoxLayout( 0, 0, 0, "layout2"); textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" ); @@ -110,5 +115,4 @@ FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) languageChange(); 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 @@ -13,15 +13,21 @@ #include <qvariant.h> #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; class QCheckBox; @@ -32,13 +38,13 @@ 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; QRadioButton* mCatHideCheck; QPushButton* mCatEditButton; - QListBox* mCatList; + Q3ListBox* mCatList; QLabel* textLabel1; QCheckBox* mRecurringCheck; @@ -54,11 +60,11 @@ 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; protected slots: diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp index df84911..a3cff49 100644 --- a/korganizer/filtereditdialog.cpp +++ b/korganizer/filtereditdialog.cpp @@ -27,6 +27,11 @@ #include <qcheckbox.h> #include <qradiobutton.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3PtrList> + +#include <QDesktopWidget> #include <kdebug.h> @@ -54,5 +59,5 @@ public: }; -FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, +FilterEditDialog::FilterEditDialog(Q3PtrList<CalFilter> *filters,QWidget *parent, const char *name) : KDialogBase(parent,name,true,i18n("Edit Calendar Filters"), @@ -81,5 +86,5 @@ FilterEditDialog::FilterEditDialog(QPtrList<CalFilter> *filters,QWidget *parent, mEditor = new FilterEdit_base(mainWidget); - QGridLayout *topLayout = new QGridLayout(mainWidget,2,2); + Q3GridLayout *topLayout = new Q3GridLayout(mainWidget,2,2); topLayout->setSpacing(spacingHint()); topLayout->addWidget(mSelectionCombo,0,0); diff --git a/korganizer/filtereditdialog.h b/korganizer/filtereditdialog.h index 42aa3da..c1a52ed 100644 --- a/korganizer/filtereditdialog.h +++ b/korganizer/filtereditdialog.h @@ -24,5 +24,5 @@ #define _FILTEREDITDIALOG_H -#include <qptrlist.h> +#include <q3ptrlist.h> #include <kdialogbase.h> @@ -47,5 +47,5 @@ class FilterEditDialog : public KDialogBase Q_OBJECT public: - FilterEditDialog(QPtrList<CalFilter> *,QWidget *parent=0, const char *name=0); + FilterEditDialog(Q3PtrList<CalFilter> *,QWidget *parent=0, const char *name=0); virtual ~FilterEditDialog(); @@ -75,5 +75,5 @@ class FilterEditDialog : public KDialogBase private: - QPtrList<CalFilter> *mFilters; + Q3PtrList<CalFilter> *mFilters; ComboFilterBox *mSelectionCombo; diff --git a/korganizer/incomingdialog.cpp b/korganizer/incomingdialog.cpp index fe78356..c2402d4 100644 --- a/korganizer/incomingdialog.cpp +++ b/korganizer/incomingdialog.cpp @@ -18,8 +18,10 @@ */ -#include <qlistview.h> +#include <q3listview.h> #include <qfile.h> #include <qdir.h> #include <qmap.h> +//Added by qt3to4: +#include <Q3PtrList> #include <kglobal.h> @@ -57,7 +59,7 @@ -ScheduleItemIn::ScheduleItemIn(QListView *parent,IncidenceBase *ev, +ScheduleItemIn::ScheduleItemIn(Q3ListView *parent,IncidenceBase *ev, Scheduler::Method method,ScheduleMessage::Status status) - : QListViewItem(parent) + : Q3ListViewItem(parent) { mIncidence = ev; @@ -136,5 +138,5 @@ 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) { @@ -146,10 +148,10 @@ IncomingDialog::IncomingDialog(Calendar *calendar,OutgoingDialog *outgoing, mScheduler = new DummyScheduler(mCalendar); #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(); } @@ -170,5 +172,5 @@ void IncomingDialog::setOutgoingDialog(OutgoingDialog *outgoing) void IncomingDialog::retrieve() { - QPtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); + Q3PtrList <ScheduleMessage> messages = mScheduler->retrieveTransactions(); ScheduleMessage *message; @@ -253,5 +255,5 @@ void IncomingDialog::rejectMessage() } -void IncomingDialog::showEvent(QListViewItem *item) +void IncomingDialog::showEvent(Q3ListViewItem *item) { IncidenceBase *incidence = ((ScheduleItemIn *)item)->event(); @@ -270,5 +272,5 @@ bool IncomingDialog::incomeRefresh(ScheduleItemIn *item) //user interaction before?? Attendee *att; - QPtrList<Attendee> attlist = ev->attendees(); + Q3PtrList<Attendee> attlist = ev->attendees(); for (att=attlist.first(); att; att=attlist.next()) { Event *event = new Event(*ev); @@ -515,5 +517,5 @@ bool IncomingDialog::checkAttendeesInAddressbook(IncidenceBase *inc) KABC::AddressBook *add_book = KABC::StdAddressBook::self(); KABC::Addressee::List addressList; - QPtrList <Attendee> attendees; + Q3PtrList <Attendee> attendees; Attendee *att; attendees = inc->attendees(); diff --git a/korganizer/incomingdialog.h b/korganizer/incomingdialog.h index 413ce6a..e002b25 100644 --- a/korganizer/incomingdialog.h +++ b/korganizer/incomingdialog.h @@ -20,5 +20,5 @@ #define INCOMINGDIALOG_H -#include <qlistview.h> +#include <q3listview.h> #include <libkcal/calendar.h> @@ -30,8 +30,8 @@ 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); virtual ~ScheduleItemIn() {} @@ -73,5 +73,5 @@ class IncomingDialog : public IncomingDialog_base public: 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(); @@ -88,5 +88,5 @@ class IncomingDialog : public IncomingDialog_base void acceptMessage(); void rejectMessage(); - void showEvent(QListViewItem *); + void showEvent(Q3ListViewItem *); protected: 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 @@ -12,10 +12,12 @@ #include <qvariant.h> -#include <qheader.h> -#include <qlistview.h> +#include <q3header.h> +#include <q3listview.h> #include <qpushbutton.h> #include <qlayout.h> #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> /* @@ -26,5 +28,5 @@ * TRUE to construct a modal dialog. */ -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 ) @@ -32,5 +34,5 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo if ( !name ) 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"); PushButton4 = new QPushButton( this, "PushButton4" ); @@ -43,5 +45,5 @@ IncomingDialog_base::IncomingDialog_base( QWidget* parent, const char* name, boo IncomingDialog_baseLayout->addWidget( PushButton7, 5, 1 ); - mMessageListView = new QListView( this, "mMessageListView" ); + mMessageListView = new Q3ListView( this, "mMessageListView" ); mMessageListView->addColumn( tr2i18n( "Summary" ) ); mMessageListView->addColumn( tr2i18n( "Start Date" ) ); 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 @@ -13,10 +13,14 @@ #include <qvariant.h> #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; @@ -26,10 +30,10 @@ 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(); QPushButton* PushButton4; QPushButton* PushButton7; - QListView* mMessageListView; + Q3ListView* mMessageListView; QPushButton* PushButton7_2; QPushButton* PushButton8; @@ -37,5 +41,5 @@ public: protected: - QGridLayout* IncomingDialog_baseLayout; + Q3GridLayout* IncomingDialog_baseLayout; protected slots: 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 @@ -25,6 +25,6 @@ #include <qwidget.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <q3ptrlist.h> +#include <q3valuelist.h> #include <klocale.h> @@ -89,5 +89,5 @@ class BaseView : public QWidget more than one. */ - virtual QPtrList<Incidence> selectedIncidences() = 0; + virtual Q3PtrList<Incidence> selectedIncidences() = 0; /** @@ -154,5 +154,5 @@ class BaseView : public QWidget @param eventList a list of events to show. */ - 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 @@ -24,4 +24,6 @@ #include <qwidget.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> @@ -41,5 +43,5 @@ class CalendarViewBase : public QWidget public: 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 @@ -27,12 +27,19 @@ #include <qlabel.h> #include <qlayout.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qfile.h> #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qpixmap.h> #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <Q3Frame> +#include <QKeyEvent> +#include <QEvent> +#include <Q3VBoxLayout> #include <kdebug.h> @@ -58,5 +65,5 @@ #endif JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : - QFrame(parent) + Q3Frame(parent) { @@ -71,5 +78,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : mJournal = 0; visibleMode = true; - QHBox * vb = new QHBox ( this ); + Q3HBox * vb = new Q3HBox ( this ); QPixmap iconp; vb->setMargin ( KDialog::marginHint()-1 ); @@ -130,5 +137,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : //mCalendarBox->setMaximumWidth( maxwid/2 -20 ); mEditor->setWordWrap( KTextEdit::WidgetWidth ); - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); topLayout->addWidget(vb); topLayout->addWidget(mEditor); @@ -136,5 +143,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : installEventFilter(this); mTitle->installEventFilter(this); - setFocusPolicy (QWidget::NoFocus); + setFocusPolicy (Qt::NoFocus); connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); @@ -169,5 +176,5 @@ void JournalEntry::resizeEvent(QResizeEvent* e ) //qDebug("MAXXX %d ", QApplication::desktop()->width()); #endif - QFrame::resizeEvent( e ); + Q3Frame::resizeEvent( e ); } QSize JournalEntry::sizeHint() const @@ -187,5 +194,5 @@ 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'.") .arg( fileName ) ); @@ -193,5 +200,5 @@ void JournalEntry::slotSaveTemplate() } // QString text; - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); tsIn << mEditor->text(); @@ -209,10 +216,10 @@ void JournalEntry::slotLoadTemplate() return; QFile fileIn( fileName ); - if (!fileIn.open( IO_ReadOnly ) ) { + if (!fileIn.open( QIODevice::ReadOnly ) ) { KMessageBox::error( this, i18n("Error loading template file\n '%1'.") .arg( fileName ) ); return; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); QString text = tsIn.read(); @@ -317,9 +324,9 @@ bool JournalEntry::eventFilter( QObject *o, QEvent *e ) // kdDebug() << "JournalEntry::event received " << e->type() << endl; 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); } if ( e->type() == QEvent::FocusOut ) { @@ -336,5 +343,5 @@ 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 @@ -26,5 +26,10 @@ // Widget showing one Journal entry -#include <qframe.h> +#include <q3frame.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QEvent> +#include <QLabel> +#include <QKeyEvent> #include <libkcal/calendar.h> @@ -38,5 +43,5 @@ class KOLocationBox; using namespace KCal; -class JournalEntry : public QFrame { +class JournalEntry : public Q3Frame { Q_OBJECT public: diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 6697602..ecc7a2f 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -23,10 +23,14 @@ #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> #include <kdebug.h> @@ -47,10 +51,10 @@ 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); if (! startDate.isValid()) { @@ -82,5 +86,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) headings[i] = new QLabel("",this); //headings[i]->setFont(QFont("Arial", 10, QFont::Bold)); - headings[i]->setAlignment(AlignCenter); + headings[i]->setAlignment(Qt::AlignCenter); headings[i]->installEventFilter(this); @@ -91,5 +95,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) for( i = 0; i < 6; i++ ) { weeknos[i] = new QLabel(this); - weeknos[i]->setAlignment(AlignCenter ); + weeknos[i]->setAlignment(Qt::AlignCenter ); //weeknos[i]->setFont(QFont("Arial", 10)); if(!m_bShowWeekNums) { @@ -102,5 +106,5 @@ 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 @@ -24,7 +24,10 @@ #define KDATENAVIGATOR_H -#include <qframe.h> +#include <q3frame.h> #include <qdatetime.h> #include <qlabel.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QEvent> #include <libkcal/calendar.h> @@ -39,5 +42,5 @@ class KCalendarSystem; class NavigatorBar; -class KDateNavigator: public QFrame +class KDateNavigator: public Q3Frame { Q_OBJECT @@ -134,6 +137,6 @@ class KDateNavigator: public QFrame NavigatorBar *mNavigatorBar; - QFrame *headingSep; - QFrame *weeknumSep; + Q3Frame *headingSep; + Q3Frame *weeknumSep; QLabel *headings[7]; QLabel *weeknos[7]; diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 1d4d6de..fe59787 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -30,10 +30,21 @@ #undef protected #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> #include <kdebug.h> @@ -64,5 +75,5 @@ extern int globalFlagBlockStartup; //////////////////////////////////////////////////////////////////////////// MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) - : QFrame(_agenda->viewport(),name), agenda(_agenda) + : Q3Frame(_agenda->viewport(),name), agenda(_agenda) { setLineWidth(0); @@ -170,6 +181,6 @@ 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) { @@ -191,6 +202,6 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, all-day events. */ -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) { mAllAgendaPopup = 0; @@ -232,5 +243,5 @@ void KOAgenda::init() connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); - mNewItemPopup = new QPopupMenu( this ); + mNewItemPopup = new Q3PopupMenu( this ); connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); QString pathString = ""; @@ -241,16 +252,16 @@ void KOAgenda::init() pathString += "iconsmini/"; - 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 mGridSpacingX = 80; @@ -264,5 +275,5 @@ void KOAgenda::init() // Grab key strokes for keyboard navigation of agenda. Seems to have no // effect. Has to be fixed. - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); @@ -396,9 +407,9 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) case (QEvent::Leave): if (!mActionItem) - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); return true; default: - return QScrollView::eventFilter(object,event); + return Q3ScrollView::eventFilter(object,event); } } @@ -506,9 +517,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) bool leftButt = false; #ifdef DESKTOP_VERSION - leftButt = (me->button() == LeftButton); + leftButt = (me->button() == Qt::LeftButton); #endif switch (me->type()) { case QEvent::MouseButtonPress: - if (me->button() == LeftButton) { + if (me->button() == Qt::LeftButton) { mPopupTimer->start( 600 ); mLeftMouseDown = true; @@ -579,8 +590,8 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mPopupItem = (KOAgendaItem *)object; 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; if (mActionItem) { @@ -601,5 +612,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) selectItem(0); mActionItem = 0; - if (me->button() == RightButton) { + if (me->button() == Qt::RightButton) { int x,y; viewportToContents(viewportPos.x(),viewportPos.y(),x,y); @@ -612,6 +623,6 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mPopupKind = 4; popupMenu(); - } else if (me->button() == LeftButton) { - setCursor(arrowCursor); + } else if (me->button() == Qt::LeftButton) { + setCursor(Qt::arrowCursor); startSelectAction(viewportPos); } @@ -620,9 +631,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) case QEvent::MouseButtonRelease: - if (me->button() == LeftButton ) { + if (me->button() == Qt::LeftButton ) { mPopupTimer->stop(); } if (object != viewport()) { - if (me->button() == LeftButton && mLeftMouseDown) { + if (me->button() == Qt::LeftButton && mLeftMouseDown) { if (mActionItem) { QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); @@ -634,5 +645,5 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) placeSubCells( mActionItem ); // emit startDragSignal( mActionItem->incidence() ); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; mActionType = NOP; @@ -646,9 +657,9 @@ 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 } } - if (me->button() == LeftButton) + if (me->button() == Qt::LeftButton) mLeftMouseDown = false; @@ -851,13 +862,13 @@ void KOAgenda::startItemAction(QPoint viewportPos) mActionItem->cellX() == mCurrentCellX) { mActionType = RESIZELEFT; - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && mActionItem->cellXWidth() == mCurrentCellX) { mActionType = RESIZERIGHT; - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else { mActionType = MOVE; mActionItem->startMove(); - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); } } else { @@ -867,14 +878,14 @@ void KOAgenda::startItemAction(QPoint viewportPos) !mActionItem->firstMultiItem()) { mActionType = RESIZETOP; - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && mActionItem->cellYBottom() == mCurrentCellY && !mActionItem->lastMultiItem()) { mActionType = RESIZEBOTTOM; - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else { mActionType = MOVE; mActionItem->startMove(); - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); } } @@ -907,5 +918,5 @@ void KOAgenda::performItemAction(QPoint viewportPos) placeSubCells( mActionItem ); // emit startDragSignal( mActionItem->incidence() ); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; mActionType = NOP; @@ -916,16 +927,16 @@ void KOAgenda::performItemAction(QPoint viewportPos) switch ( mActionType ) { case MOVE: - setCursor( sizeAllCursor ); + setCursor( Qt::sizeAllCursor ); break; case RESIZETOP: case RESIZEBOTTOM: - setCursor( sizeVerCursor ); + setCursor( Qt::sizeVerCursor ); break; case RESIZELEFT: case RESIZERIGHT: - setCursor( sizeHorCursor ); + setCursor( Qt::sizeHorCursor ); break; default: - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); } } @@ -972,5 +983,5 @@ void KOAgenda::performItemAction(QPoint viewportPos) gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y); //moveChild(mActionItem,childX(mActionItem),y); - QScrollView::moveChild( mActionItem,childX(mActionItem),y ); + Q3ScrollView::moveChild( mActionItem,childX(mActionItem),y ); } } else if (mActionType == RESIZEBOTTOM) { @@ -1020,5 +1031,5 @@ void KOAgenda::endItemAction() KOAgendaItem *modifiedItem = placeItem; //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); - QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); KOAgendaItem *item; @@ -1111,5 +1122,5 @@ void KOAgenda::endItemAction() mScrollUpTimer.stop(); mScrollDownTimer.stop(); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; mActionType = NOP; @@ -1137,10 +1148,10 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) if (gridDistanceX < mResizeBorderWidth && 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); } } else { @@ -1149,11 +1160,11 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) moveItem->cellYTop() == gy && !moveItem->firstMultiItem()) { - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && moveItem->cellYBottom() == gy && !moveItem->lastMultiItem()) { - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else { - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); } } @@ -1174,7 +1185,7 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) { - QPtrList<KOAgendaItem> conflictItems; + Q3PtrList<KOAgendaItem> conflictItems; int maxSubCells = 0; - QIntDict<KOAgendaItem> subCellDict(7); + Q3IntDict<KOAgendaItem> subCellDict(7); KOAgendaItem *item; @@ -1241,5 +1252,5 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) if ( placeItem != item ) { KOAgendaItem *item2; - QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); + Q3PtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); for ( item2=conflictItems2.first(); item2 != 0; item2=conflictItems2.next() ) { @@ -1326,7 +1337,7 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) off += vySel; //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); } } @@ -1343,5 +1354,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) if ( hei < 5 ) p_hei = hei; 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; } @@ -1366,5 +1377,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) // qDebug(" %d %d %d %d ", cx, cy, cw,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); if ( mSelectionHeight > 0 ) { @@ -1380,5 +1391,5 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) if ( hei < 5 ) p_hei = hei; 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; } @@ -1577,12 +1588,12 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i if ( lGridSpacingY > 0 ) { 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); y+=lGridSpacingY; } - p->setPen( SolidLine ); + p->setPen( Qt::SolidLine ); } mPixPainter.end() ; @@ -1718,5 +1729,5 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) mUnusedItems.append( item ); mItems.remove( item ); - QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; //globalFlagBlockAgendaItemPaint = 1; @@ -1748,5 +1759,5 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); 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; if ( todo->hasCompletedDate() ) @@ -1780,5 +1791,5 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) qApp->processEvents(); globalFlagBlockAgendaItemPaint = 0; - QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; for ( itemit=oldconflictItems.first(); itemit != 0; @@ -1868,5 +1879,5 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, int count = 0; KOAgendaItem *current = 0; - QPtrList<KOAgendaItem> multiItems; + Q3PtrList<KOAgendaItem> multiItems; for (cellX = XBegin;cellX <= XEnd;++cellX) { if (cellX == XBegin) cellYTop = YTop; @@ -1928,5 +1939,5 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev ) mResizeTimer.start( 150 , true ); computeSizes(); - QScrollView::resizeEvent( ev ); + Q3ScrollView::resizeEvent( ev ); return; @@ -2017,5 +2028,5 @@ void KOAgenda::popupAlarm() // TODO: deal correctly with multiple alarms Alarm* alarm; - QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); + Q3PtrList<Alarm> list(mClickedItem->incidence()->alarms()); for(alarm=list.first();alarm;alarm=list.next()) { alarm->toggleAlarm(); @@ -2108,14 +2119,14 @@ 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(); break; @@ -2147,5 +2158,5 @@ void KOAgenda::setDateList(const DateList &selectedDates) } -void KOAgenda::setHolidayMask(QMemArray<bool> *mask) +void KOAgenda::setHolidayMask(Q3MemArray<bool> *mask) { mHolidayMask = mask; @@ -2163,5 +2174,5 @@ void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) { - QScrollView::contentsMousePressEvent(event); + Q3ScrollView::contentsMousePressEvent(event); } @@ -2197,5 +2208,5 @@ void KOAgenda::moveChild( QWidget *w, int x , int y ) { ++x; - QScrollView::moveChild( w, x , y ); + Q3ScrollView::moveChild( w, x , y ); } #include <qmessagebox.h> @@ -2203,5 +2214,5 @@ void KOAgenda::moveChild( QWidget *w, int x , int y ) #include <qprinter.h> #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #endif @@ -2232,5 +2243,5 @@ 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() ); //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true ); diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 380ce62..0708341 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h @@ -24,18 +24,27 @@ #define KOAGENDA_H -#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> #include "koagendaitem.h" #include "koeventview.h" -class QPopupMenu; +class Q3PopupMenu; class QTime; class KConfig; -class QFrame; +class Q3Frame; class KOAgenda; class KCal::Event; @@ -44,5 +53,5 @@ class KCal::Todo; using namespace KCal; -class MarcusBains : public QFrame { +class MarcusBains : public Q3Frame { Q_OBJECT public: @@ -64,5 +73,5 @@ class MarcusBains : public QFrame { -class KOAgenda : public QScrollView +class KOAgenda : public Q3ScrollView { Q_OBJECT @@ -72,7 +81,7 @@ 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(); bool mInvalidPixmap; @@ -118,5 +127,5 @@ class KOAgenda : public QScrollView void checkScrollBoundaries(); - void setHolidayMask(QMemArray<bool> *); + void setHolidayMask(Q3MemArray<bool> *); void setDateList(const DateList &selectedDates); DateList dateList() const; @@ -278,8 +287,8 @@ 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; // The Marcus Bains Line widget. @@ -292,14 +301,14 @@ 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; int mOldLowerScrollValue; int mOldUpperScrollValue; KOAgendaItem * getItemForTodo ( Todo * todo ); - QMemArray<bool> *mHolidayMask; + Q3MemArray<bool> *mHolidayMask; int mCurPixWid; int mCurPixHei; diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 407424d..0f9a38f 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -20,11 +20,21 @@ #include <qlabel.h> #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> #include <kiconloader.h> @@ -58,8 +68,8 @@ 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) { }; protected: @@ -73,5 +83,5 @@ 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) { @@ -80,6 +90,6 @@ KOAgendaItem::KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent,bool #endif mKOAgendaItemWhatsThis = new KOAgendaItemWhatsThis(this); - int wflags = getWFlags() |WRepaintNoErase;// WResizeNoErase - setWFlags ( wflags); + Qt::WindowFlags wflags = windowFlags() |Qt::WRepaintNoErase;// WResizeNoErase + setWindowFlags ( wflags); mAllDay = allday; init ( incidence, qd ); @@ -104,5 +114,5 @@ void KOAgendaItem::initColor () ( !((static_cast<Todo*>(mIncidence))->isCompleted()) && ((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 ; else @@ -133,5 +143,5 @@ void KOAgendaItem::initColor () mColorGroup = QColorGroup( BackgroundColor.light(), BackgroundColor.dark(),BackgroundColor.light(), - BackgroundColor.dark(),BackgroundColor, black, BackgroundColor) ; + BackgroundColor.dark(),BackgroundColor, Qt::black, BackgroundColor) ; setBackgroundColor( mBackgroundColor ); mWhiteText = (mBackgroundColor.red() + mBackgroundColor.green() + mBackgroundColor.blue() < 250); @@ -229,5 +239,5 @@ 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 ) ++xOff; @@ -236,5 +246,5 @@ 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 ) ++xOff; @@ -243,5 +253,5 @@ 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 ) ++xOff; @@ -250,5 +260,5 @@ 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 ) ++xOff; @@ -260,5 +270,5 @@ 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 ) ++xOff; @@ -271,5 +281,5 @@ 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 ) ++xOff; @@ -278,5 +288,5 @@ 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 ) ++xOff; @@ -421,7 +431,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) int align; #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 if ( addIcon ) { @@ -436,5 +446,5 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) } if ( mWhiteText ) - paint->setPen ( white); + paint->setPen ( Qt::white); if ( x < 0 ) { w = w+x-3; @@ -445,7 +455,7 @@ void KOAgendaItem::paintMe( bool selected, QPainter* paint ) w = parentWidget()->width() - 6; #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 @@ -562,5 +572,5 @@ 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); } void KOAgendaItem::computeText() @@ -629,5 +639,5 @@ void KOAgendaItem::computeText() tipText += "\n"+i18n("Location: ")+mIncidence->location(); } - QToolTip::add(this,tipText,toolTipGroup(),""); + QToolTip::add(this,tipText /*TODO:hacker: ,toolTipGroup(),"" */); #endif } @@ -796,5 +806,5 @@ void KOAgendaItem::expandRight(int dx) QToolTipGroup *KOAgendaItem::toolTipGroup() { - if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); + /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */ return mToolTipGroup; } @@ -804,5 +814,5 @@ void KOAgendaItem::dragEnterEvent( QDragEnterEvent *e ) #ifndef KORG_NODND if ( ICalDrag::canDecode( e ) || VCalDrag::canDecode( e ) || - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; @@ -816,5 +826,5 @@ void KOAgendaItem::dropEvent( QDropEvent *e ) #ifndef KORG_NODND QString text; - if(QTextDrag::decode(e,text)) + if(Q3TextDrag::decode(e,text)) { kdDebug() << "Dropped : " << text << endl; @@ -834,10 +844,10 @@ void KOAgendaItem::dropEvent( QDropEvent *e ) -QPtrList<KOAgendaItem> KOAgendaItem::conflictItems() +Q3PtrList<KOAgendaItem> KOAgendaItem::conflictItems() { return mConflictItems; } -void KOAgendaItem::setConflictItems(QPtrList<KOAgendaItem> ci) +void KOAgendaItem::setConflictItems(Q3PtrList<KOAgendaItem> ci) { mConflictItems = ci; diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 27ee720..17cf975 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h @@ -20,9 +20,16 @@ #define KOAGENDAITEM_H -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qpixmap.h> #include <qdatetime.h> #include <qpalette.h> +//Added by qt3to4: +#include <QDropEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <Q3PtrList> +#include <QEvent> +#include <QDragEnterEvent> #include <libkcal/incidence.h> @@ -46,5 +53,5 @@ class KOAgendaItem : public QWidget public: KOAgendaItem(Incidence *incidence, QDate qd, QWidget *parent, bool allday, const char *name=0, - WFlags f=0 ); + Qt::WFlags f=0 ); ~KOAgendaItem(); QString getWhatsThisText(); @@ -97,6 +104,6 @@ class KOAgendaItem : public QWidget static QToolTipGroup *toolTipGroup(); - QPtrList<KOAgendaItem> conflictItems(); - void setConflictItems(QPtrList<KOAgendaItem>); + Q3PtrList<KOAgendaItem> conflictItems(); + void setConflictItems(Q3PtrList<KOAgendaItem>); void addConflictItem(KOAgendaItem *ci); void paintMe( bool, QPainter* painter = 0 ); @@ -162,5 +169,5 @@ class KOAgendaItem : public QWidget QString mDisplayedText; 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 @@ -22,8 +22,8 @@ */ -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qlabel.h> -#include <qframe.h> +#include <q3frame.h> #include <qlayout.h> #ifndef KORG_NOSPLITTER @@ -32,9 +32,21 @@ #include <qfont.h> #include <qfontmetrics.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qtooltip.h> #include <qpainter.h> #include <qpushbutton.h> #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> #include <kapplication.h> @@ -79,6 +91,6 @@ using namespace KOrg; #define IDLETIMEOUT 45 -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) { myPix.resize( 1, 1 ); @@ -96,5 +108,5 @@ TimeLabels::TimeLabels(int rows,QWidget *parent,const char *name,WFlags f) : resizeContents(50,mRows * mCellHeight); - viewport()->setBackgroundMode( PaletteBackground ); + viewport()->setBackgroundMode( Qt::PaletteBackground ); } @@ -284,5 +296,5 @@ void TimeLabels::paintEvent(QPaintEvent*) EventIndicator::EventIndicator(Location loc,QWidget *parent,const char *name) - : QFrame(parent,name) + : Q3Frame(parent,name) { mColumns = 1; @@ -394,5 +406,5 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : } - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); // Create day name labels for agenda columns @@ -402,11 +414,11 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 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 ); mExpandButton = new QPushButton(mDummyAllDayLeft); @@ -421,7 +433,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mExpandButton->setFixedSize( widebut, widebut); 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); @@ -430,5 +442,5 @@ 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); @@ -438,8 +450,8 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); #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); agendaLayout->addWidget(mEventIndicatorTop,1,1); @@ -461,10 +473,10 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); agendaLayout->setColStretch(1,1); - mAgenda->setFocusPolicy(NoFocus); + mAgenda->setFocusPolicy(Qt::NoFocus); // Create event context menu for agenda mAllAgendaPopup = eventPopup(); #if 0 - mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), + mAllAgendaPopup->addAdditionalItem(QIcon(SmallIcon("bell")), i18n("Toggle Alarm"),mAgenda, SLOT(popupAlarm()),true); @@ -919,7 +931,7 @@ int KOAgendaView::currentDateCount() } -QPtrList<Incidence> KOAgendaView::selectedIncidences() +Q3PtrList<Incidence> KOAgendaView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; Incidence *incidence; @@ -988,6 +1000,6 @@ void KOAgendaView::updateConfig() // ToolTips displaying summary of events - KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() - ->mEnableToolTips); + /* TODO:hacker: KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() + ->mEnableToolTips); */ //setHolidayMasks(); @@ -1118,5 +1130,5 @@ void KOAgendaView::showDates( const QDate &start, const QDate &end ) -void KOAgendaView::showEvents(QPtrList<Event>) +void KOAgendaView::showEvents(Q3PtrList<Event>) { kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; @@ -1166,9 +1178,9 @@ void KOAgendaView::fillAgenda() mMaxY.resize(mSelectedDates.count()); - QPtrList<Event> dayEvents; + Q3PtrList<Event> dayEvents; // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. // Therefore, gtodoset all of them. - QPtrList<Todo> todos = calendar()->todos(); + Q3PtrList<Todo> todos = calendar()->todos(); mAgenda->setDateList(mSelectedDates); @@ -1301,5 +1313,5 @@ void KOAgendaView::fillAgenda() // Already completed items can be displayed on their original due date //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; if ( todo->hasCompletedDate() && todo->completed().date() == currentDate ) @@ -1504,5 +1516,5 @@ 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) { if ( sizes[0] < 20 ) { @@ -1525,5 +1537,5 @@ void KOAgendaView::writeSettings(KConfig *config) //#ifndef KORG_NOSPLITTER - QValueList<int> list = mSplitterAgenda->sizes(); + Q3ValueList<int> list = mSplitterAgenda->sizes(); config->writeEntry("Separator AgendaView",list); //qDebug("write %d %d ", list[0],list[1] ); @@ -1542,5 +1554,5 @@ void KOAgendaView::setHolidayMasks() bool showHoliday = false; if ( KOPrefs::instance()->mExcludeHolidays ) { - QPtrList<Event> events = calendar()->events( date, true ); + Q3PtrList<Event> events = calendar()->events( date, true ); Event *event; for( event = events.first(); event; event = events.next() ) { @@ -1664,5 +1676,5 @@ 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 && QDate::currentDate() >= mSelectedDates.first() && diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 5e68146..3b871d9 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -24,8 +24,9 @@ #define KOAGENDAVIEW_H -#include <qscrollview.h> +#include <q3scrollview.h> #include <qdatetime.h> #include <qpushbutton.h> #include <qlayout.h> +#include <Q3BoxLayout> #ifndef DESKTOP_VERSION #include <qksplitter.h> @@ -33,10 +34,19 @@ #include <qsplitter.h> #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> #include "koeventview.h" -class QHBox; -class QFrame; +class Q3HBox; +class Q3Frame; class QLabel; class QPushButton; @@ -56,5 +66,5 @@ class KOAgendaButton : public QPushButton mNum = -3; setFlat( true ); - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); connect( this, SIGNAL( clicked() ), this, SLOT ( bClicked() ) ); @@ -71,8 +81,8 @@ 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); void setCellHeight(int height); @@ -114,5 +124,5 @@ class TimeLabels : public QScrollView { }; -class EventIndicator : public QFrame { +class EventIndicator : public Q3Frame { Q_OBJECT public: @@ -133,9 +143,9 @@ class EventIndicator : public QFrame { KDGanttMinimizeSplitter* mPaintWidget; int mColumns; - QHBox *mTopBox; - QBoxLayout *mTopLayout; + Q3HBox *mTopBox; + Q3BoxLayout *mTopLayout; Location mLocation; QPixmap mPixmap; - QMemArray<bool> mEnabled; + Q3MemArray<bool> mEnabled; }; @@ -160,5 +170,5 @@ class KOAgendaView : public KOEventView { /** returns the currently selected events */ - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); /** returns the currently selected events */ @@ -186,5 +196,5 @@ class KOAgendaView : public KOEventView { virtual void updateConfig(); virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void updateTodo( Todo *, int ); @@ -261,8 +271,8 @@ class KOAgendaView : public KOEventView { QDateTime mIdleStart; // view widgets - QFrame *mDayLabels; - QHBox *mDayLabelsFrame; - QBoxLayout *mLayoutDayLabels; - QFrame *mAllDayFrame; + Q3Frame *mDayLabels; + Q3HBox *mDayLabelsFrame; + Q3BoxLayout *mLayoutDayLabels; + Q3Frame *mAllDayFrame; KOAgenda *mAllDayAgenda; KOAgenda *mAgenda; @@ -285,10 +295,10 @@ class KOAgendaView : public KOEventView { EventIndicator *mEventIndicatorBottom; - 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; QDateTime mTimeSpanEnd; diff --git a/korganizer/kocounterdialog.h b/korganizer/kocounterdialog.h index c8dcf45..493d9e1 100644 --- a/korganizer/kocounterdialog.h +++ b/korganizer/kocounterdialog.h @@ -23,5 +23,5 @@ // -#include <qtextview.h> +#include <q3textview.h> #include <kdialogbase.h> diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 52fd1e8..4f681b3 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -25,7 +25,16 @@ #include <qevent.h> #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> #include <kglobal.h> @@ -55,13 +64,13 @@ DynamicTip::DynamicTip( QWidget * parent ) - : QToolTip( parent ) + /* TODO:hacker: : QToolTip( parent ) */ { matrix = (KODayMatrix*)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() { ; }; @@ -92,5 +101,5 @@ void DynamicTip::maybeTip( const QPoint &pos ) QString str = matrix->getHolidayLabel(col+row*7); if (str.isEmpty()) return; - tip(rct, str); + /* TODO:hacker: tip(rct, str);*/ } @@ -104,5 +113,5 @@ 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 ) @@ -152,5 +161,5 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) return QString(); QDate mDate = days[tmp]; - QPtrList<Event> eventlist = mCalendar->events(mDate); + Q3PtrList<Event> eventlist = mCalendar->events(mDate); Event *event; QStringList mToolTip; @@ -206,5 +215,5 @@ QString KODayMatrix::getWhatsThisText( QPoint p ) mToolTip.sort(); if ( KOPrefs::instance()->mCurrentDisplayedView == VIEW_T_VIEW ) { - QPtrList<Todo> todolist = mCalendar->todos(mDate); + Q3PtrList<Todo> todolist = mCalendar->todos(mDate); Todo *todo; for(todo=todolist.first();todo != 0;todo=todolist.next()) { @@ -221,5 +230,5 @@ 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(); while ( j ) { @@ -442,5 +451,5 @@ void KODayMatrix::updateViewTimed() int i; int timeSpan = NUMDAYS-1; - QPtrList<Event> events = mCalendar->events(); + Q3PtrList<Event> events = mCalendar->events(); Event *event; QDateTime dt; @@ -527,5 +536,5 @@ void KODayMatrix::updateViewTimed() bDays.fill( false); // insert due todos - QPtrList<Todo> todos = mCalendar->todos( ); + Q3PtrList<Todo> todos = mCalendar->todos( ); Todo *todo; for(todo = todos.first(); todo; todo = todos.next()) { @@ -552,5 +561,5 @@ void KODayMatrix::updateViewTimed() bDays.fill( false); // insert due todos - QPtrList<Journal> todos = mCalendar->journals( ); + Q3PtrList<Journal> todos = mCalendar->journals( ); Journal *todo; for(todo = todos.first(); todo; todo = todos.next()) { @@ -576,5 +585,5 @@ void KODayMatrix::updateViewTimed() for(int i = 0; i < NUMDAYS; i++) { // 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; int numEvents = eventlist.count(); @@ -676,5 +685,5 @@ void KODayMatrix::updateEvents() for( int i = 0; i < NUMDAYS; i++ ) { // 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(); Event *event; @@ -740,5 +749,5 @@ void KODayMatrix::mousePressEvent (QMouseEvent* e) { - if ( e->button() == LeftButton ) + if ( e->button() == Qt::LeftButton ) mouseDown = true; mSelStart = getDayIndexFrom(e->x(), e->y()); @@ -753,5 +762,5 @@ void KODayMatrix::mouseReleaseEvent (QMouseEvent* e) { mRedrawNeeded = true; - if ( e->button() == LeftButton ) + if ( e->button() == Qt::LeftButton ) if ( ! mouseDown ) { return; @@ -1196,5 +1205,5 @@ 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; } @@ -1209,5 +1218,5 @@ void KODayMatrix::resizeEvent(QResizeEvent * e) daysize.setHeight(sz.height()*7 / NUMDAYS); 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 @@ -27,5 +27,5 @@ #include <qstring.h> -#include <qframe.h> +#include <q3frame.h> #include <qcolor.h> #include <qpen.h> @@ -35,4 +35,12 @@ #include <qbitarray.h> #include <qmap.h> +//Added by qt3to4: +#include <QDragMoveEvent> +#include <QDropEvent> +#include <QDragLeaveEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QMouseEvent> +#include <QDragEnterEvent> class QDragEnterEvent; @@ -52,5 +60,5 @@ using namespace KCal; * is in our special case the name of the holiday or null if this day is no holiday. */ -class DynamicTip : public QToolTip +class DynamicTip /* TODO:hacker: : public QToolTip */ { public: @@ -104,5 +112,5 @@ private: * @author Eitzenberger Thomas */ -class KODayMatrix: public QFrame { +class KODayMatrix: public Q3Frame { Q_OBJECT diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index ea30fac..deb1e46 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp @@ -42,4 +42,6 @@ #include "kodialogmanager.h" #include <kapplication.h> +//Added by qt3to4: +#include <Q3PtrList> KODialogManager::KODialogManager( CalendarView *mainView ) : @@ -189,6 +191,6 @@ void KODialogManager::showSearchDialog() connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), 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> ))); connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); @@ -247,5 +249,5 @@ void KODialogManager::showArchiveDialog() } -void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) +void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters) { if (!mFilterEditDialog) { diff --git a/korganizer/kodialogmanager.h b/korganizer/kodialogmanager.h index b68ddc2..00ad1df 100644 --- a/korganizer/kodialogmanager.h +++ b/korganizer/kodialogmanager.h @@ -26,5 +26,5 @@ #include <qobject.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <libkcal/calfilter.h> @@ -79,5 +79,5 @@ class KODialogManager : public QObject void showSearchDialog(); void showArchiveDialog(); - void showFilterEditDialog(QPtrList<CalFilter> *filters); + void showFilterEditDialog(Q3PtrList<CalFilter> *filters); void showPluginDialog(); void hideSearchDialog(); diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp index 9a4b4ec..a01c838 100644 --- a/korganizer/koeditordetails.cpp +++ b/korganizer/koeditordetails.cpp @@ -23,12 +23,18 @@ #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> #include <klocale.h> @@ -81,5 +87,5 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) : QWidget( parent, name), mDisableItemUpdate( false ) { - QGridLayout *topLayout = new QGridLayout(this); + Q3GridLayout *topLayout = new Q3GridLayout(this); topLayout->setSpacing(spacing); topLayout->setMargin(KDialog::marginHint()-2); @@ -102,9 +108,9 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) mListView->setAllColumnsShowFocus (true ); //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 ))); mRsvpButton = new QCheckBox(this); @@ -141,5 +147,5 @@ KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); QWidget *buttonBox = new QWidget(this); - QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); + Q3VBoxLayout *buttonLayout = new Q3VBoxLayout(buttonBox); QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); @@ -366,5 +372,5 @@ void KOEditorDetails::readEvent(Incidence *event) //mListView->clear(); //mdelAttendees.clear(); - QPtrList<Attendee> tmpAList = event->attendees(); + Q3PtrList<Attendee> tmpAList = event->attendees(); Attendee *a; for (a = tmpAList.first(); a; a = tmpAList.next()) @@ -378,5 +384,5 @@ void KOEditorDetails::writeEvent(Incidence *event) { event->clearAttendees(); - QListViewItem *item; + Q3ListViewItem *item; AttendeeListItem *a; for (item = mListView->firstChild(); item; @@ -405,5 +411,5 @@ bool KOEditorDetails::validateInput() void KOEditorDetails::updateAttendeeInput() { - QListViewItem *item = mListView->selectedItem(); + Q3ListViewItem *item = mListView->selectedItem(); AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); if (aItem) { @@ -452,5 +458,5 @@ 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 ) { if ( item && c == 4 ) { @@ -463,5 +469,5 @@ void KOEditorDetails::updateAttendeeItem() if (mDisableItemUpdate) return; - QListViewItem *item = mListView->selectedItem(); + Q3ListViewItem *item = mListView->selectedItem(); AttendeeListItem *aItem = static_cast<AttendeeListItem *>( item ); if ( !aItem ) return; diff --git a/korganizer/koeditordetails.h b/korganizer/koeditordetails.h index 5f8f6f2..40e896c 100644 --- a/korganizer/koeditordetails.h +++ b/korganizer/koeditordetails.h @@ -25,15 +25,15 @@ #include <qmap.h> -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qcheckbox.h> #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> #include <kapplication.h> @@ -84,5 +84,5 @@ class KOEditorDetails : public QWidget void clearAttendeeInput(); void fillAttendeeInput(AttendeeListItem *); - void itemClicked(QListViewItem *,const QPoint & pnt, int c); + void itemClicked(Q3ListViewItem *,const QPoint & pnt, int c); void updateAttendeeItem(); void setEnabledAttendeeInput(bool); @@ -104,5 +104,5 @@ class KOEditorDetails : public QWidget QPushButton* mAddressBookButton; - 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 @@ -25,13 +25,20 @@ #include <qtooltip.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 <qtimer.h> #include <qfile.h> #include <qregexp.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QLabel> +#include <Q3GridLayout> +#include <Q3PtrList> +#include <Q3PopupMenu> +#include <QDesktopWidget> #include <kglobal.h> @@ -70,7 +77,7 @@ 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); #if 0 @@ -196,8 +203,8 @@ 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); connect(mCatPopup,SIGNAL(aboutToShow () ), this ,SLOT(showCatPopup())); @@ -215,7 +222,7 @@ 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 ); QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent); @@ -229,5 +236,5 @@ void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) } -void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) +void KOEditorGeneral::initDescription(QWidget *parent,Q3BoxLayout *topLayout) { mDescriptionEdit = new KTextEdit(parent); @@ -244,7 +251,7 @@ 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); //mAlarmBell = new QLabel(parent); @@ -529,5 +536,5 @@ void KOEditorGeneral::readIncidence(Incidence *event) // set up alarm stuff - QPtrList<Alarm> alarms = event->alarms(); + Q3PtrList<Alarm> alarms = event->alarms(); Alarm* alarm; mAlarmIncrCombo->setCurrentItem(0); @@ -591,5 +598,5 @@ void KOEditorGeneral::writeIncidence(Incidence *event) if (event->alarms().count() == 0) event->newAlarm(); - QPtrList<Alarm> alarms = event->alarms(); + Q3PtrList<Alarm> alarms = event->alarms(); Alarm *alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index b10a5d4..45f26fd 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h @@ -24,17 +24,18 @@ #define KOEDITORGENERAL_H -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qcheckbox.h> #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> #include <qlayout.h> #include <qspinbox.h> #include <qcombobox.h> +#include <Q3BoxLayout> #include <ktextedit.h> @@ -56,9 +57,9 @@ class KOEditorGeneral : public QObject virtual ~KOEditorGeneral(); 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 *); /** Set widgets to default values */ @@ -116,5 +117,5 @@ class KOEditorGeneral : public QObject private: - QPopupMenu * mCatPopup; + Q3PopupMenu * mCatPopup; QString getFittingPath( const QString &) ; QString mAlarmSound; diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index 2c6ed9f..73a4139 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -24,9 +24,15 @@ #include <qtooltip.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> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3Frame> +#include <QLabel> +#include <Q3VBoxLayout> #include <kdebug.h> @@ -85,9 +91,9 @@ 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); timeLayout->addWidget(timeGroupBox); @@ -95,7 +101,7 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() ); 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()); @@ -119,5 +125,5 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) layoutTimeBox->addWidget(mEndTimeEdit,1,2); QWidget* duration = new QWidget( timeBoxFrame ); - QHBoxLayout *flagsBox = new QHBoxLayout( duration ); + Q3HBoxLayout *flagsBox = new Q3HBoxLayout( duration ); mNoTimeButton = new QCheckBox(i18n("All day event"),duration); flagsBox->addWidget(mNoTimeButton); @@ -130,5 +136,5 @@ 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 ); @@ -148,7 +154,7 @@ 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); QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h index d798905..5d97a5c 100644 --- a/korganizer/koeditorgeneralevent.h +++ b/korganizer/koeditorgeneralevent.h @@ -24,13 +24,13 @@ #define _KOEDITORGENERALEVENT_H -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qcheckbox.h> #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 KOEditorGeneralEvent : public KOEditorGeneral virtual ~KOEditorGeneralEvent(); - void initTime(QWidget *,QBoxLayout *); - void initClass(QWidget *,QBoxLayout *); + void initTime(QWidget *,Q3BoxLayout *); + void initClass(QWidget *,Q3BoxLayout *); void finishSetup(); diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index d32d5a5..baee9fc 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -23,12 +23,19 @@ #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> #include <kglobal.h> @@ -83,16 +90,16 @@ 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); timeLayout->addWidget(timeGroupBox); timeGroupBox->layout()->setSpacing( KDialog::spacingHint()-2 ); 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()); layoutTimeBox->setColStretch( 1, 1 ); @@ -134,5 +141,5 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) -void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) +void KOEditorGeneralTodo::initCompletion(QWidget *parent, Q3BoxLayout *topLayout) { mCompletedCombo = new QComboBox(parent); @@ -174,8 +181,8 @@ 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 ); QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); @@ -190,7 +197,7 @@ 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); initCompletion( parent, statusLayout ); @@ -397,5 +404,5 @@ void KOEditorGeneralTodo::startDateChanged(QDate newdate) { if ( mDueCheck->isChecked() ) - emit dateTimesChanged(newdate,mDueDateEdit->date()); + emit dateTimesChanged((QDateTime)newdate,(QDateTime)mDueDateEdit->date()); } void KOEditorGeneralTodo::enableTimeEdits(bool enable) diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h index 2e56a7a..2e97ff5 100644 --- a/korganizer/koeditorgeneraltodo.h +++ b/korganizer/koeditorgeneraltodo.h @@ -24,13 +24,13 @@ #define _KOEDITORGENERALTODO_H -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qcheckbox.h> #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> @@ -51,8 +51,8 @@ class KOEditorGeneralTodo : public KOEditorGeneral virtual ~KOEditorGeneralTodo(); - 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 *); void finishSetup(); diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index e0380c4..e0ae3a0 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -23,15 +23,23 @@ #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> #include <qcheckbox.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QLabel> +#include <Q3GridLayout> +#include <Q3PtrList> +#include <Q3Frame> +#include <Q3VBoxLayout> #include <kdialog.h> @@ -82,5 +90,5 @@ RecurDaily::RecurDaily( QWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QHBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3HBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( KDialog::marginHintSmall() ); @@ -101,5 +109,5 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( KDialog::marginHintSmall() ); @@ -107,5 +115,5 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : //topLayout->addStretch( 1 ); - QBoxLayout *weeksLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *weeksLayout = new Q3HBoxLayout( topLayout ); QLabel *preLabel = new QLabel( i18n("Recur every"), this ); @@ -117,6 +125,6 @@ RecurWeekly::RecurWeekly( QWidget *parent, const char *name ) : weeksLayout->addWidget( postLabel ); - 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 for ( int i = 0; i < 7; ++i ) { @@ -157,10 +165,10 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( KDialog::marginHintSmall() ); - QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout ); QLabel *preLabel = new QLabel( i18n("every"), this ); @@ -173,9 +181,9 @@ 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() ); buttonLayout->setMargin( KDialog::marginHintSmall() ); @@ -190,5 +198,5 @@ RecurMonthly::RecurMonthly( QWidget *parent, const char *name ) : buttonLayout->addWidget( mByDayRadio, 0, 0 ); - mByDayCombo = new QComboBox( buttonGroup ); + mByDayCombo = new Q3ComboBox( buttonGroup ); mByDayCombo->setSizeLimit( 7 ); mByDayCombo->insertItem( i18n("1st") ); @@ -294,10 +302,10 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : RecurBase( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( KDialog::marginHintSmall() ); - QBoxLayout *freqLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *freqLayout = new Q3HBoxLayout( topLayout ); QLabel *preLabel = new QLabel( i18n("every"), this ); @@ -310,9 +318,9 @@ 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 ); mByMonthRadio = new QRadioButton( i18n("On day "), buttonGroup); @@ -321,5 +329,5 @@ RecurYearly::RecurYearly( QWidget *parent, const char *name ) : buttonLayout->addWidget( mByDayLabel, 0, 1 ); - mByMonthCombo = new QComboBox( buttonGroup ); + mByMonthCombo = new Q3ComboBox( buttonGroup ); mByMonthCombo->insertItem( i18n("January") ); mByMonthCombo->insertItem( i18n("February") ); @@ -384,7 +392,7 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : QWidget( parent, 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 ); topLayout->addWidget( groupBox ); @@ -392,5 +400,5 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : QWidget *box = new QWidget( groupBox ); - QGridLayout *boxLayout = new QGridLayout( box ); + Q3GridLayout *boxLayout = new Q3GridLayout( box ); mExceptionDateEdit = new KDateEdit( box ); @@ -404,5 +412,5 @@ ExceptionsWidget::ExceptionsWidget( QWidget *parent, const char *name ) : boxLayout->addWidget( deleteExceptionButton, 3, 0 ); - mExceptionList = new QListBox( box ); + mExceptionList = new Q3ListBox( box ); boxLayout->addMultiCellWidget( mExceptionList, 0, 3, 1, 1 ); @@ -507,12 +515,12 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, : QWidget( parent, name ) { - 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 ); topLayout->addWidget( mRangeGroupBox ); QWidget *rangeBox = new QWidget( mRangeGroupBox ); - QVBoxLayout *rangeLayout = new QVBoxLayout( rangeBox ); + Q3VBoxLayout *rangeLayout = new Q3VBoxLayout( rangeBox ); rangeLayout->setSpacing( KDialog::spacingHint() ); rangeLayout->setMargin( KDialog::marginHintSmall() ); @@ -521,5 +529,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, rangeLayout->addWidget( mStartDateLabel ); - mRangeButtonGroup = new QButtonGroup; + mRangeButtonGroup = new Q3ButtonGroup; mNoEndDateButton = new QRadioButton( i18n("No ending date"), rangeBox ); @@ -527,5 +535,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, rangeLayout->addWidget( mNoEndDateButton ); - QBoxLayout *durationLayout = new QHBoxLayout( rangeLayout ); + Q3BoxLayout *durationLayout = new Q3HBoxLayout( rangeLayout ); durationLayout->setSpacing( KDialog::spacingHint() ); @@ -540,5 +548,5 @@ RecurrenceRangeWidget::RecurrenceRangeWidget( QWidget *parent, durationLayout ->addWidget( endDurationLabel ); - QBoxLayout *endDateLayout = new QHBoxLayout( rangeLayout ); + Q3BoxLayout *endDateLayout = new Q3HBoxLayout( rangeLayout ); endDateLayout->setSpacing( KDialog::spacingHint() ); @@ -667,5 +675,5 @@ RecurrenceChooser::RecurrenceChooser( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); mTypeCombo = new QComboBox( this ); @@ -726,5 +734,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : QWidget( parent, name ) { - QGridLayout *topLayout = new QGridLayout( this, 2,2 ); + Q3GridLayout *topLayout = new Q3GridLayout( this, 2,2 ); topLayout->setSpacing( KDialog::spacingHint() ); topLayout->setMargin( KDialog::marginHintSmall() ); @@ -736,5 +744,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : - mTimeGroupBox = new QGroupBox( 1, Horizontal, i18n("Time"), + mTimeGroupBox = new Q3GroupBox( 1, Qt::Horizontal, i18n("Time"), this ); topLayout->addMultiCellWidget( mTimeGroupBox, 1, 1 , 0 , 1 ); @@ -753,5 +761,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : //mTimeGroupBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum ) ); //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 ); mRecurrenceChooser = new RecurrenceChooser( mRuleBox ); @@ -760,5 +768,5 @@ KOEditorRecurrence::KOEditorRecurrence( QWidget* parent, const char *name ) : - mRuleStack = new QWidgetStack( mRuleBox ); + mRuleStack = new Q3WidgetStack( mRuleBox ); mDaily = new RecurDaily( mRuleStack ); @@ -897,6 +905,6 @@ void KOEditorRecurrence::readEvent(Incidence *event) setDefaults( event->dtStart(), dtEnd ); QBitArray rDays( 7 ); - QPtrList<Recurrence::rMonthPos> rmp; - QPtrList<int> rmd; + Q3PtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<int> rmd; int day = 0; int count = 0; @@ -969,5 +977,5 @@ void KOEditorRecurrence::readEvent(Incidence *event) #if 0 //qDebug("2day = %d ",day ); - QPtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); + Q3PtrList<Recurrence::rMonthPos> monthlist = r->yearMonthPositions(); int month; if ( !monthlist.isEmpty() ) { diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index 75e0c73..6c012bd 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h @@ -24,15 +24,17 @@ #define _KOEDITORRECURRENCE_H -#include <qframe.h> +#include <q3frame.h> #include <qlabel.h> #include <qcheckbox.h> #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> #include <kdialogbase.h> @@ -42,5 +44,5 @@ #include "ktimeedit.h" -class QWidgetStack; +class Q3WidgetStack; class QSpinBox; @@ -99,5 +101,5 @@ class RecurMonthly : public RecurBase private: QRadioButton *mByDayRadio; - QComboBox *mByDayCombo; + Q3ComboBox *mByDayCombo; QRadioButton *mByPosRadio; @@ -123,5 +125,5 @@ class RecurYearly : public RecurBase int mDay; QRadioButton *mByMonthRadio; - QComboBox *mByMonthCombo; + Q3ComboBox *mByMonthCombo; QLabel* mByDayLabel; QLabel* mDayOfLabel; @@ -181,5 +183,5 @@ class ExceptionsWidget : public QWidget, public ExceptionsBase private: KDateEdit *mExceptionDateEdit; - QListBox *mExceptionList; + Q3ListBox *mExceptionList; DateList mExceptionDates; }; @@ -236,6 +238,6 @@ class RecurrenceRangeWidget : public QWidget, public RecurrenceRangeBase private: - QButtonGroup *mRangeButtonGroup; - QGroupBox *mRangeGroupBox; + Q3ButtonGroup *mRangeButtonGroup; + Q3GroupBox *mRangeGroupBox; QLabel *mStartDateLabel; QRadioButton *mNoEndDateButton; @@ -301,9 +303,9 @@ class KOEditorRecurrence : public QWidget QCheckBox *mEnabledCheck; - 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 @@ -23,12 +23,17 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qtimer.h> #include <qdir.h> #include <qlayout.h> -#include <qwidgetstack.h> +#include <q3widgetstack.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> #include <kiconloader.h> @@ -106,6 +111,6 @@ 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); topLayout->setMargin(marginHint()-1); @@ -120,11 +125,11 @@ void KOEventEditor::setupGeneral() mGeneral->enableAlarm( false ); - 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 ) icon = SmallIcon("fileexport16"); @@ -147,7 +152,7 @@ void KOEventEditor::setupGeneral() topLayout->addStretch( 1 ); - QFrame *topFrame2 = addPage(i18n("Details")); + Q3Frame *topFrame2 = addPage(i18n("Details")); - QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); + Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2); topLayout2->setSpacing(spacingHint()-1); topLayout2->setMargin(marginHint()-1); @@ -161,16 +166,16 @@ void KOEventEditor::setupGeneral() connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); } else { - QFrame *topFrame = addPage(i18n("General")); + Q3Frame *topFrame = addPage(i18n("General")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); topLayout->setSpacing(spacingHint()); mGeneral->initHeader(topFrame,topLayout); mGeneral->initTime(topFrame,topLayout); - QBoxLayout *alarmLineLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *alarmLineLayout = new Q3HBoxLayout(topLayout); mGeneral->initAlarm(topFrame,alarmLineLayout); mGeneral->initClass(topFrame,alarmLineLayout); mGeneral->initDescription(topFrame,topLayout); - QBoxLayout *detailsLayout = new QHBoxLayout(topLayout); + Q3BoxLayout *detailsLayout = new Q3HBoxLayout(topLayout); mGeneral->initCategories( topFrame, detailsLayout ); mGeneral->initSecrecy( topFrame, detailsLayout ); @@ -183,6 +188,6 @@ void KOEventEditor::setupGeneral() void KOEventEditor::setupRecurrence() { - QFrame *topFrame = addPage( i18n("Recurrence") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = addPage( i18n("Recurrence") ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); mRecurrence = new KOEditorRecurrence( topFrame ); @@ -357,5 +362,5 @@ void KOEventEditor::slotLoadTemplate() return ; } - QPtrList<Event> events = cal.events(); + Q3PtrList<Event> events = cal.events(); Event* event = events.first(); if ( !event ) { diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index fc4d9a4..81047c1 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp @@ -23,4 +23,7 @@ #include <qcursor.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PopupMenu> #include <klocale.h> @@ -33,5 +36,5 @@ #include "koprefs.h" -KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() +KOEventPopupMenu::KOEventPopupMenu(): Q3PopupMenu() { mCurrentIncidence = 0; @@ -54,9 +57,9 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() this,SLOT(popupCancel()))); isDisabled = false; - mCatPopup = new QPopupMenu ( this ); + mCatPopup = new Q3PopupMenu ( this ); mCatPopup->setCheckable (true); connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); - mCalPopup = new QPopupMenu ( this ); + mCalPopup = new Q3PopupMenu ( this ); mCalPopup->setCheckable (true); connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); @@ -66,5 +69,5 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() insertItem (i18n("Categories"),mCatPopup ); insertItem (i18n("Calendar"),mCalPopup ); - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { mSingleOnlyItems.append(*it); @@ -75,5 +78,5 @@ void KOEventPopupMenu::enableDefault( bool enable ) { isDisabled = !enable; - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { setItemEnabled(*it,enable); @@ -147,5 +150,5 @@ void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) // Enable/Disabled menu items only valid for editable events. if ( !isDisabled ) { - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); @@ -156,5 +159,5 @@ 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, bool editOnly) diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h index e28745b..de5220b 100644 --- a/korganizer/koeventpopupmenu.h +++ b/korganizer/koeventpopupmenu.h @@ -27,5 +27,7 @@ // -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libkcal/incidence.h> @@ -33,10 +35,10 @@ using namespace KCal; -class KOEventPopupMenu : public QPopupMenu { +class KOEventPopupMenu : public Q3PopupMenu { Q_OBJECT public: KOEventPopupMenu(); - void addAdditionalItem(const QIconSet &icon,const QString &text, + void addAdditionalItem(const QIcon &icon,const QString &text, const QObject *receiver, const char *member, bool editOnly=false); @@ -74,9 +76,9 @@ 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 @@ -22,5 +22,5 @@ */ -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcursor.h> @@ -74,5 +74,5 @@ KOEventPopupMenu *KOEventView::eventPopup() //--------------------------------------------------------------------------- -void KOEventView::showIncidencePopup(QPopupMenu *popup,Incidence *event) +void KOEventView::showIncidencePopup(Q3PopupMenu *popup,Incidence *event) { mCurrentIncidence = event; diff --git a/korganizer/koeventview.h b/korganizer/koeventview.h index 77ec111..f28e68b 100644 --- a/korganizer/koeventview.h +++ b/korganizer/koeventview.h @@ -31,4 +31,6 @@ #include "koeventpopupmenu.h" +//Added by qt3to4: +#include <Q3PopupMenu> using namespace KCal; @@ -88,5 +90,5 @@ class KOEventView : public KOrg::BaseView * @param popup a popop menu created with eventPopup() */ - 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 @@ -18,10 +18,15 @@ */ -#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> #include <klocale.h> @@ -56,5 +61,5 @@ #include <qprinter.h> #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #else //DESKTOP_VERSION #include <qtopia/qcopenvelope_qws.h> @@ -63,5 +68,5 @@ KOEventViewer::KOEventViewer(QWidget *parent,const char *name) - : QTextBrowser(parent,name) + : Q3TextBrowser(parent,name) { mSyncMode = false; @@ -87,5 +92,5 @@ void KOEventViewer::printMe() QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -135,5 +140,5 @@ void KOEventViewer::setSource(const QString& n) QDialog dia( this,"dia123", true ); dia.setCaption( i18n("Details of attendee") ); - QVBoxLayout lay ( &dia ); + Q3VBoxLayout lay ( &dia ); KABC::AddresseeView av ( &dia ); av.setAddressee( (*it) ); @@ -156,5 +161,5 @@ void KOEventViewer::setSource(const QString& n) return; } - QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); + Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees(); if (attendees.count()) { Attendee *a; @@ -201,5 +206,5 @@ void KOEventViewer::setSource(const QString& n) const QByteArray paramData; QByteArray replyData; - QCString replyTypeStr; + Q3CString replyTypeStr; #define PING_ABBROWSER (client->call("kaddressbook", "KAddressBookIface", "interfaces()", noParamData, replyTypeStr, replyData)) bool foundAbbrowser = PING_ABBROWSER; @@ -208,5 +213,5 @@ void KOEventViewer::setSource(const QString& n) //KAddressbook is already running, so just DCOP to it to bring up the contact editor //client->send("kaddressbook","KAddressBookIface", - QDataStream arg(paramData, IO_WriteOnly); + QDataStream arg(paramData, QIODevice::WriteOnly); arg << n.mid(6); client->send("kaddressbook", "KAddressBookIface", "showContactEditor( QString )", paramData); @@ -232,5 +237,5 @@ void KOEventViewer::setSource(const QString& n) void KOEventViewer::mailToAttendees( bool all ) { - QPtrList<Attendee> attendees = mCurrentIncidence->attendees(); + Q3PtrList<Attendee> attendees = mCurrentIncidence->attendees(); if (attendees.count() == 0) return; QStringList nameList; @@ -261,5 +266,5 @@ void KOEventViewer::mailToAttendees( bool all ) void KOEventViewer::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; QString tmpText=text; @@ -588,5 +593,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); } - QPtrList<Incidence> Relations = event->relations(); + Q3PtrList<Incidence> Relations = event->relations(); Incidence *to; if ( Relations.first() ) @@ -622,5 +627,5 @@ void KOEventViewer::formatCategories(Incidence *event) void KOEventViewer::formatAttendees(Incidence *event) { - QPtrList<Attendee> attendees = event->attendees(); + Q3PtrList<Attendee> attendees = event->attendees(); if (attendees.count()) { @@ -655,5 +660,5 @@ void KOEventViewer::formatAttendees(Incidence *event) #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " <a href=\"mailto:" + event->organizer() + "\">"; mText += "<IMG src=\"" + iconPath + "\">"; @@ -705,5 +710,5 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; if ( a->RSVP() ) { @@ -863,5 +868,5 @@ void KOEventViewer::keyPressEvent ( QKeyEvent * e ) break; 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 @@ -23,5 +23,8 @@ // -#include <qtextbrowser.h> +#include <q3textbrowser.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <QKeyEvent> #include <libkcal/event.h> @@ -38,5 +41,5 @@ using namespace KCal; #include <qdialog.h> #include <qlabel.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <kglobal.h> @@ -48,11 +51,11 @@ class KOPrintPrefs : public QDialog { setCaption( i18n("KO/Pi Printout") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 9 ); lay->setMargin( 9 ); QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog.\n"), this ); 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 ); format->setExclusive ( true ) ; @@ -84,5 +87,5 @@ private: #endif -class KOEventViewer : public QTextBrowser { +class KOEventViewer : public Q3TextBrowser { Q_OBJECT public: @@ -118,5 +121,5 @@ class KOEventViewer : public QTextBrowser { private: - QTextBrowser *mEventTextView; + Q3TextBrowser *mEventTextView; bool mSyncMode; QString deTag(QString text); diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 2e936f3..3a37852 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -23,4 +23,7 @@ #include <qtimer.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <QHideEvent> +#include <QKeyEvent> #include "koeventviewer.h" @@ -28,5 +31,5 @@ #include "koprefs.h" #include <libkcal/todo.h> -#include "qapp.h" +#include "qapplication.h" #include "koeventviewerdialog.h" diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 71696f4..947c10b 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -23,5 +23,8 @@ // -#include <qtextview.h> +#include <q3textview.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <QHideEvent> #include <kdialogbase.h> diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ee9c9f6..8335ba9 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -28,8 +28,12 @@ #include <qlabel.h> #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> @@ -48,6 +52,6 @@ -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) { @@ -115,12 +119,12 @@ void KOFilterView::setSelectedFilter( int fil ) KOCalEditView::KOCalEditView(QWidget* parent, const char* name ) - : QScrollView(parent,name) + : Q3ScrollView(parent,name) { mw = 0; setResizePolicy( AutoOneFit ); - setFrameStyle ( QFrame::Panel | QFrame::Plain ); + setFrameStyle ( Q3Frame::Panel | Q3Frame::Plain ); setLineWidth ( 1 ); setMidLineWidth ( 1 ); - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); } @@ -248,19 +252,19 @@ void KOCalEditView::readConfig() addChild(mw); int ii = 0; - mainLayout = new QGridLayout ( mw , 2, 8 ); + mainLayout = new Q3GridLayout ( mw , 2, 8 ); mainLayout->setMargin( 2 ); mainLayout->setSpacing( 2 ); QPushButton * addButT = new QPushButton ( mw ); - addButT->setFocusPolicy(NoFocus); + addButT->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addButT,0,0 ); addButT->setText( "D"); 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())); int max = addBut->sizeHint().height(); @@ -269,21 +273,21 @@ void KOCalEditView::readConfig() QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); 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 ); //mainLayout->addWidget( lab,0,++ii ); //lab->setFixedWidth( 1 ); 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())); addBut->setMaximumWidth( addBut->sizeHint().height() ); 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())); addBut->setMaximumWidth( addBut->sizeHint().height() ); @@ -292,9 +296,9 @@ void KOCalEditView::readConfig() addBut = new QPushButton ( mw ); - addBut->setFocusPolicy(NoFocus); + addBut->setFocusPolicy(Qt::NoFocus); mainLayout->addWidget( addBut,0,++ii ); addBut->setPixmap ( SmallIcon("plus")); 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 ); mainLayout->addWidget( lab,0,++ii ); @@ -432,9 +436,9 @@ int KOCalEditView::addCalendar( QString name, QString file, bool ask ) return 0; 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 ) ); return 0; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); tsIn << "BEGIN:VCALENDAR\nPRODID:-//KDE-Pim//Platform-independent 2.1.0\nVERSION:2.0\nEND:VCALENDAR\n"; @@ -476,5 +480,5 @@ void KOCalEditView::disableRO() toggleList( mROB, false ); } -void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list , bool enable ) +void KOCalEditView::toggleList ( Q3PtrList<KOCalCheckButton> list , bool enable ) { bool dis = !enable; diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 0dd423a..f1bbab4 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -27,10 +27,16 @@ #include <qcheckbox.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qradiobutton.h> #include <qlayout.h> #include <qlabel.h> #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> #include "kofilterview_base.h" @@ -43,5 +49,5 @@ #include <kmessagebox.h> -class QGridLayout; +class Q3GridLayout; using namespace KCal; @@ -55,5 +61,5 @@ class KONewCalPrefs : public QDialog { setCaption( i18n("Add new Calendar") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); @@ -111,5 +117,5 @@ class KOCalButton : public QPushButton SLOT( bottonClicked() )); mNumber = -1; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); } void setNum ( int num ) {mNumber = num; } @@ -136,5 +142,5 @@ class KOCalCheckButton : public QCheckBox SLOT( bottonClicked( bool ) )); mNumber = -1; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); //setMaximumWidth( 10 ); @@ -164,5 +170,5 @@ class KOCalRadioButton : public QRadioButton SLOT( bottonClicked( bool ) )); mNumber = -1; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); //setMaximumWidth( 10 ); @@ -189,5 +195,5 @@ class KOFilterView : public KOFilterView_base Q_OBJECT 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(); @@ -205,8 +211,8 @@ class KOFilterView : public KOFilterView_base private: - QPtrList<CalFilter> *mFilters; + Q3PtrList<CalFilter> *mFilters; }; -class KOCalEditView : public QScrollView +class KOCalEditView : public Q3ScrollView { Q_OBJECT @@ -245,10 +251,10 @@ class KOCalEditView : public QScrollView private: 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 @@ -23,18 +23,18 @@ #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> #include <qdir.h> #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> #include <kdebug.h> @@ -71,11 +71,11 @@ 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() {}; void setData( DWORD data ) {mData= data; }; @@ -90,7 +90,7 @@ KOImportOLdialog::KOImportOLdialog( const QString &caption, parent, caption, true, false, i18n("Import!") ) { - 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")); mListView->addColumn(i18n("Content Type")); @@ -213,5 +213,5 @@ void KOImportOLdialog::readCalendarData( DWORD folder ) int i; 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!") ); int h = bar.sizeHint().height() ; diff --git a/korganizer/koimportoldialog.h b/korganizer/koimportoldialog.h index c8847c5..d66f099 100644 --- a/korganizer/koimportoldialog.h +++ b/korganizer/koimportoldialog.h @@ -32,5 +32,5 @@ class QDateTime; -class QListView; +class Q3ListView; class OLEListViewItem; class _AppointmentItem; @@ -73,5 +73,5 @@ 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 @@ -23,10 +23,12 @@ #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> #include <kdebug.h> @@ -83,7 +85,7 @@ KOIncidenceEditor::~KOIncidenceEditor() void KOIncidenceEditor::setupAttendeesTab() { - QFrame *topFrame = addPage(i18n("Attendees")); + Q3Frame *topFrame = addPage(i18n("Attendees")); - QBoxLayout *topLayout = new QVBoxLayout(topFrame); + Q3BoxLayout *topLayout = new Q3VBoxLayout(topFrame); mDetails = new KOEditorDetails(spacingHint()-2,topFrame); diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 406df5a..51594ff 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -26,11 +26,17 @@ #include <qlayout.h> -#include <qscrollview.h> -#include <qpopupmenu.h> -#include <qhbox.h> +#include <q3scrollview.h> +#include <q3popupmenu.h> +#include <q3hbox.h> #include <qpushbutton.h> #include <qlabel.h> #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QPixmap> +#include <Q3PtrList> +#include <QKeyEvent> +#include <Q3VBoxLayout> #include <klocale.h> @@ -52,5 +58,5 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, { mCalendar = calendar; - QHBox * vb = new QHBox ( this ); + Q3HBox * vb = new Q3HBox ( this ); QPushButton * newJournal = new QPushButton( vb ); QPixmap icon; @@ -64,13 +70,13 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, mDateLabel = new QLabel ( vb ); 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 ); hbl->addWidget( sv ); parWid = new QWidget( sv->viewport() ); 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() ) ); getNewEntry(); @@ -97,7 +103,7 @@ JournalEntry* KOJournalView::getNewEntry() } -QPtrList<Incidence> KOJournalView::selectedIncidences() +Q3PtrList<Incidence> KOJournalView::selectedIncidences() { - QPtrList<Incidence> eventList; + Q3PtrList<Incidence> eventList; return eventList; @@ -163,5 +169,5 @@ void KOJournalView::showOnly ( Journal* j ) return; } - QPtrList<Journal> jl; + Q3PtrList<Journal> jl; jl.append ( j ); showList( jl ); @@ -169,5 +175,5 @@ void KOJournalView::showOnly ( Journal* j ) mEntry->setShowOnly(); } -void KOJournalView::showList(QPtrList<Journal> jl) +void KOJournalView::showList(Q3PtrList<Journal> jl) { static bool ff = false; @@ -226,9 +232,9 @@ void KOJournalView::showDates(const QDate &start, const QDate &) mDate = start; mDateLabel->setText(KGlobal::locale()->formatDate(mDate)); - QPtrList<Journal> jl = calendar()->journals4Date( start ); + Q3PtrList<Journal> jl = calendar()->journals4Date( start ); showList( jl ); } -void KOJournalView::showEvents(QPtrList<Event>) +void KOJournalView::showEvents(Q3PtrList<Event>) { // After new creation of list view no events are selected. diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h index 7fa94ae..22f26cd 100644 --- a/korganizer/kojournalview.h +++ b/korganizer/kojournalview.h @@ -26,4 +26,9 @@ #include <korganizer/baseview.h> #include <qlayout.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PtrList> +#include <QLabel> +#include <Q3BoxLayout> class JournalEntry; @@ -47,5 +52,5 @@ class KOJournalView : public KOrg::BaseView virtual int currentDateCount(); void clearList(); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); DateList selectedDates() {DateList q; @@ -61,15 +66,15 @@ class KOJournalView : public KOrg::BaseView void updateConfig(); void showDates( const QDate &start, const QDate &end ); - void showEvents(QPtrList<Event> eventList); + void showEvents(Q3PtrList<Event> eventList); void changeEventDisplay(Event *, int); 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; QLabel * mDateLabel; diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 192f8c0..0ea1d50 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -23,18 +23,27 @@ */ -#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> #include <qmessagebox.h> #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> #include <klocale.h> @@ -71,8 +80,8 @@ extern QPixmap* sgListViewCompletedPix[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) { }; protected: @@ -275,27 +284,27 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, mListView->addColumn(i18n("Last Modified")); - 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); int iii = 0; 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); mListView->setFont ( KOPrefs::instance()->mListViewFont ); mPopupMenu = eventPopup(); - QPopupMenu* selPopup = new QPopupMenu ( this ); + Q3PopupMenu* selPopup = new Q3PopupMenu ( this ); mPopupMenu->insertSeparator(); @@ -307,18 +316,18 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, SLOT(deleteAll())); mPopupMenu->insertItem(i18n("Selection"), selPopup ); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Hide all selected"),this, SLOT(hideAll()),true); selPopup->insertSeparator(); - QPopupMenu * exportPO = new QPopupMenu ( this ); + Q3PopupMenu * exportPO = new Q3PopupMenu ( this ); selPopup->insertItem( i18n("Export"), exportPO ); #ifdef DESKTOP_VERSION mPopupMenu->insertSeparator(); - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Print complete list..."),this, SLOT(printList()),true); #endif - mCalPopup = new QPopupMenu ( this ); + mCalPopup = new Q3PopupMenu ( this ); selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); @@ -328,8 +337,8 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, SLOT(setAlarm())); #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, SLOT(setAlarm()),true); @@ -357,5 +366,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, SLOT(beamSelected())); #if 0 - mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), + mPopupMenu->addAdditionalItem(QIcon(QPixmap()), i18n("Beam via IR"),this, SLOT(beamSelected()),true); @@ -376,11 +385,11 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, QObject::connect(mListView,SIGNAL( newEvent()), 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 *)), SIGNAL(showIncidenceSignal(Incidence *)) ); @@ -429,5 +438,5 @@ void KOListView::setCalendar( int c ) } - QPtrList<Incidence> delSel = getSelectedIncidences() ; + Q3PtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); if ( icount ) { @@ -443,5 +452,5 @@ void KOListView::setCalendar( int c ) } } - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); while ( cal ) { @@ -498,5 +507,5 @@ void KOListView::setAlarm() if ( !kap.exec() ) 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(); int count = 0; @@ -523,5 +532,5 @@ void KOListView::setAlarm() alarm->setType(Alarm::Invalid); } else { - QPtrList<Alarm> alarms = inc->alarms(); + Q3PtrList<Alarm> alarms = inc->alarms(); Alarm *alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next() ) { @@ -553,5 +562,5 @@ void KOListView::setCategories( bool removeOld ) QStringList catList = csd->selectedCategories(); delete csd; - QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; + Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; Incidence* inc = delSel.first(); while ( inc ) { @@ -573,5 +582,5 @@ void KOListView::setCategories( bool removeOld ) void KOListView::beamSelected() { - QPtrList<Incidence> delSel = getSelectedIncidences() ; + Q3PtrList<Incidence> delSel = getSelectedIncidences() ; if ( delSel.count() ) emit beamIncidenceList( delSel ); @@ -588,5 +597,5 @@ void KOListView::saveDescriptionToFile() return; } - QPtrList<Incidence> delSel = getSelectedIncidences() ; + Q3PtrList<Incidence> delSel = getSelectedIncidences() ; int icount = delSel.count(); if ( icount ) { @@ -646,9 +655,9 @@ void KOListView::saveDescriptionToFile() } QFile file( fn ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { topLevelWidget()->setCaption(i18n("File open error - nothing saved!") ); return; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; file.close(); @@ -668,10 +677,10 @@ void KOListView::saveToFile() writeToFile( true ); } -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 ) { if ( item->isSelected() ) { @@ -707,5 +716,5 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool } if ( addSubTodos ) { - QPtrList<Incidence> tempSel ; + Q3PtrList<Incidence> tempSel ; inc->addRelationsToList( &tempSel ); Incidence* tempinc = tempSel.first(); @@ -731,5 +740,5 @@ QPtrList<Incidence> KOListView::getSelectedIncidences( bool includeEvents, bool void KOListView::writeToFile( bool iCal ) { - QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; + Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed; if ( !iCal ) { bool journal = false; @@ -804,6 +813,6 @@ void KOListView::writeToFile( bool iCal ) void KOListView::hideAll() { - QPtrList<QListViewItem> delSel ; - QListViewItem *item = mListView->firstChild (); + Q3PtrList<Q3ListViewItem> delSel ; + Q3ListViewItem *item = mListView->firstChild (); while ( item ) { if ( item->isSelected() ) { @@ -814,5 +823,5 @@ void KOListView::hideAll() item = delSel.first() ; while ( item ) { - QListViewItem * del = item; + Q3ListViewItem * del = item; item = delSel.next(); delete del; @@ -825,5 +834,5 @@ void KOListView::printList() void KOListView::deleteAll() { - QPtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;; + Q3PtrList<Incidence> delSel = getSelectedIncidences(); // all inc allowed;; if ( delSel.count() ) { int icount = delSel.count(); @@ -839,9 +848,9 @@ void KOListView::deleteAll() QDialog dia ( this, "p-dialog", true ); QLabel lab (i18n("Close dialog to abort deletion!"), &dia ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); lay.setSpacing(7); lay.addWidget( &lab); - QProgressBar bar( icount, &dia ); + Q3ProgressBar bar( icount, &dia ); lay.addWidget( &bar); int w = 220; @@ -885,8 +894,8 @@ 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 ) { if ( item->isSelected() ) { @@ -988,5 +997,5 @@ void KOListView::showDates(const QDate &start, const QDate &end) } -void KOListView::addEvents(QPtrList<Event> eventList) +void KOListView::addEvents(Q3PtrList<Event> eventList) { @@ -1000,5 +1009,5 @@ void KOListView::addEvents(QPtrList<Event> eventList) } -void KOListView::addTodos(QPtrList<Todo> eventList) +void KOListView::addTodos(Q3PtrList<Todo> eventList) { Todo *ev; @@ -1010,5 +1019,5 @@ void KOListView::addTodos(QPtrList<Todo> eventList) } } -void KOListView::addJournals(QPtrList<Journal> eventList) +void KOListView::addJournals(Q3PtrList<Journal> eventList) { Journal *ev; @@ -1045,5 +1054,5 @@ void KOListView::addIncidence(Incidence *incidence) } -void KOListView::showEvents(QPtrList<Event> eventList) +void KOListView::showEvents(Q3PtrList<Event> eventList) { clear(); @@ -1096,5 +1105,5 @@ KOListViewItem *KOListView::getItemForEvent(Incidence *event) } -void KOListView::defaultItemAction(QListViewItem *i) +void KOListView::defaultItemAction(Q3ListViewItem *i) { KOListViewItem *item = static_cast<KOListViewItem *>( i ); @@ -1103,5 +1112,5 @@ void KOListView::defaultItemAction(QListViewItem *i) } -void KOListView::popupMenu(QListViewItem *item,const QPoint &,int) +void KOListView::popupMenu(Q3ListViewItem *item,const QPoint &,int) { mActiveItem = (KOListViewItem *)item; @@ -1132,5 +1141,5 @@ void KOListView::writeSettings(KConfig *config, QString setting) } -void KOListView::processSelectionChange(QListViewItem *) +void KOListView::processSelectionChange(Q3ListViewItem *) { @@ -1181,6 +1190,6 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) switch ( e->key() ) { case Qt::Key_Down: - if ( e->state() == ShiftButton ) { - QListViewItem* cn = currentItem(); + if ( e->state() == Qt::ShiftButton ) { + Q3ListViewItem* cn = currentItem(); if ( !cn ) cn = firstChild(); @@ -1195,8 +1204,8 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) return; } - if ( e->state() == ControlButton ) { + if ( e->state() == Qt::ControlButton ) { int count = childCount (); int jump = count / 5; - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); if ( ! cn ) @@ -1212,11 +1221,11 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) } else - QListView::keyPressEvent ( e ) ; + Q3ListView::keyPressEvent ( e ) ; e->accept(); break; case Qt::Key_Up: - if ( e->state() == ShiftButton ) { - QListViewItem* cn = firstChild(); + if ( e->state() == Qt::ShiftButton ) { + Q3ListViewItem* cn = firstChild(); if ( cn ) { setCurrentItem ( cn ); @@ -1226,8 +1235,8 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) return; } - if ( e->state() == ControlButton ) { + if ( e->state() == Qt::ControlButton ) { int count = childCount (); int jump = count / 5; - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); if ( ! cn ) @@ -1242,9 +1251,9 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) ensureItemVisible ( cn ); } else - QListView::keyPressEvent ( e ) ; + Q3ListView::keyPressEvent ( e ) ; e->accept(); break; case Qt::Key_I: { - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); if ( cn ) { @@ -1266,10 +1275,10 @@ void KOListViewListView::keyPressEvent ( QKeyEvent *e) case Qt::Key_Enter: { - QListViewItem* cn; + Q3ListViewItem* cn; cn = currentItem(); if ( cn ) { KOListViewItem* ci = (KOListViewItem*)( cn ); if ( ci ){ - if ( e->state() == ShiftButton ) + if ( e->state() == Qt::ShiftButton ) ci->setSelected( false ); else @@ -1301,10 +1310,10 @@ KOListViewListView::KOListViewListView(KOListView * lv ) //QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); #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 ) { if ( qitem->isSelected() && item != qitem ) @@ -1318,5 +1327,5 @@ void KOListViewListView::contentsMouseDoubleClickEvent(QMouseEvent *e) if (!e) return; QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt(vp); + Q3ListViewItem *item = itemAt(vp); if (!item) { emit newEvent(); @@ -1330,6 +1339,6 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) //qDebug("contentsMousePressEvent++++ "); KListView::contentsMousePressEvent( e ); - if ( e->button() == RightButton ) { - QListViewItem* ci = currentItem(); + if ( e->button() == Qt::RightButton ) { + Q3ListViewItem* ci = currentItem(); clearSelection () ; if ( ci ) @@ -1349,5 +1358,5 @@ 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 ); @@ -1357,5 +1366,5 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) //qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y()); mYMousePos = mapToGlobal( (e->pos())).y(); - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { mPopupTimer->start( 600 ); mEventPos = contentsToViewport(e->pos()); @@ -1363,6 +1372,6 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e) } KListView::contentsMousePressEvent( e ); - if ( e->button() == RightButton ) { - QListViewItem* ci = currentItem(); + if ( e->button() == Qt::RightButton ) { + Q3ListViewItem* ci = currentItem(); //clearSelection(); if ( ci ) @@ -1391,5 +1400,5 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) #define protected public -#include <qheader.h> +#include <q3header.h> #undef protected void KOListViewListView::printList() @@ -1408,5 +1417,5 @@ void KOListViewListView::printList() p.begin ( &printer ); p.setFont(font()); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -1444,5 +1453,5 @@ void KOListViewListView::printList() for ( iii = 0; iii < cou; ++iii ) { int align = columnAlignment( iii ); - if ( align == AlignAuto ) align = AlignLeft; + if ( align == Qt::AlignLeft ) align = Qt::AlignLeft; p.restore(); p.save(); diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index 99d0561..9fb0b00 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h @@ -25,7 +25,13 @@ #define _KOLISTVIEW_H -#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> #include <klistview.h> @@ -48,5 +54,5 @@ class KOListViewWhatsThis; #include <qtooltip.h> #include <qcheckbox.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qlabel.h> #include <kiconloader.h> @@ -61,5 +67,5 @@ class KOAlarmPrefs : public QDialog { setCaption( i18n("Alarm Options") ); - QVBoxLayout* alarmLayout = new QVBoxLayout( this ); + Q3VBoxLayout* alarmLayout = new Q3VBoxLayout( this ); alarmLayout->setSpacing( 3 ); alarmLayout->setMargin( 3 ); @@ -75,5 +81,5 @@ class KOAlarmPrefs : public QDialog mAlarmIncrCombo->insertItem(i18n("day(s)")); alarmLayout->addWidget(mAlarmIncrCombo); - QHBox * hb = new QHBox ( parent ); + Q3HBox * hb = new Q3HBox ( parent ); alarmLayout->addWidget(hb); mAlarmSoundButton = new QPushButton(hb); @@ -211,5 +217,5 @@ class KOListViewListView : public KListView public: KOListViewListView(KOListView * lv ); - bool hasMultiSelection(QListViewItem*); + bool hasMultiSelection(Q3ListViewItem*); void printList(); signals: @@ -241,11 +247,11 @@ class KOListView : public KOEventView virtual int maxDatesHint(); virtual int currentDateCount(); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); virtual DateList selectedDates(); void showDates(bool show); 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, const QDate &, const QDate &); @@ -258,9 +264,9 @@ class KOListView : public KOEventView int count(); 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(); signals: void signalNewEvent(); - void beamIncidenceList(QPtrList<Incidence>); + void beamIncidenceList(Q3PtrList<Incidence>); public slots: @@ -270,5 +276,5 @@ class KOListView : public KOEventView virtual void updateView(); virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void clearSelection(); void allSelection(); @@ -288,16 +294,16 @@ class KOListView : public KOEventView void changeEventDisplay(Event *, int); - 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 ); void populateCalPopup(); protected slots: - void processSelectionChange(QListViewItem *); + void processSelectionChange(Q3ListViewItem *); void catChanged( Incidence* ); protected: void writeToFile( bool iCal ); - void addEvents(QPtrList<Event> eventList); + void addEvents(Q3PtrList<Event> eventList); void addIncidence(Incidence *); KOListViewItem *getItemForEvent(Incidence *event); @@ -305,10 +311,10 @@ class KOListView : public KOEventView private: bool mForceShowCompletedTodos; - QPopupMenu* mCalPopup; + Q3PopupMenu* mCalPopup; KOListViewWhatsThis *mKOListViewWhatsThis; KOListViewListView *mListView; KOEventPopupMenu *mPopupMenu; KOListViewItem *mActiveItem; - QDict<Incidence> mUidDict; + Q3Dict<Incidence> mUidDict; QDate mStartDate; void keyPressEvent ( QKeyEvent * ) ; diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 85e9166..ca55c43 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -18,20 +18,32 @@ */ -#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> #include <qtooltip.h> #include <qpainter.h> #include <qtimer.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #else #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 @@ -60,8 +72,8 @@ 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( ) "); }; @@ -78,5 +90,5 @@ private: KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) - : QListBox(parent, name, WRepaintNoErase) + : Q3ListBox(parent, name, Qt::WNoAutoErase) { #ifndef DESKTOP_VERSION @@ -86,6 +98,6 @@ KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) mWT = new KNOWhatsThis(this); resetOnFocusIn = true; - setVScrollBarMode(QScrollView::AlwaysOff); - setHScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); } KNoScrollListBox::~KNoScrollListBox() @@ -101,5 +113,5 @@ KNoScrollListBox::~KNoScrollListBox() void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) { - QListBox::focusInEvent ( e ); + Q3ListBox::focusInEvent ( e ); if ( count() ){ int ci = currentItem(); @@ -113,22 +125,22 @@ void KNoScrollListBox::focusInEvent ( QFocusEvent * e ) if ( KOPrefs::instance()->mEnableMonthScroll || KOPrefs::instance()->mMonthViewWeek ) { - QListBoxItem *fi = firstItem (); + Q3ListBoxItem *fi = firstItem (); if (fi ) { int ihei = fi->height( this ); int hei = numRows () * ihei; 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); } } @@ -142,8 +154,8 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) setSelected ( i, false ); } - QListBox::focusOutEvent ( e ); + Q3ListBox::focusOutEvent ( e ); } - setVScrollBarMode(QScrollView::AlwaysOff); - setHScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(Q3ScrollView::AlwaysOff); + setHScrollBarMode(Q3ScrollView::AlwaysOff); if ( ! mBlockDeselect ) emit highlightIncidence( 0, (MonthViewCell*)this, 0 ); @@ -153,5 +165,5 @@ void KNoScrollListBox::focusOutEvent ( QFocusEvent * e ) QString KNoScrollListBox::getWhatsThisText(QPoint p) { - QListBoxItem* item = itemAt ( p ); + Q3ListBoxItem* item = itemAt ( p ); if ( ! item ) { return i18n("Click in the cell\nto add an event!"); @@ -166,5 +178,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) //qDebug("KNoScrollListBox::keyPressEvent "); switch(e->key()) { - case Key_Right: + case Qt::Key_Right: if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { @@ -174,5 +186,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) scrollBy(10,0); break; - case Key_Left: + case Qt::Key_Left: if (e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { @@ -182,5 +194,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) scrollBy(-10,0); break; - case Key_Up: + case Qt::Key_Up: if( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { e->ignore(); @@ -202,5 +214,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) } break; - case Key_Down: + case Qt::Key_Down: if(e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) { e->ignore(); @@ -222,10 +234,10 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) } break; - case Key_I: + case Qt::Key_I: QTimer::singleShot( 1, this, SLOT ( oneDown() ) ); e->ignore(); break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { if ( currentItem() >= 0 ) { @@ -237,5 +249,5 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) } break; - case Key_Shift: + case Qt::Key_Shift: emit shiftDown(); break; @@ -267,5 +279,5 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) { switch(e->key()) { - case Key_Shift: + case Qt::Key_Shift: emit shiftUp(); break; @@ -277,7 +289,7 @@ void KNoScrollListBox::keyReleaseEvent(QKeyEvent *e) void KNoScrollListBox::mousePressEvent(QMouseEvent *e) { - QListBox::mousePressEvent(e); + Q3ListBox::mousePressEvent(e); - if(e->button() == RightButton) { + if(e->button() == Qt::RightButton) { emit rightClick(); } @@ -285,5 +297,5 @@ void KNoScrollListBox::mousePressEvent(QMouseEvent *e) MonthViewItem::MonthViewItem( Incidence *incidence, const QString & s) - : QListBoxItem() + : Q3ListBoxItem() { mblockRepaint = true; @@ -396,5 +408,5 @@ void MonthViewItem::paint(QPainter *p) p->drawLine ( x+1, yyy, x +sizeM +sizeM/2-1, yyy ) ; if ( mMultiday == 2 || mMultiday == 3 ) { - QPointArray pa ( 3 ); + Q3PointArray pa ( 3 ); pa.setPoint (0, x, yyy ); pa.setPoint (1, x+sizeM/2, yyy+sizeM/2 ); @@ -403,5 +415,5 @@ void MonthViewItem::paint(QPainter *p) } if ( mMultiday == 2 || mMultiday == 1 ) { - QPointArray pa ( 3 ); + Q3PointArray pa ( 3 ); pa.setPoint (0, x+sizeM +sizeM/2, yyy ); pa.setPoint (1, x+sizeM, yyy+sizeM/2 ); @@ -463,5 +475,5 @@ void MonthViewItem::paint(QPainter *p) } -int MonthViewItem::height(const QListBox *lb) const +int MonthViewItem::height(const Q3ListBox *lb) const { int ret = 10; @@ -471,5 +483,5 @@ int MonthViewItem::height(const QListBox *lb) const } -int MonthViewItem::width(const QListBox *lb) const +int MonthViewItem::width(const Q3ListBox *lb) const { if( KOPrefs::instance()->mEnableMonthScroll || isWeekItem ) { @@ -515,8 +527,8 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) //mLabel->setAlignment( AlignCenter ); 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 ); //topLayout->addWidget( mItemList ); @@ -530,11 +542,11 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) //connect( mLabel, SIGNAL( clicked( )), SLOT( newEvent() )); 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 * ) ) ); /* @@ -546,5 +558,5 @@ MonthViewCell::MonthViewCell( KOMonthView *parent,QWidget* par ) QToolTipGroup *MonthViewCell::toolTipGroup() { - if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); + /* TODO:hacker: if (!mToolTipGroup) mToolTipGroup = new QToolTipGroup(0); */ return mToolTipGroup; } @@ -638,5 +650,5 @@ void MonthViewCell::startUpdateCell() blockSignals( true ); mdayCount = 0; - setFocusPolicy(NoFocus); + setFocusPolicy(Qt::NoFocus); if ( !mMonthView->isUpdatePossible() ) return; @@ -693,5 +705,5 @@ int MonthViewCell::insertEvent(Event *event) #endif QString mToolTipText; - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); if ( !(event->doesRecur() == Recurrence::rNone) ) { if ( !KOPrefs::instance()->mMonthDailyRecur && event->doesRecur() == Recurrence::rDaily ) @@ -835,5 +847,5 @@ int MonthViewCell::insertEvent(Event *event) for ( i = pos; i < itcount;++i ) { // 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() ) { pos = i; @@ -851,5 +863,5 @@ int MonthViewCell::insertEvent(Event *event) void MonthViewCell::insertTodo(Todo *todo) { - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); QString text; if (todo->hasDueDate()) { @@ -923,5 +935,5 @@ void MonthViewCell::finishUpdateCell() if (mToolTip.count() > 0 ) { mToolTip.sort(); - QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); + /* TODO: hacker: QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); */ } #endif @@ -939,5 +951,5 @@ void MonthViewCell::updateCell() startUpdateCell(); //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); - QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); + Q3PtrList<Event> events = mMonthView->calendar()->events( mDate, true ); Event *event; for( event = events.first(); event; event = events.next() ) { // for event @@ -945,5 +957,5 @@ void MonthViewCell::updateCell() } // insert due todos - QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); + Q3PtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); Todo *todo; for(todo = todos.first(); todo; todo = todos.next()) { @@ -993,26 +1005,26 @@ void MonthViewCell::enableScrollBars( bool enabled ) return; if ( enabled ) { - QListBoxItem *fi = firstItem (); + Q3ListBoxItem *fi = firstItem (); if (fi ) { int ihei = fi->height( this ); int hei = numRows () * ihei; 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); } } @@ -1084,5 +1096,5 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e ) } -void MonthViewCell::defaultAction( QListBoxItem *item ) +void MonthViewCell::defaultAction( Q3ListBoxItem *item ) { @@ -1106,5 +1118,5 @@ void MonthViewCell::newEvent() emit newEventSignal( dt ); } -void MonthViewCell::cellClicked( QListBoxItem *item ) +void MonthViewCell::cellClicked( Q3ListBoxItem *item ) { mMonthView->setSelectedCell( this ); @@ -1117,5 +1129,5 @@ void MonthViewCell::cellClicked( QListBoxItem *item ) } -void MonthViewCell::contextMenu( QListBoxItem *item ) +void MonthViewCell::contextMenu( Q3ListBoxItem *item ) { mMonthView->setPopupCell( this ); @@ -1134,5 +1146,5 @@ void MonthViewCell::contextMenu( QListBoxItem *item ) } -void MonthViewCell::selection( QListBoxItem *item ) +void MonthViewCell::selection( Q3ListBoxItem *item ) { if ( !item ) { @@ -1186,6 +1198,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) mPopupCell = 0; 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 ); mWeekView = new QWidget( mWidStack ); @@ -1216,13 +1228,13 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) QLabel *label = new QLabel( mMonthView ); 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 ); label = new QLabel( mWeekView ); 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 ); } @@ -1233,9 +1245,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) for( i = 0; i < mNumWeeks+1; i++ ) { KOWeekButton *label = new KOWeekButton( mMonthView ); - label->setFocusPolicy(NoFocus); + label->setFocusPolicy(Qt::NoFocus); label->setFont(bfont); connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 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); //label->setLineWidth(1); @@ -1244,14 +1256,14 @@ 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")); for( i = 0; i < 1+1; i++ ) { KOWeekButton *label = new KOWeekButton( mWeekView ); - label->setFocusPolicy(NoFocus); + label->setFocusPolicy(Qt::NoFocus); label->setFont(bfont); connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); 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); //label->setLineWidth(1); @@ -1260,5 +1272,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) } mWeekLabelsW[1]->setText( i18n("W")); - mWeekLabelsW[1]->setFocusPolicy(WheelFocus); + mWeekLabelsW[1]->setFocusPolicy(Qt::WheelFocus); @@ -1306,11 +1318,11 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 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, SLOT(slotEditJournal()),false); @@ -1326,5 +1338,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) } else pathString += "iconsmini/"; - mNewItemMenu = new QPopupMenu( this ); + mNewItemMenu = new Q3PopupMenu( this ); mNewItemMenu->insertItem( SmallIcon( pathString +"newevent" ), i18n("New Event..."),this, SLOT(slotNewEvent())); mNewItemMenu->insertItem( SmallIcon( pathString +"newtodo" ),i18n("New Todo..."),this,SLOT(slotNewTodo()),false); @@ -1398,5 +1410,5 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int } } - QPtrVector<MonthViewCell> *cells; + Q3PtrVector<MonthViewCell> *cells; if ( weekview ) cells = &mCellsW; @@ -1496,7 +1508,7 @@ int KOMonthView::currentDateCount() } -QPtrList<Incidence> KOMonthView::selectedIncidences() +Q3PtrList<Incidence> KOMonthView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; if ( mSelectedCell ) { @@ -1562,5 +1574,5 @@ void KOMonthView::updateConfig() } #ifdef DESKTOP_VERSION - MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); + /* TODO:hacker: MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); */ #endif updateView(); @@ -1570,5 +1582,5 @@ void KOMonthView::updateDayLabels() { - QPtrVector<QLabel> *mDayLabelsT; + Q3PtrVector<QLabel> *mDayLabelsT; mDayLabelsT = &mDayLabelsW; @@ -1611,7 +1623,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &) // kdDebug() << "KOMonthView::showDates(): " << start.toString() << endl; - QPtrVector<MonthViewCell> *cells; - QPtrVector<QLabel> *dayLabels; - QPtrVector<KOWeekButton> *weekLabels; + Q3PtrVector<MonthViewCell> *cells; + Q3PtrVector<QLabel> *dayLabels; + Q3PtrVector<KOWeekButton> *weekLabels; uint weekNum = 6; mStartDate = start; @@ -1669,5 +1681,5 @@ void KOMonthView::showDates(const QDate &start, const QDate &) } -void KOMonthView::showEvents(QPtrList<Event>) +void KOMonthView::showEvents(Q3PtrList<Event>) { qDebug("KOMonthView::selectEvents is not implemented yet. "); @@ -1691,5 +1703,5 @@ void KOMonthView::updateView() //ti.start(); clearSelection(); - QPtrVector<MonthViewCell> *cells; + Q3PtrVector<MonthViewCell> *cells; if ( mShowWeekView ) { cells = &mCellsW; @@ -1706,5 +1718,5 @@ void KOMonthView::updateView() } - QPtrList<Event> events = calendar()->events(); + Q3PtrList<Event> events = calendar()->events(); Event *event; QDateTime dt; @@ -1770,5 +1782,5 @@ void KOMonthView::updateView() } // insert due todos - QPtrList<Todo> todos = calendar()->todos( ); + Q3PtrList<Todo> todos = calendar()->todos( ); Todo *todo; for(todo = todos.first(); todo; todo = todos.next()) { @@ -2226,5 +2238,5 @@ void KOMonthView::setSelectedCell( MonthViewCell *cell ) void KOMonthView::processSelectionChange() { - QPtrList<Incidence> incidences = selectedIncidences(); + Q3PtrList<Incidence> incidences = selectedIncidences(); if (incidences.count() > 0) { emit incidenceSelected( incidences.first() ); @@ -2262,5 +2274,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) mFlagKeyPressed = true; switch(e->key()) { - case Key_Up: + case Qt::Key_Up: { if ( mShowWeekView ) { @@ -2273,5 +2285,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) e->accept(); break; - case Key_Down: + case Qt::Key_Down: { if ( mShowWeekView ) { @@ -2285,6 +2297,6 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) e->accept(); break; - case Key_Return: - case Key_Enter: + case Qt::Key_Return: + case Qt::Key_Enter: { selectInternalWeekNum ( currentWeek() ); @@ -2292,5 +2304,5 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) e->accept(); break; - case Key_D: + case Qt::Key_D: if ( mSelectedCell ) { mSelectedCell->showDay(); diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 1a9d16d..bca76e5 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -22,15 +22,22 @@ #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> #include <libkcal/calendar.h> @@ -73,5 +80,5 @@ private slots : }; -class KNoScrollListBox: public QListBox +class KNoScrollListBox: public Q3ListBox { Q_OBJECT @@ -104,5 +111,5 @@ class KNoScrollListBox: public QListBox -class MonthViewItem: public QListBoxItem +class MonthViewItem: public Q3ListBoxItem { public: @@ -127,6 +134,6 @@ class MonthViewItem: public QListBoxItem protected: 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; private: @@ -199,13 +206,13 @@ public slots: void repaintfinishUpdateCell(); 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(); private: int mdayCount; - QPtrList <MonthViewItem> mAvailItemList; + Q3PtrList <MonthViewItem> mAvailItemList; KOMonthView *mMonthView; int currentPalette; @@ -248,5 +255,5 @@ class KOMonthView: public KOEventView /** returns the currently selected events */ - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); /** returns dates of the currently selected events */ @@ -270,5 +277,5 @@ class KOMonthView: public KOEventView virtual void updateConfig(); virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void changeEventDisplay(Event *, int); @@ -312,5 +319,5 @@ class KOMonthView: public KOEventView int currentWeek(); bool clPending; - QWidgetStack * mWidStack; + Q3WidgetStack * mWidStack; QWidget* mMonthView; QWidget* mWeekView; @@ -326,10 +333,10 @@ class KOMonthView: public KOEventView void doComputeLayoutWeek(); - 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; bool mShortDayLabelsM; @@ -343,5 +350,5 @@ class KOMonthView: public KOEventView bool mFlagKeyPressed; KOEventPopupMenu *mContextMenu; - QPopupMenu *mNewItemMenu; + Q3PopupMenu *mNewItemMenu; void keyPressEvent ( QKeyEvent * ) ; void keyReleaseEvent ( QKeyEvent * ) ; diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 5078c57..0bd46ea 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -27,5 +27,5 @@ #endif #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qstring.h> @@ -306,5 +306,5 @@ KOPrefs::KOPrefs() : KPrefs::setCurrentGroup("KOrganizer Plugins"); - addItemStringList("SelectedPlugins",&mSelectedPlugins,"holidays"); + addItemStringList("SelectedPlugins",&mSelectedPlugins,QStringList("holidays")); KPrefs::setCurrentGroup("Group Scheduling"); @@ -312,5 +312,5 @@ KOPrefs::KOPrefs() : addItemInt("IMIPScheduler",&mIMIPScheduler,IMIPKMail); addItemInt("IMIPSend",&mIMIPSend,IMIPdirectsend); - addItemStringList("AdditionalMails",&mAdditionalMails,""); + addItemStringList("AdditionalMails",&mAdditionalMails,QStringList()); addItemInt("IMIP auto refresh",&mIMIPAutoRefresh,neverAuto); addItemInt("IMIP auto insert request",&mIMIPAutoInsertRequest,neverAuto); @@ -567,5 +567,5 @@ void KOPrefs::usrWriteConfig() config()->setGroup("Category Colors"); - QDictIterator<QColor> it(mCategoryColors); + Q3DictIterator<QColor> it(mCategoryColors); while (it.current()) { config()->writeEntry(it.currentKey(),*(it.current())); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 94bdd33..35c6110 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -26,7 +26,10 @@ #include <libkdepim/kpimprefs.h> -#include <qdict.h> +#include <q3dict.h> #include <qdir.h> #include <qobject.h> +#include <QDateTime> +//Added by qt3to4: +#include <Q3PtrList> class KConfig; @@ -348,5 +351,5 @@ class KOPrefs : public KPimPrefs int mCurrentDisplayedView; - QPtrList<KopiCalendarFile> mCalendars; + Q3PtrList<KopiCalendarFile> mCalendars; int mNextAvailableCalendar; bool mGlobalUpdateDisabled; @@ -363,6 +366,6 @@ 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 @@ -24,14 +24,14 @@ #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #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> #include <qspinbox.h> @@ -40,6 +40,12 @@ #include <qradiobutton.h> #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> #include <kcolorbutton.h> @@ -117,6 +123,6 @@ 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); topLayout->setMargin(mMarginHint); @@ -173,6 +179,6 @@ 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); topLayout->setMargin(mMarginHint); @@ -212,5 +218,5 @@ void KOPrefsDialog::setupLocaleTab() else { QWidget * hb = new QWidget( topFrame ); - QHBoxLayout *hbLayout = new QHBoxLayout(hb); + Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); sb = addWidBool(i18n("Week starts on Sunday"), @@ -237,8 +243,8 @@ void KOPrefsDialog::setupLocaleTab() 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); topLayout->setMargin(mMarginHint); @@ -288,10 +294,10 @@ void KOPrefsDialog::setupMainTab() if ( QApplication::desktop()->height() <= 240 ) { topFrame = addPage(i18n("General") +" 2",0,0); - topLayout = new QGridLayout(topFrame,4,2); + topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(2); topLayout->setMargin(3); iii = 0; } - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); mNextXDaysSpin = new QSpinBox(2,14,1,dummy); @@ -314,5 +320,5 @@ void KOPrefsDialog::setupMainTab() // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); - QHBox *intervalBox = new QHBox(topFrame); + Q3HBox *intervalBox = new Q3HBox(topFrame); // intervalBox->setSpacing(mSpacingHint); topLayout->addMultiCellWidget(intervalBox,iii,iii,0,1); @@ -403,12 +409,12 @@ void KOPrefsDialog::setupMainTab() 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); topLayout->setMargin(mMarginHint); - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); KPrefsDialogWidTime *dayBegins = addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), @@ -442,5 +448,5 @@ void KOPrefsDialog::setupTimeTab() if ( QApplication::desktop()->height() <= 240 ) { topFrame = addPage(i18n("Time") +" 2",0,0); - topLayout = new QGridLayout(topFrame,1,2); + topLayout = new Q3GridLayout(topFrame,1,2); topLayout->setSpacing(2); topLayout->setMargin(3); @@ -448,5 +454,5 @@ void KOPrefsDialog::setupTimeTab() } - QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, + Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, i18n("Working Hours"), topFrame); @@ -454,14 +460,14 @@ void KOPrefsDialog::setupTimeTab() workingHoursGroup->layout()->setSpacing( 0 ); workingHoursGroup->layout()->setMargin( 4 ); - QHBox *workStartBox = new QHBox(workingHoursGroup); + Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); // workStartBox->setMargin( 0 ); addWidTime(i18n("Daily starting hour:"), &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); - QHBox *workEndBox = new QHBox(workingHoursGroup); + Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); //workEndBox->setMargin( 0 ); addWidTime(i18n("Daily ending hour:"), &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); - QVBox *excludeBox = new QVBox(workingHoursGroup); + Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); //excludeBox->setMargin( 0 ); addWidBool(i18n("Exclude holidays"), @@ -483,8 +489,8 @@ 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); topLayout->setMargin(mMarginHint); @@ -531,5 +537,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,6,1); + topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -595,5 +601,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -653,10 +659,10 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); ii = 0; QLabel *lab; - QHBox *habo = new QHBox( topFrame ); + Q3HBox *habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { lab = new QLabel ( i18n("Show events that recur "), topFrame ); @@ -678,5 +684,5 @@ void KOPrefsDialog::setupViewsTab() - habo = new QHBox( topFrame ); + habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() <= 480 ) { lab = new QLabel (i18n("Show in every cell ") , topFrame ); @@ -731,5 +737,5 @@ void KOPrefsDialog::setupViewsTab() if ( QApplication::desktop()->height() <= 240 ) { topFrame = addPage(i18n("Month View") +" 2",0,0); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(2); topLayout->setMargin(1); @@ -765,5 +771,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -771,5 +777,5 @@ void KOPrefsDialog::setupViewsTab() - QHBox* hdummy = new QHBox(topFrame); + Q3HBox* hdummy = new Q3HBox(topFrame); new QLabel(i18n("Days in What's Next:"),hdummy); mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); @@ -777,5 +783,5 @@ void KOPrefsDialog::setupViewsTab() topLayout->addWidget(hdummy,ii++,0); - QHBox *prioBox = new QHBox(topFrame); + Q3HBox *prioBox = new Q3HBox(topFrame); // intervalBox->setSpacing(mSpacingHint); topLayout->addWidget(prioBox,ii++,0); @@ -819,5 +825,5 @@ void KOPrefsDialog::setupViewsTab() // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -856,5 +862,5 @@ dummy = addWidColor(i18n("Color for running todos:"), &(KOPrefs::instance()->mTodoRunColor),wid); - QHBoxLayout *widLayout = new QHBoxLayout(wid); + Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoRunColor->label() ); widLayout->addWidget( todoRunColor->button() ); @@ -866,5 +872,5 @@ dummy = addWidColor(i18n("Todo due today color:"), &(KOPrefs::instance()->mTodoDueTodayColor),wid); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); widLayout->addWidget( todoDueTodayColor->button() ); @@ -874,5 +880,5 @@ dummy = // Todo overdue color wid = new QWidget( topFrame ); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); KPrefsDialogWidColor *todoOverdueColor = addWidColor(i18n("Todo overdue color:"), @@ -891,5 +897,5 @@ dummy = topFrame = addPage(i18n("View Options"),0,0); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -930,5 +936,5 @@ dummy = topFrame = addPage(i18n("Conflict detection"),0,0); - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -937,7 +943,7 @@ dummy = &(KOPrefs::instance()->mDetectConflicts),topFrame); 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 ) ) ); dummy = addWidBool(i18n("Include events which \"show as free\""), @@ -971,5 +977,5 @@ dummy = // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -990,24 +996,24 @@ dummy = lab->setAlignment( AlignLeft|WordBreak|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) ); #endif - QHBox* dummyBox = new QHBox(topFrame); + Q3HBox* dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); @@ -1016,5 +1022,5 @@ dummy = - QHBox* hbo = new QHBox ( topFrame ); + Q3HBox* hbo = new Q3HBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); @@ -1056,8 +1062,8 @@ 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); topLayout->setMargin(3); @@ -1126,5 +1132,5 @@ void KOPrefsDialog::setupFontsTab() DesktopIcon("fonts",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,7,3); + topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); @@ -1194,8 +1200,8 @@ void KOPrefsDialog::setupFontsTab() 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); // topLayout->setMargin(mMarginHint); @@ -1205,7 +1211,7 @@ 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); topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); @@ -1251,5 +1257,5 @@ void KOPrefsDialog::setupColorsTab() // DesktopIcon("colorize",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,5,2); + topLayout = new Q3GridLayout(topFrame,5,2); // topLayout->setSpacing(mSpacingHint); // topLayout->setMargin(mMarginHint); @@ -1318,5 +1324,5 @@ void KOPrefsDialog::setupPrinterTab() DesktopIcon("fileprint",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); topLayout->setSpacing(mSpacingHint); topLayout->setMargin(mMarginHint); @@ -1328,8 +1334,8 @@ 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); topLayout->setMargin(mMarginHint); @@ -1354,5 +1360,5 @@ 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); topLayout->addMultiCellWidget(mAMails,3,3,0,1); @@ -1372,5 +1378,5 @@ void KOPrefsDialog::setupGroupSchedulingTab() connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); - connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); + connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); #endif } @@ -1379,8 +1385,8 @@ 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); topLayout->setMargin(mMarginHint); @@ -1516,5 +1522,5 @@ void KOPrefsDialog::usrWriteConfig() } } - QDictIterator<QColor> it(mCategoryDict); + Q3DictIterator<QColor> it(mCategoryDict); while (it.current()) { KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h index ee7a7aa..ccc1726 100644 --- a/korganizer/koprefsdialog.h +++ b/korganizer/koprefsdialog.h @@ -24,8 +24,10 @@ #define _KOPREFSDIALOG_H -#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> #include <kdialogbase.h> @@ -95,5 +97,5 @@ class KOPrefsDialog : public KPrefsDialog KPrefsDialogWidBool *mEnableProjectView; - QFrame *mPrinterTab; + Q3Frame *mPrinterTab; QLineEdit *nameEdit; @@ -122,5 +124,5 @@ class KOPrefsDialog : public KPrefsDialog QComboBox *mCategoryCombo; KColorButton *mCategoryButton; - QDict<QColor> mCategoryDict; + Q3Dict<QColor> mCategoryDict; QSlider *mHourSizeSlider; diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro index df8f8d7..0f3b328 100644 --- a/korganizer/korganizer.pro +++ b/korganizer/korganizer.pro @@ -1,4 +1,4 @@ TEMPLATE = app -CONFIG = qt warn_on +CONFIG += qt warn_on TARGET = kopi OBJECTS_DIR = _obj/ @@ -18,25 +18,25 @@ unix : { 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 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 #LIBS += -lsdp @@ -50,8 +50,8 @@ win32: { 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 LIBS += ../libical/lib/icalss.lib @@ -86,5 +86,6 @@ 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 @@ -211,5 +212,6 @@ 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 \ calprinttodoconfig_base.ui \ @@ -217,2 +219,7 @@ INTERFACES += calprintdayconfig_base.ui \ 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 @@ -12,7 +12,7 @@ DEFINES += KORG_NOPRINTER KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_N 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,3 +1,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3ValueList> +#include <Q3PtrList> #include <kconfig.h> @@ -12,5 +16,5 @@ KOTimeSpanView::KOTimeSpanView(Calendar *calendar, QWidget *parent, KOEventView( calendar, parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); mTimeSpanView = new TimeSpanView( this ); @@ -35,5 +39,5 @@ void KOTimeSpanView::readSettings(KConfig *config) config->setGroup("Views"); - QValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); + Q3ValueList<int> sizes = config->readIntListEntry("Separator TimeSpanView"); if (sizes.count() == 2) { mTimeSpanView->setSplitterSizes(sizes); @@ -47,5 +51,5 @@ void KOTimeSpanView::writeSettings(KConfig *config) config->setGroup("Views"); - QValueList<int> list = mTimeSpanView->splitterSizes(); + Q3ValueList<int> list = mTimeSpanView->splitterSizes(); config->writeEntry("Separator TimeSpanView",list); } @@ -61,7 +65,7 @@ int KOTimeSpanView::currentDateCount() } -QPtrList<Incidence> KOTimeSpanView::selectedIncidences() +Q3PtrList<Incidence> KOTimeSpanView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; return selected; @@ -85,7 +89,7 @@ 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(); while( event ) { @@ -101,5 +105,5 @@ 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 @@ -3,4 +3,6 @@ #include "koeventview.h" +//Added by qt3to4: +#include <Q3PtrList> class KConfig; @@ -17,5 +19,5 @@ class KOTimeSpanView : public KOEventView virtual int maxDatesHint(); virtual int currentDateCount(); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); DateList selectedDates() {DateList q; @@ -29,5 +31,5 @@ class KOTimeSpanView : public KOEventView virtual void updateView(); virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void changeEventDisplay(Event *, int); diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 20a35d2..aeab92a 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -24,13 +24,18 @@ #include <qtooltip.h> -#include <qframe.h> +#include <q3frame.h> #include <qpixmap.h> #include <qlayout.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qtimer.h> #include <qdir.h> #include <qdatetime.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qtabwidget.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3PtrList> +#include <Q3VBoxLayout> #include <kiconloader.h> @@ -82,6 +87,6 @@ void KOTodoEditor::init() void KOTodoEditor::setupRecurrence() { - QFrame *topFrame = addPage( i18n("Recurrence") ); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + Q3Frame *topFrame = addPage( i18n("Recurrence") ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( topFrame ); mRecurrence = new KOEditorRecurrence( topFrame ); @@ -112,7 +117,7 @@ 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 ) { topLayout->setMargin(marginHintSmall()); @@ -132,15 +137,15 @@ 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 ) icon = SmallIcon("fileimport16"); @@ -165,11 +170,11 @@ void KOTodoEditor::setupGeneral() topLayout->addStretch(1); - QFrame *topFrame2 = addPage(i18n("Details")); + Q3Frame *topFrame2 = addPage(i18n("Details")); - QBoxLayout *topLayout2 = new QVBoxLayout(topFrame2); + Q3BoxLayout *topLayout2 = new Q3VBoxLayout(topFrame2); topLayout2->setMargin(marginHint()); topLayout2->setSpacing(spacingHint()); - QHBoxLayout *completionLayout = new QHBoxLayout( topLayout2 ); + Q3HBoxLayout *completionLayout = new Q3HBoxLayout( topLayout2 ); mGeneral->initCompletion(topFrame2,completionLayout); @@ -186,7 +191,7 @@ 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()); @@ -194,8 +199,8 @@ void KOTodoEditor::setupGeneral() mGeneral->initTime(topFrame,topLayout); 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 ); mGeneral->initSecrecy( topFrame, detailsLayout ); @@ -428,5 +433,5 @@ void KOTodoEditor::slotLoadTemplate() return ; } - QPtrList<Todo> todos = cal.todos(); + Q3PtrList<Todo> todos = cal.todos(); Todo * todo = todos.first(); if ( !todo ) { diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ba94057..2b8fbd3 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -22,8 +22,10 @@ */ +#include <QDesktopWidget> + #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qcursor.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qdialog.h> #include <qlabel.h> @@ -32,5 +34,19 @@ #include <qinputdialog.h> -#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> #include "koprefs.h" @@ -69,10 +85,10 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na mStopAll = true; setCaption( i18n("Start todo") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); lay->addWidget( lab ); - lab->setAlignment( AlignCenter ); + lab->setAlignment( Qt::AlignCenter ); QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); @@ -99,18 +115,18 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name mTodo = todo; setCaption( i18n("Stop todo") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); lay->addWidget( lab ); - lab->setAlignment( AlignHCenter ); + lab->setAlignment( Qt::AlignHCenter ); lab = new QLabel( i18n("Additional Comment:"), this ); lay->addWidget( lab ); mComment = new QLineEdit( this ); 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 ); lab = new QLabel( i18n("End:"), end ); @@ -174,8 +190,8 @@ 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) { }; protected: @@ -215,5 +231,5 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; @@ -231,5 +247,5 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; @@ -256,5 +272,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; @@ -301,5 +317,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) else { QString text; - if (QTextDrag::decode(e,text)) { + if (Q3TextDrag::decode(e,text)) { //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); @@ -324,5 +340,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) void KOTodoListView::wheelEvent (QWheelEvent *e) { - QListView::wheelEvent (e); + Q3ListView::wheelEvent (e); } @@ -331,5 +347,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) QPoint p(contentsToViewport(e->pos())); - QListViewItem *i = itemAt(p); + Q3ListViewItem *i = itemAt(p); bool rootClicked = true; if (i) { @@ -349,5 +365,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) #ifndef KORG_NODND mMousePressed = false; - if (! rootClicked && !( e->button() == RightButton) ) { + if (! rootClicked && !( e->button() == Qt::RightButton) ) { mPressPos = e->pos(); mMousePressed = true; @@ -359,7 +375,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) #ifndef DESKTOP_VERSION if (!( e->button() == RightButton && rootClicked) ) - QListView::contentsMousePressEvent(e); + Q3ListView::contentsMousePressEvent(e); #else - QListView::contentsMousePressEvent(e); + Q3ListView::contentsMousePressEvent(e); #endif } @@ -367,5 +383,5 @@ void KOTodoListView::paintEvent(QPaintEvent* e) { emit paintNeeded(); - QListView::paintEvent( e); + Q3ListView::paintEvent( e); } void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) @@ -377,5 +393,5 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) QApplication::startDragDistance()*3) { mMousePressed = false; - QListViewItem *item = itemAt(contentsToViewport(mPressPos)); + Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos)); if (item) { DndFactory factory( mCalendar ); @@ -423,5 +439,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) if (! e->isAutoRepeat() ) mFlagKeyPressed = true; - QListViewItem* cn; + Q3ListViewItem* cn; if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { cn = currentItem(); @@ -429,5 +445,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); if ( ci ){ - if ( e->state() == ShiftButton ) + if ( e->state() == Qt::ShiftButton ) ci->setOn( false ); else @@ -450,10 +466,10 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) case Qt::Key_Down: case Qt::Key_Up: - QListView::keyPressEvent ( e ); + Q3ListView::keyPressEvent ( e ); e->accept(); break; case Qt::Key_Left: case Qt::Key_Right: - QListView::keyPressEvent ( e ); + Q3ListView::keyPressEvent ( e ); e->accept(); return; @@ -469,5 +485,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) { - QListView::contentsMouseReleaseEvent(e); + Q3ListView::contentsMouseReleaseEvent(e); mMousePressed = false; } @@ -479,5 +495,5 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt(vp); + Q3ListViewItem *item = itemAt(vp); emit double_Clicked(item); @@ -493,5 +509,5 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) : { setText(i18n("Click to add new Todo")); - setFocusPolicy ( QWidget::ClickFocus ); + setFocusPolicy ( Qt::ClickFocus ); } @@ -524,5 +540,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : isFlatDisplay = false; mNavigator = 0; - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); mName = QString ( name ); mBlockUpdate = false; @@ -531,5 +547,5 @@ 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 ); mNewSubBut = new QPushButton( "sub",mQuickBar ); @@ -569,17 +585,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mNewSubBut->setFixedHeight(fixhei ); - 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" ) ); quickLayout->addWidget( mNewSubBut ); @@ -602,17 +618,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mTodoListView->addColumn(i18n("Todo")); 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); //mTodoListView->addColumn(i18n("Cancelled")); @@ -624,5 +640,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : #if 0 mTodoListView->addColumn(i18n("Sort Id")); - mTodoListView->setColumnAlignment(4,AlignHCenter); + mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); #endif @@ -633,10 +649,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : int iii = 0; for ( iii = 0; iii< 12 ; ++iii ) - mTodoListView->setColumnWidthMode( iii, QListView::Manual ); + mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual ); mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); - mPriorityPopupMenu = new QPopupMenu(this); + mPriorityPopupMenu = new Q3PopupMenu(this); for (int i = 1; i <= 5; i++) { QString label = QString ("%1").arg (i); @@ -645,5 +661,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); - mPercentageCompletedPopupMenu = new QPopupMenu(this); + mPercentageCompletedPopupMenu = new Q3PopupMenu(this); for (int i = 0; i <= 100; i+=20) { QString label = QString ("%1 %").arg (i); @@ -653,10 +669,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mCategoryPopupMenu = new QPopupMenu (this); + mCategoryPopupMenu = new Q3PopupMenu (this); mCategoryPopupMenu->setCheckable (true); connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); - mCalPopupMenu = new QPopupMenu (this); + mCalPopupMenu = new Q3PopupMenu (this); mCalPopupMenu->setCheckable (true); connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); @@ -666,5 +682,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu = new Q3PopupMenu(this); mItemPopupMenu->insertItem(i18n("Show"), this, SLOT (showTodo())); @@ -711,5 +727,5 @@ 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, SLOT (newTodo()),0,1); @@ -747,6 +763,6 @@ 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 *) ) ); /* connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, @@ -754,29 +770,29 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); */ - 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 ) ), SLOT( updateView() ) ); connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), 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() ), SLOT( paintNeeded()) ); #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 @@ -882,5 +898,5 @@ void KOTodoView::updateView() // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); //mTodoListView->header()->setMaximumHeight(fm.height()); - QPtrList<Todo> todoList = calendar()->todos(); + Q3PtrList<Todo> todoList = calendar()->todos(); /* @@ -1045,5 +1061,5 @@ bool KOTodoView::checkTodo( Todo * todo ) } -void KOTodoView::restoreItemState( QListViewItem *item ) +void KOTodoView::restoreItemState( Q3ListViewItem *item ) { pendingSubtodo = 0; @@ -1097,7 +1113,7 @@ void KOTodoView::updateConfig() } -QPtrList<Incidence> KOTodoView::selectedIncidences() +Q3PtrList<Incidence> KOTodoView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); @@ -1108,7 +1124,7 @@ QPtrList<Incidence> KOTodoView::selectedIncidences() } -QPtrList<Todo> KOTodoView::selectedTodos() +Q3PtrList<Todo> KOTodoView::selectedTodos() { - QPtrList<Todo> selected; + Q3PtrList<Todo> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); @@ -1128,5 +1144,5 @@ void KOTodoView::showDates(const QDate &, const QDate &) } -void KOTodoView::showEvents(QPtrList<Event>) +void KOTodoView::showEvents(Q3PtrList<Event>) { kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; @@ -1141,5 +1157,5 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, } -void KOTodoView::editItem(QListViewItem *item ) +void KOTodoView::editItem(Q3ListViewItem *item ) { if ( item ) @@ -1147,5 +1163,5 @@ void KOTodoView::editItem(QListViewItem *item ) } -void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) +void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int) { if ( item ) @@ -1153,5 +1169,5 @@ 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) { pendingSubtodo = 0; @@ -1362,5 +1378,5 @@ void KOTodoView::toggleRunningItemQuick() } } -void KOTodoView::itemDoubleClicked(QListViewItem *item) +void KOTodoView::itemDoubleClicked(Q3ListViewItem *item) { if ( pendingSubtodo != 0 ) { @@ -1429,5 +1445,5 @@ void KOTodoView::toggleRunningItem() } -void KOTodoView::itemClicked(QListViewItem *item) +void KOTodoView::itemClicked(Q3ListViewItem *item) { //qDebug("KOTodoView::itemClicked %d", item); @@ -1442,5 +1458,5 @@ void KOTodoView::itemClicked(QListViewItem *item) if ( pendingSubtodo != 0 ) { bool allowReparent = true; - QListViewItem *par = item; + Q3ListViewItem *par = item; while ( par ) { if ( par == pendingSubtodo ) { @@ -1470,5 +1486,5 @@ void KOTodoView::setDocumentId( const QString &id ) } -void KOTodoView::itemStateChanged( QListViewItem *item ) +void KOTodoView::itemStateChanged( Q3ListViewItem *item ) { if (!item) return; @@ -1543,5 +1559,5 @@ void KOTodoView::setAllClose() resetCurrentItem(); } -void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) +void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI) { @@ -1564,5 +1580,5 @@ void KOTodoView::displayAllFlat() mPopupMenu->setItemChecked( 8,true ); isFlatDisplay = true; - QPtrList<Todo> todoList = calendar()->todos(); + Q3PtrList<Todo> todoList = calendar()->todos(); Todo *todo; for(todo = todoList.first(); todo; todo = todoList.next()) { diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 0cbc087..a9e7f30 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -27,13 +27,23 @@ #include <qfontmetrics.h> #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 <qdialog.h> #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> @@ -102,5 +112,5 @@ class KOTodoListView : public KListView void paintNeeded(); void todoDropped(Todo *, int); - void double_Clicked(QListViewItem *item); + void double_Clicked(Q3ListViewItem *item); void reparentTodoSignal( Todo *,Todo * ); void unparentTodoSignal(Todo *); @@ -125,5 +135,5 @@ class KOTodoListView : public KListView QPoint mPressPos; bool mMousePressed; - QListViewItem *mOldCurrent; + Q3ListViewItem *mOldCurrent; bool mFlagKeyPressed; void keyPressEvent ( QKeyEvent * ) ; @@ -158,6 +168,6 @@ class KOTodoView : public KOrg::BaseView ~KOTodoView(); - QPtrList<Incidence> selectedIncidences(); - QPtrList<Todo> selectedTodos(); + Q3PtrList<Incidence> selectedIncidences(); + Q3PtrList<Todo> selectedTodos(); DateList selectedDates() @@ -185,12 +195,12 @@ class KOTodoView : public KOrg::BaseView void showDates(const QDate &start, const QDate &end); - void showEvents(QPtrList<Event> eventList); + void showEvents(Q3PtrList<Event> eventList); void clearSelection(); void jumpToDate (); - 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(); void newSubTodo(); @@ -220,8 +230,8 @@ class KOTodoView : public KOrg::BaseView void updateTodo( Todo *, int ); - 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(); void fillCategories (); @@ -274,16 +284,16 @@ class KOTodoView : public KOrg::BaseView friend class KOTodoViewItem; QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); - void restoreItemState( QListViewItem * ); + void restoreItemState( Q3ListViewItem * ); bool checkTodo( Todo * ); 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; QMap<int, int> mPercentage; diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 519bb16..c21816d 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp @@ -20,5 +20,9 @@ #include <klocale.h> #include <kdebug.h> -#include <qapp.h> +#include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3PointArray> +#include <QPixmap> #include <kglobal.h> @@ -28,6 +32,6 @@ #include "koprefs.h" -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 ) { construct(); @@ -35,5 +39,5 @@ 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 ) { construct(); @@ -81,5 +85,5 @@ void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w, int y,int h) { - QListViewItem::paintBranches(p,cg,w,y,h); + Q3ListViewItem::paintBranches(p,cg,w,y,h); } #else @@ -317,5 +321,5 @@ void KOTodoViewItem::stateChange(bool state) } if ( state ) { - QListViewItem * myChild = firstChild(); + Q3ListViewItem * myChild = firstChild(); KOTodoViewItem *item; while( myChild ) { @@ -326,5 +330,5 @@ void KOTodoViewItem::stateChange(bool state) } } else { - QListViewItem * myChild = parent(); + Q3ListViewItem * myChild = parent(); if ( myChild ) (static_cast<KOTodoViewItem*>(myChild))->stateChange(state); @@ -384,10 +388,10 @@ bool KOTodoViewItem::isAlternate() KOTodoViewItem *item; 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()); } else @@ -477,5 +481,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i QColor fc = KOPrefs::instance()->mHighlightColor; if ( mTodo->percentComplete() == 100 ) - fc = darkGreen; + fc = Qt::darkGreen; p->drawRect( 2, 2, width-4, height()-4); p->fillRect( 3, 3, progress, height()-6, @@ -483,5 +487,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i p->restore(); } else { - QCheckListItem::paintCell(p, _cg, column, width, alignment); + Q3CheckListItem::paintCell(p, _cg, column, width, alignment); } return; @@ -495,10 +499,10 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i p->fillRect( 0, 0, width, height(), _cg.brush( QColorGroup::Base ) ); - QListView *lv = listView(); + Q3ListView *lv = listView(); if ( !lv ) return; int marg = 2;//lv->itemMargin(); int r = 0; - QCheckListItem::Type myType = QCheckListItem::CheckBox; + Q3CheckListItem::Type myType = Q3CheckListItem::CheckBox; int BoxSize = 20; int boxOffset = 2; @@ -523,5 +527,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i r += BoxSize + 4; } else { - ASSERT( lv ); //### + Q_ASSERT( lv ); //### // QFontMetrics fm( lv->font() ); // int d = fm.height(); @@ -540,5 +544,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i y++; if ( isOn() ) { - QPointArray a( 7*2 ); + Q3PointArray a( 7*2 ); int i, xx, yy; xx = x+xOffset+marg+(boxOffset/2); @@ -556,5 +560,5 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i xx++; yy--; } - p->setPen( darkGreen ); + p->setPen( Qt::darkGreen ); p->drawLineSegments( a ); } @@ -566,7 +570,7 @@ void KOTodoViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, i p->translate( r, 0 ); 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() ); int wid = br.width() +lineStart; diff --git a/korganizer/kotodoviewitem.h b/korganizer/kotodoviewitem.h index bd024c8..62a635c 100644 --- a/korganizer/kotodoviewitem.h +++ b/korganizer/kotodoviewitem.h @@ -23,11 +23,11 @@ #include <qfontmetrics.h> #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> @@ -46,5 +46,5 @@ class KOTodoView; @see KOTodoView */ -class KOTodoViewItem : public QCheckListItem +class KOTodoViewItem : public Q3CheckListItem { public: @@ -55,5 +55,5 @@ class KOTodoViewItem : public QCheckListItem @param ev is the event to have the item display information for. */ - KOTodoViewItem(QListView *parent, Todo *todo, KOTodoView *kotodo); + KOTodoViewItem(Q3ListView *parent, Todo *todo, KOTodoView *kotodo); KOTodoViewItem(KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo); //~KOTodoViewItem() { qDebug("~KOTodoViewItem() %s ", text(0).latin1() );} diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 4057ae0..07c4295 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -24,5 +24,7 @@ */ -#include <qwidgetstack.h> +#include <q3widgetstack.h> +//Added by qt3to4: +#include <Q3PtrList> #include <kconfig.h> @@ -458,6 +460,6 @@ void KOViewManager::showListView() connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 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> ) ) ); } // bool temp = mFlagShowNextxDays; diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index f88403c..bfe930f 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -19,5 +19,5 @@ #include <qlayout.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qtextcodec.h> #include <qfileinfo.h> @@ -25,6 +25,12 @@ #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 #include <kglobal.h> @@ -43,5 +49,5 @@ #include "koeventviewerdialog.h" #include "koeventviewer.h" -#include <qstylesheet.h> +#include <q3stylesheet.h> #include "kowhatsnextview.h" using namespace KOrg; @@ -57,5 +63,5 @@ void WhatsNextTextBrowser::setSource(const QString& n) return; } else { - QTextBrowser::setSource(n); + Q3TextBrowser::setSource(n); } } @@ -73,5 +79,5 @@ void WhatsNextTextBrowser::printMe() QPainter p; p.begin ( &printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer ); float dx, dy; int wid = (m.width() * 9)/10; @@ -104,17 +110,17 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, mView = new WhatsNextTextBrowser(this); 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); } style = stsh->item ("h3" ); if ( style ) { - style->setMargin(QStyleSheetItem::MarginAll,0); + style->setMargin(Q3StyleSheetItem::MarginAll,0); } mEventViewer = 0; - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); // topLayout->addWidget(mDateLabel); topLayout->addWidget(mView); @@ -145,7 +151,7 @@ void KOWhatsNextView::clearList() mView->setText(" "); } -QPtrList<Incidence> KOWhatsNextView::selectedIncidences() +Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences() { - QPtrList<Incidence> eventList; + Q3PtrList<Incidence> eventList; return eventList; @@ -220,6 +226,6 @@ void KOWhatsNextView::updateView() int iii; mTodos.clear(); - QPtrList<Event> events; - QPtrList<Todo> todos = calendar()->todos(); + Q3PtrList<Event> events; + Q3PtrList<Todo> todos = calendar()->todos(); Todo * todo; //mText += "<h2>" + i18n("Events: ") + "</h2>\n"; @@ -455,5 +461,5 @@ void KOWhatsNextView::showDates(const QDate &, const QDate &) } -void KOWhatsNextView::showEvents(QPtrList<Event>) +void KOWhatsNextView::showEvents(Q3PtrList<Event>) { } @@ -742,5 +748,5 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) mText += "</li>\n"; } - QPtrList<Incidence> Relations = ev->relations(); + Q3PtrList<Incidence> Relations = ev->relations(); Incidence *to; for (to=Relations.first();to;to=Relations.next()) { diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 93574ef..49fc448 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h @@ -20,10 +20,16 @@ #define KOWHATSNEXTVIEW_H -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qtimer.h> +//Added by qt3to4: +#include <QShowEvent> +#include <QHideEvent> +#include <QLabel> +#include <Q3ValueList> +#include <Q3PtrList> #include <korganizer/baseview.h> -class QListView; +class Q3ListView; class QLabel; @@ -32,8 +38,8 @@ class KOEventViewerDialog; #include <qpainter.h> #include <qwidget.h> -class WhatsNextTextBrowser : public QTextBrowser { +class WhatsNextTextBrowser : public Q3TextBrowser { Q_OBJECT public: - WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}; + WhatsNextTextBrowser(QWidget *parent) : Q3TextBrowser(parent) {}; void setSource(const QString &); @@ -59,5 +65,5 @@ class KOWhatsNextView : public KOrg::BaseView virtual int currentDateCount(); void setEventViewer(KOEventViewerDialog* v ); - virtual QPtrList<Incidence> selectedIncidences(); + virtual Q3PtrList<Incidence> selectedIncidences(); void clearList(); DateList selectedDates() @@ -71,5 +77,5 @@ class KOWhatsNextView : public KOrg::BaseView void printMe(); virtual void showDates(const QDate &start, const QDate &end); - virtual void showEvents(QPtrList<Event> eventList); + virtual void showEvents(Q3PtrList<Event> eventList); void updateConfig(); void changeEventDisplay(Event *, int); @@ -97,5 +103,5 @@ class KOWhatsNextView : public KOrg::BaseView KOEventViewerDialog *mEventViewer; - 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 @@ -22,10 +22,13 @@ */ -#include <qkeycode.h> +#include <qnamespace.h> #include <qcombobox.h> #include <qdatetime.h> #include <qlineedit.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QKeyEvent> #include <kmessagebox.h> @@ -46,5 +49,5 @@ // But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help. KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) - : QComboBox(TRUE, parent, name) + : Q3ComboBox(TRUE, parent, name) { setInsertionPolicy(NoInsertion); @@ -65,10 +68,10 @@ KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) insertItem(KGlobal::locale()->formatTime(timeEntry)); timeEntry = timeEntry.addSecs(60*15); - } while (!timeEntry.isNull()); + } while ( !( timeEntry.hour() || timeEntry.minute() ) ); // Add end of day. insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) ); updateText(); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(Qt::StrongFocus); connect(this, SIGNAL(activated(int)), this, SLOT(activ(int))); @@ -209,6 +212,6 @@ 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; } @@ -221,10 +224,10 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // Switch for arrows, backspace and escape 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 ) { addTime(QTime(0,15,0), false ); @@ -268,5 +271,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) } break; - case Key_Down: + case Qt::Key_Down: if ( e->state () == Qt::ControlButton ) { subTime(QTime(0,15,0), false ); @@ -311,5 +314,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; // set cursor to correct place - case Key_Left: + case Qt::Key_Left: if ( cpos == 3 ) --cpos; @@ -322,5 +325,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; // set cursor to correct place - case Key_Right: + case Qt::Key_Right: if ( cpos == 1 ) ++cpos; @@ -331,11 +334,11 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) break; // 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) { if ( cpos == 3 ) @@ -343,5 +346,5 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) if ( cpos > 5) cpos = 5; - text.at( cpos-1 ) = '0'; + text[ cpos-1 ] = '0'; lineEdit()->setText( text ); lineEdit()->setCursorPosition(--cpos); @@ -353,5 +356,5 @@ 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(); cpos = 0; @@ -368,6 +371,6 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) // switch another keys switch(e->key()) { - case Key_Delete: - text.at( cpos ) = '0'; + case Qt::Key_Delete: + text[ cpos ] = '0'; lineEdit()->setText( text ); lineEdit()->setCursorPosition(cpos); @@ -375,33 +378,33 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) changedText(); 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) ) return; 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 ) return; if ( hour12Format && cpos == 1 ) return; - case Key_2: + case Qt::Key_2: if ( hour12Format && cpos == 0 ) return; 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 ); if ( cpos == 1 ) @@ -412,9 +415,9 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) changedText(); break; - case Key_Home: + case Qt::Key_Home: lineEdit()->setCursorPosition(0); setSelect( cpos , 1 ); break; - case Key_End: + case Qt::Key_End: lineEdit()->setCursorPosition(5); lineEdit()->deselect(); @@ -426,11 +429,11 @@ void KOTimeEdit::keyPressEvent(QKeyEvent *e) } else if ( cpos == 5 ) {// if cpos < 5 if ( hour12Format ) { - if ( e->key() == Key_A ) { - text.at( 5 ) = 'a'; + if ( e->key() == Qt::Key_A ) { + text[ 5 ] = 'a'; lineEdit()->setText( text ); lineEdit()->setCursorPosition(5); - } else if ( e->key() == Key_P ) { - text.at( 5 ) = 'p'; + } else if ( e->key() == Qt::Key_P ) { + text[ 5 ] = 'p'; lineEdit()->setText( text ); lineEdit()->setCursorPosition(5); diff --git a/korganizer/ktimeedit.h b/korganizer/ktimeedit.h index b3d842d..1c7d18d 100644 --- a/korganizer/ktimeedit.h +++ b/korganizer/ktimeedit.h @@ -25,8 +25,11 @@ #include <qevent.h> -#include <qkeycode.h> +#include <qnamespace.h> #include <qstring.h> #include <qdatetime.h> #include <qcombobox.h> +#include <Q3ComboBox> +//Added by qt3to4: +#include <QKeyEvent> #include <kapplication.h> @@ -39,5 +42,5 @@ @author Preston Brown, Ian Dawes */ -class KOTimeEdit : public QComboBox +class KOTimeEdit : public Q3ComboBox { Q_OBJECT diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp index e72e41c..012455e 100644 --- a/korganizer/lineview.cpp +++ b/korganizer/lineview.cpp @@ -8,5 +8,5 @@ LineView::LineView( QWidget *parent, const char *name ) : - QScrollView( parent, name ) + Q3ScrollView( parent, name ) { mPixelWidth = 1000; diff --git a/korganizer/lineview.h b/korganizer/lineview.h index aa34dbc..52ae9cf 100644 --- a/korganizer/lineview.h +++ b/korganizer/lineview.h @@ -2,8 +2,8 @@ #define LINEVIEW_H -#include <qscrollview.h> -#include <qptrlist.h> +#include <q3scrollview.h> +#include <q3ptrlist.h> -class LineView : public QScrollView +class LineView : public Q3ScrollView { Q_OBJECT @@ -29,5 +29,5 @@ 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 @@ -5,4 +5,6 @@ #include <qcopchannel_qws.h> #include <qpe/global.h> +//Added by qt3to4: +#include <Q3CString> #include <stdlib.h> #else @@ -10,6 +12,4 @@ #include <qstring.h> #include <qwindowsstyle.h> -#include <qplatinumstyle.h> -#include <qsgistyle.h> #include <stdlib.h> #endif @@ -27,4 +27,5 @@ void dumpMissing(); int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); @@ -32,5 +33,4 @@ int main( int argc, char **argv ) #else QApplication a( argc, argv ); - QApplication::setStyle( new QPlatinumStyle ()); #ifdef _WIN32_ QString hdir ( getenv( "HOME") ); @@ -90,5 +90,5 @@ int main( int argc, char **argv ) #ifndef DESKTOP_VERSION - 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 ); #else @@ -99,5 +99,5 @@ int main( int argc, char **argv ) #endif if ( argc > 1 ) { - QCString command = argv[1]; + Q3CString command = argv[1]; if ( argc > 2 ) command += argv[2]; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 69ccde1..2004939 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -2,7 +2,8 @@ #include <qaction.h> -#include <qpopupmenu.h> +#include <Q3Action> +#include <q3popupmenu.h> #include <qpainter.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qpushbutton.h> #include <qmessagebox.h> @@ -11,5 +12,5 @@ #include <qfile.h> #include <qdir.h> -#include <qapp.h> +#include <qapplication.h> #include <qfileinfo.h> #include <qlabel.h> @@ -17,7 +18,7 @@ #include <qcheckbox.h> #include <qmap.h> -#include <qwmatrix.h> -#include <qtextbrowser.h> -#include <qtextstream.h> +#include <qmatrix.h> +#include <q3textbrowser.h> +#include <q3textstream.h> #ifndef DESKTOP_VERSION #include <qpe/global.h> @@ -29,6 +30,15 @@ //#include <unistd.h> // for sleep #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> @@ -81,20 +91,20 @@ class KOex2phonePrefs : public QDialog { setCaption( i18n("Export to phone options") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel *lab; 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 ); mPhoneDevice = new QLineEdit( temphb); lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Connection: "), temphb ); mPhoneConnection = new QLineEdit( temphb); lay->addWidget( temphb ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Model(opt.): "), temphb ); mPhoneModel = new QLineEdit( temphb); @@ -103,5 +113,5 @@ class KOex2phonePrefs : public QDialog mWriteBackFuture->setChecked( true ); lay->addWidget( mWriteBackFuture ); - temphb = new QHBox( this ); + temphb = new Q3HBox( this ); new QLabel( i18n("Max. weeks in future: ") , temphb ); mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); @@ -109,5 +119,5 @@ class KOex2phonePrefs : public QDialog lay->addWidget( temphb ); 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 ); lay->addWidget( ok ); @@ -135,5 +145,5 @@ QPixmap* sgListViewJournalPix; int globalFlagBlockStartup; MainWindow::MainWindow( QWidget *parent, const char *name ) : - QMainWindow( parent, name ) + Q3MainWindow( parent, name ) { sgListViewCompletedPix[5] = &listviewPix; @@ -186,16 +196,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mHourSize > 22 ) 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; } else { if ( p->mToolBarUp ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } if ( KOPrefs::instance()->mUseAppColors ) @@ -214,13 +224,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarHorF ) { if ( p->mToolBarUpF ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } else { if ( p->mToolBarUpF ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } filterToolBar = new QPEToolBar ( this ); @@ -231,5 +241,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : filterMenubar->setFocusPolicy( NoFocus ); #endif - filterPopupMenu = new QPopupMenu( this ); + filterPopupMenu = new Q3PopupMenu( this ); filterMenubar->insertItem( i18n("No Filter"), filterPopupMenu,0 ); QString addTest = "A"; @@ -260,13 +270,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarHorV ) { if ( p->mToolBarUpV ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } else { if ( p->mToolBarUpV ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } viewToolBar = new QPEToolBar( this ); @@ -274,13 +284,13 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( p->mToolBarHorN ) { if ( p->mToolBarUpN ) - tbd = Bottom; + tbd = Qt::Bottom; else - tbd = Top; + tbd = Qt::Top; } else { if ( p->mToolBarUpN ) - tbd = Right; + tbd = Qt::Right; else - tbd = Left; + tbd = Qt::Left; } navigatorToolBar = new QPEToolBar( this ); @@ -441,7 +451,7 @@ void MainWindow::loadDataAfterStart() SLOT( slotModifiedChanged( bool ) ) ); #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() ) recieve( mCStringMess, mByteData ); @@ -510,5 +520,5 @@ void MainWindow::toggleBeamReceive() brAction->setOn(true); 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 } @@ -601,5 +611,5 @@ void MainWindow::closeEvent( QCloseEvent* ce ) } -void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) +void MainWindow::receiveStart( const Q3CString& cmsg, const QByteArray& data ) { qDebug("KO: QCOP start message received: %s ", cmsg.data() ); @@ -607,7 +617,7 @@ void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) mByteData = 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 +"*" ); //QString datamess; @@ -616,5 +626,5 @@ 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; stream >> fileName; @@ -745,19 +755,19 @@ void MainWindow::initActions() //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); - 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; QString pathString = ""; @@ -792,5 +802,5 @@ void MainWindow::initActions() } else { menuBar1 = new KMenuBar( iconToolBar ); - QPopupMenu *menuBar = new QPopupMenu( this ); + Q3PopupMenu *menuBar = new Q3PopupMenu( this ); icon = loadPixmap( pathString + "z_menu" ); menuBar1->insertItem( icon.pixmap(), menuBar); @@ -819,5 +829,5 @@ void MainWindow::initActions() mWeekPixmap.fill( mWeekBgColor ); 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 ) mWeekAction->addTo( iconToolBar ); @@ -841,9 +851,9 @@ void MainWindow::initActions() if ( p->mShowIconFilterview ) { 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() ), this, SLOT( fillFilterMenuTB() ) ); actionFilterMenuTB->addTo( iconToolBar ); - selectFilterMenuTB = new QPopupMenu( this ); + selectFilterMenuTB = new Q3PopupMenu( this ); selectFilterMenuTB->setCheckable( true ); connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); @@ -852,5 +862,5 @@ void MainWindow::initActions() //#endif // ****************** - QAction *action; + Q3Action *action; // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); configureToolBarMenu->setCheckable( true ); @@ -867,5 +877,5 @@ void MainWindow::initActions() this, SLOT( showConfigureAgenda( ) ) ); 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 ); connect( today_action, SIGNAL( activated() ), @@ -873,5 +883,5 @@ 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 ); connect( dPickerAction, SIGNAL( activated() ), @@ -879,5 +889,5 @@ 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 ); connect( search_action, SIGNAL( activated() ), @@ -885,15 +895,15 @@ void MainWindow::initActions() actionMenu->insertItem( i18n("Show next conflict for"), nextConflictMenu ); - action = new QAction( "Undo Delete", i18n("All events"), 0, this ); + action = new Q3Action( "Undo Delete", i18n("All events"), 0, this ); action->addTo( nextConflictMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( conflictAll() ) ); - action = new QAction( "Undo Delete", i18n("Allday events"), 0, this ); + action = new Q3Action( "Undo Delete", i18n("Allday events"), 0, this ); action->addTo( nextConflictMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( conflictAllday() ) ); - 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 ); connect( action, SIGNAL( activated() ), @@ -903,14 +913,14 @@ 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 ); connect( ne_action, SIGNAL( activated() ), mView, SLOT( newEvent() ) ); 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 ); connect( nt_action, SIGNAL( activated() ), mView, SLOT( newTodo() ) ); - mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, + mNewSubTodoAction = new Q3Action( "new_subtodo", i18n("New Sub-Todo..."), 0, this ); mNewSubTodoAction->addTo( mCurrentItemMenu ); @@ -931,15 +941,15 @@ 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 ); connect( mShowAction, SIGNAL( activated() ), mView, SLOT( showIncidence() ) ); - mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); + mEditAction = new Q3Action( "edit_incidence", i18n("Edit..."), 0, this ); mEditAction->addTo( mCurrentItemMenu ); connect( mEditAction, SIGNAL( activated() ), mView, SLOT( editIncidence() ) ); - mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); + mDeleteAction = new Q3Action( "delete_incidence", i18n("Delete..."), 0, this ); mDeleteAction->addTo( mCurrentItemMenu ); connect( mDeleteAction, SIGNAL( activated() ), @@ -947,19 +957,19 @@ void MainWindow::initActions() - mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); + mCloneAction = new Q3Action( "clone_incidence", i18n("Clone..."), 0, this ); mCloneAction->addTo( mCurrentItemMenu ); connect( mCloneAction, SIGNAL( activated() ), mView, SLOT( cloneIncidence() ) ); - mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); + mMoveAction = new Q3Action( "Move_incidence", i18n("Move..."), 0, this ); mMoveAction->addTo( mCurrentItemMenu ); connect( mMoveAction, SIGNAL( activated() ), mView, SLOT( moveIncidence() ) ); #ifndef DESKTOP_VERSION - mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); + mBeamAction = new Q3Action( "Beam_incidence", i18n("Beam..."), 0, this ); mBeamAction->addTo(mCurrentItemMenu ); connect( mBeamAction, SIGNAL( activated() ), mView, SLOT( beamIncidence() ) ); #endif - mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); + mCancelAction = new Q3Action( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); mCancelAction->addTo( mCurrentItemMenu ); connect( mCancelAction, SIGNAL( activated() ), @@ -968,5 +978,5 @@ 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 ); connect( action, SIGNAL( activated() ), @@ -980,5 +990,5 @@ 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 ); connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); @@ -988,5 +998,5 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Filter menu icon"), 26 ); 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 ); connect( action, SIGNAL( activated() ), @@ -995,5 +1005,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "navi" ); 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 ); connect( action, SIGNAL( activated() ), @@ -1002,5 +1012,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "allday" ); 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 ); connect( action, SIGNAL( activated() ), @@ -1032,5 +1042,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "whatsnext" ); 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 ); connect( whatsnext_action, SIGNAL( activated() ), @@ -1039,5 +1049,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "xdays" ); 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 ); connect( xdays_action, SIGNAL( activated() ), @@ -1047,5 +1057,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "journal" ); 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 ); connect( viewjournal_action, SIGNAL( activated() ), @@ -1055,5 +1065,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "day" ); 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 ); // action->addTo( toolBar ); @@ -1063,5 +1073,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "workweek" ); 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 ); connect( day5_action, SIGNAL( activated() ), @@ -1070,5 +1080,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "week" ); 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 ); connect( day7_action, SIGNAL( activated() ), @@ -1077,5 +1087,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "workweek2" ); 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 ); connect( day6_action, SIGNAL( activated() ), @@ -1084,5 +1094,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "month" ); 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 ); connect( month_action, SIGNAL( activated() ), @@ -1091,5 +1101,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "list" ); 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 ); connect( showlist_action, SIGNAL( activated() ), @@ -1098,5 +1108,5 @@ void MainWindow::initActions() icon = loadPixmap( pathString + "todo" ); 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 ); connect( todoview_action, SIGNAL( activated() ), @@ -1106,5 +1116,5 @@ 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 ); connect( action, SIGNAL( activated() ), @@ -1114,5 +1124,5 @@ void MainWindow::initActions() - action = new QAction( "purge_completed", i18n("Purge Completed..."), 0, + action = new Q3Action( "purge_completed", i18n("Purge Completed..."), 0, this ); action->addTo( actionMenu ); @@ -1126,10 +1136,10 @@ 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 ); action->addTo( actionMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( editCategories() ) ); - action = new QAction( "manage cat", i18n("Manage new categories..."), 0, + action = new Q3Action( "manage cat", i18n("Manage new categories..."), 0, this ); action->addTo( actionMenu ); @@ -1139,13 +1149,13 @@ void MainWindow::initActions() actionMenu->insertSeparator(); 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), @@ -1156,14 +1166,14 @@ 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 ); action->addTo( importMenu_X ); 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 ); action->addTo( importMenu_X ); connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); 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 ); action->addTo( importMenu_X ); @@ -1171,5 +1181,5 @@ void MainWindow::initActions() //#ifndef DESKTOP_VERSION 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 ); action->addTo( importMenu_X ); @@ -1178,5 +1188,5 @@ void MainWindow::initActions() #ifdef _OL_IMPORT_ importMenu_X->insertSeparator(); - action = new QAction( "import_ol", i18n("Import from OL"), 0, + action = new Q3Action( "import_ol", i18n("Import from OL"), 0, this ); action->addTo( importMenu_X ); @@ -1187,10 +1197,10 @@ void MainWindow::initActions() //importMenu->insertSeparator(); #if 0 - action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, + action = new Q3Action( "load_cal", i18n("Load Calendar Backup"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); #endif - action = new QAction( "save_cal", i18n("Save Backup..."), 0, + action = new Q3Action( "save_cal", i18n("Save Backup..."), 0, this ); action->addTo( importMenu ); @@ -1199,9 +1209,9 @@ void MainWindow::initActions() importMenu->insertItem( i18n("Import"), importMenu_X ); //importMenu->insertSeparator(); - action = new QAction( "export ical", i18n("Export All Data"), 0, + action = new Q3Action( "export ical", i18n("Export All Data"), 0, this ); action->addTo( exportMenu_X ); 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 ); action->addTo( exportMenu_X ); @@ -1210,5 +1220,5 @@ void MainWindow::initActions() //LR - QPopupMenu *ex2phone = new QPopupMenu( this ); + Q3PopupMenu *ex2phone = new Q3PopupMenu( this ); ex2phone->insertItem(i18n("Complete calendar..."), 1 ); ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); @@ -1220,5 +1230,5 @@ void MainWindow::initActions() #ifndef DESKTOP_VERSION //importMenu->insertSeparator(); - brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, + brAction = new Q3Action( "beam toggle", i18n("Beam receive enabled"), 0, this ); brAction->addTo( beamMenu_X ); @@ -1226,10 +1236,10 @@ void MainWindow::initActions() connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); - action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, + action = new Q3Action( "beam all", i18n("Beam complete calendar..."), 0, this ); action->addTo( beamMenu_X ); connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); - action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, + action = new Q3Action( "beam all", i18n("Beam filtered calendar..."), 0, this ); action->addTo( beamMenu_X ); @@ -1239,5 +1249,5 @@ void MainWindow::initActions() //importMenu->insertSeparator(); 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 ); connect( action, SIGNAL( activated() ), @@ -1245,10 +1255,10 @@ 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 ); connect( action, SIGNAL( activated() ), this, SLOT( printSel() ) ); 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 ); connect( action, SIGNAL( activated() ), @@ -1257,5 +1267,5 @@ 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 ); connect( action, SIGNAL( activated() ), @@ -1263,5 +1273,5 @@ 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 ); connect( action, SIGNAL( activated() ), @@ -1272,9 +1282,9 @@ void MainWindow::initActions() importMenu->insertSeparator(); - action = new QAction( "beam all", i18n("Save"), 0, + action = new Q3Action( "beam all", i18n("Save"), 0, this ); action->addTo( importMenu ); 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 ); action->addTo( importMenu ); @@ -1285,57 +1295,57 @@ void MainWindow::initActions() icon = loadPixmap( "korganizer/korganizer" ); - 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 ); connect( action, SIGNAL( activated() ), SLOT( whatsNew() ) ); - action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); + action = new Q3Action( "featureHowto", i18n("Features + hints..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), SLOT( aboutAutoSaving() ) ); - action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); + action = new Q3Action( "Problemd", i18n("Known Problems..."), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), 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 ); connect( action, SIGNAL( activated() ), SLOT( faq() ) ); - action = new QAction( "licence", i18n("Licence..."), 0, this ); + action = new Q3Action( "licence", i18n("Licence..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( licence() ) ); - action = new QAction( "about", i18n("About..."), 0, this ); + action = new Q3Action( "about", i18n("About..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), @@ -1357,5 +1367,5 @@ void MainWindow::initActions() search_action->addTo( iconToolBar ); if (p-> mShowIconWhatsThis) - QWhatsThis::whatsThisButton ( iconToolBar ); + Q3WhatsThis::whatsThisButton ( iconToolBar ); if (p-> mShowIconNext) whatsnext_action->addTo( viewToolBar ); @@ -1382,5 +1392,5 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); 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() ), mView, SLOT( goPreviousMonth() ) ); @@ -1390,5 +1400,5 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); 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() ), mView, SLOT( goPrevious() ) ); @@ -1402,5 +1412,5 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); 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() ), mView, SLOT( goNext() ) ); @@ -1410,5 +1420,5 @@ void MainWindow::initActions() configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); 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() ), mView, SLOT( goNextMonth() ) ); @@ -1525,5 +1535,5 @@ void MainWindow::exportToPhone( int mode ) if ( ex2phone.mWriteBackFuture->isChecked() ) inFuture = ex2phone.mWriteBackFutureWeeks->value(); - QPtrList<Incidence> delSel; + Q3PtrList<Incidence> delSel; if ( mode == 1 ) delSel = mCalendar->rawIncidences(); @@ -1596,8 +1606,8 @@ void MainWindow::displayText( QString text ,QString cap ) QDialog dia( this, "name", true ); ; 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 ); tb.setText( text ); @@ -1778,7 +1788,7 @@ void MainWindow::updateWeek(QDate seda) QPainter p ( &mWeekPixmap ); 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 ); @@ -1813,5 +1823,5 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) if ( incidence->isBirthday() || incidence->isAnniversary() ) { bool ok; - QDateTime noc = incidence->getNextOccurence( mView->startDate().addDays(-1), &ok ); + QDateTime noc = incidence->getNextOccurence( (QDateTime)mView->startDate().addDays(-1), &ok ); if ( ok ) { int years = noc.date().year() - incidence->dtStart().date().year(); @@ -1847,11 +1857,11 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) static QPixmap eP = SmallIcon( "newevent" ); 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 ); #endif @@ -2046,5 +2056,5 @@ void MainWindow::backupAllFiles() qDebug("KO: Backup created."); // backup ok - QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; + Q3PtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; KopiCalendarFile * cal = calendars.first(); cal = calendars.next(); @@ -2342,5 +2352,5 @@ void MainWindow::fillFilterMenuTB() selectFilterMenuTB->insertSeparator(); - QPtrList<CalFilter> fili = mView->filters(); + Q3PtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); CalFilter *filter = fili.first(); @@ -2387,5 +2397,5 @@ void MainWindow::fillFilterMenu() selectFilterMenu->insertSeparator(); - QPtrList<CalFilter> fili = mView->filters(); + Q3PtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); CalFilter *filter = fili.first(); @@ -2408,5 +2418,5 @@ void MainWindow::fillFilterMenuPopup() filterPopupMenu->insertSeparator(); - QPtrList<CalFilter> fili = mView->filters(); + Q3PtrList<CalFilter> fili = mView->filters(); CalFilter *curfilter = mView->filterView()->selectedFilter(); CalFilter *filter = fili.first(); @@ -2820,4 +2830,4 @@ 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 @@ -2,11 +2,19 @@ #define KORGE_MAINWINDOW_H -#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> #include <libkcal/incidence.h> @@ -16,10 +24,10 @@ #include <qcopchannel_qws.h> #endif -class QAction; +class Q3Action; class CalendarView; class KSyncProfile; #ifdef DESKTOP_VERSION -#define QPEToolBar QToolBar +#define QPEToolBar Q3ToolBar #endif class QPEToolBar; @@ -32,5 +40,5 @@ class CalendarLocal; using namespace KCal; -class MainWindow : public QMainWindow +class MainWindow : public Q3MainWindow { Q_OBJECT @@ -50,6 +58,6 @@ class MainWindow : public QMainWindow virtual void showMaximized (); 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: void autoSaveWarning(); @@ -125,5 +133,5 @@ class MainWindow : public QMainWindow bool mAutoSaveDisabled; bool checkAutosave(); - QCString mCStringMess; + Q3CString mCStringMess; QByteArray mByteData; @@ -133,5 +141,5 @@ class MainWindow : public QMainWindow QCopChannel* infrared; #endif - QAction* brAction; + Q3Action* brAction; KSyncManager* mSyncManager; bool mClosed; @@ -145,6 +153,6 @@ class MainWindow : public QMainWindow QPEToolBar *filterToolBar; KMenuBar *filterMenubar; - QPopupMenu * filterPopupMenu; - QPopupMenu * mCurrentItemMenu; + Q3PopupMenu * filterPopupMenu; + Q3PopupMenu * mCurrentItemMenu; void initActions(); void setDefaultPreferences(); @@ -152,29 +160,29 @@ class MainWindow : public QMainWindow void keyPressEvent ( QKeyEvent * ) ; 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; QPixmap mWeekPixmap; QColor mWeekBgColor; - 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; void closeEvent( QCloseEvent* ce ); diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index f6a1a6a..59c3e45 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -27,8 +27,11 @@ #include <qpushbutton.h> #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> #include <kdebug.h> @@ -54,9 +57,9 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam : QWidget( parent, name ) { - 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); @@ -130,5 +133,5 @@ 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 ); ctrlLayout->addWidget( mPrevMonth, 3 ); @@ -151,11 +154,11 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); 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 @@ -28,7 +28,10 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3Frame> +#include <QLabel> class QPushButton; -class QFrame; +class Q3Frame; class QLabel; @@ -61,5 +64,5 @@ class NavigatorBar: public QWidget int mCurrentMinWid; int mCurrentButtonMinWid; - QFrame *mCtrlFrame; + Q3Frame *mCtrlFrame; QPushButton *mPrevYear; diff --git a/korganizer/outgoingdialog.cpp b/korganizer/outgoingdialog.cpp index 7253c8e..ab31274 100644 --- a/korganizer/outgoingdialog.cpp +++ b/korganizer/outgoingdialog.cpp @@ -22,5 +22,5 @@ #include <qfile.h> #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kglobal.h> @@ -45,8 +45,8 @@ #include "docprefs.h" -ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev, +ScheduleItemOut::ScheduleItemOut(Q3ListView *parent,IncidenceBase *ev, Scheduler::Method method, const QString &recipients) - : QListViewItem(parent) + : Q3ListViewItem(parent) { mIncidence = ev; @@ -124,5 +124,5 @@ ScheduleItemOut::ScheduleItemOut(QListView *parent,IncidenceBase *ev, OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent, const char* name,bool modal, - WFlags fl) + Qt::WFlags fl) : OutgoingDialog_base(parent,name,modal,fl) { @@ -140,10 +140,10 @@ OutgoingDialog::OutgoingDialog(Calendar *calendar,QWidget* parent, #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 *))); mDocPrefs = new DocPrefs("groupschedule"); loadMessages(); @@ -237,5 +237,5 @@ void OutgoingDialog::deleteItem() } -void OutgoingDialog::showEvent(QListViewItem *qitem) +void OutgoingDialog::showEvent(Q3ListViewItem *qitem) { ScheduleItemOut *item = (ScheduleItemOut *)qitem; @@ -295,5 +295,5 @@ bool OutgoingDialog::saveMessage(IncidenceBase *incidence,Scheduler::Method meth KTempFile ktfile(locateLocal("data","korganizer/outgoing/"),"ics"); QString messageText = mFormat->createScheduleMessage(incidence,method); - QTextStream *qts = ktfile.textStream(); + Q3TextStream *qts = ktfile.textStream(); *qts << messageText; *qts << "METHOD-BEGIN:" << endl << method << endl << ":METHOD-END" << endl; @@ -331,9 +331,9 @@ void OutgoingDialog::loadMessages() } if (!inserted) { - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { kdDebug() << "OutgoingDialog::loadMessage(): Can't open file'" << (*it) << "'" << endl; } else { - QTextStream t(&f); + Q3TextStream t(&f); QString messageString = t.read(); ScheduleMessage *message = mFormat->parseScheduleMessage(mCalendar, diff --git a/korganizer/outgoingdialog.h b/korganizer/outgoingdialog.h index a3d561a..e727087 100644 --- a/korganizer/outgoingdialog.h +++ b/korganizer/outgoingdialog.h @@ -24,5 +24,5 @@ #define OUTGOINGDIALOG_H -#include <qlistview.h> +#include <q3listview.h> #include <qmap.h> #include <qstring.h> @@ -35,8 +35,8 @@ 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); virtual ~ScheduleItemOut() {} @@ -57,5 +57,5 @@ class OutgoingDialog : public OutgoingDialog_base public: OutgoingDialog(Calendar *,QWidget* parent=0,const char* name=0, - bool modal=false,WFlags fl=0); + bool modal=false,Qt::WFlags fl=0); ~OutgoingDialog(); @@ -73,5 +73,5 @@ class OutgoingDialog : public OutgoingDialog_base void send(); void deleteItem(); - void showEvent(QListViewItem *); + void showEvent(Q3ListViewItem *); private: 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 @@ -12,10 +12,12 @@ #include <qvariant.h> -#include <qheader.h> -#include <qlistview.h> +#include <q3header.h> +#include <q3listview.h> #include <qpushbutton.h> #include <qlayout.h> #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> /* @@ -26,5 +28,5 @@ * TRUE to construct a modal dialog. */ -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 ) @@ -32,7 +34,7 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo if ( !name ) 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" ) ); mMessageListView->addColumn( tr2i18n( "Start Date" ) ); @@ -41,6 +43,6 @@ OutgoingDialog_base::OutgoingDialog_base( QWidget* parent, const char* name, boo mMessageListView->addColumn( tr2i18n( "End Time" ) ); 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 @@ -13,10 +13,14 @@ #include <qvariant.h> #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; @@ -26,8 +30,8 @@ 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; QPushButton* PushButton7; @@ -35,5 +39,5 @@ public: protected: - QGridLayout* OutgoingDialog_baseLayout; + Q3GridLayout* OutgoingDialog_baseLayout; protected slots: diff --git a/korganizer/publishdialog.cpp b/korganizer/publishdialog.cpp index 2ae6720..ede9840 100644 --- a/korganizer/publishdialog.cpp +++ b/korganizer/publishdialog.cpp @@ -36,5 +36,5 @@ PublishDialog::PublishDialog(QWidget* parent, const char* name, - bool modal, WFlags fl) + bool modal, Qt::WFlags fl) : PublishDialog_base(parent,name,modal,fl) { @@ -42,5 +42,5 @@ PublishDialog::PublishDialog(QWidget* parent, const char* name, mNameLineEdit->setEnabled(false); mEmailLineEdit->setEnabled(false); - connect(mAddressListView,SIGNAL(selectionChanged(QListViewItem *)), + connect(mAddressListView,SIGNAL(selectionChanged(Q3ListViewItem *)), SLOT(updateInput())); } @@ -54,5 +54,5 @@ void PublishDialog::addAttendee(Attendee *attendee) mNameLineEdit->setEnabled(true); mEmailLineEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAddressListView); + Q3ListViewItem *item = new Q3ListViewItem(mAddressListView); item->setText(0,attendee->name()); item->setText(1,attendee->email()); @@ -63,5 +63,5 @@ QString PublishDialog::addresses() { QString to = ""; - QListViewItem *item; + Q3ListViewItem *item; int i, count; count = mAddressListView->childCount(); @@ -81,5 +81,5 @@ void PublishDialog::addItem() mNameLineEdit->setEnabled(true); mEmailLineEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAddressListView); + Q3ListViewItem *item = new Q3ListViewItem(mAddressListView); mAddressListView->insertItem(item); mAddressListView->setSelected(item,true); @@ -90,5 +90,5 @@ void PublishDialog::addItem() void PublishDialog::removeItem() { - QListViewItem *item; + Q3ListViewItem *item; item = mAddressListView->selectedItem(); if (!item) return; @@ -120,5 +120,5 @@ void PublishDialog::openAddressbook() mNameLineEdit->setEnabled(true); mEmailLineEdit->setEnabled(true); - QListViewItem *item = new QListViewItem(mAddressListView); + Q3ListViewItem *item = new Q3ListViewItem(mAddressListView); mAddressListView->setSelected(item,true); mNameLineEdit->setText(a.realName()); @@ -132,5 +132,5 @@ void PublishDialog::openAddressbook() void PublishDialog::updateItem() { - QListViewItem *item; + Q3ListViewItem *item; item = mAddressListView->selectedItem(); if (!item) return; @@ -141,5 +141,5 @@ void PublishDialog::updateItem() void PublishDialog::updateInput() { - QListViewItem *item; + Q3ListViewItem *item; item = mAddressListView->selectedItem(); if (!item) return; diff --git a/korganizer/publishdialog.h b/korganizer/publishdialog.h index 338603c..3ffeec4 100644 --- a/korganizer/publishdialog.h +++ b/korganizer/publishdialog.h @@ -24,5 +24,5 @@ #define PUBLISHDIALOG_H -#include <qlistview.h> +#include <q3listview.h> #include <libkcal/attendee.h> @@ -36,5 +36,5 @@ class PublishDialog : public PublishDialog_base public: 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 @@ -12,13 +12,16 @@ #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> #include <qlayout.h> #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> /* @@ -29,5 +32,5 @@ * TRUE to construct a modal dialog. */ -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 ) @@ -35,7 +38,7 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool if ( !name ) 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" ) ); mAddressListView->addColumn( tr2i18n( "Email" ) ); @@ -73,12 +76,12 @@ PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, bool PublishDialog_baseLayout->addMultiCell( spacer, 3, 5, 2, 2 ); - 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 ); PublishDialog_baseLayout->addMultiCellWidget( Line2, 6, 6, 0, 2 ); - 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 ); layout95->addItem( spacer_2 ); 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 @@ -13,13 +13,19 @@ #include <qvariant.h> #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; @@ -29,8 +35,8 @@ 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; QLabel* TextLabel2; @@ -40,11 +46,11 @@ public: QPushButton* PushButton12; QPushButton* PushButton11; - QFrame* Line2; + Q3Frame* Line2; QPushButton* PushButton9; QPushButton* PushButton8; protected: - QGridLayout* PublishDialog_baseLayout; - QHBoxLayout* layout95; + Q3GridLayout* PublishDialog_baseLayout; + Q3HBoxLayout* layout95; protected slots: diff --git a/korganizer/savetemplatedialog.cpp b/korganizer/savetemplatedialog.cpp index 3544081..35bedba 100644 --- a/korganizer/savetemplatedialog.cpp +++ b/korganizer/savetemplatedialog.cpp @@ -23,4 +23,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> #include <keditlistbox.h> @@ -36,6 +39,6 @@ SaveTemplateDialog::SaveTemplateDialog( IncidenceType type, QWidget *parent ) mType( type ) { - QFrame *topFrame = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( topFrame, 0, spacingHint() ); + Q3Frame *topFrame = plainPage(); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( topFrame, 0, spacingHint() ); mEditListBox = new KEditListBox( i18n("Select Template Name"), topFrame, diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 9cfdc35..105b844 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp @@ -25,12 +25,19 @@ #include <qlayout.h> #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> #include <kmessagebox.h> @@ -47,13 +54,13 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) - : QVBox( 0 ) + : Q3VBox( 0 ) { 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); /* @@ -99,5 +106,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) // topFrame); - incidenceGroup = new QHBox( topFrame ); + incidenceGroup = new Q3HBox( topFrame ); layout->addWidget(incidenceGroup); @@ -107,5 +114,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); - subjectGroup = new QHBox( topFrame ); + subjectGroup = new Q3HBox( topFrame ); layout->addWidget(subjectGroup); @@ -115,5 +122,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); - attendeeGroup = new QHBox( topFrame ); + attendeeGroup = new Q3HBox( topFrame ); layout->addWidget(attendeeGroup ); new QLabel( i18n("Attendee:"),attendeeGroup ); @@ -128,5 +135,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) int space = KDialog::spacingHint(); 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)); mStartDate = new KDateEdit(rangeWidget); @@ -136,5 +143,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) mEndDate->setDate(QDate::currentDate().addDays(365)); rangeLayout->addWidget(mEndDate); - QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); + QToolButton *wt = Q3WhatsThis::whatsThisButton ( rangeWidget ); rangeLayout->addWidget( (QWidget*)wt ); layout->addWidget(rangeWidget); @@ -342,5 +349,5 @@ void SearchDialog::updateView() void SearchDialog::search(const QRegExp &re) { - QPtrList<Event> events; + Q3PtrList<Event> events; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { if ( mRefineItems->isChecked() ) events = mMatchedEvents; @@ -420,5 +427,5 @@ void SearchDialog::search(const QRegExp &re) } if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { - QPtrList<Attendee> tmpAList = ev->attendees(); + Q3PtrList<Attendee> tmpAList = ev->attendees(); Attendee *a; for (a = tmpAList.first(); a; a = tmpAList.next()) { @@ -459,5 +466,5 @@ void SearchDialog::search(const QRegExp &re) } } - QPtrList<Todo> todos; + Q3PtrList<Todo> todos; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { @@ -513,5 +520,5 @@ void SearchDialog::search(const QRegExp &re) } if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { - QPtrList<Attendee> tmpAList = tod->attendees(); + Q3PtrList<Attendee> tmpAList = tod->attendees(); Attendee *a; for (a = tmpAList.first(); a; a = tmpAList.next()) { @@ -549,5 +556,5 @@ void SearchDialog::search(const QRegExp &re) } - QPtrList<Journal> journals; + Q3PtrList<Journal> journals; if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { if ( mRefineItems->isChecked() ) journals = mMatchedJournals ; diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h index 945ff65..5df6116 100644 --- a/korganizer/searchdialog.h +++ b/korganizer/searchdialog.h @@ -27,6 +27,10 @@ #include <qregexp.h> #include <qradiobutton.h> +//Added by qt3to4: +#include <QLabel> +#include <QKeyEvent> +#include <Q3PtrList> #include <kdialogbase.h> -#include <qvbox.h> +#include <q3vbox.h> #include <libkcal/calendar.h> @@ -42,5 +46,5 @@ class CalendarView; using namespace KCal; -class SearchDialog : public QVBox +class SearchDialog : public Q3VBox { Q_OBJECT @@ -73,12 +77,12 @@ class SearchDialog : public QVBox private: - QHBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; + Q3HBox *incidenceGroup ,*subjectGroup ,*attendeeGroup; void search(const QRegExp &); Calendar *mCalendar; - QPtrList<Event> mMatchedEvents; - QPtrList<Todo> mMatchedTodos; - QPtrList<Journal> mMatchedJournals; + Q3PtrList<Event> mMatchedEvents; + Q3PtrList<Todo> mMatchedTodos; + Q3PtrList<Journal> mMatchedJournals; QLabel *searchLabel; diff --git a/korganizer/statusdialog.cpp b/korganizer/statusdialog.cpp index 7137c49..8186ebb 100644 --- a/korganizer/statusdialog.cpp +++ b/korganizer/statusdialog.cpp @@ -22,4 +22,7 @@ #include <qstringlist.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3HBoxLayout> #include <kdebug.h> @@ -33,9 +36,9 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) : setCaption(i18n("Set Your Status")); - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); topLayout->setSpacing( spacingHint() ); topLayout->setMargin( marginHint() ); - QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *statusLayout = new Q3HBoxLayout( topLayout ); QLabel *text = new QLabel(i18n("Set your status"),this); @@ -46,5 +49,5 @@ StatusDialog::StatusDialog(QWidget* parent, const char* name) : statusLayout->addWidget( mStatus ); - QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); + Q3BoxLayout *buttonLayout = new Q3HBoxLayout( topLayout ); QPushButton *ok = new QPushButton(i18n("&OK"), this); diff --git a/korganizer/timeline.cpp b/korganizer/timeline.cpp index 11be432..a6c3cdc 100644 --- a/korganizer/timeline.cpp +++ b/korganizer/timeline.cpp @@ -6,5 +6,5 @@ TimeLine::TimeLine( QWidget *parent, const char *name ) : - QScrollView( parent, name ) + Q3ScrollView( parent, name ) { mPixelWidth = 1000; @@ -12,5 +12,5 @@ TimeLine::TimeLine( QWidget *parent, const char *name ) : resizeContents( mPixelWidth, 20 ); - viewport()->setBackgroundMode( PaletteBackground ); + viewport()->setBackgroundMode( Qt::PaletteBackground ); setHScrollBarMode(AlwaysOff); @@ -59,4 +59,4 @@ void TimeLine::setDateRange( const QDateTime &start, const QDateTime &end ) 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 @@ -2,8 +2,8 @@ #define TIMELINE_H -#include <qscrollview.h> +#include <q3scrollview.h> #include <qdatetime.h> -class TimeLine : public QScrollView +class TimeLine : public Q3ScrollView { Q_OBJECT diff --git a/korganizer/timespanview.cpp b/korganizer/timespanview.cpp index df8ff88..0908056 100644 --- a/korganizer/timespanview.cpp +++ b/korganizer/timespanview.cpp @@ -5,8 +5,12 @@ #include <qsplitter.h> #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> #include <klocale.h> @@ -22,5 +26,5 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : QWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this ); + Q3BoxLayout *topLayout = new Q3VBoxLayout( this ); #ifndef DESKTOP_VERSION mSplitter = new QKSplitter( this ); @@ -30,9 +34,9 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : topLayout->addWidget( mSplitter ); - mList = new QListView( mSplitter ); + mList = new Q3ListView( mSplitter ); mList->addColumn( i18n("Summary") ); QWidget *rightPane = new QWidget( mSplitter ); - QBoxLayout *rightPaneLayout = new QVBoxLayout( rightPane ); + Q3BoxLayout *rightPaneLayout = new Q3VBoxLayout( rightPane ); mTimeLine = new TimeLine( rightPane ); @@ -43,5 +47,5 @@ TimeSpanView::TimeSpanView( QWidget *parent, const char *name ) : rightPaneLayout->addWidget( mLineView ); - QBoxLayout *buttonLayout = new QHBoxLayout( rightPaneLayout ); + Q3BoxLayout *buttonLayout = new Q3HBoxLayout( rightPaneLayout ); QPushButton *zoomInButton = new QPushButton( i18n("Zoom In"), rightPane ); @@ -65,10 +69,10 @@ TimeSpanView::~TimeSpanView() } -QValueList<int> TimeSpanView::splitterSizes() +Q3ValueList<int> TimeSpanView::splitterSizes() { return mSplitter->sizes(); } -void TimeSpanView::setSplitterSizes( QValueList<int> sizes ) +void TimeSpanView::setSplitterSizes( Q3ValueList<int> sizes ) { mSplitter->setSizes( sizes ); @@ -77,5 +81,5 @@ void TimeSpanView::setSplitterSizes( QValueList<int> sizes ) void TimeSpanView::addItem( KCal::Event *event ) { - new QListViewItem( mList, event->summary() ); + new Q3ListViewItem( mList, event->summary() ); QDateTime startDt = event->dtStart(); diff --git a/korganizer/timespanview.h b/korganizer/timespanview.h index 34cb1f7..f652374 100644 --- a/korganizer/timespanview.h +++ b/korganizer/timespanview.h @@ -3,4 +3,6 @@ #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libkcal/event.h> @@ -13,5 +15,5 @@ class QSplitter; #define QKSplitter QSplitter #endif -class QListView; +class Q3ListView; class LineView; class TimeLine; @@ -27,6 +29,6 @@ class TimeSpanView : public QWidget void addItem( KCal::Event * ); - QValueList<int> splitterSizes(); - void setSplitterSizes( QValueList<int> ); + Q3ValueList<int> splitterSizes(); + void setSplitterSizes( Q3ValueList<int> ); void clear(); @@ -49,5 +51,5 @@ class TimeSpanView : public QWidget private: QKSplitter *mSplitter; - QListView *mList; + Q3ListView *mList; TimeLine *mTimeLine; LineView *mLineView; diff --git a/libetpan/libetpan.pro b/libetpan/libetpan.pro index 10f51da..909d064 100644 --- a/libetpan/libetpan.pro +++ b/libetpan/libetpan.pro @@ -1,2 +1,3 @@ +include( ../variables.pri ) ###################################################################### # Automatically generated by qmake (1.07a) Fri Mar 18 19:27:39 2005 @@ -4,5 +5,5 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj MOC_DIR = moc @@ -449,2 +450,4 @@ SOURCES += src/data-types/base64.c \ src/driver/implementation/pop3/pop3driver_tools.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 @@ -4,5 +4,5 @@ TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(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 @@ -70,2 +70,4 @@ 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 @@ -43,2 +43,4 @@ SOURCES += icalcalendar.c \ icalsslexer.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 @@ -27,4 +27,6 @@ #include "alarm.h" +//Added by qt3to4: +#include <Q3ValueList> using namespace KCal; @@ -213,5 +215,5 @@ 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) { mType = Email; @@ -232,5 +234,5 @@ void Alarm::setMailAddress(const Person &mailAddress) } -void Alarm::setMailAddresses(const QValueList<Person> &mailAddresses) +void Alarm::setMailAddresses(const Q3ValueList<Person> &mailAddresses) { if (mType == Email) { @@ -248,7 +250,7 @@ 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 @@ -23,5 +23,5 @@ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include "customproperties.h" @@ -40,5 +40,5 @@ class Alarm : public CustomProperties public: enum Type { Invalid, Display, Procedure, Email, Audio }; - typedef QValueList<Alarm *> List; + typedef Q3ValueList<Alarm *> List; /** Construct a new alarm with variables initialized to "sane" values. */ @@ -113,5 +113,5 @@ class Alarm : public CustomProperties @param attachments optional names of files to attach to the email. */ - 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()); @@ -123,5 +123,5 @@ class Alarm : public CustomProperties Ignored if the alarm is not an email alarm. */ - 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. Ignored if the alarm is not an email alarm. @@ -129,5 +129,5 @@ class Alarm : public CustomProperties void addMailAddress(const Person &mailAlarmAddress); /** return the addresses to send mail to when an alarm goes off */ - QValueList<Person> mailAddresses() const; + Q3ValueList<Person> mailAddresses() const; /** Set the subject line of the mail. @@ -227,5 +227,5 @@ class Alarm : public CustomProperties QString mFile; // procedure program to run/optional audio file to play 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 @@ -31,4 +31,6 @@ #include "calendar.h" #include "syncdefines.h" +//Added by qt3to4: +#include <Q3PtrList> using namespace KCal; @@ -272,17 +274,17 @@ CalFilter *Calendar::filter() } -QPtrList<Incidence> Calendar::incidences() +Q3PtrList<Incidence> Calendar::incidences() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; Incidence *i; - 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 ); @@ -292,45 +294,45 @@ QPtrList<Incidence> Calendar::incidences() void Calendar::resetPilotStat(int id ) { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; Incidence *i; - 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 ); } void Calendar::resetTempSyncStat() { - QPtrList<Incidence> incidences; + Q3PtrList<Incidence> incidences; Incidence *i; - 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; Incidence *i; - 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 ); @@ -338,29 +340,29 @@ 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); return el; } -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); return el; } -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); return el; } -QPtrList<Event> Calendar::events() +Q3PtrList<Event> Calendar::events() { - QPtrList<Event> el = rawEvents(); + Q3PtrList<Event> el = rawEvents(); mFilter->apply(&el); return el; @@ -370,5 +372,5 @@ void Calendar::addIncidenceBranch(Incidence *i) addIncidence( i ); Incidence * inc; - QPtrList<Incidence> Relations = i->relations(); + Q3PtrList<Incidence> Relations = i->relations(); for (inc=Relations.first();inc;inc=Relations.next()) { addIncidenceBranch( inc ); @@ -408,7 +410,7 @@ 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 ); return tl; @@ -456,5 +458,5 @@ void Calendar::removeRelations( Incidence *incidence ) QString uid = incidence->uid(); - QPtrList<Incidence> relations = incidence->relations(); + Q3PtrList<Incidence> relations = incidence->relations(); for( Incidence* i = relations.first(); i; i = relations.next() ) if( !mOrphanUids.find( i->uid() ) ) { @@ -472,5 +474,5 @@ void Calendar::removeRelations( Incidence *incidence ) if( mOrphanUids.remove( uid ) ) { QString r2uid = incidence->relatedToUid(); - QPtrList<Incidence> tempList; + Q3PtrList<Incidence> tempList; while( Incidence* i = mOrphans[ r2uid ] ) { mOrphans.remove( r2uid ); @@ -488,5 +490,5 @@ void Calendar::removeRelations( Incidence *incidence ) if( !( incidence->relatedTo() != 0 && mOrphans.remove( incidence->relatedTo()->uid() ) ) ) { // 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 ) { mOrphans.remove( it.currentKey() ); diff --git a/libkcal/calendar.h b/libkcal/calendar.h index fbc40ad..5845f44 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h @@ -26,6 +26,6 @@ #include <qstring.h> #include <qdatetime.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> #include "customproperties.h" @@ -89,5 +89,5 @@ public: */ virtual void save() = 0; - virtual QPtrList<Event> getExternLastSyncEvents() = 0; + virtual Q3PtrList<Event> getExternLastSyncEvents() = 0; virtual void removeSyncInfo( QString syncProfile) = 0; virtual bool isSaving() { return false; } @@ -156,10 +156,10 @@ public: Return filtered list of all incidences of this calendar. */ - virtual QPtrList<Incidence> incidences(); + virtual Q3PtrList<Incidence> incidences(); /** Return unfiltered list of all incidences of this calendar. */ - virtual QPtrList<Incidence> rawIncidences(); + virtual Q3PtrList<Incidence> rawIncidences(); /** @@ -186,10 +186,10 @@ public: The calendar filter is applied. */ - QPtrList<Event> events( const QDate &date, bool sorted = false); + Q3PtrList<Event> events( const QDate &date, bool sorted = false); /** Get events, which occur on the given date. The calendar filter is applied. */ - QPtrList<Event> events( const QDateTime &qdt ); + Q3PtrList<Event> events( const QDateTime &qdt ); /** Get events in a range of dates. If inclusive is set to true, only events @@ -197,14 +197,14 @@ public: The calendar filter is applied. */ - QPtrList<Event> events( const QDate &start, const QDate &end, + Q3PtrList<Event> events( const QDate &start, const QDate &end, bool inclusive = false); /** Return filtered list of all events in calendar. */ - virtual QPtrList<Event> events(); + virtual Q3PtrList<Event> events(); /** Return unfiltered list of all events in calendar. */ - virtual QPtrList<Event> rawEvents() = 0; + virtual Q3PtrList<Event> rawEvents() = 0; /** @@ -223,5 +223,5 @@ public: Return filterd list of todos. */ - virtual QPtrList<Todo> todos(); + virtual Q3PtrList<Todo> todos(); /** Searches todolist for an event with this unique string identifier, @@ -233,9 +233,9 @@ public: Returns list of todos due on the specified date. */ - virtual QPtrList<Todo> todos( const QDate &date ) = 0; + virtual Q3PtrList<Todo> todos( const QDate &date ) = 0; /** Return unfiltered list of todos. */ - virtual QPtrList<Todo> rawTodos() = 0; + virtual Q3PtrList<Todo> rawTodos() = 0; /** @@ -249,5 +249,5 @@ public: */ virtual Journal *journal( const QDate & ) = 0; - virtual QPtrList<Journal> journals4Date( const QDate & ) = 0; + virtual Q3PtrList<Journal> journals4Date( const QDate & ) = 0; /** Return Journal with given UID. @@ -257,5 +257,5 @@ public: Return list of all Journal entries. */ - virtual QPtrList<Journal> journals() = 0; + virtual Q3PtrList<Journal> journals() = 0; /** @@ -336,9 +336,9 @@ public: Get unfiltered events, which occur on the given date. */ - virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; + virtual Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; /** Get unfiltered events, which occur on the given date. */ - virtual QPtrList<Event> rawEventsForDate( const QDate &date, + virtual Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ) = 0; /** @@ -346,5 +346,5 @@ public: are returned, which are completely included in the range. */ - virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, + virtual Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ) = 0; @@ -377,6 +377,6 @@ 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 @@ -23,5 +23,5 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <kdebug.h> @@ -193,5 +193,5 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) // if inc in local, replace it // if not in local, add it to default calendar - QPtrList<Incidence> localInc = rawIncidences(); + Q3PtrList<Incidence> localInc = rawIncidences(); Incidence* inL = localInc.first(); while ( inL ) { @@ -201,5 +201,5 @@ bool CalendarLocal::mergeCalendar( Calendar* remote ) inL = localInc.next(); } - QPtrList<Incidence> er = remote->rawIncidences(); + Q3PtrList<Incidence> er = remote->rawIncidences(); Incidence* inR = er.first(); while ( inR ) { @@ -260,7 +260,7 @@ void CalendarLocal::addCalendar( Calendar* cal ) cal->setDontDeleteIncidencesOnClose(); setSyncEventsEnabled(); - QPtrList<Incidence> incList; + Q3PtrList<Incidence> incList; { - QPtrList<Event> EventList = cal->rawEvents(); + Q3PtrList<Event> EventList = cal->rawEvents(); Event * ev = EventList.first(); while ( ev ) { @@ -280,5 +280,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) { - QPtrList<Todo> TodoList = cal->rawTodos(); + Q3PtrList<Todo> TodoList = cal->rawTodos(); Todo * ev = TodoList.first(); while ( ev ) { @@ -300,5 +300,5 @@ void CalendarLocal::addCalendar( Calendar* cal ) } { - QPtrList<Journal> JournalList = cal->journals(); + Q3PtrList<Journal> JournalList = cal->journals(); Journal * ev = JournalList.first(); while ( ev ) { @@ -482,7 +482,7 @@ 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() ) if ( it->calEnabled() ) el.append( it ); @@ -500,5 +500,5 @@ Todo *CalendarLocal::todo( QString syncProf, QString id ) void CalendarLocal::removeSyncInfo( QString syncProfile) { - QPtrList<Incidence> all = rawIncidences() ; + Q3PtrList<Incidence> all = rawIncidences() ; Incidence *inc; for ( inc = all.first(); inc; inc = all.next() ) { @@ -506,5 +506,5 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) } if ( syncProfile.isEmpty() ) { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { @@ -521,7 +521,7 @@ void CalendarLocal::removeSyncInfo( QString syncProfile) } } -QPtrList<Event> CalendarLocal::getExternLastSyncEvents() +Q3PtrList<Event> CalendarLocal::getExternLastSyncEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; Event *todo; for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { @@ -686,7 +686,7 @@ void CalendarLocal::deRegisterAlarm() } -QPtrList<Todo> CalendarLocal::todos( const QDate &date ) +Q3PtrList<Todo> CalendarLocal::todos( const QDate &date ) { - QPtrList<Todo> todos; + Q3PtrList<Todo> todos; Todo *todo; @@ -787,5 +787,5 @@ void CalendarLocal::appendAlarms( Alarm::List &alarms, Incidence *incidence, const QDateTime &from, const QDateTime &to ) { - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; for( alarm = alarmList.first(); alarm; alarm = alarmList.next() ) { @@ -806,5 +806,5 @@ void CalendarLocal::appendRecurringAlarms( Alarm::List &alarms, { - QPtrList<Alarm> alarmList = incidence->alarms(); + Q3PtrList<Alarm> alarmList = incidence->alarms(); Alarm *alarm; QDateTime qdt; @@ -845,7 +845,7 @@ 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; Event *event; @@ -879,5 +879,5 @@ QPtrList<Event> CalendarLocal::rawEventsForDate( const QDate &qd, bool sorted ) // kdDebug(5800) << "Sorting events for date\n" << endl; // now, we have to sort it based on dtStart.time() - QPtrList<Event> eventListSorted; + Q3PtrList<Event> eventListSorted; Event *sortEvent; for ( event = eventList.first(); event; event = eventList.next() ) { @@ -895,10 +895,10 @@ 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 ) { Event *event = 0; - QPtrList<Event> eventList; + Q3PtrList<Event> eventList; // Get non-recurring events @@ -924,5 +924,5 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, } else { bool founOne; - QDate next = event->getNextOccurence( start, &founOne ).date(); + QDate next = event->getNextOccurence( (QDateTime)start, &founOne ).date(); if ( founOne ) { if ( next <= end ) { @@ -973,12 +973,12 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end, } -QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) +Q3PtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) { return rawEventsForDate( qdt.date() ); } -QPtrList<Event> CalendarLocal::rawEvents() +Q3PtrList<Event> CalendarLocal::rawEvents() { - QPtrList<Event> el; + Q3PtrList<Event> el; for ( Event *it = mEventList.first(); it; it = mEventList.next() ) if ( it->calEnabled() ) el.append( it ); @@ -1007,7 +1007,7 @@ 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() ) if ( it->calEnabled() && it->dtStart().date() == date) el.append( it ); @@ -1041,7 +1041,7 @@ 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() ) if ( it->calEnabled() ) el.append( it ); @@ -1052,5 +1052,5 @@ void CalendarLocal::setCalendarRemove( int id ) { - QPtrList<Event> EventList = mEventList; + Q3PtrList<Event> EventList = mEventList; Event * ev = EventList.first(); while ( ev ) { @@ -1062,5 +1062,5 @@ void CalendarLocal::setCalendarRemove( int id ) { - QPtrList<Todo> TodoList = mTodoList; + Q3PtrList<Todo> TodoList = mTodoList; Todo * ev = TodoList.first(); while ( ev ) { @@ -1071,5 +1071,5 @@ void CalendarLocal::setCalendarRemove( int id ) } { - QPtrList<Journal> JournalList = mJournalList; + Q3PtrList<Journal> JournalList = mJournalList; Journal * ev = JournalList.first(); while ( ev ) { diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index 1ceabce..1df65c7 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h @@ -24,4 +24,6 @@ #include "calendar.h" +//Added by qt3to4: +#include <Q3PtrList> namespace KCal { @@ -94,6 +96,6 @@ class CalendarLocal : public Calendar Return unfiltered list of all events in calendar. */ - QPtrList<Event> rawEvents(); - QPtrList<Event> getExternLastSyncEvents(); + Q3PtrList<Event> rawEvents(); + Q3PtrList<Event> getExternLastSyncEvents(); /** Add a todo to the todolist. @@ -113,9 +115,9 @@ class CalendarLocal : public Calendar Return list of all todos. */ - QPtrList<Todo> rawTodos(); + Q3PtrList<Todo> rawTodos(); /** Returns list of todos due on the specified date. */ - QPtrList<Todo> todos( const QDate &date ); + Q3PtrList<Todo> todos( const QDate &date ); /** Return list of all todos. @@ -123,5 +125,5 @@ class CalendarLocal : public Calendar Workaround because compiler does not recognize function of base class. */ - QPtrList<Todo> todos() { return Calendar::todos(); } + Q3PtrList<Todo> todos() { return Calendar::todos(); } /** @@ -137,5 +139,5 @@ class CalendarLocal : public Calendar */ Journal *journal( const QDate & ); - QPtrList<Journal> journals4Date( const QDate & ); + Q3PtrList<Journal> journals4Date( const QDate & ); /** Return Journal with given UID. @@ -145,5 +147,5 @@ class CalendarLocal : public Calendar Return list of all Journals stored in calendar. */ - QPtrList<Journal> journals(); + Q3PtrList<Journal> journals(); /** @@ -175,14 +177,14 @@ class CalendarLocal : public Calendar date specified. useful for dayView, etc. etc. */ - QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); + Q3PtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); /** Get unfiltered events for date \a qdt. */ - QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); + Q3PtrList<Event> rawEventsForDate( const QDateTime &qdt ); /** Get unfiltered events in a range of dates. If inclusive is set to true, only events are returned, which are completely included in the range. */ - QPtrList<Event> rawEvents( const QDate &start, const QDate &end, + Q3PtrList<Event> rawEvents( const QDate &start, const QDate &end, bool inclusive = false ); Todo *todo( QString, QString ); @@ -225,7 +227,7 @@ public slots: void init(); - 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 @@ -22,4 +22,6 @@ #include "calfilter.h" +//Added by qt3to4: +#include <Q3PtrList> using namespace KCal; @@ -42,5 +44,5 @@ CalFilter::~CalFilter() } -void CalFilter::apply(QPtrList<Event> *eventlist) +void CalFilter::apply(Q3PtrList<Event> *eventlist) { if (!mEnabled) return; @@ -62,5 +64,5 @@ void CalFilter::apply(QPtrList<Event> *eventlist) // TODO: avoid duplicating apply() code -void CalFilter::apply(QPtrList<Todo> *eventlist) +void CalFilter::apply(Q3PtrList<Todo> *eventlist) { if (!mEnabled) return; diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h index e349770..821149f 100644 --- a/libkcal/calfilter.h +++ b/libkcal/calfilter.h @@ -23,5 +23,5 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include "event.h" @@ -56,5 +56,5 @@ class CalFilter { removed from the list. */ - void apply(QPtrList<Event> *eventlist); + void apply(Q3PtrList<Event> *eventlist); /** @@ -62,7 +62,7 @@ class CalFilter { removed from the list. */ - 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); /** Apply filter criteria on the specified event. Return true, if event passes diff --git a/libkcal/customproperties.cpp b/libkcal/customproperties.cpp index adc1710..16f4a28 100644 --- a/libkcal/customproperties.cpp +++ b/libkcal/customproperties.cpp @@ -20,4 +20,6 @@ #include "customproperties.h" +//Added by qt3to4: +#include <Q3CString> using namespace KCal; @@ -36,10 +38,10 @@ CustomProperties::~CustomProperties() } -void CustomProperties::setCustomProperty(const QCString &app, const QCString &key, +void CustomProperties::setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value) { if (value.isNull() || key.isEmpty() || app.isEmpty()) return; - QCString property = "X-KDE-" + app + "-" + key; + Q3CString property = "X-KDE-" + app + "-" + key; if (!checkName(property)) return; @@ -47,15 +49,15 @@ 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) { if (value.isNull() || !checkName(name)) @@ -64,14 +66,14 @@ 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()) mProperties.remove(it); } -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()) return QString::null; @@ -79,7 +81,7 @@ 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 if (checkName(it.key())) { @@ -89,10 +91,10 @@ void CustomProperties::setCustomProperties(const QMap<QCString, QString> &proper } -QMap<QCString, QString> CustomProperties::customProperties() const +QMap<Q3CString, QString> CustomProperties::customProperties() const { return mProperties; } -bool CustomProperties::checkName(const QCString &name) +bool CustomProperties::checkName(const Q3CString &name) { // Check that the property name starts with 'X-' and contains diff --git a/libkcal/customproperties.h b/libkcal/customproperties.h index 0cbfdcd..75eb3ad 100644 --- a/libkcal/customproperties.h +++ b/libkcal/customproperties.h @@ -24,4 +24,6 @@ #include <qstring.h> #include <qmap.h> +//Added by qt3to4: +#include <Q3CString> namespace KCal { @@ -50,5 +52,5 @@ class CustomProperties will be ignored. */ - void setCustomProperty(const QCString &app, const QCString &key, + void setCustomProperty(const Q3CString &app, const Q3CString &key, const QString &value); /** Delete a custom calendar property. @@ -56,5 +58,5 @@ class CustomProperties @param key Property identifier specific to the application. */ - void removeCustomProperty(const QCString &app, const QCString &key); + void removeCustomProperty(const Q3CString &app, const Q3CString &key); /** Return the value of a custom calendar property. @param app Application name as it appears in the custom property name. @@ -62,5 +64,5 @@ class CustomProperties @return Property value, or QString::null if (and only if) the property does not exist. */ - QString customProperty(const QCString &app, const QCString &key) const; + QString customProperty(const Q3CString &app, const Q3CString &key) const; /** Create or modify a non-KDE or non-standard custom calendar property. @@ -69,26 +71,26 @@ class CustomProperties will be ignored. */ - 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. @param name Full property name */ - void removeNonKDECustomProperty(const QCString &name); + void removeNonKDECustomProperty(const Q3CString &name); /** Return the value of a non-KDE or non-standard custom calendar property. @param name Full property name @return Property value, or QString::null if (and only if) the property does not exist. */ - QString nonKDECustomProperty(const QCString& name) const; + QString nonKDECustomProperty(const Q3CString& name) const; /** Initialise the alarm's custom calendar properties to the specified key/value pairs. */ - 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 @@ -23,4 +23,7 @@ #include <qapplication.h> #include <qclipboard.h> +//Added by qt3to4: +#include <QDropEvent> +#include <Q3PtrList> #include <kiconloader.h> @@ -69,5 +72,5 @@ Event *DndFactory::createDrop(QDropEvent *de) de->accept(); - QPtrList<Event> events = cal.events(); + Q3PtrList<Event> events = cal.events(); if ( !events.isEmpty() ) { Event *event = new Event( *events.first() ); @@ -88,5 +91,5 @@ Todo *DndFactory::createDropTodo(QDropEvent *de) de->accept(); - QPtrList<Todo> todos = cal.todos(); + Q3PtrList<Todo> todos = cal.todos(); if ( !todos.isEmpty() ) { Todo *todo = new Todo( *todos.first() ); @@ -134,5 +137,5 @@ 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,2 +1,4 @@ +//Added by qt3to4: +#include <QDropEvent> /* This file is part of libkcal. 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 @@ -26,4 +26,6 @@ #include "vcalformat.h" +//Added by qt3to4: +#include <QDropEvent> class QDropEvent; diff --git a/libkcal/dummyscheduler.cpp b/libkcal/dummyscheduler.cpp index ae40e6d..73eb3d0 100644 --- a/libkcal/dummyscheduler.cpp +++ b/libkcal/dummyscheduler.cpp @@ -24,5 +24,7 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3PtrList> #include <kdebug.h> @@ -69,6 +71,6 @@ 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; f.close(); @@ -79,14 +81,14 @@ 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" << endl; } else { - QTextStream t(&f); + Q3TextStream t(&f); QString messageString; QString messageLine = t.readLine(); diff --git a/libkcal/dummyscheduler.h b/libkcal/dummyscheduler.h index df42153..f86d583 100644 --- a/libkcal/dummyscheduler.h +++ b/libkcal/dummyscheduler.h @@ -25,4 +25,6 @@ #include "scheduler.h" +//Added by qt3to4: +#include <Q3PtrList> namespace KCal { @@ -40,5 +42,5 @@ class DummyScheduler : public Scheduler { bool performTransaction(IncidenceBase *incidence,Method method); bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients); - QPtrList<ScheduleMessage> retrieveTransactions(); + Q3PtrList<ScheduleMessage> retrieveTransactions(); protected: diff --git a/libkcal/event.cpp b/libkcal/event.cpp index fdf5657..060df81 100644 --- a/libkcal/event.cpp +++ b/libkcal/event.cpp @@ -385,5 +385,5 @@ QDateTime Event::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_ // return incidenceStart; // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { diff --git a/libkcal/event.h b/libkcal/event.h index 6a58618..da44f81 100644 --- a/libkcal/event.h +++ b/libkcal/event.h @@ -26,4 +26,6 @@ #include "incidence.h" +//Added by qt3to4: +#include <Q3CString> namespace KCal { @@ -41,5 +43,5 @@ class Event : public Incidence bool matchTime(QDateTime*startDT, QDateTime* endDT); - 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 @@ -23,5 +23,5 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <kdebug.h> diff --git a/libkcal/freebusy.cpp b/libkcal/freebusy.cpp index ba15d6d..e4e9ec9 100644 --- a/libkcal/freebusy.cpp +++ b/libkcal/freebusy.cpp @@ -22,4 +22,7 @@ #include "freebusy.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> using namespace KCal; @@ -44,5 +47,5 @@ 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; @@ -114,5 +117,5 @@ QDateTime FreeBusy::dtEnd() const } -QValueList<Period> FreeBusy::busyPeriods() const +Q3ValueList<Period> FreeBusy::busyPeriods() const { return mBusyPeriods; @@ -147,5 +150,5 @@ bool FreeBusy::addLocalPeriod(const QDateTime &eventStart, const QDateTime &even } -FreeBusy::FreeBusy(QValueList<Period> busyPeriods) +FreeBusy::FreeBusy(Q3ValueList<Period> busyPeriods) { mBusyPeriods = busyPeriods; @@ -154,5 +157,5 @@ FreeBusy::FreeBusy(QValueList<Period> busyPeriods) void FreeBusy::sortList() { - typedef QValueList<Period> PeriodList; + typedef Q3ValueList<Period> PeriodList; PeriodList::Iterator tmpPeriod, earlyPeriod; diff --git a/libkcal/freebusy.h b/libkcal/freebusy.h index d741c72..bd14cb7 100644 --- a/libkcal/freebusy.h +++ b/libkcal/freebusy.h @@ -25,6 +25,8 @@ #include <qdatetime.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <q3valuelist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> #include "period.h" @@ -44,9 +46,9 @@ class FreeBusy : public IncidenceBase FreeBusy(const QDateTime &start, const QDateTime &end); FreeBusy(Calendar *calendar, const QDateTime &start, const QDateTime &end); - FreeBusy(QValueList<Period> busyPeriods); + FreeBusy(Q3ValueList<Period> busyPeriods); ~FreeBusy(); - QCString type() const { return "FreeBusy"; } + Q3CString type() const { return "FreeBusy"; } IncTypeID typeID() const { return freebusyID; } @@ -54,5 +56,5 @@ class FreeBusy : public IncidenceBase bool setDtEnd( const QDateTime &end ); - QValueList<Period> busyPeriods() const; + Q3ValueList<Period> busyPeriods() const; void addPeriod(const QDateTime &start, const QDateTime &end); @@ -65,5 +67,5 @@ 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 @@ -29,5 +29,5 @@ using namespace KCal; ICalDrag::ICalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/calendar", parent, name ) + : Q3StoredDrag( "text/calendar", parent, name ) { ICalFormat icf; diff --git a/libkcal/icaldrag.h b/libkcal/icaldrag.h index fdf32b7..c1f73f4 100644 --- a/libkcal/icaldrag.h +++ b/libkcal/icaldrag.h @@ -23,5 +23,5 @@ #define ICALDRAG_H -#include <qdragobject.h> +#include <q3dragobject.h> #include "calendar.h" @@ -29,5 +29,5 @@ namespace KCal { /** iCalendar drag&drop class. */ -class ICalDrag : public QStoredDrag +class ICalDrag : public Q3StoredDrag { public: diff --git a/libkcal/icalformat.cpp b/libkcal/icalformat.cpp index 6f3a799..3829bc1 100644 --- a/libkcal/icalformat.cpp +++ b/libkcal/icalformat.cpp @@ -21,9 +21,9 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> #include <qclipboard.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <stdlib.h> @@ -71,12 +71,12 @@ 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)); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); QString text; - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); text = ts.read(); file.close(); @@ -99,12 +99,12 @@ bool ICalFormat::save( Calendar *calendar, const QString &fileName ) //is.restart(); QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { setException(new ErrorFormat(ErrorFormat::SaveError, i18n("Could not open file '%1'").arg(fileName))); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); - ts.setEncoding( QTextStream::Latin1 ); + ts.setEncoding( Q3TextStream::Latin1 ); ts << text; file.close(); @@ -157,13 +157,13 @@ Incidence *ICalFormat::fromString( const QString &text ) Incidence *ical = 0; - QPtrList<Event> elist = cal.events(); + Q3PtrList<Event> elist = cal.events(); if ( elist.count() > 0 ) { ical = elist.first(); } else { - QPtrList<Todo> tlist = cal.todos(); + Q3PtrList<Todo> tlist = cal.todos(); if ( tlist.count() > 0 ) { ical = tlist.first(); } else { - QPtrList<Journal> jlist = cal.journals(); + Q3PtrList<Journal> jlist = cal.journals(); if ( jlist.count() > 0 ) { ical = jlist.first(); @@ -173,5 +173,5 @@ Incidence *ICalFormat::fromString( const QString &text ) return ical; } -#include <qapp.h> +#include <qapplication.h> QString ICalFormat::toString( Calendar *cal ) @@ -185,6 +185,6 @@ 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) { component = mImpl->writeTodo(qlt.current()); @@ -197,5 +197,5 @@ QString ICalFormat::toString( Calendar *cal ) } // events - QPtrList<Event> events = cal->rawEvents(); + Q3PtrList<Event> events = cal->rawEvents(); Event *ev; for(ev=events.first();ev;ev=events.next()) { @@ -208,5 +208,5 @@ QString ICalFormat::toString( Calendar *cal ) // journals - QPtrList<Journal> journals = cal->journals(); + Q3PtrList<Journal> journals = cal->journals(); Journal *j; for(j=journals.first();j;j=journals.next()) { diff --git a/libkcal/icalformat.h b/libkcal/icalformat.h index a770dbb..a454b35 100644 --- a/libkcal/icalformat.h +++ b/libkcal/icalformat.h @@ -22,4 +22,6 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3CString> #include "scheduler.h" @@ -107,5 +109,5 @@ class ICalFormat : public CalFormat { ICalFormatImpl *mImpl; QString mTimeZoneId; - QCString mTzString; + Q3CString mTzString; int tzOffsetMin; bool mUtc; diff --git a/libkcal/icalformatimpl.cpp b/libkcal/icalformatimpl.cpp index 65eabc8..ea144ee 100644 --- a/libkcal/icalformatimpl.cpp +++ b/libkcal/icalformatimpl.cpp @@ -21,6 +21,9 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3CString> #include <kdebug.h> @@ -222,6 +225,6 @@ 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; for (it = list.begin(); it!= list.end(); ++it) { @@ -385,10 +388,10 @@ 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()) icalcomponent_add_property(parent,writeAttachment(at)); // alarms - QPtrList<Alarm> alarms = incidence->alarms(); + Q3PtrList<Alarm> alarms = incidence->alarms(); Alarm* alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next()) { @@ -424,6 +427,6 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc // attendees 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) { icalcomponent_add_property(parent,writeAttendee(ai.current())); @@ -437,6 +440,6 @@ void ICalFormatImpl::writeIncidenceBase(icalcomponent *parent,IncidenceBase *inc void ICalFormatImpl::writeCustomProperties(icalcomponent *parent,CustomProperties *properties) { - 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()); icalproperty_set_x_name(p,c.key()); @@ -547,6 +550,6 @@ icalproperty *ICalFormatImpl::writeRecurrenceRule(Recurrence *recur) int index2 = 0; - QPtrList<Recurrence::rMonthPos> tmpPositions; - QPtrList<int> tmpDays; + Q3PtrList<Recurrence::rMonthPos> tmpPositions; + Q3PtrList<int> tmpDays; int *tmpDay; Recurrence::rMonthPos *tmpPos; @@ -705,6 +708,6 @@ icalcomponent *ICalFormatImpl::writeAlarm(Alarm *alarm) case Alarm::Email: { 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()); if (!(*ad).name().isEmpty()) { @@ -764,6 +767,6 @@ 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()); icalproperty_set_x_name(p,c.key()); @@ -1340,5 +1343,5 @@ void ICalFormatImpl::readIncidenceBase(icalcomponent *parent,IncidenceBase *inci void ICalFormatImpl::readCustomProperties(icalcomponent *parent,CustomProperties *properties) { - QMap<QCString, QString> customProperties; + QMap<Q3CString, QString> customProperties; icalproperty *p = icalcomponent_get_first_property(parent,ICAL_X_PROPERTY); diff --git a/libkcal/icalformatimpl.h b/libkcal/icalformatimpl.h index 203c302..3a35b4c 100644 --- a/libkcal/icalformatimpl.h +++ b/libkcal/icalformatimpl.h @@ -22,4 +22,6 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3PtrList> #include "scheduler.h" @@ -94,6 +96,6 @@ class ICalFormatImpl { int mCalendarVersion; // determines backward compatibility mode on read - QPtrList<Event> mEventsRelate; // events with relations - QPtrList<Todo> mTodosRelate; // todos with relations + Q3PtrList<Event> mEventsRelate; // events with relations + Q3PtrList<Todo> mTodosRelate; // todos with relations static const int mSecondsPerWeek; diff --git a/libkcal/imipscheduler.cpp b/libkcal/imipscheduler.cpp index e186f8e..e6d56a6 100644 --- a/libkcal/imipscheduler.cpp +++ b/libkcal/imipscheduler.cpp @@ -27,4 +27,6 @@ #include "imipscheduler.h" +//Added by qt3to4: +#include <Q3PtrList> using namespace KCal; @@ -51,7 +53,7 @@ bool IMIPScheduler::performTransaction(IncidenceBase *incidence,Method method) } -QPtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() +Q3PtrList<ScheduleMessage> IMIPScheduler::retrieveTransactions() { - QPtrList<ScheduleMessage> messageList; + Q3PtrList<ScheduleMessage> messageList; return messageList; diff --git a/libkcal/imipscheduler.h b/libkcal/imipscheduler.h index f142060..5a2d38e 100644 --- a/libkcal/imipscheduler.h +++ b/libkcal/imipscheduler.h @@ -24,5 +24,5 @@ // -#include <qptrlist.h> +#include <q3ptrlist.h> #include "scheduler.h" @@ -41,5 +41,5 @@ class IMIPScheduler : public Scheduler { bool publish (IncidenceBase *incidence,const QString &recipients); 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 @@ -27,4 +27,6 @@ #include "incidence.h" #include "todo.h" +//Added by qt3to4: +#include <Q3PtrList> using namespace KCal; @@ -60,5 +62,5 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) // QPtrList<Incidence> mRelations; QPtrList<Incidence> mRelations; mExDates = i.mExDates; - QPtrListIterator<Attachment> itat( i.mAttachments ); + Q3PtrListIterator<Attachment> itat( i.mAttachments ); Attachment *at; while( (at = itat.current()) ) { @@ -74,5 +76,5 @@ Incidence::Incidence( const Incidence &i ) : IncidenceBase( i ) mCancelled = i.mCancelled; mHasStartDate = i.mHasStartDate; - QPtrListIterator<Alarm> it( i.mAlarms ); + Q3PtrListIterator<Alarm> it( i.mAlarms ); const Alarm *a; while( (a = it.current()) ) { @@ -99,5 +101,5 @@ Incidence::~Incidence() Incidence *ev; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (ev=Relations.first();ev;ev=Relations.next()) { if (ev->relatedTo() == this) ev->setRelatedTo(0); @@ -217,6 +219,6 @@ 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 ) { if( *a1.current() == *a2.current() ) { @@ -323,5 +325,5 @@ void Incidence::cloneRelations( Incidence * newInc ) Incidence * inc; Incidence * cloneInc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { cloneInc = inc->clone(); @@ -357,5 +359,5 @@ QDateTime Incidence::lastModifiedSub() mLastModifiedSub = lastModified(); Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { if ( inc->lastModifiedSub() > mLastModifiedSub ) @@ -448,5 +450,5 @@ void Incidence::addCategories(const QStringList &categories, bool addToRelations if ( addToRelations ) { Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->addCategories( categories, true ); @@ -463,5 +465,5 @@ void Incidence::setCategories(const QStringList &categories, bool setForRelation if ( setForRelations ) { Incidence * inc; - QPtrList<Incidence> Relations = relations(); + Q3PtrList<Incidence> Relations = relations(); for (inc=Relations.first();inc;inc=Relations.next()) { inc->setCategories( categories, true ); @@ -551,13 +553,13 @@ Incidence *Incidence::relatedTo() const } -QPtrList<Incidence> Incidence::relations() const +Q3PtrList<Incidence> Incidence::relations() const { return mRelations; } -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()) { inc->addRelationsToList( rel ); @@ -648,13 +650,13 @@ void Incidence::deleteAttachments(const QString& mime) } -QPtrList<Attachment> Incidence::attachments() const +Q3PtrList<Attachment> Incidence::attachments() const { return mAttachments; } -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; while ( (at = it.current()) ) { @@ -738,5 +740,5 @@ QStringList Incidence::secrecyList() -QPtrList<Alarm> Incidence::alarms() const +Q3PtrList<Alarm> Incidence::alarms() const { return mAlarms; @@ -772,5 +774,5 @@ 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()) return true; diff --git a/libkcal/incidence.h b/libkcal/incidence.h index f89942f..2940129 100644 --- a/libkcal/incidence.h +++ b/libkcal/incidence.h @@ -26,5 +26,7 @@ #include <qdatetime.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3PtrList> #include "recurrence.h" @@ -114,5 +116,5 @@ class Incidence : public IncidenceBase virtual Incidence *clone() = 0; virtual void cloneRelations( Incidence * ); - void addRelationsToList(QPtrList<Incidence> *rel); + void addRelationsToList(Q3PtrList<Incidence> *rel); void clearRelations(); virtual QDateTime getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_dt ) const = 0; @@ -178,5 +180,5 @@ class Incidence : public IncidenceBase Incidence *relatedTo() const; /** 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 */ void addRelation(Incidence *); @@ -203,7 +205,7 @@ class Incidence : public IncidenceBase void deleteAttachments(const QString& mime); /** 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; /** sets the event's status the value specified. See the enumeration @@ -236,5 +238,5 @@ 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 */ Alarm* newAlarm(); @@ -289,6 +291,6 @@ class Incidence : public IncidenceBase Recurrence *mRecurrence; protected: - QPtrList<Alarm> mAlarms; - QPtrList<Incidence> mRelations; + Q3PtrList<Alarm> mAlarms; + Q3PtrList<Incidence> mRelations; QDateTime mRecurrenceID; bool mHasRecurrenceID; @@ -309,5 +311,5 @@ protected: QString mRelatedToUid; DateList mExDates; - QPtrList<Attachment> mAttachments; + Q3PtrList<Attachment> mAttachments; QStringList mResources; bool mHasStartDate; // if todo has associated start date diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp index 56c0560..f11ec54 100644 --- a/libkcal/incidencebase.cpp +++ b/libkcal/incidencebase.cpp @@ -28,4 +28,6 @@ #include "incidencebase.h" +//Added by qt3to4: +#include <Q3PtrList> using namespace KCal; @@ -65,5 +67,5 @@ IncidenceBase::IncidenceBase(const IncidenceBase &i) : mAlarmEnabled = i.mAlarmEnabled; mCalID = i.mCalID; - QPtrList<Attendee> attendees = i.attendees(); + Q3PtrList<Attendee> attendees = i.attendees(); for( Attendee *a = attendees.first(); a; a = attendees.next() ) { mAttendees.append( new Attendee( *a ) ); @@ -301,5 +303,5 @@ bool IncidenceBase::addAttendee(Attendee *a, bool doupdate) a->setName(a->name().remove(0,7)); - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); qli.toFirst(); @@ -344,5 +346,5 @@ void IncidenceBase::clearAttendees() Attendee *IncidenceBase::getAttendee(const char *n) const { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); qli.toFirst(); @@ -358,5 +360,5 @@ Attendee *IncidenceBase::getAttendee(const char *n) const Attendee *IncidenceBase::attendeeByMail(const QString &email) { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); qli.toFirst(); @@ -371,5 +373,5 @@ Attendee *IncidenceBase::attendeeByMail(const QString &email) Attendee *IncidenceBase::attendeeByMails(const QStringList &emails, const QString& email) { - QPtrListIterator<Attendee> qli(mAttendees); + Q3PtrListIterator<Attendee> qli(mAttendees); QStringList mails = emails; @@ -492,5 +494,5 @@ void IncidenceBase::unRegisterObserver( IncidenceBase::Observer *observer ) void IncidenceBase::updated() { - QPtrListIterator<Observer> it(mObservers); + Q3PtrListIterator<Observer> it(mObservers); while( it.current() ) { Observer *o = it.current(); diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h index 3edc03b..d97f524 100644 --- a/libkcal/incidencebase.h +++ b/libkcal/incidencebase.h @@ -26,6 +26,8 @@ #include <qdatetime.h> #include <qstringlist.h> -#include <qvaluelist.h> -#include <qptrlist.h> +#include <q3valuelist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3CString> #include "customproperties.h" @@ -34,5 +36,5 @@ namespace KCal { -typedef QValueList<QDate> DateList; +typedef Q3ValueList<QDate> DateList; enum IncTypeID { eventID,todoID,journalID,freebusyID }; @@ -52,5 +54,5 @@ class IncidenceBase : public CustomProperties virtual ~IncidenceBase(); - virtual QCString type() const = 0; + virtual Q3CString type() const = 0; virtual IncTypeID typeID() const = 0; @@ -110,5 +112,5 @@ class IncidenceBase : public CustomProperties void clearAttendees(); /** Return list of attendees. */ - QPtrList<Attendee> attendees() const { return mAttendees; }; + Q3PtrList<Attendee> attendees() const { return mAttendees; }; /** Return number of attendees. */ int attendeeCount() const { return mAttendees.count(); }; @@ -169,5 +171,5 @@ class IncidenceBase : public CustomProperties bool mAlarmEnabled; QDateTime mLastModified; - QPtrList<Attendee> mAttendees; + Q3PtrList<Attendee> mAttendees; bool mFloats; @@ -182,5 +184,5 @@ class IncidenceBase : public CustomProperties int mSyncStatus; // status (for sync) - 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 @@ -25,4 +25,6 @@ #include "incidence.h" +//Added by qt3to4: +#include <Q3CString> namespace KCal { @@ -37,5 +39,5 @@ class Journal : public Incidence ~Journal(); - 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 @@ -5,4 +5,6 @@ #ifdef DEKTOP_VERSION #include <kabc/stdaddressbook.h> +//Added by qt3to4: +#include <Q3PtrList> #define size count #endif @@ -311,5 +313,5 @@ void KIncidenceFormatter::formatCategories(Incidence *event) void KIncidenceFormatter::addTag(const QString & tag,const QString & text) { - int number=text.contains("\n"); + int number=text.count("\n"); QString str = "<" + tag + ">"; QString tmpText=text; @@ -340,5 +342,5 @@ void KIncidenceFormatter::addTag(const QString & tag,const QString & text) void KIncidenceFormatter::formatAttendees(Incidence *event) { - QPtrList<Attendee> attendees = event->attendees(); + Q3PtrList<Attendee> attendees = event->attendees(); if (attendees.count()) { QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); @@ -363,5 +365,5 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) mText.append(event->organizer()); #endif - if (iconPath) { + if (!iconPath.isEmpty()) { mText += " <a href=\"mailto:" + event->organizer() + "\">"; mText += "<IMG src=\"" + iconPath + "\">"; @@ -403,5 +405,5 @@ void KIncidenceFormatter::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { - if (iconPath) { + if (!iconPath.isEmpty()) { mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; if ( a->RSVP() ) diff --git a/libkcal/libkcal.pro b/libkcal/libkcal.pro index 33c63c3..1f43b10 100644 --- a/libkcal/libkcal.pro +++ b/libkcal/libkcal.pro @@ -1,5 +1,5 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal include( ../variables.pri ) @@ -107,2 +107,6 @@ dndfactory.cpp \ phoneformat.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 @@ -1,5 +1,5 @@ TEMPLATE = lib CONFIG += qt warn_on -TARGET = microkcal +TARGET = xmicrokcal INCLUDEPATH += ../libkdepim ../microkde ../qtcompat versit ../microkde/kdecore $(QPEDIR)/include diff --git a/libkcal/listbase.h b/libkcal/listbase.h index 085b13d..6c942ef 100644 --- a/libkcal/listbase.h +++ b/libkcal/listbase.h @@ -22,5 +22,7 @@ #define KCAL_LISTBASE_H -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3PtrList> namespace KCal { @@ -32,14 +34,14 @@ namespace KCal { */ template<class T> -class ListBase : public QValueList<T *> +class ListBase : public Q3ValueList<T *> { public: ListBase() - : QValueList<T *>(), mAutoDelete( false ) + : Q3ValueList<T *>(), mAutoDelete( false ) { } ListBase( const ListBase &l ) - : QValueList<T *>( l ), mAutoDelete( false ) + : Q3ValueList<T *>( l ), mAutoDelete( false ) { } @@ -48,6 +50,6 @@ 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; } @@ -58,5 +60,5 @@ class ListBase : public QValueList<T *> { if ( this == &l ) return *this; - QValueList<T *>::operator=( l ); + Q3ValueList<T *>::operator=( l ); return *this; } @@ -69,6 +71,6 @@ class ListBase : public QValueList<T *> bool removeRef( T *t ) { - QValueListIterator<T *> it = find( t ); - if ( it == QValueList<T*>::end() ) { + Q3ValueListIterator<T *> it = find( t ); + if ( it == Q3ValueList<T*>::end() ) { return false; } else { @@ -78,6 +80,6 @@ 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; while ( (item = it.current()) != 0 ) { diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp index 900fc04..794e4b4 100644 --- a/libkcal/phoneformat.cpp +++ b/libkcal/phoneformat.cpp @@ -23,13 +23,14 @@ #include <qstring.h> #include <qapplication.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> #include <qmessagebox.h> #include <qclipboard.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qdir.h> #include <qlabel.h> +#include <QDesktopWidget> #include <kdebug.h> @@ -202,5 +203,5 @@ ulong PhoneFormat::getCsumEvent( Event* event ) { int count = 1; - QPtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<Recurrence::rMonthPos> rmp; rmp = rec->monthPositions(); if ( rmp.first()->negative ) @@ -242,5 +243,5 @@ ulong PhoneFormat::getCsumEvent( Event* event ) if ( rec->endDate().isValid() ) { // 15 + 16 list.append( "1" ); - list.append( PhoneParser::dtToString( rec->endDate()) ); + list.append( PhoneParser::dtToString( (QDateTime)rec->endDate()) ); } else { list.append( "0" ); @@ -306,5 +307,5 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) if ( ! vfload.load( calendar, fileName ) ) return false; - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); qDebug("reading events... "); @@ -341,5 +342,5 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) { qDebug("reading todos... "); - QPtrList<Todo> tr = calendar->rawTodos(); + Q3PtrList<Todo> tr = calendar->rawTodos(); Todo* ev = tr.first(); while ( ev ) { @@ -466,5 +467,5 @@ void PhoneFormat::copyTodo( Todo* to, Todo* from ) } -#include <qcstring.h> +#include <q3cstring.h> void PhoneFormat::afterSave( Incidence* inc,const QString& id ,const QString& csum) @@ -498,5 +499,5 @@ 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(); while ( ev ) { @@ -509,5 +510,5 @@ 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(); while ( to ) { @@ -553,5 +554,5 @@ bool PhoneFormat::save( Calendar *calendar) ev = er.first(); message = i18n(" Comparing event # "); - QPtrList<Event> er1 = calendarTemp->rawEvents(); + Q3PtrList<Event> er1 = calendarTemp->rawEvents(); Event* ev1; int procCount = 0; @@ -581,5 +582,5 @@ bool PhoneFormat::save( Calendar *calendar) to = tl.first(); procCount = 0; - QPtrList<Todo> tl1 = calendarTemp->rawTodos(); + Q3PtrList<Todo> tl1 = calendarTemp->rawTodos(); Todo* to1 ; message = i18n(" Comparing todo # "); diff --git a/libkcal/qtopiaformat.cpp b/libkcal/qtopiaformat.cpp index 0a4a031..2dfe1a4 100644 --- a/libkcal/qtopiaformat.cpp +++ b/libkcal/qtopiaformat.cpp @@ -22,9 +22,9 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> #include <qclipboard.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qxml.h> @@ -310,10 +310,10 @@ 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, i18n("Could not open file '%1'").arg(fileName))); return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << text; file.close(); diff --git a/libkcal/recurrence.cpp b/libkcal/recurrence.cpp index 6ee5499..9a4e540 100644 --- a/libkcal/recurrence.cpp +++ b/libkcal/recurrence.cpp @@ -30,4 +30,7 @@ #include "recurrence.h" +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PtrList> using namespace KCal; @@ -57,5 +60,5 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) : recurs(r.recurs), rWeekStart(r.rWeekStart), - rDays(r.rDays.copy()), + rDays(r.rDays), rFreq(r.rFreq), rDuration(r.rDuration), @@ -71,17 +74,17 @@ Recurrence::Recurrence(const Recurrence &r, Incidence *parent) mParent(parent) { - for (QPtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { + for (Q3PtrListIterator<rMonthPos> mp(r.rMonthPositions); mp.current(); ++mp) { rMonthPos *tmp = new rMonthPos; tmp->rPos = mp.current()->rPos; 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; *tmp = *md.current(); rMonthDays.append(tmp); } - for (QPtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { + for (Q3PtrListIterator<int> yn(r.rYearNums); yn.current(); ++yn) { int *tmp = new int; *tmp = *yn.current(); @@ -125,6 +128,6 @@ bool Recurrence::operator==( const Recurrence& r2 ) const && rWeekStart == r2.rWeekStart; case rMonthlyPos: { - QPtrList<rMonthPos> MonthPositions = rMonthPositions; - QPtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions = rMonthPositions; + Q3PtrList<rMonthPos> MonthPositions2 = r2.rMonthPositions; if ( !MonthPositions.count() ) return false; @@ -134,6 +137,6 @@ 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() ) return false; @@ -144,10 +147,10 @@ bool Recurrence::operator==( const Recurrence& r2 ) const case rYearlyPos: { - 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() ) return false; @@ -158,11 +161,11 @@ 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); } 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() ); } @@ -358,5 +361,5 @@ QDateTime Recurrence::endDateTime() const return mRecurStart.addSecs((rDuration-1+mRecurExDatesCount)*rFreq*3600); case rDaily: - return dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); + return (QDateTime)dStart.addDays((rDuration-1+mRecurExDatesCount)*rFreq); case rWeekly: @@ -507,15 +510,15 @@ const QBitArray &Recurrence::days() const } -const QPtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::monthPositions() const { return rMonthPositions; } -const QPtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const +const Q3PtrList<Recurrence::rMonthPos> &Recurrence::yearMonthPositions() const { return rMonthPositions; } -const QPtrList<int> &Recurrence::monthDays() const +const Q3PtrList<int> &Recurrence::monthDays() const { return rMonthDays; @@ -760,5 +763,5 @@ void Recurrence::addYearlyMonthPos(short _rPos, const QBitArray &_rDays) } -const QPtrList<int> &Recurrence::yearNums() const +const Q3PtrList<int> &Recurrence::yearNums() const { return rYearNums; @@ -1048,5 +1051,5 @@ bool Recurrence::recursMonthly(const QDate &qd) const rDuration == -1)) { // The date queried falls within the range of the event. - QValueList<int> days; + Q3ValueList<int> days; int daysInMonth = qd.daysInMonth(); if (recurs == rMonthlyDay) @@ -1054,5 +1057,5 @@ bool Recurrence::recursMonthly(const QDate &qd) const else if (recurs == rMonthlyPos) 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) return true; @@ -1102,5 +1105,5 @@ bool Recurrence::recursYearlyByMonth(const QDate &qd) const // The date queried falls within the range of the event. int i = qmonth; - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) return true; @@ -1128,10 +1131,10 @@ bool Recurrence::recursYearlyByPos(const QDate &qd) const rDuration == -1)) { // 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) return true; @@ -1158,5 +1161,5 @@ bool Recurrence::recursYearlyByDay(const QDate &qd) const // The date queried falls within the range of the event. int i = qd.dayOfYear(); - for (QPtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { + for (Q3PtrListIterator<int> qlin(rYearNums); qlin.current(); ++qlin) { if (i == *qlin.current()) return true; @@ -1550,5 +1553,5 @@ int Recurrence::recurCalc(PeriodFunc func, QDate &enddate) const case NEXT_AFTER_DATE: if (count == 0) - endtime = QDate(); + endtime = QDateTime(); else if (timed) enddate = endtime.date(); @@ -1794,6 +1797,6 @@ struct Recurrence::MonthlyData { bool varies; // true if recurring days vary between different months 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: MonthlyData(const Recurrence* r, const QDate &date) @@ -1806,10 +1809,10 @@ struct Recurrence::MonthlyData { ? true : recurrence->getMonthlyDayDays(days31, 31); } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { if (!varies) return &days31; QDate startOfMonth(year, month + 1, 1); int daysInMonth = startOfMonth.daysInMonth(); - QValueList<int>* days = recurDays[daysInMonth - 28]; + Q3ValueList<int>* days = recurDays[daysInMonth - 28]; if (recurrence->recurs == rMonthlyPos) recurrence->getMonthlyPosDays(*days, daysInMonth, startOfMonth.dayOfWeek()); @@ -1845,6 +1848,6 @@ int Recurrence::monthlyCalcEndDate(QDate &enddate, MonthlyData &data) const uint countTogo = rDuration + mRecurExDatesCount; int countGone = 0; - QValueList<int>::ConstIterator it; - const QValueList<int>* days = data.dayList(); + Q3ValueList<int>::ConstIterator it; + const Q3ValueList<int>* days = data.dayList(); if (data.day > 1) { @@ -1911,6 +1914,6 @@ int Recurrence::monthlyCalcToDate(const QDate &enddate, MonthlyData &data) const int endDay = enddate.day(); 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(); if (data.day > 1) { @@ -1970,6 +1973,6 @@ int Recurrence::monthlyCalcNextAfter(QDate &enddate, MonthlyData &data) const int endDay = enddate.day(); 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(); if (data.day > 1) { @@ -2053,6 +2056,6 @@ struct Recurrence::YearlyMonthData { bool feb29; // true if February 29th recurs 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: YearlyMonthData(const Recurrence* r, const QDate &date) @@ -2061,7 +2064,7 @@ struct Recurrence::YearlyMonthData { leapyear = feb29 && QDate::leapYear(year); } - 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); } }; @@ -2089,6 +2092,6 @@ int Recurrence::yearlyMonthCalcEndDate(QDate &enddate, YearlyMonthData &data) co uint countTogo = rDuration + mRecurExDatesCount; 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 if (data.month > 1) { @@ -2200,6 +2203,6 @@ 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(); if (data.month > 1) { @@ -2271,6 +2274,6 @@ 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(); if (data.month > 1) { @@ -2391,5 +2394,5 @@ struct Recurrence::YearlyPosData { bool varies; // true if number of days varies from year to year private: - mutable QValueList<int> days; + mutable Q3ValueList<int> days; public: YearlyPosData(const Recurrence* r, const QDate &date) @@ -2399,5 +2402,5 @@ struct Recurrence::YearlyPosData { varies = (daysPerMonth < 0); } - const QValueList<int>* dayList() const { + const Q3ValueList<int>* dayList() const { QDate startOfMonth(year, month, 1); recurrence->getMonthlyPosDays(days, startOfMonth.daysInMonth(), startOfMonth.dayOfWeek()); @@ -2429,10 +2432,10 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const uint countTogo = rDuration + mRecurExDatesCount; int countGone = 0; - QValueList<int>::ConstIterator id; - const QValueList<int>* days; + Q3ValueList<int>::ConstIterator id; + const Q3ValueList<int>* days; if (data.month > 1 || data.day > 1) { // 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) { // Check what remains of the start month @@ -2467,5 +2470,5 @@ int Recurrence::yearlyPosCalcEndDate(QDate &enddate, YearlyPosData &data) const // The number of recurrences varies from year to year. for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); days = data.dayList(); @@ -2497,5 +2500,5 @@ 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) { // Check the last month in the recurrence @@ -2532,10 +2535,10 @@ 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; if (data.month > 1 || data.day > 1) { // 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) { data.month = *im.current(); @@ -2577,5 +2580,5 @@ int Recurrence::yearlyPosCalcToDate(const QDate &enddate, YearlyPosData &data) c // The number of recurrences varies from year to year. for ( ; ; ) { - for (QPtrListIterator<int> im(rYearNums); im.current(); ++im) { + for (Q3PtrListIterator<int> im(rYearNums); im.current(); ++im) { data.month = *im.current(); days = data.dayList(); @@ -2612,5 +2615,5 @@ 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(); if (data.month >= endMonth) { @@ -2647,6 +2650,6 @@ 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; if (data.varies) { @@ -2654,5 +2657,5 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons for ( ; ; ) { // 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) { // Check the next month @@ -2690,5 +2693,5 @@ int Recurrence::yearlyPosCalcNextAfter(QDate &enddate, YearlyPosData &data) cons if (data.month > 1 || data.day > 1) { // 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) { // Check what remains of the start month @@ -2735,5 +2738,5 @@ 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(); int ended = data.yearMonth() - endYearMonth; @@ -2809,5 +2812,5 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const // Check what remains of the start year bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); if (d >= data.day && (leapOK || d < 366)) { @@ -2847,5 +2850,5 @@ int Recurrence::yearlyDayCalcEndDate(QDate &enddate, YearlyDayData &data) const if (countTogo) { // Check the last year in the recurrence - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { ++countGone; if (--countTogo == 0) { @@ -2870,5 +2873,5 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c // Check what remains of the start year bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); if (d >= data.day && (leapOK || d < 366)) { @@ -2909,5 +2912,5 @@ int Recurrence::yearlyDayCalcToDate(const QDate &enddate, YearlyDayData &data) c if (data.year <= endYear) { // 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) return countGone; @@ -2929,5 +2932,5 @@ int Recurrence::yearlyDayCalcNextAfter(QDate &enddate, YearlyDayData &data) cons // Check what remains of the start year bool leapOK = data.isMaxDayCount(); - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int d = *it.current(); if (d >= data.day && (leapOK || d < 366)) { @@ -2978,5 +2981,5 @@ 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; int d = *it.current(); @@ -2996,5 +2999,5 @@ ex: // Parameters: daysInMonth = number of days in this month // 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 { list.clear(); @@ -3002,5 +3005,5 @@ void Recurrence::getMonthlyPosDays(QValueList<int> &list, int daysInMonth, int s // Go through the list, compiling a bit list of actual day numbers 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 QBitArray &rdays = pos.current()->rDays; @@ -3040,5 +3043,5 @@ int Recurrence::countMonthlyPosDays() const Q_UINT8 positive[5] = { 0, 0, 0, 0, 0 }; 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; Q_UINT8* wk; @@ -3073,10 +3076,10 @@ int Recurrence::countMonthlyPosDays() const // Get the days in this month which recur, in numerical order. // 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 { list.clear(); bool variable = false; Q_UINT32 days = 0; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); if (day > 0) { @@ -3107,10 +3110,10 @@ bool Recurrence::getMonthlyDayDays(QValueList<int> &list, int daysInMonth) const // included in the non-leap year month list. // 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 { list.clear(); leaplist.clear(); bool feb29 = false; - for (QPtrListIterator<int> it(rYearNums); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rYearNums); it.current(); ++it) { int month = *it.current(); if (month == 2) { @@ -3188,5 +3191,5 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const case rMonthlyDay: { int minday = daysInMonth + 1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); if (day < 0) @@ -3202,7 +3205,7 @@ QDate Recurrence::getFirstDateInMonth(const QDate &earliestDate) const case rYearlyPos: { 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) return monthBegin.addDays(*id - 1); @@ -3225,5 +3228,5 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const case rMonthlyDay: { int maxday = -1; - for (QPtrListIterator<int> it(rMonthDays); it.current(); ++it) { + for (Q3PtrListIterator<int> it(rMonthDays); it.current(); ++it) { int day = *it.current(); if (day < 0) @@ -3239,7 +3242,7 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const case rYearlyPos: { 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) return monthBegin.addDays(*id - 1); @@ -3257,5 +3260,5 @@ QDate Recurrence::getLastDateInMonth(const QDate &latestDate) const QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { case rYearlyMonth: { @@ -3293,5 +3296,5 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const } case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int earliestYear = earliestDate.year(); int earliestMonth = earliestDate.month(); @@ -3302,5 +3305,5 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const QDate monthBegin(earliestYear, month, 1); 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) return monthBegin.addDays(*id - 1); @@ -3330,5 +3333,5 @@ QDate Recurrence::getFirstDateInYear(const QDate &earliestDate) const QDate Recurrence::getLastDateInYear(const QDate &latestDate) const { - QPtrListIterator<int> it(rYearNums); + Q3PtrListIterator<int> it(rYearNums); switch (recurs) { case rYearlyMonth: { @@ -3365,5 +3368,5 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const } case rYearlyPos: { - QValueList<int> dayList; + Q3ValueList<int> dayList; int latestYear = latestDate.year(); int latestMonth = latestDate.month(); @@ -3374,5 +3377,5 @@ QDate Recurrence::getLastDateInYear(const QDate &latestDate) const QDate monthBegin(latestYear, month, 1); 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) return monthBegin.addDays(*id - 1); diff --git a/libkcal/recurrence.h b/libkcal/recurrence.h index b13d14f..5b5aab1 100644 --- a/libkcal/recurrence.h +++ b/libkcal/recurrence.h @@ -25,5 +25,7 @@ #include <qstring.h> #include <qbitarray.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <Q3ValueList> namespace KCal { @@ -249,7 +251,7 @@ class Recurrence void addMonthlyDay(short _rDay); /** 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; /** Sets an event to recur yearly. @@ -280,7 +282,7 @@ class Recurrence void addYearlyMonthPos(short _rPos, const QBitArray &_rDays); /** 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. */ Feb29Type feb29YearlyType() const { return mFeb29YearlyType; } @@ -295,6 +297,6 @@ class Recurrence void dump() const; QString recurrenceText() const; - bool getYearlyMonthMonths(int day, QValueList<int>&, - QValueList<int> &leaplist) const; + bool getYearlyMonthMonths(int day, Q3ValueList<int>&, + Q3ValueList<int> &leaplist) const; protected: @@ -346,7 +348,7 @@ 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; int getFirstDayInWeek(int startDay, bool useWeekStart = true) const; @@ -367,11 +369,11 @@ class Recurrence QBitArray rDays; // array of days during week it recurs - 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 @@ -21,5 +21,7 @@ #include <qdir.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> +//Added by qt3to4: +#include <Q3PtrList> #include <klocale.h> @@ -265,6 +267,6 @@ bool Scheduler::acceptReply(IncidenceBase *incidence,ScheduleMessage::Status sta //get matching attendee in calendar 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(); if (to) attendeesEv = to->attendees(); @@ -343,9 +345,9 @@ bool Scheduler::acceptFreeBusy(IncidenceBase *incidence, Method method) QString messageText = mFormat->createScheduleMessage(freebusy, Publish); - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { kdDebug() << "acceptFreeBusy: Can't open:" << filename << " for writing" << endl; return false; } - QTextStream t(&f); + Q3TextStream t(&f); t << messageText; f.close(); diff --git a/libkcal/scheduler.h b/libkcal/scheduler.h index a9f43b9..357e98e 100644 --- a/libkcal/scheduler.h +++ b/libkcal/scheduler.h @@ -24,5 +24,5 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> namespace KCal { @@ -96,5 +96,5 @@ class Scheduler { virtual bool performTransaction(IncidenceBase *incidence,Method method,const QString &recipients) = 0; /** 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 @@ -23,10 +23,10 @@ #include <qstring.h> #include <qapplication.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> #include <qmessagebox.h> #include <qclipboard.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qxml.h> @@ -367,9 +367,9 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) } 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") ); text = ts.read(); @@ -389,5 +389,5 @@ bool SharpFormat::load( Calendar *calendar, Calendar *existngCal ) } file.setName( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; @@ -476,5 +476,5 @@ bool SharpFormat::save( Calendar *calendar) QString tPrefix = "CARDID,CATEGORY,ETDY,LTDY,FNDY,MARK,PRTY,TITL,MEM1\n"; QString command; - QPtrList<Event> er = calendar->rawEvents(); + Q3PtrList<Event> er = calendar->rawEvents(); Event* ev = er.first(); QString fileName = "/tmp/kopitempout"; @@ -504,8 +504,8 @@ bool SharpFormat::save( Calendar *calendar) QString fileNameIn = "/tmp/kopitempin"; 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") ); tsIn << ePrefix << eString ; @@ -518,9 +518,9 @@ bool SharpFormat::save( Calendar *calendar) system ( command.utf8() ); 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") ); answer = ts.read(); @@ -545,9 +545,9 @@ bool SharpFormat::save( Calendar *calendar) if ( changeEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << changeString ; @@ -563,9 +563,9 @@ bool SharpFormat::save( Calendar *calendar) if ( deleteEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << deleteString; @@ -581,5 +581,5 @@ bool SharpFormat::save( Calendar *calendar) status.setText ( i18n("Processing todos ...") ); qApp->processEvents(); - QPtrList<Todo> tl = calendar->rawTodos(); + Q3PtrList<Todo> tl = calendar->rawTodos(); Todo* to = tl.first(); i = 0; @@ -606,8 +606,8 @@ bool SharpFormat::save( Calendar *calendar) QString fileNameIn = "/tmp/kopitempin"; 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") ); tsIn << tPrefix << eString ; @@ -616,8 +616,8 @@ bool SharpFormat::save( Calendar *calendar) system ( command.utf8() ); 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") ); answer = ts.read(); @@ -643,9 +643,9 @@ bool SharpFormat::save( Calendar *calendar) if ( changeEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << changeString ; @@ -661,9 +661,9 @@ bool SharpFormat::save( Calendar *calendar) if ( deleteEnt ) { QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); ts << deleteString; @@ -784,5 +784,5 @@ QString SharpFormat::getEventString( Event* event ) { int count = 1; - QPtrList<Recurrence::rMonthPos> rmp; + Q3PtrList<Recurrence::rMonthPos> rmp; rmp = rec->monthPositions(); if ( rmp.first()->negative ) diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index cc1c5ae..5a0c32e 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp @@ -624,5 +624,5 @@ QDateTime Todo::getNextAlarmDateTime( bool * ok, int * offset, QDateTime start_d // return incidenceStart; // } - for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { + for (Q3PtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) { if ( alarm->hasTime () ) { diff --git a/libkcal/todo.h b/libkcal/todo.h index 2131732..cea976c 100644 --- a/libkcal/todo.h +++ b/libkcal/todo.h @@ -27,4 +27,6 @@ #include <qtimer.h> +//Added by qt3to4: +#include <Q3CString> namespace KCal { @@ -41,5 +43,5 @@ namespace KCal { ~Todo(); 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 @@ -27,5 +27,5 @@ using namespace KCal; VCalDrag::VCalDrag( Calendar *cal, QWidget *parent, const char *name ) - : QStoredDrag( "text/x-vCalendar", parent, name ) + : Q3StoredDrag( "text/x-vCalendar", parent, name ) { VCalFormat format; diff --git a/libkcal/vcaldrag.h b/libkcal/vcaldrag.h index 3048124..68a320d 100644 --- a/libkcal/vcaldrag.h +++ b/libkcal/vcaldrag.h @@ -23,5 +23,5 @@ #define VCALDRAG_H -#include <qdragobject.h> +#include <q3dragobject.h> @@ -31,5 +31,5 @@ class Calendar; /** vCalendar drag&drop class. */ -class VCalDrag : public QStoredDrag { +class VCalDrag : public Q3StoredDrag { public: /** Create a drag&drop object for vCalendar component \a vcal. */ diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 2e19740..9cbaf16 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -23,9 +23,11 @@ #include <qdatetime.h> #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qregexp.h> #include <qclipboard.h> #include <qdialog.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3CString> #include <kdebug.h> @@ -109,6 +111,6 @@ 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) { vo = eventToVTodo(qlt.current()); @@ -117,5 +119,5 @@ bool VCalFormat::save(Calendar *calendar, const QString &fileName) // EVENT STUFF - QPtrList<Event> events = mCalendar->rawEvents(); + Q3PtrList<Event> events = mCalendar->rawEvents(); Event *ev; for(ev=events.first();ev;ev=events.next()) { @@ -139,5 +141,5 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text ) // TODO: Factor out VCalFormat::fromString() - QCString data = text.utf8(); + Q3CString data = text.utf8(); if ( !data.size() ) return false; @@ -211,5 +213,5 @@ QString VCalFormat::toString( Calendar *calendar ) // TODO: Use all data. - QPtrList<Event> events = calendar->events(); + Q3PtrList<Event> events = calendar->events(); Event *event = events.first(); if ( !event ) return QString::null; @@ -272,6 +274,6 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // attendees if (anEvent->attendeeCount() != 0) { - QPtrList<Attendee> al = anEvent->attendees(); - QPtrListIterator<Attendee> ai(al); + Q3PtrList<Attendee> al = anEvent->attendees(); + Q3PtrListIterator<Attendee> ai(al); Attendee *curAttendee; @@ -327,5 +329,5 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vtodo, VCRelatedToProp, anEvent->relatedToUid().local8Bit()); @@ -356,5 +358,5 @@ VObject *VCalFormat::eventToVTodo(const Todo *anEvent) // alarm stuff kdDebug(5800) << "vcalformat::eventToVTodo was called" << endl; - QPtrList<Alarm> alarms = anEvent->alarms(); + Q3PtrList<Alarm> alarms = anEvent->alarms(); Alarm* alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next()) { @@ -434,6 +436,6 @@ 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; @@ -462,6 +464,6 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) if (anEvent->doesRecur()) { // some more variables - QPtrList<Recurrence::rMonthPos> tmpPositions; - QPtrList<int> tmpDays; + Q3PtrList<Recurrence::rMonthPos> tmpPositions; + Q3PtrList<int> tmpDays; int *tmpDay; Recurrence::rMonthPos *tmpPos; @@ -546,5 +548,5 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) tmpStr += "#0"; // defined as repeat forever } else { - tmpStr += qDateTimeToISO(anEvent->recurrence()->endDate(), FALSE); + tmpStr += qDateTimeToISO((QDateTime)anEvent->recurrence()->endDate(), FALSE); } addPropValue(vevent,VCRRuleProp, tmpStr.local8Bit()); @@ -626,5 +628,5 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // attachments // TODO: handle binary attachments! - QPtrList<Attachment> attachments = anEvent->attachments(); + Q3PtrList<Attachment> attachments = anEvent->attachments(); for ( Attachment *at = attachments.first(); at; at = attachments.next() ) addPropValue(vevent, VCAttachProp, at->uri().local8Bit()); @@ -637,5 +639,5 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // alarm stuff - QPtrList<Alarm> alarms = anEvent->alarms(); + Q3PtrList<Alarm> alarms = anEvent->alarms(); Alarm* alarm; for (alarm = alarms.first(); alarm; alarm = alarms.next()) { @@ -673,5 +675,5 @@ VObject* VCalFormat::eventToVEvent(Event *anEvent) // related event - if (anEvent->relatedToUid()) { + if (!anEvent->relatedToUid().isEmpty()) { addPropValue(vevent, VCRelatedToProp, anEvent->relatedToUid().local8Bit()); @@ -1409,5 +1411,5 @@ QString VCalFormat::qDateToISO(const QDate &qd) QString tmpStr; - ASSERT(qd.isValid()); + Q_ASSERT(qd.isValid()); tmpStr.sprintf("%.2d%.2d%.2d", @@ -1421,6 +1423,6 @@ QString VCalFormat::qDateTimeToISO(const QDateTime &qdt, bool zulu) QString tmpStr; - ASSERT(qdt.date().isValid()); - ASSERT(qdt.time().isValid()); + Q_ASSERT(qdt.date().isValid()); + Q_ASSERT(qdt.time().isValid()); if (zulu && !useLocalTime ) { QDateTime tmpDT = qdt.addSecs ( -KGlobal::locale()->localTimeOffset( qdt )*60); @@ -1455,6 +1457,6 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr) tmpTime.setHMS(hour, minute, second); - ASSERT(tmpDate.isValid()); - ASSERT(tmpTime.isValid()); + Q_ASSERT(tmpDate.isValid()); + Q_ASSERT(tmpTime.isValid()); QDateTime tmpDT(tmpDate, tmpTime); // correct for GMT if string is in Zulu format @@ -1649,5 +1651,5 @@ Attendee::Role VCalFormat::readRole(const char *s) const } -QCString VCalFormat::writeRole(Attendee::Role role) const +Q3CString VCalFormat::writeRole(Attendee::Role role) const { if ( role == Attendee::Chair ) @@ -1687,5 +1689,5 @@ Attendee::PartStat VCalFormat::readStatus(const char *s) const } -QCString VCalFormat::writeStatus(Attendee::PartStat status) const +Q3CString VCalFormat::writeStatus(Attendee::PartStat status) const { switch(status) { diff --git a/libkcal/vcalformat.h b/libkcal/vcalformat.h index 6dae3d2..cac9634 100644 --- a/libkcal/vcalformat.h +++ b/libkcal/vcalformat.h @@ -24,4 +24,7 @@ #include "calformat.h" +//Added by qt3to4: +#include <Q3CString> +#include <Q3PtrList> #define _VCAL_VERSION "1.0" @@ -96,8 +99,8 @@ class VCalFormat : public CalFormat { /** the reverse of the above function. */ 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; private: @@ -105,6 +108,6 @@ class VCalFormat : public CalFormat { bool useLocalTime; - 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 @@ -24,8 +24,9 @@ #include <qstringlist.h> #include <qlineedit.h> -#include <qlistview.h> -#include <qheader.h> +#include <q3listview.h> +#include <q3header.h> #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> #include "kpimprefs.h" @@ -37,5 +38,5 @@ using namespace KPIM; CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, const char* name, bool modal, - WFlags fl ) + Qt::WFlags fl ) : CategoryEditDialog_base( parent, name, modal, fl ), mPrefs( prefs ) @@ -47,10 +48,10 @@ CategoryEditDialog::CategoryEditDialog( KPimPrefs *prefs, QWidget* parent, for (it = mPrefs->mCustomCategories.begin(); it != mPrefs->mCustomCategories.end(); ++it ) { - new QListViewItem(mCategories,*it); + new Q3ListViewItem(mCategories,*it); categoriesExist=true; } - 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 &))); mButtonRemove->setEnabled(categoriesExist); @@ -83,5 +84,5 @@ void CategoryEditDialog::add() { if (!mEdit->text().isEmpty()) { - new QListViewItem(mCategories,mEdit->text()); + new Q3ListViewItem(mCategories,mEdit->text()); mEdit->setText(""); mButtonRemove->setEnabled(mCategories->childCount()>0); @@ -122,5 +123,5 @@ void CategoryEditDialog::slotApply() mPrefs->mCustomCategories.clear(); - QListViewItem *item = mCategories->firstChild(); + Q3ListViewItem *item = mCategories->firstChild(); while(item) { mPrefs->mCustomCategories.append(item->text(0)); @@ -132,5 +133,5 @@ void CategoryEditDialog::slotApply() } -void CategoryEditDialog::editItem(QListViewItem *item) +void CategoryEditDialog::editItem(Q3ListViewItem *item) { mEdit->setText(item->text(0)); diff --git a/libkdepim/categoryeditdialog.h b/libkdepim/categoryeditdialog.h index 9bb3201..828894f 100644 --- a/libkdepim/categoryeditdialog.h +++ b/libkdepim/categoryeditdialog.h @@ -25,5 +25,5 @@ #include <categoryeditdialog_base.h> -#include <qlistview.h> +#include <q3listview.h> class KPimPrefs; @@ -31,5 +31,5 @@ class KPimPrefs; namespace KPIM { - class CategorySelectItem :public QObject, public QCheckListItem + class CategorySelectItem :public QObject, public Q3CheckListItem { @@ -37,10 +37,10 @@ namespace KPIM { public: - 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 ) {;} signals: - void stateChanged( QListViewItem*); + void stateChanged( Q3ListViewItem*); protected: @@ -48,5 +48,5 @@ namespace KPIM { virtual void stateChange(bool b) { - QCheckListItem::stateChange(b); + Q3CheckListItem::stateChange(b); emit stateChanged( this ); } @@ -60,5 +60,5 @@ class CategoryEditDialog : public CategoryEditDialog_base CategoryEditDialog( KPimPrefs *prefs, QWidget* parent = 0, const char* name = 0, - bool modal = FALSE, WFlags fl = 0 ); + bool modal = FALSE, Qt::WFlags fl = 0 ); ~CategoryEditDialog(); @@ -76,7 +76,7 @@ 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 @@ -12,11 +12,15 @@ #include <qvariant.h> -#include <qheader.h> +#include <q3header.h> #include <qlineedit.h> -#include <qlistview.h> +#include <q3listview.h> #include <qpushbutton.h> #include <qlayout.h> #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> /* @@ -27,5 +31,5 @@ * TRUE to construct a modal dialog. */ -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 ) @@ -33,5 +37,5 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n if ( !name ) 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"); mEdit = new QLineEdit( this, "mEdit" ); @@ -39,5 +43,5 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n CategoryEditDialog_baseLayout->addMultiCellWidget( mEdit, 1, 1, 0, 0 ); - Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13"); + Layout13 = new Q3HBoxLayout( 0, 0, 6, "Layout13"); // mButtonHelp = new QPushButton( this, "mButtonHelp" ); @@ -61,10 +65,10 @@ CategoryEditDialog_base::CategoryEditDialog_base( QWidget* parent, const char* n CategoryEditDialog_baseLayout->addMultiCellLayout( Layout13, 2, 2, 0, 1 ); - mCategories = new QListView( this, "mCategories" ); + mCategories = new Q3ListView( this, "mCategories" ); mCategories->addColumn( tr2i18n( "Category" ) ); CategoryEditDialog_baseLayout->addWidget( mCategories, 0, 0 ); - layout103 = new QVBoxLayout( 0, 0, 6, "layout103"); + layout103 = new Q3VBoxLayout( 0, 0, 6, "layout103"); mButtonAdd = new QPushButton( this, "mButtonAdd" ); 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 @@ -13,11 +13,15 @@ #include <qvariant.h> #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; @@ -27,5 +31,5 @@ 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(); @@ -35,5 +39,5 @@ public: QPushButton* mButtonOk; QPushButton* mButtonCancel; - QListView* mCategories; + Q3ListView* mCategories; QPushButton* mButtonAdd; QPushButton* mButtonModify; @@ -48,7 +52,7 @@ public slots: protected: - QGridLayout* CategoryEditDialog_baseLayout; - QHBoxLayout* Layout13; - QVBoxLayout* layout103; + Q3GridLayout* CategoryEditDialog_baseLayout; + Q3HBoxLayout* Layout13; + Q3VBoxLayout* layout103; protected slots: diff --git a/libkdepim/categoryselectdialog.cpp b/libkdepim/categoryselectdialog.cpp index 2a9b43e..4f72880 100644 --- a/libkdepim/categoryselectdialog.cpp +++ b/libkdepim/categoryselectdialog.cpp @@ -22,9 +22,12 @@ */ -#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> @@ -39,5 +42,5 @@ using namespace KPIM; CategorySelectDialog::CategorySelectDialog( KPimPrefs *prefs, QWidget* parent, const char* name, - bool modal, WFlags fl ) + bool modal, Qt::WFlags fl ) : CategorySelectDialog_base( parent, name, true, fl ), mPrefs( prefs ) @@ -82,6 +85,6 @@ void CategorySelectDialog::setCategories() for (it = mPrefs->mCustomCategories.begin(); 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 *) ) ); } @@ -101,5 +104,5 @@ void CategorySelectDialog::setSelected(const QStringList &selList) for (it=selList.begin();it!=selList.end();++it) { //qDebug(" CategorySelectDialog::setSelected("); - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); while (item) { if (item->text() == *it) { @@ -110,5 +113,5 @@ void CategorySelectDialog::setSelected(const QStringList &selList) break; } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } // if ( ! found ) { @@ -138,5 +141,5 @@ void CategorySelectDialog::setColorEnabled() void CategorySelectDialog::setColorCat() { - QCheckListItem * newColorItem = (QCheckListItem * )mCategories->currentItem (); + Q3CheckListItem * newColorItem = (Q3CheckListItem * )mCategories->currentItem (); if ( !newColorItem ) { KMessageBox::error(this,i18n("There is no current item.")); @@ -148,12 +151,12 @@ void CategorySelectDialog::setColorCat() } -void CategorySelectDialog::clicked ( QListViewItem * it ) +void CategorySelectDialog::clicked ( Q3ListViewItem * it ) { if ( ! 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) { if (item->isOn()) { @@ -161,5 +164,5 @@ void CategorySelectDialog::clicked ( QListViewItem * it ) break; } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } } else if ( i->isOn() && !mColorItem) { @@ -167,5 +170,5 @@ void CategorySelectDialog::clicked ( QListViewItem * it ) } } -void CategorySelectDialog::setColorItem( QCheckListItem * newColorItem ) +void CategorySelectDialog::setColorItem( Q3CheckListItem * newColorItem ) { if ( !mColorEnabled ) @@ -187,5 +190,5 @@ void CategorySelectDialog::slotApply() { QStringList categories; - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); QString colcat; while (item) { @@ -196,5 +199,5 @@ void CategorySelectDialog::slotApply() categories.append(item->text()); } - item = (QCheckListItem *)item->nextSibling(); + item = (Q3CheckListItem *)item->nextSibling(); } categories.sort(); @@ -221,8 +224,8 @@ void CategorySelectDialog::slotOk() 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(); } } @@ -231,10 +234,10 @@ void CategorySelectDialog::updateCategoryConfig() { QStringList selected; - QCheckListItem *item = (QCheckListItem *)mCategories->firstChild(); + Q3CheckListItem *item = (Q3CheckListItem *)mCategories->firstChild(); while (item) { if (item->isOn()) { selected.append(item->text()); } - 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 @@ -27,5 +27,5 @@ class KPimPrefs; -class QCheckListItem; +class Q3CheckListItem; namespace KPIM { @@ -37,5 +37,5 @@ class CategorySelectDialog : public CategorySelectDialog_base CategorySelectDialog( KPimPrefs *prefs, QWidget* parent = 0, const char* name = 0, - bool modal = FALSE, WFlags fl = 0 ); + bool modal = FALSE, Qt::WFlags fl = 0 ); ~CategorySelectDialog(); @@ -54,5 +54,5 @@ class CategorySelectDialog : public CategorySelectDialog_base void updateCategoryConfig(); void setColorCat(); - void clicked ( QListViewItem * ); + void clicked ( Q3ListViewItem * ); signals: void categoriesSelected(const QString &); @@ -64,6 +64,6 @@ class CategorySelectDialog : public CategorySelectDialog_base KPimPrefs *mPrefs; QStringList mCategoryList; - QCheckListItem *mColorItem; - void setColorItem( QCheckListItem * ); + Q3CheckListItem *mColorItem; + void setColorItem( Q3CheckListItem * ); class CategorySelectDialogPrivate; 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 @@ -12,10 +12,13 @@ #include <qvariant.h> -#include <qheader.h> -#include <qlistview.h> +#include <q3header.h> +#include <q3listview.h> #include <qpushbutton.h> #include <qlayout.h> #include <qtooltip.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3HBoxLayout> /* @@ -26,5 +29,5 @@ * TRUE to construct a modal dialog. */ -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 ) @@ -32,12 +35,12 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha if ( !name ) 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" ) ); CategorySelectDialog_baseLayout->addWidget( mCategories ); mSetColorCat = new QPushButton( this, "msetColor" ); CategorySelectDialog_baseLayout->addWidget( mSetColorCat ); - Layout12 = new QHBoxLayout( 0, 0, 4, "Layout12"); + Layout12 = new Q3HBoxLayout( 0, 0, 4, "Layout12"); mClear = new QPushButton( this, "mClear" ); @@ -50,5 +53,5 @@ CategorySelectDialog_base::CategorySelectDialog_base( QWidget* parent, const cha CategorySelectDialog_baseLayout->addLayout( Layout12 ); - Layout11 = new QHBoxLayout( 0, 0, 4, "Layout11"); + Layout11 = new Q3HBoxLayout( 0, 0, 4, "Layout11"); //mButtonHelp = new QPushButton( this, "mButtonHelp" ); diff --git a/libkdepim/categoryselectdialog_base.h b/libkdepim/categoryselectdialog_base.h index 59ffa22..71d4ce9 100644 --- a/libkdepim/categoryselectdialog_base.h +++ b/libkdepim/categoryselectdialog_base.h @@ -13,10 +13,14 @@ #include <qvariant.h> #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; @@ -26,8 +30,8 @@ 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; QPushButton* mButtonEdit; @@ -44,7 +48,7 @@ public slots: protected: - QVBoxLayout* CategorySelectDialog_baseLayout; - QHBoxLayout* Layout12; - QHBoxLayout* Layout11; + Q3VBoxLayout* CategorySelectDialog_baseLayout; + Q3HBoxLayout* Layout12; + Q3HBoxLayout* Layout11; protected slots: diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index f376e6c..3fc548a 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -40,5 +40,7 @@ $Id$ #else #include <qapplication.h> -#include <qprocess.h> +#include <q3process.h> +//Added by qt3to4: +#include <Q3CString> #endif @@ -124,5 +126,5 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel) /*********************************************************************************/ -bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) +bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data ) { @@ -147,5 +149,5 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); @@ -227,5 +229,5 @@ 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 ) { bool res = QCopTransferItem::appMessage( cmsg, data ); @@ -233,5 +235,5 @@ bool QCopMapTransferItem::appMessage( const QCString& cmsg, const QByteArray& da if (res == false) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); // qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); @@ -306,5 +308,5 @@ 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 ) { bool res = QCopTransferItem::appMessage( cmsg, data ); @@ -315,5 +317,5 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d if (res == false) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast<QByteArray*>(&data), QIODevice::ReadOnly ); #ifdef DEBUG_EXT_APP_HANDLER @@ -519,7 +521,7 @@ 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; DefaultAppItem* dai; @@ -747,5 +749,5 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() ); //KMessageBox::sorry( 0, message2 ); - QProcess * proc = new QProcess( this ); + Q3Process * proc = new Q3Process( this ); int i = 0; proc->addArgument( channel ); @@ -773,5 +775,5 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS //qDebug("2add%sdd ",arg.latin1() ); proc->addArgument( arg); - proc->launch(""); + proc->launch(QString()); #endif @@ -832,5 +834,5 @@ 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 ); if ( message.find (" " ) > 0 ) { @@ -851,5 +853,5 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e //KMessageBox::information(0,parameters); proc->addArgument( parameters ); - proc->launch(""); + proc->launch(QString()); #endif @@ -1233,5 +1235,5 @@ 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 ) { qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this); diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index b899ad7..3247fe4 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h @@ -35,4 +35,7 @@ $Id$ #include <qlist.h> #include <qmap.h> +#include <Q3PtrList> +//Added by qt3to4: +#include <Q3CString> class QCopEnvelope; @@ -51,5 +54,5 @@ class QCopTransferItem : public QObject void setSourceChannel(const QString& sourceChannel); - virtual bool appMessage( const QCString& msg, const QByteArray& data ); + virtual bool appMessage( const Q3CString& msg, const QByteArray& data ); @@ -84,5 +87,5 @@ class QCopMapTransferItem : public QCopTransferItem - virtual bool appMessage( const QCString& msg, const QByteArray& data ); + virtual bool appMessage( const Q3CString& msg, const QByteArray& data ); @@ -105,5 +108,5 @@ class QCopListTransferItem : public QCopTransferItem - virtual bool appMessage( const QCString& msg, const QByteArray& data ); + virtual bool appMessage( const Q3CString& msg, const QByteArray& data ); @@ -226,9 +229,9 @@ class ExternalAppHandler : public QObject void loadConfig(); - QList<DefaultAppItem> getAvailableDefaultItems(Types); + Q3PtrList<DefaultAppItem> getAvailableDefaultItems(Types); DefaultAppItem* getDefaultItem(Types, int); public slots: - void appMessage( const QCString& msg, const QByteArray& data ); + void appMessage( const Q3CString& msg, const QByteArray& data ); @@ -263,5 +266,5 @@ class ExternalAppHandler : public QObject private: ExternalAppHandler(); - QList<DefaultAppItem> mDefaultItems; + Q3PtrList<DefaultAppItem> mDefaultItems; Availability mEmailAppAvailable; 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 @@ -31,4 +31,6 @@ $Id$ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kdebug.h> @@ -55,5 +57,5 @@ 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" ); layout->addWidget( mConfigWidget ); 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 @@ -32,14 +32,19 @@ $Id$ #include <qtabwidget.h> #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> #include <qregexp.h> #include <qspinbox.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <Q3VBoxLayout> #include <kdialog.h> @@ -102,5 +107,5 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); @@ -122,8 +127,8 @@ void KDEPIMConfigWidget::showTimeZoneTab() 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"), &(KPimGlobalPrefs::instance()->mBackupEnabled),topFrame); @@ -132,5 +137,5 @@ void KDEPIMConfigWidget::setupBackupTab() topLayout->addWidget((bupFrame)); 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"), &(KPimGlobalPrefs::instance()->mBackupUseDefaultDir),bupFrame); @@ -144,5 +149,5 @@ void KDEPIMConfigWidget::setupBackupTab() mBackupUrl->setEnabled( !KPimGlobalPrefs::instance()->mBackupUseDefaultDir ); bupFrame->setEnabled( KPimGlobalPrefs::instance()->mBackupEnabled ); - QHBox *dummy = new QHBox(bupFrame); + Q3HBox *dummy = new Q3HBox(bupFrame); new QLabel(i18n("Number of Backups:"),dummy); mBackupNumbersSpin = new QSpinBox(1,21,1,dummy); @@ -150,5 +155,5 @@ void KDEPIMConfigWidget::setupBackupTab() bupLayout->addWidget( dummy ); - dummy = new QHBox(bupFrame); + dummy = new Q3HBox(bupFrame); new QLabel(i18n("Make backup every "),dummy); mBackupDayCountSpin = new QSpinBox(1,28,1,dummy); @@ -168,5 +173,5 @@ void KDEPIMConfigWidget::setupBackupTab() void KDEPIMConfigWidget::setupStoreTab() { - QVBox *colorPage = new QVBox( this ); + Q3VBox *colorPage = new Q3VBox( this ); tabWidget->addTab( colorPage, i18n( "Colors" ) ); QWidget* cw = new QWidget( colorPage ); @@ -174,10 +179,10 @@ void KDEPIMConfigWidget::setupStoreTab() addWidColor(i18n("Alternating background of list views"), &(KPimGlobalPrefs::instance()->mAlternateColor),cw); - QHBoxLayout *topLayout = new QHBoxLayout(cw); + Q3HBoxLayout *topLayout = new Q3HBoxLayout(cw); topLayout->addWidget(holidayColor->label()); topLayout->addWidget( (QWidget* )holidayColor->button()); - QVBox *storePage = new QVBox( this ); + Q3VBox *storePage = new Q3VBox( this ); if ( QApplication::desktop()->height() > 240 ) new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); @@ -201,5 +206,5 @@ void KDEPIMConfigWidget::setupStoreTab() #endif new QLabel( i18n("New dirs are created automatically"), storePage ); - QHBox *bb = new QHBox( storePage ); + Q3HBox *bb = new Q3HBox( storePage ); QPushButton * pb; if ( QApplication::desktop()->width() < 640 ) @@ -271,5 +276,5 @@ void KDEPIMConfigWidget::setupExternalAppTab() { QWidget *externalAppsPage = new QWidget( this ); - QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), + Q3VBoxLayout* layout = new Q3VBoxLayout( externalAppsPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); @@ -286,6 +291,6 @@ 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); @@ -353,5 +358,5 @@ void KDEPIMConfigWidget::setupLocaleDateTab() { QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout( topFrame, 3, 2); + Q3GridLayout *topLayout = new Q3GridLayout( topFrame, 3, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); @@ -421,5 +426,5 @@ void KDEPIMConfigWidget::setupLocaleTab() QWidget *topFrame = new QWidget( this ); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(KDialog::spacingHint()); @@ -443,5 +448,5 @@ void KDEPIMConfigWidget::setupLocaleTab() tabWidget->addTab( topFrame, i18n( "Language" ) ); topFrame = new QWidget( this ); - topLayout = new QGridLayout(topFrame,4,2); + topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(KDialog::spacingHint()); @@ -472,5 +477,5 @@ void KDEPIMConfigWidget::setupTimeZoneTab() { QWidget *topFrame; - QGridLayout *topLayout ; + Q3GridLayout *topLayout ; @@ -480,9 +485,9 @@ void KDEPIMConfigWidget::setupTimeZoneTab() topFrame = new QWidget( this ); - topLayout = new QGridLayout( topFrame, 5, 2); + topLayout = new Q3GridLayout( topFrame, 5, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); topLayout->setMargin(KDialog::marginHintSmall()); - QHBox *timeZoneBox = new QHBox( topFrame ); + Q3HBox *timeZoneBox = new Q3HBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); @@ -551,5 +556,5 @@ void KDEPIMConfigWidget::setupTimeZoneTab() topFrame = new QWidget( this ); - topLayout = new QGridLayout( topFrame, 3, 2); + topLayout = new Q3GridLayout( topFrame, 3, 2); topLayout->setSpacing(KDialog::spacingHintSmall()); topLayout->setMargin(KDialog::marginHintSmall()); @@ -712,5 +717,5 @@ void KDEPIMConfigWidget::updateClientWidgets() mClient->clear(); - QList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); + Q3PtrList<DefaultAppItem> items = ExternalAppHandler::instance()->getAvailableDefaultItems(mCurrentApp); DefaultAppItem* dai; for ( dai=items.first(); dai != 0; dai=items.next() ) 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 @@ -35,4 +35,6 @@ $Id$ #include <kio/kfile/kurlrequester.h> #include <qmap.h> +//Added by qt3to4: +#include <QLabel> #include "externalapphandler.h" @@ -42,5 +44,5 @@ class QComboBox; class QLineEdit; class KPimGlobalPrefs; -class QGroupBox; +class Q3GroupBox; class QTabWidget; class KDateEdit; @@ -107,5 +109,5 @@ class KDEPIMConfigWidget : public KPrefsWidget // QPushButton *mConfigureButton; 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 @@ -28,4 +28,7 @@ #include <qpixmap.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3Frame> +#include <QKeyEvent> #include <kdatepicker.h> @@ -37,4 +40,5 @@ #include <knotifyclient.h> #include <qpalette.h> +#include <QDesktopWidget> #include "kdateedit.h" @@ -42,5 +46,5 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) - : QHBox(parent, name) + : Q3HBox(parent, name) { dateFormShort = true; @@ -73,7 +77,7 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) nowButton->setPixmap(pixmap2); - 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); mDateFrame->hide(); @@ -87,5 +91,5 @@ KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); - mDateButton->setFocusPolicy( QWidget::NoFocus ); + mDateButton->setFocusPolicy( Qt::NoFocus ); mDateButton->setAutoDefault( false ); //mDateFrame->resize( 400, 300 ); @@ -226,8 +230,8 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm case 'a': 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 ) ); } @@ -237,10 +241,10 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm case 'b': case 'B': - if(key == Key_Up) { + if(key == Qt::Key_Up) { int year = ((date.month()+1)>12)?date.year()+1:date.year(); int month = ((date.month()+1)>12)?1:date.month()+1; int day = (QDate(year,month,1).daysInMonth()<maxDay)?QDate(year,month,1).daysInMonth():maxDay; 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(); int month = ((date.month()-1)<1)?12:date.month()-1; @@ -251,8 +255,8 @@ void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateForm case 'y': 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()) ); } @@ -345,10 +349,10 @@ void KDateEdit::keyPressEvent(QKeyEvent *e) switch(e->key()) { - 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 if(!date.isValid()) { @@ -361,7 +365,7 @@ void KDateEdit::keyPressEvent(QKeyEvent *e) return; } - 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 if(!date.isValid()) { @@ -374,8 +378,8 @@ void KDateEdit::keyPressEvent(QKeyEvent *e) return; } - setDate(date, &cpos, Key_Down, dateFormShort); + setDate(date, &cpos, Qt::Key_Down, dateFormShort); break; default: - QHBox::keyPressEvent(e); + Q3HBox::keyPressEvent(e); break; } // switch diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h index 2d8c452..38eacde 100644 --- a/libkdepim/kdateedit.h +++ b/libkdepim/kdateedit.h @@ -25,8 +25,11 @@ #define KDATEEDIT_H -#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> class QLineEdit; @@ -50,5 +53,5 @@ class KDateValidator; * @author Mike Pilone <mpilone@slac.com> */ -class KDateEdit : public QHBox +class KDateEdit : public Q3HBox { Q_OBJECT @@ -129,5 +132,5 @@ class KDateEdit : public QHBox QLineEdit *mDateEdit; KDatePicker *mDatePicker; - QVBox *mDateFrame; + Q3VBox *mDateFrame; int maxDay; bool withoutDp; diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 68ef943..28b65cf 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp @@ -24,5 +24,5 @@ #include <klocale.h> #include <kiconloader.h> -#include <qframe.h> +#include <q3frame.h> #include <qpainter.h> #include <qdialog.h> @@ -32,4 +32,8 @@ #include <qlineedit.h> #include <qvalidator.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QKeyEvent> +#include <QDesktopWidget> #include <kdebug.h> #include <knotifyclient.h> @@ -41,5 +45,5 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) - : QFrame(parent,name), + : Q3Frame(parent,name), yearForward(new QToolButton(this)), yearBackward(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 @@ -21,6 +21,9 @@ #define MICROKDE_KDATEPICKER_H #include <qdatetime.h> -#include <qframe.h> +#include <q3frame.h> #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QKeyEvent> class QLineEdit; @@ -49,5 +52,5 @@ class KDateEdit; * @short A date selection widget. **/ -class KDatePicker: public QFrame +class KDatePicker: public Q3Frame { Q_OBJECT diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 9c28425..3677e87 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -39,5 +39,5 @@ $Id$ #include <qfile.h> #include <stdlib.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qapplication.h> #include "kpimglobalprefs.h" @@ -143,7 +143,7 @@ void KPimGlobalPrefs::setGlobalConfig() fileName = fileName+"italiantranslation.txt"; 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 ); QString text = ts.read(); @@ -159,5 +159,5 @@ void KPimGlobalPrefs::setGlobalConfig() br = nbr+1; int se, ee, st, et; - mLocaleDict = new QDict<QString>; + mLocaleDict = new Q3Dict<QString>; mLocaleDict->setAutoDelete( true ); QString end = "{ \"\",\"\" }"; diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index 94ac8ae..01f5ab0 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -33,5 +33,5 @@ $Id$ #include "kprefs.h" -#include <qdict.h> +#include <q3dict.h> class KPimGlobalPrefs : public KPrefs @@ -86,5 +86,5 @@ 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 @@ -26,16 +26,16 @@ #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #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> #include <qcheckbox.h> @@ -43,4 +43,5 @@ #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> #include <kcolorbutton.h> @@ -129,5 +130,5 @@ KPrefsDialogWidFont::KPrefsDialogWidFont(const QString &sampleText,const QString mPreview = new QLabel(sampleText,parent); - mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); + mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken); mButton = new QPushButton(i18n("Choose..."), parent); @@ -213,5 +214,5 @@ KPrefsDialogWidRadios::KPrefsDialogWidRadios(const QString &text,int *reference, mReference = reference; - mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); + mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent); } @@ -225,5 +226,5 @@ void KPrefsDialogWidRadios::addRadio(const QString &text) } -QButtonGroup *KPrefsDialogWidRadios::groupBox() +Q3ButtonGroup *KPrefsDialogWidRadios::groupBox() { return mBox; diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h index 52ec809..cc95dd4 100644 --- a/libkdepim/kprefsdialog.h +++ b/libkdepim/kprefsdialog.h @@ -25,6 +25,8 @@ // $Id$ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qlineedit.h> +//Added by qt3to4: +#include <QLabel> #include <kdialogbase.h> @@ -37,5 +39,5 @@ class QCheckBox; class QLabel; class QSpinBox; -class QButtonGroup; +class Q3ButtonGroup; /** @@ -259,5 +261,5 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid Return the box widget used by this widget. */ - QButtonGroup *groupBox(); + Q3ButtonGroup *groupBox(); void readConfig(); @@ -267,5 +269,5 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid int *mReference; - QButtonGroup *mBox; + Q3ButtonGroup *mBox; }; @@ -440,5 +442,5 @@ class KPrefsDialog : public KDialogBase KPrefs *mPrefs; - 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 @@ -26,16 +26,16 @@ #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #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> #include <qcheckbox.h> @@ -43,4 +43,5 @@ #include <qpushbutton.h> #include <qapplication.h> +#include <QDesktopWidget> #include <kcolorbutton.h> @@ -132,5 +133,5 @@ 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); mButton = new QPushButton(i18n("Choose..."), parent); @@ -219,5 +220,5 @@ KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference, mReference = reference; - mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); + mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent); connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) ); } @@ -232,5 +233,5 @@ void KPrefsWidRadios::addRadio(const QString &text) } -QButtonGroup *KPrefsWidRadios::groupBox() +Q3ButtonGroup *KPrefsWidRadios::groupBox() { return mBox; diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h index 8543a39..9de1be5 100644 --- a/libkdepim/kprefswidget.h +++ b/libkdepim/kprefswidget.h @@ -26,9 +26,11 @@ #define _KPREFSWIDGET_H -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qwidget.h> +//Added by qt3to4: +#include <QLabel> class KPrefs; @@ -38,5 +40,5 @@ class QCheckBox; class QLabel; class QSpinBox; -class QButtonGroup; +class Q3ButtonGroup; /** @@ -266,5 +268,5 @@ class KPrefsWidRadios : public KPrefsWid Return the box widget used by this widget. */ - QButtonGroup *groupBox(); + Q3ButtonGroup *groupBox(); void readConfig(); @@ -274,5 +276,5 @@ class KPrefsWidRadios : public KPrefsWid int *mReference; - QButtonGroup *mBox; + Q3ButtonGroup *mBox; }; @@ -450,5 +452,5 @@ class KPrefsWidget : public QWidget KPrefs *mPrefs; - 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 @@ -36,9 +36,9 @@ #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> #include <qmessagebox.h> @@ -51,4 +51,7 @@ #include <qcheckbox.h> #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <klocale.h> @@ -60,9 +63,9 @@ 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) { mServerSocket = 0; - bar = new QProgressBar ( 1, 0 ); + bar = new Q3ProgressBar ( 1, 0 ); bar->setCaption (""); mWriteBackInPast = 2; @@ -90,5 +93,5 @@ void KSyncManager::fillSyncMenu() mSyncMenu->insertItem( i18n("Configure..."), 0 ); mSyncMenu->insertSeparator(); - QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu ); + Q3PopupMenu *clearMenu = new Q3PopupMenu ( mSyncMenu ); mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 ); clearMenu->insertItem( i18n("For all profiles"), 1 ); @@ -356,5 +359,5 @@ void KSyncManager::enableQuick( bool ask ) QDialog dia ( 0, "input-dialog", true ); QLineEdit lab ( &dia ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lab.setText( mPrefs->mPassiveSyncPort ); lay.setMargin(7); @@ -805,5 +808,5 @@ bool KSyncManager::edit_pisync_options() QDialog dia( mParent, "dia", true ); dia.setCaption( i18n("Pi-Sync options for device: " ) +mCurrentSyncDevice ); - QVBoxLayout lay ( &dia ); + Q3VBoxLayout lay ( &dia ); lay.setSpacing( 5 ); lay.setMargin( 3 ); @@ -839,6 +842,6 @@ bool KSyncManager::edit_sync_options() QDialog dia( mParent, "dia", true ); 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 ); lay.setMargin( 3 ); @@ -892,5 +895,5 @@ QString KSyncManager::getPassword( ) QLineEdit lab ( &dia ); lab.setEchoMode( QLineEdit::Password ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); lay.setSpacing(7); @@ -1335,5 +1338,5 @@ 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 ) { mPendingConnect = 0; @@ -1351,5 +1354,5 @@ void KServerSocket::waitForSocketFinish() return; } - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); @@ -1373,5 +1376,5 @@ void KServerSocket::newConnection ( int socket ) } mPendingConnect = 0; - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); @@ -1463,9 +1466,9 @@ void KServerSocket::displayErrorMessage() 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())); } @@ -1485,5 +1488,5 @@ void KServerSocket::send_file() QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); label->setAlignment ( Qt::AlignHCenter ); - QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); + Q3VBoxLayout* lay = new Q3VBoxLayout( mSyncActionDialog ); lay->addWidget( label); lay->setMargin(7); @@ -1537,5 +1540,5 @@ void KServerSocket::send_file() QString fileName = mFileName; QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { mErrorMessage = 0; end_connect(); @@ -1544,9 +1547,9 @@ 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() ) { os << ts.readLine() << "\r\n"; @@ -1557,5 +1560,5 @@ void KServerSocket::send_file() mSyncActionDialog->setCaption( i18n("Waiting for synced file...") ); mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); } @@ -1589,5 +1592,5 @@ void KServerSocket::readBackFileFromSocket() QString fileName = mFileName; QFile file ( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { delete mSyncActionDialog; mSyncActionDialog = 0; @@ -1602,10 +1605,10 @@ 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...") ); ts << piFileString; mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( discardClient())); file.close(); @@ -1649,6 +1652,6 @@ void KCommandSocket::sendFileRequest() mConnectProgress.setLabelText( i18n("Waiting for remote file...") ); mTimerSocket->start( 100, true ); - QTextStream os( mSocket ); - os.setEncoding( QTextStream::Latin1 ); + Q3TextStream os( mSocket ); + os.setEncoding( Q3TextStream::Latin1 ); QString curDt = " " +KGlobal::locale()->formatDateTime(QDateTime::currentDateTime().addSecs(-1),true, true,KLocale::ISODate ); @@ -1659,5 +1662,5 @@ void KCommandSocket::readFile( QString fn ) { if ( !mSocket ) { - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); //qDebug("KCS: read file - new socket"); connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); @@ -1697,5 +1700,5 @@ void KCommandSocket::writeFile( QString fileName ) { if ( !mSocket ) { - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) ); @@ -1710,10 +1713,10 @@ void KCommandSocket::writeFileToSocket() mTimerSocket->stop(); QFile file2( mFileName ); - if (!file2.open( IO_ReadOnly ) ) { + if (!file2.open( QIODevice::ReadOnly ) ) { mConnectProgress.hide(); mConnectCount = -1; mRetVal= errorW; mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( deleteSocket())); return ; @@ -1725,8 +1728,8 @@ void KCommandSocket::writeFileToSocket() mConnectProgress.setProgress( count ); 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";; int byteCount = 0; @@ -1749,5 +1752,5 @@ void KCommandSocket::writeFileToSocket() mRetVal= successW; mSocket->close(); - if ( mSocket->state() == QSocket::Idle ) + if ( mSocket->state() == Q3Socket::Idle ) QTimer::singleShot( 10, this , SLOT ( deleteSocket())); mConnectProgress.blockSignals( false ); @@ -1756,13 +1759,13 @@ void KCommandSocket::sendStop() { if ( !mSocket ) { - mSocket = new QSocket( this ); + mSocket = new Q3Socket( this ); connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); } 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())); } @@ -1830,5 +1833,5 @@ void KCommandSocket::readFileFromSocket() QString fileName = mFileName; QFile file ( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { mFileString = ""; mRetVal = errorR; @@ -1839,6 +1842,6 @@ 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; file.close(); @@ -1848,5 +1851,5 @@ void KCommandSocket::readFileFromSocket() // if state is not idle, deleteSocket(); is called via // 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 @@ -25,13 +25,15 @@ #include <qobject.h> #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; class KPimPrefs; @@ -39,8 +41,8 @@ class QWidget; class KSyncManager; class KSyncInterface; -class QProgressBar; +class Q3ProgressBar; -class KServerSocket : public QServerSocket +class KServerSocket : public Q3ServerSocket { Q_OBJECT @@ -75,5 +77,5 @@ class KServerSocket : public QServerSocket void error_connect( QString ); QDialog* mSyncActionDialog; - QSocket* mSocket; + Q3Socket* mSocket; QString mPassWord; QString mFileName; @@ -109,5 +111,5 @@ class KCommandSocket : public QObject KProgressDialog mConnectProgress; QWidget* tlw; - QSocket* mSocket; + Q3Socket* mSocket; QString mPassWord; Q_UINT16 mPort; @@ -133,5 +135,5 @@ class KSyncManager : public QObject PWMPI = 2 }; - KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); + KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, Q3PopupMenu* syncmenu); ~KSyncManager() ; @@ -220,6 +222,6 @@ class KSyncManager : public QObject KSyncInterface* mImplementation; 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 @@ -24,6 +24,6 @@ #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> #include <qfont.h> @@ -31,8 +31,8 @@ #include <qfile.h> #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> #include <qdatetime.h> @@ -40,10 +40,14 @@ #include <qradiobutton.h> #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> #include <kcolorbutton.h> @@ -90,9 +94,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() QLabel * lab; //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 ); QPushButton* button = new QPushButton( i18n("Ok"), b_box ); @@ -102,9 +106,9 @@ void KSyncPrefsDialog::setupSyncAlgTab() //QBoxLayout * sl = new QVBoxLayout(this ); //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()); topLayout->setMargin(marginHint()); @@ -121,5 +125,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() ++iii; - QHBox* buttonbox = new QHBox( topFrame); + Q3HBox* buttonbox = new Q3HBox( topFrame); topLayout->addMultiCellWidget(buttonbox, iii,iii,0,1); ++iii; @@ -146,5 +150,5 @@ 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 ); mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); @@ -154,10 +158,10 @@ void KSyncPrefsDialog::setupSyncAlgTab() topLayout->addMultiCellWidget(iims, iii,iii,0,1); ++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; @@ -166,5 +170,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); //++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); //++iii; @@ -182,19 +186,19 @@ 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 ); //mFilterInAB = new QComboBox( fibo2 ); } #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 ); mFilterInAB = new QComboBox( fibo2 ); @@ -204,15 +208,15 @@ void KSyncPrefsDialog::setupSyncAlgTab() // ++iii; - 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); //++iii; { - 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 ); mFilterOutAB = new QComboBox( fibo ); @@ -222,13 +226,13 @@ void KSyncPrefsDialog::setupSyncAlgTab() //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); //++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 ) ) ); new QLabel( i18n("From ") , gb3 ); - QHBox * tf1 = new QHBox ( gb3 ); + Q3HBox * tf1 = new Q3HBox ( gb3 ); mWriteBackPastWeeks= new QSpinBox(1,104, 1, tf1 ); mWriteBackPastWeeks->setMaximumWidth( 100 ); 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); mWriteBackFutureWeeks->setMaximumWidth( 100 ); @@ -242,5 +246,5 @@ 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; topLayout->addMultiCellWidget(gr, iii,iii,0,1); @@ -256,5 +260,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); - 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); ++iii; @@ -264,10 +268,10 @@ 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); //++iii; 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 ); mPhoneDevice = new QLineEdit( temphb); @@ -276,5 +280,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() - temphb = new QHBox( phoneWidget ); + temphb = new Q3HBox( phoneWidget ); new QLabel( i18n("Connection: "), temphb ); mPhoneConnection = new QLineEdit( temphb); @@ -283,5 +287,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() - temphb = new QHBox( phoneWidget ); + temphb = new Q3HBox( phoneWidget ); new QLabel( i18n("Model(opt.): "), temphb ); mPhoneModel = new QLineEdit( temphb); @@ -290,13 +294,13 @@ 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 ); lab = new QLabel( i18n("Local file Cal:"), temphb ); lab = new QLabel( i18n("Local file ABook:"), temphb ); lab = new QLabel( i18n("Local file PWMgr:"), temphb ); - temphb = new QHBox( localFileWidget ); + temphb = new Q3HBox( localFileWidget ); button = new QPushButton( i18n("Choose..."), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); @@ -305,5 +309,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() button = new QPushButton( i18n("Choose..."), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); - temphb = new QHBox( localFileWidget ); + temphb = new Q3HBox( localFileWidget ); mRemoteFile = new QLineEdit( temphb); @@ -314,8 +318,8 @@ 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); new QLabel( i18n("AddressBook:"), temphb); @@ -323,5 +327,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); mRemotePrecommand = new QLineEdit(temphb); mRemotePrecommandAB = new QLineEdit(temphb); @@ -329,5 +333,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); mLocalTempFile = new QLineEdit(temphb); mLocalTempFileAB = new QLineEdit(temphb); @@ -335,5 +339,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); - temphb = new QHBox( remoteFileWidget ); + temphb = new Q3HBox( remoteFileWidget ); mRemotePostcommand = new QLineEdit(temphb ); mRemotePostcommandAB = new QLineEdit(temphb ); @@ -341,5 +345,5 @@ void KSyncPrefsDialog::setupSyncAlgTab() mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); 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 ); connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); @@ -349,8 +353,8 @@ 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); new QLabel( i18n("AddressBook:"), temphb); @@ -358,5 +362,5 @@ 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); mRemotePwAB = new QLineEdit(temphb); @@ -364,5 +368,5 @@ 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); mRemoteIPAB = new QLineEdit(temphb); @@ -370,5 +374,5 @@ 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); mRemotePortAB = new QLineEdit(temphb); @@ -376,8 +380,8 @@ 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") ); mResTableKapi->horizontalHeader()->setLabel( 0, i18n("Remote") ); @@ -469,5 +473,5 @@ void KSyncPrefsDialog::slotOK() int i; 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")); return; diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index d8c02de..1d7503e 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h @@ -26,7 +26,7 @@ #include <kdialogbase.h> -#include <qptrlist.h> -#include <qtable.h> -#include <qhbox.h> +#include <q3ptrlist.h> +#include <q3table.h> +#include <q3hbox.h> //#include <libkdepim/kprefsdialog.h> @@ -39,7 +39,7 @@ class QSlider; class KURLRequester; class QComboBox; -class QButtonGroup; +class Q3ButtonGroup; class QLineEdit; -class QVBox; +class Q3VBox; class QStringList; class KSyncProfile; @@ -87,5 +87,5 @@ class KSyncPrefsDialog : public KDialog void updateMyCaption(); int currentSelection; - QPtrList<KSyncProfile> mSyncProfiles; + Q3PtrList<KSyncProfile> mSyncProfiles; QStringList mSyncProfileNames; QStringList mFilterKapi; @@ -106,9 +106,9 @@ class KSyncPrefsDialog : public KDialog void insertProfiles(); void saveProfile(); - QButtonGroup* proGr; - QHBox * mTableBox; - QTable* mResTableKopi; - QTable* mResTableKapi; - QTable* mResTablePwmpi; + Q3ButtonGroup* proGr; + Q3HBox * mTableBox; + Q3Table* mResTableKopi; + Q3Table* mResTableKapi; + Q3Table* mResTablePwmpi; QComboBox * mFilterOutCal; @@ -153,8 +153,8 @@ class KSyncPrefsDialog : public KDialog QWidget* mSetupSyncAlgTab; - QVBox* localFileWidget; - QVBox* remoteFileWidget; - QVBox* phoneWidget; - QVBox* piWidget; + Q3VBox* localFileWidget; + Q3VBox* remoteFileWidget; + Q3VBox* phoneWidget; + Q3VBox* piWidget; QCheckBox* mWriteBackFile; QCheckBox* mWriteBackFuture; diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index 91fcfc5..1e41662 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h @@ -21,5 +21,5 @@ #define _KSYNCPROFILE_H -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qcolor.h> #include <qfont.h> diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro index 7160d0e..fb27311 100644 --- a/libkdepim/libkdepim.pro +++ b/libkdepim/libkdepim.pro @@ -2,5 +2,5 @@ TEMPLATE = lib CONFIG = qt warn_on DEFINES +=KORG_NOKABC -TARGET = microkdepim +TARGET = xmicrokdepim INCLUDEPATH += ../microkde ../microkde/kdecore ../microkde/kdeui . .. DESTDIR=../bin @@ -75,2 +75,4 @@ 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 @@ -1,8 +1,8 @@ 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 OBJECTS_DIR = obj/$(PLATFORM) diff --git a/libkdepim/ol_access.cpp b/libkdepim/ol_access.cpp index 1b05693..821f148 100755 --- a/libkdepim/ol_access.cpp +++ b/libkdepim/ol_access.cpp @@ -23,10 +23,10 @@ #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> #include <qdir.h> @@ -34,8 +34,8 @@ #include <qregexp.h> #include <qapplication.h> -#include <qhbox.h> -#include <qheader.h> +#include <q3hbox.h> +#include <q3header.h> #include <qdatetime.h> -#include <qlistview.h> +#include <q3listview.h> #include <kdebug.h> @@ -55,11 +55,11 @@ -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() {}; void setData( DWORD data ) {mData= data; }; @@ -79,13 +79,13 @@ class OLEFolderSelect : public KDialogBase 0, "", true, false, i18n("Import!") ) { - 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")); mListView->addColumn(i18n("Content Type")); } - QListView* listView() { return mListView;} + Q3ListView* listView() { return mListView;} private: - QListView* mListView; + Q3ListView* mListView; }; @@ -150,5 +150,5 @@ void OL_access::readContactData( LPDISPATCH dispItem, KABC::Addressee::List* li cap = i18n("Reading contact data..."); } - QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 ); + Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(), 0 ); bar.setCaption (i18n("Accessing OL") ); int h = bar.sizeHint().height() ; @@ -174,5 +174,5 @@ QStringList OL_access::getFolderSelection( int type , QString caption ) { OLEFolderSelect folder_dialog; - QListView * listView = folder_dialog.listView(); + Q3ListView * listView = folder_dialog.listView(); MAPIFolder mfInbox; MAPIFolder mfRoot; @@ -1136,11 +1136,11 @@ 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() {}; void setData( DWORD data ) {mData= data; }; @@ -1160,7 +1160,7 @@ 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")); mListView->addColumn(i18n("Content Type")); @@ -1304,5 +1304,5 @@ void KAImportOLdialog::readContactData( DWORD folder ) cap = i18n("Reading contact data..."); } - QProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this); + Q3ProgressDialog bar( cap,i18n("Abort"), folderItems.GetCount(),this); bar.setCaption (i18n("Accessing OL") ); int h = bar.sizeHint().height() ; 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 @@ -38,5 +38,5 @@ class QDateTime; -class QListView; +class Q3ListView; class OLEListViewItem; class _ContactItem; @@ -133,5 +133,5 @@ class KAImportOLdialog : public KDialogBase KABC::AddressBook * mABook; - QListView * mListView; + Q3ListView * mListView; KABC::Addressee::List mAList; bool addAddressee( KABC::Addressee a ); diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp index 89db22b..0ea73f5 100644 --- a/libkdepim/phoneaccess.cpp +++ b/libkdepim/phoneaccess.cpp @@ -23,9 +23,10 @@ #include <qstring.h> #include <qapplication.h> -#include <qptrlist.h> +#include <QDesktopWidget> +#include <q3ptrlist.h> #include <qregexp.h> #include <qfile.h> #include <qlabel.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qdir.h> @@ -47,10 +48,12 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model QFile file( fileName ); if ( QFile::exists( fileName) ) { - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { qDebug("Error: cannot open %s ", fileName.latin1() ); return; } QString line; - while ( file.readLine( line, 1024 ) > 0 ) { + char tmp[1024]; + while ( file.readLine( tmp, 1024 ) > 0 ) { + line = tmp; //qDebug("*%s* ", line.latin1() ); if ( line.left(7 ) == "[gammu]" ) { @@ -116,10 +119,10 @@ 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() ); return; } qDebug("Writing file %s ", fileName.latin1() ); - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts << content ; file.close(); diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp index 72c4e60..4172cd0 100644 --- a/microkde/KDGanttMinimizeSplitter.cpp +++ b/microkde/KDGanttMinimizeSplitter.cpp @@ -39,19 +39,28 @@ #include "qbitmap.h" #if QT_VERSION >= 0x030000 -#include "qptrlist.h" -#include "qmemarray.h" +#include "q3ptrlist.h" +#include "q3memarray.h" #else #include <qlist.h> #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 //#include "KDGanttMinimizeSplitter.moc" @@ -66,8 +75,8 @@ static int mouseOffset; static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky -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 ) {;} protected: @@ -81,7 +90,8 @@ protected: 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 ) { mSizeHint = QSize(7,7); @@ -107,8 +117,8 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) orient = 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 } @@ -118,5 +128,5 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) { updateCursor( e->pos() ); - if ( !(e->state()&LeftButton) ) + if ( !(e->state()&Qt::LeftButton) ) return; @@ -138,5 +148,5 @@ void KDGanttSplitterHandle::mouseMoveEvent( QMouseEvent *e ) void KDGanttSplitterHandle::mousePressEvent( QMouseEvent *e ) { - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { _activeButton = onButton( e->pos() ); mouseOffset = s->pick(e->pos()); @@ -150,11 +160,11 @@ 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 ); } } @@ -196,5 +206,5 @@ 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())) - mouseOffset; @@ -212,8 +222,8 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e ) 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(); rect.setLeft( rect.left()- add ); @@ -230,7 +240,7 @@ int KDGanttSplitterHandle::onButton( const QPoint& p ) -QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() +Q3ValueList<Q3PointArray> KDGanttSplitterHandle::buttonRegions() { - QValueList<QPointArray> list; + Q3ValueList<Q3PointArray> list; int sw = 8; @@ -239,5 +249,5 @@ QValueList<QPointArray> KDGanttSplitterHandle::buttonRegions() int voffset[] = { (int) -sw*3, (int) sw*3 }; for ( int i = 0; i < 2; i++ ) { - QPointArray arr; + Q3PointArray arr; if ( !_collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Right || _collapsed && s->minimizeDirection() == KDGanttMinimizeSplitter::Left) { @@ -312,9 +322,9 @@ void KDGanttSplitterHandle::paintEvent( QPaintEvent * ) p.setPen( col ); - QValueList<QPointArray> list = buttonRegions(); + Q3ValueList<Q3PointArray> list = buttonRegions(); int index = 1; if ( mUseOffset ) 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 ) { @@ -378,10 +388,10 @@ public: QSplitterData() : opaque( FALSE ), firstShow( TRUE ) {} - QPtrList<QSplitterLayoutStruct> list; + Q3PtrList<QSplitterLayoutStruct> list; bool opaque; bool firstShow; }; -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 ); #endif // DOXYGEN_SKIP_INTERNAL @@ -462,10 +472,11 @@ 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; mFirstHandle = 0; #if QT_VERSION >= 232 - orient = Horizontal; + orient = Qt::Horizontal; init(); #endif @@ -476,8 +487,8 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n and \a name arguments being passed on to the QFrame constructor. */ -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; mFirstHandle = 0; @@ -506,5 +517,5 @@ void KDGanttMinimizeSplitter::init() { data = new QSplitterData; - if ( orient == Horizontal ) + if ( orient == Qt::Horizontal ) setSizePolicy( QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum) ); else @@ -535,5 +546,5 @@ void KDGanttMinimizeSplitter::toggle() The possible orientations are Qt:Vertical and Qt::Horizontal (the default). */ -void KDGanttMinimizeSplitter::setOrientation( Orientation o ) +void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o ) { #if QT_VERSION >= 232 @@ -542,5 +553,5 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o ) orient = o; - if ( orient == Horizontal ) + if ( orient == Qt::Horizontal ) setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); else @@ -587,6 +598,6 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs tmp += w->name(); newHandle = new KDGanttSplitterHandle( orientation(), this, tmp.latin1() ); - if ( ! mFirstHandle ) - mFirstHandle = newHandle; + if ( ! mFirstHandle ) + mFirstHandle = newHandle; s->wid = newHandle; newHandle->setId(data->list.count()); @@ -601,5 +612,5 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs s->mode = Stretch; s->wid = w; - if ( !testWState( WState_Resized ) && w->sizeHint().isValid() ) + if ( !testAttribute( Qt::WA_Resized ) && w->sizeHint().isValid() ) s->sizer = pick( w->sizeHint() ); else @@ -622,18 +633,24 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( QWidget *w, bool firs void KDGanttMinimizeSplitter::childEvent( QChildEvent *c ) { - if ( c->type() == QEvent::ChildInserted ) { + if ( c->type() == QEvent::ChildAdded ) { if ( !c->child()->isWidgetType() ) return; - 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; QSplitterLayoutStruct *s = data->list.first(); while ( s ) { - if ( s->wid == c->child() ) + if ( s->wid == cw ) return; s = data->list.next(); } - addWidget( (QWidget*)c->child() ); + addWidget( cw ); recalc( isVisible() ); @@ -671,15 +688,15 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) #ifdef DESKTOP_VERSION 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(); const int rBord = 3; //Themable???? #if QT_VERSION >= 0x030000 - int sw = style().pixelMetric(QStyle::PM_SplitterWidth, this); + int sw = style()->pixelMetric(QStyle::PM_SplitterWidth, 0, this); #else int sw = style().splitterWidth(); #endif - if ( orient == Horizontal ) { + if ( orient == Qt::Horizontal ) { if ( opaqueOldPos >= 0 ) paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), @@ -697,5 +714,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) #else 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 ); //mRubberBand->setPalette( QPalette ( Qt::red.light(),Qt::red.dark() ) ); @@ -711,5 +728,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) } int sw = style().splitterWidth(); - if ( orient == Horizontal ) { + if ( orient == Qt::Horizontal ) { if ( p >= 0 ) { QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y())); @@ -733,5 +750,5 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) 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() ); if ( e->type() == QEvent::Show ) @@ -756,5 +773,5 @@ void KDGanttMinimizeSplitter::drawSplitter( QPainter *p, style().drawPrimitive(QStyle::PE_Splitter, p, QRect(x, y, w, h), colorGroup(), (orientation() == Qt::Horizontal ? - QStyle::Style_Horizontal : 0)); + QStyle::State_Horizontal : 0)); #endif } @@ -797,7 +814,7 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id ) p = adjustPos( p, 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(); upLeft = p > oldP; @@ -814,6 +831,6 @@ void KDGanttMinimizeSplitter::moveSplitter( QCOORD p, int id ) 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; w->setGeometry( p, contentsRect().y(), s, contentsRect().height() ); @@ -841,5 +858,5 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) int pos1, pos2; int dd = s->sizer; - if( false && orient == Horizontal ) { + if( false && orient == Qt::Horizontal ) { pos1 = pos; pos2 = pos + dd; @@ -857,5 +874,5 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) } else { int dd, newLeft, nextPos; - if( false && orient == Horizontal ) { + if( false && orient == Qt::Horizontal ) { dd = w->geometry().right() - pos; dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); @@ -894,5 +911,5 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) int dd = s->sizer; int pos1, pos2; - if( false && orient == Horizontal ) { + if( false && orient == Qt::Horizontal ) { pos2 = pos - dd; pos1 = pos2 + 1; @@ -911,5 +928,5 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) int left = pick( w->pos() ); int right, dd,/* newRight,*/ newLeft, nextPos; - if ( false && orient == Horizontal ) { + if ( false && orient == Qt::Horizontal ) { dd = pos - left + 1; dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); @@ -989,7 +1006,7 @@ 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 int splitterWidth = style().splitterWidth(); @@ -1031,5 +1048,5 @@ void KDGanttMinimizeSplitter::doResize() int i; int n = data->list.count(); - QMemArray<QLayoutStruct> a( n ); + Q3MemArray<QLayoutStruct> a( n ); for ( i = 0; i< n; i++ ) { a[i].init(); @@ -1133,5 +1150,5 @@ void KDGanttMinimizeSplitter::recalc( bool update ) maxt = mint; - if ( orient == Horizontal ) { + if ( orient == Qt::Horizontal ) { setMaximumSize( maxl, maxt ); setMinimumSize( minl, mint ); @@ -1268,11 +1285,8 @@ QSize KDGanttMinimizeSplitter::sizeHint() const int l = 0; 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() && !((QWidget*)o)->isHidden() ) { @@ -1285,5 +1299,5 @@ QSize KDGanttMinimizeSplitter::sizeHint() const } } - return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); + return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l ); } @@ -1298,11 +1312,8 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const int l = 0; 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() && !((QWidget*)o)->isHidden() ) { @@ -1315,5 +1326,5 @@ QSize KDGanttMinimizeSplitter::minimumSizeHint() const } } - return orientation() == Horizontal ? QSize( l, t ) : QSize( t, l ); + return orientation() == Qt::Horizontal ? QSize( l, t ) : QSize( t, l ); } @@ -1403,11 +1414,12 @@ bool KDGanttMinimizeSplitter::isHidden( QWidget *w ) const */ -QValueList<int> KDGanttMinimizeSplitter::sizes() const +Q3ValueList<int> KDGanttMinimizeSplitter::sizes() const { + /* TODO: hacker if ( !testWState(WState_Polished) ) { QWidget* that = (QWidget*) this; that->polish(); - } - QValueList<int> list; + } */ + Q3ValueList<int> list; QSplitterLayoutStruct *s = data->list.first(); while ( s ) { @@ -1434,8 +1446,8 @@ 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(); while ( s && it != list.end() ) { @@ -1457,5 +1469,5 @@ void KDGanttMinimizeSplitter::setSizes( QValueList<int> list ) void KDGanttMinimizeSplitter::processChildEvents() { - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + QApplication::sendPostedEvents( this, QEvent::ChildAdded ); } @@ -1469,5 +1481,5 @@ 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 int sw = style().splitterWidth(); @@ -1480,5 +1492,5 @@ void KDGanttMinimizeSplitter::styleChange( QStyle& old ) } doResize(); - QFrame::styleChange( old ); + Q3Frame::styleChange( old ); } @@ -1513,5 +1525,5 @@ static inline int fRound( int i ) { return ( i % 256 < 128 ) ? i / 256 : 1 + i / 256; } -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,2 +1,9 @@ +//Added by qt3to4: +#include <Q3PointArray> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QChildEvent> +#include <QMouseEvent> +#include <QEvent> /* -*- Mode: C++ -*- $Id$ @@ -36,6 +43,6 @@ #ifndef QT_H -#include "qframe.h" -#include "qvaluelist.h" +#include "q3frame.h" +#include "q3valuelist.h" #endif // QT_H @@ -45,5 +52,5 @@ class QSplitterLayoutStruct; class KDGanttSplitterHandle; class KDRubberBand; -class KDGanttMinimizeSplitter : public QFrame +class KDGanttMinimizeSplitter : public Q3Frame { Q_OBJECT @@ -57,9 +64,9 @@ 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; } void setMinimizeDirection( Direction ); @@ -78,6 +85,6 @@ public: QSize minimumSizeHint() const; - QValueList<int> sizes() const; - void setSizes( QValueList<int> ); + Q3ValueList<int> sizes() const; + void setSizes( Q3ValueList<int> ); KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} void expandPos( int id, int* min, int* max ); @@ -115,12 +122,12 @@ 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; QSplitterData *data; @@ -128,5 +135,5 @@ private: private: - Orientation orient; + Qt::Orientation orient; Direction _direction; #ifndef DOXYGEN_SKIP_INTERNAL @@ -164,5 +171,5 @@ public: protected: - QValueList<QPointArray> buttonRegions(); + Q3ValueList<Q3PointArray> buttonRegions(); void paintEvent( QPaintEvent * ); void mouseMoveEvent( QMouseEvent * ); diff --git a/microkde/fncolordialog.h b/microkde/fncolordialog.h index 615d2ed..52356be 100755 --- a/microkde/fncolordialog.h +++ b/microkde/fncolordialog.h @@ -36,10 +36,10 @@ // FNPaletteBase
//-----------------------------------------------------------------------------
-class Q_EXPORT FNPaletteBase : public QWidget
+class /* Q_EXPORT */ FNPaletteBase : public QWidget
{
Q_OBJECT
public:
- FNPaletteBase(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+ FNPaletteBase(QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0);
@@ -79,9 +79,9 @@ signals: // FNColorPalette
//-----------------------------------------------------------------------------
-class Q_EXPORT FNColorPalette : public FNPaletteBase
+class /* Q_EXPORT */ FNColorPalette : public FNPaletteBase
{
Q_OBJECT
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();
};
@@ -93,9 +93,9 @@ public: // FNHSVPalette
//-----------------------------------------------------------------------------
-class Q_EXPORT FNHSVPalette : public FNPaletteBase
+class /*Q_EXPORT */ FNHSVPalette : public FNPaletteBase
{
Q_OBJECT
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();
public slots:
@@ -112,9 +112,9 @@ protected: // FNColorDialog
//-----------------------------------------------------------------------------
-class Q_EXPORT FNColorDialog : public QDialog
+class /*Q_EXPORT */FNColorDialog : public QDialog
{
Q_OBJECT
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();
void setColor(QColor c);
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index d7c12bb..b058d54 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -7,9 +7,12 @@ #include <qstring.h> #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> int KApplication::random() @@ -76,8 +79,8 @@ void KApplication::showFile(QString caption, QString fn) #endif QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); text = ts.read(); file.close(); @@ -90,17 +93,17 @@ bool KApplication::convert2latin1(QString fileName) QString text; QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } - 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(); file.close(); @@ -113,9 +116,9 @@ void KApplication::showText(QString caption, QString text) QDialog dia( 0, "name", true ); ; dia.setCaption( caption ); - QVBoxLayout* lay = new QVBoxLayout( &dia ); + Q3VBoxLayout* lay = new Q3VBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); KTextEdit tb ( &dia ); - tb.setWordWrap( QMultiLineEdit::WidgetWidth ); + tb.setWordWrap( Q3MultiLineEdit::WidgetWidth ); lay->addWidget( &tb ); tb.setText( text ); @@ -134,5 +137,5 @@ void KApplication::showText(QString caption, QString text) #include <qdir.h> #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include "kglobal.h" #include "klocale.h" @@ -145,10 +148,10 @@ class KBackupPrefs : public QDialog { setCaption( i18n("Backup Failed!") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( message, this ); 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 ); format->setExclusive ( true ) ; diff --git a/microkde/kcolorbutton.cpp b/microkde/kcolorbutton.cpp index 197bea2..16618fc 100644 --- a/microkde/kcolorbutton.cpp +++ b/microkde/kcolorbutton.cpp @@ -2,4 +2,5 @@ #include "kcolordialog.h" #include "qapplication.h" +#include <QDesktopWidget> @@ -7,4 +8,6 @@ #ifdef DESKTOP_VERSION #include <qcolordialog.h> +//Added by qt3to4: +#include <QPixmap> #endif void KColorButton:: edit() diff --git a/microkde/kconfig.cpp b/microkde/kconfig.cpp index 940196e..12063ca 100644 --- a/microkde/kconfig.cpp +++ b/microkde/kconfig.cpp @@ -1,5 +1,7 @@ #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> #include "kdebug.h" @@ -54,9 +56,9 @@ QString KConfig::group() const { //US added method -QValueList<int> KConfig::readIntListEntry( const QString & key) +Q3ValueList<int> KConfig::readIntListEntry( const QString & key) { // qDebug("KConfig::readIntListEntry key=%s:", key.latin1()); - QValueList<int> result; + Q3ValueList<int> result; QMap<QString,QString>::ConstIterator mit = mStringMap.find( mGroup + key ); @@ -112,5 +114,5 @@ QString KConfig::readEntry( const QString &key, const QString &def ) QSize KConfig::readSizeEntry( const QString &key, QSize* def ) { - QValueList<int> intlist = readIntListEntry(key); + Q3ValueList<int> intlist = readIntListEntry(key); if (intlist.count() < 2) @@ -195,9 +197,9 @@ 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) { QStringList valuesAsStrings; - QValueList<int>::ConstIterator it; + Q3ValueList<int>::ConstIterator it; for( it = value.begin(); it != value.end(); ++it ) @@ -247,5 +249,5 @@ void KConfig::writeEntry( const QString & e, const QColor & c ) void KConfig::writeEntry( const QString & e, const QSize & s ) { - QValueList<int> intlist; + Q3ValueList<int> intlist; intlist << s.width() << s.height(); writeEntry( e, intlist ); @@ -272,5 +274,5 @@ 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() ); return; @@ -280,10 +282,10 @@ void KConfig::load() mStringMap.clear(); - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); + Q3TextStream t( &f ); + t.setEncoding( Q3TextStream::Latin1 ); QString line = t.readLine(); while ( !line.isNull() ) { - QStringList tokens = QStringList::split( ",", line ); + QStringList tokens = line.split(','); if ( tokens[0] == "bool" ) { bool value = false; @@ -324,5 +326,5 @@ void KConfig::sync() QFile f( mFileName ); - if ( !f.open( IO_WriteOnly ) ) { + if ( !f.open( QIODevice::WriteOnly ) ) { qDebug("KConfig::sync() Can't open file %s ",mFileName.latin1() ); @@ -331,6 +333,6 @@ void KConfig::sync() } - QTextStream t( &f ); - t.setEncoding( QTextStream::Latin1 ); + Q3TextStream t( &f ); + t.setEncoding( Q3TextStream::Latin1 ); QMap<QString,bool>::ConstIterator itBool; for( itBool = mBoolMap.begin(); itBool != mBoolMap.end(); ++itBool ) { diff --git a/microkde/kconfig.h b/microkde/kconfig.h index 1a1038f..7b91e44 100644 --- a/microkde/kconfig.h +++ b/microkde/kconfig.h @@ -4,5 +4,5 @@ #include <qstring.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qcolor.h> #include <qfont.h> @@ -58,5 +58,5 @@ class KConfig //US added method readIntListEntry - QValueList<int> readIntListEntry( const QString &); + Q3ValueList<int> readIntListEntry( const QString &); int readNumEntry( const QString &, int def=0 ); @@ -70,5 +70,5 @@ class KConfig bool hasKey( const QString &); - void writeEntry( const QString &, const QValueList<int>& ); + void writeEntry( const QString &, const Q3ValueList<int>& ); void writeEntry( const QString &, int ); void writeEntry( const QString &key , unsigned int value) { writeEntry( key, int( value ) ); } diff --git a/microkde/kdatepickernew.cpp b/microkde/kdatepickernew.cpp index f60a422..8f8001e 100644 --- a/microkde/kdatepickernew.cpp +++ b/microkde/kdatepickernew.cpp @@ -314,5 +314,5 @@ KDatePicker::selectMonthClicked() int i, month, months = calendar->monthsInYear(date); - QPopupMenu popup(selectMonth); + Q3PopupMenu popup(selectMonth); for (i = 1; i <= months; i++) diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 353f78d..10dc449 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp @@ -45,4 +45,12 @@ #include <qpainter.h> #include <qdialog.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QFocusEvent> +#include <Q3Frame> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QEvent> #include <assert.h> #include <qapplication.h> @@ -70,5 +78,5 @@ KDateValidator::date(const QString& text, QDate& d) const return Acceptable; } else - return Valid; + return QValidator::Intermediate; } @@ -79,6 +87,6 @@ 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) { setFont( KGlobalSettings::generalFont() ); @@ -87,5 +95,5 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) date_=QDate::currentDate(); } - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( Qt::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week @@ -94,5 +102,5 @@ KDateTable::KDateTable(QWidget *parent, QDate date_, const char* name, WFlags f) viewport()->setBackgroundColor(QColor(220,245,255)); #if 0 - viewport()->setEraseColor(lightGray); + viewport()->setEraseColor(Qt::lightGray); #endif mMarkCurrent = false; @@ -109,5 +117,5 @@ KDateTable::paintCell(QPainter *painter, int row, int col) int h=cellHeight(); int pos; - QBrush brushBlue(blue); + QBrush brushBlue(Qt::blue); QBrush brushLightblue(QColor(220,245,255)); QFont _font=font(); @@ -134,16 +142,15 @@ KDateTable::paintCell(QPainter *painter, int row, int col) painter->setBrush(brushLightblue); 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: } else { @@ -162,8 +169,8 @@ KDateTable::paintCell(QPainter *painter, int row, int col) text.setNum(pos-firstday-numdays+1); } - 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); } @@ -172,21 +179,21 @@ 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); } } else { if(mMarkCurrent && firstday+QDate::currentDate().day()-1==pos) { - painter->setPen(green); - painter->setBrush(darkGreen); - pen=white; + painter->setPen(Qt::green); + painter->setBrush(Qt::darkGreen); + pen=QColor(Qt::white); } else { painter->setBrush(QColor(220,245,255)); @@ -196,5 +203,5 @@ KDateTable::paintCell(QPainter *painter, int row, int col) painter->drawRect(0, 0, w, h); painter->setPen(pen); - painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect); + painter->drawText(0, 0, w, h, Qt::AlignCenter, text, -1, &rect); } /* @@ -275,5 +282,5 @@ void KDateTable::viewportResizeEvent(QResizeEvent * e) { - QGridView::viewportResizeEvent(e); + Q3GridView::viewportResizeEvent(e); setCellWidth(viewport()->width()/7); @@ -410,5 +417,5 @@ void KDateTable::focusInEvent( QFocusEvent *e ) { repaintContents(false); - QGridView::focusInEvent( e ); + Q3GridView::focusInEvent( e ); } @@ -416,5 +423,5 @@ void KDateTable::focusOutEvent( QFocusEvent *e ) { repaintContents(false); - QGridView::focusOutEvent( e ); + Q3GridView::focusOutEvent( e ); } @@ -433,5 +440,5 @@ KDateTable::sizeHint() const KDateInternalMonthPicker::KDateInternalMonthPicker (QWidget* parent, const char* name) - : QGridView(parent, name), + : Q3GridView(parent, name), result(0) // invalid { @@ -452,5 +459,5 @@ KDateInternalMonthPicker::KDateInternalMonthPicker setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); setNumRows(4); setNumCols(3); @@ -458,5 +465,5 @@ KDateInternalMonthPicker::KDateInternalMonthPicker // setTableFlags(Tbl_clipCellPainting); #if 0 - viewport()->setEraseColor(lightGray); // for consistency with the datepicker + viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker #endif // ----- find the preferred size @@ -488,5 +495,5 @@ void KDateInternalMonthPicker::setupPainter(QPainter *p) { - p->setPen(black); + p->setPen(Qt::black); } @@ -506,5 +513,5 @@ KDateInternalMonthPicker::paintCell(QPainter* painter, int row, int col) index=3*row+col+1; 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 ) painter->drawRect( 0, 0, cellWidth(), cellHeight() ); @@ -514,5 +521,5 @@ void KDateInternalMonthPicker::contentsMousePressEvent(QMouseEvent *e) { - if(!isEnabled() || e->button() != LeftButton) + if(!isEnabled() || e->button() != Qt::LeftButton) { KNotifyClient::beep(); @@ -541,5 +548,5 @@ void KDateInternalMonthPicker::contentsMouseMoveEvent(QMouseEvent *e) { - if (e->state() & LeftButton) + if (e->state() & Qt::LeftButton) { int row, col; @@ -615,5 +622,5 @@ KDateInternalYearSelector::KDateInternalYearSelector setFont(font); #if 0 - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); #endif // we have to respect the limits of QDate here, I fear: @@ -662,9 +669,9 @@ 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 main(0) { - setFrameStyle(QFrame::Box|QFrame::Raised); + setFrameStyle(Q3Frame::Box|Q3Frame::Raised); setMidLineWidth(2); } @@ -673,5 +680,5 @@ void KPopupFrame::keyPressEvent(QKeyEvent* e) { - if(e->key()==Key_Escape) + if(e->key()==Qt::Key_Escape) { result=0; // rejected @@ -757,5 +764,5 @@ void KDateTable::virtual_hook( int, void* ) KDateInternalWeekPicker::KDateInternalWeekPicker (QWidget* parent, const char* name) - : QGridView(parent, name), + : Q3GridView(parent, name), result(0) // invalid { @@ -774,5 +781,5 @@ KDateInternalWeekPicker::KDateInternalWeekPicker setHScrollBarMode(AlwaysOff); setVScrollBarMode(AlwaysOff); - setFrameStyle(QFrame::NoFrame); + setFrameStyle(Q3Frame::NoFrame); if ( QApplication::desktop()->height() > 240 ) { setNumRows(13); @@ -785,5 +792,5 @@ KDateInternalWeekPicker::KDateInternalWeekPicker // setTableFlags(Tbl_clipCellPainting); #if 0 - viewport()->setEraseColor(lightGray); // for consistency with the datepicker + viewport()->setEraseColor(Qt::lightGray); // for consistency with the datepicker #endif // ----- find the preferred size @@ -819,5 +826,5 @@ void KDateInternalWeekPicker::setupPainter(QPainter *p) { - p->setPen(black); + p->setPen(Qt::black); } @@ -837,5 +844,5 @@ KDateInternalWeekPicker::paintCell(QPainter* painter, int row, int col) index=numCols()*row+col+1; 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 ) painter->drawRect( 0, 0, cellWidth(), cellHeight() ); @@ -845,5 +852,5 @@ void KDateInternalWeekPicker::contentsMousePressEvent(QMouseEvent *e) { - if(!isEnabled() || e->button() != LeftButton) + if(!isEnabled() || e->button() != Qt::LeftButton) { KNotifyClient::beep(); @@ -872,5 +879,5 @@ void KDateInternalWeekPicker::contentsMouseMoveEvent(QMouseEvent *e) { - if (e->state() & LeftButton) + if (e->state() & Qt::LeftButton) { int row, col; diff --git a/microkde/kdatetbl.h b/microkde/kdatetbl.h index 87808df..2d3d2cf 100644 --- a/microkde/kdatetbl.h +++ b/microkde/kdatetbl.h @@ -22,7 +22,13 @@ #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> /** @@ -32,5 +38,5 @@ * @author Tim Gilman, Mirko Boehm */ -class KDateInternalMonthPicker : public QGridView +class KDateInternalMonthPicker : public Q3GridView { Q_OBJECT @@ -128,5 +134,5 @@ private: * @version $Id$ */ -class KPopupFrame : public QFrame +class KPopupFrame : public Q3Frame { Q_OBJECT @@ -183,5 +189,5 @@ public: private: - virtual bool close(bool alsoDelete) { return QFrame::close(alsoDelete); } + virtual bool close(bool alsoDelete) { return Q3Frame::close(alsoDelete); } protected: virtual void virtual_hook( int id, void* data ); @@ -216,5 +222,5 @@ public: * @author Tim Gilman, Mirko Boehm */ -class KDateTable : public QGridView +class KDateTable : public Q3GridView { Q_OBJECT @@ -225,5 +231,5 @@ public: KDateTable(QWidget *parent=0, QDate date=QDate::currentDate(), - const char* name=0, WFlags f=0); + const char* name=0, Qt::WFlags f=0); /** * Returns a recommended size for the widget. @@ -308,5 +314,5 @@ private: #endif // KDATETBL_H -class KDateInternalWeekPicker : public QGridView +class KDateInternalWeekPicker : public Q3GridView { Q_OBJECT diff --git a/microkde/kdebug.h b/microkde/kdebug.h index bb9cfe3..534943c 100644 --- a/microkde/kdebug.h +++ b/microkde/kdebug.h @@ -5,4 +5,6 @@ #include <qstring.h> +//Added by qt3to4: +#include <Q3CString> @@ -65,5 +67,5 @@ class kdbgstream { return *this; } - 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 @@ -21,4 +21,6 @@ #include <qfile.h> +//Added by qt3to4: +#include <Q3CString> #include <kdebug.h> @@ -89,5 +91,5 @@ void KCatalogue::setFileName( const QString & fileName ) doUnload(); - QCString newFileName = QFile::encodeName( fileName ); + Q3CString newFileName = QFile::encodeName( fileName ); if ( !fileName.isEmpty() ) 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 @@ -27,4 +27,6 @@ #include "kconfig.h" +//Added by qt3to4: +#include <Q3CString> /** @@ -83,5 +85,5 @@ public: { _config->setGroup( group ); } - KConfigGroupSaver( KConfig* config, const QCString &group ) + KConfigGroupSaver( KConfig* config, const Q3CString &group ) : _config(config), _oldgroup(config->group()) { _config->setGroup( 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 @@ -21,7 +21,10 @@ #include <qfile.h> #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> #include "kapplication.h" @@ -46,5 +49,5 @@ -template class QAsciiDict<KLibrary>; +template class Q3AsciiDict<KLibrary>; #include <stdlib.h> //getenv @@ -121,5 +124,5 @@ KLibrary::~KLibrary() if ( m_objs.count() > 0 ) { - QPtrListIterator<QObject> it( m_objs ); + Q3PtrListIterator<QObject> it( m_objs ); for ( ; it.current() ; ++it ) { @@ -153,5 +156,5 @@ KLibFactory* KLibrary::factory() return m_factory; - QCString symname; + Q3CString symname; symname.sprintf("init_%s", name().latin1() ); @@ -306,6 +309,6 @@ 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; @@ -349,5 +352,5 @@ KLibLoader::~KLibLoader() // kdDebug(150) << "Deleting KLibLoader " << this << " " << name() << endl; - QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); + Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs ); for (; it.current(); ++it ) { @@ -365,5 +368,5 @@ KLibLoader::~KLibLoader() QString KLibLoader::findLibrary( const char * name/*US , const KInstance * instance*/ ) { - QCString libname( name ); + Q3CString libname( name ); // only append ".la" if there is no extension @@ -422,5 +425,5 @@ QString KLibLoader::findLibrary( const char * name/*US , const KInstance * insta #ifndef NDEBUG 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)); qDebug("KLibLoader::library could not find library: %s", libname.data()); @@ -470,5 +473,5 @@ KLibrary* KLibLoader::library( const char *name ) /* Test if this library was loaded at some time, but got unloaded meanwhile, whithout being dlclose()'ed. */ - QPtrListIterator<KLibWrapPrivate> it(d->loaded_stack); + Q3PtrListIterator<KLibWrapPrivate> it(d->loaded_stack); for (; it.current(); ++it) { if (it.current()->name == name) @@ -551,5 +554,5 @@ void KLibLoader::slotLibraryDestroyed() const KLibrary *lib = static_cast<const KLibrary *>( sender() ); - QAsciiDictIterator<KLibWrapPrivate> it( m_libs ); + Q3AsciiDictIterator<KLibWrapPrivate> it( m_libs ); for (; it.current(); ++it ) if ( it.current()->lib == lib ) @@ -570,5 +573,5 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) /* First delete all KLibrary objects in pending_close, but _don't_ unload the DSO behind it. */ - QPtrListIterator<KLibWrapPrivate> it(d->pending_close); + Q3PtrListIterator<KLibWrapPrivate> it(d->pending_close); for (; it.current(); ++it) { wrap = it.current(); 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 @@ -22,6 +22,6 @@ #include <qstring.h> #include <qstringlist.h> -#include <qasciidict.h> -#include <qptrlist.h> +#include <q3asciidict.h> +#include <q3ptrlist.h> #include <kglobal.h> @@ -53,5 +53,5 @@ class KLibrary : public QObject { friend class KLibLoader; - friend class QAsciiDict<KLibrary>; + friend class Q3AsciiDict<KLibrary>; Q_OBJECT @@ -128,5 +128,5 @@ private: //US void * m_handle; QLibrary* m_handle; - QPtrList<QObject> m_objs; + Q3PtrList<QObject> m_objs; QTimer *m_timer; KLibraryPrivate *d; @@ -288,5 +288,5 @@ private slots: private: void close_pending( KLibWrapPrivate * ); - QAsciiDict<KLibWrapPrivate> m_libs; + Q3AsciiDict<KLibWrapPrivate> m_libs; static KLibLoader* s_self; diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 1d8ae9f..dd310fa 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -1,4 +1,5 @@ #include <qregexp.h> #include <qapplication.h> +#include <QDesktopWidget> #include "kdebug.h" @@ -12,6 +13,6 @@ -QDict<QString> *mLocaleDict = 0; -void setLocaleDict( QDict<QString> * dict ) +Q3Dict<QString> *mLocaleDict = 0; +void setLocaleDict( Q3Dict<QString> * dict ) { mLocaleDict = dict; @@ -46,5 +47,5 @@ void addExist(const char *text,QString trans ) #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #endif @@ -54,8 +55,8 @@ void dumpMissing() QString fileName = "/tmp/usernewtrans.txt"; 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") ); @@ -71,8 +72,8 @@ void dumpMissing() QString fileName = "/tmp/usertrans.txt"; 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") ); @@ -468,5 +469,5 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime, else if ( intIntDateFormat == Format1 ) format = "%1 %2"; - else if ( intIntDateFormat == ISODate ) + else if ( intIntDateFormat == Qt::ISODate ) format = "%1T%2"; @@ -528,5 +529,5 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con c = fmt.at(fmtpos++); - switch (c) + switch (c.unicode()) { case 'a': @@ -639,5 +640,5 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const c = Format.at(Formatpos++); - switch (c) + switch (c.unicode()) { case 'p': @@ -735,5 +736,5 @@ 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); QDateTime m_dt; 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 @@ -5,5 +5,5 @@ #include <qstringlist.h> #include <qdatetime.h> -#include <qdict.h> +#include <q3dict.h> #ifndef I18N_NOOP @@ -12,5 +12,5 @@ class KCalendarSystem; -void setLocaleDict( QDict<QString> * dict ); +void setLocaleDict( Q3Dict<QString> * dict ); QString i18n(const char *text); QString i18n(const char *hint, 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 @@ -40,4 +40,6 @@ #include <kdebug.h> #include "kmdcodec.h" +//Added by qt3to4: +#include <Q3CString> #define KMD5_S11 7 @@ -148,12 +150,12 @@ 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) { QByteArray out; 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) { if (str.isEmpty()) @@ -281,12 +283,12 @@ void KCodecs::quotedPrintableEncode(const QByteArray& in, QByteArray& out, bool } -QCString KCodecs::quotedPrintableDecode(const QByteArray & in) +Q3CString KCodecs::quotedPrintableDecode(const QByteArray & in) { QByteArray out; 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) { if (str.isEmpty()) @@ -356,5 +358,5 @@ void KCodecs::quotedPrintableDecode(const QByteArray& in, QByteArray& out) } -QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) +Q3CString KCodecs::base64Encode( const Q3CString& str, bool insertLFs ) { if ( str.isEmpty() ) @@ -366,9 +368,9 @@ QCString KCodecs::base64Encode( const QCString& str, bool insertLFs ) } -QCString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) +Q3CString KCodecs::base64Encode( const QByteArray& in, bool insertLFs ) { QByteArray out; base64Encode( in, out, insertLFs ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -406,13 +408,13 @@ 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; } @@ -422,16 +424,16 @@ 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]; } else { - out.at(didx++) = Base64EncMap[(data[sidx] << 4) & 077]; + out[didx++] = Base64EncMap[(data[sidx] << 4) & 077]; } } @@ -439,11 +441,8 @@ void KCodecs::base64Encode( const QByteArray& in, QByteArray& out, // Add padding while (didx < out.size()) - { - out.at(didx) = '='; - didx++; - } + out[didx++] = '='; } -QCString KCodecs::base64Decode( const QCString& str ) +Q3CString KCodecs::base64Decode( const Q3CString& str ) { if ( str.isEmpty() ) @@ -455,9 +454,9 @@ QCString KCodecs::base64Decode( const QCString& str ) } -QCString KCodecs::base64Decode( const QByteArray& in ) +Q3CString KCodecs::base64Decode( const QByteArray& in ) { QByteArray out; base64Decode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -506,5 +505,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) (ch > 96 && ch < 123) || ch == '+' || ch == '/' || ch == '=') { - out.at(outIdx++) = Base64DecMap[ch]; + out[outIdx++] = Base64DecMap[ch]; } else @@ -524,7 +523,7 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) while (didx < len-2) { - 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; didx += 3; @@ -533,8 +532,8 @@ 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)); // Resize the output buffer @@ -543,5 +542,5 @@ void KCodecs::base64Decode( const QByteArray& in, QByteArray& out ) } -QCString KCodecs::uuencode( const QCString& str ) +Q3CString KCodecs::uuencode( const Q3CString& str ) { if ( str.isEmpty() ) @@ -554,9 +553,9 @@ QCString KCodecs::uuencode( const QCString& str ) } -QCString KCodecs::uuencode( const QByteArray& in ) +Q3CString KCodecs::uuencode( const QByteArray& in ) { QByteArray out; uuencode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -581,20 +580,20 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) { // line length - out.at(didx++) = UUEncMap[line_len]; + out[didx++] = UUEncMap[line_len]; // 3-byte to 4-byte conversion + 0-63 to ascii printable conversion for (unsigned int end = sidx+line_len; sidx < end; sidx += 3) { - 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]; } // line terminator //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); didx += nl_len; @@ -602,14 +601,14 @@ 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 while (sidx+2 < len) { - 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; } @@ -617,16 +616,16 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) if (sidx < len-1) { - 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]; } else if (sidx < len) { - 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]; } @@ -640,5 +639,5 @@ void KCodecs::uuencode( const QByteArray& in, QByteArray& out ) } -QCString KCodecs::uudecode( const QCString& str ) +Q3CString KCodecs::uudecode( const Q3CString& str ) { if ( str.isEmpty() ) @@ -651,9 +650,9 @@ QCString KCodecs::uudecode( const QCString& str ) } -QCString KCodecs::uudecode( const QByteArray& in ) +Q3CString KCodecs::uudecode( const QByteArray& in ) { QByteArray out; uudecode( in, out ); - return QCString( out.data(), out.size()+1 ); + return Q3CString( out.data(), out.size()+1 ); } @@ -706,7 +705,7 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) C = UUDecMap[(unsigned char) data[sidx+2]]; 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; } @@ -717,5 +716,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) A = UUDecMap[(unsigned char) data[sidx]]; B = UUDecMap[(unsigned char) data[sidx+1]]; - out.at(didx++) = ( ((A << 2) & 255) | ((B >> 4) & 003) ); + out[didx++] = ( ((A << 2) & 255) | ((B >> 4) & 003) ); } @@ -724,5 +723,5 @@ void KCodecs::uudecode( const QByteArray& in, QByteArray& out ) B = UUDecMap[(unsigned char) data[sidx+1]]; C = UUDecMap[(unsigned char) data[sidx+2]]; - out.at(didx++) = ( ((B << 4) & 255) | ((C >> 2) & 017) ); + out[didx++] = ( ((B << 4) & 255) | ((C >> 2) & 017) ); } @@ -762,5 +761,5 @@ KMD5::KMD5(const QByteArray& in) } -KMD5::KMD5(const QCString& in) +KMD5::KMD5(const Q3CString& in) { init(); @@ -773,5 +772,5 @@ void KMD5::update(const QByteArray& in) } -void KMD5::update(const QCString& in) +void KMD5::update(const Q3CString& in) { update(in.data(), int(in.length())); @@ -874,5 +873,5 @@ bool KMD5::verify( const KMD5::Digest& digest) } -bool KMD5::verify( const QCString& hexdigest) +bool KMD5::verify( const Q3CString& hexdigest) { finalize(); @@ -893,7 +892,7 @@ void KMD5::rawDigest( KMD5::Digest& bin ) -QCString KMD5::hexDigest() +Q3CString KMD5::hexDigest() { - QCString s(33); + Q3CString s(33); finalize(); @@ -906,5 +905,5 @@ QCString KMD5::hexDigest() } -void KMD5::hexDigest(QCString& s) +void KMD5::hexDigest(Q3CString& s) { finalize(); @@ -916,5 +915,5 @@ void KMD5::hexDigest(QCString& s) } -QCString KMD5::base64Digest() +Q3CString KMD5::base64Digest() { QByteArray ba(16); @@ -957,5 +956,5 @@ 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 /* Round 1 */ diff --git a/microkde/kdecore/kmdcodec.h b/microkde/kdecore/kmdcodec.h index 2c4d611..616b683 100644 --- a/microkde/kdecore/kmdcodec.h +++ b/microkde/kdecore/kmdcodec.h @@ -40,4 +40,6 @@ #include <qstring.h> #include <qiodevice.h> +//Added by qt3to4: +#include <Q3CString> /** @@ -82,5 +84,5 @@ public: * @return quoted-printable encoded data. */ - static QCString quotedPrintableEncode(const QByteArray & in, + static Q3CString quotedPrintableEncode(const QByteArray & in, bool useCRLF = true); @@ -97,5 +99,5 @@ public: * @return quoted-printable encoded data. */ - static QCString quotedPrintableEncode(const QCString & str, + static Q3CString quotedPrintableEncode(const Q3CString & str, bool useCRLF = true); @@ -130,5 +132,5 @@ public: * @return decoded data. */ - static QCString quotedPrintableDecode(const QByteArray & in); + static Q3CString quotedPrintableDecode(const QByteArray & in); /** @@ -141,5 +143,5 @@ public: * @return decoded data. */ - static QCString quotedPrintableDecode(const QCString & str); + static Q3CString quotedPrintableDecode(const Q3CString & str); /** @@ -176,5 +178,5 @@ public: * @return a uuencoded data. */ - static QCString uuencode( const QByteArray& in ); + static Q3CString uuencode( const QByteArray& in ); /** @@ -187,5 +189,5 @@ public: * @return the encoded string. */ - static QCString uuencode( const QCString& str ); + static Q3CString uuencode( const Q3CString& str ); /** @@ -216,5 +218,5 @@ public: * @return a decoded string. */ - static QCString uudecode( const QByteArray& in ); + static Q3CString uudecode( const QByteArray& in ); /** @@ -227,5 +229,5 @@ public: * @return a uudecoded string. */ - static QCString uudecode( const QCString& str ); + static Q3CString uudecode( const Q3CString& str ); /** @@ -264,5 +266,5 @@ public: * @return a base64 encoded string. */ - static QCString base64Encode( const QByteArray& in, bool insertLFs = false); + static Q3CString base64Encode( const QByteArray& in, bool insertLFs = false); /** @@ -276,5 +278,5 @@ public: * @return the decoded string. */ - static QCString base64Encode( const QCString& str, bool insertLFs = false ); + static Q3CString base64Encode( const Q3CString& str, bool insertLFs = false ); /** @@ -309,5 +311,5 @@ public: * @return the decoded data. */ - static QCString base64Decode( const QByteArray& in ); + static Q3CString base64Decode( const QByteArray& in ); /** @@ -320,5 +322,5 @@ public: * @return the decoded string. */ - static QCString base64Decode( const QCString& str ); + static Q3CString base64Decode( const Q3CString& str ); /** @@ -432,5 +434,5 @@ public: * Same as above except it accepts a QByteArray as its argument. */ - KMD5(const QCString& a ); + KMD5(const Q3CString& a ); /** @@ -461,5 +463,5 @@ public: * @param in message to be added to the digest (QByteArray). */ - void update(const QCString& in ); + void update(const Q3CString& in ); /** @@ -503,10 +505,10 @@ public: * a hexadecimal representation. */ - QCString hexDigest (); + Q3CString hexDigest (); /** * @overload */ - void hexDigest(QCString&); + void hexDigest(Q3CString&); /** @@ -514,5 +516,5 @@ public: * a base64-encoded representation. */ - QCString base64Digest (); + Q3CString base64Digest (); /** @@ -525,5 +527,5 @@ public: * @overload */ - bool verify(const QCString&); + bool verify(const Q3CString&); protected: 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 @@ -22,4 +22,6 @@ #include <qcolor.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kconfig.h> @@ -141,6 +143,6 @@ class KPrefsItemStringList : public KPrefsItem { 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() {} @@ -150,6 +152,6 @@ class KPrefsItemIntList : public KPrefsItem { private: - QValueList<int> *mReference; - QValueList<int> mDefault; + Q3ValueList<int> *mReference; + Q3ValueList<int> mDefault; }; @@ -365,5 +367,5 @@ 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) { @@ -506,6 +508,6 @@ 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) { addItem(new KPrefsItemIntList(*mCurrentGroup,key,reference,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 @@ -22,9 +22,11 @@ // $Id$ -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qcolor.h> #include <qfont.h> #include <qsize.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3ValueList> class KConfig; @@ -284,6 +286,6 @@ class KPrefs { this item. */ - 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>()); protected: @@ -311,5 +313,5 @@ class KPrefs { KConfig *mConfig; // pointer to KConfig object - 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 @@ -564,5 +564,5 @@ class KShortcut * @see Qt::Key */ - KShortcut( int keyQt ) {} + KShortcut( int /*keyQt */) {} /** @@ -600,5 +600,5 @@ class KShortcut * @see KKeySequence::KKeySequence(const QString&) */ - KShortcut( const char* shortcut ) {} + KShortcut( const char* /*shortcut */) {} /** @@ -609,5 +609,5 @@ class KShortcut * @see KKeySequence::KKeySequence(const QString&) */ - KShortcut( const QString& shortcut ) {} + KShortcut( const QString& /*shortcut */) {} ~KShortcut() {} @@ -817,5 +817,5 @@ class KShortcut * @internal */ - QString toStringInternal( const KShortcut* pcutDefault = 0 ) const + QString toStringInternal( const KShortcut* /*pcutDefault*/ = 0 ) const { return "EMPTY IMPL."; 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 @@ -38,6 +38,6 @@ #include <qregexp.h> -#include <qasciidict.h> -#include <qdict.h> +#include <q3asciidict.h> +#include <q3dict.h> #include <qdir.h> #include <qfileinfo.h> @@ -47,4 +47,6 @@ #include <qstringlist.h> +//Added by qt3to4: +#include <Q3CString> #include "kstandarddirs.h" @@ -60,13 +62,13 @@ 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(); dot->show(); @@ -86,5 +88,5 @@ public: bool restrictionsActive; bool dataRestrictionActive; - QAsciiDict<bool> restrictions; + Q3AsciiDict<bool> restrictions; QStringList xdgdata_prefixes; QStringList xdgconf_prefixes; @@ -446,5 +448,5 @@ 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) continue; // No match @@ -483,5 +485,5 @@ 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) continue; // No match @@ -1109,5 +1111,5 @@ bool KStandardDirs::makeDir(const QString& dir2, int mode) int pos = target.find('/', i); 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 //US if (stat(baseEncoded, &st) != 0) @@ -1209,5 +1211,5 @@ QString readEnvPath(const char *env) // return ""; //#else - QCString c_path; + Q3CString c_path; if ( getenv(env) != NULL ) c_path = QString ( getenv(env) ); 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 @@ -25,5 +25,5 @@ #include <qstring.h> -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> #include <kglobal.h> @@ -575,9 +575,9 @@ 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; // Disallow assignment and copy-construction 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 @@ -29,4 +29,7 @@ #include <qtooltip.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> //US#include <qwhatsthis.h> //US#include <kaccel.h> @@ -43,7 +46,7 @@ //US added this includefiles #include <qmenubar.h> -#include <qtoolbar.h> -#include <qpopupmenu.h> -#include <qiconset.h> +#include <q3toolbar.h> +#include <q3popupmenu.h> +#include <qicon.h> /** @@ -88,5 +91,5 @@ public: KAccel *m_kaccel; - QValueList<KAccel*> m_kaccelList; + Q3ValueList<KAccel*> m_kaccelList; QString m_groupText; @@ -108,5 +111,5 @@ public: }; - QValueList<Container> m_containers; + Q3ValueList<Container> m_containers; }; @@ -131,5 +134,5 @@ 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, KActionCollection* parent, const char* name ) @@ -165,5 +168,5 @@ KAction::KAction( const QString& text, const KShortcut& cut, initPrivate( text, cut, receiver, slot ); } -KAction::KAction( const QString& text, const QIconSet& pix, +KAction::KAction( const QString& text, const QIcon& pix, const KShortcut& cut, QObject* parent, const char* name ) @@ -183,5 +186,5 @@ 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, const QObject* receiver, const char* slot, QObject* parent, @@ -507,6 +510,6 @@ 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 ); } @@ -519,5 +522,5 @@ void KAction::updateShortcut( int i ) } -void KAction::updateShortcut( QPopupMenu* menu, int id ) +void KAction::updateShortcut( Q3PopupMenu* menu, int id ) { /*US @@ -622,5 +625,5 @@ void KAction::updateToolTip( int i ) if ( w->inherits( "KToolBar" ) ) 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() ); } @@ -647,7 +650,7 @@ int KAction::plug( QWidget *w, int index ) plugShortcut(); - if ( w->inherits("QPopupMenu") ) + if ( w->inherits("Q3PopupMenu") ) { - QPopupMenu* menu = static_cast<QPopupMenu*>( w ); + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( w ); int id; // Don't insert shortcut into menu if it's already in a KAccel object. @@ -722,5 +725,5 @@ int KAction::plug( QWidget *w, int index ) d->isEnabled(), d->plainText(), index/*US, instance*/ ); } - bar->getButton( id_ )->setName( QCString("toolbutton_")+name() ); + bar->getButton( id_ )->setName( Q3CString("toolbutton_")+name() ); //US if ( !d->whatsThis().isEmpty() ) @@ -750,7 +753,7 @@ void KAction::unplug( QWidget *w ) int id = itemId( i ); - if ( w->inherits( "QPopupMenu" ) ) + if ( w->inherits( "Q3PopupMenu" ) ) { - QPopupMenu *menu = static_cast<QPopupMenu *>( w ); + Q3PopupMenu *menu = static_cast<Q3PopupMenu *>( w ); menu->removeItem( id ); } @@ -863,6 +866,6 @@ void KAction::updateEnabled( int i ) QWidget *w = container( 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") ) static_cast<QMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); @@ -907,8 +910,8 @@ void KAction::updateText( int i ) QWidget *w = container( 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 ); } else if ( w->inherits( "QMenuBar" ) ) @@ -948,8 +951,8 @@ void KAction::updateIcon( int id ) QWidget* w = container( 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_ ); } else if ( w->inherits( "QMenuBar" ) ) @@ -957,5 +960,5 @@ void KAction::updateIcon( int id ) else if ( w->inherits( "KToolBar" ) ) static_cast<KToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); - else if ( w->inherits( "QToolBar" ) ) + else if ( w->inherits( "Q3ToolBar" ) ) { qDebug("KAction::updateIcon has top be fixed"); @@ -969,5 +972,5 @@ QString KAction::icon() const } -void KAction::setIconSet( const QIconSet &iconset ) +void KAction::setIconSet( const QIcon &iconset ) { d->setIconSet( iconset ); @@ -983,9 +986,9 @@ void KAction::updateIconSet( int id ) QWidget *w = container( 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_ ); } else if ( w->inherits( "QMenuBar" ) ) @@ -1000,5 +1003,5 @@ void KAction::updateIconSet( int id ) } -QIconSet KAction::iconSet( KIcon::Group group, int size ) const +QIcon KAction::iconSet( KIcon::Group group, int size ) const { return d->iconSet( group, size ); @@ -1023,5 +1026,5 @@ void KAction::updateWhatsThis( int i ) { qDebug("KAction::updateWhatsThis ...1 has top be fixed"); - QPopupMenu* pm = popupMenu( i ); + Q3PopupMenu* pm = popupMenu( i ); if ( pm ) { @@ -1065,8 +1068,8 @@ 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 ); } @@ -1156,5 +1159,5 @@ 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() ) { @@ -1171,5 +1174,5 @@ 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 @@ -30,6 +30,8 @@ //US #include <qkeysequence.h> #include <qobject.h> -#include <qvaluelist.h> -#include <qguardedptr.h> +#include <q3valuelist.h> +#include <qpointer.h> +//Added by qt3to4: +#include <Q3PopupMenu> #include <kguiitem.h> #include <kshortcut.h> @@ -41,8 +43,8 @@ class QMenuBar; -class QPopupMenu; +class Q3PopupMenu; //USclass QComboBox; //USclass QPoint; -class QIconSet; +class QIcon; class QString; class KToolBar; @@ -260,5 +262,5 @@ 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, KActionCollection* parent, const char* name ); @@ -309,5 +311,5 @@ public: * @obsolete */ - 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 ); /** @@ -319,5 +321,5 @@ public: * @obsolete */ - 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 ); /** @@ -462,8 +464,8 @@ public: * be chosen. */ - 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 { return iconSet( KIcon::Small ); @@ -519,5 +521,5 @@ public slots: * be chosen. */ - virtual void setIconSet( const QIconSet &iconSet ); + virtual void setIconSet( const QIcon &iconSet ); virtual void setIcon( const QString& icon ); @@ -547,5 +549,5 @@ protected slots: protected: KToolBar* toolBar( int index ) const; - QPopupMenu* popupMenu( int index ) const; + Q3PopupMenu* popupMenu( int index ) const; void removeContainer( int index ); int findContainer( const QWidget* widget ) const; @@ -556,5 +558,5 @@ 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 ); virtual void updateText(int i ); diff --git a/microkde/kdeui/kactionclasses.cpp b/microkde/kdeui/kactionclasses.cpp index 82e6c8b..c611865 100644 --- a/microkde/kdeui/kactionclasses.cpp +++ b/microkde/kdeui/kactionclasses.cpp @@ -29,7 +29,9 @@ #include <qfontdatabase.h> -#include <qobjectlist.h> +#include <qobject.h> //US#include <qwhatsthis.h> #include <qtimer.h> +//Added by qt3to4: +#include <Q3ValueList> //US#include <kaccel.h> @@ -49,11 +51,11 @@ #include <kconfigbase.h> #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> static QFontDatabase *fontDataBase = 0; @@ -84,5 +86,5 @@ static void get_fonts( QStringList &lst ) } -static QValueList<int> get_standard_font_sizes() +static Q3ValueList<int> get_standard_font_sizes() { if ( !fontDataBase ) { @@ -121,5 +123,5 @@ 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, QObject* parent, const char* name ) @@ -137,5 +139,5 @@ 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, const QObject* receiver, @@ -170,5 +172,5 @@ KToggleAction::~KToggleAction() int KToggleAction::plug( QWidget* widget, int index ) { - if ( !widget->inherits("QPopupMenu") && !widget->inherits("KToolBar") ) + if ( !widget->inherits("Q3PopupMenu") && !widget->inherits("KToolBar") ) { kdWarning() << "Can not plug KToggleAction in " << widget->className() << endl; @@ -185,9 +187,9 @@ int KToggleAction::plug( QWidget* widget, int index ) return _index; - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("Q3PopupMenu") ) { int id = itemId( _index ); - static_cast<QPopupMenu*>(widget)->setItemChecked( id, d->m_checked ); + static_cast<Q3PopupMenu*>(widget)->setItemChecked( id, d->m_checked ); } else if ( widget->inherits( "KToolBar" ) ) { @@ -215,11 +217,10 @@ 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() ) { a->setChecked( false ); @@ -236,6 +237,6 @@ void KToggleAction::updateChecked( int id ) QWidget *w = container( 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" ) ) static_cast<QMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); @@ -284,5 +285,5 @@ 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, QObject* parent, const char* name ) @@ -298,5 +299,5 @@ 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, const QObject* receiver, const char* slot, @@ -350,5 +351,5 @@ public: bool m_edit; bool m_menuAccelsEnabled; - QPopupMenu *m_menu; + Q3PopupMenu *m_menu; int m_current; int m_comboWidth; @@ -388,5 +389,5 @@ 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, QObject* parent, const char* name ) @@ -404,5 +405,5 @@ 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, const QObject* receiver, @@ -440,5 +441,5 @@ 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; } @@ -480,5 +481,5 @@ void KSelectAction::setComboWidth( int width ) } -QPopupMenu* KSelectAction::popupMenu() const +Q3PopupMenu* KSelectAction::popupMenu() const { kdDebug(129) << "KSelectAction::popupMenu()" << endl; // remove -- ellis @@ -486,5 +487,5 @@ 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(); if ( d->m_current >= 0 ) @@ -644,10 +645,10 @@ int KSelectAction::plug( QWidget *widget, int index ) kdDebug(129) << "KAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("Q3PopupMenu") ) { // Create the PopupMenu and store it in m_menu (void)popupMenu(); - QPopupMenu* menu = static_cast<QPopupMenu*>( widget ); + Q3PopupMenu* menu = static_cast<Q3PopupMenu*>( widget ); int id; @@ -683,5 +684,5 @@ 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() ); if ( d->m_comboWidth > 0 ) @@ -853,5 +854,5 @@ 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, QObject* parent, const char* name ) @@ -869,5 +870,5 @@ 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, const char* slot, QObject* parent, @@ -966,5 +967,5 @@ KRecentFilesAction::KRecentFilesAction( const QString& text, KRecentFilesAction::KRecentFilesAction( const QString& text, - const QIconSet& pix, + const QIcon& pix, const KShortcut& cut, QObject* parent, const char* name, @@ -992,5 +993,5 @@ KRecentFilesAction::KRecentFilesAction( const QString& text, KRecentFilesAction::KRecentFilesAction( const QString& text, - const QIconSet& pix, + const QIcon& pix, const KShortcut& cut, const QObject* receiver, @@ -1202,5 +1203,5 @@ 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, QObject* parent, const char* name ) @@ -1224,5 +1225,5 @@ 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, const QObject* receiver, const char* slot, @@ -1362,5 +1363,5 @@ KFontSizeAction::KFontSizeAction( const QString& text, } -KFontSizeAction::KFontSizeAction( const QString& text, const QIconSet& pix, +KFontSizeAction::KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut, QObject* parent, const char* name ) @@ -1378,5 +1379,5 @@ 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, const QObject* receiver, @@ -1415,7 +1416,7 @@ 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 ) ); @@ -1438,5 +1439,5 @@ void KFontSizeAction::setFontSize( int size ) if ( index == -1 ) { // Insert at the correct position in the list (to keep sorting) - QValueList<int> lst; + Q3ValueList<int> lst; // Convert to list of ints QStringList itemsList = items(); @@ -1451,5 +1452,5 @@ qDebug("KFontSizeAction::setFontSize heapsort not found."); // Convert back to string list 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) ); KSelectAction::setItems( strLst ); @@ -1493,5 +1494,5 @@ 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; m_stickyMenu = true; @@ -1503,5 +1504,5 @@ public: //US KPopupMenu *m_popup; - QPopupMenu *m_popup; + Q3PopupMenu *m_popup; bool m_delayed; bool m_stickyMenu; @@ -1523,5 +1524,5 @@ 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 ) : KAction( text, icon, 0, parent, name ) @@ -1553,5 +1554,5 @@ void KActionMenu::popup( const QPoint& global ) //US KPopupMenu* KActionMenu::popupMenu() const -QPopupMenu* KActionMenu::popupMenu() const +Q3PopupMenu* KActionMenu::popupMenu() const { return d->m_popup; @@ -1593,7 +1594,7 @@ 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; if ( hasIconSet() ) @@ -1782,10 +1783,10 @@ int KToolBarPopupAction::plug( QWidget *widget, int index ) //US KPopupMenu *KToolBarPopupAction::popupMenu() const -QPopupMenu *KToolBarPopupAction::popupMenu() const +Q3PopupMenu *KToolBarPopupAction::popupMenu() const { if ( !m_popup ) { KToolBarPopupAction *that = const_cast<KToolBarPopupAction*>(this); //US that->m_popup = new KPopupMenu; - that->m_popup = new QPopupMenu; + that->m_popup = new Q3PopupMenu; } return m_popup; @@ -1954,5 +1955,5 @@ void KWidgetAction::slotToolbarDestroyed() //Q_ASSERT( m_widget ); // When exiting the app the widget could be destroyed before the toolbar. - ASSERT( isPlugged() ); + Q_ASSERT( isPlugged() ); if( !m_widget || !isPlugged() ) return; @@ -1975,7 +1976,7 @@ KActionSeparator::~KActionSeparator() 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 ); int id = menu->insertSeparator( index ); 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 @@ -35,9 +35,12 @@ //US#include <kguiitem.h> #include <kshortcut.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3PopupMenu> //US#include <kstdaction.h> //US#include <kicontheme.h> class QMenuBar; -class QPopupMenu; +class Q3PopupMenu; //USclass QComboBox; //USclass QPoint; @@ -55,5 +58,5 @@ class KURL; //US class KToolBar needs to be replaced -class KToolBar; +#include "ktoolbar.h" class KActionCollection; @@ -106,5 +109,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -128,5 +131,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -247,5 +250,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -269,5 +272,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -353,5 +356,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -375,5 +378,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -439,5 +442,5 @@ public: virtual int comboWidth() const; - QPopupMenu* popupMenu() const; + Q3PopupMenu* popupMenu() const; /** @@ -568,5 +571,5 @@ public: * @param name An internal name for this action. */ - 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 ); @@ -590,5 +593,5 @@ public: * @param name An internal name for this action. */ - 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, const char* name = 0 ); @@ -686,5 +689,5 @@ public: * @param maxItems The maximum number of files to display */ - 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, uint maxItems = 10 ); @@ -713,5 +716,5 @@ public: * @param maxItems The maximum number of files to display */ - 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, QObject* parent, const char* name = 0, @@ -835,9 +838,9 @@ public: const QObject* receiver, const char* slot, QObject* parent, 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 ); KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), 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, const char* name = 0 ); @@ -874,9 +877,9 @@ public: KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver, 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 ); KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), 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, QObject* parent, const char* name = 0 ); @@ -932,5 +935,5 @@ public: KActionMenu( const QString& text, QObject* parent = 0, 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 ); KActionMenu( const QString& text, const QString& icon, @@ -943,5 +946,5 @@ public: //US KPopupMenu* popupMenu() const; - QPopupMenu* popupMenu() const; + Q3PopupMenu* popupMenu() const; void popup( const QPoint& global ); @@ -1068,5 +1071,5 @@ public: */ //US KPopupMenu *popupMenu() const; - QPopupMenu *popupMenu() const; + Q3PopupMenu *popupMenu() const; /** @@ -1099,5 +1102,5 @@ public: private: //US KPopupMenu *m_popup; - QPopupMenu *m_popup; + Q3PopupMenu *m_popup; bool m_delayed:1; bool m_stickyMenu:1; @@ -1148,6 +1151,6 @@ public slots: private: - QCString m_toolBarName; - QGuardedPtr<KToolBar> m_toolBar; + Q3CString m_toolBarName; + QPointer<KToolBar> m_toolBar; protected: virtual void virtual_hook( int id, void* data ); @@ -1196,5 +1199,5 @@ protected slots: void slotToolbarDestroyed(); private: - QGuardedPtr<QWidget> m_widget; + QPointer<QWidget> m_widget; bool m_autoSized; protected: 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 @@ -27,5 +27,7 @@ //US#include "kactionshortcutlist.h" -#include <qptrdict.h> +#include <q3ptrdict.h> +//Added by qt3to4: +#include <Q3ValueList> //US#include <qvariant.h> @@ -37,6 +39,6 @@ //US I included the following files -#include <qasciidict.h> -#include <qptrlist.h> +#include <q3asciidict.h> +#include <q3ptrlist.h> #include "kaction.h" #include <kglobal.h> @@ -68,11 +70,11 @@ public: //QValueList<QWidget*> m_widgetList; //QValueList<KAccel*> m_kaccelList; - QValueList<KActionCollection*> m_docList; + Q3ValueList<KActionCollection*> m_docList; QWidget *m_widget; KAccel *m_kaccel; KAccel *m_builderKAccel; - QAsciiDict<KAction> m_actionDict; - QPtrDict< QPtrList<KAction> > m_dctHighlightContainers; + Q3AsciiDict<KAction> m_actionDict; + Q3PtrDict< Q3PtrList<KAction> > m_dctHighlightContainers; bool m_highlight; KAction *m_currentHighlightAction; @@ -134,5 +136,5 @@ 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(); if ( pAction->m_parentCollection == this ) @@ -366,5 +368,5 @@ KAction* KActionCollection::_take( KAction* action ) void KActionCollection::_clear() { - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); while ( it.current() ) _remove( it.current() ); @@ -387,5 +389,5 @@ 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 ) { @@ -408,5 +410,5 @@ KAction* KActionCollection::action( const char* name, const char* classname ) co KAction* KActionCollection::action( int index ) const { - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); it += index; return it.current(); @@ -433,5 +435,5 @@ QStringList KActionCollection::groups() const QStringList lst; - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) @@ -445,5 +447,5 @@ KActionPtrList KActionCollection::actions( const QString& group ) const KActionPtrList lst; - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) if ( it.current()->group() == group ) @@ -459,5 +461,5 @@ KActionPtrList KActionCollection::actions() const KActionPtrList lst; - QAsciiDictIterator<KAction> it( d->m_actionDict ); + Q3AsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) lst.append( it.current() ); @@ -509,11 +511,11 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action ) return; - QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) { - actionList = new QPtrList<KAction>; + actionList = new Q3PtrList<KAction>; - if ( container->inherits( "QPopupMenu" ) ) + if ( container->inherits( "Q3PopupMenu" ) ) { connect( container, SIGNAL( highlighted( int ) ), @@ -523,5 +525,5 @@ void KActionCollection::connectHighlight( QWidget *container, KAction *action ) } //US else if ( container->inherits( "KToolBar" ) ) - else if ( container->inherits( "QToolBar" ) ) + else if ( container->inherits( "Q3ToolBar" ) ) { connect( container, SIGNAL( highlighted( int, bool ) ), @@ -543,5 +545,5 @@ void KActionCollection::disconnectHighlight( QWidget *container, KAction *action return; - QPtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; + Q3PtrList<KAction> *actionList = d->m_dctHighlightContainers[ container ]; if ( !actionList ) @@ -626,10 +628,10 @@ void KActionCollection::slotDestroyed() 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 ) ]; if ( !actionList ) return 0; - QPtrListIterator<KAction> it( *actionList ); + Q3PtrListIterator<KAction> it( *actionList ); for (; it.current(); ++it ) if ( it.current()->isPlugged( container, id ) ) @@ -645,7 +647,7 @@ KActionCollection KActionCollection::operator+(const KActionCollection &c ) cons KActionCollection ret( *this ); - 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 ) ret.insert( *it ); @@ -671,5 +673,5 @@ 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 ) insert( it.current() ); 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 @@ -31,4 +31,6 @@ //US #include <qkeysequence.h> #include <qobject.h> +//Added by qt3to4: +#include <Q3ValueList> //US#include <qvaluelist.h> //US#include <qguardedptr.h> @@ -61,5 +63,5 @@ 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 @@ -50,5 +50,7 @@ #include <kbuttonbox.h> #include <qpushbutton.h> -#include <qptrlist.h> +#include <q3ptrlist.h> +//Added by qt3to4: +#include <QResizeEvent> #include <assert.h> @@ -63,5 +65,5 @@ public: }; -template class QPtrList<KButtonBox::Item>; +template class Q3PtrList<KButtonBox::Item>; class KButtonBoxPrivate { @@ -71,8 +73,8 @@ public: unsigned short orientation; 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) : QWidget(parent) @@ -150,5 +152,5 @@ void KButtonBox::placeButtons() { unsigned int i; - if(data->orientation == Horizontal) { + if(data->orientation == Qt::Horizontal) { // calculate free size and stretches int fs = width() - 2 * data->border; @@ -252,5 +254,5 @@ QSize KButtonBox::sizeHint() const { s = bs; - if(data->orientation == Horizontal) + if(data->orientation == Qt::Horizontal) dw += s.width(); else @@ -262,5 +264,5 @@ QSize KButtonBox::sizeHint() const { } - if(data->orientation == Horizontal) + if(data->orientation == Qt::Horizontal) return QSize(dw, bs.height() + 2 * data->border); else @@ -271,5 +273,5 @@ QSize KButtonBox::sizeHint() const { QSizePolicy KButtonBox::sizePolicy() const { - return data->orientation == Horizontal? + return data->orientation == Qt::Horizontal? QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) : QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ); 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 @@ -22,4 +22,6 @@ #include <qwidget.h> +//Added by qt3to4: +#include <QResizeEvent> class QPushButton; @@ -49,5 +51,5 @@ public: * are laid out from left to right. */ - 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 @@ -21,5 +21,5 @@ #include <qregexp.h> #include <qstring.h> -#include <qiconset.h> +#include <qicon.h> #include <qpixmap.h> @@ -63,5 +63,5 @@ public: QString m_statusText; QString m_iconName; - QIconSet m_iconSet; + QIcon m_iconSet; bool m_hasIcon : 1; bool m_enabled : 1; @@ -83,5 +83,5 @@ 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 ) { @@ -125,5 +125,5 @@ 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 { if( d->m_hasIcon ) @@ -149,5 +149,5 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instan } else - return QIconSet(); + return QIcon(); } @@ -178,5 +178,5 @@ void KGuiItem::setText( const QString &text ) { } -void KGuiItem::setIconSet( const QIconSet &iconset ) +void KGuiItem::setIconSet( const QIcon &iconset ) { d->m_iconSet = iconset; @@ -188,5 +188,5 @@ 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 @@ -24,7 +24,7 @@ #include <qstring.h> -#include <qiconset.h> +#include <qicon.h> #include <qpixmap.h> -#include <qvaluelist.h> +#include <q3valuelist.h> //US#include <kicontheme.h> #include <kglobal.h> @@ -43,5 +43,5 @@ public: const QString &whatsThis = QString::null ); - KGuiItem( const QString &text, const QIconSet &iconSet, + KGuiItem( const QString &text, const QIcon &iconSet, const QString &toolTip = QString::null, const QString &whatsThis = QString::null ); @@ -54,8 +54,8 @@ public: QString text() const; 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 @@ -70,5 +70,5 @@ public: void setText( const QString &text ); - void setIconSet( const QIconSet &iconset ); + void setIconSet( const QIcon &iconset ); void setIconName( const QString &iconName ); void setToolTip( const QString &tooltip ); 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 @@ -23,13 +23,21 @@ #include <qlayout.h> #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 #include <qbitmap.h> @@ -66,11 +74,11 @@ #include "kjanuswidget.h" -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 ); @@ -99,5 +107,5 @@ public: }; -template class QPtrList<QListViewItem>; +template class Q3PtrList<Q3ListViewItem>; @@ -108,10 +116,10 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) mShowIconsInTreeList(false), d(0) { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this ); if( mFace == TreeList || mFace == IconList ) { d = new KJanusWidgetPrivate; - QFrame *page = 0; + Q3Frame *page = 0; if( mFace == TreeList ) { @@ -146,5 +154,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) else { - QHBoxLayout *hbox = new QHBoxLayout( topLayout ); + Q3HBoxLayout *hbox = new Q3HBoxLayout( topLayout ); mIconList = new IconListBox( this ); @@ -157,5 +165,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) connect( mIconList, SIGNAL(selectionChanged()), SLOT(slotShowPage())); hbox->addSpacing( KDialog::marginHint() ); - page = new QFrame( this ); + page = new Q3Frame( this ); hbox->addWidget( page, 10 ); } @@ -166,5 +174,5 @@ 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() ); mTitleLabel = new QLabel( QString::fromLatin1("Empty page"), page, "KJanusWidgetTitleLabel" ); @@ -176,8 +184,8 @@ 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 *)), SIGNAL(aboutToShowPage(QWidget *))); @@ -200,5 +208,5 @@ KJanusWidget::KJanusWidget( QWidget *parent, const char *name, int face ) { mFace = Plain; - mPlainPage = new QFrame( this ); + mPlainPage = new Q3Frame( this ); topLayout->addWidget( mPlainPage, 10 ); } @@ -246,5 +254,5 @@ bool KJanusWidget::isValid() const -QFrame *KJanusWidget::plainPage() +Q3Frame *KJanusWidget::plainPage() { return( mPlainPage ); @@ -267,5 +275,5 @@ QWidget *KJanusWidget::FindParent() } -QFrame *KJanusWidget::addPage( const QStringList &items, const QString &header, +Q3Frame *KJanusWidget::addPage( const QStringList &items, const QString &header, const QPixmap &pixmap ) { @@ -276,5 +284,5 @@ 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 ); @@ -288,5 +296,5 @@ void KJanusWidget::pageGone( QObject *obj ) } -void KJanusWidget::slotReopen( QListViewItem * item ) +void KJanusWidget::slotReopen( Q3ListViewItem * item ) { if( item ) @@ -294,5 +302,5 @@ 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 ) { @@ -305,5 +313,5 @@ QFrame *KJanusWidget::addPage( const QString &itemName, const QString &header, -QVBox *KJanusWidget::addVBoxPage( const QStringList &items, +Q3VBox *KJanusWidget::addVBoxPage( const QStringList &items, const QString &header, const QPixmap &pixmap ) @@ -316,5 +324,5 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items, } - QVBox *page = new QVBox(FindParent() , "vbox_page" ); + Q3VBox *page = new Q3VBox(FindParent() , "vbox_page" ); page->setSpacing( KDialog::spacingHintSmall() ); addPageWidget( page, items, header, pixmap ); @@ -323,5 +331,5 @@ QVBox *KJanusWidget::addVBoxPage( const QStringList &items, } -QVBox *KJanusWidget::addVBoxPage( const QString &itemName, +Q3VBox *KJanusWidget::addVBoxPage( const QString &itemName, const QString &header, const QPixmap &pixmap ) @@ -332,5 +340,5 @@ QVBox *KJanusWidget::addVBoxPage( const QString &itemName, } -QHBox *KJanusWidget::addHBoxPage( const QStringList &items, +Q3HBox *KJanusWidget::addHBoxPage( const QStringList &items, const QString &header, const QPixmap &pixmap ) @@ -341,5 +349,5 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items, } - QHBox *page = new QHBox(FindParent(), "hbox_page"); + Q3HBox *page = new Q3HBox(FindParent(), "hbox_page"); page->setSpacing( KDialog::spacingHint() ); addPageWidget( page, items, header, pixmap ); @@ -348,5 +356,5 @@ QHBox *KJanusWidget::addHBoxPage( const QStringList &items, } -QHBox *KJanusWidget::addHBoxPage( const QString &itemName, +Q3HBox *KJanusWidget::addHBoxPage( const QString &itemName, const QString &header, const QPixmap &pixmap ) @@ -357,5 +365,5 @@ 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, const QString &header, @@ -368,5 +376,5 @@ 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() ); addPageWidget( page, items, header, pixmap ); @@ -376,5 +384,5 @@ 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, const QString &header, @@ -386,8 +394,8 @@ 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; QStringList curPath; @@ -413,7 +421,7 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p // new child. if (isTop) - newChild = new QListViewItem(mTreeList, name); + newChild = new Q3ListViewItem(mTreeList, name); else - newChild = new QListViewItem(curTop, name); + newChild = new Q3ListViewItem(curTop, name); } @@ -432,7 +440,7 @@ void KJanusWidget::InsertTreeListItem(const QStringList &items, const QPixmap &p // the node had some children, but we didn't find the given name 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); } @@ -460,5 +468,5 @@ 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 ) { @@ -551,13 +559,13 @@ bool KJanusWidget::setSwallowedWidget( QWidget *widget ) delete mSwallowPage->layout(); } - QGridLayout *gbox = new QGridLayout( mSwallowPage, 1, 1, 0 ); + Q3GridLayout *gbox = new Q3GridLayout( mSwallowPage, 1, 1, 0 ); // // Hide old children // - 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() ) { @@ -598,5 +606,5 @@ bool KJanusWidget::slotShowPage() if( mFace == TreeList ) { - QListViewItem *node = mTreeList->selectedItem(); + Q3ListViewItem *node = mTreeList->selectedItem(); if( node == 0 ) { return( false ); } @@ -607,5 +615,5 @@ bool KJanusWidget::slotShowPage() else if( mFace == IconList ) { - QListBoxItem *node = mIconList->item( mIconList->currentItem() ); + Q3ListBoxItem *node = mIconList->item( mIconList->currentItem() ); if( node == 0 ) { return( false ); } QWidget *stackItem = mIconListToPageStack[node]; @@ -647,7 +655,7 @@ bool KJanusWidget::showPage( QWidget *w ) if( mFace == TreeList ) { - 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(); if (val == w) { @@ -659,7 +667,7 @@ bool KJanusWidget::showPage( QWidget *w ) else { - 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(); if (val == w) { @@ -687,5 +695,5 @@ int KJanusWidget::activePageIndex() const { if( mFace == TreeList) { - QListViewItem *node = mTreeList->selectedItem(); + Q3ListViewItem *node = mTreeList->selectedItem(); if( node == 0 ) { return -1; } QWidget *stackItem = mTreeListToPageStack[node]; @@ -693,5 +701,5 @@ 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 ); } QWidget *stackItem = mIconListToPageStack[node]; @@ -762,5 +770,5 @@ void KJanusWidget::slotFontChanged() // makes the treelist behave like the list of kcontrol -void KJanusWidget::slotItemClicked(QListViewItem *it) +void KJanusWidget::slotItemClicked(Q3ListViewItem *it) { if(it && (it->childCount()>0)) @@ -896,9 +904,9 @@ 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 ); } @@ -954,5 +962,5 @@ 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), mWidthValid(false) @@ -966,5 +974,5 @@ 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() ) { h += i->height( this ); @@ -981,5 +989,5 @@ 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() ) { int w = ((IconListItem *)i)->width(this); @@ -987,5 +995,5 @@ void KJanusWidget::IconListBox::updateWidth() } - for( QListBoxItem *i = item(0); i != 0; i = i->next() ) + for( Q3ListBoxItem *i = item(0); i != 0; i = i->next() ) { ((IconListItem *)i)->expandMinimumWidth( maxWidth ); @@ -1023,7 +1031,7 @@ 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 ) { mPixmap = pixmap; @@ -1084,5 +1092,5 @@ void KJanusWidget::IconListItem::paint( QPainter *painter ) } -int KJanusWidget::IconListItem::height( const QListBox *lb ) const +int KJanusWidget::IconListItem::height( const Q3ListBox *lb ) const { if( text().isEmpty() == true ) @@ -1097,5 +1105,5 @@ int KJanusWidget::IconListItem::height( const QListBox *lb ) const -int KJanusWidget::IconListItem::width( const QListBox *lb ) const +int KJanusWidget::IconListItem::width( const Q3ListBox *lb ) const { int wt = lb->fontMetrics().boundingRect(text()).width()+10; @@ -1123,5 +1131,5 @@ void KJanusWidget::removePage( QWidget *page ) if ( mFace == TreeList ) { - QMap<QListViewItem*, QWidget *>::Iterator i; + QMap<Q3ListViewItem*, QWidget *>::Iterator i; for( i = mTreeListToPageStack.begin(); i != mTreeListToPageStack.end(); ++i ) if (i.data()==page) @@ -1138,5 +1146,5 @@ void KJanusWidget::removePage( QWidget *page ) else if ( mFace == IconList ) { - QMap<QListBoxItem*, QWidget *>::Iterator i; + QMap<Q3ListBoxItem*, QWidget *>::Iterator i; for( i = mIconListToPageStack.begin(); i != mIconListToPageStack.end(); ++i ) if (i.data()==page) 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 @@ -21,8 +21,14 @@ #define _KJANUS_WIDGET_H_ -#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> @@ -39,10 +45,10 @@ class KSeparator; class KListView; -class QWidgetStack; +class Q3WidgetStack; class QLabel; class QTabWidget; -class QListViewItem; -class QVBox; -class QHBox; +class Q3ListViewItem; +class Q3VBox; +class Q3HBox; /** @@ -103,5 +109,5 @@ 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(); void updateWidth(); @@ -194,5 +200,5 @@ class KJanusWidget : public QWidget * @return The widget or 0 if the face in not Plain. */ - virtual QFrame *plainPage(); + virtual Q3Frame *plainPage(); /** @@ -215,5 +221,5 @@ class KJanusWidget : public QWidget * Tabbed. */ - 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() ); @@ -232,5 +238,5 @@ class KJanusWidget : public QWidget * removed (you can re-add a page with the same name later. **/ - 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() ); @@ -254,5 +260,5 @@ class KJanusWidget : public QWidget * @return The empty page or 0 if the face is not TreeList, IconList or * Tabbed. */ - virtual QVBox *addVBoxPage( const QString &item, + virtual Q3VBox *addVBoxPage( const QString &item, const QString &header=QString::null, const QPixmap &pixmap=QPixmap() ); @@ -270,5 +276,5 @@ class KJanusWidget : public QWidget * removed (you can re-add a page with the same name later. **/ - virtual QVBox *addVBoxPage( const QStringList &items, + virtual Q3VBox *addVBoxPage( const QStringList &items, const QString &header=QString::null, const QPixmap &pixmap=QPixmap() ); @@ -294,5 +300,5 @@ class KJanusWidget : public QWidget * Tabbed. */ - virtual QHBox *addHBoxPage( const QString &itemName, + virtual Q3HBox *addHBoxPage( const QString &itemName, const QString &header=QString::null, const QPixmap &pixmap=QPixmap() ); @@ -310,5 +316,5 @@ class KJanusWidget : public QWidget * removed (you can re-add a page with the same name later. **/ - virtual QHBox *addHBoxPage( const QStringList &items, + virtual Q3HBox *addHBoxPage( const QStringList &items, const QString &header=QString::null, const QPixmap &pixmap=QPixmap() ); @@ -338,5 +344,5 @@ 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, const QString &header=QString::null, @@ -356,5 +362,5 @@ 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, const QString &header=QString::null, @@ -518,13 +524,13 @@ class KJanusWidget : public QWidget bool slotShowPage(); //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); protected: 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(); @@ -533,5 +539,5 @@ class KJanusWidget : public QWidget // Obsolete members. Remove in KDE 4. - QPtrList<QWidget> *mPageList; + Q3PtrList<QWidget> *mPageList; QStringList *mTitleList; @@ -539,8 +545,8 @@ class KJanusWidget : public QWidget KListView *mTreeList; IconListBox *mIconList; - QWidgetStack *mPageStack; + Q3WidgetStack *mPageStack; QLabel *mTitleLabel; QTabWidget *mTabControl; - QFrame *mPlainPage; + Q3Frame *mPlainPage; QWidget *mSwallowPage; QWidget *mActivePageWidget; @@ -548,6 +554,6 @@ class KJanusWidget : public QWidget //US QSplitter::ResizeMode mTreeListResizeMode; bool mShowIconsInTreeList; - QMap<QListViewItem *, QWidget *> mTreeListToPageStack; - QMap<QListBoxItem *, QWidget *> mIconListToPageStack; + QMap<Q3ListViewItem *, QWidget *> mTreeListToPageStack; + QMap<Q3ListBoxItem *, QWidget *> mIconListToPageStack; QMap<QString, QPixmap> mFolderIconMap; QMap<QString, QStringList> mChildrenNames; 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 @@ -17,4 +17,9 @@ */ #include <qtimer.h> +//Added by qt3to4: +#include <QEvent> +#include <QMouseEvent> +#include <QKeyEvent> +#include <QFocusEvent> #include <kglobalsettings.h> @@ -27,4 +32,5 @@ #ifdef Q_WS_X11 +#include <QX11Info> #include <X11/Xlib.h> #endif @@ -32,15 +38,15 @@ #define Q_WS_QWS #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 ) { connect( this, SIGNAL( onViewport() ), 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 & ) ) ); /*US @@ -61,5 +67,5 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f ) } -void KListBox::slotOnItem( QListBoxItem *item ) +void KListBox::slotOnItem( Q3ListBoxItem *item ) { /*US @@ -140,9 +146,9 @@ void KListBox::slotAutoSelect() int root_x, root_y, win_x, win_y; 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 ); #endif - QListBoxItem* previousItem = item( currentItem() ); + Q3ListBoxItem* previousItem = item( currentItem() ); setCurrentItem( m_pCurrentItem ); @@ -168,5 +174,5 @@ 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() ) { if ( down && it == m_pCurrentItem ) { @@ -187,5 +193,5 @@ void KListBox::slotAutoSelect() emit selectionChanged(); - if( selectionMode() == QListBox::Single ) + if( selectionMode() == Q3ListBox::Single ) emit selectionChanged( m_pCurrentItem ); } @@ -214,5 +220,5 @@ void KListBox::slotAutoSelect() } -void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos ) +void KListBox::emitExecute( Q3ListBoxItem *item, const QPoint &pos ) { #ifdef Q_WS_X11 //FIXME @@ -221,5 +227,5 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos ) int root_x, root_y, win_x, win_y; 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 ); #endif @@ -247,9 +253,9 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos ) void KListBox::keyPressEvent(QKeyEvent *e) { - if( e->key() == Key_Escape ) + if( e->key() == Qt::Key_Escape ) { e->ignore(); } - else if( e->key() == Key_F1 ) + else if( e->key() == Qt::Key_F1 ) { e->ignore(); @@ -257,5 +263,5 @@ void KListBox::keyPressEvent(QKeyEvent *e) else { - QListBox::keyPressEvent(e); + Q3ListBox::keyPressEvent(e); } } @@ -265,5 +271,5 @@ void KListBox::focusOutEvent( QFocusEvent *fe ) m_pAutoSelect->stop(); - QListBox::focusOutEvent( fe ); + Q3ListBox::focusOutEvent( fe ); } @@ -272,10 +278,10 @@ void KListBox::leaveEvent( QEvent *e ) m_pAutoSelect->stop(); - QListBox::leaveEvent( e ); + Q3ListBox::leaveEvent( e ); } 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(); blockSignals( true ); @@ -286,24 +292,24 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e ) } - QListBox::contentsMousePressEvent( e ); + Q3ListBox::contentsMousePressEvent( e ); } void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e ) { - QListBox::contentsMouseDoubleClickEvent( e ); + Q3ListBox::contentsMouseDoubleClickEvent( e ); - QListBoxItem* item = itemAt( e->pos() ); + Q3ListBoxItem* item = itemAt( e->pos() ); if( item ) { emit doubleClicked( item, e->globalPos() ); - if( (e->button() == LeftButton) && !m_bUseSingle ) + if( (e->button() == Qt::LeftButton) && !m_bUseSingle ) emitExecute( item, e->globalPos() ); } } -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 @@ -19,5 +19,10 @@ #define KLISTBOX_H -#include <qlistbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <QMouseEvent> +#include <QFocusEvent> +#include <QKeyEvent> +#include <QEvent> /** @@ -36,10 +41,10 @@ * @short A variant of @ref QListBox that honors KDE's system-wide settings. **/ -class KListBox : public QListBox +class KListBox : public Q3ListBox { Q_OBJECT public: - KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + KListBox( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 ); signals: @@ -55,5 +60,5 @@ signals: * connected to this signal. */ - void executed( QListBoxItem *item ); + void executed( Q3ListBoxItem *item ); /** @@ -68,5 +73,5 @@ signals: * connected to this signal. */ - void executed( QListBoxItem *item, const QPoint &pos ); + void executed( Q3ListBoxItem *item, const QPoint &pos ); /** @@ -84,8 +89,8 @@ signals: * to use @ref executed() instead. */ - 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(); @@ -98,5 +103,5 @@ protected slots: protected: - void emitExecute( QListBoxItem *item, const QPoint &pos ); + void emitExecute( Q3ListBoxItem *item, const QPoint &pos ); /** @@ -124,5 +129,5 @@ protected: //US bool m_bChangeCursorOverItem; - QListBoxItem* m_pCurrentItem; + Q3ListBoxItem* m_pCurrentItem; QTimer* m_pAutoSelect; @@ -130,5 +135,5 @@ protected: private slots: - void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos ); + void slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos ); protected: 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 @@ -19,11 +19,25 @@ */ -#include <qdragobject.h> +#include <q3dragobject.h> #include <qtimer.h> -#include <qheader.h> +#include <q3header.h> #include <qcursor.h> #include <qtooltip.h> #include <qstyle.h> #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> #include <kglobalsettings.h> @@ -39,5 +53,5 @@ #ifndef _WIN32_ #define private public -#include <qlistview.h> +#include <q3listview.h> #undef private #endif @@ -47,7 +61,8 @@ #include <qpe/qpeapplication.h> #endif +#include <Q3Action> // /*US -class KListView::Tooltip : public QToolTip +class KListView::Tooltip /* TODO:hacker:TODO: : public QToolTip */ { public: @@ -68,5 +83,5 @@ private: KListView::Tooltip::Tooltip (KListView* parent, QToolTipGroup* group) - : QToolTip (parent, group), + : /* XXX:hacker:XXX: QToolTip (parent, group), */ mParent (parent) { @@ -124,5 +139,5 @@ public: } - QListViewItem* pCurrentItem; + Q3ListViewItem* pCurrentItem; QTimer autoSelect; @@ -130,5 +145,5 @@ public: QTimer dragExpand; - QListViewItem* dragOverItem; + Q3ListViewItem* dragOverItem; QPoint dragOverPoint; @@ -137,5 +152,5 @@ public: //US KListViewLineEdit *editor; - QValueList<int> renameable; + Q3ValueList<int> renameable; bool cursorInExecuteArea:1; @@ -171,6 +186,6 @@ public: int mDropVisualizerWidth; QRect mOldDropHighlighter; - QListViewItem *afterItemDrop; - QListViewItem *parentItemDrop; + Q3ListViewItem *afterItemDrop; + Q3ListViewItem *parentItemDrop; QColor alternateBackground; @@ -227,5 +242,5 @@ 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) { if (pi) @@ -240,7 +255,7 @@ 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(); /* Does what the QListViewItem::previousSibling() @@ -253,5 +268,5 @@ static QListViewItem *prevItem (QListViewItem *pi) } -static QListViewItem *lastQChild (QListViewItem *pi) +static Q3ListViewItem *lastQChild (Q3ListViewItem *pi) { if (pi) @@ -261,5 +276,5 @@ static QListViewItem *lastQChild (QListViewItem *pi) * item. */ - for (QListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling()) + for (Q3ListViewItem *pt = pi->nextSibling(); pt; pt = pt->nextSibling()) pi = pt; } @@ -329,8 +344,8 @@ bool KListViewLineEdit::event (QEvent *pe) if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) && 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; } @@ -407,5 +422,5 @@ void KListViewLineEdit::slotSelectionChanged() KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse ) - : QListView( parent, name ), + : Q3ListView( parent, name ), d (new KListViewPrivate (this)) { @@ -418,6 +433,6 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse connect( this, SIGNAL( onViewport() ), this, SLOT( slotOnViewport() ) ); - connect( this, SIGNAL( onItem( QListViewItem * ) ), - this, SLOT( slotOnItem( QListViewItem * ) ) ); + connect( this, SIGNAL( onItem( Q3ListViewItem * ) ), + this, SLOT( slotOnItem( Q3ListViewItem * ) ) ); connect (this, SIGNAL(contentsMoving(int,int)), @@ -446,15 +461,15 @@ KListView::KListView( QWidget *parent, const char *name ,bool emulateRightMouse if (d->showContextMenusOnPress) { - 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))); } else { - 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*))); @@ -481,5 +496,5 @@ QSize KListView::sizeHint() const //qDebug("KListView::QSize sizeHint() "); #ifdef DESKTOP_VERSION - return QListView::sizeHint(); + return Q3ListView::sizeHint(); #else return QSize ( 40, 40 ); @@ -504,5 +519,5 @@ bool KListView::isExecuteArea( int x ) } -void KListView::slotOnItem( QListViewItem *item ) +void KListView::slotOnItem( Q3ListViewItem *item ) { QPoint vp = viewport()->mapFromGlobal( QCursor::pos() ); @@ -535,10 +550,10 @@ void KListView::slotSettingsChanged(int category) // qDebug("KListView::slotSettingsChanged: single%i", d->bUseSingle); - 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))); //US d->bChangeCursorOverItem = KGlobalSettings::changeCursorOverIcon(); @@ -612,5 +627,5 @@ void KListView::slotAutoSelect() setFocus(); - QListViewItem* previousItem = currentItem(); + Q3ListViewItem* previousItem = currentItem(); setCurrentItem( d->pCurrentItem ); @@ -633,5 +648,5 @@ 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 ) { if ( down && lit.current() == d->pCurrentItem ) { @@ -652,5 +667,5 @@ void KListView::slotAutoSelect() emit selectionChanged(); - if( selectionMode() == QListView::Single ) + if( selectionMode() == Q3ListView::Single ) emit selectionChanged( d->pCurrentItem ); } @@ -685,5 +700,5 @@ 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) { // qDebug("KListView::emitExecute buttonstate=%i", buttonstate); @@ -702,5 +717,5 @@ 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)) ) ) { @@ -715,5 +730,5 @@ void KListView::focusInEvent( QFocusEvent *fe ) { // kdDebug()<<"KListView::focusInEvent()"<<endl; - QListView::focusInEvent( fe ); + Q3ListView::focusInEvent( fe ); if ((d->selectedBySimpleMove) && (d->selectionMode == FileManager) @@ -748,5 +763,5 @@ void KListView::focusOutEvent( QFocusEvent *fe ) }; - QListView::focusOutEvent( fe ); + Q3ListView::focusOutEvent( fe ); } @@ -755,5 +770,5 @@ void KListView::leaveEvent( QEvent *e ) d->autoSelect.stop(); - QListView::leaveEvent( e ); + Q3ListView::leaveEvent( e ); } @@ -766,5 +781,5 @@ bool KListView::event( QEvent *e ) } - return QListView::event(e); + return Q3ListView::event(e); } @@ -772,5 +787,5 @@ 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) ) { bool block = signalsBlocked(); @@ -794,5 +809,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) QPoint p( contentsToViewport( e->pos() ) ); - QListViewItem *at = itemAt (p); + Q3ListViewItem *at = itemAt (p); // true if the root decoration of the item "at" was clicked (i.e. the +/- sign) @@ -802,5 +817,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) && ( p.x() >= header()->cellPos( header()->mapToActual( 0 ) ) ); - if (e->button() == LeftButton && !rootDecoClicked) + if (e->button() == Qt::LeftButton && !rootDecoClicked) { //Start a drag @@ -814,5 +829,5 @@ void KListView::contentsMousePressEvent( QMouseEvent *e ) } - QListView::contentsMousePressEvent( e ); + Q3ListView::contentsMousePressEvent( e ); } @@ -820,10 +835,10 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e ) { if (!dragEnabled() || d->startDragPos.isNull() || !d->validDrag) { - QListView::contentsMouseMoveEvent (e); + Q3ListView::contentsMouseMoveEvent (e); return; } QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt( vp ); + Q3ListViewItem *item = itemAt( vp ); //do we process cursor changes at all? @@ -854,5 +869,5 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e ) //(d->startDragPos - e->pos()).manhattanLength() > QApplication::startDragDistance()) { - QListView::contentsMouseReleaseEvent( 0 ); + Q3ListView::contentsMouseReleaseEvent( 0 ); startDrag(); d->startDragPos = QPoint(); @@ -863,5 +878,5 @@ void KListView::contentsMouseMoveEvent( QMouseEvent *e ) void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) { - if (e->button() == LeftButton) + if (e->button() == Qt::LeftButton) { // If the row was already selected, maybe we want to start an in-place editing @@ -869,5 +884,5 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) { QPoint p( contentsToViewport( e->pos() ) ); - QListViewItem *at = itemAt (p); + Q3ListViewItem *at = itemAt (p); if ( at ) { @@ -891,5 +906,5 @@ void KListView::contentsMouseReleaseEvent( QMouseEvent *e ) d->startDragPos = QPoint(); } - QListView::contentsMouseReleaseEvent( e ); + Q3ListView::contentsMouseReleaseEvent( e ); } @@ -902,6 +917,6 @@ 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 int col = item ? header()->mapToLogical( header()->cellAt( vp.x() ) ) : -1; @@ -912,5 +927,5 @@ void KListView::contentsMouseDoubleClickEvent ( QMouseEvent *e ) emit doubleClicked( item, e->globalPos(), col ); - if( (e->button() == LeftButton) && !d->bUseSingle ) { + if( (e->button() == Qt::LeftButton) && !d->bUseSingle ) { //qDebug("KListView::contentsMouseDoubleClickEvent: emitExecute"); @@ -920,9 +935,9 @@ 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 ) { //qDebug("KListView::slotMouseButtonClicked"); - if( (btn == LeftButton) && item ) { + if( (btn == Qt::LeftButton) && item ) { //qDebug("KListView::slotMouseButtonClicked: emitExecute"); @@ -962,10 +977,10 @@ 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) { iNext=i->itemBelow(); @@ -980,5 +995,5 @@ void KListView::movableDropEvent (QListViewItem* parent, QListViewItem* afterme) i->setSelected(false); - QListViewItem *afterFirst = i->itemAbove(); + Q3ListViewItem *afterFirst = i->itemAbove(); if (!hasMoved) @@ -1001,5 +1016,5 @@ 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); if (current) @@ -1087,12 +1102,12 @@ 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) { QPoint p (contentsToViewport(pos)); // 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 above = lastItem(); @@ -1124,6 +1139,6 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte // Ok, there's one more level of complexity. We may want to become a new // 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 ) { @@ -1147,7 +1162,7 @@ void KListView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewIte } -QListViewItem* KListView::lastChild () const +Q3ListViewItem* KListView::lastChild () const { - QListViewItem* lastchild = firstChild(); + Q3ListViewItem* lastchild = firstChild(); if (lastchild) @@ -1157,9 +1172,9 @@ 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(); @@ -1188,10 +1203,10 @@ qDebug("KListView::startDrag drag&drop not supported yet."); } -QDragObject *KListView::dragObject() +Q3DragObject *KListView::dragObject() { if (!currentItem()) return 0; - return new QStoredDrag("application/x-qlistviewitem", viewport()); + return new Q3StoredDrag("application/x-qlistviewitem", viewport()); } @@ -1247,8 +1262,8 @@ 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); return list; @@ -1256,8 +1271,8 @@ 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) { @@ -1297,6 +1312,6 @@ void KListView::setDropVisualizerWidth (int w) } -QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, - QListViewItem *after) +QRect KListView::drawDropVisualizer(QPainter *p, Q3ListViewItem *parent, + Q3ListViewItem *after) { QRect insertmarker; @@ -1309,5 +1324,5 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, if (after) { - QListViewItem* it = 0L; + Q3ListViewItem* it = 0L; if (after->isOpen()) { @@ -1339,10 +1354,10 @@ QRect KListView::drawDropVisualizer(QPainter *p, QListViewItem *parent, // Remove for KDE 3.0. if (p) - p->fillRect(insertmarker, Dense4Pattern); + p->fillRect(insertmarker, Qt::Dense4Pattern); return insertmarker; } -QRect KListView::drawItemHighlighter(QPainter *painter, QListViewItem *item) +QRect KListView::drawItemHighlighter(QPainter *painter, Q3ListViewItem *item) { QRect r; @@ -1377,5 +1392,5 @@ void KListView::cleanItemHighlighter () } -void KListView::rename(QListViewItem *item, int c) +void KListView::rename(Q3ListViewItem *item, int c) { if (d->renameable.contains(c)) @@ -1404,5 +1419,5 @@ void KListView::setRenameable (int col, bool yesno) } -void KListView::doneEditing(QListViewItem *item, int row) +void KListView::doneEditing(Q3ListViewItem *item, int row) { emit itemRenamed(item, item->text(row), row); @@ -1448,10 +1463,10 @@ bool KListView::dropHighlighter() const } -bool KListView::showTooltip(QListViewItem *item, const QPoint &, int column) const +bool KListView::showTooltip(Q3ListViewItem *item, const QPoint &, int column) const { return ((tooltip(item, column).length()>0) && (column==tooltipColumn())); } -QString KListView::tooltip(QListViewItem *item, int column) const +QString KListView::tooltip(Q3ListViewItem *item, int column) const { return item->text(column); @@ -1483,5 +1498,5 @@ void KListView::keyPressEvent (QKeyEvent* e) if (d->selectionMode != FileManager) - QListView::keyPressEvent (e); + Q3ListView::keyPressEvent (e); else fileManagerKeyPressEvent (e); @@ -1514,43 +1529,43 @@ 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); int oldSelectionDirection(d->selectionDirection); - 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++; 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))) { d->selectedBySimpleMove=true; @@ -1564,10 +1579,10 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) switch (e->key()) { - case Key_Escape: + case Qt::Key_Escape: selectAll(FALSE); emitSelectionChanged=TRUE; break; - case Key_Space: + case Qt::Key_Space: //toggle selection of current item if (d->selectedBySimpleMove) @@ -1577,5 +1592,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Insert: + case Qt::Key_Insert: //toggle selection of current item and move to the next item if (d->selectedBySimpleMove) @@ -1601,5 +1616,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Down: + case Qt::Key_Down: nextItem=item->itemBelow(); //toggle selection of current item and move to the next item @@ -1634,5 +1649,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Up: + case Qt::Key_Up: nextItem=item->itemAbove(); d->selectionDirection=-1; @@ -1669,5 +1684,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_End: + case Qt::Key_End: //move to the last item and toggle selection of all items inbetween nextItem=item; @@ -1694,5 +1709,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Home: + case Qt::Key_Home: // move to the first item and toggle selection of all items inbetween nextItem = firstChild(); @@ -1716,5 +1731,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Next: + case Qt::Key_Next: items=visibleHeight()/item->height(); nextItem=item; @@ -1752,5 +1767,5 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Prior: + case Qt::Key_Prior: items=visibleHeight()/item->height(); nextItem=item; @@ -1786,15 +1801,15 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) break; - case Key_Minus: + case Qt::Key_Minus: if ( item->isOpen() ) setOpen( item, FALSE ); break; - case Key_Plus: + case Qt::Key_Plus: if ( !item->isOpen() && (item->isExpandable() || item->childCount()) ) setOpen( item, TRUE ); break; 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)); bool selectCurrentItem = (d->selectedBySimpleMove) && (item->isSelected()); @@ -1802,7 +1817,7 @@ void KListView::fileManagerKeyPressEvent (QKeyEvent* e) item->setSelected(false); //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); if (realKey && selectCurrentItem) @@ -1851,9 +1866,9 @@ void KListView::setSelectionModeExt (SelectionModeExt mode) case Extended: case NoSelection: - setSelectionMode (static_cast<QListView::SelectionMode>(static_cast<int>(mode))); + setSelectionMode (static_cast<Q3ListView::SelectionMode>(static_cast<int>(mode))); break; case FileManager: - setSelectionMode (QListView::Extended); + setSelectionMode (Q3ListView::Extended); break; @@ -1869,5 +1884,5 @@ KListView::SelectionModeExt KListView::selectionModeExt () const } -int KListView::itemIndex( const QListViewItem *item ) const +int KListView::itemIndex( const Q3ListViewItem *item ) const { if ( !item ) @@ -1877,5 +1892,5 @@ int KListView::itemIndex( const QListViewItem *item ) const return 0; else { - QListViewItemIterator it(firstChild()); + Q3ListViewItemIterator it(firstChild()); uint j = 0; for (; it.current() && it.current() != item; ++it, ++j ); @@ -1888,5 +1903,5 @@ int KListView::itemIndex( const QListViewItem *item ) const } -QListViewItem* KListView::itemAtIndex(int index) +Q3ListViewItem* KListView::itemAtIndex(int index) { if (index<0) @@ -1894,5 +1909,5 @@ QListViewItem* KListView::itemAtIndex(int index) int j(0); - for (QListViewItemIterator it=firstChild(); it.current(); it++) + for (Q3ListViewItemIterator it=firstChild(); it.current(); it++) { if (j==index) @@ -1904,5 +1919,5 @@ QListViewItem* KListView::itemAtIndex(int index) -void KListView::emitContextMenu (KListView*, QListViewItem* i) +void KListView::emitContextMenu (KListView*, Q3ListViewItem* i) { QPoint p; @@ -1917,7 +1932,7 @@ 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; // do not trust the values for QListViewItem* i and int col; @@ -1934,5 +1949,5 @@ void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) void KListView::setAcceptDrops (bool val) { - QListView::setAcceptDrops (val); + Q3ListView::setAcceptDrops (val); viewport()->setAcceptDrops (val); } @@ -1946,5 +1961,5 @@ int KListView::dropVisualizerWidth () const void KListView::viewportPaintEvent(QPaintEvent *e) { - QListView::viewportPaintEvent(e); + Q3ListView::viewportPaintEvent(e); if (d->mOldDropVisualizer.isValid() && e->rect().intersects(d->mOldDropVisualizer)) @@ -1953,5 +1968,5 @@ 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); } if (d->mOldDropHighlighter.isValid() && e->rect().intersects(d->mOldDropHighlighter)) @@ -1989,5 +2004,5 @@ bool KListView::fullWidth() const int KListView::addColumn(const QString& label, int width) { - int result = QListView::addColumn(label, width); + int result = Q3ListView::addColumn(label, width); if (d->fullWidth) { //US header()->setStretchEnabled(false, columns()-2); @@ -1997,7 +2012,7 @@ 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) { //US header()->setStretchEnabled(false, columns()-2); @@ -2009,5 +2024,5 @@ int KListView::addColumn(const QIconSet& iconset, const QString& label, int widt void KListView::removeColumn(int index) { - QListView::removeColumn(index); + Q3ListView::removeColumn(index); //US if (d->fullWidth && index == columns()) header()->setStretchEnabled(true, columns()-1); } @@ -2015,5 +2030,5 @@ void KListView::removeColumn(int index) void KListView::viewportResizeEvent(QResizeEvent* e) { - QListView::viewportResizeEvent(e); + Q3ListView::viewportResizeEvent(e); } @@ -2071,5 +2086,5 @@ void KListView::setSorting(int column, bool ascending) d->sortColumn = column; d->sortAscending = ascending; - QListView::setSorting(column, ascending); + Q3ListView::setSorting(column, ascending); } @@ -2084,56 +2099,56 @@ bool KListView::ascendingSort(void) const } -KListViewItem::KListViewItem(QListView *parent) - : QListViewItem(parent) +KListViewItem::KListViewItem(Q3ListView *parent) + : Q3ListViewItem(parent) { init(); } -KListViewItem::KListViewItem(QListViewItem *parent) - : QListViewItem(parent) +KListViewItem::KListViewItem(Q3ListViewItem *parent) + : Q3ListViewItem(parent) { init(); } -KListViewItem::KListViewItem(QListView *parent, QListViewItem *after) - : QListViewItem(parent, after) +KListViewItem::KListViewItem(Q3ListView *parent, Q3ListViewItem *after) + : Q3ListViewItem(parent, after) { init(); } -KListViewItem::KListViewItem(QListViewItem *parent, QListViewItem *after) - : QListViewItem(parent, after) +KListViewItem::KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after) + : Q3ListViewItem(parent, after) { init(); } -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) { init(); } -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) { init(); } -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) { init(); } -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) { init(); @@ -2213,10 +2228,10 @@ void KListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, in else if (isAlternate()) { //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()); else _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); } - 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 @@ -21,7 +21,18 @@ #define KLISTVIEW_H -#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> //US @@ -31,5 +42,5 @@ class QDragMoveEvent; class QDragEnterEvent; -class QDragObject; +class Q3DragObject; class KConfig; class KLineEdit; @@ -58,5 +69,5 @@ class KLineEdit; * @version $Id$ */ -class KListView : public QListView +class KListView : public Q3ListView { Q_OBJECT @@ -107,13 +118,13 @@ 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 }; void repaintContents( bool erase = true ) { - QScrollView::repaintContents( contentsX(), contentsY(), + Q3ScrollView::repaintContents( contentsX(), contentsY(), visibleWidth(), visibleHeight(), erase ); }; @@ -162,10 +173,10 @@ public: * @return a list containing the currently selected items. */ - 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?) /** * Arbitrarily move @p item to @p parent, positioned immediately after item @p after. */ - void moveItem(QListViewItem *item, QListViewItem *parent, QListViewItem *after); + void moveItem(Q3ListViewItem *item, Q3ListViewItem *parent, Q3ListViewItem *after); /** @@ -174,5 +185,5 @@ public: * @see lastChild() */ - QListViewItem *lastItem() const; + Q3ListViewItem *lastItem() const; /** @@ -181,5 +192,5 @@ public: * @see lastItem() */ - QListViewItem* lastChild () const; + Q3ListViewItem* lastChild () const; /** @@ -277,5 +288,5 @@ public: * all items into account not only the visible ones. */ - int itemIndex( const QListViewItem *item ) const; + int itemIndex( const Q3ListViewItem *item ) const; /** @@ -284,5 +295,5 @@ public: * all items into account not only the visible ones. */ - QListViewItem* itemAtIndex(int index); + Q3ListViewItem* itemAtIndex(int index); /** @@ -315,5 +326,5 @@ public: * Reimplemented for full width support */ - virtual int addColumn(const QIconSet& iconset, const QString& label, int width = -1); + virtual int addColumn(const QIcon& iconset, const QString& label, int width = -1); /** * Reimplemented for full width support @@ -389,5 +400,5 @@ signals: * connected to this signal. */ - void executed( QListViewItem *item ); + void executed( Q3ListViewItem *item ); /** @@ -402,5 +413,5 @@ signals: * connected to this signal. */ - void executed( QListViewItem *item, const QPoint &pos, int c ); + void executed( Q3ListViewItem *item, const QPoint &pos, int c ); /** @@ -418,6 +429,6 @@ signals: * to use @ref #executed() instead. */ - 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 ); /** @@ -431,5 +442,5 @@ signals: * @see #acceptDrop() */ - void dropped (QDropEvent * e, QListViewItem *after); + void dropped (QDropEvent * e, Q3ListViewItem *after); /** @@ -445,5 +456,5 @@ signals: * the drop was above all items */ - void dropped (KListView* list, QDropEvent* e, QListViewItem* after); + void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* after); /** @@ -459,5 +470,5 @@ signals: * the drop was above all items */ - void dropped (KListView* list, QDropEvent* e, QListViewItem* parent, QListViewItem* after); + void dropped (KListView* list, QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); /** @@ -472,5 +483,5 @@ signals: * the drop was above all items */ - void dropped (QDropEvent* e, QListViewItem* parent, QListViewItem* after); + void dropped (QDropEvent* e, Q3ListViewItem* parent, Q3ListViewItem* after); /** @@ -503,5 +514,5 @@ signals: * @param afterNow the item it's currently after. */ - void moved (QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow); + void moved (Q3ListViewItem *item, Q3ListViewItem *afterFirst, Q3ListViewItem *afterNow); @@ -511,5 +522,5 @@ signals: * with the first of afterFirst and afterNow. */ - void moved(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow); + void moved(Q3PtrList<Q3ListViewItem> &items, Q3PtrList<Q3ListViewItem> &afterFirst, Q3PtrList<Q3ListViewItem> &afterNow); /** @@ -520,10 +531,10 @@ signals: * @param col is the renamed column. */ - void itemRenamed(QListViewItem* item, const QString &str, int col); + void itemRenamed(Q3ListViewItem* item, const QString &str, int col); /** * Same as above, but without the extra information. */ - void itemRenamed(QListViewItem* item); + void itemRenamed(Q3ListViewItem* item); void signalDelete(); @@ -538,5 +549,5 @@ signals: * @param item is the @ref currentItem() at the time the key was pressed. May be 0L. */ - void menuShortCutPressed (KListView* list, QListViewItem* item); + void menuShortCutPressed (KListView* list, Q3ListViewItem* item); /** @@ -548,5 +559,5 @@ signals: * @param p is the point at which the menu should be shown. */ - void contextMenu (KListView* l, QListViewItem* i, const QPoint& p); + void contextMenu (KListView* l, Q3ListViewItem* i, const QPoint& p); public slots: @@ -554,5 +565,5 @@ public slots: * Rename column @p c of @p item. */ - virtual void rename(QListViewItem *item, int c); + virtual void rename(Q3ListViewItem *item, int c); /** @@ -674,5 +685,5 @@ protected: * before being passed to the above function. */ - inline bool below (QListViewItem* i, const QPoint& p) + inline bool below (Q3ListViewItem* i, const QPoint& p) { return below (itemRect(i), contentsToViewport(p)); @@ -690,5 +701,5 @@ 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); /** @@ -722,10 +733,10 @@ protected: * @return the tooltip for @p column of @p item. */ - virtual QString tooltip(QListViewItem* item, int column) const; + virtual QString tooltip(Q3ListViewItem* item, int column) const; /** * @return whether the tooltip for @p column of @p item shall be shown at point @p pos. */ - virtual bool showTooltip(QListViewItem *item, const QPoint &pos, int column) const; + virtual bool showTooltip(Q3ListViewItem *item, const QPoint &pos, int column) const; /** @@ -806,5 +817,5 @@ protected: * @see setDragEnabled() */ - virtual QDragObject *dragObject(); + virtual Q3DragObject *dragObject(); /** @@ -822,5 +833,5 @@ protected: * @return the rectangle that you painted to. */ - virtual QRect drawDropVisualizer (QPainter *p, QListViewItem *parent, QListViewItem *after); + virtual QRect drawDropVisualizer (QPainter *p, Q3ListViewItem *parent, Q3ListViewItem *after); /** @@ -830,5 +841,5 @@ protected: * @return the rectangle that you painted to. */ - virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item); + virtual QRect drawItemHighlighter(QPainter *painter, Q3ListViewItem *item); /** @@ -887,6 +898,6 @@ protected slots: void slotSettingsChanged(int); - 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); /** @@ -903,10 +914,10 @@ protected slots: * Emit the @ref contextMenu signal. This slot is for mouse actions. */ - void emitContextMenu (QListViewItem*, const QPoint&, int); + void emitContextMenu (Q3ListViewItem*, const QPoint&, int); /** * Emit the @ref #contextMenu signal. This slot is for key presses. */ - void emitContextMenu (KListView*, QListViewItem*); + void emitContextMenu (KListView*, Q3ListViewItem*); /** @@ -914,5 +925,5 @@ protected slots: * @internal */ - void slotOnItem( QListViewItem *item ); + void slotOnItem( Q3ListViewItem *item ); /** @@ -940,5 +951,5 @@ protected: * Handle dropEvent when itemsMovable() is set to true. */ - virtual void movableDropEvent (QListViewItem* parent, QListViewItem* afterme); + virtual void movableDropEvent (Q3ListViewItem* parent, Q3ListViewItem* afterme); /** @@ -948,5 +959,5 @@ protected: * acceptDrag method without ugly casts */ - virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after); + virtual void findDrop(const QPoint &pos, Q3ListViewItem *&parent, Q3ListViewItem *&after); /** @@ -975,5 +986,5 @@ private: * @short listview item with alternate background colour support */ -class KListViewItem : public QListViewItem +class KListViewItem : public Q3ListViewItem { public: @@ -984,10 +995,10 @@ public: * (or subclasses). */ - 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, QString = QString::null, QString = QString::null, @@ -995,5 +1006,5 @@ public: QString = QString::null, QString = QString::null); - KListViewItem(QListViewItem *parent, + KListViewItem(Q3ListViewItem *parent, QString, QString = QString::null, QString = QString::null, QString = QString::null, @@ -1001,5 +1012,5 @@ public: QString = QString::null, QString = QString::null); - KListViewItem(QListView *parent, QListViewItem *after, + KListViewItem(Q3ListView *parent, Q3ListViewItem *after, QString, QString = QString::null, QString = QString::null, QString = QString::null, @@ -1007,5 +1018,5 @@ public: QString = QString::null, QString = QString::null); - KListViewItem(QListViewItem *parent, QListViewItem *after, + KListViewItem(Q3ListViewItem *parent, Q3ListViewItem *after, QString, QString = QString::null, QString = QString::null, QString = QString::null, diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp index fa678f2..bac0db8 100644 --- a/microkde/kdeui/kmainwindow.cpp +++ b/microkde/kdeui/kmainwindow.cpp @@ -22,5 +22,5 @@ Boston, MA 02111-1307, USA. */ -#include <qobjectlist.h> +#include <qobject.h> #include <qstringlist.h> #include <qtimer.h> @@ -28,4 +28,10 @@ #include <qstatusbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <QCloseEvent> +#include <QPaintEvent> +#include <QResizeEvent> +#include <QChildEvent> +#include <Q3PtrList> @@ -55,5 +61,5 @@ 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 )*/ { mQToolBar = 0; @@ -277,5 +283,5 @@ void KMainWindow::setCaption( const QString &caption, bool modified ) void KMainWindow::setPlainCaption( const QString &caption ) { - QMainWindow::setCaption( caption ); + Q3MainWindow::setCaption( caption ); #ifndef Q_WS_QWS //US the following is disabled for the embedded version @@ -422,8 +428,8 @@ void KMainWindow::createStandardStatusBarAction(){ } -QToolBar *KMainWindow::tBar( ) +Q3ToolBar *KMainWindow::tBar( ) { if ( ! mQToolBar ) - mQToolBar = new QToolBar( this ); + mQToolBar = new Q3ToolBar( this ); return mQToolBar; } @@ -444,14 +450,15 @@ KToolBar *KMainWindow::toolBar( const char * name ) else */ - 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" ) ) continue; @@ -459,5 +466,5 @@ QPtrListIterator<KToolBar> KMainWindow::toolBarIterator() } } - return QPtrListIterator<KToolBar>( toolbarList ); + return Q3PtrListIterator<KToolBar>( toolbarList ); } @@ -470,5 +477,5 @@ void KMainWindow::setAutoSaveSettings( const QString & groupName, bool saveWindo //US connect( this, SIGNAL( dockWindowPositionChanged( QDockWindow * ) ), //US this, SLOT( setSettingsDirty() ) ); - connect( this, SIGNAL( toolBarPositionChanged(QToolBar *) ), + connect( this, SIGNAL( toolBarPositionChanged(Q3ToolBar *) ), this, SLOT( setSettingsDirty() ) ); @@ -504,5 +511,5 @@ QString KMainWindow::autoSaveGroup() const void KMainWindow::saveAutoSaveSettings() { - ASSERT( d->autoSaveSettings ); + Q_ASSERT( d->autoSaveSettings ); //kdDebug(200) << "KMainWindow::saveAutoSaveSettings -> saving settings" << endl; saveMainWindowSettings( KGlobal::config(), d->autoSaveGroup ); @@ -640,5 +647,5 @@ void KMainWindow::saveMainWindowSettings(KConfig *config, const QString &configG int n = 1; // Toolbar counter. toolbars are counted from 1, KToolBar *toolbar = 0; - QPtrListIterator<KToolBar> it( toolBarIterator() ); + Q3PtrListIterator<KToolBar> it( toolBarIterator() ); while ( ( toolbar = it.current() ) ) { ++it; @@ -715,17 +722,19 @@ void KMainWindow::applyMainWindowSettings(KConfig *config, const QString &config //US i = config->readListEntry (QString::fromLatin1("MenuBar"), entryList, ';'); 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(); + } + } } int n = 1; // Toolbar counter. toolbars are counted from 1, KToolBar *toolbar; - QPtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator + Q3PtrListIterator<KToolBar> it( toolBarIterator() ); // must use own iterator for ( ; it.current(); ++it) { @@ -757,5 +766,5 @@ void KMainWindow::finalizeGUI( bool force ) // the toolbariterator should give them in the proper order. // Both the XMLGUI and applySettings call this, hence "force" for the latter. - QPtrListIterator<KToolBar> it( toolBarIterator() ); + Q3PtrListIterator<KToolBar> it( toolBarIterator() ); for ( ; it.current() ; ++ it ) it.current()->positionYourself( force ); @@ -852,5 +861,5 @@ void KMainWindow::resizeEvent( QResizeEvent * e) if ( d->autoSaveWindowSize ) setSettingsDirty(); - QMainWindow::resizeEvent( e ); + Q3MainWindow::resizeEvent( e ); } @@ -870,5 +879,5 @@ QMenuBar *KMainWindow::menuBar() // trigger a re-layout and trigger a call to the private // setMenuBar method. - QMainWindow::menuBar(); + Q3MainWindow::menuBar(); } return mb; @@ -885,5 +894,5 @@ QStatusBar *KMainWindow::statusBar() // trigger a re-layout and trigger a call to the private // setStatusBar method. - QMainWindow::statusBar(); + Q3MainWindow::statusBar(); } return sb; @@ -909,14 +918,8 @@ 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(); } @@ -925,24 +928,18 @@ 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(); } void KMainWindow::childEvent( QChildEvent* e) { - QMainWindow::childEvent( e ); + Q3MainWindow::childEvent( e ); } 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,2 +1,7 @@ +//Added by qt3to4: +#include <QResizeEvent> +#include <QChildEvent> +#include <QCloseEvent> +#include <QPaintEvent> /* This file is part of the KDE libraries @@ -51,10 +56,10 @@ class KAction; #include <ktoolbarhandler.h> #include <kxmlguiclient.h> -#include <qmainwindow.h> -#include <qptrlist.h> +#include <q3mainwindow.h> +#include <q3ptrlist.h> class KActionCollection; -class KMainWindow : public QMainWindow, virtual public KXMLGUIClient +class KMainWindow : public Q3MainWindow, virtual public KXMLGUIClient { Q_OBJECT @@ -321,10 +326,10 @@ public: KToolBar *toolBar( const char *name=0 ); // method for getting rid of KDE-Crap - QToolBar *tBar( ); + Q3ToolBar *tBar( ); /** * @return An iterator over the list of all toolbars for this window. */ - QPtrListIterator<KToolBar> toolBarIterator(); + Q3PtrListIterator<KToolBar> toolBarIterator(); /** @@ -759,5 +764,5 @@ private slots: private: - QToolBar * mQToolBar; + Q3ToolBar * mQToolBar; //US KMenuBar *internalMenuBar(); QMenuBar *internalMenuBar(); @@ -768,5 +773,5 @@ private: void initKMainWindow(const char *name); - QPtrList<KToolBar> toolbarList; + Q3PtrList<KToolBar> toolbarList; protected: 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 @@ -43,4 +43,7 @@ #include <qspinbox.h> #include <qstyle.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QEvent> #include <kglobal.h> @@ -107,9 +110,9 @@ void KNumInput::setLabel(const QString & label, int a) if (m_label) m_label->setText(label); 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; } @@ -132,5 +135,5 @@ void KNumInput::layout(bool deep) m_sizeLabel = (m_label ? m_label->sizeHint() : QSize(0,0)); - if(m_label && (m_alignment & AlignVCenter)) + if(m_label && (m_alignment & Qt::AlignVCenter)) m_colw1 = m_sizeLabel.width() + 4; else @@ -203,5 +206,5 @@ KIntSpinBox::KIntSpinBox(QWidget *parent, const char *name) : QSpinBox(0, 99, 1, parent, name) { - editor()->setAlignment(AlignRight); + setAlignment(Qt::AlignRight); val_base = 10; setValue(0); @@ -216,5 +219,5 @@ KIntSpinBox::KIntSpinBox(int lower, int upper, int step, int value, int base, : QSpinBox(lower, upper, step, parent, name) { - editor()->setAlignment(AlignRight); + setAlignment(Qt::AlignRight); val_base = base; setValue(value); @@ -244,7 +247,7 @@ int KIntSpinBox::mapTextToValue(bool* ok) void KIntSpinBox::setEditFocus(bool mark) { - editor()->setFocus(); + setFocus(); if(mark) - editor()->selectAll(); + selectAll(); } @@ -326,5 +329,5 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider) m_spin->setLineStep(step); - step = m_spin->lineStep(); // maybe QRangeControl didn't like out lineStep? + step = m_spin->singleStep(); // maybe QRangeControl didn't like out lineStep? if(slider) { @@ -333,5 +336,5 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider) else { m_slider = new QSlider(lower, upper, step, m_spin->value(), - QSlider::Horizontal, this); + Qt::Horizontal, this); m_slider->setTickmarks(QSlider::Below); connect(m_slider, SIGNAL(valueChanged(int)), @@ -359,5 +362,5 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider) 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); } @@ -369,5 +372,5 @@ int KIntNumInput::minValue() const 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); } @@ -416,5 +419,5 @@ 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(); else @@ -425,5 +428,5 @@ QSize KIntNumInput::minimumSizeHint() const w += m_colw1 + m_colw2; - if(m_alignment & (AlignTop|AlignBottom)) + if(m_alignment & (Qt::AlignTop|Qt::AlignBottom)) w = QMAX(w, m_sizeLabel.width() + 4); @@ -445,10 +448,10 @@ void KIntNumInput::resizeEvent(QResizeEvent* e) int h = 0; - if(m_label && (m_alignment & AlignTop)) { + if(m_label && (m_alignment & Qt::AlignTop)) { m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); h += m_sizeLabel.height() + 4; } - if(m_label && (m_alignment & AlignVCenter)) + if(m_label && (m_alignment & Qt::AlignVCenter)) m_label->setGeometry(0, 0, w, m_sizeSpin.height()); @@ -461,5 +464,5 @@ void KIntNumInput::resizeEvent(QResizeEvent* e) h += m_sizeSpin.height() + 2; - if(m_label && (m_alignment & AlignBottom)) + if(m_label && (m_alignment & Qt::AlignBottom)) m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); } @@ -647,5 +650,5 @@ 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(); else @@ -656,5 +659,5 @@ QSize KDoubleNumInput::minimumSizeHint() const w += m_colw1 + m_colw2; - if(m_alignment & (AlignTop|AlignBottom)) + if(m_alignment & (Qt::AlignTop|Qt::AlignBottom)) w = QMAX(w, m_sizeLabel.width() + 4); @@ -667,10 +670,10 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e) int h = 0; - if(m_label && (m_alignment & AlignTop)) { + if(m_label && (m_alignment & Qt::AlignTop)) { m_label->setGeometry(0, 0, e->size().width(), m_sizeLabel.height()); h += m_sizeLabel.height() + 4; } - if(m_label && (m_alignment & AlignVCenter)) + if(m_label && (m_alignment & Qt::AlignVCenter)) m_label->setGeometry(0, 0, w, m_sizeEdit.height()); @@ -684,5 +687,5 @@ void KDoubleNumInput::resizeEvent(QResizeEvent* e) h += m_sizeEdit.height() + 2; - if(m_label && (m_alignment & AlignBottom)) + if(m_label && (m_alignment & Qt::AlignBottom)) m_label->setGeometry(0, h, m_sizeLabel.width(), m_sizeLabel.height()); } @@ -731,5 +734,5 @@ void KDoubleNumInput::setRange(double lower, double upper, double step, int slmin = spin->minValue(); int slvalue = spin->value(); - int slstep = spin->lineStep(); + int slstep = spin->singleStep(); if (m_slider) { m_slider->setRange(slmin, slmax); @@ -738,5 +741,5 @@ void KDoubleNumInput::setRange(double lower, double upper, double step, } else { m_slider = new QSlider(slmin, slmax, slstep, slvalue, - QSlider::Horizontal, this); + Qt::Horizontal, this); m_slider->setTickmarks(QSlider::Below); // feedback line: when one moves, the other moves, too: @@ -913,5 +916,5 @@ KDoubleSpinBox::KDoubleSpinBox( QWidget * parent, const char * name ) : QSpinBox( parent, name ) { - editor()->setAlignment( Qt::AlignRight ); + setAlignment( Qt::AlignRight ); d = new Private(); updateValidator(); @@ -923,5 +926,5 @@ KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step, : QSpinBox( parent, name ) { - editor()->setAlignment( Qt::AlignRight ); + setAlignment( Qt::AlignRight ); d = new Private(); setRange( lower, upper, step, precision ); @@ -1028,5 +1031,5 @@ void KDoubleSpinBox::setMaxValue( double value ) { double KDoubleSpinBox::lineStep() const { - return d->mapToDouble( base::lineStep() ); + return d->mapToDouble( base::singleStep() ); } @@ -1073,5 +1076,5 @@ void KDoubleSpinBox::updateValidator() { d->mValidator = new KDoubleValidator( minValue(), maxValue(), precision(), this, "d->mValidator" ); - base::setValidator( d->mValidator ); + lineEdit()->setValidator( d->mValidator ); } else d->mValidator->setRange( minValue(), maxValue(), precision() ); 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 @@ -30,4 +30,9 @@ #include <qwidget.h> #include <qspinbox.h> +#include <QLineEdit> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> +#include <QEvent> class QLabel; @@ -82,5 +87,5 @@ public: * */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); /** @@ -303,5 +308,5 @@ public: * @reimplemented */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); /** @@ -589,5 +594,5 @@ public: * @reimplemented */ - virtual void setLabel(const QString & label, int a = AlignLeft | AlignTop); + virtual void setLabel(const QString & label, int a = Qt::AlignLeft | Qt::AlignTop); /** * @reimplemented @@ -759,4 +764,8 @@ public: void setEditFocus(bool mark); + 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 @@ -2,8 +2,11 @@ #include <kpopupmenu.h> #include <qtimer.h> +//Added by qt3to4: +#include <QFocusEvent> +#include <Q3PopupMenu> 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 @@ -2,5 +2,7 @@ #define KPOPUPMENU_H -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <QFocusEvent> #ifdef DESKTOP_VERSION #include <qmenubar.h> @@ -10,5 +12,5 @@ #endif -class KPopupMenu : public QPopupMenu +class KPopupMenu : public Q3PopupMenu { Q_OBJECT 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 @@ -19,4 +19,6 @@ #include <qstyle.h> +//Added by qt3to4: +#include <Q3Frame> #include <kdebug.h> @@ -27,6 +29,6 @@ #include "kseparator.h" -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) { setLineWidth(1); @@ -37,6 +39,6 @@ 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) { setLineWidth(1); @@ -51,7 +53,7 @@ void KSeparator::setOrientation(int orientation) switch(orientation) { - case Vertical: + case Qt::Vertical: case VLine: - setFrameStyle( QFrame::VLine | QFrame::Sunken ); + setFrameStyle( Q3Frame::VLine | Q3Frame::Sunken ); setMinimumSize(2, 0); break; @@ -60,7 +62,7 @@ void KSeparator::setOrientation(int orientation) kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl; - case Horizontal: + case Qt::Horizontal: case HLine: - setFrameStyle( QFrame::HLine | QFrame::Sunken ); + setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken ); setMinimumSize(0, 2); break; 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 @@ -21,5 +21,5 @@ #define __KSEPARATOR_H__ -#include <qframe.h> +#include <q3frame.h> /** @@ -29,5 +29,5 @@ * @version $Id$ */ -class KSeparator : public QFrame +class KSeparator : public Q3Frame { Q_OBJECT @@ -37,5 +37,5 @@ class KSeparator : public QFrame * Constructor. **/ - KSeparator(QWidget* parent=0, const char* name=0, WFlags f=0); + KSeparator(QWidget* parent=0, const char* name=0, Qt::WFlags f=0); /** * Constructor. @@ -45,5 +45,5 @@ 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 @@ -19,4 +19,7 @@ #include "ksqueezedtextlabel.h" #include <qtooltip.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> KSqueezedTextLabel::KSqueezedTextLabel( const QString &text , QWidget *parent, const char *name ) diff --git a/microkde/kdeui/ksqueezedtextlabel.h b/microkde/kdeui/ksqueezedtextlabel.h index 1634adc..487d0b0 100644 --- a/microkde/kdeui/ksqueezedtextlabel.h +++ b/microkde/kdeui/ksqueezedtextlabel.h @@ -21,4 +21,6 @@ #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 @@ -20,5 +20,5 @@ #include <qtoolbutton.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> //US #include <kaboutdata.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 @@ -26,7 +26,18 @@ #ifdef KDE_USE_FINAL #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> @@ -41,5 +52,5 @@ #include <qstring.h> #include <qrect.h> -#include <qobjectlist.h> +#include <qobject.h> #include <qtimer.h> #include <qstyle.h> @@ -70,6 +81,6 @@ #include "kconfigbase.h" -#include <qpopupmenu.h> -#include <qmainwindow.h> +#include <q3popupmenu.h> +#include <q3mainwindow.h> enum { @@ -103,5 +114,5 @@ public: //US oldPos = Qt::DockUnmanaged; - oldPos = QMainWindow::Unmanaged; + oldPos = Qt::Unmanaged; modified = m_isHorizontal = positioned = FALSE; @@ -130,5 +141,5 @@ public: QWidget *m_parent; - QMainWindow::ToolBarDock oldPos; + Qt::ToolBarDock oldPos; KXMLGUIClient *m_xmlguiClient; @@ -137,15 +148,15 @@ 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; bool newline; //US Qt::Dock dock; - QMainWindow::ToolBarDock dock; + Qt::ToolBarDock dock; }; ToolBarInfo toolBarInfo; - QValueList<int> iconSizes; + Q3ValueList<int> iconSizes; QTimer repaintTimer; @@ -159,13 +170,13 @@ public: QString PositionDefault; - 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 ); setBackgroundMode( parent->backgroundMode() ); @@ -173,9 +184,9 @@ KToolBarSeparator::KToolBarSeparator(Orientation o , bool l, QToolBar *parent, } -void KToolBarSeparator::setOrientation( Orientation o ) +void KToolBarSeparator::setOrientation( Qt::Orientation o ) { orient = o; if ( line ) { - if ( orientation() == Vertical ) + if ( orientation() == Qt::Vertical ) setFrameStyle( HLine + Sunken ); else @@ -193,5 +204,5 @@ void KToolBarSeparator::styleChange( QStyle& ) QSize KToolBarSeparator::sizeHint() const { - return orientation() == Vertical ? QSize( 0, 6 ) : QSize( 6, 0 ); + return orientation() == Qt::Vertical ? QSize( 0, 6 ) : QSize( 6, 0 ); } @@ -203,10 +214,10 @@ QSizePolicy KToolBarSeparator::sizePolicy() const KToolBar::KToolBar( QWidget *parent, const char *name, bool honorStyle, bool readConfig ) #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, name ? name : "mainToolBar") #else - : QPEToolBar( parent && parent->inherits( "QMainWindow" ) ? static_cast<QMainWindow*>(parent) : 0, + : QPEToolBar( parent && parent->inherits( "Q3MainWindow" ) ? static_cast<Q3MainWindow*>(parent) : 0, QString::fromLatin1( name )) @@ -217,7 +228,7 @@ 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, name ? name : "mainToolBar") @@ -232,7 +243,7 @@ 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, name ? name : "mainToolBar") @@ -281,6 +292,6 @@ 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 * ) ) ); // Hack to make sure we recalculate our size when we dock. @@ -342,5 +353,5 @@ 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 ) { @@ -354,5 +365,5 @@ 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 ) { @@ -541,5 +552,5 @@ void KToolBar::setButtonIcon( int id, const QString& _icon ) } -void KToolBar::setButtonIconSet( int id, const QIconSet& iconset ) +void KToolBar::setButtonIconSet( int id, const QIcon& iconset ) { Id2WidgetMap::Iterator it = id2widget.find( id ); @@ -553,5 +564,5 @@ 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 ) { Id2WidgetMap::Iterator it = id2widget.find( id ); @@ -788,5 +799,5 @@ void KToolBar::setItemAutoSized (int id, bool yes ) void KToolBar::clear () { - QToolBar::clear(); + Q3ToolBar::clear(); widget2id.clear(); id2widget.clear(); @@ -877,5 +888,5 @@ void KToolBar::setBarPos (BarPosition bpos) return; //US mainWindow()->moveDockWindow( this, (Dock)bpos ); - mainWindow()->moveToolBar( this, (QMainWindow::ToolBarDock)bpos ); + mainWindow()->moveToolBar( this, (Qt::ToolBarDock)bpos ); } @@ -883,13 +894,13 @@ void KToolBar::setBarPos (BarPosition bpos) 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; } @@ -968,5 +979,5 @@ void KToolBar::setIconText(IconText icontext, bool update) // ugly hack to force a QMainWindow::triggerLayout( TRUE ) if ( mainWindow() ) { - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); mw->setUpdatesEnabled( FALSE ); mw->setToolBarsMovable( !mw->toolBarsMovable() ); @@ -1005,5 +1016,5 @@ void KToolBar::setIconSize(int size, bool update) // ugly hack to force a QMainWindow::triggerLayout( TRUE ) if ( mainWindow() ) { - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); mw->setUpdatesEnabled( FALSE ); mw->setToolBarsMovable( !mw->toolBarsMovable() ); @@ -1063,8 +1074,8 @@ void KToolBar::setFlat (bool flag) if ( 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 /*US @@ -1250,7 +1261,7 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) if ( !mainWindow() ) 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 ); switch ( i ) { @@ -1259,17 +1270,17 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) case CONTEXT_LEFT: //US mw->moveDockWindow( this, DockLeft ); - mw->moveToolBar( this, QMainWindow::Left ); + mw->moveToolBar( this, Qt::Left ); break; case CONTEXT_RIGHT: //US mw->moveDockWindow( this, DockRight ); - mw->moveToolBar( this, QMainWindow::Right ); + mw->moveToolBar( this, Qt::Right ); break; case CONTEXT_TOP: //US mw->moveDockWindow( this, DockTop ); - mw->moveToolBar( this, QMainWindow::Top ); + mw->moveToolBar( this, Qt::Top ); break; case CONTEXT_BOTTOM: //US mw->moveDockWindow( this, DockBottom ); - mw->moveToolBar( this, QMainWindow::Bottom ); + mw->moveToolBar( this, Qt::Bottom ); break; case CONTEXT_FLOAT: @@ -1277,5 +1288,5 @@ void KToolBar::mousePressEvent ( QMouseEvent *m ) case CONTEXT_FLAT: //US mw->moveDockWindow( this, DockMinimized ); - mw->moveToolBar( this, QMainWindow::Minimized ); + mw->moveToolBar( this, Qt::Minimized ); break; case CONTEXT_ICONS: @@ -1333,5 +1344,5 @@ void KToolBar::rebuildLayout() continue; } - if ( w->inherits( "QPopupMenu" ) ) + if ( w->inherits( "Q3PopupMenu" ) ) continue; l->addWidget( w ); @@ -1365,5 +1376,5 @@ void KToolBar::childEvent( QChildEvent *e ) QWidget * w = (QWidget*)e->child(); if ( e->type() == QEvent::ChildInserted ) { - if ( !e->child()->inherits( "QPopupMenu" ) && + if ( !e->child()->inherits( "Q3PopupMenu" ) && ::qstrcmp( "qt_dockwidget_internal", e->child()->name() ) != 0 ) { @@ -1376,8 +1387,8 @@ void KToolBar::childEvent( QChildEvent *e ) } } - } else { + } else if( e->type() == QEvent::ChildRemoved ) { removeWidgetInternal( w ); } - if ( isVisibleTo( 0 ) ) + /* TODO:hacker: if ( isVisibleTo( 0 ) ) { QBoxLayout *l = boxLayout(); @@ -1391,7 +1402,7 @@ void KToolBar::childEvent( QChildEvent *e ) } layoutTimer->start( 50, TRUE ); - } + } */ } - QToolBar::childEvent( e ); + Q3ToolBar::childEvent( e ); } @@ -1417,5 +1428,5 @@ void KToolBar::repaintMe() { setUpdatesEnabled( true ); - QToolBar::repaint( true ); + Q3ToolBar::repaint( true ); qDebug(" KToolBar::repaintMe() "); } @@ -1424,10 +1435,10 @@ void KToolBar::showEvent( QShowEvent *e ) { rebuildLayout(); - QToolBar::showEvent( e ); + Q3ToolBar::showEvent( e ); } void KToolBar::setStretchableWidget( QWidget *w ) { - QToolBar::setStretchableWidget( w ); + Q3ToolBar::setStretchableWidget( w ); stretchableWidget = w; } @@ -1435,5 +1446,5 @@ void KToolBar::setStretchableWidget( QWidget *w ) QSizePolicy KToolBar::sizePolicy() const { - if ( orientation() == Horizontal ) + if ( orientation() == Qt::Horizontal ) return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); else @@ -1443,5 +1454,5 @@ QSizePolicy KToolBar::sizePolicy() const 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() ); if ( sh.height() <= 20 || sh.width() < 60 ) @@ -1509,5 +1520,5 @@ QSize KToolBar::sizeHint() const default: - minSize = QToolBar::sizeHint(); + minSize = Q3ToolBar::sizeHint(); break; } @@ -1533,10 +1544,10 @@ bool KToolBar::highlight() const void KToolBar::hide() { - QToolBar::hide(); + Q3ToolBar::hide(); } void KToolBar::show() { - QToolBar::show(); + Q3ToolBar::show(); } @@ -1545,5 +1556,5 @@ void KToolBar::resizeEvent( QResizeEvent *e ) bool b = isUpdatesEnabled(); setUpdatesEnabled( FALSE ); - QToolBar::resizeEvent( e ); + Q3ToolBar::resizeEvent( e ); if (b) d->repaintTimer.start( 100, true ); @@ -1727,5 +1738,5 @@ void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGr } - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); // ...and if we should highlight @@ -1806,17 +1817,17 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup) pos = DockMinimized; */ - 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; //kdDebug(220) << "KToolBar::applySettings hidden=" << hidden << endl; @@ -1828,5 +1839,5 @@ void KToolBar::applySettings(KConfig *config, const QString &_configGroup) if ( mainWindow() ) { - QMainWindow *mw = mainWindow(); + Q3MainWindow *mw = mainWindow(); //kdDebug(220) << "KToolBar::applySettings updating ToolbarInfo" << endl; @@ -1863,5 +1874,5 @@ bool KToolBar::event( QEvent *e ) } - return QToolBar::event( e ); + return Q3ToolBar::event( e ); } @@ -1881,12 +1892,12 @@ void KToolBar::slotRepaint() } -void KToolBar::toolBarPosChanged( QToolBar *tb ) +void KToolBar::toolBarPosChanged( Q3ToolBar *tb ) { if ( tb != this ) return; //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 if ( mainWindow() && mainWindow()->inherits( "KMainWindow" ) ) @@ -2032,5 +2043,5 @@ void KToolBar::getAttributes( QString &position, QString &icontext, int &index ) if ( mainWindow() ) { - QMainWindow::ToolBarDock dock; + Qt::ToolBarDock dock; bool newLine; int offset; @@ -2101,5 +2112,5 @@ void KToolBar::positionYourself( bool force ) //US KPopupMenu *KToolBar::contextMenu() -QPopupMenu *KToolBar::contextMenu() +Q3PopupMenu *KToolBar::contextMenu() { if ( context ) @@ -2109,9 +2120,9 @@ QPopupMenu *KToolBar::contextMenu() // won't be deleted by QToolBar::clear(). //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")); //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 ); orient->insertItem( i18n("toolbar position string","Left"), CONTEXT_LEFT ); @@ -2123,5 +2134,5 @@ 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 ); mode->insertItem( i18n("Text Only"), CONTEXT_TEXT ); @@ -2130,8 +2141,8 @@ 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 KIconTheme *theme = KGlobal::instance()->iconLoader()->theme(); @@ -2146,5 +2157,5 @@ QPopupMenu *KToolBar::contextMenu() d->iconSizes = avSizes; - QValueList<int>::Iterator it; + Q3ValueList<int>::Iterator it; for (it=avSizes.begin(); it!=avSizes.end(); it++) { QString text; @@ -2219,6 +2230,6 @@ 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 ) context->setItemChecked( CONTEXT_ICONSIZES + *iIt, false ); 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 @@ -27,25 +27,33 @@ #ifndef DESKTOP_VERSION #define private public -#include <qtoolbar.h> +#include <q3toolbar.h> #undef private #include <qpe/qpetoolbar.h> #else -#include <qtoolbar.h> +#include <q3toolbar.h> #endif -#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> class QDomElement; class QSize; class QPixmap; -class QPopupMenu; +class Q3PopupMenu; class QStringList; class QDomDocument; @@ -64,20 +72,20 @@ class KXMLGUIClient; class KToolBarPrivate; -class KToolBarSeparator : public QFrame +class KToolBarSeparator : public Q3Frame { Q_OBJECT 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; bool showLine() const { return line; } public slots: - void setOrientation( Orientation ); + void setOrientation( Qt::Orientation ); protected: void styleChange( QStyle& ); private: - Orientation orient; + Qt::Orientation orient; bool line; }; @@ -112,8 +120,8 @@ private: #ifndef DESKTOP_VERSION -#define QToolBar QPEToolBar +#define Q3ToolBar QPEToolBar #endif - class KToolBar : public QToolBar + class KToolBar : public Q3ToolBar { Q_OBJECT @@ -128,5 +136,5 @@ private: Q_PROPERTY( QString text READ text WRITE setText ) #ifndef DESKTOP_VERSION -#undef QToolBar +#undef Q3ToolBar #endif public: @@ -176,5 +184,5 @@ public: * @param readConfig whether to apply the configuration (global and application-specific) */ - 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 ); @@ -194,5 +202,5 @@ public: * @param readConfig whether to apply the configuration (global and application-specific) */ - 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 ); @@ -304,5 +312,5 @@ public: * with tables, drawings etc. Just don't fiddle with events there. */ - 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); @@ -319,5 +327,5 @@ public: * with tables, drawings etc. Just don't fiddle with events there. */ - 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); @@ -360,5 +368,5 @@ public: const QString& tooltiptext=QString::null, int size=70, int index=-1, - QComboBox::Policy policy = QComboBox::AtBottom); + QComboBox::Policy policy = QComboBox::InsertAtBottom); /** @@ -376,5 +384,5 @@ public: const QString& tooltiptext=QString::null, int size=70, int index=-1, - QComboBox::Policy policy = QComboBox::AtBottom); + QComboBox::Policy policy = QComboBox::InsertAtBottom); /** @@ -466,5 +474,5 @@ public: * Can be used while button is visible. */ - void setButtonIconSet( int id, const QIconSet& iconset ); + void setButtonIconSet( int id, const QIcon& iconset ); /** @@ -492,5 +500,5 @@ public: * other popups. */ - void setDelayedPopup (int id , QPopupMenu *_popup, bool toggle = false); + void setDelayedPopup (int id , Q3PopupMenu *_popup, bool toggle = false); /** @@ -1061,5 +1069,5 @@ public: public slots: virtual void setIconText( const QString &txt ) - { QToolBar::setIconText( txt ); } + { Q3ToolBar::setIconText( txt ); } void slotRepaint(); @@ -1078,5 +1086,5 @@ private slots: void slotAppearanceChanged(); void slotIconChanged(int); - void toolBarPosChanged( QToolBar *tb ); + void toolBarPosChanged( Q3ToolBar *tb ); void slotContextAboutToShow(); void widgetDestroyed(); @@ -1091,5 +1099,5 @@ private: void getAttributes( QString &position, QString &icontext, int &index ); //US KPopupMenu *contextMenu(); - QPopupMenu *contextMenu(); + Q3PopupMenu *contextMenu(); QMap<QWidget*, int > widget2id; @@ -1097,8 +1105,8 @@ private: Id2WidgetMap id2widget; //US KPopupMenu *context; - QPopupMenu *context; - QPtrList<QWidget> widgets; + Q3PopupMenu *context; + Q3PtrList<QWidget> widgets; QTimer *layoutTimer; - QGuardedPtr<QWidget> stretchableWidget, rightAligned; + QPointer<QWidget> stretchableWidget, rightAligned; protected: virtual void virtual_hook( int id, void* data ); 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 @@ -34,8 +34,12 @@ #include <qtooltip.h> #include <qbitmap.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcursor.h> #include <qpainter.h> #include <qlayout.h> +//Added by qt3to4: +#include <QPixmap> +#include <QMouseEvent> +#include <QEvent> #include <kapplication.h> @@ -49,5 +53,5 @@ #include <kmainwindow.h> -template class QIntDict<KToolBarButton>; +template class Q3IntDict<KToolBarButton>; class KToolBarButtonPrivate @@ -116,5 +120,5 @@ KToolBarButton::KToolBarButton( const QString& _icon, int _id, //US d->m_instance = _instance; - setFocusPolicy( NoFocus ); + setFocusPolicy( Qt::NoFocus ); // connect all of our slots and start trapping events @@ -147,5 +151,5 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id, QToolButton::setTextLabel(txt); - setFocusPolicy( NoFocus ); + setFocusPolicy( Qt::NoFocus ); // connect all of our slots and start trapping events @@ -162,5 +166,5 @@ KToolBarButton::KToolBarButton( const QPixmap& pixmap, int _id, // set our pixmap and do our initial setup - setIconSet( QIconSet( pixmap )); + setIconSet( QIcon( pixmap )); modeChange(); } @@ -293,5 +297,5 @@ void KToolBarButton::setIcon( const QString &icon ) } -void KToolBarButton::setIconSet( const QIconSet &iconset ) +void KToolBarButton::setIconSet( const QIcon &iconset ) { QToolButton::setIconSet( iconset ); @@ -306,6 +310,6 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap ) return; } - QIconSet set = iconSet(); - set.setPixmap( pixmap, QIconSet::Automatic, QIconSet::Active ); + QIcon set = iconSet(); + set.setPixmap( pixmap, QIcon::Automatic, QIcon::Active ); QToolButton::setIconSet( set ); } @@ -313,6 +317,6 @@ void KToolBarButton::setPixmap( const QPixmap &pixmap ) 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 ); } @@ -320,6 +324,6 @@ void KToolBarButton::setDefaultPixmap( const QPixmap &pixmap ) 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 ); } @@ -327,5 +331,5 @@ void KToolBarButton::setDisabledPixmap( const QPixmap &pixmap ) void KToolBarButton::setDefaultIcon( const QString& icon ) { - QIconSet set = iconSet(); + QIcon set = iconSet(); QPixmap pm; if (!strcmp(d->m_parent->name(), "mainToolBar")) @@ -335,5 +339,5 @@ void KToolBarButton::setDefaultIcon( const QString& icon ) pm = /*US d->m_instance->iconLoader()*/KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar, d->m_iconSize ); - set.setPixmap( pm, QIconSet::Automatic, QIconSet::Normal ); + set.setPixmap( pm, QIcon::Automatic, QIcon::Normal ); QToolButton::setIconSet( set ); } @@ -341,5 +345,5 @@ void KToolBarButton::setDefaultIcon( const QString& icon ) void KToolBarButton::setDisabledIcon( const QString& icon ) { - QIconSet set = iconSet(); + QIcon set = iconSet(); QPixmap pm; if (!strcmp(d->m_parent->name(), "mainToolBar")) @@ -349,9 +353,9 @@ void KToolBarButton::setDisabledIcon( const QString& icon ) pm = /*US d->m_instance->iconLoader()*/ KGlobal::iconLoader()->loadIcon( icon, KIcon::Toolbar, d->m_iconSize ); - set.setPixmap( pm, QIconSet::Automatic, QIconSet::Disabled ); + set.setPixmap( pm, QIcon::Automatic, QIcon::Disabled ); QToolButton::setIconSet( set ); } -QPopupMenu *KToolBarButton::popup() +QMenu *KToolBarButton::popup() { // obsolete @@ -360,5 +364,5 @@ QPopupMenu *KToolBarButton::popup() } -void KToolBarButton::setPopup(QPopupMenu *p, bool) +void KToolBarButton::setPopup(Q3PopupMenu *p, bool) { QToolButton::setPopup(p); @@ -367,5 +371,5 @@ void KToolBarButton::setPopup(QPopupMenu *p, bool) -void KToolBarButton::setDelayedPopup (QPopupMenu *p, bool) +void KToolBarButton::setDelayedPopup (Q3PopupMenu *p, bool) { QToolButton::setPopup(p); @@ -452,19 +456,25 @@ 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); #else @@ -485,7 +495,7 @@ void KToolBarButton::drawButton( QPainter *_painter ) isOn() ? QIconSet::On : QIconSet::Off ); */ - 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); if( !pixmap.isNull()) @@ -509,7 +519,7 @@ void KToolBarButton::drawButton( QPainter *_painter ) isOn() ? QIconSet::On : QIconSet::Off ); */ - 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); if( !pixmap.isNull()) @@ -527,5 +537,5 @@ void KToolBarButton::drawButton( QPainter *_painter ) if (!textLabel().isNull()) { - textFlags = AlignVCenter|AlignLeft; + textFlags = Qt::AlignVCenter|Qt::AlignLeft; if (!pixmap.isNull()) dx = 4 + pixmap.width() + 2; @@ -545,5 +555,5 @@ void KToolBarButton::drawButton( QPainter *_painter ) if (!textLabel().isNull()) { - textFlags = AlignVCenter|AlignLeft; + textFlags = Qt::AlignVCenter|Qt::AlignLeft; dx = (width() - fm.width(textLabel())) / 2; dy = (height() - fm.lineSpacing()) / 2; @@ -564,7 +574,7 @@ void KToolBarButton::drawButton( QPainter *_painter ) isOn() ? QIconSet::On : QIconSet::Off ); */ - 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); if( !pixmap.isNull()) @@ -582,5 +592,5 @@ void KToolBarButton::drawButton( QPainter *_painter ) if (!textLabel().isNull()) { - textFlags = AlignBottom|AlignHCenter; + textFlags = Qt::AlignBottom|Qt::AlignHCenter; dx = (width() - fm.width(textLabel())) / 2; dy = height() - fm.lineSpacing() - 4; @@ -611,12 +621,16 @@ 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 style().drawArrow(_painter, Qt::DownArrow, isDown(), 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 @@ -27,6 +27,9 @@ #include <qpixmap.h> #include <qtoolbutton.h> -#include <qintdict.h> +#include <q3intdict.h> #include <qstring.h> +//Added by qt3to4: +#include <QEvent> +#include <Q3PopupMenu> #include <kglobal.h> @@ -35,5 +38,5 @@ class KToolBarButtonPrivate; //USclass KInstance; class QEvent; -class QPopupMenu; +class Q3PopupMenu; class QPainter; @@ -151,5 +154,5 @@ public: * @param iconset The iconset to use */ - virtual void setIconSet( const QIconSet &iconset ); + virtual void setIconSet( const QIcon &iconset ); #ifndef KDE_NO_COMPAT @@ -210,5 +213,5 @@ public: * Return a pointer to this button's popup menu (if it exists) */ - QPopupMenu *popup(); + QMenu *popup(); /** @@ -225,5 +228,5 @@ public: * @param p The new popup menu */ - void setPopup (QPopupMenu *p, bool unused = false); + void setPopup (Q3PopupMenu *p, bool unused = false); /** @@ -236,5 +239,5 @@ public: * @param p the new popup menu */ - void setDelayedPopup(QPopupMenu *p, bool unused = false); + void setDelayedPopup(Q3PopupMenu *p, bool unused = false); /** @@ -304,5 +307,5 @@ private: * @version $Id$ */ -class KToolBarButtonList : public QIntDict<KToolBarButton> +class KToolBarButtonList : public Q3IntDict<KToolBarButton> { public: 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 @@ -19,5 +19,7 @@ #include "ktoolbarhandler.h" -#include <qpopupmenu.h> +#include <q3popupmenu.h> +//Added by qt3to4: +#include <Q3PtrList> #include <kapplication.h> #include <ktoolbar.h> @@ -45,5 +47,5 @@ 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 ) { @@ -71,14 +73,14 @@ namespace bool needsRebuild() const { return m_needsRebuild; } - 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 ) handleToolBar( toolBarIt.current() ); - QPtrList<KAction> actions; + Q3PtrList<KAction> actions; if ( m_toolBarActions.count() == 0 ) @@ -92,5 +94,5 @@ namespace KActionMenu *menuAction = new KActionMenu( i18n( "Toolbars" ), m_actionCollection, "toolbars_submenu_action" ); - QPtrListIterator<KAction> actionIt( m_toolBarActions ); + Q3PtrListIterator<KAction> actionIt( m_toolBarActions ); for ( ; actionIt.current(); ++actionIt ) menuAction->insert( actionIt.current() ); @@ -100,5 +102,5 @@ namespace } - const QPtrList<KToolBar> &toolBars() const { return m_toolBars; } + const Q3PtrList<KToolBar> &toolBars() const { return m_toolBars; } private: @@ -116,6 +118,6 @@ namespace KMainWindow *m_mainWindow; - QPtrList<KToolBar> m_toolBars; - QPtrList<KAction> m_toolBarActions; + Q3PtrList<KToolBar> m_toolBars; + Q3PtrList<KAction> m_toolBarActions; bool m_needsRebuild : 1; @@ -225,5 +227,5 @@ void ToolBarHandler::init( KMainWindow *mainWindow ) void ToolBarHandler::connectToActionContainers() { - QPtrListIterator<KAction> actionIt( m_actions ); + Q3PtrListIterator<KAction> actionIt( m_actions ); for ( ; actionIt.current(); ++actionIt ) connectToActionContainer( actionIt.current() ); @@ -240,5 +242,5 @@ void ToolBarHandler::connectToActionContainer( QWidget *container ) { //US QPopupMenu *popupMenu = dynamic_cast<QPopupMenu *>( container ); - QPopupMenu *popupMenu = (QPopupMenu *)( container ); + Q3PopupMenu *popupMenu = (Q3PopupMenu *)( container ); if ( !popupMenu ) return; 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 @@ -21,6 +21,6 @@ #include <qobject.h> -#include <qguardedptr.h> -#include <qptrlist.h> +#include <qpointer.h> +#include <q3ptrlist.h> #include <kxmlguiclient.h> #include <kaction.h> @@ -58,7 +58,7 @@ private: Data *d; - 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 @@ -40,4 +40,6 @@ #include <assert.h> +//Added by qt3to4: +#include <Q3PtrList> class KXMLGUIClientPrivate @@ -64,5 +66,5 @@ public: KXMLGUIClient *m_parent; //QPtrList<KXMLGUIClient> m_supers; - QPtrList<KXMLGUIClient> m_children; + Q3PtrList<KXMLGUIClient> m_children; //US KXMLGUIBuilder *m_builder; //US QString m_xmlFile; @@ -86,5 +88,5 @@ KXMLGUIClient::~KXMLGUIClient() d->m_parent->removeChildClient( this ); - QPtrListIterator<KXMLGUIClient> it( d->m_children ); + Q3PtrListIterator<KXMLGUIClient> it( d->m_children ); for ( ; it.current(); ++it ) { assert( it.current()->d->m_parent == this ); @@ -100,5 +102,5 @@ KAction *KXMLGUIClient::action( const char *name ) const KAction* act = actionCollection()->action( name ); if ( !act ) { - QPtrListIterator<KXMLGUIClient> childIt( d->m_children ); + Q3PtrListIterator<KXMLGUIClient> childIt( d->m_children ); for (; childIt.current(); ++childIt ) { act = childIt.current()->actionCollection()->action( name ); @@ -589,5 +591,5 @@ void KXMLGUIClient::removeChildClient( KXMLGUIClient *child ) }*/ -const QPtrList<KXMLGUIClient> *KXMLGUIClient::childClients() +const Q3PtrList<KXMLGUIClient> *KXMLGUIClient::childClients() { return &d->m_children; @@ -607,5 +609,5 @@ KXMLGUIBuilder *KXMLGUIClient::clientBuilder() const */ -void KXMLGUIClient::plugActionList( const QString &name, const QPtrList<KAction> &actionList ) +void KXMLGUIClient::plugActionList( const QString &name, const Q3PtrList<KAction> &actionList ) { /*US 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 @@ -22,5 +22,5 @@ //US #include <qdom.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qmap.h> #include <qstringlist.h> @@ -162,5 +162,5 @@ public: * Retrieves a list of all child clients. */ - const QPtrList<KXMLGUIClient> *childClients(); + const Q3PtrList<KXMLGUIClient> *childClients(); /** @@ -229,5 +229,5 @@ public: * menu too.. */ - 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 @@ -1,9 +1,11 @@ #include <kdialog.h> -#include <qapp.h> +#include <qapplication.h> #include <qlabel.h> #include <qpushbutton.h> #include <qlayout.h> -#include <qprogressbar.h> +#include <q3progressbar.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <klocale.h> @@ -31,7 +33,7 @@ KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal QDialog( parent, name, 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 ); lay->addWidget ( mLabel ); diff --git a/microkde/kdialog.h b/microkde/kdialog.h index bc80689..5f9bf0e 100644 --- a/microkde/kdialog.h +++ b/microkde/kdialog.h @@ -3,6 +3,8 @@ #include <qdialog.h> +//Added by qt3to4: +#include <QLabel> class QLabel; -class QProgressBar; +class Q3ProgressBar; class QPushButton ; @@ -30,5 +32,5 @@ class KProgressDialog : public QDialog private: QLabel * mLabel; - QProgressBar *mBar; + Q3ProgressBar *mBar; QPushButton *mButton; signals: diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp index d5c7e61..a40bad6 100644 --- a/microkde/kdialogbase.cpp +++ b/microkde/kdialogbase.cpp @@ -2,5 +2,9 @@ #include <qpushbutton.h> #include <qlayout.h> -#include <qframe.h> +#include <q3frame.h> +//Added by qt3to4: +#include <QPixmap> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> @@ -136,5 +140,5 @@ void KDialogBase::initLayout() delete mTopLayout; - mTopLayout = new QVBoxLayout( this ); + mTopLayout = new Q3VBoxLayout( this ); mTopLayout->setMargin( marginHintSmall() ); mTopLayout->setSpacing( spacingHintSmall() ); @@ -142,5 +146,5 @@ void KDialogBase::initLayout() mTopLayout->addWidget( mMainWidget ); - QBoxLayout *buttonLayout = new QHBoxLayout; + Q3BoxLayout *buttonLayout = new Q3HBoxLayout; mTopLayout->addLayout( buttonLayout ); @@ -156,13 +160,13 @@ 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 ); return frame; } -QFrame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) +Q3Frame *KDialogBase::addPage( const QString &name, int, const QPixmap & ) { return addPage( name ); @@ -255,8 +259,8 @@ 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 @@ -2,5 +2,7 @@ #define MINIKDE_KDIALOGBASE_H -#include <qframe.h> +#include <q3frame.h> +//Added by qt3to4: +#include <QPixmap> #include "kdialog.h" @@ -9,5 +11,5 @@ class QPushButton; class QLayout; class QTabWidget; -class QBoxLayout; +class Q3BoxLayout; class KDialogBase : public KDialog @@ -60,6 +62,6 @@ class KDialogBase : public KDialog virtual ~KDialogBase(); - QFrame *addPage( const QString & ); - QFrame *addPage( const QString &, int, const QPixmap & ); + Q3Frame *addPage( const QString & ); + Q3Frame *addPage( const QString &, int, const QPixmap & ); void setMainWidget( QWidget *widget ); @@ -78,5 +80,5 @@ class KDialogBase : public KDialog void hideButtons(); - QFrame *plainPage(); + Q3Frame *plainPage(); signals: @@ -129,6 +131,6 @@ class KDialogBase : public KDialog QWidget *mMainWidget; QTabWidget *mTabWidget; - QFrame *mPlainPage; - QBoxLayout *mTopLayout; + Q3Frame *mPlainPage; + Q3BoxLayout *mTopLayout; QPushButton *mUser1Button; diff --git a/microkde/keditlistbox.cpp b/microkde/keditlistbox.cpp index 55b7784..257a44a 100644 --- a/microkde/keditlistbox.cpp +++ b/microkde/keditlistbox.cpp @@ -22,8 +22,11 @@ #include <qpushbutton.h> #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> #include <kcombobox.h> @@ -48,5 +51,5 @@ public: KEditListBox::KEditListBox(QWidget *parent, const char *name, bool checkAtEntering, int buttons ) - :QGroupBox(parent, name ) + :Q3GroupBox(parent, name ) { init( checkAtEntering, buttons ); @@ -55,5 +58,5 @@ KEditListBox::KEditListBox(QWidget *parent, const char *name, KEditListBox::KEditListBox(const QString& title, QWidget *parent, const char *name, bool checkAtEntering, int buttons) - :QGroupBox(title, parent, name ) + :Q3GroupBox(title, parent, name ) { init( checkAtEntering, buttons ); @@ -63,5 +66,5 @@ KEditListBox::KEditListBox(const QString& title, const CustomEditor& custom, QWidget *parent, const char *name, bool checkAtEntering, int buttons) - :QGroupBox(title, parent, name ) + :Q3GroupBox(title, parent, name ) { m_lineEdit = custom.lineEdit(); @@ -96,5 +99,5 @@ 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(), KDialog::spacingHint()); @@ -110,5 +113,5 @@ void KEditListBox::init( bool checkAtEntering, int buttons, m_lineEdit=new KLineEdit(gb); - m_listBox = new QListBox(gb); + m_listBox = new Q3ListBox(gb); QWidget *editingWidget = representationWidget ? @@ -205,5 +208,5 @@ void KEditListBox::moveItemUp() } - QListBoxItem *selItem = m_listBox->item(selIndex); + Q3ListBoxItem *selItem = m_listBox->item(selIndex); m_listBox->takeItem(selItem); m_listBox->insertItem(selItem, selIndex-1); @@ -228,5 +231,5 @@ void KEditListBox::moveItemDown() } - QListBoxItem *selItem = m_listBox->item(selIndex); + Q3ListBoxItem *selItem = m_listBox->item(selIndex); m_listBox->takeItem(selItem); m_listBox->insertItem(selItem, selIndex+1); @@ -350,12 +353,14 @@ 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 @@ -21,6 +21,8 @@ #define KEDITLISTBOX_H -#include <qgroupbox.h> -#include <qlistbox.h> +#include <q3groupbox.h> +#include <q3listbox.h> +//Added by qt3to4: +#include <Q3StrList> class KLineEdit; @@ -37,5 +39,5 @@ class KEditListBoxPrivate; * items from the listbox and two buttons to move items up and down. */ -class KEditListBox : public QGroupBox +class KEditListBox : public Q3GroupBox { Q_OBJECT @@ -127,5 +129,5 @@ public: * Return a pointer to the embedded QListBox. */ - QListBox* listBox() const { return m_listBox; } + Q3ListBox* listBox() const { return m_listBox; } /** * Return a pointer to the embedded QLineEdit. @@ -160,9 +162,9 @@ public: * See @ref QListBox::insertStringList() */ - void insertStrList(const QStrList* list, int index=-1); + void insertStrList(const Q3StrList* list, int index=-1); /** * See @ref QListBox::insertStrList() */ - void insertStrList(const QStrList& list, int index=-1); + void insertStrList(const Q3StrList& list, int index=-1); /** * See @ref QListBox::insertStrList() @@ -208,5 +210,5 @@ public: private: - QListBox *m_listBox; + Q3ListBox *m_listBox; QPushButton *servUpButton, *servDownButton; QPushButton *servNewButton, *servRemoveButton; diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 383e711..c1bfdef 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp @@ -5,4 +5,6 @@ #include <qfileinfo.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #ifndef DESKTOP_VERSION @@ -14,5 +16,5 @@ QString KFileDialog::getSaveFileName( const QString & fn, QString retfile = ""; QDialog dia ( par, "input-dialog", true ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); lay.setSpacing(7); @@ -43,5 +45,5 @@ QString KFileDialog::getOpenFileName( const QString & fn, QDialog dia ( par, "input-dialog", true ); // QLineEdit lab ( &dia ); - QVBoxLayout lay( &dia ); + Q3VBoxLayout lay( &dia ); lay.setMargin(7); lay.setSpacing(7); @@ -67,10 +69,10 @@ QString KFileDialog::getExistingDirectory( const QString & fn, #else -#include <qfiledialog.h> +#include <q3filedialog.h> QString KFileDialog::getSaveFileName( const QString & fn, const QString & cap , QWidget * par ) { - return QFileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); + return Q3FileDialog::getSaveFileName( fn, QString::null, par, "openfile", cap ); } QString KFileDialog::getOpenFileName( const QString & fn, @@ -78,10 +80,10 @@ QString KFileDialog::getOpenFileName( const QString & fn, { - return QFileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); + return Q3FileDialog::getOpenFileName( fn, QString::null, par, "openfile", cap ); } QString KFileDialog::getExistingDirectory( const QString & fn, const QString & cap, QWidget * par ) { - return QFileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); + return Q3FileDialog::getExistingDirectory( fn, par, "exidtingdir", cap ); } #endif diff --git a/microkde/kfontdialog.cpp b/microkde/kfontdialog.cpp index 174123c..f83c2a8 100644 --- a/microkde/kfontdialog.cpp +++ b/microkde/kfontdialog.cpp @@ -8,4 +8,6 @@ #include <qlayout.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3VBoxLayout> QFont KFontDialog::getFont( const QFont & f, bool & ok ) { @@ -13,5 +15,5 @@ QFont KFontDialog::getFont( const QFont & f, bool & ok ) QDialog d( 0, "fd", true );; OFontSelector s ( true, &d, "fontsel"); - QVBoxLayout l ( &d ); + Q3VBoxLayout l ( &d ); l.addWidget( &s ); s.setSelectedFont ( f ); diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index 53edd08..9cc5835 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp @@ -1,6 +1,7 @@ #include "kglobal.h" #include "kstandarddirs.h" -#include <qkeycode.h> +#include <qnamespace.h> #include <qapplication.h> +#include <QDesktopWidget> KLocale *KGlobal::mLocale = 0; @@ -14,5 +15,5 @@ KLocale *KGlobal::locale() { if ( !mLocale ) { - ASSERT(mAppName); + Q_ASSERT(!mAppName.isEmpty()); mLocale = new KLocale();//mAppName); diff --git a/microkde/kglobalsettings.cpp b/microkde/kglobalsettings.cpp index 2e483e9..1f08255 100644 --- a/microkde/kglobalsettings.cpp +++ b/microkde/kglobalsettings.cpp @@ -5,4 +5,5 @@ #include <qapplication.h> +#include <QDesktopWidget> #ifdef DESKTOP_VERSION diff --git a/microkde/kiconloader.cpp b/microkde/kiconloader.cpp index 4842d71..e7f657d 100644 --- a/microkde/kiconloader.cpp +++ b/microkde/kiconloader.cpp @@ -5,4 +5,6 @@ #ifndef DESKTOP_VERSION_OEGEL #include <qdir.h> +//Added by qt3to4: +#include <QPixmap> QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, int, QString *, bool ) const @@ -15,5 +17,5 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, return pix; } -QIconSet KIconLoader::loadIconSet( const QString& name) const +QIcon KIconLoader::loadIconSet( const QString& name) const { QPixmap pixmapLoader; @@ -22,5 +24,5 @@ QIconSet KIconLoader::loadIconSet( const QString& name) const pixmapLoader.load( file ); //qDebug("KIconLoader::loadIconSet: %s ************", file.latin1() ); - QIconSet is ( pixmapLoader ); + QIcon is ( pixmapLoader ); return is; } @@ -78,10 +80,10 @@ QPixmap KIconLoader::loadIcon( const QString& name, KIcon::Group, int, } -QIconSet KIconLoader::loadIconSet( const QString& name) const +QIcon KIconLoader::loadIconSet( const QString& name) const { QString px = this->iconPath() + "/" + name; - QIconSet is ;//= Resource::loadIconSet( px ); - QIconSet* isPtr = 0;//LR&is; + QIcon is ;//= Resource::loadIconSet( px ); + QIcon* isPtr = 0;//LR&is; if (isPtr == 0) qDebug("KIconLoader::loadIconSet: %s not foun", px.latin1()); diff --git a/microkde/kiconloader.h b/microkde/kiconloader.h index 68fec4e..2abb667 100644 --- a/microkde/kiconloader.h +++ b/microkde/kiconloader.h @@ -5,5 +5,5 @@ #include <qstring.h> //US -#include <qiconset.h> +#include <qicon.h> class KIcon @@ -35,5 +35,5 @@ class KIconLoader QString iconPath( /*US const QString &, int */) const; QString iconPath( const QString &, int ) const; - QIconSet loadIconSet( const QString &name) const; + QIcon loadIconSet( const QString &name) const; //US to make this class usable for different applications, we have to add a iconpathvariable 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 @@ -28,4 +28,6 @@ #include <qpushbutton.h> +//Added by qt3to4: +#include <QPixmap> //US #include <kaccel.h> @@ -183,5 +185,5 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent, KURLRequester::KURLRequester( QWidget *parent, const char *name ) - : QHBox( parent, name ) + : Q3HBox( parent, name ) { d = new KURLRequesterPrivate; @@ -192,5 +194,5 @@ KURLRequester::KURLRequester( QWidget *parent, const char *name ) KURLRequester::KURLRequester( const QString& url, QWidget *parent, const char *name ) - : QHBox( parent, name ) + : Q3HBox( parent, name ) { d = new KURLRequesterPrivate; @@ -217,6 +219,6 @@ 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 ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); 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 @@ -21,5 +21,5 @@ #define KURLREQUESTER_H -#include <qhbox.h> +#include <q3hbox.h> #include <keditlistbox.h> @@ -54,5 +54,5 @@ class QTimer; * @author Carsten Pfeiffer <pfeiffer@kde.org> */ -class KURLRequester : public QHBox +class KURLRequester : public Q3HBox { Q_OBJECT 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 @@ -53,9 +53,11 @@ $Id$ #include <qdir.h> #include <qfile.h> -#include <qintdict.h> -#include <qptrlist.h> +#include <q3intdict.h> +#include <q3ptrlist.h> #include <qsocketnotifier.h> #include <qstringlist.h> #include <qtimer.h> +//Added by qt3to4: +#include <Q3CString> #include <kapplication.h> @@ -185,5 +187,5 @@ KDirWatchPrivate::KDirWatchPrivate() //US m_PollInterval = config.readNumEntry("PollInterval", 500); KConfig *config = KGlobal::config(); - KConfigGroupSaver saver( config, QCString("DirWatch") ); + KConfigGroupSaver saver( config, Q3CString("DirWatch") ); m_nfsPollInterval = config->readNumEntry("NFSPollInterval", 5000); @@ -732,5 +734,5 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance, void KDirWatchPrivate::removeEntries( KDirWatch* instance ) { - QPtrList<Entry> list; + Q3PtrList<Entry> list; int minfreq = 3600000; @@ -1008,5 +1010,5 @@ void KDirWatchPrivate::slotRescan() #ifdef HAVE_DNOTIFY - QPtrList<Entry> dList, cList; + Q3PtrList<Entry> dList, cList; // for DNotify method, 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 @@ -19,5 +19,5 @@ $Id$ #endif -#include <qptrlist.h> +#include <q3ptrlist.h> #include <kdirwatch.h> @@ -59,7 +59,7 @@ public: bool isDir; // 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; @@ -125,5 +125,5 @@ private: bool delayRemove; - QPtrList<Entry> removeList; + Q3PtrList<Entry> removeList; #ifdef HAVE_FAM @@ -142,5 +142,5 @@ private: QTimer mTimer; QSocketNotifier *mSn; - QIntDict<Entry> fd_Entry; + Q3IntDict<Entry> fd_Entry; static void dnotify_handler(int, siginfo_t *si, void *); diff --git a/microkde/klineedit.h b/microkde/klineedit.h index 70c72d1..9eb749d 100644 --- a/microkde/klineedit.h +++ b/microkde/klineedit.h @@ -3,4 +3,6 @@ #include <qlineedit.h> +//Added by qt3to4: +#include <QKeyEvent> #ifndef DESKTOP_VERSION diff --git a/microkde/klineeditdlg.h b/microkde/klineeditdlg.h index 68e9252..d0004cd 100644 --- a/microkde/klineeditdlg.h +++ b/microkde/klineeditdlg.h @@ -8,4 +8,6 @@ #include <qdialog.h> #include <qpushbutton.h> +//Added by qt3to4: +#include <Q3VBoxLayout> class KLineEditDlg : public QDialog @@ -16,5 +18,5 @@ class KLineEditDlg : public QDialog QLabel* lab = new QLabel( text, this ); mEdit = new KLineEdit( this ); - QVBoxLayout* vl = new QVBoxLayout( this ); + Q3VBoxLayout* vl = new Q3VBoxLayout( this ); vl->setSpacing(5); vl->setMargin(7); 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 @@ -26,12 +26,15 @@ #include <kmessagebox.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qlabel.h> #include <qlayout.h> #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> #include <kbuttonbox.h> @@ -56,12 +59,12 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, resize( KMIN(KGlobal::getDesktopWidth(), 250), KMIN(KGlobal::getDesktopHeight(), 240)); - QFrame *main; + Q3Frame *main; main = plainPage(); - 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() ); generalGroupBox->setTitle( i18n( "General Settings" ) ); @@ -83,5 +86,5 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily, mainLayout->addWidget( generalGroupBox ); - QGroupBox *resourceGroupBox = new QGroupBox( 2, Qt::Horizontal, main ); + Q3GroupBox *resourceGroupBox = new Q3GroupBox( 2, Qt::Horizontal, main ); resourceGroupBox->layout()->setSpacing( spacingHint()); resourceGroupBox->setTitle( i18n( "%1 Resource Settings" ) 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 @@ -29,5 +29,5 @@ $Id$ */ -#include <qgroupbox.h> +#include <q3groupbox.h> #ifdef DESKTOP_VERSION @@ -38,4 +38,8 @@ $Id$ #include <qlabel.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3ValueList> +#include <Q3VBoxLayout> #include <kapplication.h> #include <kcombobox.h> @@ -62,9 +66,9 @@ $Id$ 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 ), mIsStandard( false ) @@ -98,11 +102,11 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) setCaption( i18n( "Resource Configuration" ) ); - 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 ); groupBox->layout()->setSpacing( 3 ); groupBox->layout()->setMargin( 5 ); - QGridLayout *groupBoxLayout = new QGridLayout( groupBox->layout(), 4, 2 ); + Q3GridLayout *groupBoxLayout = new Q3GridLayout( groupBox->layout(), 4, 2 ); //US mFamilyCombo = new KComboBox( false, groupBox ); @@ -146,6 +150,6 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) connect( mListView, SIGNAL( selectionChanged() ), SLOT( slotSelectionChanged() ) ); - connect( mListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( slotItemClicked( QListViewItem * ) ) ); + connect( mListView, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( slotItemClicked( Q3ListViewItem * ) ) ); mLastItem = 0; @@ -160,5 +164,5 @@ ConfigPage::ConfigPage( QWidget *parent, const char *name ) ConfigPage::~ConfigPage() { - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) { (*it).mManager->removeListener( this ); @@ -231,5 +235,5 @@ void ConfigPage::save() saveResourceSettings(); - QValueList<ResourcePageInfo>::Iterator it; + Q3ValueList<ResourcePageInfo>::Iterator it; for ( it = mInfoMap.begin(); it != mInfoMap.end(); ++it ) (*it).mManager->writeConfig( (*it).mConfig ); @@ -342,5 +346,5 @@ void ConfigPage::slotAdd() if ( !resource->readOnly() ) { bool onlyReadOnly = true; - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { ConfigViewItem *confIt = static_cast<ConfigViewItem*>( it ); @@ -367,5 +371,5 @@ void ConfigPage::slotRemove() return; - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *confItem = static_cast<ConfigViewItem*>( item ); @@ -394,5 +398,5 @@ void ConfigPage::slotEdit() return; - QListViewItem *item = mListView->currentItem(); + Q3ListViewItem *item = mListView->currentItem(); ConfigViewItem *configItem = static_cast<ConfigViewItem*>( item ); if ( !configItem ) @@ -436,5 +440,5 @@ void ConfigPage::slotStandard() } - QListViewItem *it = mListView->firstChild(); + Q3ListViewItem *it = mListView->firstChild(); while ( it != 0 ) { ConfigViewItem *configItem = static_cast<ConfigViewItem*>( it ); @@ -483,5 +487,5 @@ void ConfigPage::resourceDeleted( Resource* resource ) } -void ConfigPage::slotItemClicked( QListViewItem *item ) +void ConfigPage::slotItemClicked( Q3ListViewItem *item ) { ConfigViewItem *configItem = static_cast<ConfigViewItem *>( item ); @@ -505,5 +509,5 @@ void ConfigPage::saveResourceSettings() if ( mCurrentManager ) { - QListViewItem *item = mListView->firstChild(); + Q3ListViewItem *item = mListView->firstChild(); while ( item ) { ConfigViewItem *configItem = static_cast<ConfigViewItem*>( 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 @@ -26,4 +26,6 @@ #include <qstringlist.h> #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> #include "manager.h" @@ -32,5 +34,5 @@ class KComboBox; class KListView; -class QListViewItem; +class Q3ListViewItem; class QPushButton; @@ -74,5 +76,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> protected slots: - void slotItemClicked( QListViewItem * ); + void slotItemClicked( Q3ListViewItem * ); signals: @@ -87,5 +89,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> QString mFamily; QStringList mFamilyMap; - QValueList<ResourcePageInfo> mInfoMap; + Q3ValueList<ResourcePageInfo> mInfoMap; KComboBox* mFamilyCombo; @@ -96,5 +98,5 @@ class ConfigPage : public QWidget, public ManagerListener<Resource> QPushButton* mStandardButton; - 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 @@ -42,6 +42,6 @@ using namespace KRES; -QDict<Factory> *Factory::mSelves = 0; -static KStaticDeleter< QDict<Factory> > staticDeleter; +Q3Dict<Factory> *Factory::mSelves = 0; +static KStaticDeleter< Q3Dict<Factory> > staticDeleter; Factory *Factory::self( const QString& resourceFamily) @@ -52,5 +52,5 @@ Factory *Factory::self( const QString& resourceFamily) if ( !mSelves ) { - 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 @@ -25,5 +25,5 @@ #define KRESOURCES_FACTORY_H -#include <qdict.h> +#include <q3dict.h> #include <qstring.h> @@ -115,5 +115,5 @@ class Factory private: - static QDict<Factory> *mSelves; + static Q3Dict<Factory> *mSelves; QString mResourceFamily; 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 @@ -21,4 +21,7 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> //US #include <kaboutdata.h> @@ -41,7 +44,7 @@ KCMKResources::KCMKResources( QWidget *parent, const char *name, const QStringLi Ok|Cancel, Ok, true ) { - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( main ); + Q3VBoxLayout *layout = new Q3VBoxLayout( main ); mConfigPage = new KRES::ConfigPage( main ); layout->addWidget( mConfigPage ); 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 @@ -33,6 +33,8 @@ $Id$ #define KRESOURCES_MANAGER_H -#include <qdict.h> +#include <q3dict.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3PtrList> #include "factory.h" @@ -176,5 +178,5 @@ class Manager : private ManagerImplListener mImpl->setListener( this ); - mListeners = new QPtrList<ManagerListener<T> >; + mListeners = new Q3PtrList<ManagerListener<T> >; } @@ -331,5 +333,5 @@ class Manager : private ManagerImplListener ManagerImpl *mImpl; 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 @@ -36,4 +36,6 @@ $Id$ #include <kstandarddirs.h> #include <qfile.h> +//Added by qt3to4: +#include <Q3PtrList> #include "resource.h" @@ -233,7 +235,7 @@ Resource::List *ManagerImpl::resourceList() } -QPtrList<Resource> ManagerImpl::resources() +Q3PtrList<Resource> ManagerImpl::resources() { - QPtrList<Resource> result; + Q3PtrList<Resource> result; Resource::List::ConstIterator it; @@ -244,7 +246,7 @@ QPtrList<Resource> ManagerImpl::resources() } -QPtrList<Resource> ManagerImpl::resources( bool active ) +Q3PtrList<Resource> ManagerImpl::resources( bool active ) { - QPtrList<Resource> result; + Q3PtrList<Resource> result; Resource::List::ConstIterator it; diff --git a/microkde/kresources/managerimpl.h b/microkde/kresources/managerimpl.h index 56a2db6..1f728e5 100644 --- a/microkde/kresources/managerimpl.h +++ b/microkde/kresources/managerimpl.h @@ -33,6 +33,6 @@ $Id$ #include <qstring.h> -#include <qptrlist.h> -#include <qdict.h> +#include <q3ptrlist.h> +#include <q3dict.h> //US #include <qobject.h> @@ -82,8 +82,8 @@ class ManagerImpl : public QObject Resource::List *resourceList(); - QPtrList<Resource> resources(); + Q3PtrList<Resource> resources(); // Get only active or passive resources - QPtrList<Resource> resources( bool active ); + Q3PtrList<Resource> resources( bool active ); QStringList resourceNames(); 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 @@ -29,5 +29,5 @@ #endif //QT_THREAD_SUPPORT -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qwidget.h> @@ -240,5 +240,5 @@ 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 @@ -35,7 +35,11 @@ #include <kglobal.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qlayout.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3Frame> +#include <Q3PtrList> #include "resource.h" @@ -47,5 +51,5 @@ using namespace KRES; //US I am using KBaseDialog instead of KDialog //US : KDialog( parent, name, true ) -SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, +SelectDialog::SelectDialog( Q3PtrList<Resource> list, QWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Resource Selection" ), Help | Ok | Cancel, @@ -58,5 +62,5 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, //US - QFrame *main = plainPage(); + Q3Frame *main = plainPage(); /*US QVBoxLayout *layout = new QVBoxLayout( main ); @@ -66,13 +70,13 @@ 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() ); //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" ) ); //US mResourceId = new KListBox( groupBox ); - mResourceId = new QListBox( groupBox ); + mResourceId = new Q3ListBox( groupBox ); mainLayout->addWidget( groupBox ); @@ -102,5 +106,5 @@ SelectDialog::SelectDialog( QPtrList<Resource> list, QWidget *parent, mResourceId->setCurrentItem( 0 ); - connect( mResourceId, SIGNAL(returnPressed(QListBoxItem*)), + connect( mResourceId, SIGNAL(returnPressed(Q3ListBoxItem*)), SLOT(accept()) ); } @@ -114,5 +118,5 @@ Resource *SelectDialog::resource() } -Resource *SelectDialog::getResource( QPtrList<Resource> list, QWidget *parent ) +Resource *SelectDialog::getResource( Q3PtrList<Resource> list, QWidget *parent ) { if ( list.count() == 0 ) { 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 @@ -26,5 +26,5 @@ #include <qobject.h> -#include <qptrlist.h> +#include <q3ptrlist.h> #include <qmap.h> @@ -32,5 +32,5 @@ //US class KListBox; -class QListBox; +class Q3ListBox; namespace KRES { @@ -63,5 +63,5 @@ class SelectDialog : KDialogBase * @param name The name of the dialog */ - SelectDialog( QPtrList<Resource> list, QWidget *parent = 0, + SelectDialog( Q3PtrList<Resource> list, QWidget *parent = 0, const char *name = 0); @@ -77,9 +77,9 @@ class SelectDialog : KDialogBase * user has selected. Returns 0, if the dialog was canceled. */ - static Resource *getResource( QPtrList<Resource> list, QWidget *parent = 0 ); + static Resource *getResource( Q3PtrList<Resource> list, QWidget *parent = 0 ); private: //US KListBox *mResourceId; - QListBox *mResourceId; + Q3ListBox *mResourceId; QMap<int, Resource*> mResourceMap; diff --git a/microkde/ksystemtray.cpp b/microkde/ksystemtray.cpp index 4f81d02..0d0045f 100644 --- a/microkde/ksystemtray.cpp +++ b/microkde/ksystemtray.cpp @@ -1,3 +1,6 @@ #include "ksystemtray.h" +//Added by qt3to4: +#include <QMouseEvent> +#include <QLabel> void KSystemTray::mousePressEvent( QMouseEvent *) diff --git a/microkde/ksystemtray.h b/microkde/ksystemtray.h index f3e4f6a..6708c86 100644 --- a/microkde/ksystemtray.h +++ b/microkde/ksystemtray.h @@ -3,4 +3,6 @@ #include <qlabel.h> +//Added by qt3to4: +#include <QMouseEvent> class KSystemTray : public QLabel diff --git a/microkde/ktempfile.cpp b/microkde/ktempfile.cpp index b9166bd..d61d22e 100644 --- a/microkde/ktempfile.cpp +++ b/microkde/ktempfile.cpp @@ -1,3 +1,3 @@ -#include <qtextstream.h> +#include <q3textstream.h> #include "ktempfile.h" @@ -20,5 +20,5 @@ QString KTempFile::name() } -QTextStream *KTempFile::textStream() +Q3TextStream *KTempFile::textStream() { return 0; diff --git a/microkde/ktempfile.h b/microkde/ktempfile.h index 20dfa82..1ac7258 100644 --- a/microkde/ktempfile.h +++ b/microkde/ktempfile.h @@ -4,5 +4,5 @@ #include <qstring.h> -class QTextStream; +class Q3TextStream; class KTempFile @@ -15,5 +15,5 @@ class KTempFile QString name(); - 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 @@ -3,8 +3,10 @@ #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <QMouseEvent> #endif -KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent ) +KTextEdit::KTextEdit ( QWidget *parent ) : Q3MultiLineEdit( parent ) { mAllowPopupMenu = false; @@ -18,12 +20,12 @@ KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent ) void KTextEdit::mousePressEvent(QMouseEvent *e) { - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { mAllowPopupMenu = true; mYMousePos = mapToGlobal( (e->pos())).y(); mXMousePos = mapToGlobal( (e->pos())).x(); } - if ( e->button() == RightButton && !mAllowPopupMenu ) + if ( e->button() == Qt::RightButton && !mAllowPopupMenu ) return; - if ( e->button() == LeftButton ) { + if ( e->button() == Qt::LeftButton ) { if ( hasMarkedText () ) mIgnoreMark = !mIgnoreMark; @@ -33,10 +35,10 @@ void KTextEdit::mousePressEvent(QMouseEvent *e) } } - QMultiLineEdit::mousePressEvent( e ); + Q3MultiLineEdit::mousePressEvent( e ); } void KTextEdit::mouseReleaseEvent(QMouseEvent *e) { - QMultiLineEdit::mouseReleaseEvent(e); + Q3MultiLineEdit::mouseReleaseEvent(e); } @@ -49,5 +51,5 @@ void KTextEdit::mouseMoveEvent(QMouseEvent *e) if ( diff+ diff2 > 20 ) 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 @@ -2,7 +2,9 @@ #define MICROKDE_KTEXTEDIT_H -#include <qmultilineedit.h> +#include <q3multilineedit.h> +//Added by qt3to4: +#include <QMouseEvent> -class KTextEdit : public QMultiLineEdit +class KTextEdit : public Q3MultiLineEdit { public: diff --git a/microkde/kurl.cpp b/microkde/kurl.cpp index 2574e25..122ad71 100644 --- a/microkde/kurl.cpp +++ b/microkde/kurl.cpp @@ -35,5 +35,5 @@ #include <unistd.h> #endif -#include <qurl.h> +#include <q3url.h> #include <qdir.h> #include <qstringlist.h> @@ -42,4 +42,6 @@ #include <qmap.h> #include <qtextcodec.h> +//Added by qt3to4: +#include <Q3CString> static const QString fileProt = "file"; @@ -58,5 +60,5 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h encode_string = "<>#@\"&%?={}|^~[]\'`\\:+"; - QCString local; + Q3CString local; if (encoding_hint==0) local = segment.local8Bit(); @@ -101,5 +103,5 @@ static QString encode( const QString& segment, bool encode_slash, int encoding_h } else - new_segment[ new_length++ ] = local[i]; + new_segment[ new_length++ ] = character; } @@ -206,5 +208,5 @@ static void decode( const QString& segment, QString &decoded, QString &encoded, textCodec = QTextCodec::codecForLocale(); - QCString csegment = textCodec->fromUnicode(segment); + Q3CString csegment = textCodec->fromUnicode(segment); // Check if everything went ok if (textCodec->toUnicode(csegment) != segment) @@ -279,5 +281,5 @@ static void decode( const QString& segment, QString &decoded, QString &encoded, decoded = textCodec->toUnicode( array, new_length ); array.resetRawData(new_segment, new_length); - QCString validate = textCodec->fromUnicode(decoded); + Q3CString validate = textCodec->fromUnicode(decoded); if (strcmp(validate.data(), new_segment) != 0) @@ -420,5 +422,5 @@ KURL::KURL( const char * url, int encoding_hint ) } -KURL::KURL( const QCString& url, int encoding_hint ) +KURL::KURL( const Q3CString& url, int encoding_hint ) { reset(); @@ -461,5 +463,5 @@ QDataStream & operator>> (QDataStream & s, KURL & a) #ifndef QT_NO_NETWORKPROTOCOL -KURL::KURL( const QUrl &u ) +KURL::KURL( const Q3Url &u ) { *this = u; @@ -590,5 +592,5 @@ void KURL::parse( const QString& _url, int encoding_hint ) if ( x == '/' ) goto Node9; - if ( !isalpha( (int)x ) ) + if ( !x.isLetter() ) goto NodeErr; @@ -596,5 +598,5 @@ void KURL::parse( const QString& _url, int encoding_hint ) // '.' is not currently accepted, because current KURL may be confused. // 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++; @@ -770,9 +772,9 @@ void KURL::parse( const QString& _url, int encoding_hint ) goto NodeErr; start = pos; - if ( !isdigit( buf[pos++] ) ) + if ( !buf[pos++].isDigit() ) goto NodeErr; // 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 ); m_iPort = port.toUShort(); @@ -849,5 +851,5 @@ KURL& KURL::operator=( const char * _url ) #ifndef QT_NO_NETWORKPROTOCOL -KURL& KURL::operator=( const QUrl & u ) +KURL& KURL::operator=( const Q3Url & u ) { m_strProtocol = u.protocol(); @@ -1375,5 +1377,5 @@ KURL KURL::join( const KURL::List & lst ) if (it != first) { - 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 } @@ -1419,5 +1421,5 @@ QString KURL::fileName( bool _strip_trailing_slash ) const int i = m_strPath_encoded.findRev( '/', len - 1 ); QString fileName_encoded = m_strPath_encoded.mid(i+1); - n += fileName_encoded.contains("%2f", false); + n += fileName_encoded.count("%2f", Qt::CaseInsensitive); } int i = len; diff --git a/microkde/kurl.h b/microkde/kurl.h index cd65a1c..016eb24 100644 --- a/microkde/kurl.h +++ b/microkde/kurl.h @@ -22,7 +22,9 @@ #include <qstring.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <Q3CString> -class QUrl; +class Q3Url; class QStringList; template <typename K, typename V> class QMap; @@ -65,5 +67,5 @@ public: * @see QValueList */ - class List : public QValueList<KURL> + class List : public Q3ValueList<KURL> { public: @@ -136,5 +138,5 @@ public: * @see QTextCodec::mibEnum() */ - KURL( const QCString& url, int encoding_hint = 0 ); + KURL( const Q3CString& url, int encoding_hint = 0 ); /** * Copy constructor. @@ -146,5 +148,5 @@ public: * @param u the QUrl */ - KURL( const QUrl &u ); + KURL( const Q3Url &u ); /** * Constructor allowing relative URLs. @@ -659,5 +661,5 @@ public: KURL& operator=( const QString& _url ); KURL& operator=( const char * _url ); - KURL& operator=( const QUrl & u ); + KURL& operator=( const Q3Url & u ); bool operator==( const KURL& _u ) const; diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp index 9c87682..88f17e5 100644 --- a/microkde/kutils/kcmultidialog.cpp +++ b/microkde/kutils/kcmultidialog.cpp @@ -20,8 +20,10 @@ */ -#include <qhbox.h> -#include <qvbox.h> +#include <q3hbox.h> +#include <q3vbox.h> #include <qcursor.h> #include <qlayout.h> +//Added by qt3to4: +#include <QPixmap> #include <klocale.h> @@ -74,5 +76,5 @@ void KCMultiDialog::slotDefault() int curPageIndex = activePageIndex(); - QPtrListIterator<KCModule> it(modules); + Q3PtrListIterator<KCModule> it(modules); for (; it.current(); ++it) { @@ -92,5 +94,5 @@ void KCMultiDialog::accept() void KCMultiDialog::slotApply() { - QPtrListIterator<KCModule> it(modules); + Q3PtrListIterator<KCModule> it(modules); for (; it.current(); ++it) (*it)->save(); @@ -106,5 +108,5 @@ void KCMultiDialog::slotOk() qDebug("KCMultiDialog::slotOk clicked"); - QPtrListIterator<KCModule> it(modules); + Q3PtrListIterator<KCModule> it(modules); for (; it.current(); ++it) (*it)->save(); @@ -154,7 +156,7 @@ 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 @@ -23,6 +23,6 @@ #define KCMULTIDIALOG_H -#include <qptrlist.h> -#include <qptrdict.h> +#include <q3ptrlist.h> +#include <q3ptrdict.h> #include <kdialogbase.h> @@ -76,5 +76,5 @@ public: //US special method for microkde. We do not want to load everything dynamically. void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); - QVBox* getNewVBoxPage(const QString & modulename) ; + Q3VBox* getNewVBoxPage(const QString & modulename) ; @@ -134,5 +134,5 @@ private: }; */ - QPtrList<KCModule> modules; + Q3PtrList<KCModule> modules; /* QPtrDict<LoadInfo> moduleDict; diff --git a/microkde/microkde.pro b/microkde/microkde.pro index 7120bdd..4ff06a3 100644 --- a/microkde/microkde.pro +++ b/microkde/microkde.pro @@ -7,5 +7,5 @@ INCLUDEPATH += . ../ ../kabc ./kdecore ./kdeui ./kio/kfile ./kio/kio #LIBS += -lqtcompat -TARGET = microkde +TARGET = xmicrokde DESTDIR= ../bin DEFINES += DESKTOP_VERSION KDE_QT_ONLY @@ -179,2 +179,4 @@ KDGanttMinimizeSplitter.cpp \ kdecore/klibloader.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 @@ -8,5 +8,5 @@ LIBS += -lmicroqtcompat -L$(QPEDIR)/lib DEFINES += KDE_QT_ONLY -TARGET = microkde +TARGET = xmicrokde OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(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 @@ -266,5 +266,5 @@ 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) ), this, SLOT(slotFSActivated(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 @@ -138,5 +138,5 @@ private: bool m_all : 1; OFileSelector* m_sel; - QPopupMenu* m_fsPop; + Q3PopupMenu* m_fsPop; bool compliesMime( const QString& ); QStringList m_mimes; // used in compy mime 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,2 +1,4 @@ +//Added by qt3to4: +#include <Q3MemArray> // THIS IS A COPY OF THE FILE FOUND IN $QTDIR/src/kernel. Needed to modify qsplitter @@ -56,8 +58,4 @@ -#ifndef QT_H -#include "qabstractlayout.h" -#endif // QT_H - #ifndef QT_NO_LAYOUT struct QLayoutStruct @@ -82,5 +80,5 @@ 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 @@ -69,2 +69,4 @@ SOURCES += ../crypt/ath.c \ #LIBS += -L../$(PLATFORM) #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 @@ -30,3 +30,5 @@ SOURCES += code-from-errno.c \ # gpg-error.h \ # 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 @@ -41,2 +41,4 @@ SOURCES += mpi-add.c \ generic/mpih-sub1.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 @@ -35,2 +35,4 @@ SOURCES += adler32.c \ uncompr.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 @@ -30,10 +30,13 @@ $Id$ #include <qlabel.h> #include <qtabwidget.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3VBoxLayout> #include <klocale.h> #include <kcombobox.h> #include <klineedit.h> #include <qpushbutton.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> /* @@ -50,5 +53,5 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) { QWidget *page = plainPage(); - QVBoxLayout *pageLayout = new QVBoxLayout( page ); + Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page ); QTabWidget* mTabWidget = new QTabWidget( page ); @@ -59,5 +62,5 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) QWidget *tab1 = new QWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab1, 3, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab1, 3, 1 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); @@ -78,5 +81,5 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) i++; categoryComboBox->setEditable( TRUE ); - categoryComboBox->setSizeLimit( 8 ); + categoryComboBox->setMaxVisibleItems( 8 ); categoryComboBox->setAutoCompletion( TRUE ); categoryComboBox->setDuplicatesEnabled( FALSE ); @@ -118,10 +121,10 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) QWidget *tab2 = new QWidget( mTabWidget ); - layout = new QGridLayout( tab2, 3, 1 ); + layout = new Q3GridLayout( tab2, 3, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); i = 0; - commentTextEdit = new QMultiLineEdit(tab2); + commentTextEdit = new Q3MultiLineEdit(tab2); layout->addMultiCellWidget( commentTextEdit, i, i, 0, 0 ); i++; @@ -135,5 +138,5 @@ addEntryWnd::addEntryWnd( PwMDoc* d, QWidget* parent, const char* name) QWidget *tab3 = new QWidget( mTabWidget ); - layout = new QGridLayout( tab3, 3, 1 ); + layout = new Q3GridLayout( tab3, 3, 1 ); layout->setMargin( KDialogBase::marginHintSmall() ); layout->setSpacing( KDialogBase::spacingHintSmall() ); 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 @@ -28,9 +28,14 @@ $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; class KLineEdit; @@ -38,6 +43,6 @@ class QPushButton; class KComboBox; class QLabel; -class QGroupBox; -class QMultiLineEdit; +class Q3GroupBox; +class Q3MultiLineEdit; class PwMDoc; @@ -62,5 +67,5 @@ 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 @@ -197,5 +197,5 @@ void AddEntryWndImpl::switchComment(bool toAdvanced) return; - commentTextEdit = new QTextEdit(commentDummy); + commentTextEdit = new Q3TextEdit(commentDummy); commentTextEdit->setTextFormat(Qt::PlainText); commentTextEdit->resize(commentDummy->size()); @@ -217,5 +217,5 @@ 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 @@ -24,5 +24,5 @@ #ifndef PWM_EMBEDDED #include <qlineedit.h> -#include <qtextedit.h> +#include <q3textedit.h> #include <qcombobox.h> #include "addentrywnd.h" @@ -30,5 +30,5 @@ #include <klineedit.h> #include <kcombobox.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include "addentrywnd_emb.h" #endif @@ -87,10 +87,10 @@ public: public slots: #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN /** OK button pressed */ void okButton_slot(); /** cancel button pressed */ void cancelButton_slot(); -//MOC_SKIP_END +#endif #else virtual void slotOk(); @@ -111,5 +111,5 @@ protected: QPushButton *editAdvCommentButton; #ifndef PWM_EMBEDDED - QTextEdit *commentTextEdit; + Q3TextEdit *commentTextEdit; #else //nothing here 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 @@ -22,5 +22,5 @@ -#include <qcstring.h> +#include <q3cstring.h> #include "pwmdoc.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 @@ -27,7 +27,7 @@ #include <khtml_part.h> #include <khtmlview.h> -#include <qtextedit.h> +#include <q3textedit.h> #else -#include <qmultilineedit.h> +#include <q3multilineedit.h> #endif @@ -138,5 +138,5 @@ void CommentBox::switchTo(commentBoxMode newMode) switch (newMode) { case mode_text: - textDta = new QTextEdit(parentWidget); + textDta = new Q3TextEdit(parentWidget); textDta->setTextFormat(Qt::PlainText); textDta->setReadOnly(true); @@ -230,9 +230,9 @@ QSize CommentBox::size() CommentBox::CommentBox(QWidget *_parentWidget) - : QTextBrowser(_parentWidget) + : Q3TextBrowser(_parentWidget) { //this->setReadOnly(true); - setFocusPolicy( QWidget::ClickFocus ); + setFocusPolicy( Qt::ClickFocus ); } @@ -249,5 +249,5 @@ void CommentBox::clear() void CommentBox::setText(const QString &text) { - QTextBrowser::setText( text); + Q3TextBrowser::setText( text); if (!isVisible()) show(); 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 @@ -24,5 +24,5 @@ #include <qsize.h> class QWidget; -class QTextEdit; +class Q3TextEdit; class KHTMLPart; @@ -86,5 +86,5 @@ protected: commentBoxMode mode; /** 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 */ KHTMLPart *htmlDta; @@ -92,10 +92,10 @@ protected: #else -#include <qtextbrowser.h> +#include <q3textbrowser.h> /** Implementation of the advanced HTML comment box */ //US ENH: CommentBox must be derived from QWidget, to allow the splitter to set a initial size // without conflicting with the two display modes -class CommentBox : public QTextBrowser +class CommentBox : public Q3TextBrowser { public: 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 @@ -24,4 +24,6 @@ #include <kmessagebox.h> #include <klocale.h> +//Added by qt3to4: +#include <Q3CString> #define MAX_CSV_FILE_SIZE (50 * 1024 * 1024) // bytes @@ -43,5 +45,5 @@ bool Csv::importData(const QString &filepath, QByteArray d; QFile f(filepath); - if (!f.open(IO_ReadOnly)) { + if (!f.open(QIODevice::ReadOnly)) { KMessageBox::error(parent, i18n("Could not open file.\n" @@ -90,5 +92,5 @@ bool Csv::doImport(const QByteArray &d, int refIndex = 0; int ret; - QCString s, curCat; + Q3CString s, curCat; int fieldIndex = 0; bool inRecord = false; @@ -122,25 +124,25 @@ bool Csv::doImport(const QByteArray &d, break; case 1: // desc - di.desc = s; + di.desc = std::string(s); ++fieldIndex; break; case 2: // name - di.name = s; + di.name = std::string(s); ++fieldIndex; break; case 3: // pw - di.pw = s; + di.pw = std::string(s); ++fieldIndex; break; case 4: // url - di.url = s; + di.url = std::string(s); ++fieldIndex; break; case 5: // launcher - di.launcher = s; + di.launcher = std::string(s); ++fieldIndex; break; case 6: // comment - di.comment = s; + di.comment = std::string(s); ++fieldIndex; break; @@ -155,5 +157,5 @@ bool Csv::doImport(const QByteArray &d, // record complete. if (fieldIndex == 6) - di.comment = s; + di.comment = std::string(s); inRecord = false; fieldIndex = 0; @@ -176,5 +178,5 @@ bool Csv::doImport(const QByteArray &d, } -int Csv::nextField(QCString *ret, +int Csv::nextField(Q3CString *ret, const QByteArray &in, bool inRecord, @@ -354,5 +356,5 @@ bool Csv::exportData(const QString &filepath, } QFile f(filepath); - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { KMessageBox::error(parent, i18n("Could not open file for writing."), @@ -377,5 +379,5 @@ bool Csv::doExport(QFile &f, unsigned int i, j; PwMDataItem d; - QCString s, catName; + Q3CString s, catName; QByteArray b; @@ -402,5 +404,5 @@ bool Csv::doExport(QFile &f, // remove \0 termination #ifndef PWM_EMBEDDED - b.resize(b.size() - 1, QGArray::SpeedOptim); + b.resize(b.size() - 1, Q3GArray::SpeedOptim); #else b.resize(b.size() - 1); @@ -413,13 +415,13 @@ 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 s.replace('\"', "\"\""); #else - s.replace(QRegExp("\""), "\"\""); + s.replace("\"", "\"\""); #endif ret += s; 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 @@ -22,5 +22,5 @@ #define __PWMANAGER_CSV_H -#include <qcstring.h> +#include <q3cstring.h> #include <qfile.h> @@ -74,5 +74,5 @@ protected: * -1 -> parser error. */ - int nextField(QCString *ret, + int nextField(Q3CString *ret, const QByteArray &in, bool inRecord, @@ -82,5 +82,5 @@ protected: PwMDoc *doc); /** generate a new data field string. */ - QCString newField(QCString s); + Q3CString newField(Q3CString s); protected: 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 @@ -29,5 +29,7 @@ $Id$ #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> +#include <q3groupbox.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <klocale.h> #include <kcombobox.h> @@ -56,5 +58,5 @@ 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() ); layout->setSpacing( KDialogBase::spacingHint() ); @@ -67,5 +69,5 @@ editCategoryWnd::editCategoryWnd( PwMDoc* d, QWidget* parent, const char* name) i++; 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 @@ -28,9 +28,14 @@ $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; class KLineEdit; @@ -38,6 +43,6 @@ class QPushButton; 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 @@ -29,7 +29,9 @@ $Id$ #include <qcheckbox.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include <qradiobutton.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <klineedit.h> #include <qlabel.h> @@ -58,5 +60,5 @@ findWnd::findWnd( QWidget* parent, const char* name ) { QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + Q3VBoxLayout *layout = new Q3VBoxLayout( page ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); @@ -69,5 +71,5 @@ 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 @@ -134,5 +134,5 @@ 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 @@ -22,4 +22,6 @@ #include "randomizer.h" #include "globalstuff.h" +//Added by qt3to4: +#include <Q3PtrList> @@ -159,5 +161,5 @@ GenPasswd::dynCharset_element * GenPasswd::selectNextCharset() if (useFilter) { // 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 unsigned int i, cnt = dynCharset.count(); 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 @@ -22,5 +22,5 @@ #include <qstring.h> -#include <qptrlist.h> +#include <q3ptrlist.h> /** internal password generator of PwManager */ @@ -71,5 +71,5 @@ protected: bool useFilter; /** 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 @@ -21,4 +21,7 @@ #include <qmessagebox.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> #include <klocale.h> @@ -26,10 +29,10 @@ 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); cancelButton = new QPushButton(i18n("&Cancel"), hbox1); @@ -63,5 +66,5 @@ 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 @@ -21,10 +21,12 @@ #define GETKEYCARDWND_H -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qdialog.h> #include <qlabel.h> #include <qpushbutton.h> #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> /** The equivalent to GetMasterPwWndImpl for chipcards */ @@ -34,5 +36,5 @@ class GetKeyCardWnd : public QDialog public: GetKeyCardWnd(QWidget *parent = 0, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~GetKeyCardWnd(); @@ -41,6 +43,6 @@ protected slots: protected: - QVBox *vbox1; - QHBox *hbox1; + Q3VBox *vbox1; + Q3HBox *hbox1; QLabel *text_label; QPushButton *okButton; 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 @@ -44,4 +44,7 @@ $Id$ #include <qpushbutton.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3VBoxLayout> /* @@ -55,5 +58,5 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) { QWidget *page = plainPage(); - QVBoxLayout *pageLayout = new QVBoxLayout( page ); + Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page ); pwLineEdit = new QLineEdit( page, "pwLineEdit" ); @@ -61,5 +64,5 @@ 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); pageLayout->addWidget(pwLineEdit); @@ -77,5 +80,5 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) #endif - QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); + Q3GridLayout* numberLayout = new Q3GridLayout( numberBox, 4, 3 ); numberLayout->setMargin( 0 ); numberLayout->setSpacing( 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 @@ -56,5 +56,5 @@ void GetMasterPwWndImpl::slotOk() #endif -#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 @@ -35,5 +35,5 @@ #else #include <qstring.h> -#include <qtextstream.h> +#include <QTextOStream> #endif @@ -98,5 +98,5 @@ 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 @@ -61,5 +61,5 @@ QString HtmlGen::escapeHtmlText(const QString &str) char c; for (i = 0; i < len; ++i) { - c = str.at(i); + c = str.at(i).toLatin1(); switch (c) { case '<': 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 @@ -29,5 +29,5 @@ #include <stdio.h> #else -#include <qsocket.h> +#include <q3socket.h> #endif @@ -78,5 +78,5 @@ Ipc::Ipc() } #endif - QSocket* qsock = new QSocket(); + Q3Socket* qsock = new Q3Socket(); qsock->setSocket(sock[0]); @@ -89,5 +89,5 @@ Ipc::Ipc() } - qsock = new QSocket(); + qsock = new Q3Socket(); qsock->setSocket(sock[0]); @@ -153,5 +153,5 @@ Ipc::Ipc(const Ipc *ipc) sock[1] = ipc->sock[0]; - qSock = new QSocket(); + qSock = new Q3Socket(); qSock->setSocket(sock[0]); @@ -213,5 +213,5 @@ 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 @@ -30,5 +30,5 @@ #include <stdio.h> #else -#include <qsocket.h> +#include <q3socket.h> #endif @@ -75,5 +75,5 @@ protected: size_t rdBufSize; #else - QSocket* qSock; + Q3Socket* qSock; /** current receive buffer size */ unsigned int rdBufSize; 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 @@ -23,4 +23,6 @@ #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> #include <kdebug.h> @@ -43,5 +45,5 @@ KCMPwmConfig::KCMPwmConfig(QWidget *parent, const char *name ) : KCModule( PWMPrefs::instance(), parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + Q3VBoxLayout *layout = new Q3VBoxLayout( this ); mConfigWidget = new PWMConfigWidget( (PWMPrefs*)getPreferences(), this, "mConfigWidget" ); layout->addWidget( 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 @@ -23,6 +23,6 @@ #include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> +#include <q3frame.h> +#include <q3groupbox.h> #include <qlayout.h> #include <qpushbutton.h> @@ -33,5 +33,8 @@ #include <qlabel.h> #include <qfile.h> -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <Q3GridLayout> +#include <Q3VBoxLayout> #include <kconfig.h> @@ -53,5 +56,5 @@ PWMConfigWidget::PWMConfigWidget(PWMPrefs *prefs, QWidget *parent, const char *n : KPrefsWidget(prefs, parent, name ) { - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + Q3VBoxLayout *topLayout = new Q3VBoxLayout( this, 0, KDialog::spacingHint() ); @@ -62,5 +65,5 @@ 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); int i = 0; @@ -99,5 +102,5 @@ 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); i = 0; @@ -155,5 +158,5 @@ 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); i = 0; @@ -184,5 +187,5 @@ 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); i = 0; @@ -204,5 +207,5 @@ 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); i = 0; @@ -224,5 +227,5 @@ 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); i = 0; @@ -360,6 +363,6 @@ 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 @@ -21,20 +21,23 @@ #include <klocale.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleText, 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); unselAllButton = new QPushButton(i18n("&Unselect all"), hbox2); } - hbox1 = new QHBox(vbox1); + hbox1 = new Q3HBox(vbox1); okButton = new QPushButton(i18n("&Ok"), hbox1); cancelButton = new QPushButton(i18n("&Cancel"), hbox1); @@ -46,5 +49,5 @@ ListObjSelectWnd::ListObjSelectWnd(const QString &caption, const QString &titleT setCaption(caption); if (multiSel) { - list->setSelectionMode(QListBox::Multi); + list->setSelectionMode(Q3ListBox::Multi); } @@ -127,5 +130,5 @@ 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 @@ -22,10 +22,12 @@ #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> @@ -38,5 +40,5 @@ public: QWidget *parent = 0, bool multiSel = false, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~ListObjSelectWnd(); @@ -63,9 +65,9 @@ public: protected: - QVBox *vbox1; - QHBox *hbox1; - QHBox *hbox2; + Q3VBox *vbox1; + Q3HBox *hbox1; + Q3HBox *hbox2; QLabel *title; - QListBox *list; + Q3ListBox *list; QPushButton *okButton; QPushButton *cancelButton; 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 @@ -24,4 +24,7 @@ #include <qpainter.h> #include <qpixmap.h> +//Added by qt3to4: +#include <QEvent> +#include <QKeyEvent> #include <kiconloader.h> @@ -40,5 +43,5 @@ ListViewPwM::ListViewPwM(QWidget *parent, const char *name) bool ListViewPwM::event(QEvent *e) { - if (e->type() == QEvent::LayoutHint) + if (e->type() == QEvent::LayoutRequest) emit layoutChanged(); if (e->type() == QEvent::KeyPress) { @@ -65,6 +68,6 @@ QPixmap * ListViewItemPwM::onPix = 0; QPixmap * ListViewItemPwM::offPix = 0; -ListViewItemPwM::ListViewItemPwM(QListView *parent) - : QCheckListItem(parent, "", QCheckListItem::CheckBox) +ListViewItemPwM::ListViewItemPwM(Q3ListView *parent) + : Q3CheckListItem(parent, "", Q3CheckListItem::CheckBox) { if (!onPix) { @@ -98,5 +101,5 @@ void ListViewItemPwM::paintCell(QPainter *p, const QColorGroup &cg, //US BUG: if (column != COLUMN_DESC) { - QCheckListItem::paintCell(p, cg, column, width, align); + Q3CheckListItem::paintCell(p, cg, column, width, align); return; } @@ -121,9 +124,9 @@ 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); } -#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 @@ -22,4 +22,7 @@ #include <klistview.h> +//Added by qt3to4: +#include <QEvent> +#include <QPixmap> /** PwManager implementation of the list view. @@ -42,8 +45,8 @@ protected: }; -class ListViewItemPwM : public QCheckListItem +class ListViewItemPwM : public Q3CheckListItem { public: - ListViewItemPwM(QListView *parent); + ListViewItemPwM(Q3ListView *parent); protected: 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 @@ -143,4 +143,5 @@ static void addAuthors(KAboutData *aboutData) int main(int argc, char *argv[]) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); printDebugConfigureInfo(); #ifndef PWM_EMBEDDED 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 @@ -16,5 +16,5 @@ #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #include <qrect.h> #include <qpoint.h> @@ -43,5 +43,5 @@ protected: QPainter *paint; /** metrics */ - QPaintDeviceMetrics *metrics; + Q3PaintDeviceMetrics *metrics; /** left field of header */ QString headerLeft; 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 @@ -27,5 +27,5 @@ $Id$ #include <qpushbutton.h> -#include <qgroupbox.h> +#include <q3groupbox.h> #include <qcheckbox.h> #include <qlabel.h> @@ -33,4 +33,7 @@ $Id$ #include <qspinbox.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> #include "klocale.h" @@ -47,12 +50,12 @@ 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:" ) ); groupBox1->setColumnLayout(0, Qt::Vertical ); groupBox1->layout()->setSpacing( 6 ); groupBox1->layout()->setMargin( 11 ); - QVBoxLayout* groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); + Q3VBoxLayout* groupBox1Layout = new Q3VBoxLayout( groupBox1->layout() ); groupBox1Layout->setAlignment( Qt::AlignTop ); @@ -81,5 +84,5 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name) groupBox1Layout->addWidget( int_charBlankCheckBox ); - QHBoxLayout* layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); + Q3HBoxLayout* layout7 = new Q3HBoxLayout( 0, 0, 6, "layout7"); int_charUserCheckBox = new QCheckBox( i18n("User defined:"), groupBox1, "int_charUserCheckBox" ); @@ -93,5 +96,5 @@ pwGenWnd::pwGenWnd( QWidget* parent, const char* name) - QHBoxLayout* layout8 = new QHBoxLayout( 0, 0, 6, "layout8"); + Q3HBoxLayout* layout8 = new Q3HBoxLayout( 0, 0, 6, "layout8"); int_lenSpinBox = new QSpinBox( page, "int_lenSpinBox" ); 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 @@ -35,5 +35,5 @@ PwGenWndImpl::PwGenWndImpl(QWidget *parent, const char *name, 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 @@ -34,5 +34,5 @@ public: const char *name = 0, bool modal = FALSE, - WFlags fl = 0); + Qt::WFlags fl = 0); #else PwGenWndImpl( QWidget* parent = 0, const char* name = 0); 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 @@ -26,4 +26,10 @@ #include <qstatusbar.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3ValueList> +#include <QHideEvent> +#include <QFocusEvent> +#include <QCloseEvent> #ifndef PWM_EMBEDDED @@ -187,5 +193,5 @@ PwM::PwM(PwMInit *_init, PwMDoc *doc, initMetrics(); setVirgin(virginity); - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(Qt::WheelFocus); #ifndef PWM_EMBEDDED statusBar()->show(); @@ -241,18 +247,18 @@ 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, SLOT(close_slot()), 0, BUTTON_POPUP_FILE_CLOSE); 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..."), this, SLOT(saveAs_slot()), 0, @@ -270,5 +276,5 @@ void PwM::initMenubar() SLOT(exportToKWallet()), 0, BUTTON_POPUP_EXPORT_KWALLET); #endif - filePopup->insertItem(QIconSet(picons->loadIcon("fileexport", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileexport", KIcon::Small)), i18n("E&xport"), exportPopup, BUTTON_POPUP_FILE_EXPORT); @@ -284,32 +290,32 @@ void PwM::initMenubar() SLOT(importKWallet()), 0, BUTTON_POPUP_IMPORT_KWALLET); #endif - filePopup->insertItem(QIconSet(picons->loadIcon("fileimport", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileimport", KIcon::Small)), i18n("I&mport"), importPopup, BUTTON_POPUP_FILE_IMPORT); filePopup->insertSeparator(); #if 0 - filePopup->insertItem(QIconSet(picons->loadIcon("fileprint", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("fileprint", KIcon::Small)), i18n("&Print..."), this, SLOT(print_slot()), 0, BUTTON_POPUP_FILE_PRINT); filePopup->insertSeparator(); #endif - filePopup->insertItem(QIconSet(picons->loadIcon("exit", KIcon::Small)), + filePopup->insertItem(QIcon(picons->loadIcon("exit", KIcon::Small)), i18n("&Quit"), this, SLOT(quitButton_slot()), 0, BUTTON_POPUP_FILE_QUIT); menuBar()->insertItem(i18n("&File"), filePopup); // "manage" popup menu - managePopup->insertItem(QIconSet(picons->loadIcon("pencil", KIcon::Small)), + managePopup->insertItem(QIcon(picons->loadIcon("pencil", KIcon::Small)), i18n("&Add password"), this, SLOT(addPwd_slot()), 0, BUTTON_POPUP_MANAGE_ADD); 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()), 0, BUTTON_POPUP_MANAGE_DEL); managePopup->insertSeparator(); - managePopup->insertItem(QIconSet(picons->loadIcon("rotate", KIcon::Small)), + managePopup->insertItem(QIcon(picons->loadIcon("rotate", KIcon::Small)), i18n("Change &Master Password"), this, SLOT(changeMasterPwd_slot()), 0, @@ -318,22 +324,22 @@ void PwM::initMenubar() // "chipcard" popup menu #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, SLOT(genNewCard_slot()), 0, 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, SLOT(eraseCard_slot()), 0, BUTTON_POPUP_CHIPCARD_DEL); - chipcardPopup->insertItem(QIconSet(picons->loadIcon("", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("", KIcon::Small)), i18n("Read card-&ID"), this, SLOT(readCardId_slot()), 0, BUTTON_POPUP_CHIPCARD_READID); chipcardPopup->insertSeparator(); - chipcardPopup->insertItem(QIconSet(picons->loadIcon("2rightarrow", KIcon::Small)), + chipcardPopup->insertItem(QIcon(picons->loadIcon("2rightarrow", KIcon::Small)), i18n("&Make card backup-image"), this, SLOT(makeCardBackup_slot()), 0, 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, SLOT(replayCardBackup_slot()), 0, @@ -342,17 +348,17 @@ void PwM::initMenubar() #endif // CONFIG_KEYCARD // "view" popup menu - viewPopup->insertItem(QIconSet(picons->loadIcon("find", KIcon::Small)), + viewPopup->insertItem(QIcon(picons->loadIcon("find", KIcon::Small)), i18n("&Find"), this, SLOT(find_slot()), 0, BUTTON_POPUP_VIEW_FIND); viewPopup->insertSeparator(); - viewPopup->insertItem(QIconSet(picons->loadIcon("halfencrypted", KIcon::Small)), + viewPopup->insertItem(QIcon(picons->loadIcon("halfencrypted", KIcon::Small)), i18n("&Lock all entries"), this, SLOT(lockWnd_slot()), 0, 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, SLOT(deepLockWnd_slot()), 0, 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, SLOT(unlockWnd_slot()), 0, @@ -360,9 +366,9 @@ void PwM::initMenubar() menuBar()->insertItem(i18n("&View"), viewPopup); // "options" popup menu - optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), i18n("&Configure PwM/Pi..."), this, SLOT(config_slot()),0, BUTTON_POPUP_OPTIONS_CONFIG); - optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), i18n("Global Settings..."), this, SLOT(config_global_slot()),0, @@ -377,5 +383,5 @@ void PwM::initMenubar() helpPopup = helpMenu(QString::null, false); #else - optionsPopup->insertItem(QIconSet(picons->loadIcon("configure", KIcon::Small)), + optionsPopup->insertItem(QIcon(picons->loadIcon("configure", KIcon::Small)), i18n("C&ategories..."), this, SLOT(category_slot()),0, @@ -923,10 +929,10 @@ 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(); #endif @@ -1595,5 +1601,5 @@ 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 @@ -37,4 +37,9 @@ #include <qglobal.h> +//Added by qt3to4: +#include <QCloseEvent> +#include <QFocusEvent> +#include <Q3PopupMenu> +#include <QHideEvent> #include "pwmview.h" @@ -51,7 +56,7 @@ class KSyncManager; /** PwM is the base class of the project */ #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class PwM : public KMainWindow -//MOC_SKIP_END +#endif #else class PwM : public KMainWindow, public KSyncInterface @@ -285,5 +290,5 @@ protected: // LR ******************************* // sync stuff! - QPopupMenu *syncPopup; + Q3PopupMenu *syncPopup; KSyncManager* syncManager; #endif 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 @@ -12,6 +12,6 @@ DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION LIBS += -L../libcrypt/ LIBS += -L../../bin/ -LIBS += -lmicrokde -LIBS += -lmicrokdepim +LIBS += -lxmicrokde +LIBS += -lxmicrokdepim LIBS += -lzlib LIBS += -lkpmicrocipher @@ -176,2 +176,4 @@ 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 @@ -15,7 +15,7 @@ DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY LIBS += -L../libcrypt/$(PLATFORM) -LIBS += -lmicrokde +LIBS += -lxmicrokde LIBS += -lmicroqtcompat -LIBS += -lmicrokdepim +LIBS += -lxmicrokdepim LIBS += -L$(QPEDIR)/lib LIBS += -lqpe 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 @@ -49,4 +49,5 @@ #include <qfileinfo.h> #include <qfile.h> +#include <QDesktopWidget> #include <stdio.h> @@ -482,5 +483,6 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file) sprintf(rnd_buf, "%X%X%X%X", rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF, rnd->genRndChar() & 0xFF); - tmpFileMoved = filename + "." + rnd_buf + ".mv"; + tmpFileMoved = filename; tmpFileMoved += '.'; + tmpFileMoved += rnd_buf; tmpFileMoved += ".mv"; if (!copyFile(filename, tmpFileMoved)) return e_openFile; @@ -492,5 +494,5 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file) } f.setName(filename); - if (!f.open(IO_ReadWrite)) { + if (!f.open(QIODevice::ReadWrite)) { ret = e_openFile; goto out_moveback; @@ -635,5 +637,5 @@ PwMerror PwMDoc::openDoc(const QString *file, int openLocked) } - if (!f.open(IO_ReadOnly)) + if (!f.open(QIODevice::ReadOnly)) return e_openFile; @@ -1004,8 +1006,8 @@ 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(); return false; @@ -1486,5 +1488,5 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw, PWM_ASSERT(f); - unsigned int cryptLen = f->size() - pos; + size_t cryptLen = f->size() - pos; byte *encrypted = new byte[cryptLen]; byte *decrypted = new byte[cryptLen]; @@ -1526,7 +1528,7 @@ PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw, LibGCryptIf gc; PwMerror err; - err = gc.decrypt(&decrypted, + err = gc.decrypt((unsigned char **)&decrypted, &cryptLen, - encrypted, + (unsigned char*)encrypted, cryptLen, reinterpret_cast<const unsigned char *>(pw->latin1()), @@ -2434,5 +2436,5 @@ PwMerror PwMDoc::exportToText(const QString *file) } QFile f(*file); - if (!f.open(IO_ReadWrite)) + if (!f.open(QIODevice::ReadWrite)) return e_openFile; @@ -2708,5 +2710,5 @@ PwMerror PwMDoc::importText_PwM(const QString *file) unsigned int entriesRead = 0; PwMDataItem currItem; - bool res = f.open(IO_ReadOnly); + bool res = f.open(QIODevice::ReadOnly); if (res == false) return e_openFile; @@ -3630,5 +3632,5 @@ 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 @@ -213,5 +213,5 @@ struct PwMDataItem //available. Generaly this happens before the first sync - bool PwMDataItem::operator==( const PwMDataItem &a ) const + bool operator==( const PwMDataItem &a ) const { //qDebug("oper==%s", a.desc.c_str()); @@ -228,5 +228,5 @@ struct PwMDataItem //US ENH: this sync method actually copies all values from the parameter like the =operator //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 ) { desc = a.desc; 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 @@ -466,5 +466,5 @@ 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 @@ -21,4 +21,6 @@ #include "randomizer.h" #include <qdir.h> +//Added by qt3to4: +#include <Q3ValueList> #ifndef PWM_EMBEDDED @@ -93,10 +95,10 @@ PwMInit::~PwMInit() SelfTest::cancel(); // close all open mainwnds - QValueList<PwM *>::iterator i = _mainWndList.begin(), + Q3ValueList<PwM *>::iterator i = _mainWndList.begin(), end = _mainWndList.end(); #else // close all open mainwnds - QValueList<PwM *>::Iterator i = _mainWndList.begin(), + Q3ValueList<PwM *>::Iterator i = _mainWndList.begin(), end = _mainWndList.end(); #endif @@ -427,9 +429,9 @@ again: #ifndef PWM_EMBEDDED // 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(); #else // 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(); #endif @@ -574,10 +576,10 @@ void PwMInit::minimizeAllMainWnd(bool toTray) return; #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(); #endif @@ -625,5 +627,4 @@ PwMApplication::PwMApplication(int & argc, char ** argv) , init (0) { - setStyle( new QPlatinumStyle ()); QString hdir = QDir::homeDirPath(); // there is a bug when creating dirs for WIN 98 @@ -657,5 +658,5 @@ 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 @@ -21,5 +21,5 @@ #define __PWMINIT_H -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qobject.h> #ifndef PWM_EMBEDDED @@ -31,5 +31,4 @@ #else //DESKTOP_VERSION #include <qapplication.h> -#include <qplatinumstyle.h> #endif //DESKTOP_VERSION @@ -51,5 +50,5 @@ class PwMInit; /** main application class */ #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class PwMApplication : public KUniqueApplication { @@ -69,5 +68,5 @@ protected: PwMInit *init; }; -//MOC_SKIP_END +#endif #else //PWM_EMBEDDED @@ -155,5 +154,5 @@ public: { return _tray; } /** returns a list of all open main windows */ - const QValueList<PwM *> * mainWndList() + const Q3ValueList<PwM *> * mainWndList() { return &_mainWndList; } /** create a new document */ @@ -215,5 +214,5 @@ protected: PwMTray *_tray; /** list of all open main windows */ - QValueList<PwM *> _mainWndList; + Q3ValueList<PwM *> _mainWndList; /** saved command line options. */ savedCmd_t savedCmd; 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 @@ -29,4 +29,6 @@ #include <qstringlist.h> #include <qsize.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kpimprefs.h> @@ -151,6 +153,6 @@ 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 @@ -33,4 +33,7 @@ #include <klocale.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <QMouseEvent> @@ -88,10 +91,10 @@ void ActiveTreeItem::execIt() } case openMainWnd: { // 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(); #endif @@ -179,5 +182,5 @@ void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, ActiveTreeItem::Task task, PwMDoc *doc, int docCategory, int docEntry, - QValueList<int> *activeItemsList) + Q3ValueList<int> *activeItemsList) { ActiveTreeItem *activeItem; @@ -197,5 +200,5 @@ void PwMTray::insertActiveTreeItem(KPopupMenu *insertIn, const QString &text, void PwMTray::rebuildTree(KPopupMenu *popup, PwMDoc *doc, - QValueList<int> *activeItems) + Q3ValueList<int> *activeItems) { PWM_ASSERT(doc); @@ -335,9 +338,9 @@ void PwMTray::updateTree(PwMDoc *document) // delete all *old* active items 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 while (i != oldItems->end()) { @@ -482,5 +485,5 @@ 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 @@ -28,5 +28,8 @@ #include <qpainter.h> -#include <qvaluelist.h> +#include <q3valuelist.h> +//Added by qt3to4: +#include <QMouseEvent> +#include <QMenuItem> //#include "pwmexception.h" @@ -37,6 +40,5 @@ class PwMTray; /* wrapper to workaround MOC problems */ -class __ActiveTreeItem : public QCustomMenuItem - , public QObject +class __ActiveTreeItem : public QMenuItem { public: @@ -88,12 +90,12 @@ 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); } QSize sizeHint() { - return QFontMetrics(font).size(AlignLeft | AlignVCenter | - ShowPrefix | DontClip, text); + return QFontMetrics(font).size(Qt::AlignLeft | Qt::AlignVCenter | + Qt::ShowPrefix | Qt::DontClip, text); } @@ -123,5 +125,5 @@ protected: /** tray icon implementation */ #ifndef PWM_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN class PwMTray : public KSystemTray { @@ -135,5 +137,5 @@ class PwMTray : public KSystemTray PwMDoc *doc; KPopupMenu *menu; - QValueList<int> activeItems; // ids of all active items + Q3ValueList<int> activeItems; // ids of all active items }; @@ -171,5 +173,5 @@ protected: * its menuIDs */ - QValueList<struct treeItem> tree; + Q3ValueList<struct treeItem> tree; /** pointer to init */ PwMInit *init; @@ -186,5 +188,5 @@ protected: /** rebuilds the tree for the given KPopupMenu entry */ 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.*/ int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup); @@ -195,5 +197,5 @@ protected: ActiveTreeItem::Task task, PwMDoc *doc, int docCategory, int docEntry, - QValueList<int> *activeItemsList); + Q3ValueList<int> *activeItemsList); /** mouse event on icon */ void mouseReleaseEvent(QMouseEvent *e); @@ -203,5 +205,5 @@ protected: void insertMainWndCtrl(KPopupMenu *menu, PwMDoc *doc); }; -//MOC_SKIP_END +#endif #else class PwMTray : public QWidget @@ -216,5 +218,5 @@ class PwMTray : public QWidget PwMDoc *doc; KPopupMenu *menu; - QValueList<int> activeItems; // ids of all active items + Q3ValueList<int> activeItems; // ids of all active items }; @@ -256,5 +258,5 @@ protected: * its menuIDs */ - QValueList<struct treeItem> tree; + Q3ValueList<struct treeItem> tree; /** pointer to init */ PwMInit *init; @@ -271,5 +273,5 @@ protected: /** rebuilds the tree for the given KPopupMenu entry */ 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.*/ int insertTreeEntry(PwMDoc *doc, KPopupMenu **popup); @@ -280,5 +282,5 @@ protected: ActiveTreeItem::Task task, PwMDoc *doc, int docCategory, int docEntry, - QValueList<int> *activeItemsList); + Q3ValueList<int> *activeItemsList); /** mouse event on icon */ void mouseReleaseEvent(QMouseEvent *e); 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 @@ -36,5 +36,13 @@ #include <qpoint.h> #include <qapplication.h> +#include <QDesktopWidget> #include <qlayout.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <QKeyEvent> +#include <QLabel> +#include <QResizeEvent> +#include <Q3PopupMenu> +#include <Q3VBoxLayout> //US ENH: wouldn't it be a good idea if we could use this consts everywhere else. @@ -77,5 +85,5 @@ PwMView::~PwMView() void PwMView::initCtxMenu() { - ctxMenu = new QPopupMenu(this); + ctxMenu = new Q3PopupMenu(this); ctxMenu->insertItem(i18n("&Add password"), mainClass, SLOT(addPwd_slot())); ctxMenu->insertSeparator(); @@ -107,5 +115,5 @@ void PwMView::resizeEvent(QResizeEvent *) } -void PwMView::refreshCommentTextEdit(QListViewItem *curItem) +void PwMView::refreshCommentTextEdit(Q3ListViewItem *curItem) { PWM_ASSERT(commentBox); @@ -137,5 +145,5 @@ void PwMView::keyReleaseEvent(QKeyEvent * /*e*/) bool PwMView::getCurEntryIndex(unsigned int *index) { - QListViewItem *current = lv->currentItem(); + Q3ListViewItem *current = lv->currentItem(); if (!current) return false; @@ -144,5 +152,5 @@ bool PwMView::getCurEntryIndex(unsigned int *index) bool PwMView::getDocEntryIndex(unsigned int *index, - const QListViewItem *item) + const Q3ListViewItem *item) { vector<unsigned int> foundPositions; @@ -167,10 +175,10 @@ bool PwMView::getDocEntryIndex(unsigned int *index, } -void PwMView::handleToggle(QListViewItem *item) +void PwMView::handleToggle(Q3ListViewItem *item) { PWM_ASSERT(doc); if (!item) return; - QCheckListItem *clItem = (QCheckListItem *)item; + Q3CheckListItem *clItem = (Q3CheckListItem *)item; QString curCat(getCurrentCategory()); @@ -196,5 +204,5 @@ void PwMView::handleToggle(QListViewItem *item) } -void PwMView::handleRightClick(QListViewItem *item, const QPoint &point, int) +void PwMView::handleRightClick(Q3ListViewItem *item, const QPoint &point, int) { if (!item) @@ -275,5 +283,5 @@ void PwMView::shiftToView() } - QCheckListItem *newItem; + Q3CheckListItem *newItem; vector<PwMDataItem>::iterator it = tmpSorted.begin(), end = tmpSorted.end(); @@ -314,5 +322,5 @@ void PwMView::reorgLp() PWM_ASSERT(doc); PWM_ASSERT(!doc->isDocEmpty()); - QListViewItem *currItem; + Q3ListViewItem *currItem; vector<unsigned int> foundPos; /* This searchIn _should_ be: @@ -356,5 +364,5 @@ void PwMView::reorgLp() void PwMView::selAt(int index) { - QListViewItem *item = lv->itemAtIndex(index); + Q3ListViewItem *item = lv->itemAtIndex(index); if (!item) return; @@ -480,5 +488,5 @@ void PwMView::copyCommentToClip() PwMDataItemView::PwMDataItemView( QWidget *parent, const char *name ) - : QTextBrowser( parent, name ) + : Q3TextBrowser( parent, name ) @@ -567,22 +575,22 @@ PwMDataItemChooser::PwMDataItemChooser( PwMDataItem loc, PwMDataItem rem, bool t QWidget* topframe = new QWidget( this ); 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 ); QLabel* lab = new QLabel( i18n("Local Entry"), subframe ); 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 ); lab = new QLabel( i18n("Remote Entry"), subframe ); if ( !takeloc ) - lab->setBackgroundColor(Qt::green.light() ); + lab->setBackgroundColor(QColor(Qt::green).light() ); av = new PwMDataItemView( subframe ); av->setPwMDataItem( rem ); @@ -619,5 +627,5 @@ 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 @@ -42,5 +42,9 @@ #include <qfont.h> #include <qobject.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QKeyEvent> +#include <Q3PopupMenu> #include <vector> @@ -78,5 +82,5 @@ public: */ bool getDocEntryIndex(unsigned int *index, - const QListViewItem *item); + const Q3ListViewItem *item); public slots: @@ -90,7 +94,7 @@ public slots: void shiftToView(); /** 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" */ void selAt(int index); @@ -102,5 +106,5 @@ public slots: protected: /** right-click context-menu */ - QPopupMenu *ctxMenu; + Q3PopupMenu *ctxMenu; protected: @@ -125,5 +129,5 @@ protected: 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 */ void copyPwToClip(); @@ -153,5 +157,5 @@ private: //US ENH basic widget to view an password entry. We need it for the sync stuff. //But might be oif interest for other functionalities as well. -class PwMDataItemView : public QTextBrowser +class PwMDataItemView : public Q3TextBrowser { public: 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 @@ -62,5 +62,5 @@ PwMViewStyle::~PwMViewStyle() } -void PwMViewStyle::editPassWord( QListViewItem * i ) +void PwMViewStyle::editPassWord( Q3ListViewItem * i ) { if ( !i ) @@ -94,14 +94,14 @@ 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()), this, SIGNAL( insertPW() )); @@ -250,5 +250,5 @@ 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 @@ -24,16 +24,16 @@ #include <qwidget.h> #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 #include <qlabel.h> -#include <qlistbox.h> +#include <q3listbox.h> #include <qcombobox.h> #include <qsize.h> @@ -43,5 +43,5 @@ class PwMViewStyle_0; class PwMViewStyle_1; class PwMView; -class QListViewItem; +class Q3ListViewItem; class CommentBox; @@ -95,5 +95,5 @@ protected: protected slots: - void editPassWord( QListViewItem * ); + void editPassWord( Q3ListViewItem * ); private: 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 @@ -27,11 +27,14 @@ #include <kiconloader.h> #include "pwmprefs.h" +//Added by qt3to4: +#include <QLabel> +#include <Q3ValueList> PwMViewStyle_0::PwMViewStyle_0(PwMView *view) : QObject() { - vbox1 = new QVBox(view); + vbox1 = new Q3VBox(view); vbox1->setSpacing(0); - hbox1 = new QHBox(vbox1); + hbox1 = new Q3HBox(vbox1); hbox1->setSpacing(0); categoriesTitle = new QLabel(hbox1); @@ -47,6 +50,6 @@ PwMViewStyle_0::PwMViewStyle_0(PwMView *view) maxsi = delCatButton->sizeHint().height()+4; delCatButton->setMinimumSize( maxsi, maxsi ); - delCatButton->setFocusPolicy( QWidget::NoFocus ); - renCatButton->setFocusPolicy( QWidget::NoFocus ); + delCatButton->setFocusPolicy( Qt::NoFocus ); + renCatButton->setFocusPolicy( Qt::NoFocus ); #ifndef PWM_EMBEDDED @@ -82,7 +85,7 @@ 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] ); if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 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 @@ -21,12 +21,12 @@ #define PWMVIEWSTYLE_0_H -#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> #endif @@ -88,7 +88,7 @@ protected: QLabel *categoriesTitle; /** hbox1 for widget style */ - QHBox *hbox1; + Q3HBox *hbox1; /** vbox1 for widget style */ - QVBox *vbox1; + Q3VBox *vbox1; /** splitter for commentTextEdit */ #ifndef PWM_EMBEDDED 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 @@ -30,4 +30,10 @@ #else #include <qapplication.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QLabel> +#include <Q3ValueList> +#include <Q3Frame> +#include <Q3PopupMenu> #endif #define INITIAL_CATEGORIES_WIDTH 100 @@ -55,7 +61,7 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) #endif - vbox1 = new QVBox(splitter); + vbox1 = new Q3VBox(splitter); categoriesTitle = new QLabel(vbox1); - categoriesList = new QListBox(vbox1); + categoriesList = new Q3ListBox(vbox1); #ifndef PWM_EMBEDDED splitter2 = new QSplitter(splitter); @@ -71,5 +77,5 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) // set sizes and styles //US commentBox->resize(commentBox->size().width(), 60); - QValueList<int> sizes; + Q3ValueList<int> sizes; #ifndef PWM_EMBEDDED sizes.push_back(INITIAL_CATEGORIES_WIDTH); @@ -82,10 +88,10 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) categoriesTitle->setAlignment(Qt::AlignHCenter); #ifndef PWM_EMBEDDED - categoriesTitle->setFrameShape(QFrame::MenuBarPanel); + categoriesTitle->setFrameShape(Q3Frame::MenuBarPanel); #else //categoriesTitle->setFrameShape(QFrame::StyledPanel); #endif categoriesTitle->setText(i18n("Category:")); - catCtxMenu = new QPopupMenu(view); + catCtxMenu = new Q3PopupMenu(view); catCtxMenu->insertItem(i18n("&Rename"), view, SLOT(renCatButton_slot())); @@ -101,7 +107,7 @@ PwMViewStyle_1::PwMViewStyle_1(PwMView *view) view, SLOT(shiftToView())); connect(categoriesList, - SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)), + SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)), this, - SLOT(catRightClick(QListBoxItem *, const QPoint &))); + SLOT(catRightClick(Q3ListBoxItem *, const QPoint &))); connect(lv, SIGNAL(toggleOverview()), @@ -116,7 +122,7 @@ PwMViewStyle_1::~PwMViewStyle_1() 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] ); if ( si[0] == si2[0] && si[1] == si2[1] && si2[1] == 1 ) { @@ -131,5 +137,5 @@ void PwMViewStyle_1::toggleSplitter() } -void PwMViewStyle_1::catRightClick(QListBoxItem *item, const QPoint &point) +void PwMViewStyle_1::catRightClick(Q3ListBoxItem *item, const QPoint &point) { if (!item) @@ -188,5 +194,5 @@ 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 @@ -21,17 +21,17 @@ #define PWMVIEWSTYLE_1_H -#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> #endif #include <qlabel.h> -#include <qlistbox.h> -#include <qpopupmenu.h> +#include <q3listbox.h> +#include <q3popupmenu.h> class PwMView; @@ -83,5 +83,5 @@ public slots: protected slots: /** user clicked right button in category list */ - void catRightClick(QListBoxItem *item, const QPoint &point); + void catRightClick(Q3ListBoxItem *item, const QPoint &point); protected: @@ -101,13 +101,13 @@ protected: /** categories list-box */ - QListBox *categoriesList; + Q3ListBox *categoriesList; /** title string for the categories combo or list box */ QLabel *categoriesTitle; /** hbox1 for widget style */ - QVBox *vbox1; + Q3VBox *vbox1; /** text-edit to display the comment */ CommentBox *commentBox; /** 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 @@ -54,5 +54,5 @@ Randomizer::Randomizer() rndDev->setName("/dev/urandom"); if (rndDev->exists() && - rndDev->open(IO_ReadOnly)) { + rndDev->open(QIODevice::ReadOnly)) { printDebug("Randomizer: using /dev/urandom"); return; @@ -62,5 +62,5 @@ Randomizer::Randomizer() rndDev->setName("/dev/random"); if (rndDev->exists() && - rndDev->open(IO_ReadOnly)) { + rndDev->open(QIODevice::ReadOnly)) { printDebug("Randomizer: using /dev/random"); return; @@ -72,5 +72,5 @@ Randomizer::Randomizer() rndDev->setName(fn); if (rndDev->exists() && - rndDev->open(IO_ReadOnly)) { + rndDev->open(QIODevice::ReadOnly)) { printDebug(string("Randomizer: using $RANDFILE \"") + fn 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 @@ -21,14 +21,17 @@ #include <klocale.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> 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); cancelButton = new QPushButton(i18n("&Cancel"), hbox1); @@ -66,5 +69,5 @@ 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 @@ -21,6 +21,6 @@ #define RENCATWND_H -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qdialog.h> #include <qlabel.h> @@ -28,4 +28,6 @@ #include <qpushbutton.h> #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> @@ -36,5 +38,5 @@ class RenCatWnd : public QDialog public: RenCatWnd(QWidget *parent = 0, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~RenCatWnd(); @@ -47,6 +49,6 @@ protected slots: protected: - QVBox *vbox1; - QHBox *hbox1; + Q3VBox *vbox1; + Q3HBox *hbox1; QLabel *label; QLineEdit *newName; 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 @@ -25,4 +25,6 @@ #include <kglobal.h> #include <klocale.h> +//Added by qt3to4: +#include <Q3CString> #endif @@ -147,5 +149,5 @@ Serializer::Serializer() } -Serializer::Serializer(const QCString &buffer) +Serializer::Serializer(const Q3CString &buffer) { defaultLockStat = true; @@ -178,5 +180,5 @@ void Serializer::clear() } -bool Serializer::parseXml(const QCString &buffer) +bool Serializer::parseXml(const Q3CString &buffer) { //abort(); @@ -199,5 +201,5 @@ bool Serializer::parseXml(const QCString &buffer) } -QCString Serializer::getXml() +Q3CString Serializer::getXml() { PWM_ASSERT(domDoc); @@ -205,5 +207,5 @@ QCString Serializer::getXml() #ifndef PWM_EMBEDDED #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 - QCString tmp(domDoc->toCString(8)); + Q3CString tmp(domDoc->toCString(8)); printDebug("<BEGIN Serializer::getXml() dump>\n"); cout << tmp << endl; @@ -211,5 +213,5 @@ QCString Serializer::getXml() #endif // DEBUG - QCString ret(domDoc->toCString(0)); + Q3CString ret(domDoc->toCString(0)); ret.replace('\n', ""); return ret; @@ -217,5 +219,5 @@ QCString Serializer::getXml() #if defined(PWM_DEBUG) && SERIALIZER_DEBUG != 0 - QCString tmp(" " + domDoc->toCString()); + Q3CString tmp(" " + domDoc->toCString()); printDebug("<BEGIN Serializer::getXml() dump>\n"); qDebug(tmp); @@ -224,6 +226,6 @@ QCString Serializer::getXml() #endif // DEBUG - 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 @@ -24,5 +24,5 @@ #include "pwmdoc.h" -#include <qcstring.h> +#include <q3cstring.h> #include <qdom.h> @@ -41,5 +41,5 @@ public: Serializer(); /** construct a serializer document and parse "buffer" */ - Serializer(const QCString &buffer); + Serializer(const Q3CString &buffer); /** destructor */ virtual ~Serializer(); @@ -48,7 +48,7 @@ public: void clear(); /** 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 */ //US ENH: we need to serialize and deserialize not only categories, but also synctargets 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 @@ -32,4 +32,7 @@ $Id$ #include <qlineedit.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> +#include <Q3GridLayout> #include <klocale.h> @@ -58,5 +61,5 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) { QWidget *page = plainPage(); - QVBoxLayout *pageLayout = new QVBoxLayout( page ); + Q3VBoxLayout *pageLayout = new Q3VBoxLayout( page ); mainTab = new QTabWidget( page ); @@ -71,10 +74,10 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) tab = new QWidget( mainTab ); - QGridLayout *layout = new QGridLayout( tab, 5, 1 ); + Q3GridLayout *layout = new Q3GridLayout( tab, 5, 1 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); 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); @@ -100,14 +103,14 @@ setMasterPwWnd::setMasterPwWnd( QWidget* parent, const char* name ) tab_2 = new QWidget( mainTab ); - layout = new QGridLayout( tab_2, 5, 1 ); + layout = new Q3GridLayout( tab_2, 5, 1 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); 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); 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 @@ -28,4 +28,6 @@ $Id$ #include <kdialogbase.h> +//Added by qt3to4: +#include <QLabel> class QLineEdit; 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 @@ -189,5 +189,5 @@ 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 @@ -23,4 +23,8 @@ #include <qmessagebox.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QCloseEvent> +#include <QLabel> #include <klocale.h> @@ -30,9 +34,9 @@ WaitWnd::WaitWnd(QString caption, QString _staticText, bool showCancelButton, bool showGenericText, QWidget *parent, - const char *name, bool modal, WFlags f) + const char *name, bool modal, Qt::WFlags f) : QDialog(parent, name, modal, f) { canClose = false; - vbox1 = new QVBox(this); + vbox1 = new Q3VBox(this); staticText = new QLabel(vbox1); if (showGenericText) { @@ -90,5 +94,5 @@ 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 @@ -21,9 +21,12 @@ #define WAITWND_H -#include <qvbox.h> +#include <q3vbox.h> #include <qdialog.h> #include <qlabel.h> #include <qpushbutton.h> #include <qevent.h> +//Added by qt3to4: +#include <QResizeEvent> +#include <QCloseEvent> /** window to ask the user to wait */ @@ -35,5 +38,5 @@ public: bool showCancelButton, bool showGenericText, QWidget *parent = 0, const char *name = 0, - bool modal = FALSE, WFlags f = 0); + bool modal = FALSE, Qt::WFlags f = 0); ~WaitWnd(); @@ -47,5 +50,5 @@ protected slots: protected: - QVBox *vbox1; + Q3VBox *vbox1; QLabel *staticText; QLabel *genericText; diff --git a/qtcompat/qptrlist.h b/qtcompat/qptrlist.h index 8ce6868..c3d3ca2 100644 --- a/qtcompat/qptrlist.h +++ b/qtcompat/qptrlist.h @@ -2,4 +2,6 @@ #define QTCOMPAT_QPTRLIST_H +#if 0 + #include <qlist.h> @@ -9,2 +11,4 @@ #endif + +#endif diff --git a/qtcompat/qptrstack.h b/qtcompat/qptrstack.h index 92070b3..b0afdf1 100644 --- a/qtcompat/qptrstack.h +++ b/qtcompat/qptrstack.h @@ -2,4 +2,6 @@ #define QTCOMPAT_QPTRSTACK_H +#if 0 + #include <qstack.h> @@ -8,2 +10,4 @@ #endif + +#endif |