summaryrefslogtreecommitdiff
path: root/core/pim/todo/todoeditor.cpp
authorzecke <zecke>2002-10-07 11:39:30 (UTC)
committer zecke <zecke>2002-10-07 11:39:30 (UTC)
commitf11d4bda64b58abfebf77485d5d77143a10dc8c9 (patch) (side-by-side diff)
treea4e80550c4abe867303553de608316941dd943f1 /core/pim/todo/todoeditor.cpp
parentc2cd5470fa3ec69394fa65ad16ab29a6cadab56f (diff)
downloadopie-f11d4bda64b58abfebf77485d5d77143a10dc8c9.zip
opie-f11d4bda64b58abfebf77485d5d77143a10dc8c9.tar.gz
opie-f11d4bda64b58abfebf77485d5d77143a10dc8c9.tar.bz2
Re add files
for todo
Diffstat (limited to 'core/pim/todo/todoeditor.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todoeditor.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp
new file mode 100644
index 0000000..c9ade20
--- a/dev/null
+++ b/core/pim/todo/todoeditor.cpp
@@ -0,0 +1,53 @@
+
+#include "todoentryimpl.h"
+#include "todoeditor.h"
+
+using namespace Todo;
+
+Editor::Editor() {
+ m_accepted = false;
+}
+Editor::~Editor() {
+}
+OTodo Editor::newTodo( int cur,
+ QWidget* par) {
+
+ NewTaskDialog e( cur, par, 0, TRUE );
+
+
+#if defined(Q_WS_QWS) || defined(_WS_QWS_)
+ e.showMaximized();
+#endif
+
+ int ret = e.exec();
+ if ( QDialog::Accepted == ret ) {
+ m_accepted = true;
+ }else
+ m_accepted = false;
+
+ OTodo ev = e.todoEntry();
+ ev.setUid(1);
+
+ return ev;
+}
+OTodo Editor::edit( QWidget *wid,
+ const OTodo& todo ) {
+ NewTaskDialog e( todo, wid, 0, TRUE );
+ e.setCaption( QObject::tr( "Edit Task" ) );
+
+#if defined(Q_WS_QWS) || defined(_WS_QWS_)
+ e.showMaximized();
+#endif
+ int ret = e.exec();
+
+ OTodo ev = e.todoEntry();
+ if ( ret == QDialog::Accepted )
+ m_accepted = true;
+ else
+ m_accepted = false;
+
+ return ev;
+}
+bool Editor::accepted()const {
+ return m_accepted;
+}