Diffstat (limited to 'core/pim/todo/todoeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/todoeditor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp index 78aedd6..879d809 100644 --- a/core/pim/todo/todoeditor.cpp +++ b/core/pim/todo/todoeditor.cpp | |||
@@ -1,62 +1,62 @@ | |||
1 | 1 | ||
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | 3 | ||
4 | #include "otaskeditor.h" | 4 | #include "otaskeditor.h" |
5 | #include "todoeditor.h" | 5 | #include "todoeditor.h" |
6 | 6 | ||
7 | using namespace Todo; | 7 | using namespace Todo; |
8 | 8 | ||
9 | Editor::Editor() { | 9 | Editor::Editor() { |
10 | m_accepted = false; | 10 | m_accepted = false; |
11 | m_self = 0l; | 11 | m_self = 0l; |
12 | } | 12 | } |
13 | Editor::~Editor() { | 13 | Editor::~Editor() { |
14 | delete m_self; | 14 | delete m_self; |
15 | m_self = 0; | 15 | m_self = 0; |
16 | } | 16 | } |
17 | OTodo Editor::newTodo( int cur, | 17 | OPimTodo Editor::newTodo( int cur, |
18 | QWidget*) { | 18 | QWidget*) { |
19 | 19 | ||
20 | OTaskEditor *e = self(); | 20 | OTaskEditor *e = self(); |
21 | e->setCaption( QObject::tr("Enter Task") ); | 21 | e->setCaption( QObject::tr("Enter Task") ); |
22 | e->init( cur ); | 22 | e->init( cur ); |
23 | 23 | ||
24 | int ret = QPEApplication::execDialog( e ); | 24 | int ret = QPEApplication::execDialog( e ); |
25 | 25 | ||
26 | if ( QDialog::Accepted == ret ) { | 26 | if ( QDialog::Accepted == ret ) { |
27 | m_accepted = true; | 27 | m_accepted = true; |
28 | }else | 28 | }else |
29 | m_accepted = false; | 29 | m_accepted = false; |
30 | 30 | ||
31 | OTodo ev = e->todo(); | 31 | OPimTodo ev = e->todo(); |
32 | qWarning("Todo uid"); | 32 | qWarning("Todo uid"); |
33 | qWarning("Todo %s %d %d", ev.summary().latin1(), ev.progress(), ev.isCompleted() ); | 33 | qWarning("Todo %s %d %d", ev.summary().latin1(), ev.progress(), ev.isCompleted() ); |
34 | ev.setUid(1); | 34 | ev.setUid(1); |
35 | 35 | ||
36 | return ev; | 36 | return ev; |
37 | } | 37 | } |
38 | OTodo Editor::edit( QWidget *, | 38 | OPimTodo Editor::edit( QWidget *, |
39 | const OTodo& todo ) { | 39 | const OPimTodo& todo ) { |
40 | OTaskEditor *e = self(); | 40 | OTaskEditor *e = self(); |
41 | e->init( todo ); | 41 | e->init( todo ); |
42 | e->setCaption( QObject::tr( "Edit Task" ) ); | 42 | e->setCaption( QObject::tr( "Edit Task" ) ); |
43 | 43 | ||
44 | int ret = QPEApplication::execDialog( e ); | 44 | int ret = QPEApplication::execDialog( e ); |
45 | 45 | ||
46 | OTodo ev = e->todo(); | 46 | OPimTodo ev = e->todo(); |
47 | if ( ret == QDialog::Accepted ) | 47 | if ( ret == QDialog::Accepted ) |
48 | m_accepted = true; | 48 | m_accepted = true; |
49 | else | 49 | else |
50 | m_accepted = false; | 50 | m_accepted = false; |
51 | 51 | ||
52 | return ev; | 52 | return ev; |
53 | } | 53 | } |
54 | bool Editor::accepted()const { | 54 | bool Editor::accepted()const { |
55 | return m_accepted; | 55 | return m_accepted; |
56 | } | 56 | } |
57 | OTaskEditor* Editor::self() { | 57 | OTaskEditor* Editor::self() { |
58 | if (!m_self ) | 58 | if (!m_self ) |
59 | m_self = new OTaskEditor(0); | 59 | m_self = new OTaskEditor(0); |
60 | 60 | ||
61 | return m_self; | 61 | return m_self; |
62 | } | 62 | } |