author | zecke <zecke> | 2002-06-16 16:55:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-16 16:55:40 (UTC) |
commit | f63c4f952daeeda9787b8b700a9d50f20cdff88c (patch) (unidiff) | |
tree | fee143b48834b24ab56f7373571c8ef94f6314f3 /core/pim/todo | |
parent | 98f3588c957217c720779945a02bc01a164bfaa5 (diff) | |
download | opie-f63c4f952daeeda9787b8b700a9d50f20cdff88c.zip opie-f63c4f952daeeda9787b8b700a9d50f20cdff88c.tar.gz opie-f63c4f952daeeda9787b8b700a9d50f20cdff88c.tar.bz2 |
I dunno
-rw-r--r-- | core/pim/todo/todoentry.ui | 193 | ||||
-rw-r--r-- | core/pim/todo/todoentryimpl.cpp | 9 | ||||
-rw-r--r-- | core/pim/todo/todoentryimpl.h | 2 |
3 files changed, 128 insertions, 76 deletions
diff --git a/core/pim/todo/todoentry.ui b/core/pim/todo/todoentry.ui index 5da4bb7..9ffa89b 100644 --- a/core/pim/todo/todoentry.ui +++ b/core/pim/todo/todoentry.ui | |||
@@ -21,139 +21,182 @@ | |||
21 | *********************************************************************</comment> | 21 | *********************************************************************</comment> |
22 | <widget> | 22 | <widget> |
23 | <class>QDialog</class> | 23 | <class>QDialog</class> |
24 | <property stdset="1"> | 24 | <property stdset="1"> |
25 | <name>name</name> | 25 | <name>name</name> |
26 | <cstring>NewTaskDialogBase</cstring> | 26 | <cstring>NewTaskDialogBase</cstring> |
27 | </property> | 27 | </property> |
28 | <property stdset="1"> | 28 | <property stdset="1"> |
29 | <name>geometry</name> | 29 | <name>geometry</name> |
30 | <rect> | 30 | <rect> |
31 | <x>0</x> | 31 | <x>0</x> |
32 | <y>0</y> | 32 | <y>0</y> |
33 | <width>429</width> | 33 | <width>425</width> |
34 | <height>321</height> | 34 | <height>321</height> |
35 | </rect> | 35 | </rect> |
36 | </property> | 36 | </property> |
37 | <property stdset="1"> | 37 | <property stdset="1"> |
38 | <name>caption</name> | 38 | <name>caption</name> |
39 | <string>New Task</string> | 39 | <string>New Task</string> |
40 | </property> | 40 | </property> |
41 | <property> | 41 | <property> |
42 | <name>layoutMargin</name> | 42 | <name>layoutMargin</name> |
43 | </property> | 43 | </property> |
44 | <property> | 44 | <property> |
45 | <name>layoutSpacing</name> | 45 | <name>layoutSpacing</name> |
46 | </property> | 46 | </property> |
47 | <widget> | 47 | <widget> |
48 | <class>QLayoutWidget</class> | 48 | <class>QLayoutWidget</class> |
49 | <property stdset="1"> | 49 | <property stdset="1"> |
50 | <name>name</name> | 50 | <name>name</name> |
51 | <cstring>Layout22</cstring> | 51 | <cstring>Layout31</cstring> |
52 | </property> | 52 | </property> |
53 | <property stdset="1"> | 53 | <property stdset="1"> |
54 | <name>geometry</name> | 54 | <name>geometry</name> |
55 | <rect> | 55 | <rect> |
56 | <x>0</x> | 56 | <x>1</x> |
57 | <y>5</y> | 57 | <y>6</y> |
58 | <width>240</width> | 58 | <width>240</width> |
59 | <height>310</height> | 59 | <height>310</height> |
60 | </rect> | 60 | </rect> |
61 | </property> | 61 | </property> |
62 | <grid> | 62 | <grid> |
63 | <property stdset="1"> | 63 | <property stdset="1"> |
64 | <name>margin</name> | 64 | <name>margin</name> |
65 | <number>0</number> | 65 | <number>0</number> |
66 | </property> | 66 | </property> |
67 | <property stdset="1"> | 67 | <property stdset="1"> |
68 | <name>spacing</name> | 68 | <name>spacing</name> |
69 | <number>6</number> | 69 | <number>6</number> |
70 | </property> | 70 | </property> |
71 | <widget row="3" column="0" > | 71 | <widget row="2" column="0" > |
72 | <class>QLayoutWidget</class> | 72 | <class>QLayoutWidget</class> |
73 | <property stdset="1"> | 73 | <property stdset="1"> |
74 | <name>name</name> | 74 | <name>name</name> |
75 | <cstring>Layout18</cstring> | 75 | <cstring>Layout19</cstring> |
76 | </property> | 76 | </property> |
77 | <hbox> | 77 | <hbox> |
78 | <property stdset="1"> | 78 | <property stdset="1"> |
79 | <name>margin</name> | 79 | <name>margin</name> |
80 | <number>0</number> | 80 | <number>0</number> |
81 | </property> | 81 | </property> |
82 | <property stdset="1"> | 82 | <property stdset="1"> |
83 | <name>spacing</name> | 83 | <name>spacing</name> |
84 | <number>6</number> | 84 | <number>6</number> |
85 | </property> | 85 | </property> |
86 | <widget> | 86 | <widget> |
87 | <class>QLabel</class> | 87 | <class>QLabel</class> |
88 | <property stdset="1"> | 88 | <property stdset="1"> |
89 | <name>name</name> | 89 | <name>name</name> |
90 | <cstring>TextLabel3</cstring> | 90 | <cstring>txtProg</cstring> |
91 | </property> | ||
92 | <property stdset="1"> | ||
93 | <name>frameShape</name> | ||
94 | <enum>NoFrame</enum> | ||
95 | </property> | 91 | </property> |
96 | <property stdset="1"> | 92 | <property stdset="1"> |
97 | <name>text</name> | 93 | <name>text</name> |
98 | <string>Category:</string> | 94 | <string>Progress:</string> |
99 | </property> | 95 | </property> |
100 | </widget> | 96 | </widget> |
101 | <widget> | 97 | <widget> |
102 | <class>CategorySelect</class> | 98 | <class>QComboBox</class> |
99 | <item> | ||
100 | <property> | ||
101 | <name>text</name> | ||
102 | <string>0%</string> | ||
103 | </property> | ||
104 | </item> | ||
105 | <item> | ||
106 | <property> | ||
107 | <name>text</name> | ||
108 | <string>20%</string> | ||
109 | </property> | ||
110 | </item> | ||
111 | <item> | ||
112 | <property> | ||
113 | <name>text</name> | ||
114 | <string>40%</string> | ||
115 | </property> | ||
116 | </item> | ||
117 | <item> | ||
118 | <property> | ||
119 | <name>text</name> | ||
120 | <string>60%</string> | ||
121 | </property> | ||
122 | </item> | ||
123 | <item> | ||
124 | <property> | ||
125 | <name>text</name> | ||
126 | <string>80%</string> | ||
127 | </property> | ||
128 | </item> | ||
129 | <item> | ||
130 | <property> | ||
131 | <name>text</name> | ||
132 | <string>100%</string> | ||
133 | </property> | ||
134 | </item> | ||
103 | <property stdset="1"> | 135 | <property stdset="1"> |
104 | <name>name</name> | 136 | <name>name</name> |
105 | <cstring>comboCategory</cstring> | 137 | <cstring>cmbProg</cstring> |
106 | </property> | 138 | </property> |
107 | <property stdset="1"> | 139 | <property stdset="1"> |
108 | <name>minimumSize</name> | 140 | <name>maximumSize</name> |
109 | <size> | 141 | <size> |
110 | <width>60</width> | 142 | <width>45</width> |
111 | <height>0</height> | 143 | <height>32767</height> |
112 | </size> | 144 | </size> |
113 | </property> | 145 | </property> |
114 | </widget> | 146 | </widget> |
115 | </hbox> | 147 | </hbox> |
116 | </widget> | 148 | </widget> |
117 | <widget row="4" column="0" > | 149 | <widget row="3" column="0" > |
118 | <class>QLayoutWidget</class> | 150 | <class>QLayoutWidget</class> |
119 | <property stdset="1"> | 151 | <property stdset="1"> |
120 | <name>name</name> | 152 | <name>name</name> |
121 | <cstring>Layout4</cstring> | 153 | <cstring>Layout18</cstring> |
122 | </property> | 154 | </property> |
123 | <hbox> | 155 | <hbox> |
124 | <property stdset="1"> | 156 | <property stdset="1"> |
125 | <name>margin</name> | 157 | <name>margin</name> |
126 | <number>0</number> | 158 | <number>0</number> |
127 | </property> | 159 | </property> |
128 | <property stdset="1"> | 160 | <property stdset="1"> |
129 | <name>spacing</name> | 161 | <name>spacing</name> |
130 | <number>6</number> | 162 | <number>6</number> |
131 | </property> | 163 | </property> |
132 | <widget> | 164 | <widget> |
133 | <class>QLabel</class> | 165 | <class>QLabel</class> |
134 | <property stdset="1"> | 166 | <property stdset="1"> |
135 | <name>name</name> | 167 | <name>name</name> |
136 | <cstring>TextLabel1</cstring> | 168 | <cstring>TextLabel3</cstring> |
169 | </property> | ||
170 | <property stdset="1"> | ||
171 | <name>frameShape</name> | ||
172 | <enum>NoFrame</enum> | ||
137 | </property> | 173 | </property> |
138 | <property stdset="1"> | 174 | <property stdset="1"> |
139 | <name>text</name> | 175 | <name>text</name> |
140 | <string>Summary:</string> | 176 | <string>Category:</string> |
141 | </property> | 177 | </property> |
142 | </widget> | 178 | </widget> |
143 | <widget> | 179 | <widget> |
144 | <class>QLineEdit</class> | 180 | <class>CategorySelect</class> |
145 | <property stdset="1"> | 181 | <property stdset="1"> |
146 | <name>name</name> | 182 | <name>name</name> |
147 | <cstring>lneSum</cstring> | 183 | <cstring>comboCategory</cstring> |
184 | </property> | ||
185 | <property stdset="1"> | ||
186 | <name>minimumSize</name> | ||
187 | <size> | ||
188 | <width>60</width> | ||
189 | <height>0</height> | ||
190 | </size> | ||
148 | </property> | 191 | </property> |
149 | </widget> | 192 | </widget> |
150 | </hbox> | 193 | </hbox> |
151 | </widget> | 194 | </widget> |
152 | <widget row="0" column="0" > | 195 | <widget row="0" column="0" > |
153 | <class>QLayoutWidget</class> | 196 | <class>QLayoutWidget</class> |
154 | <property stdset="1"> | 197 | <property stdset="1"> |
155 | <name>name</name> | 198 | <name>name</name> |
156 | <cstring>Layout20</cstring> | 199 | <cstring>Layout20</cstring> |
157 | </property> | 200 | </property> |
158 | <hbox> | 201 | <hbox> |
159 | <property stdset="1"> | 202 | <property stdset="1"> |
@@ -216,24 +259,31 @@ | |||
216 | <sizepolicy> | 259 | <sizepolicy> |
217 | <hsizetype>7</hsizetype> | 260 | <hsizetype>7</hsizetype> |
218 | <vsizetype>0</vsizetype> | 261 | <vsizetype>0</vsizetype> |
219 | </sizepolicy> | 262 | </sizepolicy> |
220 | </property> | 263 | </property> |
221 | <property stdset="1"> | 264 | <property stdset="1"> |
222 | <name>currentItem</name> | 265 | <name>currentItem</name> |
223 | <number>2</number> | 266 | <number>2</number> |
224 | </property> | 267 | </property> |
225 | </widget> | 268 | </widget> |
226 | </hbox> | 269 | </hbox> |
227 | </widget> | 270 | </widget> |
271 | <widget row="5" column="0" > | ||
272 | <class>QMultiLineEdit</class> | ||
273 | <property stdset="1"> | ||
274 | <name>name</name> | ||
275 | <cstring>txtTodo</cstring> | ||
276 | </property> | ||
277 | </widget> | ||
228 | <widget row="1" column="0" > | 278 | <widget row="1" column="0" > |
229 | <class>QLayoutWidget</class> | 279 | <class>QLayoutWidget</class> |
230 | <property stdset="1"> | 280 | <property stdset="1"> |
231 | <name>name</name> | 281 | <name>name</name> |
232 | <cstring>Layout21</cstring> | 282 | <cstring>Layout21</cstring> |
233 | </property> | 283 | </property> |
234 | <hbox> | 284 | <hbox> |
235 | <property stdset="1"> | 285 | <property stdset="1"> |
236 | <name>margin</name> | 286 | <name>margin</name> |
237 | <number>0</number> | 287 | <number>0</number> |
238 | </property> | 288 | </property> |
239 | <property stdset="1"> | 289 | <property stdset="1"> |
@@ -270,133 +320,128 @@ | |||
270 | </property> | 320 | </property> |
271 | <property stdset="1"> | 321 | <property stdset="1"> |
272 | <name>enabled</name> | 322 | <name>enabled</name> |
273 | <bool>false</bool> | 323 | <bool>false</bool> |
274 | </property> | 324 | </property> |
275 | <property stdset="1"> | 325 | <property stdset="1"> |
276 | <name>text</name> | 326 | <name>text</name> |
277 | <string>1 Jan 2001</string> | 327 | <string>1 Jan 2001</string> |
278 | </property> | 328 | </property> |
279 | </widget> | 329 | </widget> |
280 | </hbox> | 330 | </hbox> |
281 | </widget> | 331 | </widget> |
282 | <widget row="2" column="0" > | 332 | <widget row="4" column="0" > |
283 | <class>QLayoutWidget</class> | 333 | <class>QLayoutWidget</class> |
284 | <property stdset="1"> | 334 | <property stdset="1"> |
285 | <name>name</name> | 335 | <name>name</name> |
286 | <cstring>Layout19</cstring> | 336 | <cstring>Layout30</cstring> |
287 | </property> | 337 | </property> |
288 | <hbox> | 338 | <hbox> |
289 | <property stdset="1"> | 339 | <property stdset="1"> |
290 | <name>margin</name> | 340 | <name>margin</name> |
291 | <number>0</number> | 341 | <number>0</number> |
292 | </property> | 342 | </property> |
293 | <property stdset="1"> | 343 | <property stdset="1"> |
294 | <name>spacing</name> | 344 | <name>spacing</name> |
295 | <number>6</number> | 345 | <number>6</number> |
296 | </property> | 346 | </property> |
297 | <widget> | 347 | <widget> |
298 | <class>QLabel</class> | 348 | <class>QLabel</class> |
299 | <property stdset="1"> | 349 | <property stdset="1"> |
300 | <name>name</name> | 350 | <name>name</name> |
301 | <cstring>txtProg</cstring> | 351 | <cstring>TextLabel1</cstring> |
302 | </property> | 352 | </property> |
303 | <property stdset="1"> | 353 | <property stdset="1"> |
304 | <name>text</name> | 354 | <name>text</name> |
305 | <string>Progress:</string> | 355 | <string>Summary:</string> |
306 | </property> | 356 | </property> |
307 | </widget> | 357 | </widget> |
308 | <widget> | 358 | <widget> |
309 | <class>QComboBox</class> | 359 | <class>QLineEdit</class> |
310 | <item> | ||
311 | <property> | ||
312 | <name>text</name> | ||
313 | <string>0%</string> | ||
314 | </property> | ||
315 | </item> | ||
316 | <item> | ||
317 | <property> | ||
318 | <name>text</name> | ||
319 | <string>20%</string> | ||
320 | </property> | ||
321 | </item> | ||
322 | <item> | ||
323 | <property> | ||
324 | <name>text</name> | ||
325 | <string>40%</string> | ||
326 | </property> | ||
327 | </item> | ||
328 | <item> | ||
329 | <property> | ||
330 | <name>text</name> | ||
331 | <string>60%</string> | ||
332 | </property> | ||
333 | </item> | ||
334 | <item> | ||
335 | <property> | ||
336 | <name>text</name> | ||
337 | <string>80%</string> | ||
338 | </property> | ||
339 | </item> | ||
340 | <item> | ||
341 | <property> | ||
342 | <name>text</name> | ||
343 | <string>100%</string> | ||
344 | </property> | ||
345 | </item> | ||
346 | <property stdset="1"> | 360 | <property stdset="1"> |
347 | <name>name</name> | 361 | <name>name</name> |
348 | <cstring>cmbProg</cstring> | 362 | <cstring>lneSum</cstring> |
363 | </property> | ||
364 | </widget> | ||
365 | <widget> | ||
366 | <class>OClickableLabel</class> | ||
367 | <property stdset="1"> | ||
368 | <name>name</name> | ||
369 | <cstring>lblDown</cstring> | ||
370 | </property> | ||
371 | <property stdset="1"> | ||
372 | <name>minimumSize</name> | ||
373 | <size> | ||
374 | <width>20</width> | ||
375 | <height>20</height> | ||
376 | </size> | ||
349 | </property> | 377 | </property> |
350 | <property stdset="1"> | 378 | <property stdset="1"> |
351 | <name>maximumSize</name> | 379 | <name>maximumSize</name> |
352 | <size> | 380 | <size> |
353 | <width>45</width> | 381 | <width>20</width> |
354 | <height>32767</height> | 382 | <height>20</height> |
355 | </size> | 383 | </size> |
356 | </property> | 384 | </property> |
357 | </widget> | 385 | </widget> |
358 | </hbox> | 386 | </hbox> |
359 | </widget> | 387 | </widget> |
360 | <widget row="5" column="0" > | ||
361 | <class>QMultiLineEdit</class> | ||
362 | <property stdset="1"> | ||
363 | <name>name</name> | ||
364 | <cstring>txtTodo</cstring> | ||
365 | </property> | ||
366 | </widget> | ||
367 | </grid> | 388 | </grid> |
368 | </widget> | 389 | </widget> |
369 | </widget> | 390 | </widget> |
370 | <customwidgets> | 391 | <customwidgets> |
371 | <customwidget> | 392 | <customwidget> |
372 | <class>CategorySelect</class> | 393 | <class>CategorySelect</class> |
373 | <header location="global">qpe/categoryselect.h</header> | 394 | <header location="global">qpe/categoryselect.h</header> |
374 | <sizehint> | 395 | <sizehint> |
375 | <width>-1</width> | 396 | <width>-1</width> |
376 | <height>-1</height> | 397 | <height>-1</height> |
377 | </sizehint> | 398 | </sizehint> |
378 | <container>0</container> | 399 | <container>0</container> |
379 | <sizepolicy> | 400 | <sizepolicy> |
380 | <hordata>7</hordata> | 401 | <hordata>7</hordata> |
381 | <verdata>1</verdata> | 402 | <verdata>1</verdata> |
382 | </sizepolicy> | 403 | </sizepolicy> |
383 | <pixmap>image0</pixmap> | 404 | <pixmap>image0</pixmap> |
384 | </customwidget> | 405 | </customwidget> |
406 | <customwidget> | ||
407 | <class>OClickableLabel</class> | ||
408 | <header location="global">opie/oclickablelabel.h</header> | ||
409 | <sizehint> | ||
410 | <width>-1</width> | ||
411 | <height>-1</height> | ||
412 | </sizehint> | ||
413 | <container>0</container> | ||
414 | <sizepolicy> | ||
415 | <hordata>5</hordata> | ||
416 | <verdata>5</verdata> | ||
417 | </sizepolicy> | ||
418 | <pixmap>image0</pixmap> | ||
419 | <signal>clicked()</signal> | ||
420 | <signal>toggled(bool)</signal> | ||
421 | <slot access="public">slotOn(bool)</slot> | ||
422 | </customwidget> | ||
385 | </customwidgets> | 423 | </customwidgets> |
386 | <images> | 424 | <images> |
387 | <image> | 425 | <image> |
388 | <name>image0</name> | 426 | <name>image0</name> |
389 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> | 427 | <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> |
390 | </image> | 428 | </image> |
391 | </images> | 429 | </images> |
392 | <connections> | 430 | <connections> |
393 | <connection> | 431 | <connection> |
394 | <sender>checkDate</sender> | 432 | <sender>checkDate</sender> |
395 | <signal>toggled(bool)</signal> | 433 | <signal>toggled(bool)</signal> |
396 | <receiver>buttonDate</receiver> | 434 | <receiver>buttonDate</receiver> |
397 | <slot>setEnabled(bool)</slot> | 435 | <slot>setEnabled(bool)</slot> |
398 | </connection> | 436 | </connection> |
437 | <connection> | ||
438 | <sender>lblDown</sender> | ||
439 | <signal>clicked()</signal> | ||
440 | <receiver>NewTaskDialogBase</receiver> | ||
441 | <slot>slotCopy()</slot> | ||
442 | </connection> | ||
399 | <slot access="protected">dateChanged( const QString & )</slot> | 443 | <slot access="protected">dateChanged( const QString & )</slot> |
400 | <slot access="protected">dateChanged( int, int, int )</slot> | 444 | <slot access="protected">dateChanged( int, int, int )</slot> |
445 | <slot access="protected">slotCopy()</slot> | ||
401 | </connections> | 446 | </connections> |
402 | </UI> | 447 | </UI> |
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp index f8e2f4d..dd01130 100644 --- a/core/pim/todo/todoentryimpl.cpp +++ b/core/pim/todo/todoentryimpl.cpp | |||
@@ -12,30 +12,32 @@ | |||
12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
14 | ** | 14 | ** |
15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
16 | ** | 16 | ** |
17 | ** Contact info@trolltech.com if any conditions of this licensing are | 17 | ** Contact info@trolltech.com if any conditions of this licensing are |
18 | ** not clear to you. | 18 | ** not clear to you. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | #include "todoentryimpl.h" | 22 | #include "todoentryimpl.h" |
23 | 23 | ||
24 | #include <opie/oclickablelabel.h> | ||
24 | #include <opie/todoevent.h> | 25 | #include <opie/todoevent.h> |
25 | #include <opie/tododb.h> | 26 | #include <opie/tododb.h> |
26 | 27 | ||
27 | #include <qpe/categoryselect.h> | 28 | #include <qpe/categoryselect.h> |
28 | #include <qpe/datebookmonth.h> | 29 | #include <qpe/datebookmonth.h> |
29 | #include <qpe/global.h> | 30 | #include <qpe/global.h> |
31 | #include <qpe/resource.h> | ||
30 | #include <qpe/imageedit.h> | 32 | #include <qpe/imageedit.h> |
31 | #include <qpe/timestring.h> | 33 | #include <qpe/timestring.h> |
32 | #include <qpe/palmtoprecord.h> | 34 | #include <qpe/palmtoprecord.h> |
33 | 35 | ||
34 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
35 | #include <qpopupmenu.h> | 37 | #include <qpopupmenu.h> |
36 | #include <qtoolbutton.h> | 38 | #include <qtoolbutton.h> |
37 | #include <qcombobox.h> | 39 | #include <qcombobox.h> |
38 | #include <qcheckbox.h> | 40 | #include <qcheckbox.h> |
39 | #include <qlineedit.h> | 41 | #include <qlineedit.h> |
40 | #include <qmultilineedit.h> | 42 | #include <qmultilineedit.h> |
41 | #include <qlabel.h> | 43 | #include <qlabel.h> |
@@ -90,24 +92,25 @@ void NewTaskDialog::init() | |||
90 | { | 92 | { |
91 | QPopupMenu *m1 = new QPopupMenu( this ); | 93 | QPopupMenu *m1 = new QPopupMenu( this ); |
92 | picker = new DateBookMonth( m1, 0, TRUE ); | 94 | picker = new DateBookMonth( m1, 0, TRUE ); |
93 | m1->insertItem( picker ); | 95 | m1->insertItem( picker ); |
94 | buttonDate->setPopup( m1 ); | 96 | buttonDate->setPopup( m1 ); |
95 | comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") ); | 97 | comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") ); |
96 | 98 | ||
97 | connect( picker, SIGNAL( dateClicked( int, int, int ) ), | 99 | connect( picker, SIGNAL( dateClicked( int, int, int ) ), |
98 | this, SLOT( dateChanged( int, int, int ) ) ); | 100 | this, SLOT( dateChanged( int, int, int ) ) ); |
99 | 101 | ||
100 | buttonDate->setText( TimeString::longDateString( date ) ); | 102 | buttonDate->setText( TimeString::longDateString( date ) ); |
101 | picker->setDate( date.year(), date.month(), date.day() ); | 103 | picker->setDate( date.year(), date.month(), date.day() ); |
104 | lblDown->setPixmap(Resource::loadPixmap("down") ); | ||
102 | } | 105 | } |
103 | 106 | ||
104 | /* | 107 | /* |
105 | * Destroys the object and frees any allocated resources | 108 | * Destroys the object and frees any allocated resources |
106 | */ | 109 | */ |
107 | NewTaskDialog::~NewTaskDialog() | 110 | NewTaskDialog::~NewTaskDialog() |
108 | { | 111 | { |
109 | // no need to delete child widgets, Qt does it all for us | 112 | // no need to delete child widgets, Qt does it all for us |
110 | } | 113 | } |
111 | void NewTaskDialog::dateChanged( int y, int m, int d ) | 114 | void NewTaskDialog::dateChanged( int y, int m, int d ) |
112 | { | 115 | { |
113 | date = QDate( y, m, d ); | 116 | date = QDate( y, m, d ); |
@@ -131,25 +134,29 @@ ToDoEvent NewTaskDialog::todoEntry() | |||
131 | list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ; | 134 | list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ; |
132 | todo.setCategories( list ); | 135 | todo.setCategories( list ); |
133 | } | 136 | } |
134 | todo.setPriority( comboPriority->currentItem() + 1 ); | 137 | todo.setPriority( comboPriority->currentItem() + 1 ); |
135 | todo.setCompleted( checkCompleted->isChecked() ); | 138 | todo.setCompleted( checkCompleted->isChecked() ); |
136 | 139 | ||
137 | todo.setDescription( txtTodo->text() ); | 140 | todo.setDescription( txtTodo->text() ); |
138 | todo.setSummary( lneSum->text() ); | 141 | todo.setSummary( lneSum->text() ); |
139 | QString text = cmbProg->currentText(); | 142 | QString text = cmbProg->currentText(); |
140 | todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() ); | 143 | todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() ); |
141 | return todo; | 144 | return todo; |
142 | } | 145 | } |
143 | 146 | void NewTaskDialog::slotCopy() | |
147 | { | ||
148 | txtTodo->clear(); | ||
149 | txtTodo->setText( lneSum->text() ); | ||
150 | } | ||
144 | 151 | ||
145 | /*! | 152 | /*! |
146 | 153 | ||
147 | */ | 154 | */ |
148 | 155 | ||
149 | void NewTaskDialog::accept() | 156 | void NewTaskDialog::accept() |
150 | { | 157 | { |
151 | QString strText = txtTodo->text(); | 158 | QString strText = txtTodo->text(); |
152 | if ( strText.isEmpty() ) { | 159 | if ( strText.isEmpty() ) { |
153 | // hmm... just decline it then, the user obviously didn't care about it | 160 | // hmm... just decline it then, the user obviously didn't care about it |
154 | QDialog::reject(); | 161 | QDialog::reject(); |
155 | return; | 162 | return; |
diff --git a/core/pim/todo/todoentryimpl.h b/core/pim/todo/todoentryimpl.h index 6407eb4..49d1274 100644 --- a/core/pim/todo/todoentryimpl.h +++ b/core/pim/todo/todoentryimpl.h | |||
@@ -38,24 +38,24 @@ class NewTaskDialog : public NewTaskDialogBase | |||
38 | 38 | ||
39 | public: | 39 | public: |
40 | NewTaskDialog( const ToDoEvent &task, QWidget *parent = 0, const char* name = 0, | 40 | NewTaskDialog( const ToDoEvent &task, QWidget *parent = 0, const char* name = 0, |
41 | bool modal = FALSE, WFlags fl = 0 ); | 41 | bool modal = FALSE, WFlags fl = 0 ); |
42 | NewTaskDialog( int id, QWidget* parent = 0, const char* name = 0, | 42 | NewTaskDialog( int id, QWidget* parent = 0, const char* name = 0, |
43 | bool modal = FALSE, WFlags fl = 0 ); | 43 | bool modal = FALSE, WFlags fl = 0 ); |
44 | ~NewTaskDialog(); | 44 | ~NewTaskDialog(); |
45 | 45 | ||
46 | ToDoEvent todoEntry(); | 46 | ToDoEvent todoEntry(); |
47 | 47 | ||
48 | protected slots: | 48 | protected slots: |
49 | void dateChanged( int y, int m, int d ); | 49 | void dateChanged( int y, int m, int d ); |
50 | 50 | void slotCopy(); | |
51 | protected: | 51 | protected: |
52 | virtual void accept(); | 52 | virtual void accept(); |
53 | 53 | ||
54 | private: | 54 | private: |
55 | void init(); | 55 | void init(); |
56 | ToDoEvent todo; | 56 | ToDoEvent todo; |
57 | QDate date; | 57 | QDate date; |
58 | DateBookMonth *picker; | 58 | DateBookMonth *picker; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | #endif // NEWTASKDIALOG_H | 61 | #endif // NEWTASKDIALOG_H |