summaryrefslogtreecommitdiff
path: root/core/pim/todo/todoeditor.cpp
Side-by-side diff
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;
+}