-rw-r--r-- | Makefile | 22 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 10 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | microkde/kapplication.cpp | 44 | ||||
-rw-r--r-- | microkde/kapplication.h | 1 |
5 files changed, 60 insertions, 18 deletions
@@ -1,279 +1,267 @@ | |||
1 | DISTPATH = $(shell pwd) | 1 | DISTPATH = $(shell pwd) |
2 | DISTDIR = $(shell basename $(DISTPATH)) | 2 | DISTDIR = $(shell basename $(DISTPATH)) |
3 | 3 | ||
4 | 4 | ||
5 | ifeq ($(PLATFORM) , zaurus) | 5 | ifeq ($(PLATFORM) , zaurus) |
6 | BUILD_NO_LDAP_PLUGIN=1 | 6 | BUILD_NO_LDAP_PLUGIN=1 |
7 | endif | 7 | endif |
8 | 8 | ||
9 | ifneq ($(PLATFORM) , zaurus) | 9 | ifneq ($(PLATFORM) , zaurus) |
10 | BUILD_NO_SHARP_PLUGIN=1 | 10 | BUILD_NO_SHARP_PLUGIN=1 |
11 | endif | 11 | endif |
12 | 12 | ||
13 | SUBDIRS_MICROKDE = \ | 13 | SUBDIRS_MICROKDE = \ |
14 | libical/src/libical \ | 14 | libical/src/libical \ |
15 | libical/src/libicalss \ | 15 | libical/src/libicalss \ |
16 | qtcompat \ | 16 | qtcompat \ |
17 | microkde \ | 17 | microkde \ |
18 | libkcal \ | 18 | libkcal \ |
19 | libkdepim \ | 19 | libkdepim \ |
20 | kabc \ | 20 | kabc \ |
21 | kabc/formats/binary \ | 21 | kabc/formats/binary \ |
22 | kabc/plugins/file \ | 22 | kabc/plugins/file \ |
23 | kabc/plugins/dir \ | 23 | kabc/plugins/dir \ |
24 | korganizer \ | 24 | korganizer \ |
25 | kalarmd \ | 25 | kalarmd \ |
26 | kaddressbook | 26 | kaddressbook |
27 | 27 | ||
28 | SUBDIRS_QTOPIA_PLUGIN = \ | 28 | SUBDIRS_QTOPIA_PLUGIN = \ |
29 | kabc/plugins/qtopia | 29 | kabc/plugins/qtopia |
30 | 30 | ||
31 | SUBDIRS_OPIE_PLUGIN = \ | 31 | SUBDIRS_OPIE_PLUGIN = \ |
32 | kabc/plugins/opie | 32 | kabc/plugins/opie |
33 | 33 | ||
34 | SUBDIRS_SHARP_PLUGIN = \ | 34 | SUBDIRS_SHARP_PLUGIN = \ |
35 | kabc/plugins/sharpdtm | 35 | kabc/plugins/sharpdtm |
36 | 36 | ||
37 | SUBDIRS_LDAP_PLUGIN = \ | 37 | SUBDIRS_LDAP_PLUGIN = \ |
38 | kabc/plugins/ldap | 38 | kabc/plugins/ldap |
39 | 39 | ||
40 | SUBDIRS_MICROMAIL = \ | 40 | SUBDIRS_MICROMAIL = \ |
41 | kmicromail/libetpan \ | 41 | kmicromail/libetpan \ |
42 | kmicromail/libmailwrapper \ | 42 | kmicromail/libmailwrapper \ |
43 | kmicromail | 43 | kmicromail |
44 | 44 | ||
45 | SUBDIRS = \ | 45 | SUBDIRS = \ |
46 | $(SUBDIRS_MICROKDE) \ | 46 | $(SUBDIRS_MICROKDE) \ |
47 | $(SUBDIRS_QTOPIA_PLUGIN) \ | 47 | $(SUBDIRS_QTOPIA_PLUGIN) \ |
48 | $(SUBDIRS_OPIE_PLUGIN) \ | 48 | $(SUBDIRS_OPIE_PLUGIN) \ |
49 | $(SUBDIRS_SHARP_PLUGIN) \ | 49 | $(SUBDIRS_SHARP_PLUGIN) \ |
50 | $(SUBDIRS_LDAP_PLUGIN) \ | 50 | $(SUBDIRS_LDAP_PLUGIN) \ |
51 | $(SUBDIRS_MICROMAIL) | 51 | $(SUBDIRS_MICROMAIL) |
52 | 52 | ||
53 | 53 | ||
54 | all: build_microkde \ | 54 | all: build_microkde \ |
55 | build_qtopia_plugin \ | 55 | build_qtopia_plugin \ |
56 | build_opie_plugin \ | 56 | build_opie_plugin \ |
57 | build_sharp_plugin \ | 57 | build_sharp_plugin \ |
58 | build_ldap_plugin \ | 58 | build_ldap_plugin \ |
59 | build_micromail | 59 | build_micromail |
60 | 60 | ||
61 | 61 | ||
62 | build_microkde: variable_test tmake | 62 | build_microkde: variable_test tmake |
63 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ | 63 | for i in $(SUBDIRS_MICROKDE); do pushd $$i; \ |
64 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 64 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
65 | done | 65 | done |
66 | 66 | ||
67 | build_qtopia_plugin: build_microkde | 67 | build_qtopia_plugin: build_microkde |
68 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ | 68 | for i in $(SUBDIRS_QTOPIA_PLUGIN); do pushd $$i; \ |
69 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 69 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
70 | done | 70 | done |
71 | 71 | ||
72 | build_opie_plugin: build_microkde | 72 | build_opie_plugin: build_microkde |
73 | ifdef BUILD_NO_OPIE_PLUGIN | 73 | ifdef BUILD_NO_OPIE_PLUGIN |
74 | @echo ---> opie plugin not build. | 74 | @echo ---> opie plugin not build. |
75 | else | 75 | else |
76 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ | 76 | for i in $(SUBDIRS_OPIE_PLUGIN); do pushd $$i; \ |
77 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 77 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
78 | done | 78 | done |
79 | endif | 79 | endif |
80 | 80 | ||
81 | build_sharp_plugin: build_microkde | 81 | build_sharp_plugin: build_microkde |
82 | ifdef BUILD_NO_SHARP_PLUGIN | 82 | ifdef BUILD_NO_SHARP_PLUGIN |
83 | @echo ---> ldap plugin not build. | 83 | @echo ---> ldap plugin not build. |
84 | else | 84 | else |
85 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ | 85 | for i in $(SUBDIRS_SHARP_PLUGIN); do pushd $$i; \ |
86 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 86 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
87 | done | 87 | done |
88 | endif | 88 | endif |
89 | 89 | ||
90 | build_ldap_plugin: build_microkde | 90 | build_ldap_plugin: build_microkde |
91 | ifdef BUILD_NO_LDAP_PLUGIN | 91 | ifdef BUILD_NO_LDAP_PLUGIN |
92 | @echo ---> ldap plugin not build. | 92 | @echo ---> ldap plugin not build. |
93 | else | 93 | else |
94 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ | 94 | for i in $(SUBDIRS_LDAP_PLUGIN); do pushd $$i; \ |
95 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 95 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
96 | done | 96 | done |
97 | endif | 97 | endif |
98 | 98 | ||
99 | 99 | ||
100 | build_micromail: build_microkde | 100 | build_micromail: build_microkde |
101 | ifdef BUILD_NO_MICROMAIL | 101 | ifdef BUILD_NO_MICROMAIL |
102 | @echo ---> micromail not build. | 102 | @echo ---> micromail not build. |
103 | else | 103 | else |
104 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ | 104 | for i in $(SUBDIRS_MICROMAIL); do pushd $$i; \ |
105 | make -f Makefile$(PLATFORM) || exit 1; popd; \ | 105 | make -f Makefile$(PLATFORM) || exit 1; popd; \ |
106 | done | 106 | done |
107 | endif | 107 | endif |
108 | 108 | ||
109 | 109 | ||
110 | variable_info: | 110 | variable_info: |
111 | @echo -------------------------------------- | 111 | @echo -------------------------------------- |
112 | @echo KDEPIM buildsystem, variableinfo... | 112 | @echo KDEPIM buildsystem, variableinfo... |
113 | @echo QTDIR=$(QTDIR) | 113 | @echo QTDIR=$(QTDIR) |
114 | @echo QPEDIR=$(QPEDIR) | 114 | @echo QPEDIR=$(QPEDIR) |
115 | @echo OPIEDIR=$(OPIEDIR) | 115 | @echo OPIEDIR=$(OPIEDIR) |
116 | @echo PLATFORM=$(PLATFORM) | 116 | @echo PLATFORM=$(PLATFORM) |
117 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) | 117 | @echo RELEASE_DEBUG=$(RELEASE_DEBUG) |
118 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) | 118 | @echo BUILD_NO_MICROMAIL=$(BUILD_NO_MICROMAIL) |
119 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) | 119 | @echo BUILD_NO_LDAP_PLUGIN=$(BUILD_NO_LDAP_PLUGIN) |
120 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) | 120 | @echo BUILD_NO_OPIE_PLUGIN=$(BUILD_NO_OPIE_PLUGIN) |
121 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) | 121 | @echo BUILD_NO_SHARP_PLUGIN=$(BUILD_NO_SHARP_PLUGIN) |
122 | ifndef BUILD_NO_SHARP_PLUGIN | 122 | ifndef BUILD_NO_SHARP_PLUGIN |
123 | @echo SHARPDTMSDK=$(SHARPDTMSDK) | 123 | @echo SHARPDTMSDK=$(SHARPDTMSDK) |
124 | endif | 124 | endif |
125 | @echo -------------------------------------- | 125 | @echo -------------------------------------- |
126 | 126 | ||
127 | variable_test: variable_info | 127 | variable_test: variable_info |
128 | @echo KDEPIM buildsystem, variablecheck... | 128 | @echo KDEPIM buildsystem, variablecheck... |
129 | ifndef PLATFORM | 129 | ifndef PLATFORM |
130 | @echo PLATFORM is not defined. | 130 | @echo PLATFORM is not defined. |
131 | $(error PLATFORM is not defined) | 131 | $(error PLATFORM is not defined) |
132 | endif | 132 | endif |
133 | ifdef BUILD_NO_LDAP_PLUGIN | 133 | ifdef BUILD_NO_LDAP_PLUGIN |
134 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) | 134 | @echo LDAP PLUGIN will not be build, because BUILD_NO_LDAP_PLUGIN is set to $(BUILD_NO_LDAP_PLUGIN) |
135 | endif | 135 | endif |
136 | ifdef BUILD_NO_OPIE_PLUGIN | 136 | ifdef BUILD_NO_OPIE_PLUGIN |
137 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) | 137 | @echo OPIE PLUGIN will not be build, because BUILD_NO_OPIE_PLUGIN is set to $(BUILD_NO_OPIE_PLUGIN) |
138 | endif | 138 | endif |
139 | ifdef BUILD_NO_MICROMAIL | 139 | ifdef BUILD_NO_MICROMAIL |
140 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) | 140 | @echo MICROMAIL will not be build, because BUILD_NO_MICROMAIL is set to $(BUILD_NO_MICROMAIL) |
141 | endif | 141 | endif |
142 | ifdef BUILD_NO_SHARP_PLUGIN | 142 | ifdef BUILD_NO_SHARP_PLUGIN |
143 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) | 143 | @echo SHARP PLUGIN will not be build, because BUILD_NO_SHARP_PLUGIN is set to $(BUILD_NO_SHARP_PLUGIN) |
144 | else | 144 | else |
145 | ifndef SHARPDTMSDK | 145 | ifndef SHARPDTMSDK |
146 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) | 146 | @echo SHARP PLUGIN can not be build, because SHARPDTMSDK is set to $(SHARPDTMSDK) |
147 | $(error SHARPDTMSDK is not defined) | 147 | $(error SHARPDTMSDK is not defined) |
148 | endif | 148 | endif |
149 | endif | 149 | endif |
150 | @echo -------------------------------------- | 150 | @echo -------------------------------------- |
151 | 151 | ||
152 | 152 | ||
153 | objects: | 153 | objects: |
154 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done | 154 | for i in $(SUBDIRS); do mkdir -p $$i/obj/$(PLATFORM); done |
155 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done | 155 | for i in $(SUBDIRS); do mkdir -p $$i/moc/$(PLATFORM); done |
156 | mkdir -p libical/lib/$(PLATFORM) | 156 | mkdir -p libical/lib/$(PLATFORM) |
157 | 157 | ||
158 | clean: | 158 | clean: |
159 | rm -f libical/lib/$(PLATFORM)/*; | 159 | rm -f libical/lib/$(PLATFORM)/*; |
160 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ | 160 | for i in $(SUBDIRS); do pushd $$i; make clean; rm -f *~;\ |
161 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ | 161 | rm -f obj/$(PLATFORM)/*; rm -f moc/$(PLATFORM)/*; rm Makefile$(PLATFORM); popd; \ |
162 | done | 162 | done |
163 | install: | 163 | install: |
164 | cd bin/kdepim; make install | 164 | cd bin/kdepim; make install |
165 | cp db2file/db2file $(QPEDIR)/bin/db2file | 165 | cp db2file/db2file $(QPEDIR)/bin/db2file |
166 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop | 166 | cp korganizer/korganizer.desktop $(QPEDIR)/apps/Pim/korganizer.desktop |
167 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop | 167 | cp kaddressbook/kaddressbook.desktop $(QPEDIR)/apps/Pim/kaddressbook.desktop |
168 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop | 168 | cp kmicromail/kmicromail.desktop $(QPEDIR)/apps/Pim/kmicromail.desktop |
169 | 169 | ||
170 | dist: | 170 | dist: |
171 | @echo Dont forget to do "make install" before "make dist" | 171 | @echo Dont forget to do "make install" before "make dist" |
172 | rm -f *arm.ipk | 172 | rm -f *arm.ipk |
173 | rm -f *~ | 173 | rm -f *~ |
174 | cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc kdepim | 174 | cd ..; tar czf kdepim.src.tar.gz --exclude=obj --exclude=moc kdepim |
175 | ./mkipks kmicrokdelibs.control | 175 | ./mkipks kmicrokdelibs.control |
176 | ./mkipks korganizer.control | 176 | ./mkipks korganizer.control |
177 | ./mkipks kaddressbook.control | 177 | ./mkipks kaddressbook.control |
178 | ifndef BUILD_NO_MICROMAIL | 178 | ifndef BUILD_NO_MICROMAIL |
179 | ./mkipks kopiemail.control | 179 | ./mkipks kopiemail.control |
180 | endif | 180 | endif |
181 | ./mkipks korganizer-alarm.control | 181 | ./mkipks korganizer-alarm.control |
182 | 182 | ||
183 | tmake: objects \ | 183 | tmake: objects \ |
184 | qtcompat/Makefile$(PLATFORM) \ | 184 | qtcompat/Makefile$(PLATFORM) \ |
185 | microkde/Makefile$(PLATFORM) \ | 185 | microkde/Makefile$(PLATFORM) \ |
186 | libkcal/Makefile$(PLATFORM) \ | 186 | libkcal/Makefile$(PLATFORM) \ |
187 | libkdepim/Makefile$(PLATFORM) \ | 187 | libkdepim/Makefile$(PLATFORM) \ |
188 | korganizer/Makefile$(PLATFORM) \ | 188 | korganizer/Makefile$(PLATFORM) \ |
189 | kalarmd/Makefile$(PLATFORM) \ | 189 | kalarmd/Makefile$(PLATFORM) \ |
190 | libical/src/libical/Makefile$(PLATFORM) \ | 190 | libical/src/libical/Makefile$(PLATFORM) \ |
191 | libical/src/libicalss/Makefile$(PLATFORM) \ | 191 | libical/src/libicalss/Makefile$(PLATFORM) \ |
192 | kabc/Makefile$(PLATFORM) \ | 192 | kabc/Makefile$(PLATFORM) \ |
193 | kabc/formats/binary/Makefile$(PLATFORM) \ | 193 | kabc/formats/binary/Makefile$(PLATFORM) \ |
194 | kabc/plugins/file/Makefile$(PLATFORM) \ | 194 | kabc/plugins/file/Makefile$(PLATFORM) \ |
195 | kabc/plugins/dir/Makefile$(PLATFORM) \ | 195 | kabc/plugins/dir/Makefile$(PLATFORM) \ |
196 | kabc/plugins/ldap/Makefile$(PLATFORM) \ | 196 | kabc/plugins/ldap/Makefile$(PLATFORM) \ |
197 | kabc/plugins/opie/Makefile$(PLATFORM) \ | 197 | kabc/plugins/opie/Makefile$(PLATFORM) \ |
198 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ | 198 | kabc/plugins/qtopia/Makefile$(PLATFORM) \ |
199 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ | 199 | kabc/plugins/sharpdtm/Makefile$(PLATFORM) \ |
200 | kaddressbook/xxport/opie/Makefile$(PLATFORM) \ | ||
201 | kaddressbook/xxport/qtopia/Makefile$(PLATFORM) \ | ||
202 | kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM) \ | ||
203 | kaddressbook/Makefile$(PLATFORM) \ | 200 | kaddressbook/Makefile$(PLATFORM) \ |
204 | kmicromail/Makefile$(PLATFORM) \ | 201 | kmicromail/Makefile$(PLATFORM) \ |
205 | kmicromail/libetpan/Makefile$(PLATFORM) \ | 202 | kmicromail/libetpan/Makefile$(PLATFORM) \ |
206 | kmicromail/libmailwrapper/Makefile$(PLATFORM) | 203 | kmicromail/libmailwrapper/Makefile$(PLATFORM) |
204 | |||
207 | 205 | ||
208 | 206 | ||
209 | 207 | ||
210 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro | 208 | qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro |
211 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) | 209 | cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM) |
212 | 210 | ||
213 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro | 211 | microkde/Makefile$(PLATFORM): microkde/microkdeE.pro |
214 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) | 212 | cd microkde; tmake "CONFIG+=$(RELEASE_DEBUG)" microkdeE.pro -o Makefile$(PLATFORM) |
215 | 213 | ||
216 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro | 214 | libkcal/Makefile$(PLATFORM): libkcal/libkcalE.pro |
217 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) | 215 | cd libkcal; tmake "CONFIG+=$(RELEASE_DEBUG)" libkcalE.pro -o Makefile$(PLATFORM) |
218 | 216 | ||
219 | 217 | ||
220 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro | 218 | libkdepim/Makefile$(PLATFORM): libkdepim/libkdepimE.pro |
221 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) | 219 | cd libkdepim; tmake "CONFIG+=$(RELEASE_DEBUG)" libkdepimE.pro -o Makefile$(PLATFORM) |
222 | 220 | ||
223 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro | 221 | kalarmd/Makefile$(PLATFORM): kalarmd/kalarmdE.pro |
224 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) | 222 | cd kalarmd; tmake "CONFIG+=$(RELEASE_DEBUG)" kalarmdE.pro -o Makefile$(PLATFORM) |
225 | 223 | ||
226 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro | 224 | korganizer/Makefile$(PLATFORM): korganizer/korganizerE.pro |
227 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) | 225 | cd korganizer; tmake "CONFIG+=$(RELEASE_DEBUG)" korganizerE.pro -o Makefile$(PLATFORM) |
228 | 226 | ||
229 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro | 227 | libical/src/libical/Makefile$(PLATFORM): libical/src/libical/libicalE.pro |
230 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) | 228 | cd libical/src/libical; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalE.pro -o Makefile$(PLATFORM) |
231 | 229 | ||
232 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro | 230 | libical/src/libicalss/Makefile$(PLATFORM): libical/src/libicalss/libicalssE.pro |
233 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) | 231 | cd libical/src/libicalss; tmake "CONFIG+=$(RELEASE_DEBUG)" libicalssE.pro -o Makefile$(PLATFORM) |
234 | 232 | ||
235 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro | 233 | kabc/Makefile$(PLATFORM): kabc/kabcE.pro |
236 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) | 234 | cd kabc; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcE.pro -o Makefile$(PLATFORM) |
237 | 235 | ||
238 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro | 236 | kabc/formats/binary/Makefile$(PLATFORM): kabc/formats/binary/kabcformat_binaryE.pro |
239 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) | 237 | cd kabc/formats/binary; tmake "CONFIG+=$(RELEASE_DEBUG)" kabcformat_binaryE.pro -o Makefile$(PLATFORM) |
240 | 238 | ||
241 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro | 239 | kabc/plugins/file/Makefile$(PLATFORM): kabc/plugins/file/fileE.pro |
242 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM) | 240 | cd kabc/plugins/file; tmake "CONFIG+=$(RELEASE_DEBUG)" fileE.pro -o Makefile$(PLATFORM) |
243 | 241 | ||
244 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro | 242 | kabc/plugins/dir/Makefile$(PLATFORM): kabc/plugins/dir/dirE.pro |
245 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) | 243 | cd kabc/plugins/dir; tmake "CONFIG+=$(RELEASE_DEBUG)" dirE.pro -o Makefile$(PLATFORM) |
246 | 244 | ||
247 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro | 245 | kabc/plugins/ldap/Makefile$(PLATFORM): kabc/plugins/ldap/ldapE.pro |
248 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) | 246 | cd kabc/plugins/ldap; tmake "CONFIG+=$(RELEASE_DEBUG)" ldapE.pro -o Makefile$(PLATFORM) |
249 | 247 | ||
250 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro | 248 | kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro |
251 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) | 249 | cd kabc/plugins/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) |
252 | 250 | ||
253 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro | 251 | kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro |
254 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) | 252 | cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) |
255 | 253 | ||
256 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro | 254 | kabc/plugins/sharpdtm/Makefile$(PLATFORM): kabc/plugins/sharpdtm/sharpdtmE.pro |
257 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) | 255 | cd kabc/plugins/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) |
258 | 256 | ||
259 | kaddressbook/xxport/opie/Makefile$(PLATFORM): kaddressbook/xxport/opie/opieE.pro | ||
260 | cd kaddressbook/xxport/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM) | ||
261 | |||
262 | kaddressbook/xxport/qtopia/Makefile$(PLATFORM): kaddressbook/xxport/qtopia/qtopiaE.pro | ||
263 | cd kaddressbook/xxport/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM) | ||
264 | |||
265 | kaddressbook/xxport/sharpdtm/Makefile$(PLATFORM): kaddressbook/xxport/sharpdtm/sharpdtmE.pro | ||
266 | cd kaddressbook/xxport/sharpdtm; tmake "CONFIG+=$(RELEASE_DEBUG)" sharpdtmE.pro -o Makefile$(PLATFORM) | ||
267 | |||
268 | |||
269 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro | 257 | kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro |
270 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) | 258 | cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM) |
271 | 259 | ||
272 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro | 260 | kmicromail/Makefile$(PLATFORM): kmicromail/kmicromailE.pro |
273 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) | 261 | cd kmicromail; tmake "CONFIG+=$(RELEASE_DEBUG)" kmicromailE.pro -o Makefile$(PLATFORM) |
274 | 262 | ||
275 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro | 263 | kmicromail/libetpan/Makefile$(PLATFORM): kmicromail/libetpan/libetpanE.pro |
276 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) | 264 | cd kmicromail/libetpan; tmake "CONFIG+=$(RELEASE_DEBUG)" libetpanE.pro -o Makefile$(PLATFORM) |
277 | 265 | ||
278 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro | 266 | kmicromail/libmailwrapper/Makefile$(PLATFORM): kmicromail/libmailwrapper/libmailwrapperE.pro |
279 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) | 267 | cd kmicromail/libmailwrapper; tmake "CONFIG+=$(RELEASE_DEBUG)" libmailwrapperE.pro -o Makefile$(PLATFORM) |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6020a46..57b299f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1,235 +1,236 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | 2 | ||
3 | #include <qaction.h> | 3 | #include <qaction.h> |
4 | #include <qpopupmenu.h> | 4 | #include <qpopupmenu.h> |
5 | #include <qpainter.h> | 5 | #include <qpainter.h> |
6 | #include <qwhatsthis.h> | 6 | #include <qwhatsthis.h> |
7 | #include <qmessagebox.h> | 7 | #include <qmessagebox.h> |
8 | #include <qlineedit.h> | 8 | #include <qlineedit.h> |
9 | #include <qfile.h> | 9 | #include <qfile.h> |
10 | #include <qdir.h> | 10 | #include <qdir.h> |
11 | #include <qapp.h> | 11 | #include <qapp.h> |
12 | #include <qfileinfo.h> | 12 | #include <qfileinfo.h> |
13 | #include <qlabel.h> | 13 | #include <qlabel.h> |
14 | #include <qwmatrix.h> | 14 | #include <qwmatrix.h> |
15 | #include <qtextbrowser.h> | 15 | #include <qtextbrowser.h> |
16 | #include <qtextstream.h> | 16 | #include <qtextstream.h> |
17 | #ifndef DESKTOP_VERSION | 17 | #ifndef DESKTOP_VERSION |
18 | #include <qpe/global.h> | 18 | #include <qpe/global.h> |
19 | #include <qpe/qpemenubar.h> | 19 | #include <qpe/qpemenubar.h> |
20 | #include <qpe/qpetoolbar.h> | 20 | #include <qpe/qpetoolbar.h> |
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | #include <qtopia/alarmserver.h> | 23 | #include <qtopia/alarmserver.h> |
24 | #include <qtopia/qcopenvelope_qws.h> | 24 | #include <qtopia/qcopenvelope_qws.h> |
25 | #else | 25 | #else |
26 | #include <qmenubar.h> | 26 | #include <qmenubar.h> |
27 | #include <qtoolbar.h> | 27 | #include <qtoolbar.h> |
28 | #include <qapplication.h> | 28 | #include <qapplication.h> |
29 | //#include <resource.h> | 29 | //#include <resource.h> |
30 | 30 | ||
31 | #endif | 31 | #endif |
32 | #include <libkcal/calendarlocal.h> | 32 | #include <libkcal/calendarlocal.h> |
33 | #include <libkcal/todo.h> | 33 | #include <libkcal/todo.h> |
34 | #include <libkdepim/ksyncprofile.h> | 34 | #include <libkdepim/ksyncprofile.h> |
35 | #include <libkdepim/kincidenceformatter.h> | 35 | #include <libkdepim/kincidenceformatter.h> |
36 | 36 | ||
37 | #include "calendarview.h" | 37 | #include "calendarview.h" |
38 | #include "koviewmanager.h" | 38 | #include "koviewmanager.h" |
39 | #include "datenavigator.h" | 39 | #include "datenavigator.h" |
40 | #include "koagendaview.h" | 40 | #include "koagendaview.h" |
41 | #include "koagenda.h" | 41 | #include "koagenda.h" |
42 | #include "kodialogmanager.h" | 42 | #include "kodialogmanager.h" |
43 | #include "kdialogbase.h" | 43 | #include "kdialogbase.h" |
44 | #include "kapplication.h" | ||
44 | #include "kstandarddirs.h" | 45 | #include "kstandarddirs.h" |
45 | #include "koprefs.h" | 46 | #include "koprefs.h" |
46 | #include "kfiledialog.h" | 47 | #include "kfiledialog.h" |
47 | #include "koglobals.h" | 48 | #include "koglobals.h" |
48 | #include "kglobal.h" | 49 | #include "kglobal.h" |
49 | #include "klocale.h" | 50 | #include "klocale.h" |
50 | #include "kconfig.h" | 51 | #include "kconfig.h" |
51 | #include "simplealarmclient.h" | 52 | #include "simplealarmclient.h" |
52 | using namespace KCal; | 53 | using namespace KCal; |
53 | #ifndef _WIN32_ | 54 | #ifndef _WIN32_ |
54 | #include <unistd.h> | 55 | #include <unistd.h> |
55 | #else | 56 | #else |
56 | #include "koimportoldialog.h" | 57 | #include "koimportoldialog.h" |
57 | #endif | 58 | #endif |
58 | #include "mainwindow.h" | 59 | #include "mainwindow.h" |
59 | 60 | ||
60 | int globalFlagBlockStartup; | 61 | int globalFlagBlockStartup; |
61 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | 62 | MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : |
62 | QMainWindow( parent, name ) | 63 | QMainWindow( parent, name ) |
63 | { | 64 | { |
64 | 65 | ||
65 | #ifdef DESKTOP_VERSION | 66 | #ifdef DESKTOP_VERSION |
66 | setFont( QFont("Arial"), 14 ); | 67 | setFont( QFont("Arial"), 14 ); |
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; | 70 | //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; |
70 | QString confFile = locateLocal("config","korganizerrc"); | 71 | QString confFile = locateLocal("config","korganizerrc"); |
71 | QFileInfo finf ( confFile ); | 72 | QFileInfo finf ( confFile ); |
72 | bool showWarning = !finf.exists(); | 73 | bool showWarning = !finf.exists(); |
73 | setIcon(SmallIcon( "ko24" ) ); | 74 | setIcon(SmallIcon( "ko24" ) ); |
74 | mBlockAtStartup = true; | 75 | mBlockAtStartup = true; |
75 | mFlagKeyPressed = false; | 76 | mFlagKeyPressed = false; |
76 | setCaption("KOrganizer/Pi"); | 77 | setCaption("KOrganizer/Pi"); |
77 | KOPrefs *p = KOPrefs::instance(); | 78 | KOPrefs *p = KOPrefs::instance(); |
78 | // if ( QApplication::desktop()->height() > 480 ) { | 79 | // if ( QApplication::desktop()->height() > 480 ) { |
79 | // if ( p->mHourSize == 4 ) | 80 | // if ( p->mHourSize == 4 ) |
80 | // p->mHourSize = 6; | 81 | // p->mHourSize = 6; |
81 | // } | 82 | // } |
82 | if ( p->mHourSize > 18 ) | 83 | if ( p->mHourSize > 18 ) |
83 | p->mHourSize = 18; | 84 | p->mHourSize = 18; |
84 | QMainWindow::ToolBarDock tbd; | 85 | QMainWindow::ToolBarDock tbd; |
85 | if ( p->mToolBarHor ) { | 86 | if ( p->mToolBarHor ) { |
86 | if ( p->mToolBarUp ) | 87 | if ( p->mToolBarUp ) |
87 | tbd = Bottom; | 88 | tbd = Bottom; |
88 | else | 89 | else |
89 | tbd = Top; | 90 | tbd = Top; |
90 | } | 91 | } |
91 | else { | 92 | else { |
92 | if ( p->mToolBarUp ) | 93 | if ( p->mToolBarUp ) |
93 | tbd = Right; | 94 | tbd = Right; |
94 | else | 95 | else |
95 | tbd = Left; | 96 | tbd = Left; |
96 | } | 97 | } |
97 | if ( KOPrefs::instance()->mUseAppColors ) | 98 | if ( KOPrefs::instance()->mUseAppColors ) |
98 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); | 99 | QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); |
99 | globalFlagBlockStartup = 1; | 100 | globalFlagBlockStartup = 1; |
100 | iconToolBar = new QPEToolBar( this ); | 101 | iconToolBar = new QPEToolBar( this ); |
101 | addToolBar (iconToolBar , tbd ); | 102 | addToolBar (iconToolBar , tbd ); |
102 | mBlockSaveFlag = false; | 103 | mBlockSaveFlag = false; |
103 | mCalendarModifiedFlag = false; | 104 | mCalendarModifiedFlag = false; |
104 | 105 | ||
105 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 106 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
106 | splash->setAlignment ( AlignCenter ); | 107 | splash->setAlignment ( AlignCenter ); |
107 | setCentralWidget( splash ); | 108 | setCentralWidget( splash ); |
108 | #ifndef DESKTOP_VERSION | 109 | #ifndef DESKTOP_VERSION |
109 | showMaximized(); | 110 | showMaximized(); |
110 | #endif | 111 | #endif |
111 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); | 112 | //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); |
112 | setDefaultPreferences(); | 113 | setDefaultPreferences(); |
113 | mCalendar = new CalendarLocal(); | 114 | mCalendar = new CalendarLocal(); |
114 | mView = new CalendarView( mCalendar, this,"mCalendar " ); | 115 | mView = new CalendarView( mCalendar, this,"mCalendar " ); |
115 | mView->hide(); | 116 | mView->hide(); |
116 | //mView->resize(splash->size() ); | 117 | //mView->resize(splash->size() ); |
117 | initActions(); | 118 | initActions(); |
118 | #ifndef DESKTOP_VERSION | 119 | #ifndef DESKTOP_VERSION |
119 | iconToolBar->show(); | 120 | iconToolBar->show(); |
120 | qApp->processEvents(); | 121 | qApp->processEvents(); |
121 | #endif | 122 | #endif |
122 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); | 123 | //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); |
123 | int vh = height() ; | 124 | int vh = height() ; |
124 | int vw = width(); | 125 | int vw = width(); |
125 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); | 126 | //qDebug("Toolbar hei %d ",iconToolBar->height() ); |
126 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { | 127 | if ( iconToolBar->orientation () == Qt:: Horizontal ) { |
127 | vh -= iconToolBar->height(); | 128 | vh -= iconToolBar->height(); |
128 | } else { | 129 | } else { |
129 | vw -= iconToolBar->height(); | 130 | vw -= iconToolBar->height(); |
130 | } | 131 | } |
131 | //mView->setMaximumSize( splash->size() ); | 132 | //mView->setMaximumSize( splash->size() ); |
132 | //mView->resize( splash->size() ); | 133 | //mView->resize( splash->size() ); |
133 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 134 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
134 | mView->readSettings(); | 135 | mView->readSettings(); |
135 | bool oldOpened = false; | 136 | bool oldOpened = false; |
136 | bool newFile = false; | 137 | bool newFile = false; |
137 | if( !QFile::exists( defaultFileName() ) ) { | 138 | if( !QFile::exists( defaultFileName() ) ) { |
138 | QFileInfo finfo ( defaultFileName() ); | 139 | QFileInfo finfo ( defaultFileName() ); |
139 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); | 140 | QString oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/Applications/korganizer/mycalendar.ics"); |
140 | qDebug("oldfile %s ", oldFile.latin1()); | 141 | qDebug("oldfile %s ", oldFile.latin1()); |
141 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; | 142 | QString message = "You are starting KO/Pi for the\nfirst time after updating to a\nversion >= 1.9.1. The location of the\ndefault calendar file has changed.\nA mycalendar.ics file was detected\nat the old location.\nThis file will be loaded now\nand stored at the new location!\n(Config file location has changed, too!)\nPlease read menu Help-What's New!\n"; |
142 | finfo.setFile( oldFile ); | 143 | finfo.setFile( oldFile ); |
143 | if (finfo.exists() ) { | 144 | if (finfo.exists() ) { |
144 | KMessageBox::information( this, message); | 145 | KMessageBox::information( this, message); |
145 | mView->openCalendar( oldFile ); | 146 | mView->openCalendar( oldFile ); |
146 | qApp->processEvents(); | 147 | qApp->processEvents(); |
147 | } else { | 148 | } else { |
148 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 149 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
149 | finfo.setFile( oldFile ); | 150 | finfo.setFile( oldFile ); |
150 | if (finfo.exists() ) { | 151 | if (finfo.exists() ) { |
151 | KMessageBox::information( this, message); | 152 | KMessageBox::information( this, message); |
152 | mView->openCalendar( oldFile ); | 153 | mView->openCalendar( oldFile ); |
153 | qApp->processEvents(); | 154 | qApp->processEvents(); |
154 | } | 155 | } |
155 | } | 156 | } |
156 | mView->saveCalendar( defaultFileName() ); | 157 | mView->saveCalendar( defaultFileName() ); |
157 | newFile = true; | 158 | newFile = true; |
158 | } | 159 | } |
159 | 160 | ||
160 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 161 | QTime neededSaveTime = QDateTime::currentDateTime().time(); |
161 | if ( ! oldOpened ) | 162 | if ( ! oldOpened ) |
162 | mView->openCalendar( defaultFileName() ); | 163 | mView->openCalendar( defaultFileName() ); |
163 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 164 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
164 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 165 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
165 | 166 | ||
166 | if ( KOPrefs::instance()->mLanguageChanged ) { | 167 | if ( KOPrefs::instance()->mLanguageChanged ) { |
167 | KOPrefs::instance()->setCategoryDefaults(); | 168 | KOPrefs::instance()->setCategoryDefaults(); |
168 | int count = mView->addCategories(); | 169 | int count = mView->addCategories(); |
169 | KOPrefs::instance()->mLanguageChanged = false; | 170 | KOPrefs::instance()->mLanguageChanged = false; |
170 | } | 171 | } |
171 | processIncidenceSelection( 0 ); | 172 | processIncidenceSelection( 0 ); |
172 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | 173 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), |
173 | SLOT( processIncidenceSelection( Incidence * ) ) ); | 174 | SLOT( processIncidenceSelection( Incidence * ) ) ); |
174 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | 175 | connect( mView, SIGNAL( modifiedChanged( bool ) ), |
175 | SLOT( slotModifiedChanged( bool ) ) ); | 176 | SLOT( slotModifiedChanged( bool ) ) ); |
176 | 177 | ||
177 | 178 | ||
178 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 179 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
179 | mView->setModified( false ); | 180 | mView->setModified( false ); |
180 | mBlockAtStartup = false; | 181 | mBlockAtStartup = false; |
181 | mView->setModified( false ); | 182 | mView->setModified( false ); |
182 | setCentralWidget( mView ); | 183 | setCentralWidget( mView ); |
183 | globalFlagBlockStartup = 0; | 184 | globalFlagBlockStartup = 0; |
184 | mView->show(); | 185 | mView->show(); |
185 | delete splash; | 186 | delete splash; |
186 | if ( newFile ) | 187 | if ( newFile ) |
187 | mView->updateConfig(); | 188 | mView->updateConfig(); |
188 | // qApp->processEvents(); | 189 | // qApp->processEvents(); |
189 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 190 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
190 | fillSyncMenu(); | 191 | fillSyncMenu(); |
191 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 192 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
192 | if ( showWarning ) { | 193 | if ( showWarning ) { |
193 | KMessageBox::information( this, | 194 | KMessageBox::information( this, |
194 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 195 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
195 | qApp->processEvents(); | 196 | qApp->processEvents(); |
196 | mView->dialogManager()->showSyncOptions(); | 197 | mView->dialogManager()->showSyncOptions(); |
197 | } | 198 | } |
198 | } | 199 | } |
199 | MainWindow::~MainWindow() | 200 | MainWindow::~MainWindow() |
200 | { | 201 | { |
201 | //qDebug("MainWindow::~MainWindow() "); | 202 | //qDebug("MainWindow::~MainWindow() "); |
202 | //save toolbar location | 203 | //save toolbar location |
203 | 204 | ||
204 | delete mCalendar; | 205 | delete mCalendar; |
205 | delete KOPrefs::instance(); | 206 | delete KOPrefs::instance(); |
206 | delete KIncidenceFormatter::instance(); | 207 | delete KIncidenceFormatter::instance(); |
207 | 208 | ||
208 | 209 | ||
209 | } | 210 | } |
210 | void MainWindow::closeEvent( QCloseEvent* ce ) | 211 | void MainWindow::closeEvent( QCloseEvent* ce ) |
211 | { | 212 | { |
212 | 213 | ||
213 | 214 | ||
214 | 215 | ||
215 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 216 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
216 | saveOnClose(); | 217 | saveOnClose(); |
217 | ce->accept(); | 218 | ce->accept(); |
218 | return; | 219 | return; |
219 | 220 | ||
220 | } | 221 | } |
221 | 222 | ||
222 | switch( QMessageBox::information( this, "KO/Pi", | 223 | switch( QMessageBox::information( this, "KO/Pi", |
223 | i18n("Do you really want\nto close KO/Pi?"), | 224 | i18n("Do you really want\nto close KO/Pi?"), |
224 | i18n("Close"), i18n("No"), | 225 | i18n("Close"), i18n("No"), |
225 | 0, 0 ) ) { | 226 | 0, 0 ) ) { |
226 | case 0: | 227 | case 0: |
227 | saveOnClose(); | 228 | saveOnClose(); |
228 | ce->accept(); | 229 | ce->accept(); |
229 | break; | 230 | break; |
230 | case 1: | 231 | case 1: |
231 | ce->ignore(); | 232 | ce->ignore(); |
232 | break; | 233 | break; |
233 | case 2: | 234 | case 2: |
234 | 235 | ||
235 | default: | 236 | default: |
@@ -502,753 +503,762 @@ void MainWindow::initActions() | |||
502 | connect( xdays_action, SIGNAL( activated() ), | 503 | connect( xdays_action, SIGNAL( activated() ), |
503 | mView->viewManager(), SLOT( showNextXView() ) ); | 504 | mView->viewManager(), SLOT( showNextXView() ) ); |
504 | 505 | ||
505 | icon = loadPixmap( pathString + "whatsnext" ); | 506 | icon = loadPixmap( pathString + "whatsnext" ); |
506 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); | 507 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); |
507 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 508 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
508 | whatsnext_action->addTo( viewMenu ); | 509 | whatsnext_action->addTo( viewMenu ); |
509 | connect( whatsnext_action, SIGNAL( activated() ), | 510 | connect( whatsnext_action, SIGNAL( activated() ), |
510 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 511 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
511 | 512 | ||
512 | #if 0 | 513 | #if 0 |
513 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 514 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
514 | action->addTo( viewMenu ); | 515 | action->addTo( viewMenu ); |
515 | connect( action, SIGNAL( activated() ), | 516 | connect( action, SIGNAL( activated() ), |
516 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 517 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
517 | #endif | 518 | #endif |
518 | 519 | ||
519 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 520 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
520 | this ); | 521 | this ); |
521 | mNewSubTodoAction->addTo( actionMenu ); | 522 | mNewSubTodoAction->addTo( actionMenu ); |
522 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 523 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
523 | mView, SLOT( newSubTodo() ) ); | 524 | mView, SLOT( newSubTodo() ) ); |
524 | 525 | ||
525 | actionMenu->insertSeparator(); | 526 | actionMenu->insertSeparator(); |
526 | 527 | ||
527 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 528 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
528 | mShowAction->addTo( actionMenu ); | 529 | mShowAction->addTo( actionMenu ); |
529 | connect( mShowAction, SIGNAL( activated() ), | 530 | connect( mShowAction, SIGNAL( activated() ), |
530 | mView, SLOT( showIncidence() ) ); | 531 | mView, SLOT( showIncidence() ) ); |
531 | 532 | ||
532 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 533 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
533 | mEditAction->addTo( actionMenu ); | 534 | mEditAction->addTo( actionMenu ); |
534 | connect( mEditAction, SIGNAL( activated() ), | 535 | connect( mEditAction, SIGNAL( activated() ), |
535 | mView, SLOT( editIncidence() ) ); | 536 | mView, SLOT( editIncidence() ) ); |
536 | 537 | ||
537 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 538 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
538 | mDeleteAction->addTo( actionMenu ); | 539 | mDeleteAction->addTo( actionMenu ); |
539 | connect( mDeleteAction, SIGNAL( activated() ), | 540 | connect( mDeleteAction, SIGNAL( activated() ), |
540 | mView, SLOT( deleteIncidence() ) ); | 541 | mView, SLOT( deleteIncidence() ) ); |
541 | 542 | ||
542 | actionMenu->insertSeparator(); | 543 | actionMenu->insertSeparator(); |
543 | 544 | ||
544 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 545 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
545 | this ); | 546 | this ); |
546 | action->addTo( actionMenu ); | 547 | action->addTo( actionMenu ); |
547 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 548 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
548 | 549 | ||
549 | icon = loadPixmap( pathString + "search" ); | 550 | icon = loadPixmap( pathString + "search" ); |
550 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 551 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
551 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); | 552 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); |
552 | search_action->addTo( actionMenu ); | 553 | search_action->addTo( actionMenu ); |
553 | connect( search_action, SIGNAL( activated() ), | 554 | connect( search_action, SIGNAL( activated() ), |
554 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 555 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
555 | 556 | ||
556 | icon = loadPixmap( pathString + "today" ); | 557 | icon = loadPixmap( pathString + "today" ); |
557 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 558 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
558 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 559 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
559 | today_action->addTo( actionMenu ); | 560 | today_action->addTo( actionMenu ); |
560 | connect( today_action, SIGNAL( activated() ), | 561 | connect( today_action, SIGNAL( activated() ), |
561 | mView, SLOT( goToday() ) ); | 562 | mView, SLOT( goToday() ) ); |
562 | 563 | ||
563 | if ( KOPrefs::instance()->mShowFullMenu ) { | 564 | if ( KOPrefs::instance()->mShowFullMenu ) { |
564 | actionMenu->insertSeparator(); | 565 | actionMenu->insertSeparator(); |
565 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 566 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
566 | 567 | ||
567 | } | 568 | } |
568 | // actionMenu->insertSeparator(); | 569 | // actionMenu->insertSeparator(); |
569 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 570 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
570 | this ); | 571 | this ); |
571 | action->addTo( importMenu ); | 572 | action->addTo( importMenu ); |
572 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 573 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
573 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 574 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
574 | this ); | 575 | this ); |
575 | action->addTo( importMenu ); | 576 | action->addTo( importMenu ); |
576 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 577 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
577 | importMenu->insertSeparator(); | 578 | importMenu->insertSeparator(); |
578 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 579 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
579 | this ); | 580 | this ); |
580 | action->addTo( importMenu ); | 581 | action->addTo( importMenu ); |
581 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 582 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
582 | #ifndef DESKTOP_VERSION | 583 | #ifndef DESKTOP_VERSION |
583 | importMenu->insertSeparator(); | 584 | importMenu->insertSeparator(); |
584 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 585 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
585 | this ); | 586 | this ); |
586 | action->addTo( importMenu ); | 587 | action->addTo( importMenu ); |
587 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 588 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
588 | #else | 589 | #else |
589 | #ifdef _WIN32_ | 590 | #ifdef _WIN32_ |
590 | importMenu->insertSeparator(); | 591 | importMenu->insertSeparator(); |
591 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 592 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
592 | this ); | 593 | this ); |
593 | action->addTo( importMenu ); | 594 | action->addTo( importMenu ); |
594 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 595 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
595 | #endif | 596 | #endif |
596 | #endif | 597 | #endif |
597 | 598 | ||
598 | importMenu->insertSeparator(); | 599 | importMenu->insertSeparator(); |
599 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 600 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
600 | this ); | 601 | this ); |
601 | action->addTo( importMenu ); | 602 | action->addTo( importMenu ); |
602 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 603 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
603 | 604 | ||
604 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 605 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
605 | this ); | 606 | this ); |
606 | action->addTo( importMenu ); | 607 | action->addTo( importMenu ); |
607 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 608 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
608 | 609 | ||
609 | importMenu->insertSeparator(); | 610 | importMenu->insertSeparator(); |
610 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 611 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
611 | this ); | 612 | this ); |
612 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 613 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
613 | importMenu->insertSeparator(); | 614 | importMenu->insertSeparator(); |
614 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 615 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
615 | this ); | 616 | this ); |
616 | action->addTo( importMenu ); | 617 | action->addTo( importMenu ); |
617 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 618 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
618 | #ifndef DESKTOP_VERSION | 619 | #ifndef DESKTOP_VERSION |
619 | importMenu->insertSeparator(); | 620 | importMenu->insertSeparator(); |
620 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 621 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
621 | this ); | 622 | this ); |
622 | action->addTo( importMenu ); | 623 | action->addTo( importMenu ); |
623 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 624 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
624 | 625 | ||
625 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 626 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
626 | this ); | 627 | this ); |
627 | action->addTo( importMenu ); | 628 | action->addTo( importMenu ); |
628 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 629 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
629 | #else | 630 | #else |
630 | importMenu->insertSeparator(); | 631 | importMenu->insertSeparator(); |
631 | icon = loadPixmap( pathString + "print" ); | 632 | icon = loadPixmap( pathString + "print" ); |
632 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 633 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
633 | action->addTo( importMenu ); | 634 | action->addTo( importMenu ); |
634 | connect( action, SIGNAL( activated() ), | 635 | connect( action, SIGNAL( activated() ), |
635 | this, SLOT( printCal() ) ); | 636 | this, SLOT( printCal() ) ); |
636 | 637 | ||
637 | icon = loadPixmap( pathString + "print" ); | 638 | icon = loadPixmap( pathString + "print" ); |
638 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 639 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
639 | action->addTo( importMenu ); | 640 | action->addTo( importMenu ); |
640 | connect( action, SIGNAL( activated() ), | 641 | connect( action, SIGNAL( activated() ), |
641 | this, SLOT( printSel() ) ); | 642 | this, SLOT( printSel() ) ); |
642 | #endif | 643 | #endif |
643 | importMenu->insertSeparator(); | 644 | importMenu->insertSeparator(); |
644 | action = new QAction( "beam all", i18n("Save"), 0, | 645 | action = new QAction( "beam all", i18n("Save"), 0, |
645 | this ); | 646 | this ); |
646 | action->addTo( importMenu ); | 647 | action->addTo( importMenu ); |
647 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 648 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
648 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 649 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
649 | this ); | 650 | this ); |
650 | action->addTo( importMenu ); | 651 | action->addTo( importMenu ); |
651 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 652 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
652 | 653 | ||
653 | //menuBar->insertItem( "Configure",configureMenu ); | 654 | //menuBar->insertItem( "Configure",configureMenu ); |
654 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 655 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
655 | icon = loadPixmap( "korganizer/korganizer" ); | 656 | icon = loadPixmap( "korganizer/korganizer" ); |
656 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 657 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
657 | action->addTo( helpMenu ); | 658 | action->addTo( helpMenu ); |
658 | connect( action, SIGNAL( activated() ), | 659 | connect( action, SIGNAL( activated() ), |
659 | SLOT( keyBindings() ) ); | 660 | SLOT( keyBindings() ) ); |
660 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 661 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
661 | action->addTo( helpMenu ); | 662 | action->addTo( helpMenu ); |
662 | connect( action, SIGNAL( activated() ), | 663 | connect( action, SIGNAL( activated() ), |
663 | SLOT( features() ) ); | 664 | SLOT( features() ) ); |
664 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 665 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
665 | action->addTo( helpMenu ); | 666 | action->addTo( helpMenu ); |
666 | connect( action, SIGNAL( activated() ), | 667 | connect( action, SIGNAL( activated() ), |
667 | SLOT( aboutAutoSaving() ) ); | 668 | SLOT( aboutAutoSaving() ) ); |
668 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 669 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
669 | action->addTo( helpMenu ); | 670 | action->addTo( helpMenu ); |
670 | connect( action, SIGNAL( activated() ), | 671 | connect( action, SIGNAL( activated() ), |
671 | SLOT( aboutKnownBugs() ) ); | 672 | SLOT( aboutKnownBugs() ) ); |
672 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 673 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
673 | action->addTo( helpMenu ); | 674 | action->addTo( helpMenu ); |
674 | connect( action, SIGNAL( activated() ), | 675 | connect( action, SIGNAL( activated() ), |
675 | SLOT( usertrans() ) ); | 676 | SLOT( usertrans() ) ); |
676 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 677 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
677 | action->addTo( helpMenu ); | 678 | action->addTo( helpMenu ); |
678 | connect( action, SIGNAL( activated() ), | 679 | connect( action, SIGNAL( activated() ), |
679 | SLOT( synchowto() ) ); | 680 | SLOT( synchowto() ) ); |
680 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 681 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
681 | action->addTo( helpMenu ); | 682 | action->addTo( helpMenu ); |
682 | connect( action, SIGNAL( activated() ), | 683 | connect( action, SIGNAL( activated() ), |
683 | SLOT( whatsNew() ) ); | 684 | SLOT( whatsNew() ) ); |
684 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 685 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
685 | action->addTo( helpMenu ); | 686 | action->addTo( helpMenu ); |
686 | connect( action, SIGNAL( activated() ), | 687 | connect( action, SIGNAL( activated() ), |
687 | SLOT( faq() ) ); | 688 | SLOT( faq() ) ); |
688 | 689 | ||
689 | 690 | ||
690 | action = new QAction( "about", i18n("About..."), 0, this ); | 691 | action = new QAction( "about", i18n("About..."), 0, this ); |
691 | action->addTo( helpMenu ); | 692 | action->addTo( helpMenu ); |
692 | connect( action, SIGNAL( activated() ), | 693 | connect( action, SIGNAL( activated() ), |
693 | SLOT( about() ) ); | 694 | SLOT( about() ) ); |
695 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | ||
696 | action->addTo( helpMenu ); | ||
697 | connect( action, SIGNAL( activated() ), | ||
698 | SLOT( licence() ) ); | ||
694 | //menuBar->insertSeparator(); | 699 | //menuBar->insertSeparator(); |
695 | 700 | ||
696 | // ****************************************************** | 701 | // ****************************************************** |
697 | // menubar icons | 702 | // menubar icons |
698 | 703 | ||
699 | 704 | ||
700 | iconToolBar->setHorizontalStretchable (true ); | 705 | iconToolBar->setHorizontalStretchable (true ); |
701 | //menuBar->insertItem( iconToolBar ); | 706 | //menuBar->insertItem( iconToolBar ); |
702 | //xdays_action | 707 | //xdays_action |
703 | if (p-> mShowIconNewEvent) | 708 | if (p-> mShowIconNewEvent) |
704 | ne_action->addTo( iconToolBar ); | 709 | ne_action->addTo( iconToolBar ); |
705 | if (p->mShowIconNewTodo ) | 710 | if (p->mShowIconNewTodo ) |
706 | nt_action->addTo( iconToolBar ); | 711 | nt_action->addTo( iconToolBar ); |
707 | if (p-> mShowIconSearch) | 712 | if (p-> mShowIconSearch) |
708 | search_action->addTo( iconToolBar ); | 713 | search_action->addTo( iconToolBar ); |
709 | if (p-> mShowIconNext) | 714 | if (p-> mShowIconNext) |
710 | whatsnext_action->addTo( iconToolBar ); | 715 | whatsnext_action->addTo( iconToolBar ); |
711 | if (p-> mShowIconNextDays) | 716 | if (p-> mShowIconNextDays) |
712 | xdays_action->addTo( iconToolBar ); | 717 | xdays_action->addTo( iconToolBar ); |
713 | if (p-> mShowIconList) | 718 | if (p-> mShowIconList) |
714 | showlist_action->addTo( iconToolBar ); | 719 | showlist_action->addTo( iconToolBar ); |
715 | if (p-> mShowIconDay1) | 720 | if (p-> mShowIconDay1) |
716 | day1_action->addTo( iconToolBar ); | 721 | day1_action->addTo( iconToolBar ); |
717 | if (p-> mShowIconDay5) | 722 | if (p-> mShowIconDay5) |
718 | day5_action->addTo( iconToolBar ); | 723 | day5_action->addTo( iconToolBar ); |
719 | if (p-> mShowIconDay7) | 724 | if (p-> mShowIconDay7) |
720 | day7_action->addTo( iconToolBar ); | 725 | day7_action->addTo( iconToolBar ); |
721 | if (p-> mShowIconMonth) | 726 | if (p-> mShowIconMonth) |
722 | month_action->addTo( iconToolBar ); | 727 | month_action->addTo( iconToolBar ); |
723 | if (p-> mShowIconTodoview) | 728 | if (p-> mShowIconTodoview) |
724 | todoview_action->addTo( iconToolBar ); | 729 | todoview_action->addTo( iconToolBar ); |
725 | if (p-> mShowIconJournal) | 730 | if (p-> mShowIconJournal) |
726 | viewjournal_action->addTo( iconToolBar ); | 731 | viewjournal_action->addTo( iconToolBar ); |
727 | icon = loadPixmap( pathString + "2leftarrowB" ); | 732 | icon = loadPixmap( pathString + "2leftarrowB" ); |
728 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 733 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); |
729 | if (p-> mShowIconBackFast) { | 734 | if (p-> mShowIconBackFast) { |
730 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 735 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
731 | connect( action, SIGNAL( activated() ), | 736 | connect( action, SIGNAL( activated() ), |
732 | mView, SLOT( goPreviousMonth() ) ); | 737 | mView, SLOT( goPreviousMonth() ) ); |
733 | action->addTo( iconToolBar ); | 738 | action->addTo( iconToolBar ); |
734 | } | 739 | } |
735 | icon = loadPixmap( pathString + "1leftarrowB" ); | 740 | icon = loadPixmap( pathString + "1leftarrowB" ); |
736 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 741 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); |
737 | if (p-> mShowIconBack) { | 742 | if (p-> mShowIconBack) { |
738 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 743 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
739 | connect( action, SIGNAL( activated() ), | 744 | connect( action, SIGNAL( activated() ), |
740 | mView, SLOT( goPrevious() ) ); | 745 | mView, SLOT( goPrevious() ) ); |
741 | action->addTo( iconToolBar ); | 746 | action->addTo( iconToolBar ); |
742 | } | 747 | } |
743 | if (p-> mShowIconToday) | 748 | if (p-> mShowIconToday) |
744 | today_action->addTo( iconToolBar ); | 749 | today_action->addTo( iconToolBar ); |
745 | icon = loadPixmap( pathString + "1rightarrowB" ); | 750 | icon = loadPixmap( pathString + "1rightarrowB" ); |
746 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 751 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
747 | if (p-> mShowIconForward) { | 752 | if (p-> mShowIconForward) { |
748 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 753 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
749 | connect( action, SIGNAL( activated() ), | 754 | connect( action, SIGNAL( activated() ), |
750 | mView, SLOT( goNext() ) ); | 755 | mView, SLOT( goNext() ) ); |
751 | action->addTo( iconToolBar ); | 756 | action->addTo( iconToolBar ); |
752 | } | 757 | } |
753 | icon = loadPixmap( pathString + "2rightarrowB" ); | 758 | icon = loadPixmap( pathString + "2rightarrowB" ); |
754 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 759 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
755 | if (p-> mShowIconForwardFast) { | 760 | if (p-> mShowIconForwardFast) { |
756 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 761 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
757 | connect( action, SIGNAL( activated() ), | 762 | connect( action, SIGNAL( activated() ), |
758 | mView, SLOT( goNextMonth() ) ); | 763 | mView, SLOT( goNextMonth() ) ); |
759 | action->addTo( iconToolBar ); | 764 | action->addTo( iconToolBar ); |
760 | } | 765 | } |
761 | 766 | ||
762 | 767 | ||
763 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 768 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); |
764 | 769 | ||
765 | if (p-> mShowIconNewEvent) | 770 | if (p-> mShowIconNewEvent) |
766 | configureToolBarMenu->setItemChecked( 10, true ); | 771 | configureToolBarMenu->setItemChecked( 10, true ); |
767 | if (p->mShowIconNewTodo ) | 772 | if (p->mShowIconNewTodo ) |
768 | configureToolBarMenu->setItemChecked( 20, true ); | 773 | configureToolBarMenu->setItemChecked( 20, true ); |
769 | if (p-> mShowIconSearch) | 774 | if (p-> mShowIconSearch) |
770 | configureToolBarMenu->setItemChecked( 120, true ); | 775 | configureToolBarMenu->setItemChecked( 120, true ); |
771 | if (p-> mShowIconList) | 776 | if (p-> mShowIconList) |
772 | configureToolBarMenu->setItemChecked( 30, true ); | 777 | configureToolBarMenu->setItemChecked( 30, true ); |
773 | if (p-> mShowIconDay1) | 778 | if (p-> mShowIconDay1) |
774 | configureToolBarMenu->setItemChecked( 40, true ); | 779 | configureToolBarMenu->setItemChecked( 40, true ); |
775 | if (p-> mShowIconDay5) | 780 | if (p-> mShowIconDay5) |
776 | configureToolBarMenu->setItemChecked( 50, true ); | 781 | configureToolBarMenu->setItemChecked( 50, true ); |
777 | if (p-> mShowIconDay7) | 782 | if (p-> mShowIconDay7) |
778 | configureToolBarMenu->setItemChecked( 60, true ); | 783 | configureToolBarMenu->setItemChecked( 60, true ); |
779 | if (p-> mShowIconMonth) | 784 | if (p-> mShowIconMonth) |
780 | configureToolBarMenu->setItemChecked( 70, true ); | 785 | configureToolBarMenu->setItemChecked( 70, true ); |
781 | if (p-> mShowIconTodoview) | 786 | if (p-> mShowIconTodoview) |
782 | configureToolBarMenu->setItemChecked( 80, true ); | 787 | configureToolBarMenu->setItemChecked( 80, true ); |
783 | if (p-> mShowIconBackFast) | 788 | if (p-> mShowIconBackFast) |
784 | configureToolBarMenu->setItemChecked( 200, true ); | 789 | configureToolBarMenu->setItemChecked( 200, true ); |
785 | if (p-> mShowIconBack) | 790 | if (p-> mShowIconBack) |
786 | configureToolBarMenu->setItemChecked( 210, true ); | 791 | configureToolBarMenu->setItemChecked( 210, true ); |
787 | if (p-> mShowIconToday) | 792 | if (p-> mShowIconToday) |
788 | configureToolBarMenu->setItemChecked( 130, true ); | 793 | configureToolBarMenu->setItemChecked( 130, true ); |
789 | if (p-> mShowIconForward) | 794 | if (p-> mShowIconForward) |
790 | configureToolBarMenu->setItemChecked( 220, true ); | 795 | configureToolBarMenu->setItemChecked( 220, true ); |
791 | if (p-> mShowIconForwardFast) | 796 | if (p-> mShowIconForwardFast) |
792 | configureToolBarMenu->setItemChecked( 230, true ); | 797 | configureToolBarMenu->setItemChecked( 230, true ); |
793 | if (p-> mShowIconNextDays) | 798 | if (p-> mShowIconNextDays) |
794 | configureToolBarMenu->setItemChecked( 100, true ); | 799 | configureToolBarMenu->setItemChecked( 100, true ); |
795 | if (p-> mShowIconNext) | 800 | if (p-> mShowIconNext) |
796 | configureToolBarMenu->setItemChecked( 110, true ); | 801 | configureToolBarMenu->setItemChecked( 110, true ); |
797 | if (p-> mShowIconJournal) | 802 | if (p-> mShowIconJournal) |
798 | configureToolBarMenu->setItemChecked( 90, true ); | 803 | configureToolBarMenu->setItemChecked( 90, true ); |
799 | if (p-> mShowIconWhatsThis) | 804 | if (p-> mShowIconWhatsThis) |
800 | configureToolBarMenu->setItemChecked( 300, true ); | 805 | configureToolBarMenu->setItemChecked( 300, true ); |
801 | 806 | ||
802 | QLabel* dummy = new QLabel( iconToolBar ); | 807 | QLabel* dummy = new QLabel( iconToolBar ); |
803 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 808 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
804 | if (!p-> mShowIconStretch) | 809 | if (!p-> mShowIconStretch) |
805 | iconToolBar->setStretchableWidget ( dummy ) ; | 810 | iconToolBar->setStretchableWidget ( dummy ) ; |
806 | else | 811 | else |
807 | configureToolBarMenu->setItemChecked( 5, true ); | 812 | configureToolBarMenu->setItemChecked( 5, true ); |
808 | if (p-> mShowIconWhatsThis) | 813 | if (p-> mShowIconWhatsThis) |
809 | QWhatsThis::whatsThisButton ( iconToolBar ); | 814 | QWhatsThis::whatsThisButton ( iconToolBar ); |
810 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 815 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
811 | configureAgenda( p->mHourSize ); | 816 | configureAgenda( p->mHourSize ); |
812 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 817 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
813 | } | 818 | } |
814 | void MainWindow::fillSyncMenu() | 819 | void MainWindow::fillSyncMenu() |
815 | { | 820 | { |
816 | syncMenu->clear(); | 821 | syncMenu->clear(); |
817 | syncMenu->insertItem( i18n("Configure..."), 0 ); | 822 | syncMenu->insertItem( i18n("Configure..."), 0 ); |
818 | syncMenu->insertSeparator(); | 823 | syncMenu->insertSeparator(); |
819 | syncMenu->insertItem( i18n("Multiple sync"), 1 ); | 824 | syncMenu->insertItem( i18n("Multiple sync"), 1 ); |
820 | syncMenu->insertSeparator(); | 825 | syncMenu->insertSeparator(); |
821 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 826 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
822 | config.setGroup("General"); | 827 | config.setGroup("General"); |
823 | QStringList prof = config.readListEntry("SyncProfileNames"); | 828 | QStringList prof = config.readListEntry("SyncProfileNames"); |
824 | KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined"); | 829 | KOPrefs::instance()->mLocalMachineName = config.readEntry("LocalMachineName","undefined"); |
825 | if ( prof.count() < 3 ) { | 830 | if ( prof.count() < 3 ) { |
826 | prof.clear(); | 831 | prof.clear(); |
827 | prof << i18n("Sharp_DTM"); | 832 | prof << i18n("Sharp_DTM"); |
828 | prof << i18n("Local_file"); | 833 | prof << i18n("Local_file"); |
829 | prof << i18n("Last_file"); | 834 | prof << i18n("Last_file"); |
830 | KSyncProfile* temp = new KSyncProfile (); | 835 | KSyncProfile* temp = new KSyncProfile (); |
831 | temp->setName( prof[0] ); | 836 | temp->setName( prof[0] ); |
832 | temp->writeConfig(&config); | 837 | temp->writeConfig(&config); |
833 | temp->setName( prof[1] ); | 838 | temp->setName( prof[1] ); |
834 | temp->writeConfig(&config); | 839 | temp->writeConfig(&config); |
835 | temp->setName( prof[2] ); | 840 | temp->setName( prof[2] ); |
836 | temp->writeConfig(&config); | 841 | temp->writeConfig(&config); |
837 | config.setGroup("General"); | 842 | config.setGroup("General"); |
838 | config.writeEntry("SyncProfileNames",prof); | 843 | config.writeEntry("SyncProfileNames",prof); |
839 | config.writeEntry("ExternSyncProfiles","Sharp_DTM"); | 844 | config.writeEntry("ExternSyncProfiles","Sharp_DTM"); |
840 | config.sync(); | 845 | config.sync(); |
841 | delete temp; | 846 | delete temp; |
842 | } | 847 | } |
843 | KOPrefs::instance()->mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); | 848 | KOPrefs::instance()->mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); |
844 | KOPrefs::instance()->mSyncProfileNames = prof; | 849 | KOPrefs::instance()->mSyncProfileNames = prof; |
845 | int i; | 850 | int i; |
846 | for ( i = 0; i < prof.count(); ++i ) { | 851 | for ( i = 0; i < prof.count(); ++i ) { |
847 | 852 | ||
848 | syncMenu->insertItem( prof[i], 1000+i ); | 853 | syncMenu->insertItem( prof[i], 1000+i ); |
849 | if ( i == 2 ) | 854 | if ( i == 2 ) |
850 | syncMenu->insertSeparator(); | 855 | syncMenu->insertSeparator(); |
851 | } | 856 | } |
852 | QDir app_dir; | 857 | QDir app_dir; |
853 | if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { | 858 | if ( !app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { |
854 | syncMenu->setItemEnabled( false , 1000 ); | 859 | syncMenu->setItemEnabled( false , 1000 ); |
855 | } | 860 | } |
856 | mView->setupExternSyncProfiles(); | 861 | mView->setupExternSyncProfiles(); |
857 | } | 862 | } |
858 | 863 | ||
859 | int MainWindow::ringSync() | 864 | int MainWindow::ringSync() |
860 | { | 865 | { |
861 | int syncedProfiles = 0; | 866 | int syncedProfiles = 0; |
862 | int i; | 867 | int i; |
863 | QTime timer; | 868 | QTime timer; |
864 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 869 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
865 | QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; | 870 | QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; |
866 | KSyncProfile* temp = new KSyncProfile (); | 871 | KSyncProfile* temp = new KSyncProfile (); |
867 | KOPrefs::instance()->mAskForPreferences = false; | 872 | KOPrefs::instance()->mAskForPreferences = false; |
868 | for ( i = 0; i < syncProfileNames.count(); ++i ) { | 873 | for ( i = 0; i < syncProfileNames.count(); ++i ) { |
869 | mCurrentSyncProfile = i; | 874 | mCurrentSyncProfile = i; |
870 | temp->setName(syncProfileNames[mCurrentSyncProfile]); | 875 | temp->setName(syncProfileNames[mCurrentSyncProfile]); |
871 | temp->readConfig(&config); | 876 | temp->readConfig(&config); |
872 | if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) { | 877 | if ( temp->getIncludeInRingSync() && ( i < 1 || i > 2 )) { |
873 | setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); | 878 | setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); |
874 | ++syncedProfiles; | 879 | ++syncedProfiles; |
875 | // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); | 880 | // KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); |
876 | KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); | 881 | KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); |
877 | KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); | 882 | KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); |
878 | KOPrefs::instance()->mShowSyncSummary = false; | 883 | KOPrefs::instance()->mShowSyncSummary = false; |
879 | mView->setSyncDevice(syncProfileNames[i] ); | 884 | mView->setSyncDevice(syncProfileNames[i] ); |
880 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); | 885 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); |
881 | if ( i == 0 ) { | 886 | if ( i == 0 ) { |
882 | syncSharp(); | 887 | syncSharp(); |
883 | } else { | 888 | } else { |
884 | if ( temp->getIsLocalFileSync() ) { | 889 | if ( temp->getIsLocalFileSync() ) { |
885 | if ( syncWithFile( temp->getRemoteFileName( ), true ) ) | 890 | if ( syncWithFile( temp->getRemoteFileName( ), true ) ) |
886 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); | 891 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); |
887 | } else { | 892 | } else { |
888 | syncRemote( temp, false ); | 893 | syncRemote( temp, false ); |
889 | 894 | ||
890 | } | 895 | } |
891 | } | 896 | } |
892 | timer.start(); | 897 | timer.start(); |
893 | setCaption(i18n("Multiple sync in progress ... please wait!") ); | 898 | setCaption(i18n("Multiple sync in progress ... please wait!") ); |
894 | while ( timer.elapsed () < 2000 ) { | 899 | while ( timer.elapsed () < 2000 ) { |
895 | qApp->processEvents(); | 900 | qApp->processEvents(); |
896 | #ifndef _WIN32_ | 901 | #ifndef _WIN32_ |
897 | sleep (1); | 902 | sleep (1); |
898 | #endif | 903 | #endif |
899 | } | 904 | } |
900 | 905 | ||
901 | } | 906 | } |
902 | 907 | ||
903 | } | 908 | } |
904 | delete temp; | 909 | delete temp; |
905 | return syncedProfiles; | 910 | return syncedProfiles; |
906 | } | 911 | } |
907 | 912 | ||
908 | void MainWindow::multiSync( bool askforPrefs ) | 913 | void MainWindow::multiSync( bool askforPrefs ) |
909 | { | 914 | { |
910 | if (mBlockSaveFlag) | 915 | if (mBlockSaveFlag) |
911 | return; | 916 | return; |
912 | mBlockSaveFlag = true; | 917 | mBlockSaveFlag = true; |
913 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | 918 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); |
914 | if ( QMessageBox::information( this, i18n("KO/Pi Sync"), | 919 | if ( QMessageBox::information( this, i18n("KO/Pi Sync"), |
915 | question, | 920 | question, |
916 | i18n("Yes"), i18n("No"), | 921 | i18n("Yes"), i18n("No"), |
917 | 0, 0 ) != 0 ) { | 922 | 0, 0 ) != 0 ) { |
918 | mBlockSaveFlag = false; | 923 | mBlockSaveFlag = false; |
919 | setCaption(i18n("Aborted! Nothing synced!")); | 924 | setCaption(i18n("Aborted! Nothing synced!")); |
920 | return; | 925 | return; |
921 | } | 926 | } |
922 | mView->setSyncDevice(i18n("Multiple profiles") ); | 927 | mView->setSyncDevice(i18n("Multiple profiles") ); |
923 | KOPrefs::instance()->mSyncAlgoPrefs = KOPrefs::instance()->mRingSyncAlgoPrefs; | 928 | KOPrefs::instance()->mSyncAlgoPrefs = KOPrefs::instance()->mRingSyncAlgoPrefs; |
924 | if ( askforPrefs ) { | 929 | if ( askforPrefs ) { |
925 | mView->edit_sync_options(); | 930 | mView->edit_sync_options(); |
926 | KOPrefs::instance()->mRingSyncAlgoPrefs = KOPrefs::instance()->mSyncAlgoPrefs; | 931 | KOPrefs::instance()->mRingSyncAlgoPrefs = KOPrefs::instance()->mSyncAlgoPrefs; |
927 | } | 932 | } |
928 | setCaption(i18n("Multiple sync started.") ); | 933 | setCaption(i18n("Multiple sync started.") ); |
929 | qApp->processEvents(); | 934 | qApp->processEvents(); |
930 | int num = ringSync() ; | 935 | int num = ringSync() ; |
931 | if ( num > 1 ) | 936 | if ( num > 1 ) |
932 | ringSync(); | 937 | ringSync(); |
933 | mBlockSaveFlag = false; | 938 | mBlockSaveFlag = false; |
934 | if ( num ) | 939 | if ( num ) |
935 | save(); | 940 | save(); |
936 | if ( num ) | 941 | if ( num ) |
937 | setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) ); | 942 | setCaption(i18n("%1 profiles synced. Multiple sync completed!").arg(num) ); |
938 | else | 943 | else |
939 | setCaption(i18n("Nothing synced! No profiles defined for multisync!")); | 944 | setCaption(i18n("Nothing synced! No profiles defined for multisync!")); |
940 | return; | 945 | return; |
941 | } | 946 | } |
942 | void MainWindow::slotSyncMenu( int action ) | 947 | void MainWindow::slotSyncMenu( int action ) |
943 | { | 948 | { |
944 | //qDebug("syncaction %d ", action); | 949 | //qDebug("syncaction %d ", action); |
945 | if ( action == 0 ) { | 950 | if ( action == 0 ) { |
946 | 951 | ||
947 | confSync(); | 952 | confSync(); |
948 | 953 | ||
949 | return; | 954 | return; |
950 | } | 955 | } |
951 | if ( action == 1 ) { | 956 | if ( action == 1 ) { |
952 | multiSync( true ); | 957 | multiSync( true ); |
953 | return; | 958 | return; |
954 | } | 959 | } |
955 | 960 | ||
956 | if (mBlockSaveFlag) | 961 | if (mBlockSaveFlag) |
957 | return; | 962 | return; |
958 | mBlockSaveFlag = true; | 963 | mBlockSaveFlag = true; |
959 | mCurrentSyncProfile = action - 1000 ; | 964 | mCurrentSyncProfile = action - 1000 ; |
960 | mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] ); | 965 | mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] ); |
961 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); | 966 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); |
962 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 967 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
963 | KSyncProfile* temp = new KSyncProfile (); | 968 | KSyncProfile* temp = new KSyncProfile (); |
964 | temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); | 969 | temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); |
965 | temp->readConfig(&config); | 970 | temp->readConfig(&config); |
966 | KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); | 971 | KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); |
967 | KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); | 972 | KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); |
968 | KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); | 973 | KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); |
969 | KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); | 974 | KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); |
970 | KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); | 975 | KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); |
971 | if ( action == 1000 ) { | 976 | if ( action == 1000 ) { |
972 | syncSharp(); | 977 | syncSharp(); |
973 | 978 | ||
974 | } else if ( action == 1001 ) { | 979 | } else if ( action == 1001 ) { |
975 | syncLocalFile(); | 980 | syncLocalFile(); |
976 | 981 | ||
977 | } else if ( action == 1002 ) { | 982 | } else if ( action == 1002 ) { |
978 | quickSyncLocalFile(); | 983 | quickSyncLocalFile(); |
979 | 984 | ||
980 | } else if ( action >= 1003 ) { | 985 | } else if ( action >= 1003 ) { |
981 | if ( temp->getIsLocalFileSync() ) { | 986 | if ( temp->getIsLocalFileSync() ) { |
982 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) | 987 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) |
983 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); | 988 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); |
984 | } else { | 989 | } else { |
985 | syncRemote( temp ); | 990 | syncRemote( temp ); |
986 | 991 | ||
987 | } | 992 | } |
988 | } | 993 | } |
989 | delete temp; | 994 | delete temp; |
990 | mBlockSaveFlag = false; | 995 | mBlockSaveFlag = false; |
991 | } | 996 | } |
992 | void MainWindow::setDefaultPreferences() | 997 | void MainWindow::setDefaultPreferences() |
993 | { | 998 | { |
994 | KOPrefs *p = KOPrefs::instance(); | 999 | KOPrefs *p = KOPrefs::instance(); |
995 | 1000 | ||
996 | p->mCompactDialogs = true; | 1001 | p->mCompactDialogs = true; |
997 | p->mConfirm = true; | 1002 | p->mConfirm = true; |
998 | // p->mEnableQuickTodo = false; | 1003 | // p->mEnableQuickTodo = false; |
999 | } | 1004 | } |
1000 | 1005 | ||
1001 | QString MainWindow::resourcePath() | 1006 | QString MainWindow::resourcePath() |
1002 | { | 1007 | { |
1003 | return KGlobal::iconLoader()->iconPath(); | 1008 | return KGlobal::iconLoader()->iconPath(); |
1004 | } | 1009 | } |
1005 | 1010 | ||
1006 | void MainWindow::displayText( QString text ,QString cap ) | 1011 | void MainWindow::displayText( QString text ,QString cap ) |
1007 | { | 1012 | { |
1008 | QDialog dia( this, "name", true ); ; | 1013 | QDialog dia( this, "name", true ); ; |
1009 | dia.setCaption( cap ); | 1014 | dia.setCaption( cap ); |
1010 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1015 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1011 | lay->setSpacing( 3 ); | 1016 | lay->setSpacing( 3 ); |
1012 | lay->setMargin( 3 ); | 1017 | lay->setMargin( 3 ); |
1013 | QTextBrowser tb ( &dia ); | 1018 | QTextBrowser tb ( &dia ); |
1014 | lay->addWidget( &tb ); | 1019 | lay->addWidget( &tb ); |
1015 | tb.setText( text ); | 1020 | tb.setText( text ); |
1016 | #ifdef DESKTOP_VERSION | 1021 | #ifdef DESKTOP_VERSION |
1017 | dia.resize( 640, 480); | 1022 | dia.resize( 640, 480); |
1018 | #else | 1023 | #else |
1019 | dia.showMaximized(); | 1024 | dia.showMaximized(); |
1020 | #endif | 1025 | #endif |
1021 | dia.exec(); | 1026 | dia.exec(); |
1022 | } | 1027 | } |
1023 | void MainWindow::displayFile( QString fn, QString cap ) | 1028 | void MainWindow::displayFile( QString fn, QString cap ) |
1024 | { | 1029 | { |
1025 | QString fileName = resourcePath() + fn; | 1030 | QString fileName = resourcePath() + fn; |
1026 | QString text; | 1031 | QString text; |
1027 | QFile file( fileName ); | 1032 | QFile file( fileName ); |
1028 | if (!file.open( IO_ReadOnly ) ) { | 1033 | if (!file.open( IO_ReadOnly ) ) { |
1029 | return ; | 1034 | return ; |
1030 | 1035 | ||
1031 | } | 1036 | } |
1032 | QTextStream ts( &file ); | 1037 | QTextStream ts( &file ); |
1033 | text = ts.read(); | 1038 | text = ts.read(); |
1034 | file.close(); | 1039 | file.close(); |
1035 | displayText( text, cap); | 1040 | displayText( text, cap); |
1036 | } | 1041 | } |
1037 | void MainWindow::features() | 1042 | void MainWindow::features() |
1038 | { | 1043 | { |
1039 | 1044 | ||
1040 | displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); | 1045 | displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); |
1041 | } | 1046 | } |
1042 | 1047 | ||
1043 | void MainWindow::usertrans() | 1048 | void MainWindow::usertrans() |
1044 | { | 1049 | { |
1045 | 1050 | ||
1046 | displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); | 1051 | displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); |
1047 | } | 1052 | } |
1048 | void MainWindow::synchowto() | 1053 | void MainWindow::synchowto() |
1049 | { | 1054 | { |
1050 | 1055 | ||
1051 | displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); | 1056 | displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); |
1052 | } | 1057 | } |
1053 | void MainWindow::faq() | 1058 | void MainWindow::faq() |
1054 | { | 1059 | { |
1055 | displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); | 1060 | displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") ); |
1056 | 1061 | ||
1057 | } | 1062 | } |
1058 | void MainWindow::whatsNew() | 1063 | void MainWindow::whatsNew() |
1059 | { | 1064 | { |
1060 | displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") ); | 1065 | displayFile( "kopiWhatsNew.txt",i18n("KO/Pi Version Info") ); |
1061 | 1066 | ||
1062 | } | 1067 | } |
1068 | void MainWindow::licence() | ||
1069 | { | ||
1070 | KApplication::showLicence(); | ||
1071 | |||
1072 | } | ||
1063 | void MainWindow::about() | 1073 | void MainWindow::about() |
1064 | { | 1074 | { |
1065 | QString version; | 1075 | QString version; |
1066 | #include <../version> | 1076 | #include <../version> |
1067 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1077 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1068 | i18n("KOrganizer/Platform-independent\n") + | 1078 | i18n("KOrganizer/Platform-independent\n") + |
1069 | "(KO/Pi) " + version + " - " + | 1079 | "(KO/Pi) " + version + " - " + |
1070 | 1080 | ||
1071 | #ifdef DESKTOP_VERSION | 1081 | #ifdef DESKTOP_VERSION |
1072 | i18n("Desktop Edition\n") + | 1082 | i18n("Desktop Edition\n") + |
1073 | #else | 1083 | #else |
1074 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + | 1084 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + |
1075 | #endif | 1085 | #endif |
1076 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); | 1086 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); |
1077 | } | 1087 | } |
1078 | void MainWindow::keyBindings() | 1088 | void MainWindow::keyBindings() |
1079 | { | 1089 | { |
1080 | QString cap = i18n("Key bindings KOrganizer/Pi"); | 1090 | QString cap = i18n("Key bindings KOrganizer/Pi"); |
1081 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1091 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1082 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1092 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1083 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1093 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1084 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1094 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1085 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1095 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1086 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1096 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1087 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1097 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1088 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1098 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1089 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1099 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1090 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1100 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1091 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1101 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1092 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1102 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1093 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1103 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1094 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1104 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1095 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1105 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1096 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1106 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1097 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1107 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1098 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1108 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1099 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1109 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1100 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1110 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1101 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1111 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1102 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1112 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1103 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1113 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1104 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1114 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1105 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1115 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1106 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1116 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1107 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1117 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1108 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1118 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1109 | i18n("<p><h3>In list view:</h3></p>\n") + | 1119 | i18n("<p><h3>In list view:</h3></p>\n") + |
1110 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1120 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1111 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1121 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1112 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1122 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1113 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1123 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1114 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1124 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1115 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1125 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1116 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1126 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1117 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1127 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1118 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1128 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1119 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1129 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1120 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1130 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1121 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1131 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1122 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1132 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1123 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1133 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1124 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1134 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1125 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1135 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1126 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1136 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1127 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1137 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1128 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1138 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1129 | displayText( text, cap); | 1139 | displayText( text, cap); |
1130 | 1140 | ||
1131 | } | 1141 | } |
1132 | void MainWindow::aboutAutoSaving() | 1142 | void MainWindow::aboutAutoSaving() |
1133 | { | 1143 | { |
1134 | QMessageBox* msg; | 1144 | QMessageBox* msg; |
1135 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), | 1145 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), |
1136 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, | 1146 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, |
1137 | QMessageBox::Ok, | 1147 | QMessageBox::Ok, |
1138 | QMessageBox::NoButton, | 1148 | QMessageBox::NoButton, |
1139 | QMessageBox::NoButton); | 1149 | QMessageBox::NoButton); |
1140 | msg->exec(); | 1150 | msg->exec(); |
1141 | delete msg; | 1151 | delete msg; |
1142 | 1152 | ||
1143 | 1153 | ||
1144 | } | 1154 | } |
1145 | void MainWindow::aboutKnownBugs() | 1155 | void MainWindow::aboutKnownBugs() |
1146 | { | 1156 | { |
1147 | QMessageBox* msg; | 1157 | QMessageBox* msg; |
1148 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1158 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1149 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1159 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1150 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1160 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1151 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + | 1161 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + |
1152 | i18n("\nor report them in the bugtracker on\n") + | 1162 | i18n("\nor report them in the bugtracker on\n") + |
1153 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), | 1163 | i18n("\nhttp://sourceforge.net/projects/kdepimpi\n"), |
1154 | QMessageBox::NoIcon, | 1164 | QMessageBox::NoIcon, |
1155 | QMessageBox::Ok, | 1165 | QMessageBox::Ok, |
1156 | QMessageBox::NoButton, | 1166 | QMessageBox::NoButton, |
1157 | QMessageBox::NoButton); | 1167 | QMessageBox::NoButton); |
1158 | msg->exec(); | 1168 | msg->exec(); |
1159 | delete msg; | 1169 | delete msg; |
1160 | 1170 | ||
1161 | } | 1171 | } |
1162 | 1172 | ||
1163 | QString MainWindow::defaultFileName() | 1173 | QString MainWindow::defaultFileName() |
1164 | { | 1174 | { |
1165 | return locateLocal( "data", "korganizer/mycalendar.ics" ); | 1175 | return locateLocal( "data", "korganizer/mycalendar.ics" ); |
1166 | } | 1176 | } |
1167 | 1177 | ||
1168 | void MainWindow::processIncidenceSelection( Incidence *incidence ) | 1178 | void MainWindow::processIncidenceSelection( Incidence *incidence ) |
1169 | { | 1179 | { |
1170 | if ( !incidence ) { | 1180 | if ( !incidence ) { |
1171 | enableIncidenceActions( false ); | 1181 | enableIncidenceActions( false ); |
1172 | 1182 | ||
1173 | mNewSubTodoAction->setEnabled( false ); | 1183 | mNewSubTodoAction->setEnabled( false ); |
1174 | setCaptionToDates(); | 1184 | setCaptionToDates(); |
1175 | return; | 1185 | return; |
1176 | 1186 | ||
1177 | } | 1187 | } |
1178 | 1188 | ||
1179 | //KGlobal::locale()->formatDateTime(nextA, true); | 1189 | //KGlobal::locale()->formatDateTime(nextA, true); |
1180 | QString startString = ""; | 1190 | QString startString = ""; |
1181 | if ( incidence->type() != "Todo" ) { | 1191 | if ( incidence->type() != "Todo" ) { |
1182 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1192 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1183 | if ( incidence->doesFloat() ) { | 1193 | if ( incidence->doesFloat() ) { |
1184 | startString += ": "+incidence->dtStartDateStr( true ); | 1194 | startString += ": "+incidence->dtStartDateStr( true ); |
1185 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1195 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1186 | 1196 | ||
1187 | } else { | 1197 | } else { |
1188 | startString = ": "+incidence->dtStartStr(true); | 1198 | startString = ": "+incidence->dtStartStr(true); |
1189 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1199 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
1190 | 1200 | ||
1191 | } | 1201 | } |
1192 | 1202 | ||
1193 | } else { | 1203 | } else { |
1194 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) | 1204 | if ( incidence->dtStart().time() != incidence->dtEnd().time() ) |
1195 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ | 1205 | startString = ": "+KGlobal::locale()->formatTime(incidence->dtStart().time())+ |
1196 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1206 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1197 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1207 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1198 | } | 1208 | } |
1199 | 1209 | ||
1200 | } | 1210 | } |
1201 | else | 1211 | else |
1202 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1212 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
1203 | if ( !incidence->location().isEmpty() ) | 1213 | if ( !incidence->location().isEmpty() ) |
1204 | startString += " (" +incidence->location()+")"; | 1214 | startString += " (" +incidence->location()+")"; |
1205 | setCaption( incidence->summary()+startString); | 1215 | setCaption( incidence->summary()+startString); |
1206 | 1216 | ||
1207 | enableIncidenceActions( true ); | 1217 | enableIncidenceActions( true ); |
1208 | 1218 | ||
1209 | if ( incidence->type() == "Event" ) { | 1219 | if ( incidence->type() == "Event" ) { |
1210 | mShowAction->setText( i18n("Show Event...") ); | 1220 | mShowAction->setText( i18n("Show Event...") ); |
1211 | mEditAction->setText( i18n("Edit Event...") ); | 1221 | mEditAction->setText( i18n("Edit Event...") ); |
1212 | mDeleteAction->setText( i18n("Delete Event...") ); | 1222 | mDeleteAction->setText( i18n("Delete Event...") ); |
1213 | 1223 | ||
1214 | mNewSubTodoAction->setEnabled( false ); | 1224 | mNewSubTodoAction->setEnabled( false ); |
1215 | } else if ( incidence->type() == "Todo" ) { | 1225 | } else if ( incidence->type() == "Todo" ) { |
1216 | mShowAction->setText( i18n("Show Todo...") ); | 1226 | mShowAction->setText( i18n("Show Todo...") ); |
1217 | mEditAction->setText( i18n("Edit Todo...") ); | 1227 | mEditAction->setText( i18n("Edit Todo...") ); |
1218 | mDeleteAction->setText( i18n("Delete Todo...") ); | 1228 | mDeleteAction->setText( i18n("Delete Todo...") ); |
1219 | 1229 | ||
1220 | mNewSubTodoAction->setEnabled( true ); | 1230 | mNewSubTodoAction->setEnabled( true ); |
1221 | } else { | 1231 | } else { |
1222 | mShowAction->setText( i18n("Show...") ); | 1232 | mShowAction->setText( i18n("Show...") ); |
1223 | mShowAction->setText( i18n("Edit...") ); | 1233 | mShowAction->setText( i18n("Edit...") ); |
1224 | mShowAction->setText( i18n("Delete...") ); | 1234 | mShowAction->setText( i18n("Delete...") ); |
1225 | 1235 | ||
1226 | mNewSubTodoAction->setEnabled( false ); | 1236 | mNewSubTodoAction->setEnabled( false ); |
1227 | } | 1237 | } |
1228 | } | 1238 | } |
1229 | 1239 | ||
1230 | void MainWindow::enableIncidenceActions( bool enabled ) | 1240 | void MainWindow::enableIncidenceActions( bool enabled ) |
1231 | { | 1241 | { |
1232 | mShowAction->setEnabled( enabled ); | 1242 | mShowAction->setEnabled( enabled ); |
1233 | mEditAction->setEnabled( enabled ); | 1243 | mEditAction->setEnabled( enabled ); |
1234 | mDeleteAction->setEnabled( enabled ); | 1244 | mDeleteAction->setEnabled( enabled ); |
1235 | } | 1245 | } |
1236 | 1246 | ||
1237 | void MainWindow::importOL() | 1247 | void MainWindow::importOL() |
1238 | { | 1248 | { |
1239 | #ifdef _WIN32_ | 1249 | #ifdef _WIN32_ |
1240 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); | 1250 | KOImportOLdialog *id = new KOImportOLdialog("Import from OL - select folder!" , mView->calendar(),this ); |
1241 | id->exec(); | 1251 | id->exec(); |
1242 | delete id; | 1252 | delete id; |
1243 | mView->updateView(); | 1253 | mView->updateView(); |
1244 | #endif | 1254 | #endif |
1245 | } | 1255 | } |
1246 | void MainWindow::importBday() | 1256 | void MainWindow::importBday() |
1247 | { | 1257 | { |
1248 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1258 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
1249 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), | 1259 | i18n("When importing birthdays twice\nduplicated events will be ignored,\nif the event has not been\nchanged in KO/Pi!\n"), |
1250 | i18n("Import!"), i18n("Cancel"), 0, | 1260 | i18n("Import!"), i18n("Cancel"), 0, |
1251 | 0, 1 ); | 1261 | 0, 1 ); |
1252 | if ( result == 0 ) { | 1262 | if ( result == 0 ) { |
1253 | mView->importBday(); | 1263 | mView->importBday(); |
1254 | 1264 | ||
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a681f42..8a3f7b3 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,116 +1,117 @@ | |||
1 | #ifndef KORGE_MAINWINDOW_H | 1 | #ifndef KORGE_MAINWINDOW_H |
2 | #define KORGE_MAINWINDOW_H | 2 | #define KORGE_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <qdict.h> |
7 | 7 | ||
8 | #include <libkcal/incidence.h> | 8 | #include <libkcal/incidence.h> |
9 | #include "simplealarmclient.h" | 9 | #include "simplealarmclient.h" |
10 | 10 | ||
11 | class QAction; | 11 | class QAction; |
12 | class CalendarView; | 12 | class CalendarView; |
13 | class KSyncProfile; | 13 | class KSyncProfile; |
14 | #ifdef DESKTOP_VERSION | 14 | #ifdef DESKTOP_VERSION |
15 | 15 | ||
16 | #define QPEToolBar QToolBar | 16 | #define QPEToolBar QToolBar |
17 | #define QPEMenuBar QMenuBar | 17 | #define QPEMenuBar QMenuBar |
18 | #endif | 18 | #endif |
19 | class QPEToolBar; | 19 | class QPEToolBar; |
20 | 20 | ||
21 | namespace KCal { | 21 | namespace KCal { |
22 | class CalendarLocal; | 22 | class CalendarLocal; |
23 | } | 23 | } |
24 | 24 | ||
25 | using namespace KCal; | 25 | using namespace KCal; |
26 | 26 | ||
27 | class MainWindow : public QMainWindow | 27 | class MainWindow : public QMainWindow |
28 | { | 28 | { |
29 | Q_OBJECT | 29 | Q_OBJECT |
30 | public: | 30 | public: |
31 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 31 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
32 | ~MainWindow(); | 32 | ~MainWindow(); |
33 | public slots: | 33 | public slots: |
34 | void configureAgenda( int ); | 34 | void configureAgenda( int ); |
35 | void recieve( const QCString& msg, const QByteArray& data ); | 35 | void recieve( const QCString& msg, const QByteArray& data ); |
36 | static QString defaultFileName(); | 36 | static QString defaultFileName(); |
37 | static QString resourcePath(); | 37 | static QString resourcePath(); |
38 | protected slots: | 38 | protected slots: |
39 | void setCaptionToDates(); | 39 | void setCaptionToDates(); |
40 | int ringSync(); | 40 | int ringSync(); |
41 | void multiSync( bool askforPrefs = false ); | 41 | void multiSync( bool askforPrefs = false ); |
42 | void about(); | 42 | void about(); |
43 | void licence(); | ||
43 | void faq(); | 44 | void faq(); |
44 | void usertrans(); | 45 | void usertrans(); |
45 | void features(); | 46 | void features(); |
46 | void synchowto(); | 47 | void synchowto(); |
47 | void whatsNew(); | 48 | void whatsNew(); |
48 | void keyBindings(); | 49 | void keyBindings(); |
49 | void aboutAutoSaving();; | 50 | void aboutAutoSaving();; |
50 | void aboutKnownBugs(); | 51 | void aboutKnownBugs(); |
51 | 52 | ||
52 | void processIncidenceSelection( Incidence * ); | 53 | void processIncidenceSelection( Incidence * ); |
53 | 54 | ||
54 | void importQtopia(); | 55 | void importQtopia(); |
55 | void importBday(); | 56 | void importBday(); |
56 | void importOL(); | 57 | void importOL(); |
57 | void importIcal(); | 58 | void importIcal(); |
58 | void importFile( QString, bool ); | 59 | void importFile( QString, bool ); |
59 | void quickImportIcal(); | 60 | void quickImportIcal(); |
60 | 61 | ||
61 | void slotModifiedChanged( bool ); | 62 | void slotModifiedChanged( bool ); |
62 | 63 | ||
63 | void save(); | 64 | void save(); |
64 | void configureToolBar( int ); | 65 | void configureToolBar( int ); |
65 | void printSel(); | 66 | void printSel(); |
66 | void printCal(); | 67 | void printCal(); |
67 | void saveCalendar(); | 68 | void saveCalendar(); |
68 | void loadCalendar(); | 69 | void loadCalendar(); |
69 | void exportVCalendar(); | 70 | void exportVCalendar(); |
70 | 71 | ||
71 | void slotSyncMenu( int ); | 72 | void slotSyncMenu( int ); |
72 | void syncSSH(); | 73 | void syncSSH(); |
73 | void confSync(); | 74 | void confSync(); |
74 | void syncSharp(); | 75 | void syncSharp(); |
75 | void syncLocalFile(); | 76 | void syncLocalFile(); |
76 | bool syncWithFile( QString, bool ); | 77 | bool syncWithFile( QString, bool ); |
77 | void quickSyncLocalFile(); | 78 | void quickSyncLocalFile(); |
78 | 79 | ||
79 | 80 | ||
80 | protected: | 81 | protected: |
81 | void displayText( QString, QString); | 82 | void displayText( QString, QString); |
82 | void displayFile( QString, QString); | 83 | void displayFile( QString, QString); |
83 | 84 | ||
84 | void enableIncidenceActions( bool ); | 85 | void enableIncidenceActions( bool ); |
85 | 86 | ||
86 | private: | 87 | private: |
87 | void saveOnClose(); | 88 | void saveOnClose(); |
88 | int mCurrentSyncProfile; | 89 | int mCurrentSyncProfile; |
89 | void syncRemote( KSyncProfile* , bool ask = true); | 90 | void syncRemote( KSyncProfile* , bool ask = true); |
90 | void fillSyncMenu(); | 91 | void fillSyncMenu(); |
91 | bool mFlagKeyPressed; | 92 | bool mFlagKeyPressed; |
92 | bool mBlockAtStartup; | 93 | bool mBlockAtStartup; |
93 | QPEToolBar *iconToolBar; | 94 | QPEToolBar *iconToolBar; |
94 | void initActions(); | 95 | void initActions(); |
95 | void setDefaultPreferences(); | 96 | void setDefaultPreferences(); |
96 | void keyPressEvent ( QKeyEvent * ) ; | 97 | void keyPressEvent ( QKeyEvent * ) ; |
97 | void keyReleaseEvent ( QKeyEvent * ) ; | 98 | void keyReleaseEvent ( QKeyEvent * ) ; |
98 | QPopupMenu *configureToolBarMenu; | 99 | QPopupMenu *configureToolBarMenu; |
99 | QPopupMenu *configureAgendaMenu, *syncMenu; | 100 | QPopupMenu *configureAgendaMenu, *syncMenu; |
100 | CalendarLocal *mCalendar; | 101 | CalendarLocal *mCalendar; |
101 | CalendarView *mView; | 102 | CalendarView *mView; |
102 | QString getPassword(); | 103 | QString getPassword(); |
103 | QAction *mNewSubTodoAction; | 104 | QAction *mNewSubTodoAction; |
104 | 105 | ||
105 | QAction *mShowAction; | 106 | QAction *mShowAction; |
106 | QAction *mEditAction; | 107 | QAction *mEditAction; |
107 | QAction *mDeleteAction; | 108 | QAction *mDeleteAction; |
108 | void closeEvent( QCloseEvent* ce ); | 109 | void closeEvent( QCloseEvent* ce ); |
109 | SimpleAlarmClient mAlarmClient; | 110 | SimpleAlarmClient mAlarmClient; |
110 | QTimer mSaveTimer; | 111 | QTimer mSaveTimer; |
111 | bool mBlockSaveFlag; | 112 | bool mBlockSaveFlag; |
112 | bool mCalendarModifiedFlag; | 113 | bool mCalendarModifiedFlag; |
113 | QPixmap loadPixmap( QString ); | 114 | QPixmap loadPixmap( QString ); |
114 | }; | 115 | }; |
115 | 116 | ||
116 | #endif | 117 | #endif |
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 1b3e689..f0de71e 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -1,33 +1,75 @@ | |||
1 | #include <stdlib.h> | 1 | #include <stdlib.h> |
2 | #include <stdio.h> | ||
2 | 3 | ||
3 | #include "kapplication.h" | 4 | #include "kapplication.h" |
4 | #include <qapplication.h> | 5 | #include <qapplication.h> |
6 | #include <qstring.h> | ||
7 | #include <qfile.h> | ||
8 | #include <qtextstream.h> | ||
9 | #include <qdialog.h> | ||
10 | #include <qlayout.h> | ||
11 | #include <qtextbrowser.h> | ||
5 | 12 | ||
6 | int KApplication::random() | 13 | int KApplication::random() |
7 | { | 14 | { |
8 | return rand(); | 15 | return rand(); |
9 | } | 16 | } |
10 | 17 | ||
11 | //US | 18 | //US |
12 | QString KApplication::randomString(int length) | 19 | QString KApplication::randomString(int length) |
13 | { | 20 | { |
14 | if (length <=0 ) return QString::null; | 21 | if (length <=0 ) return QString::null; |
15 | 22 | ||
16 | QString str; | 23 | QString str; |
17 | while (length--) | 24 | while (length--) |
18 | { | 25 | { |
19 | int r=random() % 62; | 26 | int r=random() % 62; |
20 | r+=48; | 27 | r+=48; |
21 | if (r>57) r+=7; | 28 | if (r>57) r+=7; |
22 | if (r>90) r+=6; | 29 | if (r>90) r+=6; |
23 | str += char(r); | 30 | str += char(r); |
24 | // so what if I work backwards? | 31 | // so what if I work backwards? |
25 | } | 32 | } |
26 | return str; | 33 | return str; |
27 | } | 34 | } |
28 | int KApplication::execDialog( QDialog* d ) | 35 | int KApplication::execDialog( QDialog* d ) |
29 | { | 36 | { |
30 | if (QApplication::desktop()->width() <= 640 ) | 37 | if (QApplication::desktop()->width() <= 640 ) |
31 | d->showMaximized(); | 38 | d->showMaximized(); |
32 | return d->exec(); | 39 | return d->exec(); |
33 | } | 40 | } |
41 | void KApplication::showLicence() | ||
42 | { | ||
43 | QString fileName ; | ||
44 | QString text; | ||
45 | #ifndef DESKTOP_VERSION | ||
46 | fileName = getenv("QPEDIR"); | ||
47 | fileName += "/pics/kdepim/LICENCE.TXT" ; | ||
48 | #else | ||
49 | fileName = qApp->applicationDirPath () + "/kdepim/LICENCE.TXT"; | ||
50 | #endif | ||
51 | QFile file( fileName ); | ||
52 | qDebug("Licence file name %s ",fileName.latin1() ); | ||
53 | if (!file.open( IO_ReadOnly ) ) { | ||
54 | return ; | ||
55 | } | ||
56 | QTextStream ts( &file ); | ||
57 | text = ts.read(); | ||
58 | file.close(); | ||
59 | |||
60 | QDialog dia( 0, "name", true ); ; | ||
61 | dia.setCaption( "KDE-Pim/Pi licence" ); | ||
62 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | ||
63 | lay->setSpacing( 3 ); | ||
64 | lay->setMargin( 3 ); | ||
65 | QTextBrowser tb ( &dia ); | ||
66 | lay->addWidget( &tb ); | ||
67 | tb.setText( text ); | ||
68 | #ifdef DESKTOP_VERSION | ||
69 | dia.resize( 640, 480); | ||
70 | #else | ||
71 | dia.showMaximized(); | ||
72 | #endif | ||
73 | dia.exec(); | ||
74 | |||
75 | } | ||
diff --git a/microkde/kapplication.h b/microkde/kapplication.h index 77206f5..9515c60 100644 --- a/microkde/kapplication.h +++ b/microkde/kapplication.h | |||
@@ -1,23 +1,24 @@ | |||
1 | #ifndef MINIKDE_KAPPLICATION_H | 1 | #ifndef MINIKDE_KAPPLICATION_H |
2 | #define MINIKDE_KAPPLICATION_H | 2 | #define MINIKDE_KAPPLICATION_H |
3 | 3 | ||
4 | #include "qstring.h" | 4 | #include "qstring.h" |
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | 6 | ||
7 | class KApplication | 7 | class KApplication |
8 | { | 8 | { |
9 | public: | 9 | public: |
10 | static int random(); | 10 | static int random(); |
11 | 11 | ||
12 | //US | 12 | //US |
13 | /** | 13 | /** |
14 | * Generates a random string. It operates in the range [A-Za-z0-9] | 14 | * Generates a random string. It operates in the range [A-Za-z0-9] |
15 | * @param length Generate a string of this length. | 15 | * @param length Generate a string of this length. |
16 | * @return the random string | 16 | * @return the random string |
17 | */ | 17 | */ |
18 | static QString randomString(int length); | 18 | static QString randomString(int length); |
19 | static int execDialog( QDialog* ); | 19 | static int execDialog( QDialog* ); |
20 | static void showLicence(); | ||
20 | }; | 21 | }; |
21 | 22 | ||
22 | 23 | ||
23 | #endif | 24 | #endif |