Diffstat (limited to 'core/pim/todo/todoentryimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/todo/todoentryimpl.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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; |