summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoeditor.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/kotodoeditor.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'korganizer/kotodoeditor.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoeditor.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/korganizer/kotodoeditor.h b/korganizer/kotodoeditor.h
new file mode 100644
index 0000000..2657bd8
--- a/dev/null
+++ b/korganizer/kotodoeditor.h
@@ -0,0 +1,102 @@
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 1997, 1998 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution.
23*/
24#ifndef _KOTODOEDITOR_H
25#define _KOTODOEDITOR_H
26
27#include <libkcal/calendar.h>
28
29#include "koeditorgeneraltodo.h"
30#include "koeditordetails.h"
31#include "koincidenceeditor.h"
32
33class QDateTime;
34
35/**
36 This class provides a dialog for editing a Todo.
37*/
38class KOTodoEditor : public KOIncidenceEditor
39{
40 Q_OBJECT
41 public:
42 /**
43 Constructs a new todo editor.
44 */
45 KOTodoEditor( Calendar *calendar, QWidget *parent );
46 virtual ~KOTodoEditor();
47
48 void init();
49
50 void reload();
51 void setSecrecy( int sec );
52 /**
53 Clear editor for new todo, and preset the dates and times with hint.
54 */
55 void newTodo(QDateTime due,Todo *relatedTodo=0,bool allDay=false);
56
57 /** Edit an existing todo. */
58 void editTodo(Todo * ,bool editDescription = false );
59
60 /** Set widgets to default values */
61 void setDefaults(QDateTime due,Todo *relatedTodo,bool allDay);
62 /** Read event object and setup widgets accordingly */
63 void readTodo(Todo *);
64 /** Write event settings to event object */
65 void writeTodo(Todo *);
66
67 /** Check if the input is valid. */
68 bool validateInput();
69 /** Process user input and create or update event. Returns false if input
70 * is not valid */
71 bool processInput( bool );
72
73 /** This todo has been modified externally */
74 void modified (int);
75 void setCategories( QString s );
76 signals:
77 void todoChanged(Todo *);
78 void todoAdded(Todo *);
79 void todoToBeDeleted(Todo *);
80 void todoDeleted();
81
82 protected slots:
83 void loadDefaults();
84 void deleteTodo();
85
86 void slotLoadTemplate();
87 void slotSaveTemplate();
88 void saveTemplate( const QString & );
89
90 protected:
91 void setupGeneral();
92 int msgItemDelete();
93
94 private:
95 Todo *mTodo;
96
97 Incidence *mRelatedTodo;
98
99 KOEditorGeneralTodo *mGeneral;
100};
101
102#endif