summaryrefslogtreecommitdiff
path: root/core/pim/todo/todoentryimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/todoentryimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todoentryimpl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp
index 26a685c..dfaf9b4 100644
--- a/core/pim/todo/todoentryimpl.cpp
+++ b/core/pim/todo/todoentryimpl.cpp
@@ -1,14 +1,15 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** Copyright (C) 2002 zecke
3** 4**
4** This file is part of Qtopia Environment. 5** This file is part of Qtopia Environment.
5** 6**
6** This file may be distributed and/or modified under the terms of the 7** 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 8** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 10** packaging of this file.
10** 11**
11** 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
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 14**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
@@ -52,24 +53,25 @@ NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent,
52 date = todo.date(); 53 date = todo.date();
53 else 54 else
54 date = QDate::currentDate(); 55 date = QDate::currentDate();
55 56
56 init(); 57 init();
57 comboPriority->setCurrentItem( task.priority() - 1 ); 58 comboPriority->setCurrentItem( task.priority() - 1 );
58 59
59 checkCompleted->setChecked( task.isCompleted() ); 60 checkCompleted->setChecked( task.isCompleted() );
60 checkDate->setChecked( task.hasDate() ); 61 checkDate->setChecked( task.hasDate() );
61 buttonDate->setText( TimeString::longDateString( date ) ); 62 buttonDate->setText( TimeString::longDateString( date ) );
62 63
63 txtTodo->setText( task.description() ); 64 txtTodo->setText( task.description() );
65 lneSum->setText( task.summary() );
64} 66}
65 67
66/* 68/*
67 * Constructs a NewTaskDialog which is a child of 'parent', with the 69 * Constructs a NewTaskDialog which is a child of 'parent', with the
68 * name 'name' and widget flags set to 'f' 70 * name 'name' and widget flags set to 'f'
69 * 71 *
70 * The dialog will by default be modeless, unless you set 'modal' to 72 * The dialog will by default be modeless, unless you set 'modal' to
71 * TRUE to construct a modal dialog. 73 * TRUE to construct a modal dialog.
72 */ 74 */
73NewTaskDialog::NewTaskDialog( int id, QWidget* parent, const char* name, bool modal, 75NewTaskDialog::NewTaskDialog( int id, QWidget* parent, const char* name, bool modal,
74 WFlags fl ) 76 WFlags fl )
75 : NewTaskDialogBase( parent, name, modal, fl ), 77 : NewTaskDialogBase( parent, name, modal, fl ),
@@ -121,27 +123,28 @@ ToDoEvent NewTaskDialog::todoEntry()
121 todo.setHasDate( true ); 123 todo.setHasDate( true );
122 }else{ 124 }else{
123 todo.setHasDate( false ); 125 todo.setHasDate( false );
124 } 126 }
125 if ( comboCategory->currentCategory() != -1 ) { 127 if ( comboCategory->currentCategory() != -1 ) {
126 QArray<int> arr = comboCategory->currentCategories(); 128 QArray<int> arr = comboCategory->currentCategories();
127 QStringList list; 129 QStringList list;
128 list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ; 130 list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ;
129 todo.setCategories( list ); 131 todo.setCategories( list );
130 } 132 }
131 todo.setPriority( comboPriority->currentItem() + 1 ); 133 todo.setPriority( comboPriority->currentItem() + 1 );
132 todo.setCompleted( checkCompleted->isChecked() ); 134 todo.setCompleted( checkCompleted->isChecked() );
133 135
134 todo.setDescription( txtTodo->text() ); 136 todo.setDescription( txtTodo->text() );
135 137 todo.setSummary( lneSum->text() );
138
136 return todo; 139 return todo;
137} 140}
138 141
139 142
140/*! 143/*!
141 144
142*/ 145*/
143 146
144void NewTaskDialog::accept() 147void NewTaskDialog::accept()
145{ 148{
146 QString strText = txtTodo->text(); 149 QString strText = txtTodo->text();
147 if ( strText.isEmpty() ) { 150 if ( strText.isEmpty() ) {