summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todoentry.ui226
-rw-r--r--core/pim/todo/todoentryimpl.cpp4
2 files changed, 154 insertions, 76 deletions
diff --git a/core/pim/todo/todoentry.ui b/core/pim/todo/todoentry.ui
index 87ee68c..5da4bb7 100644
--- a/core/pim/todo/todoentry.ui
+++ b/core/pim/todo/todoentry.ui
@@ -30,7 +30,7 @@
30 <rect> 30 <rect>
31 <x>0</x> 31 <x>0</x>
32 <y>0</y> 32 <y>0</y>
33 <width>245</width> 33 <width>429</width>
34 <height>321</height> 34 <height>321</height>
35 </rect> 35 </rect>
36 </property> 36 </property>
@@ -48,18 +48,18 @@
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>Layout3</cstring> 51 <cstring>Layout22</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>1</x> 56 <x>0</x>
57 <y>25</y> 57 <y>5</y>
58 <width>243</width> 58 <width>240</width>
59 <height>17</height> 59 <height>310</height>
60 </rect> 60 </rect>
61 </property> 61 </property>
62 <hbox> 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>
@@ -68,55 +68,53 @@
68 <name>spacing</name> 68 <name>spacing</name>
69 <number>6</number> 69 <number>6</number>
70 </property> 70 </property>
71 <widget> 71 <widget row="3" column="0" >
72 <class>QLabel</class> 72 <class>QLayoutWidget</class>
73 <property stdset="1">
74 <name>name</name>
75 <cstring>TextLabel3</cstring>
76 </property>
77 <property stdset="1">
78 <name>frameShape</name>
79 <enum>NoFrame</enum>
80 </property>
81 <property stdset="1">
82 <name>text</name>
83 <string>Category:</string>
84 </property>
85 </widget>
86 <widget>
87 <class>CategorySelect</class>
88 <property stdset="1"> 73 <property stdset="1">
89 <name>name</name> 74 <name>name</name>
90 <cstring>comboCategory</cstring> 75 <cstring>Layout18</cstring>
91 </property> 76 </property>
77 <hbox>
78 <property stdset="1">
79 <name>margin</name>
80 <number>0</number>
81 </property>
82 <property stdset="1">
83 <name>spacing</name>
84 <number>6</number>
85 </property>
86 <widget>
87 <class>QLabel</class>
88 <property stdset="1">
89 <name>name</name>
90 <cstring>TextLabel3</cstring>
91 </property>
92 <property stdset="1">
93 <name>frameShape</name>
94 <enum>NoFrame</enum>
95 </property>
96 <property stdset="1">
97 <name>text</name>
98 <string>Category:</string>
99 </property>
100 </widget>
101 <widget>
102 <class>CategorySelect</class>
103 <property stdset="1">
104 <name>name</name>
105 <cstring>comboCategory</cstring>
106 </property>
107 <property stdset="1">
108 <name>minimumSize</name>
109 <size>
110 <width>60</width>
111 <height>0</height>
112 </size>
113 </property>
114 </widget>
115 </hbox>
92 </widget> 116 </widget>
93 </hbox> 117 <widget row="4" column="0" >
94 </widget>
95 <widget>
96 <class>QLayoutWidget</class>
97 <property stdset="1">
98 <name>name</name>
99 <cstring>Layout6</cstring>
100 </property>
101 <property stdset="1">
102 <name>geometry</name>
103 <rect>
104 <x>0</x>
105 <y>0</y>
106 <width>240</width>
107 <height>320</height>
108 </rect>
109 </property>
110 <grid>
111 <property stdset="1">
112 <name>margin</name>
113 <number>0</number>
114 </property>
115 <property stdset="1">
116 <name>spacing</name>
117 <number>6</number>
118 </property>
119 <widget row="2" column="0" >
120 <class>QLayoutWidget</class> 118 <class>QLayoutWidget</class>
121 <property stdset="1"> 119 <property stdset="1">
122 <name>name</name> 120 <name>name</name>
@@ -151,18 +149,87 @@
151 </widget> 149 </widget>
152 </hbox> 150 </hbox>
153 </widget> 151 </widget>
154 <widget row="3" column="0" > 152 <widget row="0" column="0" >
155 <class>QMultiLineEdit</class> 153 <class>QLayoutWidget</class>
156 <property stdset="1"> 154 <property stdset="1">
157 <name>name</name> 155 <name>name</name>
158 <cstring>txtTodo</cstring> 156 <cstring>Layout20</cstring>
159 </property> 157 </property>
158 <hbox>
159 <property stdset="1">
160 <name>margin</name>
161 <number>0</number>
162 </property>
163 <property stdset="1">
164 <name>spacing</name>
165 <number>6</number>
166 </property>
167 <widget>
168 <class>QLabel</class>
169 <property stdset="1">
170 <name>name</name>
171 <cstring>TextLabel2</cstring>
172 </property>
173 <property stdset="1">
174 <name>text</name>
175 <string>Priority:</string>
176 </property>
177 </widget>
178 <widget>
179 <class>QComboBox</class>
180 <item>
181 <property>
182 <name>text</name>
183 <string>1 - Very High</string>
184 </property>
185 </item>
186 <item>
187 <property>
188 <name>text</name>
189 <string>2 - High</string>
190 </property>
191 </item>
192 <item>
193 <property>
194 <name>text</name>
195 <string>3 - Normal</string>
196 </property>
197 </item>
198 <item>
199 <property>
200 <name>text</name>
201 <string>4 - Low</string>
202 </property>
203 </item>
204 <item>
205 <property>
206 <name>text</name>
207 <string>5 - Very Low</string>
208 </property>
209 </item>
210 <property stdset="1">
211 <name>name</name>
212 <cstring>comboPriority</cstring>
213 </property>
214 <property stdset="1">
215 <name>sizePolicy</name>
216 <sizepolicy>
217 <hsizetype>7</hsizetype>
218 <vsizetype>0</vsizetype>
219 </sizepolicy>
220 </property>
221 <property stdset="1">
222 <name>currentItem</name>
223 <number>2</number>
224 </property>
225 </widget>
226 </hbox>
160 </widget> 227 </widget>
161 <widget row="1" column="0" > 228 <widget row="1" column="0" >
162 <class>QLayoutWidget</class> 229 <class>QLayoutWidget</class>
163 <property stdset="1"> 230 <property stdset="1">
164 <name>name</name> 231 <name>name</name>
165 <cstring>Layout4</cstring> 232 <cstring>Layout21</cstring>
166 </property> 233 </property>
167 <hbox> 234 <hbox>
168 <property stdset="1"> 235 <property stdset="1">
@@ -212,11 +279,11 @@
212 </widget> 279 </widget>
213 </hbox> 280 </hbox>
214 </widget> 281 </widget>
215 <widget row="0" column="0" > 282 <widget row="2" column="0" >
216 <class>QLayoutWidget</class> 283 <class>QLayoutWidget</class>
217 <property stdset="1"> 284 <property stdset="1">
218 <name>name</name> 285 <name>name</name>
219 <cstring>Layout4</cstring> 286 <cstring>Layout19</cstring>
220 </property> 287 </property>
221 <hbox> 288 <hbox>
222 <property stdset="1"> 289 <property stdset="1">
@@ -231,11 +298,11 @@
231 <class>QLabel</class> 298 <class>QLabel</class>
232 <property stdset="1"> 299 <property stdset="1">
233 <name>name</name> 300 <name>name</name>
234 <cstring>TextLabel2</cstring> 301 <cstring>txtProg</cstring>
235 </property> 302 </property>
236 <property stdset="1"> 303 <property stdset="1">
237 <name>text</name> 304 <name>text</name>
238 <string>Priority:</string> 305 <string>Progress:</string>
239 </property> 306 </property>
240 </widget> 307 </widget>
241 <widget> 308 <widget>
@@ -243,51 +310,60 @@
243 <item> 310 <item>
244 <property> 311 <property>
245 <name>text</name> 312 <name>text</name>
246 <string>1 - Very High</string> 313 <string>0%</string>
247 </property> 314 </property>
248 </item> 315 </item>
249 <item> 316 <item>
250 <property> 317 <property>
251 <name>text</name> 318 <name>text</name>
252 <string>2 - High</string> 319 <string>20%</string>
253 </property> 320 </property>
254 </item> 321 </item>
255 <item> 322 <item>
256 <property> 323 <property>
257 <name>text</name> 324 <name>text</name>
258 <string>3 - Normal</string> 325 <string>40%</string>
259 </property> 326 </property>
260 </item> 327 </item>
261 <item> 328 <item>
262 <property> 329 <property>
263 <name>text</name> 330 <name>text</name>
264 <string>4 - Low</string> 331 <string>60%</string>
265 </property> 332 </property>
266 </item> 333 </item>
267 <item> 334 <item>
268 <property> 335 <property>
269 <name>text</name> 336 <name>text</name>
270 <string>5 - Very Low</string> 337 <string>80%</string>
338 </property>
339 </item>
340 <item>
341 <property>
342 <name>text</name>
343 <string>100%</string>
271 </property> 344 </property>
272 </item> 345 </item>
273 <property stdset="1"> 346 <property stdset="1">
274 <name>name</name> 347 <name>name</name>
275 <cstring>comboPriority</cstring> 348 <cstring>cmbProg</cstring>
276 </property> 349 </property>
277 <property stdset="1"> 350 <property stdset="1">
278 <name>sizePolicy</name> 351 <name>maximumSize</name>
279 <sizepolicy> 352 <size>
280 <hsizetype>7</hsizetype> 353 <width>45</width>
281 <vsizetype>0</vsizetype> 354 <height>32767</height>
282 </sizepolicy> 355 </size>
283 </property>
284 <property stdset="1">
285 <name>currentItem</name>
286 <number>2</number>
287 </property> 356 </property>
288 </widget> 357 </widget>
289 </hbox> 358 </hbox>
290 </widget> 359 </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>
291 </grid> 367 </grid>
292 </widget> 368 </widget>
293</widget> 369</widget>
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp
index dfaf9b4..f8e2f4d 100644
--- a/core/pim/todo/todoentryimpl.cpp
+++ b/core/pim/todo/todoentryimpl.cpp
@@ -63,6 +63,7 @@ NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent,
63 63
64 txtTodo->setText( task.description() ); 64 txtTodo->setText( task.description() );
65 lneSum->setText( task.summary() ); 65 lneSum->setText( task.summary() );
66 cmbProg->setCurrentItem( task.progress()/20 );
66} 67}
67 68
68/* 69/*
@@ -135,7 +136,8 @@ ToDoEvent NewTaskDialog::todoEntry()
135 136
136 todo.setDescription( txtTodo->text() ); 137 todo.setDescription( txtTodo->text() );
137 todo.setSummary( lneSum->text() ); 138 todo.setSummary( lneSum->text() );
138 139 QString text = cmbProg->currentText();
140 todo.setProgress( text.remove( text.length()-1, 1 ).toUShort() );
139 return todo; 141 return todo;
140} 142}
141 143