author | zautrix <zautrix> | 2005-04-14 17:48:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-14 17:48:58 (UTC) |
commit | bbdca90c599aaea557d31552c6bc33fc15e397cd (patch) (side-by-side diff) | |
tree | e41b5eb16239664d2217e5436db61610099b60ef | |
parent | 5ea16ef9058a21016402dd5affc0a7f82857e606 (diff) | |
download | kdepimpi-bbdca90c599aaea557d31552c6bc33fc15e397cd.zip kdepimpi-bbdca90c599aaea557d31552c6bc33fc15e397cd.tar.gz kdepimpi-bbdca90c599aaea557d31552c6bc33fc15e397cd.tar.bz2 |
today added
-rw-r--r-- | Makefile | 662 | ||||
-rw-r--r-- | bin/kdepim/kaddressbook/icons16/today_small.png | bin | 0 -> 797 bytes | |||
-rw-r--r-- | bin/kdepim/kaddressbook/icons22/today_small.png | bin | 0 -> 797 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/today_small.png | bin | 0 -> 797 bytes | |||
-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 3 | ||||
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 5 | ||||
-rw-r--r-- | libkdepim/kdateedit.cpp | 9 | ||||
-rw-r--r-- | libkdepim/kdateedit.h | 2 |
8 files changed, 402 insertions, 279 deletions
@@ -1,279 +1,385 @@ -############################################################################# -# Makefile for building: kdepim-desktop -# Generated by qmake (1.07a) (Qt 3.3.3) on: Wed Apr 13 21:23:44 2005 -# Project: kdepim-desktop.pro -# Template: subdirs -# Command: $(QMAKE) -o Makefile kdepim-desktop.pro -############################################################################# - -MAKEFILE = Makefile -QMAKE = qmake -DEL_FILE = rm -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p -INSTALL_FILE= -INSTALL_DIR = -SUBTARGETS = \ - sub-kabc-plugins-file \ - sub-kabc-plugins-dir \ - sub-kabc-plugins-qtopia \ - sub-libical \ - sub-libkcal \ - sub-kabc \ - sub-libkdepim \ - sub-microkde \ - sub-korganizer \ - sub-kaddressbook \ - sub-gammu-emb-common \ - sub-gammu-emb-gammu \ - sub-libetpan \ - sub-kmicromail-libmailwrapper \ - sub-kmicromail \ - sub-pwmanager-libcrypt-cipher \ - sub-pwmanager-libcrypt-error \ - sub-pwmanager-libcrypt-mpi \ - sub-pwmanager-libcrypt-zlib \ - sub-pwmanager-pwmanager - -first: all - -all: Makefile $(SUBTARGETS) - -kabc/plugins/file/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" - cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) -sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE - cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) - -kabc/plugins/dir/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" - cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE) -sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE - cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) - -kabc/plugins/qtopia/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia" - cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE) -sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE - cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE) - -libical/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" - cd libical && $(QMAKE) libical.pro -o $(MAKEFILE) -sub-libical: libical/$(MAKEFILE) FORCE - cd libical && $(MAKE) -f $(MAKEFILE) - -libkcal/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" - cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE) -sub-libkcal: libkcal/$(MAKEFILE) FORCE - cd libkcal && $(MAKE) -f $(MAKEFILE) - -kabc/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" - cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE) -sub-kabc: kabc/$(MAKEFILE) FORCE - cd kabc && $(MAKE) -f $(MAKEFILE) - -libkdepim/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" - cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE) -sub-libkdepim: libkdepim/$(MAKEFILE) FORCE - cd libkdepim && $(MAKE) -f $(MAKEFILE) - -microkde/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" - cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE) -sub-microkde: microkde/$(MAKEFILE) FORCE - cd microkde && $(MAKE) -f $(MAKEFILE) - -korganizer/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" - cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE) -sub-korganizer: korganizer/$(MAKEFILE) FORCE - cd korganizer && $(MAKE) -f $(MAKEFILE) - -kaddressbook/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" - cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE) -sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE - cd kaddressbook && $(MAKE) -f $(MAKEFILE) - -gammu/emb/common/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" - cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE) -sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE - cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) - -gammu/emb/gammu/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu" - cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE) -sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE - cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE) - -libetpan/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "libetpan" || $(MKDIR) "libetpan" - cd libetpan && $(QMAKE) libetpan.pro -o $(MAKEFILE) -sub-libetpan: libetpan/$(MAKEFILE) FORCE - cd libetpan && $(MAKE) -f $(MAKEFILE) - -kmicromail/libmailwrapper/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kmicromail/libmailwrapper" || $(MKDIR) "kmicromail/libmailwrapper" - cd kmicromail/libmailwrapper && $(QMAKE) libmailwrapper.pro -o $(MAKEFILE) -sub-kmicromail-libmailwrapper: kmicromail/libmailwrapper/$(MAKEFILE) FORCE - cd kmicromail/libmailwrapper && $(MAKE) -f $(MAKEFILE) - -kmicromail/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "kmicromail" || $(MKDIR) "kmicromail" - cd kmicromail && $(QMAKE) kmicromail.pro -o $(MAKEFILE) -sub-kmicromail: kmicromail/$(MAKEFILE) FORCE - cd kmicromail && $(MAKE) -f $(MAKEFILE) - -pwmanager/libcrypt/cipher/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher" - cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE) -sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE - cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE) - -pwmanager/libcrypt/error/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error" - cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE) -sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE - cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE) - -pwmanager/libcrypt/mpi/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi" - cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE) -sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE - cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE) - -pwmanager/libcrypt/zlib/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib" - cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE) -sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE - cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE) - -pwmanager/pwmanager/$(MAKEFILE): - @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager" - cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE) -sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE - cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE) - -Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf variables.pri - $(QMAKE) -o Makefile kdepim-desktop.pro -qmake: qmake_all - @$(QMAKE) -o Makefile kdepim-desktop.pro - -all: $(SUBTARGETS) -qmake_all: kabc/plugins/file/$(MAKEFILE) kabc/plugins/dir/$(MAKEFILE) kabc/plugins/qtopia/$(MAKEFILE) libical/$(MAKEFILE) libkcal/$(MAKEFILE) kabc/$(MAKEFILE) libkdepim/$(MAKEFILE) microkde/$(MAKEFILE) korganizer/$(MAKEFILE) kaddressbook/$(MAKEFILE) gammu/emb/common/$(MAKEFILE) gammu/emb/gammu/$(MAKEFILE) libetpan/$(MAKEFILE) kmicromail/libmailwrapper/$(MAKEFILE) kmicromail/$(MAKEFILE) pwmanager/libcrypt/cipher/$(MAKEFILE) pwmanager/libcrypt/error/$(MAKEFILE) pwmanager/libcrypt/mpi/$(MAKEFILE) pwmanager/libcrypt/zlib/$(MAKEFILE) pwmanager/pwmanager/$(MAKEFILE) - ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d libetpan ] && cd libetpan ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d kmicromail ] && cd kmicromail ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true - ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true -clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE - ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true - ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true -uninstall_subdirs: qmake_all FORCE - ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true - ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true -install_subdirs: qmake_all FORCE - ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true - ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true -distclean: qmake_all FORCE - ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true - -install: install_subdirs - -uninstall: uninstall_subdirs - -FORCE: +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/bin/kdepim/kaddressbook/icons16/today_small.png b/bin/kdepim/kaddressbook/icons16/today_small.png Binary files differnew file mode 100644 index 0000000..fcc4ac2 --- a/dev/null +++ b/bin/kdepim/kaddressbook/icons16/today_small.png diff --git a/bin/kdepim/kaddressbook/icons22/today_small.png b/bin/kdepim/kaddressbook/icons22/today_small.png Binary files differnew file mode 100644 index 0000000..fcc4ac2 --- a/dev/null +++ b/bin/kdepim/kaddressbook/icons22/today_small.png diff --git a/bin/kdepim/korganizer/today_small.png b/bin/kdepim/korganizer/today_small.png Binary files differnew file mode 100644 index 0000000..fcc4ac2 --- a/dev/null +++ b/bin/kdepim/korganizer/today_small.png diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index d4aa78c..3b2a276 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp @@ -49,192 +49,195 @@ KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, const char* name) : KOEditorGeneral( parent, name) { mTemplate = false; connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), SLOT(setDuration())); connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), SLOT(emitDateTimeStr())); } KOEditorGeneralEvent::~KOEditorGeneralEvent() { } void KOEditorGeneralEvent::finishSetup() { //disabled // QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); // QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); // QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); // QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); // QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); // QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton ); // QWidget::setTabOrder( mNoTimeButton, mAlarmButton ); // QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); // QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton ); // QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); // QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); mSummaryEdit->setFocus(); } void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *timeLayout = new QVBoxLayout(topLayout); QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, i18n("Date && Time"),parent); timeLayout->addWidget(timeGroupBox); timeGroupBox->layout()->setSpacing( 0 ); timeGroupBox->layout()->setMargin( 5 ); QFrame *timeBoxFrame = new QFrame(timeGroupBox); QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); layoutTimeBox->setSpacing(topLayout->spacing()); mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame); layoutTimeBox->addWidget(mStartDateLabel,0,0); mStartDateEdit = new KDateEdit(timeBoxFrame); layoutTimeBox->addWidget(mStartDateEdit,0,1); mStartTimeEdit = new KOTimeEdit(timeBoxFrame); layoutTimeBox->addWidget(mStartTimeEdit,0,2); mEndDateLabel = new QLabel(i18n("End:"),timeBoxFrame); layoutTimeBox->addWidget(mEndDateLabel,1,0); mEndDateEdit = new KDateEdit(timeBoxFrame); layoutTimeBox->addWidget(mEndDateEdit,1,1); mEndTimeEdit = new KOTimeEdit(timeBoxFrame); layoutTimeBox->addWidget(mEndTimeEdit,1,2); QWidget* duration = new QWidget( timeBoxFrame ); QHBoxLayout *flagsBox = new QHBoxLayout( duration ); mNoTimeButton = new QCheckBox(i18n("All day event"),duration); flagsBox->addWidget(mNoTimeButton); connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); mDurationLabel = new QLabel( duration ); // if ( KOPrefs::instance()->mCompactDialogs ) { //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 ); //} else { flagsBox->addWidget( mDurationLabel ); //} flagsBox->setStretchFactor(mDurationLabel, 10 ); mDurationLabel->setAlignment( AlignRight | AlignVCenter); layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); // time widgets are checked if they contain a valid time connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), this, SLOT(startTimeChanged(QTime))); connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), this, SLOT(endTimeChanged(QTime))); // date widgets are checked if they contain a valid date connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(startDateChanged(QDate))); connect(mEndDateEdit, SIGNAL(dateChanged(QDate)), this, SLOT(endDateChanged(QDate))); + connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); + connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),mEndTimeEdit,SLOT(setTime(QTime))); + } void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *classLayout = new QHBoxLayout(topLayout); QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); classLayout->addWidget(freeTimeLabel); mFreeTimeCombo = new QComboBox(false, parent); mFreeTimeCombo->insertItem(i18n("Busy")); mFreeTimeCombo->insertItem(i18n("Free")); classLayout->addWidget(mFreeTimeCombo); } void KOEditorGeneralEvent::timeStuffDisable(bool disable) { mStartTimeEdit->setEnabled( !disable ); mEndTimeEdit->setEnabled( !disable ); setDuration(); emitDateTimeStr(); } void KOEditorGeneralEvent::dontAssociateTime(bool noTime) { timeStuffDisable(noTime); //if(alarmButton->isChecked()) alarmStuffDisable(noTime); allDayChanged(noTime); } void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end) { // kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; if ( !mTemplate ) mStartDateEdit->setDate(start.date()); // KTimeEdit seems to emit some signals when setTime() is called. mStartTimeEdit->blockSignals( true ); mStartTimeEdit->setTime(start.time()); mStartTimeEdit->blockSignals( false ); if ( !mTemplate ) mEndDateEdit->setDate(end.date()); mEndTimeEdit->setTime(end.time()); mCurrStartDateTime = start; mCurrEndDateTime = end; setDuration(); emitDateTimeStr(); } void KOEditorGeneralEvent::startTimeChanged(QTime newtime) { kdDebug() << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; int secsep = mCurrStartDateTime.secsTo(mCurrEndDateTime); mCurrStartDateTime.setTime(newtime); // adjust end time so that the event has the same duration as before. mCurrEndDateTime = mCurrStartDateTime.addSecs(secsep); mEndTimeEdit->setTime(mCurrEndDateTime.time()); mEndDateEdit->setDate(mCurrEndDateTime.date()); emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } void KOEditorGeneralEvent::endTimeChanged(QTime newtime) { // kdDebug() << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; QDateTime newdt(mCurrEndDateTime.date(), newtime); mCurrEndDateTime = newdt; emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } void KOEditorGeneralEvent::startDateChanged(QDate newdate) { int daysep = mCurrStartDateTime.daysTo(mCurrEndDateTime); mCurrStartDateTime.setDate(newdate); // adjust end date so that the event has the same duration as before mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep)); mEndDateEdit->setDate(mCurrEndDateTime.date()); emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); } void KOEditorGeneralEvent::endDateChanged(QDate newdate) { QDateTime newdt(newdate, mCurrEndDateTime.time()); if(newdt < mCurrStartDateTime) { // oops, we can't let that happen. diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index a03ec52..4a1576a 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp @@ -31,232 +31,235 @@ #include <qdatetime.h> #include <qapplication.h> #include <kglobal.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kdebug.h> #include <krestrictedline.h> #include <kstandarddirs.h> #include <kfiledialog.h> #include <libkcal/todo.h> #include <libkdepim/kdateedit.h> #include "koprefs.h" #include "ktimeedit.h" #include "koeditorgeneraltodo.h" #include "kolocationbox.h" KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, const char* name) : KOEditorGeneral( parent, name) { } KOEditorGeneralTodo::~KOEditorGeneralTodo() { } void KOEditorGeneralTodo::finishSetup() { // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); // QWidget::setTabOrder(mLocationEdit, mDueCheck); // QWidget::setTabOrder(mDueCheck, mDueDateEdit); // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); // QWidget::setTabOrder(mStartCheck, mStartDateEdit); // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); // QWidget::setTabOrder(mTimeButton, mCompletedCombo); // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); mSummaryEdit->load(KOLocationBox::SUMMARYTODO); mSummaryEdit->setFocus(); } void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *timeLayout = new QVBoxLayout(topLayout); QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, i18n("Date && Time"),parent); timeLayout->addWidget(timeGroupBox); timeGroupBox->layout()->setSpacing( 0 ); timeGroupBox->layout()->setMargin( 5 ); QFrame *timeBoxFrame = new QFrame(timeGroupBox); QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); layoutTimeBox->setSpacing(topLayout->spacing()); layoutTimeBox->setColStretch( 1, 1 ); mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); layoutTimeBox->addWidget(mDueCheck,0,0); connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); mDueDateEdit = new KDateEdit(timeBoxFrame); layoutTimeBox->addWidget(mDueDateEdit,0,1); mDueTimeEdit = new KOTimeEdit(timeBoxFrame); layoutTimeBox->addWidget(mDueTimeEdit,0,2); mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); layoutTimeBox->addWidget(mStartCheck,1,0); connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); mStartDateEdit = new KDateEdit(timeBoxFrame); layoutTimeBox->addWidget(mStartDateEdit,1,1); mStartTimeEdit = new KOTimeEdit(timeBoxFrame); layoutTimeBox->addWidget(mStartTimeEdit,1,2); mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); + connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); + connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); // some more layouting //layoutTimeBox->setColStretch(3,1); } void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) { mCompletedCombo = new QComboBox(parent); // xgettext:no-c-format mCompletedCombo->insertItem(i18n(" 0 %")); // xgettext:no-c-format mCompletedCombo->insertItem(i18n(" 20 %")); // xgettext:no-c-format mCompletedCombo->insertItem(i18n(" 40 %")); // xgettext:no-c-format mCompletedCombo->insertItem(i18n(" 60 %")); // xgettext:no-c-format mCompletedCombo->insertItem(i18n(" 80 %")); // xgettext:no-c-format mCompletedCombo->insertItem(i18n("100 %")); connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); topLayout->addWidget(mCompletedCombo); mCompletedLabel = new QLabel(i18n("completed"),parent); topLayout->addWidget(mCompletedLabel); mCompleteDateEdit = new KDateEdit(parent); topLayout->addWidget(mCompleteDateEdit ); mCompleteTimeEdit = new KOTimeEdit(parent); topLayout->addWidget( mCompleteTimeEdit); mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); + connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); if ( QApplication::desktop()->width() <= 480 ) { if ( QApplication::desktop()->width() < 320 ) mCompleteDateEdit->setMaximumWidth( 85 ); - else + else mCompleteDateEdit->setMaximumWidth( 140 ); topLayout->setSpacing( 0 ); } } void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) { QHBox* h = new QHBox ( parent ); topLayout->addWidget( h ); QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); // topLayout->addWidget(priorityLabel); mPriorityCombo = new QComboBox( h ); mPriorityCombo->insertItem(i18n("1 (high)")); mPriorityCombo->insertItem(i18n("2")); mPriorityCombo->insertItem(i18n("3")); mPriorityCombo->insertItem(i18n("4")); mPriorityCombo->insertItem(i18n("5 (low)")); //topLayout->addWidget(mPriorityCombo); } void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *statusLayout = new QHBoxLayout(topLayout); initCompletion( parent, statusLayout ); statusLayout->addStretch( 1 ); initPriority( parent, statusLayout ); } void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) { mSummaryEdit->load(KOLocationBox::SUMMARYTODO); mLocationEdit->load(KOLocationBox::LOCATION); KOEditorGeneral::setDefaults(allDay); mTimeButton->setChecked( !allDay ); if(mTimeButton->isChecked()) { mTimeButton->setEnabled(true); } else { mTimeButton->setEnabled(false); } enableTimeEdits( !allDay ); if ( due.isValid() ) { mDueCheck->setChecked(true); enableDueEdit(true); alarmDisable(false); } else { mDueCheck->setChecked(false); enableDueEdit(false); due = QDateTime::currentDateTime().addDays(7); alarmDisable(true); } mStartCheck->setChecked(false); enableStartEdit(false); mDueDateEdit->setDate(due.date()); mDueTimeEdit->setTime(due.time()); due = due.addDays(-7); mStartDateEdit->setDate(due.date()); mStartTimeEdit->setTime(due.time()); mPriorityCombo->setCurrentItem(2); mCompletedLabel->setText(i18n(" completed"));; mCompletedCombo->setCurrentItem(0); mCompleteDateEdit->hide(); mCompleteTimeEdit->hide(); } void KOEditorGeneralTodo::readTodo(Todo *todo) { mSummaryEdit->load(KOLocationBox::SUMMARYTODO); mLocationEdit->load(KOLocationBox::LOCATION); KOEditorGeneral::readIncidence(todo); QDateTime dueDT; if (todo->hasDueDate()) { enableAlarmEdit(true); dueDT = todo->dtDue(); mDueDateEdit->setDate(todo->dtDue().date()); mDueTimeEdit->setTime(todo->dtDue().time()); mDueCheck->setChecked(true); } else { alarmDisable(true); mDueDateEdit->setEnabled(false); mDueTimeEdit->setEnabled(false); mDueDateEdit->setDate(QDate::currentDate()); diff --git a/libkdepim/kdateedit.cpp b/libkdepim/kdateedit.cpp index 3d9e690..bf38479 100644 --- a/libkdepim/kdateedit.cpp +++ b/libkdepim/kdateedit.cpp @@ -1,230 +1,239 @@ /* This file is part of libkdepim. Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #include <qapplication.h> #include <qevent.h> #include <qlineedit.h> #include <qpixmap.h> #include <qpushbutton.h> #include <kdatepicker.h> #include <kdebug.h> #include <kglobal.h> #include <kiconloader.h> #include <klocale.h> #include <kmessagebox.h> #include <knotifyclient.h> #include <qpalette.h> #include "kdateedit.h" //#include "kdateedit.moc" KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) : QHBox(parent, name) { dateFormShort = true; withoutDp = withoutDP; mDateEdit = new QLineEdit(this); mDateEdit->setText(KGlobal::locale()->formatDate(QDate::currentDate(),dateFormShort)); setFocusProxy(mDateEdit); mDateEdit->installEventFilter(this); // Highlight Background and Textcolor QPalette palette = QWidget::palette(); unsigned char red, green, blue; red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10; green = palette.color( QPalette::Normal , QColorGroup::Background ).green() - 10; blue = palette.color( QPalette::Normal , QColorGroup::Background ).blue() - 10; palette.setColor( QColorGroup::Highlight, QColor(red,green,blue) ); palette.setColor( QColorGroup::HighlightedText, palette.color( QPalette::Normal , QColorGroup::Foreground ) ); mDateEdit->setPalette( palette ); if ( withoutDP ) { mDateFrame = 0; mDateButton = 0; mDatePicker = 0; } else { QPixmap pixmap = SmallIcon("smallcal"); mDateButton = new QPushButton(this); mDateButton->setPixmap(pixmap); + QPixmap pixmap2 = SmallIcon("today_small"); + QPushButton* nowButton = new QPushButton(this); + nowButton->setPixmap(pixmap2); mDateFrame = new QVBox(0,0,WType_Popup); // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); mDateFrame->setLineWidth(3); mDateFrame->hide(); mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate()); connect(mDatePicker,SIGNAL(dateEntered(QDate)),SLOT(setDate(QDate))); connect(mDatePicker,SIGNAL(dateEntered(QDate)),SIGNAL(dateChanged(QDate))); connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(setDate(QDate))); connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate))); connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide())); connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); + connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); mDateButton->setFocusPolicy( QWidget::NoFocus ); mDateButton->setAutoDefault( false ); //mDateFrame->resize( 400, 300 ); } connect(mDateEdit,SIGNAL(returnPressed()),SLOT(lineEnterPressed())); connect(mDateEdit,SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &))); // Create the keyword list. This will be used to match against when the user // enters information. mKeywordMap[i18n("tomorrow")] = 1; mKeywordMap[i18n("today")] = 0; mKeywordMap[i18n("yesterday")] = -1; /* * This loop uses some math tricks to figure out the offset in days * to the next date the given day of the week occurs. There * are two cases, that the new day is >= the current day, which means * the new day has not occured yet or that the new day < the current day, * which means the new day is already passed (so we need to find the * day in the next week). */ QString dayName; int currentDay = QDate::currentDate().dayOfWeek(); for (int i = 1; i <= 7; ++i) { dayName = KGlobal::locale()->weekDayName(i).lower(); if (i >= currentDay) mKeywordMap[dayName] = i - currentDay; else mKeywordMap[dayName] = 7 - currentDay + i; } mTextChanged = false; mHandleInvalid = false; // QWidget::setTabOrder( mDateEdit, mDateButton ); } KDateEdit::~KDateEdit() { delete mDateFrame; } void KDateEdit::clear() { bool b = mDateEdit->signalsBlocked(); mDateEdit->blockSignals(true); mDateEdit->setText(""); mDateEdit->blockSignals(b); } +void KDateEdit::goToNow() +{ + setDate(QDate::currentDate() ); + emit setTimeTo( QTime::currentTime() ); +} void KDateEdit::setDate(QDate newDate) { if (!newDate.isValid() && !mHandleInvalid) return; if ( readDate() == newDate ) return; QString dateString = ""; if(newDate.isValid()) dateString = KGlobal::locale()->formatDate( newDate, dateFormShort ); mTextChanged = false; // We do not want to generate a signal here, since we explicity setting // the date bool b = mDateEdit->signalsBlocked(); mDateEdit->blockSignals(true); mDateEdit->setText(dateString); mDateEdit->blockSignals(b); } void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateFormShort) { QString dateForm = dateFormShort ? KGlobal::locale()->dateFormatShort() : KGlobal::locale()->dateFormat(); int begin = dateForm.find("%"); int space = 0; int allStrLength = 0; int strLength = 0; int repeat = 0; // witch? Day, Month or Year switch? while(1){ switch ( dateForm.at(begin + 1).latin1() ) { case 'd':// 16 (month day) strLength = 2; //Ok break; case 'm':// 01 (month) strLength = 2; //Ok break; case 'a':// Mon (Weekday) strLength = KGlobal::locale()->weekDayName(date.dayOfWeek(), true).length(); break; case 'A':// Monday (Weekday) strLength = KGlobal::locale()->weekDayName(date.dayOfWeek(), false).length(); break; case 'b':// Jan (monthName) strLength = KGlobal::locale()->monthName(date.month(), true).length(); break; case 'B':// January (monthName) strLength = KGlobal::locale()->monthName(date.month(), false).length(); break; case 'y':// 04 (year short) strLength = 2; //Ok break; case 'Y':// 2004 (year) strLength = 4; //Ok break; default: break; } space = begin - (repeat++ * 2); // all select? then dayswitch if( (mDateEdit->text().length() == mDateEdit->markedText().length() ) && ( (dateForm.at(begin + 1).latin1() == 'd') || (dateForm.at(begin + 1).latin1() == 'a') || (dateForm.at(begin + 1).latin1() == 'A') ) ) { break; } // mDateEdit-StringPos == CursorPosition(cpos) then break and set date if( ( (space + allStrLength) <= *cpos && *cpos <= (space + allStrLength + strLength) ) || *cpos < begin ) { break; } allStrLength += strLength; begin = dateForm.find("%", begin +1); } // set date switch ( dateForm.at(begin + 1).latin1() ) { case 'd': case 'a': case 'A': if(key == Key_Up) { setDate( date.addDays( 1 ) ); } else if(key == Key_Down) { setDate( date.addDays( -1 ) ); } maxDay = readDate().day(); break; case 'm': case 'b': case 'B': if(key == Key_Up) { diff --git a/libkdepim/kdateedit.h b/libkdepim/kdateedit.h index cf3b90a..2d8c452 100644 --- a/libkdepim/kdateedit.h +++ b/libkdepim/kdateedit.h @@ -1,141 +1,143 @@ /* This file is part of libkdepim. Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef KDATEEDIT_H #define KDATEEDIT_H #include <qhbox.h> #include <qvbox.h> #include <qdatetime.h> #include <qmap.h> class QLineEdit; class QPushButton; class QObject; class QEvent; class KDatePicker; class KDateValidator; /** * A date editing widget that consists of a line edit followed by * a small push button. The line edit contains the date in text form, * and the push button will display a 'popup' style date picker. * * This widget also supports advanced features like allowing the user * to type in the day name to get the date. The following keywords * are supported (in the native language): tomorrow, yesturday, today, * monday, tuesday, wednesday, thursday, friday, saturday, sunday. * * @author Cornelius Schumacher <schumacher@kde.org> * @author Mike Pilone <mpilone@slac.com> */ class KDateEdit : public QHBox { Q_OBJECT public: KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false ); virtual ~KDateEdit(); /** @return True if the date in the text edit is valid, * false otherwise. This will not modify the display of the date, * but only check for validity. */ bool inputIsValid(); /** @return The date entered. This will not * modify the display of the date, but only return it. */ QDate date() const; /** @param handleInvalid If true the date edit accepts invalid dates * and displays them as the empty ("") string. It also returns an invalid date. * If false (default) invalid dates are not accepted and instead the date * of today will be returned. */ void setHandleInvalid(bool handleInvalid); /** Checks for a focus out event. The display of the date is updated * to display the proper date when the focus leaves. */ virtual bool eventFilter(QObject *o, QEvent *e); void toggleDateFormat(); void clear(); signals: /** This signal is emitted whenever the user modifies the date. This * may not get emitted until the user presses enter in the line edit or * focus leaves the widget (ie: the user confirms their selection). */ void dateChanged(QDate); void returnPressed(); + void setTimeTo( QTime ); public slots: /** Sets the date. * * @param date The new date to display. This date must be valid or * it will not be displayed. */ void setDate(QDate date); // set Date with key_up key_down to relation of cursor Position // and set selection from begin to end of single date void setDate(QDate, int *cpos, const int, const bool); /** Sets the date edit to be enabled or disabled (grayed out) * * @param on Enabled if true, disabled if false */ void setEnabled(bool on); protected slots: void toggleDatePicker(); void lineEnterPressed(); void textChanged(const QString &); + void goToNow(); private: /** Reads the text from the line edit. If the text is a keyword, the * word will be translated to a date. If the text is not a keyword, the * text will be interpreted as a date. */ QDate readDate() const; /** Maps the text that the user can enter to the offset in days from * today. For example, the text 'tomorrow' is mapped to +1. */ QMap<QString, int> mKeywordMap; bool mTextChanged; bool mHandleInvalid; QPushButton *mDateButton; QLineEdit *mDateEdit; KDatePicker *mDatePicker; QVBox *mDateFrame; int maxDay; bool withoutDp; protected: virtual void keyPressEvent(QKeyEvent *qke); void setSelect ( int, int ); bool dateFormShort; char lengthMonthName; }; #endif |