summaryrefslogtreecommitdiff
authorhakan <hakan>2002-05-06 21:09:38 (UTC)
committer hakan <hakan>2002-05-06 21:09:38 (UTC)
commitf046179d3b49c44896298aa86380046a21394bbc (patch) (unidiff)
treeb0df64a4170cd9d2631244213b33c7ef0e55b4f8
parent8622bcb85245937853f3e657498957deb7eb2073 (diff)
downloadopie-f046179d3b49c44896298aa86380046a21394bbc.zip
opie-f046179d3b49c44896298aa86380046a21394bbc.tar.gz
opie-f046179d3b49c44896298aa86380046a21394bbc.tar.bz2
In the date entry dialog:
- Show end time (not only chnage label) when end textbox is selected. - Update timepicker when endtime is edited. - Update time textboxes when they looses focus. - Got rid of vertical empty borders. - "All day" dissables timepicker aswell. - Picking bad end time will set and show end time to starttime
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/dateentry.ui40
-rw-r--r--core/pim/datebook/dateentryimpl.cpp38
2 files changed, 61 insertions, 17 deletions
diff --git a/core/pim/datebook/dateentry.ui b/core/pim/datebook/dateentry.ui
index dc5195f..1a712ec 100644
--- a/core/pim/datebook/dateentry.ui
+++ b/core/pim/datebook/dateentry.ui
@@ -1,588 +1,616 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>DateEntryBase</class> 2<class>DateEntryBase</class>
3<comment>********************************************************************* 3<comment>*********************************************************************
4** Copyright (C) 2000 Trolltech AS. All rights reserved. 4** Copyright (C) 2000 Trolltech AS. All rights reserved.
5** 5**
6** This file is part of Qtopia Environment. 6** This file is part of Qtopia Environment.
7** 7**
8** This file may be distributed and/or modified under the terms of the 8** This file may be distributed and/or modified under the terms of the
9** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file. 11** packaging of this file.
12** 12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15** 15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information. 16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17** 17**
18** Contact info@trolltech.com if any conditions of this licensing are 18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you. 19** not clear to you.
20** 20**
21** $Id$ 21** $Id$
22** 22**
23*********************************************************************</comment> 23*********************************************************************</comment>
24<widget> 24<widget>
25 <class>QWidget</class> 25 <class>QWidget</class>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>name</name> 27 <name>name</name>
28 <cstring>DateEntryBase</cstring> 28 <cstring>DateEntryBase</cstring>
29 </property> 29 </property>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>geometry</name> 31 <name>geometry</name>
32 <rect> 32 <rect>
33 <x>0</x> 33 <x>0</x>
34 <y>0</y> 34 <y>0</y>
35 <width>242</width> 35 <width>242</width>
36 <height>339</height> 36 <height>339</height>
37 </rect> 37 </rect>
38 </property> 38 </property>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>caption</name> 40 <name>caption</name>
41 <string>New Event</string> 41 <string>New Event</string>
42 </property> 42 </property>
43 <grid> 43 <grid>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>margin</name> 45 <name>margin</name>
46 <number>0</number> 46 <number>2</number>
47 </property> 47 </property>
48 <property stdset="1"> 48 <property stdset="1">
49 <name>spacing</name> 49 <name>spacing</name>
50 <number>0</number> 50 <number>0</number>
51 </property> 51 </property>
52 <widget row="1" column="0" > 52 <widget row="1" column="0" >
53 <class>QLabel</class> 53 <class>QLabel</class>
54 <property stdset="1"> 54 <property stdset="1">
55 <name>name</name> 55 <name>name</name>
56 <cstring>TextLabel2</cstring> 56 <cstring>TextLabel2</cstring>
57 </property> 57 </property>
58 <property stdset="1"> 58 <property stdset="1">
59 <name>frameShape</name> 59 <name>frameShape</name>
60 <enum>MShape</enum> 60 <enum>MShape</enum>
61 </property> 61 </property>
62 <property stdset="1"> 62 <property stdset="1">
63 <name>frameShadow</name> 63 <name>frameShadow</name>
64 <enum>MShadow</enum> 64 <enum>MShadow</enum>
65 </property> 65 </property>
66 <property stdset="1"> 66 <property stdset="1">
67 <name>text</name> 67 <name>text</name>
68 <string>Location</string> 68 <string>Location</string>
69 </property> 69 </property>
70 </widget> 70 </widget>
71 <widget row="2" column="0" > 71 <widget row="2" column="0" >
72 <class>QLabel</class> 72 <class>QLabel</class>
73 <property stdset="1"> 73 <property stdset="1">
74 <name>name</name> 74 <name>name</name>
75 <cstring>TextLabel2_2</cstring> 75 <cstring>TextLabel2_2</cstring>
76 </property> 76 </property>
77 <property stdset="1"> 77 <property stdset="1">
78 <name>text</name> 78 <name>text</name>
79 <string>Category</string> 79 <string>Category</string>
80 </property> 80 </property>
81 <property> 81 <property>
82 <name>buddy</name> 82 <name>buddy</name>
83 <cstring>comboPriority</cstring> 83 <cstring>comboPriority</cstring>
84 </property> 84 </property>
85 </widget> 85 </widget>
86 <widget row="0" column="1" rowspan="1" colspan="3" > 86 <widget row="0" column="1" rowspan="1" colspan="3" >
87 <class>QComboBox</class> 87 <class>QComboBox</class>
88 <item> 88 <item>
89 <property> 89 <property>
90 <name>text</name> 90 <name>text</name>
91 <string></string> 91 <string></string>
92 </property> 92 </property>
93 </item> 93 </item>
94 <item> 94 <item>
95 <property> 95 <property>
96 <name>text</name> 96 <name>text</name>
97 <string>Meeting</string> 97 <string>Meeting</string>
98 </property> 98 </property>
99 </item> 99 </item>
100 <item> 100 <item>
101 <property> 101 <property>
102 <name>text</name> 102 <name>text</name>
103 <string>Lunch</string> 103 <string>Lunch</string>
104 </property> 104 </property>
105 </item> 105 </item>
106 <item> 106 <item>
107 <property> 107 <property>
108 <name>text</name> 108 <name>text</name>
109 <string>Dinner</string> 109 <string>Dinner</string>
110 </property> 110 </property>
111 </item> 111 </item>
112 <item> 112 <item>
113 <property> 113 <property>
114 <name>text</name> 114 <name>text</name>
115 <string>Travel</string> 115 <string>Travel</string>
116 </property> 116 </property>
117 </item> 117 </item>
118 <property stdset="1"> 118 <property stdset="1">
119 <name>name</name> 119 <name>name</name>
120 <cstring>comboDescription</cstring> 120 <cstring>comboDescription</cstring>
121 </property> 121 </property>
122 <property stdset="1"> 122 <property stdset="1">
123 <name>sizePolicy</name> 123 <name>sizePolicy</name>
124 <sizepolicy> 124 <sizepolicy>
125 <hsizetype>7</hsizetype> 125 <hsizetype>7</hsizetype>
126 <vsizetype>0</vsizetype> 126 <vsizetype>0</vsizetype>
127 </sizepolicy> 127 </sizepolicy>
128 </property> 128 </property>
129 <property stdset="1"> 129 <property stdset="1">
130 <name>editable</name> 130 <name>editable</name>
131 <bool>true</bool> 131 <bool>true</bool>
132 </property> 132 </property>
133 <property stdset="1"> 133 <property stdset="1">
134 <name>currentItem</name> 134 <name>currentItem</name>
135 <number>0</number> 135 <number>0</number>
136 </property> 136 </property>
137 <property stdset="1"> 137 <property stdset="1">
138 <name>duplicatesEnabled</name> 138 <name>duplicatesEnabled</name>
139 <bool>false</bool> 139 <bool>false</bool>
140 </property> 140 </property>
141 </widget> 141 </widget>
142 <widget row="0" column="0" > 142 <widget row="0" column="0" >
143 <class>QLabel</class> 143 <class>QLabel</class>
144 <property stdset="1"> 144 <property stdset="1">
145 <name>name</name> 145 <name>name</name>
146 <cstring>TextLabel1</cstring> 146 <cstring>TextLabel1</cstring>
147 </property> 147 </property>
148 <property stdset="1"> 148 <property stdset="1">
149 <name>text</name> 149 <name>text</name>
150 <string>Description</string> 150 <string>Description </string>
151 </property> 151 </property>
152 </widget> 152 </widget>
153 <widget row="1" column="1" rowspan="1" colspan="3" > 153 <widget row="1" column="1" rowspan="1" colspan="3" >
154 <class>QComboBox</class> 154 <class>QComboBox</class>
155 <item> 155 <item>
156 <property> 156 <property>
157 <name>text</name> 157 <name>text</name>
158 <string></string> 158 <string></string>
159 </property> 159 </property>
160 </item> 160 </item>
161 <item> 161 <item>
162 <property> 162 <property>
163 <name>text</name> 163 <name>text</name>
164 <string>Office</string> 164 <string>Office</string>
165 </property> 165 </property>
166 </item> 166 </item>
167 <item> 167 <item>
168 <property> 168 <property>
169 <name>text</name> 169 <name>text</name>
170 <string>Home</string> 170 <string>Home</string>
171 </property> 171 </property>
172 </item> 172 </item>
173 <property stdset="1"> 173 <property stdset="1">
174 <name>name</name> 174 <name>name</name>
175 <cstring>comboLocation</cstring> 175 <cstring>comboLocation</cstring>
176 </property> 176 </property>
177 <property stdset="1"> 177 <property stdset="1">
178 <name>sizePolicy</name> 178 <name>sizePolicy</name>
179 <sizepolicy> 179 <sizepolicy>
180 <hsizetype>7</hsizetype> 180 <hsizetype>7</hsizetype>
181 <vsizetype>0</vsizetype> 181 <vsizetype>0</vsizetype>
182 </sizepolicy> 182 </sizepolicy>
183 </property> 183 </property>
184 <property stdset="1"> 184 <property stdset="1">
185 <name>editable</name> 185 <name>editable</name>
186 <bool>true</bool> 186 <bool>true</bool>
187 </property> 187 </property>
188 <property stdset="1"> 188 <property stdset="1">
189 <name>currentItem</name> 189 <name>currentItem</name>
190 <number>0</number> 190 <number>0</number>
191 </property> 191 </property>
192 <property stdset="1"> 192 <property stdset="1">
193 <name>duplicatesEnabled</name> 193 <name>duplicatesEnabled</name>
194 <bool>false</bool> 194 <bool>false</bool>
195 </property> 195 </property>
196 </widget> 196 </widget>
197 <widget row="2" column="1" rowspan="1" colspan="3" > 197 <widget row="2" column="1" rowspan="1" colspan="3" >
198 <class>CategorySelect</class> 198 <class>CategorySelect</class>
199 <property stdset="1"> 199 <property stdset="1">
200 <name>name</name> 200 <name>name</name>
201 <cstring>comboCategory</cstring> 201 <cstring>comboCategory</cstring>
202 </property> 202 </property>
203 </widget> 203 </widget>
204 <widget row="3" column="0" rowspan="2"> 204 <widget row="3" column="0" rowspan="2">
205 <class>QLabel</class> 205 <class>QLabel</class>
206 <property stdset="1"> 206 <property stdset="1">
207 <name>name</name> 207 <name>name</name>
208 <cstring>TextLabel3</cstring> 208 <cstring>TextLabel3</cstring>
209 </property> 209 </property>
210 <property stdset="1"> 210 <property stdset="1">
211 <name>text</name> 211 <name>text</name>
212 <string>Start - End</string> 212 <string>Start - End </string>
213 </property> 213 </property>
214 </widget> 214 </widget>
215 <widget row="3" column="1" > 215 <widget row="3" column="1" >
216 <class>QPushButton</class> 216 <class>QPushButton</class>
217 <property stdset="1"> 217 <property stdset="1">
218 <name>name</name> 218 <name>name</name>
219 <cstring>buttonStart</cstring> 219 <cstring>buttonStart</cstring>
220 </property> 220 </property>
221 <property stdset="1"> 221 <property stdset="1">
222 <name>text</name> 222 <name>text</name>
223 <string>Jan 02 00</string> 223 <string>Jan 02 00</string>
224 </property> 224 </property>
225 <property stdset="1"> 225 <property stdset="1">
226 <name>minimumSize</name> 226 <name>minimumSize</name>
227 <size> 227 <size>
228 <width>70</width> 228 <width>70</width>
229 <height>0</height> 229 <height>0</height>
230 </size> 230 </size>
231 </property> 231 </property>
232 <property stdset="1"> 232 <property stdset="1">
233 <name>maximumSize</name> 233 <name>maximumSize</name>
234 <size> 234 <size>
235 <width>70</width> 235 <width>70</width>
236 <height>32767</height> 236 <height>32767</height>
237 </size> 237 </size>
238 </property> 238 </property>
239 </widget> 239 </widget>
240 <widget row="4" column="1" rowspan="1" colspan="1" > 240 <widget row="4" column="1" rowspan="1" colspan="1" >
241 <class>QLineEdit</class> 241 <class>QLineEdit</class>
242 <property stdset="1"> 242 <property stdset="1">
243 <name>name</name> 243 <name>name</name>
244 <cstring>comboStart</cstring> 244 <cstring>comboStart</cstring>
245 </property> 245 </property>
246 <property stdset="1"> 246 <property stdset="1">
247 <name>minimumSize</name> 247 <name>minimumSize</name>
248 <size> 248 <size>
249 <width>70</width> 249 <width>70</width>
250 <height>0</height> 250 <height>0</height>
251 </size> 251 </size>
252 </property> 252 </property>
253 <property stdset="1"> 253 <property stdset="1">
254 <name>maximumSize</name> 254 <name>maximumSize</name>
255 <size> 255 <size>
256 <width>70</width> 256 <width>70</width>
257 <height>32767</height> 257 <height>32767</height>
258 </size> 258 </size>
259 </property> 259 </property>
260 <property stdset="1"> 260 <property stdset="1">
261 <name>alignment</name> 261 <name>alignment</name>
262 <set>AlignHCenter</set> 262 <set>AlignHCenter</set>
263 </property> 263 </property>
264 <property> 264 <property>
265 <name>hAlign</name> 265 <name>hAlign</name>
266 </property> 266 </property>
267 </widget> 267 </widget>
268 <spacer row="3" column="2" rowspan="2" colspan="1" >
269 <property>
270 <name>name</name>
271 <cstring>Spacer1_2</cstring>
272 </property>
273 <property stdset="1">
274 <name>orientation</name>
275 <enum>Horizontal</enum>
276 </property>
277 <property stdset="1">
278 <name>sizeType</name>
279 <enum>Expanding</enum>
280 </property>
281 <property>
282 <name>sizeHint</name>
283 <size>
284 <width>20</width>
285 <height>20</height>
286 </size>
287 </property>
288 </spacer>
289
268 <widget row="5" column="1" colspan="3"> 290 <widget row="5" column="1" colspan="3">
269 <class>TimePicker</class> 291 <class>TimePicker</class>
270 <property stdset="1"> 292 <property stdset="1">
271 <name>name</name> 293 <name>name</name>
272 <cstring>timePickerStart</cstring> 294 <cstring>timePickerStart</cstring>
273 </property> 295 </property>
274 </widget> 296 </widget>
275 <widget row="3" column="2" colspan="2"> 297 <widget row="3" column="3" colspan="1">
276 <class>QPushButton</class> 298 <class>QPushButton</class>
277 <property stdset="1"> 299 <property stdset="1">
278 <name>name</name> 300 <name>name</name>
279 <cstring>buttonEnd</cstring> 301 <cstring>buttonEnd</cstring>
280 </property> 302 </property>
281 <property stdset="1"> 303 <property stdset="1">
282 <name>text</name> 304 <name>text</name>
283 <string>Jan 02 00</string> 305 <string>Jan 02 00</string>
284 </property> 306 </property>
285 <property stdset="1"> 307 <property stdset="1">
286 <name>minimumSize</name> 308 <name>minimumSize</name>
287 <size> 309 <size>
288 <width>70</width> 310 <width>70</width>
289 <height>0</height> 311 <height>0</height>
290 </size> 312 </size>
291 </property> 313 </property>
292 <property stdset="1"> 314 <property stdset="1">
293 <name>maximumSize</name> 315 <name>maximumSize</name>
294 <size> 316 <size>
295 <width>70</width> 317 <width>70</width>
296 <height>32767</height> 318 <height>32767</height>
297 </size> 319 </size>
298 </property> 320 </property>
299 </widget> 321 </widget>
300 <widget row="4" column="2" colspan="2"> 322 <widget row="4" column="3" colspan="1">
301 <class>QLineEdit</class> 323 <class>QLineEdit</class>
302 <property stdset="1"> 324 <property stdset="1">
303 <name>name</name> 325 <name>name</name>
304 <cstring>comboEnd</cstring> 326 <cstring>comboEnd</cstring>
305 </property> 327 </property>
306 <property stdset="1"> 328 <property stdset="1">
307 <name>minimumSize</name> 329 <name>minimumSize</name>
308 <size> 330 <size>
309 <width>70</width> 331 <width>70</width>
310 <height>0</height> 332 <height>0</height>
311 </size> 333 </size>
312 </property> 334 </property>
313 <property stdset="1"> 335 <property stdset="1">
314 <name>maximumSize</name> 336 <name>maximumSize</name>
315 <size> 337 <size>
316 <width>70</width> 338 <width>70</width>
317 <height>32767</height> 339 <height>32767</height>
318 </size> 340 </size>
319 </property> 341 </property>
320 <property stdset="1"> 342 <property stdset="1">
321 <name>alignment</name> 343 <name>alignment</name>
322 <set>AlignHCenter</set> 344 <set>AlignHCenter</set>
323 </property> 345 </property>
324 <property> 346 <property>
325 <name>hAlign</name> 347 <name>hAlign</name>
326 </property> 348 </property>
327 </widget> 349 </widget>
328 <widget row="5" column="0" > 350 <widget row="5" column="0" >
329 <class>QLabel</class> 351 <class>QLabel</class>
330 <property stdset="1"> 352 <property stdset="1">
331 <name>name</name> 353 <name>name</name>
332 <cstring>TextLabel3_2</cstring> 354 <cstring>TimePickerLabel</cstring>
333 </property> 355 </property>
334 <property stdset="1"> 356 <property stdset="1">
335 <name>text</name> 357 <name>text</name>
336 <string>Start time</string> 358 <string>Start time</string>
337 </property> 359 </property>
338 </widget> 360 </widget>
339 <widget row="6" column="0" > 361 <widget row="6" column="0" >
340 <class>QCheckBox</class> 362 <class>QCheckBox</class>
341 <property stdset="1"> 363 <property stdset="1">
342 <name>name</name> 364 <name>name</name>
343 <cstring>checkAllDay</cstring> 365 <cstring>checkAllDay</cstring>
344 </property> 366 </property>
345 <property stdset="1"> 367 <property stdset="1">
346 <name>text</name> 368 <name>text</name>
347 <string>All day</string> 369 <string>All day</string>
348 </property> 370 </property>
349 </widget> 371 </widget>
350 <widget row="7" column="0" > 372 <widget row="7" column="0" >
351 <class>QLabel</class> 373 <class>QLabel</class>
352 <property stdset="1"> 374 <property stdset="1">
353 <name>name</name> 375 <name>name</name>
354 <cstring>TextLabel3_2_2</cstring> 376 <cstring>TextLabel3_2_2</cstring>
355 </property> 377 </property>
356 <property stdset="1"> 378 <property stdset="1">
357 <name>text</name> 379 <name>text</name>
358 <string>Time zone</string> 380 <string>Time zone</string>
359 </property> 381 </property>
360 </widget> 382 </widget>
361 <widget row="7" column="1" rowspan="1" colspan="3" > 383 <widget row="7" column="1" rowspan="1" colspan="3" >
362 <class>TimeZoneSelector</class> 384 <class>TimeZoneSelector</class>
363 <property stdset="1"> 385 <property stdset="1">
364 <name>name</name> 386 <name>name</name>
365 <cstring>timezone</cstring> 387 <cstring>timezone</cstring>
366 </property> 388 </property>
367 </widget> 389 </widget>
368 <widget row="8" column="0" > 390 <widget row="8" column="0" >
369 <class>QCheckBox</class> 391 <class>QCheckBox</class>
370 <property stdset="1"> 392 <property stdset="1">
371 <name>name</name> 393 <name>name</name>
372 <cstring>checkAlarm</cstring> 394 <cstring>checkAlarm</cstring>
373 </property> 395 </property>
374 <property stdset="1"> 396 <property stdset="1">
375 <name>enabled</name> 397 <name>enabled</name>
376 <bool>true</bool> 398 <bool>true</bool>
377 </property> 399 </property>
378 <property stdset="1"> 400 <property stdset="1">
379 <name>autoMask</name> 401 <name>autoMask</name>
380 <bool>false</bool> 402 <bool>false</bool>
381 </property> 403 </property>
382 <property stdset="1"> 404 <property stdset="1">
383 <name>text</name> 405 <name>text</name>
384 <string>&amp;Alarm</string> 406 <string>&amp;Alarm</string>
385 </property> 407 </property>
386 <property stdset="1"> 408 <property stdset="1">
387 <name>checked</name> 409 <name>checked</name>
388 <bool>false</bool> 410 <bool>false</bool>
389 </property> 411 </property>
390 </widget> 412 </widget>
391 <widget row="8" column="1" rowspan="1" colspan="2" > 413 <widget row="8" column="1" rowspan="1" colspan="2" >
392 <class>QSpinBox</class> 414 <class>QSpinBox</class>
393 <property stdset="1"> 415 <property stdset="1">
394 <name>name</name> 416 <name>name</name>
395 <cstring>spinAlarm</cstring> 417 <cstring>spinAlarm</cstring>
396 </property> 418 </property>
397 <property stdset="1"> 419 <property stdset="1">
398 <name>enabled</name> 420 <name>enabled</name>
399 <bool>false</bool> 421 <bool>false</bool>
400 </property> 422 </property>
401 <property stdset="1"> 423 <property stdset="1">
402 <name>suffix</name> 424 <name>suffix</name>
403 <string> minutes</string> 425 <string> minutes</string>
404 </property> 426 </property>
405 <property stdset="1"> 427 <property stdset="1">
406 <name>maxValue</name> 428 <name>maxValue</name>
407 <number>180</number> 429 <number>180</number>
408 </property> 430 </property>
409 <property stdset="1"> 431 <property stdset="1">
410 <name>minValue</name> 432 <name>minValue</name>
411 <number>0</number> 433 <number>0</number>
412 </property> 434 </property>
413 <property stdset="1"> 435 <property stdset="1">
414 <name>lineStep</name> 436 <name>lineStep</name>
415 <number>5</number> 437 <number>5</number>
416 </property> 438 </property>
417 <property stdset="1"> 439 <property stdset="1">
418 <name>value</name> 440 <name>value</name>
419 <number>5</number> 441 <number>5</number>
420 </property> 442 </property>
421 </widget> 443 </widget>
422 <widget row="8" column="3" > 444 <widget row="8" column="3" >
423 <class>QComboBox</class> 445 <class>QComboBox</class>
424 <item> 446 <item>
425 <property> 447 <property>
426 <name>text</name> 448 <name>text</name>
427 <string>Silent</string> 449 <string>Silent</string>
428 </property> 450 </property>
429 </item> 451 </item>
430 <item> 452 <item>
431 <property> 453 <property>
432 <name>text</name> 454 <name>text</name>
433 <string>Loud</string> 455 <string>Loud</string>
434 </property> 456 </property>
435 </item> 457 </item>
436 <property stdset="1"> 458 <property stdset="1">
437 <name>name</name> 459 <name>name</name>
438 <cstring>comboSound</cstring> 460 <cstring>comboSound</cstring>
439 </property> 461 </property>
440 <property stdset="1"> 462 <property stdset="1">
441 <name>enabled</name> 463 <name>enabled</name>
442 <bool>false</bool> 464 <bool>false</bool>
443 </property> 465 </property>
444 </widget> 466 </widget>
445 <widget row="9" column="0" > 467 <widget row="9" column="0" >
446 <class>QLabel</class> 468 <class>QLabel</class>
447 <property stdset="1"> 469 <property stdset="1">
448 <name>name</name> 470 <name>name</name>
449 <cstring>lblRepeat</cstring> 471 <cstring>lblRepeat</cstring>
450 </property> 472 </property>
451 <property stdset="1"> 473 <property stdset="1">
452 <name>text</name> 474 <name>text</name>
453 <string>Repeat</string> 475 <string>Repeat</string>
454 </property> 476 </property>
455 </widget> 477 </widget>
456 <widget row="9" column="1" rowspan="1" colspan="3" > 478 <widget row="9" column="1" rowspan="1" colspan="3" >
457 <class>QToolButton</class> 479 <class>QToolButton</class>
458 <property stdset="1"> 480 <property stdset="1">
459 <name>name</name> 481 <name>name</name>
460 <cstring>cmdRepeat</cstring> 482 <cstring>cmdRepeat</cstring>
461 </property> 483 </property>
462 <property stdset="1"> 484 <property stdset="1">
463 <name>focusPolicy</name> 485 <name>focusPolicy</name>
464 <enum>TabFocus</enum> 486 <enum>TabFocus</enum>
465 </property> 487 </property>
466 <property stdset="1"> 488 <property stdset="1">
467 <name>text</name> 489 <name>text</name>
468 <string>No Repeat...</string> 490 <string>No Repeat...</string>
469 </property> 491 </property>
470 </widget> 492 </widget>
471 <widget row="10" column="0" rowspan="1" colspan="4" > 493 <widget row="10" column="0" rowspan="1" colspan="4" >
472 <class>QMultiLineEdit</class> 494 <class>QMultiLineEdit</class>
473 <property stdset="1"> 495 <property stdset="1">
474 <name>name</name> 496 <name>name</name>
475 <cstring>editNote</cstring> 497 <cstring>editNote</cstring>
476 </property> 498 </property>
477 </widget> 499 </widget>
478 </grid> 500 </grid>
479</widget> 501</widget>
480<customwidgets> 502<customwidgets>
481 <customwidget> 503 <customwidget>
482 <class>TimeZoneSelector</class> 504 <class>TimeZoneSelector</class>
483 <header location="global">qpe/tzselect.h</header> 505 <header location="global">qpe/tzselect.h</header>
484 <sizehint> 506 <sizehint>
485 <width>21</width> 507 <width>21</width>
486 <height>10</height> 508 <height>10</height>
487 </sizehint> 509 </sizehint>
488 <container>0</container> 510 <container>0</container>
489 <sizepolicy> 511 <sizepolicy>
490 <hordata>7</hordata> 512 <hordata>7</hordata>
491 <verdata>1</verdata> 513 <verdata>1</verdata>
492 </sizepolicy> 514 </sizepolicy>
493 <pixmap>image0</pixmap> 515 <pixmap>image0</pixmap>
494 </customwidget> 516 </customwidget>
495 <customwidget> 517 <customwidget>
496 <class>CategorySelect</class> 518 <class>CategorySelect</class>
497 <header location="global">qpe/categoryselect.h</header> 519 <header location="global">qpe/categoryselect.h</header>
498 <sizehint> 520 <sizehint>
499 <width>-1</width> 521 <width>-1</width>
500 <height>-1</height> 522 <height>-1</height>
501 </sizehint> 523 </sizehint>
502 <container>0</container> 524 <container>0</container>
503 <sizepolicy> 525 <sizepolicy>
504 <hordata>7</hordata> 526 <hordata>7</hordata>
505 <verdata>1</verdata> 527 <verdata>1</verdata>
506 </sizepolicy> 528 </sizepolicy>
507 <pixmap>image1</pixmap> 529 <pixmap>image1</pixmap>
508 </customwidget> 530 </customwidget>
509 <customwidget> 531 <customwidget>
510 <class>TimePicker</class> 532 <class>TimePicker</class>
511 <header location="local">timepicker.h</header> 533 <header location="local">timepicker.h</header>
512 <sizehint> 534 <sizehint>
513 <width>-1</width> 535 <width>-1</width>
514 <height>-1</height> 536 <height>-1</height>
515 </sizehint> 537 </sizehint>
516 <container>0</container> 538 <container>0</container>
517 <sizepolicy> 539 <sizepolicy>
518 <hordata>7</hordata> 540 <hordata>7</hordata>
519 <verdata>1</verdata> 541 <verdata>1</verdata>
520 </sizepolicy> 542 </sizepolicy>
521 <pixmap>image1</pixmap> 543 <pixmap>image1</pixmap>
522 </customwidget> 544 </customwidget>
523</customwidgets> 545</customwidgets>
524<images> 546<images>
525 <image> 547 <image>
526 <name>image0</name> 548 <name>image0</name>
527 <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data> 549 <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data>
528 </image> 550 </image>
529 <image> 551 <image>
530 <name>image1</name> 552 <name>image1</name>
531 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 553 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
532 </image> 554 </image>
533</images> 555</images>
534<connections> 556<connections>
535 <connection> 557 <connection>
536 <sender>checkAlarm</sender> 558 <sender>checkAlarm</sender>
537 <signal>toggled(bool)</signal> 559 <signal>toggled(bool)</signal>
538 <receiver>spinAlarm</receiver> 560 <receiver>spinAlarm</receiver>
539 <slot>setEnabled(bool)</slot> 561 <slot>setEnabled(bool)</slot>
540 </connection> 562 </connection>
541 <connection> 563 <connection>
542 <sender>comboEnd</sender> 564 <sender>comboEnd</sender>
543 <signal>textChanged(const QString&amp;)</signal> 565 <signal>textChanged(const QString&amp;)</signal>
544 <receiver>DateEntryBase</receiver> 566 <receiver>DateEntryBase</receiver>
545 <slot>endTimeChanged( const QString &amp; )</slot> 567 <slot>endTimeChanged( const QString &amp; )</slot>
546 </connection> 568 </connection>
547 <connection> 569 <connection>
548 <sender>cmdRepeat</sender> 570 <sender>cmdRepeat</sender>
549 <signal>clicked()</signal> 571 <signal>clicked()</signal>
550 <receiver>DateEntryBase</receiver> 572 <receiver>DateEntryBase</receiver>
551 <slot>slotRepeat()</slot> 573 <slot>slotRepeat()</slot>
552 </connection> 574 </connection>
553 <connection> 575 <connection>
554 <sender>comboStart</sender> 576 <sender>comboStart</sender>
555 <signal>textChanged(const QString &amp;)</signal> 577 <signal>textChanged(const QString &amp;)</signal>
556 <receiver>DateEntryBase</receiver> 578 <receiver>DateEntryBase</receiver>
557 <slot>startTimeEdited( const QString &amp; )</slot> 579 <slot>startTimeEdited( const QString &amp; )</slot>
558 </connection> 580 </connection>
559 <connection> 581 <connection>
560 <sender>checkAllDay</sender> 582 <sender>checkAllDay</sender>
561 <signal>toggled(bool)</signal> 583 <signal>toggled(bool)</signal>
562 <receiver>comboEnd</receiver> 584 <receiver>comboEnd</receiver>
563 <slot>setDisabled(bool)</slot> 585 <slot>setDisabled(bool)</slot>
564 </connection> 586 </connection>
565 <connection> 587 <connection>
588 <sender>checkAllDay</sender>
589 <signal>toggled(bool)</signal>
590 <receiver>timePickerStart</receiver>
591 <slot>setDisabled(bool)</slot>
592 </connection>
593 <connection>
566 <sender>checkAlarm</sender> 594 <sender>checkAlarm</sender>
567 <signal>toggled(bool)</signal> 595 <signal>toggled(bool)</signal>
568 <receiver>comboSound</receiver> 596 <receiver>comboSound</receiver>
569 <slot>setEnabled(bool)</slot> 597 <slot>setEnabled(bool)</slot>
570 </connection> 598 </connection>
571 <connection> 599 <connection>
572 <sender>checkAllDay</sender> 600 <sender>checkAllDay</sender>
573 <signal>toggled(bool)</signal> 601 <signal>toggled(bool)</signal>
574 <receiver>comboStart</receiver> 602 <receiver>comboStart</receiver>
575 <slot>setDisabled(bool)</slot> 603 <slot>setDisabled(bool)</slot>
576 </connection> 604 </connection>
577 <slot access="public">endDateChanged( const QString &amp; )</slot> 605 <slot access="public">endDateChanged( const QString &amp; )</slot>
578 <slot access="public">endDateChanged( int, int, int )</slot> 606 <slot access="public">endDateChanged( int, int, int )</slot>
579 <slot access="public">endTimeChanged( const QString &amp; )</slot> 607 <slot access="public">endTimeChanged( const QString &amp; )</slot>
580 <slot access="public">slotRepeat()</slot> 608 <slot access="public">slotRepeat()</slot>
581 <slot access="public">slotWait( int )</slot> 609 <slot access="public">slotWait( int )</slot>
582 <slot access="public">startDateChanged( const QString &amp; )</slot> 610 <slot access="public">startDateChanged( const QString &amp; )</slot>
583 <slot access="public">startDateChanged(int, int, int)</slot> 611 <slot access="public">startDateChanged(int, int, int)</slot>
584 <slot access="public">startTimeEdited( const QString &amp; )</slot> 612 <slot access="public">startTimeEdited( const QString &amp; )</slot>
585 <slot access="public">typeChanged( const QString &amp; )</slot> 613 <slot access="public">typeChanged( const QString &amp; )</slot>
586 <slot access="public">tzexecute(void)</slot> 614 <slot access="public">tzexecute(void)</slot>
587</connections> 615</connections>
588</UI> 616</UI>
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index f2f17c6..e14e2f5 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -1,533 +1,549 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "dateentryimpl.h" 21#include "dateentryimpl.h"
22#include "repeatentry.h" 22#include "repeatentry.h"
23 23
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25#include <qpe/categoryselect.h> 25#include <qpe/categoryselect.h>
26#include <qpe/datebookmonth.h> 26#include <qpe/datebookmonth.h>
27#include <qpe/global.h> 27#include <qpe/global.h>
28#include <qpe/timeconversion.h> 28#include <qpe/timeconversion.h>
29#include <qpe/timestring.h> 29#include <qpe/timestring.h>
30#include <qpe/tzselect.h> 30#include <qpe/tzselect.h>
31 31
32#include <qevent.h> 32#include <qevent.h>
33#include <qcheckbox.h> 33#include <qcheckbox.h>
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37#include <qmultilineedit.h> 37#include <qmultilineedit.h>
38#include <qpopupmenu.h> 38#include <qpopupmenu.h>
39#include <qscrollview.h> 39#include <qscrollview.h>
40#include <qspinbox.h> 40#include <qspinbox.h>
41#include <qtoolbutton.h> 41#include <qtoolbutton.h>
42 42
43#include "timepicker.h" 43#include "timepicker.h"
44 44
45#include <stdlib.h> 45#include <stdlib.h>
46 46
47/* 47/*
48 * Constructs a DateEntry which is a child of 'parent', with the 48 * Constructs a DateEntry which is a child of 'parent', with the
49 * name 'name' and widget flags set to 'f' 49 * name 'name' and widget flags set to 'f'
50 * 50 *
51 * The dialog will by default be modeless, unless you set 'modal' to 51 * The dialog will by default be modeless, unless you set 'modal' to
52 * TRUE to construct a modal dialog. 52 * TRUE to construct a modal dialog.
53 */ 53 */
54 54
55DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, 55DateEntry::DateEntry( bool startOnMonday, const QDateTime &start,
56 const QDateTime &end, bool whichClock, QWidget* parent, 56 const QDateTime &end, bool whichClock, QWidget* parent,
57 const char* name ) 57 const char* name )
58 : DateEntryBase( parent, name ), 58 : DateEntryBase( parent, name ),
59 ampm( whichClock ), 59 ampm( whichClock ),
60 startWeekOnMonday( startOnMonday ) 60 startWeekOnMonday( startOnMonday )
61{ 61{
62 init(); 62 init();
63 setDates(start,end); 63 setDates(start,end);
64 setFocusProxy(comboDescription); 64 setFocusProxy(comboDescription);
65} 65}
66 66
67bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) 67bool DateEntry::eventFilter(QObject *obj, QEvent *ev )
68{ 68{
69 if( ev->type() == QEvent::FocusIn ){ 69 if( ev->type() == QEvent::FocusIn ){
70 if( obj == comboStart ){ 70 if( obj == comboStart ){
71 TextLabel3_2->setText( tr("Start Time" ) ); 71 timePickerStart->setHour(startTime.hour());
72 timePickerStart->setMinute(startTime.minute());
73 TimePickerLabel->setText( tr("Start Time" ) );
72 m_showStart= true; 74 m_showStart= true;
73 }else if( obj == comboEnd ){ 75 }else if( obj == comboEnd ){
74 TextLabel3_2->setText( tr("End Time") ); 76 timePickerStart->setHour(endTime.hour());
77 timePickerStart->setMinute(endTime.minute());
78 TimePickerLabel->setText( tr("End Time") );
75 m_showStart = false; 79 m_showStart = false;
76 } 80 }
81 } else if( ev->type() == QEvent::FocusOut ){
82 if( obj == comboEnd ){
83 QString s;
84 s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute());
85 comboEnd->setText(s);
86 }
87 else if( obj == comboStart ){
88 QString s;
89 s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute());
90 comboStart->setText(s);
91 }
77 } 92 }
93
78 return false; 94 return false;
79} 95}
80 96
81static void addOrPick( QComboBox* combo, const QString& t ) 97static void addOrPick( QComboBox* combo, const QString& t )
82{ 98{
83 // Pick an item if one excists 99 // Pick an item if one excists
84 for (int i=0; i<combo->count(); i++) { 100 for (int i=0; i<combo->count(); i++) {
85 if ( combo->text(i) == t ) { 101 if ( combo->text(i) == t ) {
86 combo->setCurrentItem(i); 102 combo->setCurrentItem(i);
87 return; 103 return;
88 } 104 }
89 } 105 }
90 106
91 // Else add one 107 // Else add one
92 combo->insertItem(t); 108 combo->insertItem(t);
93 combo->setCurrentItem(combo->count()-1); 109 combo->setCurrentItem(combo->count()-1);
94} 110}
95 111
96DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, 112DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
97 QWidget* parent, const char* name ) 113 QWidget* parent, const char* name )
98 : DateEntryBase( parent, name ), 114 : DateEntryBase( parent, name ),
99 ampm( whichClock ), 115 ampm( whichClock ),
100 startWeekOnMonday( startOnMonday ) 116 startWeekOnMonday( startOnMonday )
101{ 117{
102 init(); 118 init();
103 setDates(event.start(),event.end()); 119 setDates(event.start(),event.end());
104 comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); 120 comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") );
105 if(!event.description().isEmpty()) 121 if(!event.description().isEmpty())
106 addOrPick( comboDescription, event.description() ); 122 addOrPick( comboDescription, event.description() );
107 if(!event.location().isEmpty()) 123 if(!event.location().isEmpty())
108 addOrPick( comboLocation, event.location() ); 124 addOrPick( comboLocation, event.location() );
109 checkAlarm->setChecked( event.hasAlarm() ); 125 checkAlarm->setChecked( event.hasAlarm() );
110 checkAllDay->setChecked( event.type() == Event::AllDay ); 126 checkAllDay->setChecked( event.type() == Event::AllDay );
111 if(!event.notes().isEmpty()) 127 if(!event.notes().isEmpty())
112 editNote->setText(event.notes()); 128 editNote->setText(event.notes());
113 spinAlarm->setValue(event.alarmTime()); 129 spinAlarm->setValue(event.alarmTime());
114 if ( event.alarmSound() != Event::Silent ) 130 if ( event.alarmSound() != Event::Silent )
115 comboSound->setCurrentItem( 1 ); 131 comboSound->setCurrentItem( 1 );
116 if ( event.hasRepeat() ) { 132 if ( event.hasRepeat() ) {
117 rp = event.repeatPattern(); 133 rp = event.repeatPattern();
118 cmdRepeat->setText( tr("Repeat...") ); 134 cmdRepeat->setText( tr("Repeat...") );
119 } 135 }
120 setRepeatLabel(); 136 setRepeatLabel();
121} 137}
122 138
123void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) 139void DateEntry::setDates( const QDateTime& s, const QDateTime& e )
124{ 140{
125 startDate = s.date(); 141 startDate = s.date();
126 endDate = e.date(); 142 endDate = e.date();
127 startTime = s.time(); 143 startTime = s.time();
128 endTime = e.time(); 144 endTime = e.time();
129 145
130 startDateChanged( s.date().year(), s.date().month(), s.date().day() ); 146 startDateChanged( s.date().year(), s.date().month(), s.date().day() );
131 endDateChanged( e.date().year(), e.date().month(), e.date().day() ); 147 endDateChanged( e.date().year(), e.date().month(), e.date().day() );
132 148
133 updateTimeEdit(true,true); 149 updateTimeEdit(true,true);
134} 150}
135 151
136void DateEntry::updateTimeEdit(bool s, bool e) { 152void DateEntry::updateTimeEdit(bool s, bool e) {
137 153
138 // Comboboxes 154 // Comboboxes
139 QString strStart, strEnd; 155 QString strStart, strEnd;
140 int shour, ehour; 156 int shour, ehour;
141 if ( ampm ) { 157 if ( ampm ) {
142 shour = startTime.hour(); 158 shour = startTime.hour();
143 ehour = endTime.hour(); 159 ehour = endTime.hour();
144 if ( shour >= 12 ) { 160 if ( shour >= 12 ) {
145 if ( shour > 12 ) 161 if ( shour > 12 )
146 shour -= 12; 162 shour -= 12;
147 strStart.sprintf( "%d:%02d PM", shour, startTime.minute() ); 163 strStart.sprintf( "%d:%02d PM", shour, startTime.minute() );
148 } else { 164 } else {
149 if ( shour == 0 ) 165 if ( shour == 0 )
150 shour = 12; 166 shour = 12;
151 strStart.sprintf( "%d:%02d AM", shour, startTime.minute() ); 167 strStart.sprintf( "%d:%02d AM", shour, startTime.minute() );
152 } 168 }
153 if ( ehour == 24 && endTime.minute() == 0 ) { 169 if ( ehour == 24 && endTime.minute() == 0 ) {
154 strEnd = "11:59 PM"; // or "midnight" 170 strEnd = "11:59 PM"; // or "midnight"
155 } else if ( ehour >= 12 ) { 171 } else if ( ehour >= 12 ) {
156 if ( ehour > 12 ) 172 if ( ehour > 12 )
157 ehour -= 12; 173 ehour -= 12;
158 strEnd.sprintf( "%d:%02d PM", ehour, endTime.minute() ); 174 strEnd.sprintf( "%d:%02d PM", ehour, endTime.minute() );
159 } else { 175 } else {
160 if ( ehour == 0 ) 176 if ( ehour == 0 )
161 ehour = 12; 177 ehour = 12;
162 strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); 178 strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() );
163 } 179 }
164 } else { 180 } else {
165 strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); 181 strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() );
166 strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); 182 strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() );
167 } 183 }
168 184
169 if (s) comboStart->setText(strStart); 185 if (s) comboStart->setText(strStart);
170 if (e) comboEnd->setText(strEnd); 186 if (e) comboEnd->setText(strEnd);
171} 187}
172 188
173void DateEntry::init() 189void DateEntry::init()
174{ 190{
175 comboDescription->setInsertionPolicy(QComboBox::AtCurrent); 191 comboDescription->setInsertionPolicy(QComboBox::AtCurrent);
176 comboLocation->setInsertionPolicy(QComboBox::AtCurrent); 192 comboLocation->setInsertionPolicy(QComboBox::AtCurrent);
177 193
178 initCombos(); 194 initCombos();
179 QPopupMenu *m1 = new QPopupMenu( this ); 195 QPopupMenu *m1 = new QPopupMenu( this );
180 startPicker = new DateBookMonth( m1, 0, TRUE ); 196 startPicker = new DateBookMonth( m1, 0, TRUE );
181 m1->insertItem( startPicker ); 197 m1->insertItem( startPicker );
182 buttonStart->setPopup( m1 ); 198 buttonStart->setPopup( m1 );
183 connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), 199 connect( startPicker, SIGNAL( dateClicked( int, int, int ) ),
184 this, SLOT( startDateChanged( int, int, int ) ) ); 200 this, SLOT( startDateChanged( int, int, int ) ) );
185 201
186 //Let start button change both start and end dates 202 //Let start button change both start and end dates
187 connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), 203 connect( startPicker, SIGNAL( dateClicked( int, int, int ) ),
188 this, SLOT( endDateChanged( int, int, int ) ) ); 204 this, SLOT( endDateChanged( int, int, int ) ) );
189 connect( qApp, SIGNAL( clockChanged( bool ) ), 205 connect( qApp, SIGNAL( clockChanged( bool ) ),
190 this, SLOT( slotChangeClock( bool ) ) ); 206 this, SLOT( slotChangeClock( bool ) ) );
191 connect( qApp, SIGNAL(weekChanged(bool)), 207 connect( qApp, SIGNAL(weekChanged(bool)),
192 this, SLOT(slotChangeStartOfWeek(bool)) ); 208 this, SLOT(slotChangeStartOfWeek(bool)) );
193 209
194 QPopupMenu *m2 = new QPopupMenu( this ); 210 QPopupMenu *m2 = new QPopupMenu( this );
195 endPicker = new DateBookMonth( m2, 0, TRUE ); 211 endPicker = new DateBookMonth( m2, 0, TRUE );
196 m2->insertItem( endPicker ); 212 m2->insertItem( endPicker );
197 buttonEnd->setPopup( m2 ); 213 buttonEnd->setPopup( m2 );
198 connect( endPicker, SIGNAL( dateClicked( int, int, int ) ), 214 connect( endPicker, SIGNAL( dateClicked( int, int, int ) ),
199 this, SLOT( endDateChanged( int, int, int ) ) ); 215 this, SLOT( endDateChanged( int, int, int ) ) );
200 216
201 connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ), 217 connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ),
202 this, SLOT( startTimePicked(const QTime &) )); 218 this, SLOT( startTimePicked(const QTime &) ));
203 editNote->setFixedVisibleLines(3); 219 editNote->setFixedVisibleLines(3);
204 // install eventFilters 220 // install eventFilters
205 comboEnd->installEventFilter( this ); 221 comboEnd->installEventFilter( this );
206 comboStart->installEventFilter( this ); 222 comboStart->installEventFilter( this );
207} 223}
208 224
209/* 225/*
210 * Destroys the object and frees any allocated resources 226 * Destroys the object and frees any allocated resources
211 */ 227 */
212DateEntry::~DateEntry() 228DateEntry::~DateEntry()
213{ 229{
214 // no need to delete child widgets, Qt does it all for us 230 // no need to delete child widgets, Qt does it all for us
215 //cout << "Del: " << comboStart->currentText() << endl; 231 //cout << "Del: " << comboStart->currentText() << endl;
216} 232}
217 233
218/* 234/*
219 * public slot 235 * public slot
220 */ 236 */
221void DateEntry::endDateChanged( int y, int m, int d ) 237void DateEntry::endDateChanged( int y, int m, int d )
222{ 238{
223 endDate.setYMD( y, m, d ); 239 endDate.setYMD( y, m, d );
224 if ( endDate < startDate ) { 240 if ( endDate < startDate ) {
225 endDate = startDate; 241 endDate = startDate;
226 } 242 }
227 243
228 buttonEnd->setText( TimeString::shortDate( endDate ) ); 244 buttonEnd->setText( TimeString::shortDate( endDate ) );
229 245
230 endPicker->setDate( endDate.year(), endDate.month(), endDate.day() ); 246 endPicker->setDate( endDate.year(), endDate.month(), endDate.day() );
231} 247}
232 248
233static QTime parseTime( const QString& s, bool ampm ) 249static QTime parseTime( const QString& s, bool ampm )
234{ 250{
235 QTime tmpTime; 251 QTime tmpTime;
236 QStringList l = QStringList::split( ':', s ); 252 QStringList l = QStringList::split( ':', s );
237 int hour = l[0].toInt(); 253 int hour = l[0].toInt();
238 if ( ampm ) { 254 if ( ampm ) {
239 int i=0; 255 int i=0;
240 while (i<int(l[1].length()) && l[1][i]>='0' && l[1][i]<='9') 256 while (i<int(l[1].length()) && l[1][i]>='0' && l[1][i]<='9')
241 i++; 257 i++;
242 QString digits = l[1].left(i); 258 QString digits = l[1].left(i);
243 if ( l[1].contains( "PM", FALSE ) ) { 259 if ( l[1].contains( "PM", FALSE ) ) {
244 if ( hour != 12 ) 260 if ( hour != 12 )
245 hour += 12; 261 hour += 12;
246 } else { 262 } else {
247 if ( hour == 12 ) 263 if ( hour == 12 )
248 hour = 0; 264 hour = 0;
249 } 265 }
250 l[1] = digits; 266 l[1] = digits;
251 } 267 }
252 int minute = l[1].toInt(); 268 int minute = l[1].toInt();
253 if ( minute > 59 ) 269 if ( minute > 59 )
254 minute = 59; 270 minute = 59;
255 else if ( minute < 0 ) 271 else if ( minute < 0 )
256 minute = 0; 272 minute = 0;
257 if ( hour > 23 ) { 273 if ( hour > 23 ) {
258 hour = 23; 274 hour = 23;
259 minute = 59; 275 minute = 59;
260 } else if ( hour < 0 ) 276 } else if ( hour < 0 )
261 hour = 0; 277 hour = 0;
262 tmpTime.setHMS( hour, minute, 0 ); 278 tmpTime.setHMS( hour, minute, 0 );
263 return tmpTime; 279 return tmpTime;
264} 280}
265 281
266/* 282/*
267 * public slot 283 * public slot
268 */ 284 */
269void DateEntry::endTimeChanged( const QString &s ) 285void DateEntry::endTimeChanged( const QString &s )
270{ 286{
271 QTime tmpTime = parseTime(s,ampm); 287 endTimeChanged( parseTime(s,ampm) );
272 if ( endDate > startDate || tmpTime >= startTime ) { 288}
273 endTime = tmpTime; 289
290void DateEntry::endTimeChanged( const QTime &t ) {
291 if ( endDate > startDate || t >= startTime ) {
292 endTime = t;
274 } else { 293 } else {
275 endTime = startTime; 294 endTime = startTime;
276 //comboEnd->setCurrentItem( comboStart->currentItem() ); 295 //comboEnd->setCurrentItem( comboStart->currentItem() );
277 } 296 }
278 297 timePickerStart->setHour(endTime.hour());
279} 298 timePickerStart->setMinute(endTime.minute());
280
281void DateEntry::endTimeChanged( const QTime &t ) {
282} 299}
283 300
284/* 301/*
285 * public slot 302 * public slot
286 */ 303 */
287void DateEntry::startDateChanged( int y, int m, int d ) 304void DateEntry::startDateChanged( int y, int m, int d )
288{ 305{
289 QDate prev = startDate; 306 QDate prev = startDate;
290 startDate.setYMD( y, m, d ); 307 startDate.setYMD( y, m, d );
291 if ( rp.type == Event::Weekly && 308 if ( rp.type == Event::Weekly &&
292 startDate.dayOfWeek() != prev.dayOfWeek() ) { 309 startDate.dayOfWeek() != prev.dayOfWeek() ) {
293 // if we change the start of a weekly repeating event 310 // if we change the start of a weekly repeating event
294 // set the repeating day appropriately 311 // set the repeating day appropriately
295 char mask = 1 << (prev.dayOfWeek()-1); 312 char mask = 1 << (prev.dayOfWeek()-1);
296 rp.days &= (~mask); 313 rp.days &= (~mask);
297 rp.days |= 1 << (startDate.dayOfWeek()-1); 314 rp.days |= 1 << (startDate.dayOfWeek()-1);
298 } 315 }
299 316
300 buttonStart->setText( TimeString::shortDate( startDate ) ); 317 buttonStart->setText( TimeString::shortDate( startDate ) );
301 318
302 // our pickers must be reset... 319 // our pickers must be reset...
303 startPicker->setDate( y, m, d ); 320 startPicker->setDate( y, m, d );
304 endPicker->setDate( y, m, d ); 321 endPicker->setDate( y, m, d );
305} 322}
306 323
307/* 324/*
308 * public slot 325 * public slot
309 */ 326 */
310void DateEntry::startTimeEdited( const QString &s ) 327void DateEntry::startTimeEdited( const QString &s )
311{ 328{
312 startTimeChanged(parseTime(s,ampm)); 329 startTimeChanged(parseTime(s,ampm));
313 updateTimeEdit(false,true); 330 updateTimeEdit(false,true);
314 timePickerStart->setHour(startTime.hour()); 331 timePickerStart->setHour(startTime.hour());
315 timePickerStart->setMinute(startTime.minute()); 332 timePickerStart->setMinute(startTime.minute());
316} 333}
317 334
318void DateEntry::startTimeChanged( const QTime &t ) 335void DateEntry::startTimeChanged( const QTime &t )
319{ 336{
320 int duration=startTime.secsTo(endTime); 337 int duration=startTime.secsTo(endTime);
321 startTime = t; 338 startTime = t;
322 endTime=t.addSecs(duration); 339 endTime=t.addSecs(duration);
323} 340}
324void DateEntry::startTimePicked( const QTime &t ) { 341void DateEntry::startTimePicked( const QTime &t ) {
325 if(m_showStart ){ 342 if(m_showStart ){
326 startTimeChanged(t); 343 startTimeChanged(t);
327 updateTimeEdit(true,true); 344 updateTimeEdit(true,true);
328 }else{ 345 }else{
329 endTime = t; 346 endTimeChanged(t);
330 updateTimeEdit(false, true ); 347 updateTimeEdit(false, true );
331
332 } 348 }
333} 349}
334 350
335/* 351/*
336 * public slot 352 * public slot
337 */ 353 */
338void DateEntry::typeChanged( const QString &s ) 354void DateEntry::typeChanged( const QString &s )
339{ 355{
340 bool b = s != "All Day"; 356 bool b = s != "All Day";
341 buttonStart->setEnabled( b ); 357 buttonStart->setEnabled( b );
342 comboStart->setEnabled( b ); 358 comboStart->setEnabled( b );
343 comboEnd->setEnabled( b ); 359 comboEnd->setEnabled( b );
344} 360}
345 361
346void DateEntry::slotRepeat() 362void DateEntry::slotRepeat()
347{ 363{
348 // Work around for compiler Bug.. 364 // Work around for compiler Bug..
349 RepeatEntry *e; 365 RepeatEntry *e;
350 366
351 // it is better in my opinion to just grab this from the mother, 367 // it is better in my opinion to just grab this from the mother,
352 // since, this dialog doesn't need to keep track of it... 368 // since, this dialog doesn't need to keep track of it...
353 if ( rp.type != Event::NoRepeat ) 369 if ( rp.type != Event::NoRepeat )
354 e = new RepeatEntry( startWeekOnMonday, rp, startDate, this); 370 e = new RepeatEntry( startWeekOnMonday, rp, startDate, this);
355 else 371 else
356 e = new RepeatEntry( startWeekOnMonday, startDate, this ); 372 e = new RepeatEntry( startWeekOnMonday, startDate, this );
357 373
358#if defined(Q_WS_QWS) || defined(_WS_QWS_) 374#if defined(Q_WS_QWS) || defined(_WS_QWS_)
359 e->showMaximized(); 375 e->showMaximized();
360#endif 376#endif
361 if ( e->exec() ) { 377 if ( e->exec() ) {
362 rp = e->repeatPattern(); 378 rp = e->repeatPattern();
363 setRepeatLabel(); 379 setRepeatLabel();
364 } 380 }
365} 381}
366 382
367void DateEntry::slotChangeStartOfWeek( bool onMonday ) 383void DateEntry::slotChangeStartOfWeek( bool onMonday )
368{ 384{
369 startWeekOnMonday = onMonday; 385 startWeekOnMonday = onMonday;
370} 386}
371 387
372Event DateEntry::event() 388Event DateEntry::event()
373{ 389{
374 Event ev; 390 Event ev;
375 Event::SoundTypeChoice st; 391 Event::SoundTypeChoice st;
376 ev.setDescription( comboDescription->currentText() ); 392 ev.setDescription( comboDescription->currentText() );
377 ev.setLocation( comboLocation->currentText() ); 393 ev.setLocation( comboLocation->currentText() );
378 ev.setCategories( comboCategory->currentCategories() ); 394 ev.setCategories( comboCategory->currentCategories() );
379 ev.setType( checkAllDay->isChecked() ? Event::AllDay : Event::Normal ); 395 ev.setType( checkAllDay->isChecked() ? Event::AllDay : Event::Normal );
380 if ( startDate > endDate ) { 396 if ( startDate > endDate ) {
381 QDate tmp = endDate; 397 QDate tmp = endDate;
382 endDate = startDate; 398 endDate = startDate;
383 startDate = tmp; 399 startDate = tmp;
384 } 400 }
385 401
386 // This is now done in the changed slots 402 // This is now done in the changed slots
387 // startTime = parseTime( comboStart->text(), ampm ); 403 // startTime = parseTime( comboStart->text(), ampm );
388 //endTime = parseTime( comboEnd->text(), ampm ); 404 //endTime = parseTime( comboEnd->text(), ampm );
389 405
390 if ( startTime > endTime && endDate == startDate ) { 406 if ( startTime > endTime && endDate == startDate ) {
391 QTime tmp = endTime; 407 QTime tmp = endTime;
392 endTime = startTime; 408 endTime = startTime;
393 startTime = tmp; 409 startTime = tmp;
394 } 410 }
395 // don't set the time if theres no need too 411 // don't set the time if theres no need too
396 if ( ev.type() == Event::AllDay ) { 412 if ( ev.type() == Event::AllDay ) {
397 startTime.setHMS( 0, 0, 0 ); 413 startTime.setHMS( 0, 0, 0 );
398 endTime.setHMS( 23, 59, 59 ); 414 endTime.setHMS( 23, 59, 59 );
399 } 415 }
400 416
401 // adjust start and end times based on timezone 417 // adjust start and end times based on timezone
402 QDateTime start( startDate, startTime ); 418 QDateTime start( startDate, startTime );
403 QDateTime end( endDate, endTime ); 419 QDateTime end( endDate, endTime );
404 time_t start_utc, end_utc; 420 time_t start_utc, end_utc;
405 421
406// qDebug( "tz: %s", timezone->currentZone().latin1() ); 422// qDebug( "tz: %s", timezone->currentZone().latin1() );
407 423
408 // get real timezone 424 // get real timezone
409 QString realTZ; 425 QString realTZ;
410 realTZ = QString::fromLocal8Bit( getenv("TZ") ); 426 realTZ = QString::fromLocal8Bit( getenv("TZ") );
411 427
412 // set timezone 428 // set timezone
413 if ( setenv( "TZ", timezone->currentZone(), true ) != 0 ) 429 if ( setenv( "TZ", timezone->currentZone(), true ) != 0 )
414 qWarning( "There was a problem setting the timezone." ); 430 qWarning( "There was a problem setting the timezone." );
415 431
416 // convert to UTC based on selected TZ (calling tzset internally) 432 // convert to UTC based on selected TZ (calling tzset internally)
417 start_utc = TimeConversion::toUTC( start ); 433 start_utc = TimeConversion::toUTC( start );
418 end_utc = TimeConversion::toUTC( end ); 434 end_utc = TimeConversion::toUTC( end );
419 435
420 // done playing around... put it all back 436 // done playing around... put it all back
421 unsetenv( "TZ" ); 437 unsetenv( "TZ" );
422 if ( !realTZ.isNull() ) 438 if ( !realTZ.isNull() )
423 if ( setenv( "TZ", realTZ, true ) != 0 ) 439 if ( setenv( "TZ", realTZ, true ) != 0 )
424 qWarning( "There was a problem setting the timezone." ); 440 qWarning( "There was a problem setting the timezone." );
425 441
426 // convert UTC to local time (calling tzset internally) 442 // convert UTC to local time (calling tzset internally)
427 ev.setStart( TimeConversion::fromUTC( start_utc ) ); 443 ev.setStart( TimeConversion::fromUTC( start_utc ) );
428 ev.setEnd( TimeConversion::fromUTC( end_utc ) ); 444 ev.setEnd( TimeConversion::fromUTC( end_utc ) );
429 445
430 // we only have one type of sound at the moment... LOUD!!! 446 // we only have one type of sound at the moment... LOUD!!!
431 if ( comboSound->currentItem() != 0 ) 447 if ( comboSound->currentItem() != 0 )
432 st = Event::Loud; 448 st = Event::Loud;
433 else 449 else
434 st = Event::Silent; 450 st = Event::Silent;
435 ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st ); 451 ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st );
436 if ( rp.type != Event::NoRepeat ) 452 if ( rp.type != Event::NoRepeat )
437 ev.setRepeat( TRUE, rp ); 453 ev.setRepeat( TRUE, rp );
438 ev.setNotes( editNote->text() ); 454 ev.setNotes( editNote->text() );
439 455
440 //cout << "Start: " << comboStart->currentText() << endl; 456 //cout << "Start: " << comboStart->currentText() << endl;
441 457
442 return ev; 458 return ev;
443} 459}
444 460
445void DateEntry::setRepeatLabel() 461void DateEntry::setRepeatLabel()
446{ 462{
447 463
448 switch( rp.type ) { 464 switch( rp.type ) {
449 case Event::Daily: 465 case Event::Daily:
450 cmdRepeat->setText( tr("Daily...") ); 466 cmdRepeat->setText( tr("Daily...") );
451 break; 467 break;
452 case Event::Weekly: 468 case Event::Weekly:
453 cmdRepeat->setText( tr("Weekly...") ); 469 cmdRepeat->setText( tr("Weekly...") );
454 break; 470 break;
455 case Event::MonthlyDay: 471 case Event::MonthlyDay:
456 case Event::MonthlyDate: 472 case Event::MonthlyDate:
457 cmdRepeat->setText( tr("Monthly...") ); 473 cmdRepeat->setText( tr("Monthly...") );
458 break; 474 break;
459 case Event::Yearly: 475 case Event::Yearly:
460 cmdRepeat->setText( tr("Yearly...") ); 476 cmdRepeat->setText( tr("Yearly...") );
461 break; 477 break;
462 default: 478 default:
463 cmdRepeat->setText( tr("No Repeat...") ); 479 cmdRepeat->setText( tr("No Repeat...") );
464 } 480 }
465} 481}
466 482
467void DateEntry::setAlarmEnabled( bool alarmPreset, int presetTime, Event::SoundTypeChoice sound ) 483void DateEntry::setAlarmEnabled( bool alarmPreset, int presetTime, Event::SoundTypeChoice sound )
468{ 484{
469 checkAlarm->setChecked( alarmPreset ); 485 checkAlarm->setChecked( alarmPreset );
470 spinAlarm->setValue( presetTime ); 486 spinAlarm->setValue( presetTime );
471 if ( sound != Event::Silent ) 487 if ( sound != Event::Silent )
472 comboSound->setCurrentItem( 1 ); 488 comboSound->setCurrentItem( 1 );
473 else 489 else
474 comboSound->setCurrentItem( 0 ); 490 comboSound->setCurrentItem( 0 );
475} 491}
476 492
477void DateEntry::initCombos() 493void DateEntry::initCombos()
478{ 494{
479 /* 495 /*
480 comboStart->clear(); 496 comboStart->clear();
481 comboEnd->clear(); 497 comboEnd->clear();
482 if ( ampm ) { 498 if ( ampm ) {
483 for ( int i = 0; i < 24; i++ ) { 499 for ( int i = 0; i < 24; i++ ) {
484 if ( i == 0 ) { 500 if ( i == 0 ) {
485 comboStart->insertItem( "12:00 AM" ); 501 comboStart->insertItem( "12:00 AM" );
486 comboStart->insertItem( "12:30 AM" ); 502 comboStart->insertItem( "12:30 AM" );
487 comboEnd->insertItem( "12:00 AM" ); 503 comboEnd->insertItem( "12:00 AM" );
488 comboEnd->insertItem( "12:30 AM" ); 504 comboEnd->insertItem( "12:30 AM" );
489 } else if ( i == 12 ) { 505 } else if ( i == 12 ) {
490 comboStart->insertItem( "12:00 PM" ); 506 comboStart->insertItem( "12:00 PM" );
491 comboStart->insertItem( "12:30 PM" ); 507 comboStart->insertItem( "12:30 PM" );
492 comboEnd->insertItem( "12:00 PM" ); 508 comboEnd->insertItem( "12:00 PM" );
493 comboEnd->insertItem( "12:30 PM" ); 509 comboEnd->insertItem( "12:30 PM" );
494 } else if ( i > 12 ) { 510 } else if ( i > 12 ) {
495 comboStart->insertItem( QString::number( i - 12 ) + ":00 PM" ); 511 comboStart->insertItem( QString::number( i - 12 ) + ":00 PM" );
496 comboStart->insertItem( QString::number( i - 12 ) + ":30 PM" ); 512 comboStart->insertItem( QString::number( i - 12 ) + ":30 PM" );
497 comboEnd->insertItem( QString::number( i - 12 ) + ":00 PM" ); 513 comboEnd->insertItem( QString::number( i - 12 ) + ":00 PM" );
498 comboEnd->insertItem( QString::number( i - 12 ) + ":30 PM" ); 514 comboEnd->insertItem( QString::number( i - 12 ) + ":30 PM" );
499 } else { 515 } else {
500 comboStart->insertItem( QString::number( i) + ":00 AM" ); 516 comboStart->insertItem( QString::number( i) + ":00 AM" );
501 comboStart->insertItem( QString::number( i ) + ":30 AM" ); 517 comboStart->insertItem( QString::number( i ) + ":30 AM" );
502 comboEnd->insertItem( QString::number( i ) + ":00 AM" ); 518 comboEnd->insertItem( QString::number( i ) + ":00 AM" );
503 comboEnd->insertItem( QString::number( i ) + ":30 AM" ); 519 comboEnd->insertItem( QString::number( i ) + ":30 AM" );
504 } 520 }
505 } 521 }
506 } else { 522 } else {
507 for ( int i = 0; i < 24; i++ ) { 523 for ( int i = 0; i < 24; i++ ) {
508 if ( i < 10 ) { 524 if ( i < 10 ) {
509 comboStart->insertItem( QString("0") 525 comboStart->insertItem( QString("0")
510 + QString::number(i) + ":00" ); 526 + QString::number(i) + ":00" );
511 comboStart->insertItem( QString("0") 527 comboStart->insertItem( QString("0")
512 + QString::number(i) + ":30" ); 528 + QString::number(i) + ":30" );
513 comboEnd->insertItem( QString("0") 529 comboEnd->insertItem( QString("0")
514 + QString::number(i) + ":00" ); 530 + QString::number(i) + ":00" );
515 comboEnd->insertItem( QString("0") 531 comboEnd->insertItem( QString("0")
516 + QString::number(i) + ":30" ); 532 + QString::number(i) + ":30" );
517 } else { 533 } else {
518 comboStart->insertItem( QString::number(i) + ":00" ); 534 comboStart->insertItem( QString::number(i) + ":00" );
519 comboStart->insertItem( QString::number(i) + ":30" ); 535 comboStart->insertItem( QString::number(i) + ":30" );
520 comboEnd->insertItem( QString::number(i) + ":00" ); 536 comboEnd->insertItem( QString::number(i) + ":00" );
521 comboEnd->insertItem( QString::number(i) + ":30" ); 537 comboEnd->insertItem( QString::number(i) + ":30" );
522 } 538 }
523 } 539 }
524 } 540 }
525 */ 541 */
526} 542}
527 543
528void DateEntry::slotChangeClock( bool whichClock ) 544void DateEntry::slotChangeClock( bool whichClock )
529{ 545{
530 ampm = whichClock; 546 ampm = whichClock;
531 initCombos(); 547 initCombos();
532 setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) ); 548 setDates( QDateTime( startDate, startTime ), QDateTime( endDate, endTime ) );
533} 549}