author | zautrix <zautrix> | 2005-04-14 17:48:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-14 17:48:58 (UTC) |
commit | bbdca90c599aaea557d31552c6bc33fc15e397cd (patch) (unidiff) | |
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 @@ | |||
1 | ############################################################################# | 1 | export KDEPIMDIR = $(shell pwd) |
2 | # Makefile for building: kdepim-desktop | 2 | |
3 | # Generated by qmake (1.07a) (Qt 3.3.3) on: Wed Apr 13 21:23:44 2005 | 3 | export KDEPIM_VERSION=$(shell sed -e 's/.*\"\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' < version) |
4 | # Project: kdepim-desktop.pro | 4 | |
5 | # Template: subdirs | 5 | ifeq ($(PLATFORM) , zaurus) |
6 | # Command: $(QMAKE) -o Makefile kdepim-desktop.pro | 6 | BUILD_NO_LDAP_PLUGIN=1 |
7 | ############################################################################# | 7 | endif |
8 | 8 | ||
9 | MAKEFILE =Makefile | 9 | ifneq ($(PLATFORM) , zaurus) |
10 | QMAKE =qmake | 10 | BUILD_NO_SHARP_PLUGIN=1 |
11 | DEL_FILE = rm -f | 11 | endif |
12 | CHK_DIR_EXISTS= test -d | 12 | |
13 | MKDIR = mkdir -p | 13 | #opie plugin is deprecated. The qtopia plugin handles the task from now on. |
14 | INSTALL_FILE= | 14 | BUILD_NO_OPIE_PLUGIN=1 |
15 | INSTALL_DIR = | 15 | |
16 | SUBTARGETS = \ | 16 | SUBDIRS_MICROKDE = \ |
17 | sub-kabc-plugins-file \ | 17 | libical/src/libical \ |
18 | sub-kabc-plugins-dir \ | 18 | libical/src/libicalss \ |
19 | sub-kabc-plugins-qtopia \ | 19 | qtcompat \ |
20 | sub-libical \ | 20 | microkde \ |
21 | sub-libkcal \ | 21 | libkcal \ |
22 | sub-kabc \ | 22 | libkdepim \ |
23 | sub-libkdepim \ | 23 | kabc \ |
24 | sub-microkde \ | 24 | kabc/formats/binary \ |
25 | sub-korganizer \ | 25 | kabc/plugins/file \ |
26 | sub-kaddressbook \ | 26 | kabc/plugins/dir \ |
27 | sub-gammu-emb-common \ | 27 | korganizer \ |
28 | sub-gammu-emb-gammu \ | 28 | kalarmd \ |
29 | sub-libetpan \ | 29 | kaddressbook |
30 | sub-kmicromail-libmailwrapper \ | 30 | |
31 | sub-kmicromail \ | 31 | SUBDIRS_QTOPIA_PLUGIN = \ |
32 | sub-pwmanager-libcrypt-cipher \ | 32 | kabc/plugins/qtopia |
33 | sub-pwmanager-libcrypt-error \ | 33 | |
34 | sub-pwmanager-libcrypt-mpi \ | 34 | SUBDIRS_OPIE_PLUGIN = \ |
35 | sub-pwmanager-libcrypt-zlib \ | 35 | kabc/plugins/opie |
36 | sub-pwmanager-pwmanager | 36 | |
37 | 37 | SUBDIRS_SHARP_PLUGIN = \ | |
38 | first: all | 38 | kabc/plugins/sharpdtm |
39 | 39 | ||
40 | all: Makefile $(SUBTARGETS) | 40 | SUBDIRS_LDAP_PLUGIN = \ |
41 | 41 | kabc/plugins/ldap | |
42 | kabc/plugins/file/$(MAKEFILE): | 42 | |
43 | @$(CHK_DIR_EXISTS) "kabc/plugins/file" || $(MKDIR) "kabc/plugins/file" | 43 | SUBDIRS_MICROMAIL = \ |
44 | cd kabc/plugins/file && $(QMAKE) file.pro -o $(MAKEFILE) | 44 | libetpan \ |
45 | sub-kabc-plugins-file: kabc/plugins/file/$(MAKEFILE) FORCE | 45 | kmicromail/libmailwrapper \ |
46 | cd kabc/plugins/file && $(MAKE) -f $(MAKEFILE) | 46 | kmicromail |
47 | 47 | ||
48 | kabc/plugins/dir/$(MAKEFILE): | 48 | SUBDIRS_GAMMU = \ |
49 | @$(CHK_DIR_EXISTS) "kabc/plugins/dir" || $(MKDIR) "kabc/plugins/dir" | 49 | gammu/emb/common \ |
50 | cd kabc/plugins/dir && $(QMAKE) dir.pro -o $(MAKEFILE) | 50 | gammu/emb/gammu |
51 | sub-kabc-plugins-dir: kabc/plugins/dir/$(MAKEFILE) FORCE | 51 | |
52 | cd kabc/plugins/dir && $(MAKE) -f $(MAKEFILE) | 52 | SUBDIRS_PWMANAGER = \ |
53 | 53 | pwmanager/libcrypt/mpi \ | |
54 | kabc/plugins/qtopia/$(MAKEFILE): | 54 | pwmanager/libcrypt/error \ |
55 | @$(CHK_DIR_EXISTS) "kabc/plugins/qtopia" || $(MKDIR) "kabc/plugins/qtopia" | 55 | pwmanager/libcrypt/cipher \ |
56 | cd kabc/plugins/qtopia && $(QMAKE) qtopia.pro -o $(MAKEFILE) | 56 | pwmanager/libcrypt/zlib \ |
57 | sub-kabc-plugins-qtopia: kabc/plugins/qtopia/$(MAKEFILE) FORCE | 57 | pwmanager/pwmanager |
58 | cd kabc/plugins/qtopia && $(MAKE) -f $(MAKEFILE) | 58 | |
59 | 59 | SUBDIRS = \ | |
60 | libical/$(MAKEFILE): | 60 | $(SUBDIRS_MICROKDE) \ |
61 | @$(CHK_DIR_EXISTS) "libical" || $(MKDIR) "libical" | 61 | $(SUBDIRS_QTOPIA_PLUGIN) \ |
62 | cd libical && $(QMAKE) libical.pro -o $(MAKEFILE) | 62 | $(SUBDIRS_OPIE_PLUGIN) \ |
63 | sub-libical: libical/$(MAKEFILE) FORCE | 63 | $(SUBDIRS_SHARP_PLUGIN) \ |
64 | cd libical && $(MAKE) -f $(MAKEFILE) | 64 | $(SUBDIRS_LDAP_PLUGIN) \ |
65 | 65 | $(SUBDIRS_MICROMAIL) \ | |
66 | libkcal/$(MAKEFILE): | 66 | $(SUBDIRS_GAMMU) \ |
67 | @$(CHK_DIR_EXISTS) "libkcal" || $(MKDIR) "libkcal" | 67 | $(SUBDIRS_PWMANAGER) |
68 | cd libkcal && $(QMAKE) libkcal.pro -o $(MAKEFILE) | 68 | |
69 | sub-libkcal: libkcal/$(MAKEFILE) FORCE | 69 | |
70 | cd libkcal && $(MAKE) -f $(MAKEFILE) | 70 | all: build_microkde \ |
71 | 71 | build_qtopia_plugin \ | |
72 | kabc/$(MAKEFILE): | 72 | build_opie_plugin \ |
73 | @$(CHK_DIR_EXISTS) "kabc" || $(MKDIR) "kabc" | 73 | build_sharp_plugin \ |
74 | cd kabc && $(QMAKE) kabc.pro -o $(MAKEFILE) | 74 | build_ldap_plugin \ |
75 | sub-kabc: kabc/$(MAKEFILE) FORCE | 75 | build_micromail \ |
76 | cd kabc && $(MAKE) -f $(MAKEFILE) | 76 | build_gammu \ |
77 | 77 | build_pwmanager | |
78 | libkdepim/$(MAKEFILE): | 78 | |
79 | @$(CHK_DIR_EXISTS) "libkdepim" || $(MKDIR) "libkdepim" | 79 | |
80 | cd libkdepim && $(QMAKE) libkdepim.pro -o $(MAKEFILE) | 80 | build_microkde: variable_test tmake |
81 | sub-libkdepim: libkdepim/$(MAKEFILE) FORCE | 81 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ |
82 | cd libkdepim && $(MAKE) -f $(MAKEFILE) | 82 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
83 | 83 | done | |
84 | microkde/$(MAKEFILE): | 84 | |
85 | @$(CHK_DIR_EXISTS) "microkde" || $(MKDIR) "microkde" | 85 | build_qtopia_plugin: build_microkde |
86 | cd microkde && $(QMAKE) microkde.pro -o $(MAKEFILE) | 86 | ifdef BUILD_NO_QTOPIA_PLUGIN |
87 | sub-microkde: microkde/$(MAKEFILE) FORCE | 87 | @echo == qtopia plugin not build. |
88 | cd microkde && $(MAKE) -f $(MAKEFILE) | 88 | else |
89 | 89 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ | |
90 | korganizer/$(MAKEFILE): | 90 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
91 | @$(CHK_DIR_EXISTS) "korganizer" || $(MKDIR) "korganizer" | 91 | done |
92 | cd korganizer && $(QMAKE) korganizer.pro -o $(MAKEFILE) | 92 | endif |
93 | sub-korganizer: korganizer/$(MAKEFILE) FORCE | 93 | |
94 | cd korganizer && $(MAKE) -f $(MAKEFILE) | 94 | build_opie_plugin: build_microkde |
95 | 95 | ifdef BUILD_NO_OPIE_PLUGIN | |
96 | kaddressbook/$(MAKEFILE): | 96 | @echo == opie plugin not build. |
97 | @$(CHK_DIR_EXISTS) "kaddressbook" || $(MKDIR) "kaddressbook" | 97 | else |
98 | cd kaddressbook && $(QMAKE) kaddressbook.pro -o $(MAKEFILE) | 98 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ |
99 | sub-kaddressbook: kaddressbook/$(MAKEFILE) FORCE | 99 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
100 | cd kaddressbook && $(MAKE) -f $(MAKEFILE) | 100 | done |
101 | 101 | endif | |
102 | gammu/emb/common/$(MAKEFILE): | 102 | |
103 | @$(CHK_DIR_EXISTS) "gammu/emb/common" || $(MKDIR) "gammu/emb/common" | 103 | build_sharp_plugin: build_microkde |
104 | cd gammu/emb/common && $(QMAKE) common.pro -o $(MAKEFILE) | 104 | ifdef BUILD_NO_SHARP_PLUGIN |
105 | sub-gammu-emb-common: gammu/emb/common/$(MAKEFILE) FORCE | 105 | @echo == ldap plugin not build. |
106 | cd gammu/emb/common && $(MAKE) -f $(MAKEFILE) | 106 | else |
107 | 107 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ | |
108 | gammu/emb/gammu/$(MAKEFILE): | 108 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
109 | @$(CHK_DIR_EXISTS) "gammu/emb/gammu" || $(MKDIR) "gammu/emb/gammu" | 109 | done |
110 | cd gammu/emb/gammu && $(QMAKE) gammu.pro -o $(MAKEFILE) | 110 | endif |
111 | sub-gammu-emb-gammu: gammu/emb/gammu/$(MAKEFILE) FORCE | 111 | |
112 | cd gammu/emb/gammu && $(MAKE) -f $(MAKEFILE) | 112 | build_ldap_plugin: build_microkde |
113 | 113 | ifdef BUILD_NO_LDAP_PLUGIN | |
114 | libetpan/$(MAKEFILE): | 114 | @echo == ldap plugin not build. |
115 | @$(CHK_DIR_EXISTS) "libetpan" || $(MKDIR) "libetpan" | 115 | else |
116 | cd libetpan && $(QMAKE) libetpan.pro -o $(MAKEFILE) | 116 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ |
117 | sub-libetpan: libetpan/$(MAKEFILE) FORCE | 117 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
118 | cd libetpan && $(MAKE) -f $(MAKEFILE) | 118 | done |
119 | 119 | endif | |
120 | kmicromail/libmailwrapper/$(MAKEFILE): | 120 | |
121 | @$(CHK_DIR_EXISTS) "kmicromail/libmailwrapper" || $(MKDIR) "kmicromail/libmailwrapper" | 121 | |
122 | cd kmicromail/libmailwrapper && $(QMAKE) libmailwrapper.pro -o $(MAKEFILE) | 122 | build_micromail: build_microkde |
123 | sub-kmicromail-libmailwrapper: kmicromail/libmailwrapper/$(MAKEFILE) FORCE | 123 | ifdef BUILD_NO_MICROMAIL |
124 | cd kmicromail/libmailwrapper && $(MAKE) -f $(MAKEFILE) | 124 | @echo == kmicromail not build. |
125 | 125 | else | |
126 | kmicromail/$(MAKEFILE): | 126 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ |
127 | @$(CHK_DIR_EXISTS) "kmicromail" || $(MKDIR) "kmicromail" | 127 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
128 | cd kmicromail && $(QMAKE) kmicromail.pro -o $(MAKEFILE) | 128 | done |
129 | sub-kmicromail: kmicromail/$(MAKEFILE) FORCE | 129 | endif |
130 | cd kmicromail && $(MAKE) -f $(MAKEFILE) | 130 | |
131 | 131 | build_gammu: variable_test tmake | |
132 | pwmanager/libcrypt/cipher/$(MAKEFILE): | 132 | ifdef BUILD_NO_GAMMU |
133 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/cipher" || $(MKDIR) "pwmanager/libcrypt/cipher" | 133 | @echo == gammu not build. |
134 | cd pwmanager/libcrypt/cipher && $(QMAKE) cipher.pro -o $(MAKEFILE) | 134 | else |
135 | sub-pwmanager-libcrypt-cipher: pwmanager/libcrypt/cipher/$(MAKEFILE) FORCE | 135 | for i in $(SUBDIRS_GAMMU); do pushd $$i; \ |
136 | cd pwmanager/libcrypt/cipher && $(MAKE) -f $(MAKEFILE) | 136 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
137 | 137 | done | |
138 | pwmanager/libcrypt/error/$(MAKEFILE): | 138 | endif |
139 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/error" || $(MKDIR) "pwmanager/libcrypt/error" | 139 | |
140 | cd pwmanager/libcrypt/error && $(QMAKE) error.pro -o $(MAKEFILE) | 140 | build_pwmanager: build_microkde |
141 | sub-pwmanager-libcrypt-error: pwmanager/libcrypt/error/$(MAKEFILE) FORCE | 141 | ifdef BUILD_NO_PWMANAGER |
142 | cd pwmanager/libcrypt/error && $(MAKE) -f $(MAKEFILE) | 142 | @echo == pwmanager not build. |
143 | 143 | else | |
144 | pwmanager/libcrypt/mpi/$(MAKEFILE): | 144 | for i in $(SUBDIRS_PWMANAGER); do pushd $$i; \ |
145 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/mpi" || $(MKDIR) "pwmanager/libcrypt/mpi" | 145 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
146 | cd pwmanager/libcrypt/mpi && $(QMAKE) mpi.pro -o $(MAKEFILE) | 146 | done |
147 | sub-pwmanager-libcrypt-mpi: pwmanager/libcrypt/mpi/$(MAKEFILE) FORCE | 147 | endif |
148 | cd pwmanager/libcrypt/mpi && $(MAKE) -f $(MAKEFILE) | 148 | |
149 | 149 | ||
150 | pwmanager/libcrypt/zlib/$(MAKEFILE): | 150 | variable_info: |
151 | @$(CHK_DIR_EXISTS) "pwmanager/libcrypt/zlib" || $(MKDIR) "pwmanager/libcrypt/zlib" | 151 | @echo -------------------------------------- |
152 | cd pwmanager/libcrypt/zlib && $(QMAKE) zlib.pro -o $(MAKEFILE) | 152 | @echo KDEPIM buildsystem, variableinfo... |
153 | sub-pwmanager-libcrypt-zlib: pwmanager/libcrypt/zlib/$(MAKEFILE) FORCE | 153 | @echo KDEPIMDIR=$(KDEPIMDIR) |
154 | cd pwmanager/libcrypt/zlib && $(MAKE) -f $(MAKEFILE) | 154 | @echo QTDIR=$(QTDIR) |
155 | 155 | @echo QPEDIR=$(QPEDIR) | |
156 | pwmanager/pwmanager/$(MAKEFILE): | 156 | @echo OPIEDIR=$(OPIEDIR) |
157 | @$(CHK_DIR_EXISTS) "pwmanager/pwmanager" || $(MKDIR) "pwmanager/pwmanager" | 157 | @echo PLATFORM=$(PLATFORM) |
158 | cd pwmanager/pwmanager && $(QMAKE) pwmanager.pro -o $(MAKEFILE) | 158 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) |
159 | sub-pwmanager-pwmanager: pwmanager/pwmanager/$(MAKEFILE) FORCE | 159 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) |
160 | cd pwmanager/pwmanager && $(MAKE) -f $(MAKEFILE) | 160 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) |
161 | 161 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) | |
162 | Makefile: kdepim-desktop.pro /usr/lib/qt3/mkspecs/default/qmake.conf variables.pri | 162 | @echo BUILD_NO_QTOPIA_PLUGIN=$(BUILD_NO_QTOPIA_PLUGIN) |
163 | $(QMAKE) -o Makefile kdepim-desktop.pro | 163 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) |
164 | qmake: qmake_all | 164 | ifndef BUILD_NO_SHARP_PLUGIN |
165 | @$(QMAKE) -o Makefile kdepim-desktop.pro | 165 | @echo SHARPDTMSDK=$(SHARPDTMSDK) |
166 | 166 | endif | |
167 | all: $(SUBTARGETS) | 167 | @echo BUILD_NO_GAMMU=$(BUILD_NO_GAMMU) |
168 | 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) | 168 | @echo BUILD_NO_PWMANAGER=$(BUILD_NO_PWMANAGER) |
169 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 169 | @echo -------------------------------------- |
170 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 170 | |
171 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 171 | variable_test: variable_info |
172 | ( [ -d libical ] && cd libical ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 172 | @echo KDEPIM buildsystem, variablecheck... |
173 | ( [ -d libkcal ] && cd libkcal ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 173 | ifndef KDEPIMDIR |
174 | ( [ -d kabc ] && cd kabc ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 174 | @echo KDEPIMDIR is not defined. |
175 | ( [ -d libkdepim ] && cd libkdepim ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 175 | $(error KDEPIMDIR is not defined) |
176 | ( [ -d microkde ] && cd microkde ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 176 | endif |
177 | ( [ -d korganizer ] && cd korganizer ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 177 | ifndef PLATFORM |
178 | ( [ -d kaddressbook ] && cd kaddressbook ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 178 | @echo PLATFORM is not defined. |
179 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 179 | $(error PLATFORM is not defined) |
180 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 180 | endif |
181 | ( [ -d libetpan ] && cd libetpan ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 181 | ifdef BUILD_NO_LDAP_PLUGIN |
182 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 182 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) |
183 | ( [ -d kmicromail ] && cd kmicromail ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 183 | endif |
184 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 184 | ifdef BUILD_NO_OPIE_PLUGIN |
185 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 185 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) |
186 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 186 | endif |
187 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 187 | ifdef BUILD_NO_QTOPIA_PLUGIN |
188 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; grep "^qmake_all:" $(MAKEFILE) && $(MAKE) -f $(MAKEFILE) qmake_all; ) || true | 188 | @echo QTOPIA PLUGIN will not be build, because BUILD_NO__QTOPIA_PLUGIN is set to $(BUILD_NO__QTOPIA_PLUGIN) |
189 | clean uicables mocables uiclean mocclean lexclean yaccclean : qmake_all FORCE | 189 | endif |
190 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 190 | ifdef BUILD_NO_MICROMAIL |
191 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 191 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) |
192 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 192 | endif |
193 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 193 | ifdef BUILD_NO_SHARP_PLUGIN |
194 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 194 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) |
195 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 195 | else |
196 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 196 | ifndef SHARPDTMSDK |
197 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 197 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) |
198 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 198 | $(error SHARPDTMSDK is not defined) |
199 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 199 | endif |
200 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 200 | endif |
201 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 201 | ifdef BUILD_NO_GAMMU |
202 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 202 | @echo GAMMU will not be build, because BUILD_NO_GAMMU is set to $(BUILD_NO_GAMMU) |
203 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 203 | endif |
204 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 204 | ifdef BUILD_NO_PWMANAGER |
205 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 205 | @echo PWMANAGER will not be build, because BUILD_NO_PWMANAGER is set to $(BUILD_NO_PWMANAGER) |
206 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 206 | endif |
207 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 207 | @echo -------------------------------------- |
208 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 208 | |
209 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; ) || true | 209 | |
210 | uninstall_subdirs: qmake_all FORCE | 210 | objects: |
211 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 211 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done |
212 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 212 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done |
213 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 213 | mkdir -p libical/lib/$(PLATFORM) |
214 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 214 | mkdir -p dest |
215 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 215 | mkdir -p dest$(LIBICAL_PATH) |
216 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 216 | mkdir -p pwmanager/libcrypt/$(PLATFORM) |
217 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 217 | |
218 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 218 | clean: |
219 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 219 | rm -rf libical/lib/$(PLATFORM)/*; |
220 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 220 | rm -rf pwmanager/libcrypt/$(PLATFORM)/*; |
221 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 221 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ |
222 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 222 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ |
223 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 223 | done |
224 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 224 | |
225 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 225 | pac: |
226 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 226 | rm -f $(QPEDIR)/lib/libmicro* |
227 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 227 | rm -f $(QPEDIR)/plugins/applets/libkopi* |
228 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 228 | make |
229 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 229 | make install |
230 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) uninstall; ) || true | 230 | make dist |
231 | install_subdirs: qmake_all FORCE | 231 | install: |
232 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) install; ) || true | 232 | |
233 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) install; ) || true | 233 | cd bin/kdepim; make install |
234 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) install; ) || true | 234 | cp -r Pim $(QPEDIR)/apps |
235 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) install; ) || true | 235 | cp db2file/db2file $(QPEDIR)/bin/db2file |
236 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) install; ) || true | 236 | chmod ugo+x $(QPEDIR)/bin/db2file |
237 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) install; ) || true | 237 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop |
238 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) install; ) || true | 238 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop |
239 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) install; ) || true | 239 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kopiemail.desktop |
240 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) install; ) || true | 240 | cp pwmanager/pwmanager/pwmanager.desktop $(QPEDIR)/apps/Pim/pwmanager.desktop |
241 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) install; ) || true | 241 | |
242 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) install; ) || true | 242 | dist: |
243 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) install; ) || true | 243 | @echo Dont forget to do "make install" before "make dist" |
244 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) install; ) || true | 244 | rm -f *arm.ipk |
245 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) install; ) || true | 245 | rm -f *ipk.zip |
246 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) install; ) || true | 246 | rm -rf ../kdepimpi_$(KDEPIM_VERSION)/* |
247 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) install; ) || true | 247 | rm -f *~ |
248 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) install; ) || true | 248 | cd ..;mkdir -p kdepimpi_$(KDEPIM_VERSION) |
249 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) install; ) || true | 249 | cd ../kdepimpi_$(KDEPIM_VERSION);mkdir -p ipk |
250 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) install; ) || true | 250 | cd ..; tar czf kdepimpi-$(KDEPIM_VERSION).tar.gz --exclude=obj --exclude=moc --exclude=CVS --exclude=Makefilezaurus --exclude=Makefileqtopia kdepim |
251 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) install; ) || true | 251 | mkipks kmicrokdelibs.control |
252 | distclean: qmake_all FORCE | 252 | mkipks korganizer.control |
253 | ( [ -d kabc/plugins/file ] && cd kabc/plugins/file ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 253 | mkipks kaddressbook.control |
254 | ( [ -d kabc/plugins/dir ] && cd kabc/plugins/dir ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 254 | ifndef BUILD_NO_MICROMAIL |
255 | ( [ -d kabc/plugins/qtopia ] && cd kabc/plugins/qtopia ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 255 | mkipks kopiemail.control |
256 | ( [ -d libical ] && cd libical ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 256 | endif |
257 | ( [ -d libkcal ] && cd libkcal ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 257 | ifndef BUILD_NO_SHARP_PLUGIN |
258 | ( [ -d kabc ] && cd kabc ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 258 | mkipks ksharpPIM-DTMaccess.control |
259 | ( [ -d libkdepim ] && cd libkdepim ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 259 | endif |
260 | ( [ -d microkde ] && cd microkde ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 260 | mkipks korganizer-alarm.control |
261 | ( [ -d korganizer ] && cd korganizer ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 261 | ifndef BUILD_NO_GAMMU |
262 | ( [ -d kaddressbook ] && cd kaddressbook ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 262 | mkipks kmobilephoneaccess.control |
263 | ( [ -d gammu/emb/common ] && cd gammu/emb/common ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 263 | endif |
264 | ( [ -d gammu/emb/gammu ] && cd gammu/emb/gammu ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 264 | ifndef BUILD_NO_PWMANAGER |
265 | ( [ -d libetpan ] && cd libetpan ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 265 | mkipks pwmanager.control |
266 | ( [ -d kmicromail/libmailwrapper ] && cd kmicromail/libmailwrapper ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 266 | endif |
267 | ( [ -d kmicromail ] && cd kmicromail ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 267 | mkipks pimTABicon.control |
268 | ( [ -d pwmanager/libcrypt/cipher ] && cd pwmanager/libcrypt/cipher ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 268 | zip kdepim_$(KDEPIM_VERSION)_for_SharpRom.ipk.zip *.ipk ReleaseNotes.txt |
269 | ( [ -d pwmanager/libcrypt/error ] && cd pwmanager/libcrypt/error ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 269 | mv *.ipk ../kdepimpi_$(KDEPIM_VERSION)/ipk/ |
270 | ( [ -d pwmanager/libcrypt/mpi ] && cd pwmanager/libcrypt/mpi ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 270 | mv *for_SharpRom.ipk.zip ../kdepimpi_$(KDEPIM_VERSION)/ |
271 | ( [ -d pwmanager/libcrypt/zlib ] && cd pwmanager/libcrypt/zlib ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 271 | mv ../kdepimpi-$(KDEPIM_VERSION).tar.gz ../kdepimpi_$(KDEPIM_VERSION)/ |
272 | ( [ -d pwmanager/pwmanager ] && cd pwmanager/pwmanager ; $(MAKE) -f $(MAKEFILE) $@; $(DEL_FILE) $(MAKEFILE); ) || true | 272 | |
273 | 273 | tmake: objects \ | |
274 | install: install_subdirs | 274 | qtcompat/Makefile$(PLATFORM) \ |
275 | 275 | microkde/Makefile$(PLATFORM) \ | |
276 | uninstall: uninstall_subdirs | 276 | libkcal/Makefile$(PLATFORM) \ |
277 | 277 | libkdepim/Makefile$(PLATFORM) \ | |
278 | FORCE: | 278 | korganizer/Makefile$(PLATFORM) \ |
279 | kalarmd/Makefile$(PLATFORM) \ | ||
280 | libical/src/libical/Makefile$(PLATFORM) \ | ||
281 | libical/src/libicalss/Makefile$(PLATFORM) \ | ||
282 | kabc/Makefile$(PLATFORM) \ | ||
283 | kabc/formats/binary/Makefile$(PLATFORM) \ | ||
284 | kabc/plugins/file/Makefile$(PLATFORM) \ | ||
285 | kabc/plugins/dir/Makefile$(PLATFORM) \ | ||
286 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | ||
287 | kabc/plugins/opie/Makefile$(PLATFORM) \ | ||
288 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | ||
289 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | ||
290 | kaddressbook/Makefile$(PLATFORM) \ | ||
291 | kmicromail/Makefile$(PLATFORM) \ | ||
292 | libetpan/Makefile$(PLATFORM) \ | ||
293 | kmicromail/libmailwrapper/Makefile$(PLATFORM) \ | ||
294 | gammu/emb/common/Makefile$(PLATFORM) \ | ||
295 | gammu/emb/gammu/Makefile$(PLATFORM) \ | ||
296 | pwmanager/pwmanager/Makefile$(PLATFORM) \ | ||
297 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM) \ | ||
298 | pwmanager/libcrypt/error/Makefile$(PLATFORM) \ | ||
299 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM) \ | ||
300 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM) | ||
301 | |||
302 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | ||
303 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtcompat.pro -o Makefile$(PLATFORM) | ||
304 | |||
305 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | ||
306 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" microkdeE.pro -o Makefile$(PLATFORM) | ||
307 | |||
308 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | ||
309 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkcalE.pro -o Makefile$(PLATFORM) | ||
310 | |||
311 | |||
312 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | ||
313 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libkdepimE.pro -o Makefile$(PLATFORM) | ||
314 | |||
315 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | ||
316 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kalarmdE.pro -o Makefile$(PLATFORM) | ||
317 | |||
318 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | ||
319 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" korganizerE.pro -o Makefile$(PLATFORM) | ||
320 | |||
321 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | ||
322 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalE.pro -o Makefile$(PLATFORM) | ||
323 | |||
324 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | ||
325 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libicalssE.pro -o Makefile$(PLATFORM) | ||
326 | |||
327 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | ||
328 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcE.pro -o Makefile$(PLATFORM) | ||
329 | |||
330 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | ||
331 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | ||
332 | |||
333 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | ||
334 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" fileE.pro -o Makefile$(PLATFORM) | ||
335 | |||
336 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | ||
337 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" dirE.pro -o Makefile$(PLATFORM) | ||
338 | |||
339 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | ||
340 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" ldapE.pro -o Makefile$(PLATFORM) | ||
341 | |||
342 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | ||
343 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" opieE.pro -o Makefile$(PLATFORM) | ||
344 | |||
345 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | ||
346 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" qtopiaE.pro -o Makefile$(PLATFORM) | ||
347 | |||
348 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | ||
349 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" sharpdtmE.pro -o Makefile$(PLATFORM) | ||
350 | |||
351 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | ||
352 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kaddressbookE.pro -o Makefile$(PLATFORM) | ||
353 | |||
354 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | ||
355 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" kmicromailE.pro -o Makefile$(PLATFORM) | ||
356 | |||
357 | libetpan/Makefile$(PLATFORM): libetpan/libetpanE.pro | ||
358 | cd libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libetpanE.pro -o Makefile$(PLATFORM) | ||
359 | |||
360 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | ||
361 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" libmailwrapperE.pro -o Makefile$(PLATFORM) | ||
362 | |||
363 | gammu/emb/common/Makefile$(PLATFORM): gammu/emb/common/commonE.pro | ||
364 | cd gammu/emb/common; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" commonE.pro -o Makefile$(PLATFORM) | ||
365 | |||
366 | gammu/emb/gammu/Makefile$(PLATFORM): gammu/emb/gammu/gammuE.pro | ||
367 | cd gammu/emb/gammu; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" gammuE.pro -o Makefile$(PLATFORM) | ||
368 | |||
369 | pwmanager/pwmanager/Makefile$(PLATFORM): pwmanager/pwmanager/pwmanagerE.pro | ||
370 | cd pwmanager/pwmanager; tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" pwmanagerE.pro -o Makefile$(PLATFORM) | ||
371 | |||
372 | |||
373 | pwmanager/libcrypt/mpi/Makefile$(PLATFORM): pwmanager/libcrypt/mpi/mpi.pro | ||
374 | cd pwmanager/libcrypt/mpi;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" mpi.pro -o Makefile$(PLATFORM) | ||
375 | |||
376 | pwmanager/libcrypt/error/Makefile$(PLATFORM): pwmanager/libcrypt/error/error.pro | ||
377 | cd pwmanager/libcrypt/error;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" error.pro -o Makefile$(PLATFORM) | ||
378 | |||
379 | pwmanager/libcrypt/cipher/Makefile$(PLATFORM): pwmanager/libcrypt/cipher/cipher.pro | ||
380 | cd pwmanager/libcrypt/cipher;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" cipher.pro -o Makefile$(PLATFORM) | ||
381 | |||
382 | pwmanager/libcrypt/zlib/Makefile$(PLATFORM): pwmanager/libcrypt/zlib/zlib.pro | ||
383 | cd pwmanager/libcrypt/zlib;tmake "CONFIG+=$(RELEASE_DEBUG)" "VERSION=$(KDEPIM_VERSION)" zlib.pro -o Makefile$(PLATFORM) | ||
384 | |||
279 | 385 | ||
diff --git a/bin/kdepim/kaddressbook/icons16/today_small.png b/bin/kdepim/kaddressbook/icons16/today_small.png new file mode 100644 index 0000000..fcc4ac2 --- a/dev/null +++ b/bin/kdepim/kaddressbook/icons16/today_small.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/kaddressbook/icons22/today_small.png b/bin/kdepim/kaddressbook/icons22/today_small.png new file mode 100644 index 0000000..fcc4ac2 --- a/dev/null +++ b/bin/kdepim/kaddressbook/icons22/today_small.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/korganizer/today_small.png b/bin/kdepim/korganizer/today_small.png new file mode 100644 index 0000000..fcc4ac2 --- a/dev/null +++ b/bin/kdepim/korganizer/today_small.png | |||
Binary files differ | |||
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 @@ | |||
49 | KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, | 49 | KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, |
50 | const char* name) : | 50 | const char* name) : |
51 | KOEditorGeneral( parent, name) | 51 | KOEditorGeneral( parent, name) |
52 | { | 52 | { |
53 | mTemplate = false; | 53 | mTemplate = false; |
54 | connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), | 54 | connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), |
55 | SLOT(setDuration())); | 55 | SLOT(setDuration())); |
56 | connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), | 56 | connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), |
57 | SLOT(emitDateTimeStr())); | 57 | SLOT(emitDateTimeStr())); |
58 | } | 58 | } |
59 | 59 | ||
60 | KOEditorGeneralEvent::~KOEditorGeneralEvent() | 60 | KOEditorGeneralEvent::~KOEditorGeneralEvent() |
61 | { | 61 | { |
62 | } | 62 | } |
63 | 63 | ||
64 | void KOEditorGeneralEvent::finishSetup() | 64 | void KOEditorGeneralEvent::finishSetup() |
65 | { | 65 | { |
66 | 66 | ||
67 | //disabled | 67 | //disabled |
68 | // QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); | 68 | // QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); |
69 | // QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); | 69 | // QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); |
70 | // QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); | 70 | // QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); |
71 | // QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); | 71 | // QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); |
72 | // QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); | 72 | // QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); |
73 | // QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton ); | 73 | // QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton ); |
74 | // QWidget::setTabOrder( mNoTimeButton, mAlarmButton ); | 74 | // QWidget::setTabOrder( mNoTimeButton, mAlarmButton ); |
75 | // QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); | 75 | // QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); |
76 | // QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton ); | 76 | // QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton ); |
77 | // QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); | 77 | // QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); |
78 | // QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); | 78 | // QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); |
79 | 79 | ||
80 | 80 | ||
81 | 81 | ||
82 | mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); | 82 | mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); |
83 | mSummaryEdit->setFocus(); | 83 | mSummaryEdit->setFocus(); |
84 | } | 84 | } |
85 | 85 | ||
86 | void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) | 86 | void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) |
87 | { | 87 | { |
88 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); | 88 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); |
89 | 89 | ||
90 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, | 90 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, |
91 | i18n("Date && Time"),parent); | 91 | i18n("Date && Time"),parent); |
92 | timeLayout->addWidget(timeGroupBox); | 92 | timeLayout->addWidget(timeGroupBox); |
93 | 93 | ||
94 | timeGroupBox->layout()->setSpacing( 0 ); | 94 | timeGroupBox->layout()->setSpacing( 0 ); |
95 | timeGroupBox->layout()->setMargin( 5 ); | 95 | timeGroupBox->layout()->setMargin( 5 ); |
96 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); | 96 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); |
97 | 97 | ||
98 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); | 98 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); |
99 | layoutTimeBox->setSpacing(topLayout->spacing()); | 99 | layoutTimeBox->setSpacing(topLayout->spacing()); |
100 | 100 | ||
101 | mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame); | 101 | mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame); |
102 | layoutTimeBox->addWidget(mStartDateLabel,0,0); | 102 | layoutTimeBox->addWidget(mStartDateLabel,0,0); |
103 | 103 | ||
104 | mStartDateEdit = new KDateEdit(timeBoxFrame); | 104 | mStartDateEdit = new KDateEdit(timeBoxFrame); |
105 | layoutTimeBox->addWidget(mStartDateEdit,0,1); | 105 | layoutTimeBox->addWidget(mStartDateEdit,0,1); |
106 | 106 | ||
107 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); | 107 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); |
108 | layoutTimeBox->addWidget(mStartTimeEdit,0,2); | 108 | layoutTimeBox->addWidget(mStartTimeEdit,0,2); |
109 | 109 | ||
110 | 110 | ||
111 | mEndDateLabel = new QLabel(i18n("End:"),timeBoxFrame); | 111 | mEndDateLabel = new QLabel(i18n("End:"),timeBoxFrame); |
112 | layoutTimeBox->addWidget(mEndDateLabel,1,0); | 112 | layoutTimeBox->addWidget(mEndDateLabel,1,0); |
113 | 113 | ||
114 | mEndDateEdit = new KDateEdit(timeBoxFrame); | 114 | mEndDateEdit = new KDateEdit(timeBoxFrame); |
115 | layoutTimeBox->addWidget(mEndDateEdit,1,1); | 115 | layoutTimeBox->addWidget(mEndDateEdit,1,1); |
116 | 116 | ||
117 | mEndTimeEdit = new KOTimeEdit(timeBoxFrame); | 117 | mEndTimeEdit = new KOTimeEdit(timeBoxFrame); |
118 | layoutTimeBox->addWidget(mEndTimeEdit,1,2); | 118 | layoutTimeBox->addWidget(mEndTimeEdit,1,2); |
119 | QWidget* duration = new QWidget( timeBoxFrame ); | 119 | QWidget* duration = new QWidget( timeBoxFrame ); |
120 | QHBoxLayout *flagsBox = new QHBoxLayout( duration ); | 120 | QHBoxLayout *flagsBox = new QHBoxLayout( duration ); |
121 | mNoTimeButton = new QCheckBox(i18n("All day event"),duration); | 121 | mNoTimeButton = new QCheckBox(i18n("All day event"),duration); |
122 | flagsBox->addWidget(mNoTimeButton); | 122 | flagsBox->addWidget(mNoTimeButton); |
123 | connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); | 123 | connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); |
124 | mDurationLabel = new QLabel( duration ); | 124 | mDurationLabel = new QLabel( duration ); |
125 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 125 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
126 | //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 ); | 126 | //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 ); |
127 | //} else { | 127 | //} else { |
128 | flagsBox->addWidget( mDurationLabel ); | 128 | flagsBox->addWidget( mDurationLabel ); |
129 | //} | 129 | //} |
130 | flagsBox->setStretchFactor(mDurationLabel, 10 ); | 130 | flagsBox->setStretchFactor(mDurationLabel, 10 ); |
131 | mDurationLabel->setAlignment( AlignRight | AlignVCenter); | 131 | mDurationLabel->setAlignment( AlignRight | AlignVCenter); |
132 | layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); | 132 | layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); |
133 | 133 | ||
134 | // time widgets are checked if they contain a valid time | 134 | // time widgets are checked if they contain a valid time |
135 | connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), | 135 | connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), |
136 | this, SLOT(startTimeChanged(QTime))); | 136 | this, SLOT(startTimeChanged(QTime))); |
137 | connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), | 137 | connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), |
138 | this, SLOT(endTimeChanged(QTime))); | 138 | this, SLOT(endTimeChanged(QTime))); |
139 | 139 | ||
140 | // date widgets are checked if they contain a valid date | 140 | // date widgets are checked if they contain a valid date |
141 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), | 141 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), |
142 | this, SLOT(startDateChanged(QDate))); | 142 | this, SLOT(startDateChanged(QDate))); |
143 | connect(mEndDateEdit, SIGNAL(dateChanged(QDate)), | 143 | connect(mEndDateEdit, SIGNAL(dateChanged(QDate)), |
144 | this, SLOT(endDateChanged(QDate))); | 144 | this, SLOT(endDateChanged(QDate))); |
145 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | ||
146 | connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),mEndTimeEdit,SLOT(setTime(QTime))); | ||
147 | |||
145 | } | 148 | } |
146 | 149 | ||
147 | void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) | 150 | void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) |
148 | { | 151 | { |
149 | QBoxLayout *classLayout = new QHBoxLayout(topLayout); | 152 | QBoxLayout *classLayout = new QHBoxLayout(topLayout); |
150 | 153 | ||
151 | QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); | 154 | QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); |
152 | classLayout->addWidget(freeTimeLabel); | 155 | classLayout->addWidget(freeTimeLabel); |
153 | 156 | ||
154 | mFreeTimeCombo = new QComboBox(false, parent); | 157 | mFreeTimeCombo = new QComboBox(false, parent); |
155 | mFreeTimeCombo->insertItem(i18n("Busy")); | 158 | mFreeTimeCombo->insertItem(i18n("Busy")); |
156 | mFreeTimeCombo->insertItem(i18n("Free")); | 159 | mFreeTimeCombo->insertItem(i18n("Free")); |
157 | classLayout->addWidget(mFreeTimeCombo); | 160 | classLayout->addWidget(mFreeTimeCombo); |
158 | } | 161 | } |
159 | 162 | ||
160 | void KOEditorGeneralEvent::timeStuffDisable(bool disable) | 163 | void KOEditorGeneralEvent::timeStuffDisable(bool disable) |
161 | { | 164 | { |
162 | mStartTimeEdit->setEnabled( !disable ); | 165 | mStartTimeEdit->setEnabled( !disable ); |
163 | mEndTimeEdit->setEnabled( !disable ); | 166 | mEndTimeEdit->setEnabled( !disable ); |
164 | 167 | ||
165 | setDuration(); | 168 | setDuration(); |
166 | emitDateTimeStr(); | 169 | emitDateTimeStr(); |
167 | } | 170 | } |
168 | 171 | ||
169 | void KOEditorGeneralEvent::dontAssociateTime(bool noTime) | 172 | void KOEditorGeneralEvent::dontAssociateTime(bool noTime) |
170 | { | 173 | { |
171 | timeStuffDisable(noTime); | 174 | timeStuffDisable(noTime); |
172 | //if(alarmButton->isChecked()) alarmStuffDisable(noTime); | 175 | //if(alarmButton->isChecked()) alarmStuffDisable(noTime); |
173 | allDayChanged(noTime); | 176 | allDayChanged(noTime); |
174 | } | 177 | } |
175 | 178 | ||
176 | void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end) | 179 | void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end) |
177 | { | 180 | { |
178 | // kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; | 181 | // kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; |
179 | if ( !mTemplate ) | 182 | if ( !mTemplate ) |
180 | mStartDateEdit->setDate(start.date()); | 183 | mStartDateEdit->setDate(start.date()); |
181 | // KTimeEdit seems to emit some signals when setTime() is called. | 184 | // KTimeEdit seems to emit some signals when setTime() is called. |
182 | mStartTimeEdit->blockSignals( true ); | 185 | mStartTimeEdit->blockSignals( true ); |
183 | mStartTimeEdit->setTime(start.time()); | 186 | mStartTimeEdit->setTime(start.time()); |
184 | mStartTimeEdit->blockSignals( false ); | 187 | mStartTimeEdit->blockSignals( false ); |
185 | if ( !mTemplate ) | 188 | if ( !mTemplate ) |
186 | mEndDateEdit->setDate(end.date()); | 189 | mEndDateEdit->setDate(end.date()); |
187 | mEndTimeEdit->setTime(end.time()); | 190 | mEndTimeEdit->setTime(end.time()); |
188 | 191 | ||
189 | mCurrStartDateTime = start; | 192 | mCurrStartDateTime = start; |
190 | mCurrEndDateTime = end; | 193 | mCurrEndDateTime = end; |
191 | 194 | ||
192 | setDuration(); | 195 | setDuration(); |
193 | emitDateTimeStr(); | 196 | emitDateTimeStr(); |
194 | } | 197 | } |
195 | 198 | ||
196 | void KOEditorGeneralEvent::startTimeChanged(QTime newtime) | 199 | void KOEditorGeneralEvent::startTimeChanged(QTime newtime) |
197 | { | 200 | { |
198 | kdDebug() << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; | 201 | kdDebug() << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; |
199 | 202 | ||
200 | int secsep = mCurrStartDateTime.secsTo(mCurrEndDateTime); | 203 | int secsep = mCurrStartDateTime.secsTo(mCurrEndDateTime); |
201 | 204 | ||
202 | mCurrStartDateTime.setTime(newtime); | 205 | mCurrStartDateTime.setTime(newtime); |
203 | 206 | ||
204 | // adjust end time so that the event has the same duration as before. | 207 | // adjust end time so that the event has the same duration as before. |
205 | mCurrEndDateTime = mCurrStartDateTime.addSecs(secsep); | 208 | mCurrEndDateTime = mCurrStartDateTime.addSecs(secsep); |
206 | mEndTimeEdit->setTime(mCurrEndDateTime.time()); | 209 | mEndTimeEdit->setTime(mCurrEndDateTime.time()); |
207 | mEndDateEdit->setDate(mCurrEndDateTime.date()); | 210 | mEndDateEdit->setDate(mCurrEndDateTime.date()); |
208 | 211 | ||
209 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); | 212 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); |
210 | } | 213 | } |
211 | 214 | ||
212 | void KOEditorGeneralEvent::endTimeChanged(QTime newtime) | 215 | void KOEditorGeneralEvent::endTimeChanged(QTime newtime) |
213 | { | 216 | { |
214 | // kdDebug() << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; | 217 | // kdDebug() << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; |
215 | 218 | ||
216 | QDateTime newdt(mCurrEndDateTime.date(), newtime); | 219 | QDateTime newdt(mCurrEndDateTime.date(), newtime); |
217 | mCurrEndDateTime = newdt; | 220 | mCurrEndDateTime = newdt; |
218 | 221 | ||
219 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); | 222 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); |
220 | } | 223 | } |
221 | 224 | ||
222 | void KOEditorGeneralEvent::startDateChanged(QDate newdate) | 225 | void KOEditorGeneralEvent::startDateChanged(QDate newdate) |
223 | { | 226 | { |
224 | int daysep = mCurrStartDateTime.daysTo(mCurrEndDateTime); | 227 | int daysep = mCurrStartDateTime.daysTo(mCurrEndDateTime); |
225 | 228 | ||
226 | mCurrStartDateTime.setDate(newdate); | 229 | mCurrStartDateTime.setDate(newdate); |
227 | 230 | ||
228 | // adjust end date so that the event has the same duration as before | 231 | // adjust end date so that the event has the same duration as before |
229 | mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep)); | 232 | mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep)); |
230 | mEndDateEdit->setDate(mCurrEndDateTime.date()); | 233 | mEndDateEdit->setDate(mCurrEndDateTime.date()); |
231 | 234 | ||
232 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); | 235 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); |
233 | } | 236 | } |
234 | 237 | ||
235 | void KOEditorGeneralEvent::endDateChanged(QDate newdate) | 238 | void KOEditorGeneralEvent::endDateChanged(QDate newdate) |
236 | { | 239 | { |
237 | QDateTime newdt(newdate, mCurrEndDateTime.time()); | 240 | QDateTime newdt(newdate, mCurrEndDateTime.time()); |
238 | 241 | ||
239 | if(newdt < mCurrStartDateTime) { | 242 | if(newdt < mCurrStartDateTime) { |
240 | // oops, we can't let that happen. | 243 | // 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 @@ | |||
31 | #include <qdatetime.h> | 31 | #include <qdatetime.h> |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | 33 | ||
34 | #include <kglobal.h> | 34 | #include <kglobal.h> |
35 | #include <klocale.h> | 35 | #include <klocale.h> |
36 | #include <kiconloader.h> | 36 | #include <kiconloader.h> |
37 | #include <kmessagebox.h> | 37 | #include <kmessagebox.h> |
38 | #include <kdebug.h> | 38 | #include <kdebug.h> |
39 | #include <krestrictedline.h> | 39 | #include <krestrictedline.h> |
40 | #include <kstandarddirs.h> | 40 | #include <kstandarddirs.h> |
41 | #include <kfiledialog.h> | 41 | #include <kfiledialog.h> |
42 | 42 | ||
43 | #include <libkcal/todo.h> | 43 | #include <libkcal/todo.h> |
44 | 44 | ||
45 | #include <libkdepim/kdateedit.h> | 45 | #include <libkdepim/kdateedit.h> |
46 | 46 | ||
47 | #include "koprefs.h" | 47 | #include "koprefs.h" |
48 | #include "ktimeedit.h" | 48 | #include "ktimeedit.h" |
49 | 49 | ||
50 | #include "koeditorgeneraltodo.h" | 50 | #include "koeditorgeneraltodo.h" |
51 | #include "kolocationbox.h" | 51 | #include "kolocationbox.h" |
52 | 52 | ||
53 | KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, | 53 | KOEditorGeneralTodo::KOEditorGeneralTodo(QObject* parent, |
54 | const char* name) | 54 | const char* name) |
55 | : KOEditorGeneral( parent, name) | 55 | : KOEditorGeneral( parent, name) |
56 | { | 56 | { |
57 | } | 57 | } |
58 | 58 | ||
59 | KOEditorGeneralTodo::~KOEditorGeneralTodo() | 59 | KOEditorGeneralTodo::~KOEditorGeneralTodo() |
60 | { | 60 | { |
61 | } | 61 | } |
62 | 62 | ||
63 | void KOEditorGeneralTodo::finishSetup() | 63 | void KOEditorGeneralTodo::finishSetup() |
64 | { | 64 | { |
65 | 65 | ||
66 | // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); | 66 | // QWidget::setTabOrder(mSummaryEdit, mLocationEdit); |
67 | // QWidget::setTabOrder(mLocationEdit, mDueCheck); | 67 | // QWidget::setTabOrder(mLocationEdit, mDueCheck); |
68 | // QWidget::setTabOrder(mDueCheck, mDueDateEdit); | 68 | // QWidget::setTabOrder(mDueCheck, mDueDateEdit); |
69 | // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); | 69 | // QWidget::setTabOrder(mDueDateEdit, mDueTimeEdit); |
70 | // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); | 70 | // QWidget::setTabOrder(mDueTimeEdit, mStartCheck); |
71 | // QWidget::setTabOrder(mStartCheck, mStartDateEdit); | 71 | // QWidget::setTabOrder(mStartCheck, mStartDateEdit); |
72 | // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); | 72 | // QWidget::setTabOrder(mStartDateEdit, mStartTimeEdit); |
73 | // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); | 73 | // QWidget::setTabOrder(mStartTimeEdit, mTimeButton); |
74 | // QWidget::setTabOrder(mTimeButton, mCompletedCombo); | 74 | // QWidget::setTabOrder(mTimeButton, mCompletedCombo); |
75 | // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); | 75 | // QWidget::setTabOrder(mCompletedCombo, mPriorityCombo); |
76 | // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); | 76 | // QWidget::setTabOrder(mPriorityCombo, mAlarmButton); |
77 | // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); | 77 | // QWidget::setTabOrder(mAlarmButton, mCategoriesButton); |
78 | // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); | 78 | // QWidget::setTabOrder(mCategoriesButton, mSecrecyCombo); |
79 | // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); | 79 | // QWidget::setTabOrder(mSecrecyCombo, mDescriptionEdit); |
80 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 80 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
81 | mSummaryEdit->setFocus(); | 81 | mSummaryEdit->setFocus(); |
82 | } | 82 | } |
83 | 83 | ||
84 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | 84 | void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) |
85 | { | 85 | { |
86 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); | 86 | QBoxLayout *timeLayout = new QVBoxLayout(topLayout); |
87 | 87 | ||
88 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, | 88 | QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, |
89 | i18n("Date && Time"),parent); | 89 | i18n("Date && Time"),parent); |
90 | timeLayout->addWidget(timeGroupBox); | 90 | timeLayout->addWidget(timeGroupBox); |
91 | timeGroupBox->layout()->setSpacing( 0 ); | 91 | timeGroupBox->layout()->setSpacing( 0 ); |
92 | timeGroupBox->layout()->setMargin( 5 ); | 92 | timeGroupBox->layout()->setMargin( 5 ); |
93 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); | 93 | QFrame *timeBoxFrame = new QFrame(timeGroupBox); |
94 | 94 | ||
95 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); | 95 | QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3); |
96 | layoutTimeBox->setSpacing(topLayout->spacing()); | 96 | layoutTimeBox->setSpacing(topLayout->spacing()); |
97 | layoutTimeBox->setColStretch( 1, 1 ); | 97 | layoutTimeBox->setColStretch( 1, 1 ); |
98 | 98 | ||
99 | mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); | 99 | mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame); |
100 | layoutTimeBox->addWidget(mDueCheck,0,0); | 100 | layoutTimeBox->addWidget(mDueCheck,0,0); |
101 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); | 101 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool))); |
102 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); | 102 | connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm())); |
103 | 103 | ||
104 | 104 | ||
105 | mDueDateEdit = new KDateEdit(timeBoxFrame); | 105 | mDueDateEdit = new KDateEdit(timeBoxFrame); |
106 | layoutTimeBox->addWidget(mDueDateEdit,0,1); | 106 | layoutTimeBox->addWidget(mDueDateEdit,0,1); |
107 | 107 | ||
108 | mDueTimeEdit = new KOTimeEdit(timeBoxFrame); | 108 | mDueTimeEdit = new KOTimeEdit(timeBoxFrame); |
109 | layoutTimeBox->addWidget(mDueTimeEdit,0,2); | 109 | layoutTimeBox->addWidget(mDueTimeEdit,0,2); |
110 | 110 | ||
111 | 111 | ||
112 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); | 112 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); |
113 | layoutTimeBox->addWidget(mStartCheck,1,0); | 113 | layoutTimeBox->addWidget(mStartCheck,1,0); |
114 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); | 114 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); |
115 | 115 | ||
116 | mStartDateEdit = new KDateEdit(timeBoxFrame); | 116 | mStartDateEdit = new KDateEdit(timeBoxFrame); |
117 | layoutTimeBox->addWidget(mStartDateEdit,1,1); | 117 | layoutTimeBox->addWidget(mStartDateEdit,1,1); |
118 | 118 | ||
119 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); | 119 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); |
120 | layoutTimeBox->addWidget(mStartTimeEdit,1,2); | 120 | layoutTimeBox->addWidget(mStartTimeEdit,1,2); |
121 | 121 | ||
122 | 122 | ||
123 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); | 123 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); |
124 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); | 124 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); |
125 | 125 | ||
126 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); | 126 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); |
127 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); | ||
128 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | ||
127 | 129 | ||
128 | // some more layouting | 130 | // some more layouting |
129 | //layoutTimeBox->setColStretch(3,1); | 131 | //layoutTimeBox->setColStretch(3,1); |
130 | } | 132 | } |
131 | 133 | ||
132 | 134 | ||
133 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | 135 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) |
134 | { | 136 | { |
135 | mCompletedCombo = new QComboBox(parent); | 137 | mCompletedCombo = new QComboBox(parent); |
136 | // xgettext:no-c-format | 138 | // xgettext:no-c-format |
137 | mCompletedCombo->insertItem(i18n(" 0 %")); | 139 | mCompletedCombo->insertItem(i18n(" 0 %")); |
138 | // xgettext:no-c-format | 140 | // xgettext:no-c-format |
139 | mCompletedCombo->insertItem(i18n(" 20 %")); | 141 | mCompletedCombo->insertItem(i18n(" 20 %")); |
140 | // xgettext:no-c-format | 142 | // xgettext:no-c-format |
141 | mCompletedCombo->insertItem(i18n(" 40 %")); | 143 | mCompletedCombo->insertItem(i18n(" 40 %")); |
142 | // xgettext:no-c-format | 144 | // xgettext:no-c-format |
143 | mCompletedCombo->insertItem(i18n(" 60 %")); | 145 | mCompletedCombo->insertItem(i18n(" 60 %")); |
144 | // xgettext:no-c-format | 146 | // xgettext:no-c-format |
145 | mCompletedCombo->insertItem(i18n(" 80 %")); | 147 | mCompletedCombo->insertItem(i18n(" 80 %")); |
146 | // xgettext:no-c-format | 148 | // xgettext:no-c-format |
147 | mCompletedCombo->insertItem(i18n("100 %")); | 149 | mCompletedCombo->insertItem(i18n("100 %")); |
148 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); | 150 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); |
149 | topLayout->addWidget(mCompletedCombo); | 151 | topLayout->addWidget(mCompletedCombo); |
150 | 152 | ||
151 | mCompletedLabel = new QLabel(i18n("completed"),parent); | 153 | mCompletedLabel = new QLabel(i18n("completed"),parent); |
152 | topLayout->addWidget(mCompletedLabel); | 154 | topLayout->addWidget(mCompletedLabel); |
153 | 155 | ||
154 | mCompleteDateEdit = new KDateEdit(parent); | 156 | mCompleteDateEdit = new KDateEdit(parent); |
155 | topLayout->addWidget(mCompleteDateEdit ); | 157 | topLayout->addWidget(mCompleteDateEdit ); |
156 | 158 | ||
157 | mCompleteTimeEdit = new KOTimeEdit(parent); | 159 | mCompleteTimeEdit = new KOTimeEdit(parent); |
158 | topLayout->addWidget( mCompleteTimeEdit); | 160 | topLayout->addWidget( mCompleteTimeEdit); |
159 | 161 | ||
160 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); | 162 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); |
161 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); | 163 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); |
164 | connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); | ||
162 | 165 | ||
163 | if ( QApplication::desktop()->width() <= 480 ) { | 166 | if ( QApplication::desktop()->width() <= 480 ) { |
164 | if ( QApplication::desktop()->width() < 320 ) | 167 | if ( QApplication::desktop()->width() < 320 ) |
165 | mCompleteDateEdit->setMaximumWidth( 85 ); | 168 | mCompleteDateEdit->setMaximumWidth( 85 ); |
166 | else | 169 | else |
167 | mCompleteDateEdit->setMaximumWidth( 140 ); | 170 | mCompleteDateEdit->setMaximumWidth( 140 ); |
168 | topLayout->setSpacing( 0 ); | 171 | topLayout->setSpacing( 0 ); |
169 | } | 172 | } |
170 | } | 173 | } |
171 | 174 | ||
172 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) | 175 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) |
173 | { | 176 | { |
174 | 177 | ||
175 | QHBox* h = new QHBox ( parent ); | 178 | QHBox* h = new QHBox ( parent ); |
176 | topLayout->addWidget( h ); | 179 | topLayout->addWidget( h ); |
177 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); | 180 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); |
178 | // topLayout->addWidget(priorityLabel); | 181 | // topLayout->addWidget(priorityLabel); |
179 | mPriorityCombo = new QComboBox( h ); | 182 | mPriorityCombo = new QComboBox( h ); |
180 | mPriorityCombo->insertItem(i18n("1 (high)")); | 183 | mPriorityCombo->insertItem(i18n("1 (high)")); |
181 | mPriorityCombo->insertItem(i18n("2")); | 184 | mPriorityCombo->insertItem(i18n("2")); |
182 | mPriorityCombo->insertItem(i18n("3")); | 185 | mPriorityCombo->insertItem(i18n("3")); |
183 | mPriorityCombo->insertItem(i18n("4")); | 186 | mPriorityCombo->insertItem(i18n("4")); |
184 | mPriorityCombo->insertItem(i18n("5 (low)")); | 187 | mPriorityCombo->insertItem(i18n("5 (low)")); |
185 | //topLayout->addWidget(mPriorityCombo); | 188 | //topLayout->addWidget(mPriorityCombo); |
186 | } | 189 | } |
187 | 190 | ||
188 | void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) | 191 | void KOEditorGeneralTodo::initStatus(QWidget *parent,QBoxLayout *topLayout) |
189 | { | 192 | { |
190 | QBoxLayout *statusLayout = new QHBoxLayout(topLayout); | 193 | QBoxLayout *statusLayout = new QHBoxLayout(topLayout); |
191 | 194 | ||
192 | initCompletion( parent, statusLayout ); | 195 | initCompletion( parent, statusLayout ); |
193 | 196 | ||
194 | statusLayout->addStretch( 1 ); | 197 | statusLayout->addStretch( 1 ); |
195 | 198 | ||
196 | initPriority( parent, statusLayout ); | 199 | initPriority( parent, statusLayout ); |
197 | } | 200 | } |
198 | 201 | ||
199 | void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) | 202 | void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay) |
200 | { | 203 | { |
201 | 204 | ||
202 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 205 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
203 | mLocationEdit->load(KOLocationBox::LOCATION); | 206 | mLocationEdit->load(KOLocationBox::LOCATION); |
204 | KOEditorGeneral::setDefaults(allDay); | 207 | KOEditorGeneral::setDefaults(allDay); |
205 | 208 | ||
206 | mTimeButton->setChecked( !allDay ); | 209 | mTimeButton->setChecked( !allDay ); |
207 | if(mTimeButton->isChecked()) { | 210 | if(mTimeButton->isChecked()) { |
208 | mTimeButton->setEnabled(true); | 211 | mTimeButton->setEnabled(true); |
209 | } | 212 | } |
210 | else { | 213 | else { |
211 | mTimeButton->setEnabled(false); | 214 | mTimeButton->setEnabled(false); |
212 | } | 215 | } |
213 | 216 | ||
214 | enableTimeEdits( !allDay ); | 217 | enableTimeEdits( !allDay ); |
215 | if ( due.isValid() ) { | 218 | if ( due.isValid() ) { |
216 | mDueCheck->setChecked(true); | 219 | mDueCheck->setChecked(true); |
217 | enableDueEdit(true); | 220 | enableDueEdit(true); |
218 | alarmDisable(false); | 221 | alarmDisable(false); |
219 | } else { | 222 | } else { |
220 | mDueCheck->setChecked(false); | 223 | mDueCheck->setChecked(false); |
221 | enableDueEdit(false); | 224 | enableDueEdit(false); |
222 | due = QDateTime::currentDateTime().addDays(7); | 225 | due = QDateTime::currentDateTime().addDays(7); |
223 | alarmDisable(true); | 226 | alarmDisable(true); |
224 | } | 227 | } |
225 | 228 | ||
226 | 229 | ||
227 | mStartCheck->setChecked(false); | 230 | mStartCheck->setChecked(false); |
228 | enableStartEdit(false); | 231 | enableStartEdit(false); |
229 | 232 | ||
230 | mDueDateEdit->setDate(due.date()); | 233 | mDueDateEdit->setDate(due.date()); |
231 | mDueTimeEdit->setTime(due.time()); | 234 | mDueTimeEdit->setTime(due.time()); |
232 | due = due.addDays(-7); | 235 | due = due.addDays(-7); |
233 | mStartDateEdit->setDate(due.date()); | 236 | mStartDateEdit->setDate(due.date()); |
234 | mStartTimeEdit->setTime(due.time()); | 237 | mStartTimeEdit->setTime(due.time()); |
235 | 238 | ||
236 | mPriorityCombo->setCurrentItem(2); | 239 | mPriorityCombo->setCurrentItem(2); |
237 | mCompletedLabel->setText(i18n(" completed"));; | 240 | mCompletedLabel->setText(i18n(" completed"));; |
238 | mCompletedCombo->setCurrentItem(0); | 241 | mCompletedCombo->setCurrentItem(0); |
239 | mCompleteDateEdit->hide(); | 242 | mCompleteDateEdit->hide(); |
240 | mCompleteTimeEdit->hide(); | 243 | mCompleteTimeEdit->hide(); |
241 | } | 244 | } |
242 | 245 | ||
243 | void KOEditorGeneralTodo::readTodo(Todo *todo) | 246 | void KOEditorGeneralTodo::readTodo(Todo *todo) |
244 | { | 247 | { |
245 | 248 | ||
246 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); | 249 | mSummaryEdit->load(KOLocationBox::SUMMARYTODO); |
247 | mLocationEdit->load(KOLocationBox::LOCATION); | 250 | mLocationEdit->load(KOLocationBox::LOCATION); |
248 | KOEditorGeneral::readIncidence(todo); | 251 | KOEditorGeneral::readIncidence(todo); |
249 | 252 | ||
250 | QDateTime dueDT; | 253 | QDateTime dueDT; |
251 | 254 | ||
252 | if (todo->hasDueDate()) { | 255 | if (todo->hasDueDate()) { |
253 | enableAlarmEdit(true); | 256 | enableAlarmEdit(true); |
254 | dueDT = todo->dtDue(); | 257 | dueDT = todo->dtDue(); |
255 | mDueDateEdit->setDate(todo->dtDue().date()); | 258 | mDueDateEdit->setDate(todo->dtDue().date()); |
256 | mDueTimeEdit->setTime(todo->dtDue().time()); | 259 | mDueTimeEdit->setTime(todo->dtDue().time()); |
257 | mDueCheck->setChecked(true); | 260 | mDueCheck->setChecked(true); |
258 | } else { | 261 | } else { |
259 | alarmDisable(true); | 262 | alarmDisable(true); |
260 | mDueDateEdit->setEnabled(false); | 263 | mDueDateEdit->setEnabled(false); |
261 | mDueTimeEdit->setEnabled(false); | 264 | mDueTimeEdit->setEnabled(false); |
262 | mDueDateEdit->setDate(QDate::currentDate()); | 265 | 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 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
3 | 3 | ||
4 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qapplication.h> | 25 | #include <qapplication.h> |
26 | #include <qevent.h> | 26 | #include <qevent.h> |
27 | #include <qlineedit.h> | 27 | #include <qlineedit.h> |
28 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | 30 | ||
31 | #include <kdatepicker.h> | 31 | #include <kdatepicker.h> |
32 | #include <kdebug.h> | 32 | #include <kdebug.h> |
33 | #include <kglobal.h> | 33 | #include <kglobal.h> |
34 | #include <kiconloader.h> | 34 | #include <kiconloader.h> |
35 | #include <klocale.h> | 35 | #include <klocale.h> |
36 | #include <kmessagebox.h> | 36 | #include <kmessagebox.h> |
37 | #include <knotifyclient.h> | 37 | #include <knotifyclient.h> |
38 | #include <qpalette.h> | 38 | #include <qpalette.h> |
39 | 39 | ||
40 | #include "kdateedit.h" | 40 | #include "kdateedit.h" |
41 | //#include "kdateedit.moc" | 41 | //#include "kdateedit.moc" |
42 | 42 | ||
43 | KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) | 43 | KDateEdit::KDateEdit(QWidget *parent, const char *name, bool withoutDP ) |
44 | : QHBox(parent, name) | 44 | : QHBox(parent, name) |
45 | { | 45 | { |
46 | dateFormShort = true; | 46 | dateFormShort = true; |
47 | withoutDp = withoutDP; | 47 | withoutDp = withoutDP; |
48 | mDateEdit = new QLineEdit(this); | 48 | mDateEdit = new QLineEdit(this); |
49 | mDateEdit->setText(KGlobal::locale()->formatDate(QDate::currentDate(),dateFormShort)); | 49 | mDateEdit->setText(KGlobal::locale()->formatDate(QDate::currentDate(),dateFormShort)); |
50 | setFocusProxy(mDateEdit); | 50 | setFocusProxy(mDateEdit); |
51 | mDateEdit->installEventFilter(this); | 51 | mDateEdit->installEventFilter(this); |
52 | 52 | ||
53 | // Highlight Background and Textcolor | 53 | // Highlight Background and Textcolor |
54 | QPalette palette = QWidget::palette(); | 54 | QPalette palette = QWidget::palette(); |
55 | unsigned char red, green, blue; | 55 | unsigned char red, green, blue; |
56 | red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10; | 56 | red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10; |
57 | green = palette.color( QPalette::Normal , QColorGroup::Background ).green() - 10; | 57 | green = palette.color( QPalette::Normal , QColorGroup::Background ).green() - 10; |
58 | blue = palette.color( QPalette::Normal , QColorGroup::Background ).blue() - 10; | 58 | blue = palette.color( QPalette::Normal , QColorGroup::Background ).blue() - 10; |
59 | palette.setColor( QColorGroup::Highlight, QColor(red,green,blue) ); | 59 | palette.setColor( QColorGroup::Highlight, QColor(red,green,blue) ); |
60 | palette.setColor( QColorGroup::HighlightedText, palette.color( QPalette::Normal , QColorGroup::Foreground ) ); | 60 | palette.setColor( QColorGroup::HighlightedText, palette.color( QPalette::Normal , QColorGroup::Foreground ) ); |
61 | mDateEdit->setPalette( palette ); | 61 | mDateEdit->setPalette( palette ); |
62 | 62 | ||
63 | if ( withoutDP ) { | 63 | if ( withoutDP ) { |
64 | mDateFrame = 0; | 64 | mDateFrame = 0; |
65 | mDateButton = 0; | 65 | mDateButton = 0; |
66 | mDatePicker = 0; | 66 | mDatePicker = 0; |
67 | } else { | 67 | } else { |
68 | QPixmap pixmap = SmallIcon("smallcal"); | 68 | QPixmap pixmap = SmallIcon("smallcal"); |
69 | mDateButton = new QPushButton(this); | 69 | mDateButton = new QPushButton(this); |
70 | mDateButton->setPixmap(pixmap); | 70 | mDateButton->setPixmap(pixmap); |
71 | QPixmap pixmap2 = SmallIcon("today_small"); | ||
72 | QPushButton* nowButton = new QPushButton(this); | ||
73 | nowButton->setPixmap(pixmap2); | ||
71 | 74 | ||
72 | mDateFrame = new QVBox(0,0,WType_Popup); | 75 | mDateFrame = new QVBox(0,0,WType_Popup); |
73 | // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); | 76 | // mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); |
74 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); | 77 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); |
75 | mDateFrame->setLineWidth(3); | 78 | mDateFrame->setLineWidth(3); |
76 | mDateFrame->hide(); | 79 | mDateFrame->hide(); |
77 | 80 | ||
78 | mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate()); | 81 | mDatePicker = new KDatePicker(mDateFrame,QDate::currentDate()); |
79 | connect(mDatePicker,SIGNAL(dateEntered(QDate)),SLOT(setDate(QDate))); | 82 | connect(mDatePicker,SIGNAL(dateEntered(QDate)),SLOT(setDate(QDate))); |
80 | connect(mDatePicker,SIGNAL(dateEntered(QDate)),SIGNAL(dateChanged(QDate))); | 83 | connect(mDatePicker,SIGNAL(dateEntered(QDate)),SIGNAL(dateChanged(QDate))); |
81 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(setDate(QDate))); | 84 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(setDate(QDate))); |
82 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate))); | 85 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SIGNAL(dateChanged(QDate))); |
83 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide())); | 86 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),mDateFrame,SLOT(hide())); |
84 | connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); | 87 | connect(mDateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); |
88 | connect(nowButton,SIGNAL(clicked()),SLOT(goToNow())); | ||
85 | mDateButton->setFocusPolicy( QWidget::NoFocus ); | 89 | mDateButton->setFocusPolicy( QWidget::NoFocus ); |
86 | mDateButton->setAutoDefault( false ); | 90 | mDateButton->setAutoDefault( false ); |
87 | //mDateFrame->resize( 400, 300 ); | 91 | //mDateFrame->resize( 400, 300 ); |
88 | 92 | ||
89 | } | 93 | } |
90 | connect(mDateEdit,SIGNAL(returnPressed()),SLOT(lineEnterPressed())); | 94 | connect(mDateEdit,SIGNAL(returnPressed()),SLOT(lineEnterPressed())); |
91 | connect(mDateEdit,SIGNAL(textChanged(const QString &)), | 95 | connect(mDateEdit,SIGNAL(textChanged(const QString &)), |
92 | SLOT(textChanged(const QString &))); | 96 | SLOT(textChanged(const QString &))); |
93 | 97 | ||
94 | // Create the keyword list. This will be used to match against when the user | 98 | // Create the keyword list. This will be used to match against when the user |
95 | // enters information. | 99 | // enters information. |
96 | mKeywordMap[i18n("tomorrow")] = 1; | 100 | mKeywordMap[i18n("tomorrow")] = 1; |
97 | mKeywordMap[i18n("today")] = 0; | 101 | mKeywordMap[i18n("today")] = 0; |
98 | mKeywordMap[i18n("yesterday")] = -1; | 102 | mKeywordMap[i18n("yesterday")] = -1; |
99 | 103 | ||
100 | /* | 104 | /* |
101 | * This loop uses some math tricks to figure out the offset in days | 105 | * This loop uses some math tricks to figure out the offset in days |
102 | * to the next date the given day of the week occurs. There | 106 | * to the next date the given day of the week occurs. There |
103 | * are two cases, that the new day is >= the current day, which means | 107 | * are two cases, that the new day is >= the current day, which means |
104 | * the new day has not occured yet or that the new day < the current day, | 108 | * the new day has not occured yet or that the new day < the current day, |
105 | * which means the new day is already passed (so we need to find the | 109 | * which means the new day is already passed (so we need to find the |
106 | * day in the next week). | 110 | * day in the next week). |
107 | */ | 111 | */ |
108 | QString dayName; | 112 | QString dayName; |
109 | int currentDay = QDate::currentDate().dayOfWeek(); | 113 | int currentDay = QDate::currentDate().dayOfWeek(); |
110 | for (int i = 1; i <= 7; ++i) | 114 | for (int i = 1; i <= 7; ++i) |
111 | { | 115 | { |
112 | dayName = KGlobal::locale()->weekDayName(i).lower(); | 116 | dayName = KGlobal::locale()->weekDayName(i).lower(); |
113 | if (i >= currentDay) | 117 | if (i >= currentDay) |
114 | mKeywordMap[dayName] = i - currentDay; | 118 | mKeywordMap[dayName] = i - currentDay; |
115 | else | 119 | else |
116 | mKeywordMap[dayName] = 7 - currentDay + i; | 120 | mKeywordMap[dayName] = 7 - currentDay + i; |
117 | } | 121 | } |
118 | 122 | ||
119 | mTextChanged = false; | 123 | mTextChanged = false; |
120 | mHandleInvalid = false; | 124 | mHandleInvalid = false; |
121 | // QWidget::setTabOrder( mDateEdit, mDateButton ); | 125 | // QWidget::setTabOrder( mDateEdit, mDateButton ); |
122 | } | 126 | } |
123 | 127 | ||
124 | KDateEdit::~KDateEdit() | 128 | KDateEdit::~KDateEdit() |
125 | { | 129 | { |
126 | delete mDateFrame; | 130 | delete mDateFrame; |
127 | } | 131 | } |
128 | void KDateEdit::clear() | 132 | void KDateEdit::clear() |
129 | { | 133 | { |
130 | bool b = mDateEdit->signalsBlocked(); | 134 | bool b = mDateEdit->signalsBlocked(); |
131 | mDateEdit->blockSignals(true); | 135 | mDateEdit->blockSignals(true); |
132 | mDateEdit->setText(""); | 136 | mDateEdit->setText(""); |
133 | mDateEdit->blockSignals(b); | 137 | mDateEdit->blockSignals(b); |
134 | } | 138 | } |
139 | void KDateEdit::goToNow() | ||
140 | { | ||
141 | setDate(QDate::currentDate() ); | ||
142 | emit setTimeTo( QTime::currentTime() ); | ||
143 | } | ||
135 | void KDateEdit::setDate(QDate newDate) | 144 | void KDateEdit::setDate(QDate newDate) |
136 | { | 145 | { |
137 | if (!newDate.isValid() && !mHandleInvalid) | 146 | if (!newDate.isValid() && !mHandleInvalid) |
138 | return; | 147 | return; |
139 | if ( readDate() == newDate ) | 148 | if ( readDate() == newDate ) |
140 | return; | 149 | return; |
141 | QString dateString = ""; | 150 | QString dateString = ""; |
142 | if(newDate.isValid()) | 151 | if(newDate.isValid()) |
143 | dateString = KGlobal::locale()->formatDate( newDate, dateFormShort ); | 152 | dateString = KGlobal::locale()->formatDate( newDate, dateFormShort ); |
144 | 153 | ||
145 | mTextChanged = false; | 154 | mTextChanged = false; |
146 | 155 | ||
147 | // We do not want to generate a signal here, since we explicity setting | 156 | // We do not want to generate a signal here, since we explicity setting |
148 | // the date | 157 | // the date |
149 | bool b = mDateEdit->signalsBlocked(); | 158 | bool b = mDateEdit->signalsBlocked(); |
150 | mDateEdit->blockSignals(true); | 159 | mDateEdit->blockSignals(true); |
151 | mDateEdit->setText(dateString); | 160 | mDateEdit->setText(dateString); |
152 | mDateEdit->blockSignals(b); | 161 | mDateEdit->blockSignals(b); |
153 | } | 162 | } |
154 | 163 | ||
155 | void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateFormShort) | 164 | void KDateEdit::setDate( QDate date,int *cpos,const int key ,const bool dateFormShort) |
156 | { | 165 | { |
157 | QString dateForm = dateFormShort ? | 166 | QString dateForm = dateFormShort ? |
158 | KGlobal::locale()->dateFormatShort() : | 167 | KGlobal::locale()->dateFormatShort() : |
159 | KGlobal::locale()->dateFormat(); | 168 | KGlobal::locale()->dateFormat(); |
160 | 169 | ||
161 | int begin = dateForm.find("%"); | 170 | int begin = dateForm.find("%"); |
162 | int space = 0; | 171 | int space = 0; |
163 | int allStrLength = 0; | 172 | int allStrLength = 0; |
164 | int strLength = 0; | 173 | int strLength = 0; |
165 | int repeat = 0; | 174 | int repeat = 0; |
166 | 175 | ||
167 | // witch? Day, Month or Year switch? | 176 | // witch? Day, Month or Year switch? |
168 | while(1){ | 177 | while(1){ |
169 | switch ( dateForm.at(begin + 1).latin1() ) | 178 | switch ( dateForm.at(begin + 1).latin1() ) |
170 | { | 179 | { |
171 | case 'd':// 16 (month day) | 180 | case 'd':// 16 (month day) |
172 | strLength = 2; //Ok | 181 | strLength = 2; //Ok |
173 | break; | 182 | break; |
174 | case 'm':// 01 (month) | 183 | case 'm':// 01 (month) |
175 | strLength = 2; //Ok | 184 | strLength = 2; //Ok |
176 | break; | 185 | break; |
177 | case 'a':// Mon (Weekday) | 186 | case 'a':// Mon (Weekday) |
178 | strLength = KGlobal::locale()->weekDayName(date.dayOfWeek(), true).length(); | 187 | strLength = KGlobal::locale()->weekDayName(date.dayOfWeek(), true).length(); |
179 | break; | 188 | break; |
180 | case 'A':// Monday (Weekday) | 189 | case 'A':// Monday (Weekday) |
181 | strLength = KGlobal::locale()->weekDayName(date.dayOfWeek(), false).length(); | 190 | strLength = KGlobal::locale()->weekDayName(date.dayOfWeek(), false).length(); |
182 | break; | 191 | break; |
183 | case 'b':// Jan (monthName) | 192 | case 'b':// Jan (monthName) |
184 | strLength = KGlobal::locale()->monthName(date.month(), true).length(); | 193 | strLength = KGlobal::locale()->monthName(date.month(), true).length(); |
185 | break; | 194 | break; |
186 | case 'B':// January (monthName) | 195 | case 'B':// January (monthName) |
187 | strLength = KGlobal::locale()->monthName(date.month(), false).length(); | 196 | strLength = KGlobal::locale()->monthName(date.month(), false).length(); |
188 | break; | 197 | break; |
189 | case 'y':// 04 (year short) | 198 | case 'y':// 04 (year short) |
190 | strLength = 2; //Ok | 199 | strLength = 2; //Ok |
191 | break; | 200 | break; |
192 | case 'Y':// 2004 (year) | 201 | case 'Y':// 2004 (year) |
193 | strLength = 4; //Ok | 202 | strLength = 4; //Ok |
194 | break; | 203 | break; |
195 | default: | 204 | default: |
196 | break; | 205 | break; |
197 | } | 206 | } |
198 | space = begin - (repeat++ * 2); | 207 | space = begin - (repeat++ * 2); |
199 | // all select? then dayswitch | 208 | // all select? then dayswitch |
200 | if( (mDateEdit->text().length() == mDateEdit->markedText().length() ) && | 209 | if( (mDateEdit->text().length() == mDateEdit->markedText().length() ) && |
201 | ( (dateForm.at(begin + 1).latin1() == 'd') || | 210 | ( (dateForm.at(begin + 1).latin1() == 'd') || |
202 | (dateForm.at(begin + 1).latin1() == 'a') || | 211 | (dateForm.at(begin + 1).latin1() == 'a') || |
203 | (dateForm.at(begin + 1).latin1() == 'A') ) ) { | 212 | (dateForm.at(begin + 1).latin1() == 'A') ) ) { |
204 | break; | 213 | break; |
205 | } | 214 | } |
206 | // mDateEdit-StringPos == CursorPosition(cpos) then break and set date | 215 | // mDateEdit-StringPos == CursorPosition(cpos) then break and set date |
207 | if( ( (space + allStrLength) <= *cpos && *cpos <= (space + allStrLength + strLength) ) || *cpos < begin ) { | 216 | if( ( (space + allStrLength) <= *cpos && *cpos <= (space + allStrLength + strLength) ) || *cpos < begin ) { |
208 | break; | 217 | break; |
209 | } | 218 | } |
210 | allStrLength += strLength; | 219 | allStrLength += strLength; |
211 | begin = dateForm.find("%", begin +1); | 220 | begin = dateForm.find("%", begin +1); |
212 | } | 221 | } |
213 | 222 | ||
214 | // set date | 223 | // set date |
215 | switch ( dateForm.at(begin + 1).latin1() ) { | 224 | switch ( dateForm.at(begin + 1).latin1() ) { |
216 | case 'd': | 225 | case 'd': |
217 | case 'a': | 226 | case 'a': |
218 | case 'A': | 227 | case 'A': |
219 | if(key == Key_Up) { | 228 | if(key == Key_Up) { |
220 | setDate( date.addDays( 1 ) ); | 229 | setDate( date.addDays( 1 ) ); |
221 | } | 230 | } |
222 | else if(key == Key_Down) { | 231 | else if(key == Key_Down) { |
223 | setDate( date.addDays( -1 ) ); | 232 | setDate( date.addDays( -1 ) ); |
224 | } | 233 | } |
225 | maxDay = readDate().day(); | 234 | maxDay = readDate().day(); |
226 | break; | 235 | break; |
227 | case 'm': | 236 | case 'm': |
228 | case 'b': | 237 | case 'b': |
229 | case 'B': | 238 | case 'B': |
230 | if(key == Key_Up) { | 239 | 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 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libkdepim. | 2 | This file is part of libkdepim. |
3 | 3 | ||
4 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> | 4 | Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 14 | GNU General Public License for more details. |
15 | 15 | ||
16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
17 | along with this program; if not, write to the Free Software | 17 | along with this program; if not, write to the Free Software |
18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | #ifndef KDATEEDIT_H | 24 | #ifndef KDATEEDIT_H |
25 | #define KDATEEDIT_H | 25 | #define KDATEEDIT_H |
26 | 26 | ||
27 | #include <qhbox.h> | 27 | #include <qhbox.h> |
28 | #include <qvbox.h> | 28 | #include <qvbox.h> |
29 | #include <qdatetime.h> | 29 | #include <qdatetime.h> |
30 | #include <qmap.h> | 30 | #include <qmap.h> |
31 | 31 | ||
32 | class QLineEdit; | 32 | class QLineEdit; |
33 | class QPushButton; | 33 | class QPushButton; |
34 | class QObject; | 34 | class QObject; |
35 | class QEvent; | 35 | class QEvent; |
36 | class KDatePicker; | 36 | class KDatePicker; |
37 | class KDateValidator; | 37 | class KDateValidator; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * A date editing widget that consists of a line edit followed by | 40 | * A date editing widget that consists of a line edit followed by |
41 | * a small push button. The line edit contains the date in text form, | 41 | * a small push button. The line edit contains the date in text form, |
42 | * and the push button will display a 'popup' style date picker. | 42 | * and the push button will display a 'popup' style date picker. |
43 | * | 43 | * |
44 | * This widget also supports advanced features like allowing the user | 44 | * This widget also supports advanced features like allowing the user |
45 | * to type in the day name to get the date. The following keywords | 45 | * to type in the day name to get the date. The following keywords |
46 | * are supported (in the native language): tomorrow, yesturday, today, | 46 | * are supported (in the native language): tomorrow, yesturday, today, |
47 | * monday, tuesday, wednesday, thursday, friday, saturday, sunday. | 47 | * monday, tuesday, wednesday, thursday, friday, saturday, sunday. |
48 | * | 48 | * |
49 | * @author Cornelius Schumacher <schumacher@kde.org> | 49 | * @author Cornelius Schumacher <schumacher@kde.org> |
50 | * @author Mike Pilone <mpilone@slac.com> | 50 | * @author Mike Pilone <mpilone@slac.com> |
51 | */ | 51 | */ |
52 | class KDateEdit : public QHBox | 52 | class KDateEdit : public QHBox |
53 | { | 53 | { |
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | public: | 55 | public: |
56 | KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false ); | 56 | KDateEdit(QWidget *parent=0, const char *name=0, bool withoutDP = false ); |
57 | virtual ~KDateEdit(); | 57 | virtual ~KDateEdit(); |
58 | 58 | ||
59 | /** @return True if the date in the text edit is valid, | 59 | /** @return True if the date in the text edit is valid, |
60 | * false otherwise. This will not modify the display of the date, | 60 | * false otherwise. This will not modify the display of the date, |
61 | * but only check for validity. | 61 | * but only check for validity. |
62 | */ | 62 | */ |
63 | bool inputIsValid(); | 63 | bool inputIsValid(); |
64 | 64 | ||
65 | /** @return The date entered. This will not | 65 | /** @return The date entered. This will not |
66 | * modify the display of the date, but only return it. | 66 | * modify the display of the date, but only return it. |
67 | */ | 67 | */ |
68 | QDate date() const; | 68 | QDate date() const; |
69 | 69 | ||
70 | /** @param handleInvalid If true the date edit accepts invalid dates | 70 | /** @param handleInvalid If true the date edit accepts invalid dates |
71 | * and displays them as the empty ("") string. It also returns an invalid date. | 71 | * and displays them as the empty ("") string. It also returns an invalid date. |
72 | * If false (default) invalid dates are not accepted and instead the date | 72 | * If false (default) invalid dates are not accepted and instead the date |
73 | * of today will be returned. | 73 | * of today will be returned. |
74 | */ | 74 | */ |
75 | void setHandleInvalid(bool handleInvalid); | 75 | void setHandleInvalid(bool handleInvalid); |
76 | 76 | ||
77 | /** Checks for a focus out event. The display of the date is updated | 77 | /** Checks for a focus out event. The display of the date is updated |
78 | * to display the proper date when the focus leaves. | 78 | * to display the proper date when the focus leaves. |
79 | */ | 79 | */ |
80 | virtual bool eventFilter(QObject *o, QEvent *e); | 80 | virtual bool eventFilter(QObject *o, QEvent *e); |
81 | void toggleDateFormat(); | 81 | void toggleDateFormat(); |
82 | void clear(); | 82 | void clear(); |
83 | signals: | 83 | signals: |
84 | /** This signal is emitted whenever the user modifies the date. This | 84 | /** This signal is emitted whenever the user modifies the date. This |
85 | * may not get emitted until the user presses enter in the line edit or | 85 | * may not get emitted until the user presses enter in the line edit or |
86 | * focus leaves the widget (ie: the user confirms their selection). | 86 | * focus leaves the widget (ie: the user confirms their selection). |
87 | */ | 87 | */ |
88 | void dateChanged(QDate); | 88 | void dateChanged(QDate); |
89 | void returnPressed(); | 89 | void returnPressed(); |
90 | void setTimeTo( QTime ); | ||
90 | public slots: | 91 | public slots: |
91 | /** Sets the date. | 92 | /** Sets the date. |
92 | * | 93 | * |
93 | * @param date The new date to display. This date must be valid or | 94 | * @param date The new date to display. This date must be valid or |
94 | * it will not be displayed. | 95 | * it will not be displayed. |
95 | */ | 96 | */ |
96 | void setDate(QDate date); | 97 | void setDate(QDate date); |
97 | // set Date with key_up key_down to relation of cursor Position | 98 | // set Date with key_up key_down to relation of cursor Position |
98 | // and set selection from begin to end of single date | 99 | // and set selection from begin to end of single date |
99 | void setDate(QDate, int *cpos, const int, const bool); | 100 | void setDate(QDate, int *cpos, const int, const bool); |
100 | 101 | ||
101 | /** Sets the date edit to be enabled or disabled (grayed out) | 102 | /** Sets the date edit to be enabled or disabled (grayed out) |
102 | * | 103 | * |
103 | * @param on Enabled if true, disabled if false | 104 | * @param on Enabled if true, disabled if false |
104 | */ | 105 | */ |
105 | void setEnabled(bool on); | 106 | void setEnabled(bool on); |
106 | 107 | ||
107 | protected slots: | 108 | protected slots: |
108 | void toggleDatePicker(); | 109 | void toggleDatePicker(); |
109 | void lineEnterPressed(); | 110 | void lineEnterPressed(); |
110 | void textChanged(const QString &); | 111 | void textChanged(const QString &); |
112 | void goToNow(); | ||
111 | 113 | ||
112 | private: | 114 | private: |
113 | /** Reads the text from the line edit. If the text is a keyword, the | 115 | /** Reads the text from the line edit. If the text is a keyword, the |
114 | * word will be translated to a date. If the text is not a keyword, the | 116 | * word will be translated to a date. If the text is not a keyword, the |
115 | * text will be interpreted as a date. | 117 | * text will be interpreted as a date. |
116 | */ | 118 | */ |
117 | QDate readDate() const; | 119 | QDate readDate() const; |
118 | 120 | ||
119 | /** Maps the text that the user can enter to the offset in days from | 121 | /** Maps the text that the user can enter to the offset in days from |
120 | * today. For example, the text 'tomorrow' is mapped to +1. | 122 | * today. For example, the text 'tomorrow' is mapped to +1. |
121 | */ | 123 | */ |
122 | QMap<QString, int> mKeywordMap; | 124 | QMap<QString, int> mKeywordMap; |
123 | bool mTextChanged; | 125 | bool mTextChanged; |
124 | bool mHandleInvalid; | 126 | bool mHandleInvalid; |
125 | 127 | ||
126 | QPushButton *mDateButton; | 128 | QPushButton *mDateButton; |
127 | QLineEdit *mDateEdit; | 129 | QLineEdit *mDateEdit; |
128 | KDatePicker *mDatePicker; | 130 | KDatePicker *mDatePicker; |
129 | QVBox *mDateFrame; | 131 | QVBox *mDateFrame; |
130 | int maxDay; | 132 | int maxDay; |
131 | bool withoutDp; | 133 | bool withoutDp; |
132 | 134 | ||
133 | protected: | 135 | protected: |
134 | virtual void keyPressEvent(QKeyEvent *qke); | 136 | virtual void keyPressEvent(QKeyEvent *qke); |
135 | void setSelect ( int, int ); | 137 | void setSelect ( int, int ); |
136 | bool dateFormShort; | 138 | bool dateFormShort; |
137 | char lengthMonthName; | 139 | char lengthMonthName; |
138 | 140 | ||
139 | }; | 141 | }; |
140 | 142 | ||
141 | #endif | 143 | #endif |