-rw-r--r-- | korganizer/kotodoview.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9180015..ecd0ad9 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -1,169 +1,170 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000, 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef KOTODOVIEW_H | 23 | #ifndef KOTODOVIEW_H |
24 | #define KOTODOVIEW_H | 24 | #define KOTODOVIEW_H |
25 | 25 | ||
26 | #include <qfont.h> | 26 | #include <qfont.h> |
27 | #include <qfontmetrics.h> | 27 | #include <qfontmetrics.h> |
28 | #include <qlineedit.h> | 28 | #include <qlineedit.h> |
29 | #include <qptrlist.h> | 29 | #include <qptrlist.h> |
30 | #include <qstrlist.h> | 30 | #include <qstrlist.h> |
31 | #include <qlistbox.h> | 31 | #include <qlistbox.h> |
32 | #include <qpopupmenu.h> | 32 | #include <qpopupmenu.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qmap.h> | 34 | #include <qmap.h> |
35 | #include <qdialog.h> | 35 | #include <qdialog.h> |
36 | #include <qlabel.h> | 36 | #include <qlabel.h> |
37 | #include <qlistview.h> | 37 | #include <qlistview.h> |
38 | #include <klistview.h> | 38 | #include <klistview.h> |
39 | 39 | ||
40 | #include <libkcal/calendar.h> | 40 | #include <libkcal/calendar.h> |
41 | #include <libkcal/todo.h> | 41 | #include <libkcal/todo.h> |
42 | 42 | ||
43 | #include <korganizer/baseview.h> | 43 | #include <korganizer/baseview.h> |
44 | 44 | ||
45 | #include "kotodoviewitem.h" | 45 | #include "kotodoviewitem.h" |
46 | #include "koprefs.h" | 46 | #include "koprefs.h" |
47 | #include "koglobals.h" | 47 | #include "koglobals.h" |
48 | #include "datenavigator.h" | 48 | #include "datenavigator.h" |
49 | 49 | ||
50 | class QDragEnterEvent; | 50 | class QDragEnterEvent; |
51 | class QDragMoveEvent; | 51 | class QDragMoveEvent; |
52 | class QDragLeaveEvent; | 52 | class QDragLeaveEvent; |
53 | class QDropEvent; | 53 | class QDropEvent; |
54 | class KOTodoViewWhatsThis; | 54 | class KOTodoViewWhatsThis; |
55 | class KDateEdit; | 55 | class KDateEdit; |
56 | class KOTimeEdit; | 56 | class KOTimeEdit; |
57 | 57 | ||
58 | class DocPrefs; | 58 | class DocPrefs; |
59 | 59 | ||
60 | 60 | ||
61 | class KOStopTodoPrefs : public QDialog | 61 | class KOStopTodoPrefs : public QDialog |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | KOStopTodoPrefs( Todo* todo, QWidget *parent=0, const char *name=0 ) ; | 65 | KOStopTodoPrefs( Todo* todo, QWidget *parent=0, const char *name=0 ) ; |
66 | 66 | ||
67 | 67 | ||
68 | private slots: | 68 | private slots: |
69 | void doNotSave(); | 69 | void doNotSave(); |
70 | void accept(); | 70 | void accept(); |
71 | private: | 71 | private: |
72 | Todo* mTodo; | 72 | Todo* mTodo; |
73 | QLineEdit* mComment; | 73 | QLineEdit* mComment; |
74 | QDateTime mStop; | ||
74 | KDateEdit *sde, *ede; | 75 | KDateEdit *sde, *ede; |
75 | KOTimeEdit *ste, *ete; | 76 | KOTimeEdit *ste, *ete; |
76 | 77 | ||
77 | }; | 78 | }; |
78 | 79 | ||
79 | class KOStartTodoPrefs : public QDialog | 80 | class KOStartTodoPrefs : public QDialog |
80 | { | 81 | { |
81 | Q_OBJECT | 82 | Q_OBJECT |
82 | public: | 83 | public: |
83 | KOStartTodoPrefs( QString sum, QWidget *parent=0, const char *name=0 ) ; | 84 | KOStartTodoPrefs( QString sum, QWidget *parent=0, const char *name=0 ) ; |
84 | 85 | ||
85 | bool stopAll() { return mStopAll; } | 86 | bool stopAll() { return mStopAll; } |
86 | private slots: | 87 | private slots: |
87 | void doStop(); | 88 | void doStop(); |
88 | private: | 89 | private: |
89 | bool mStopAll; | 90 | bool mStopAll; |
90 | 91 | ||
91 | }; | 92 | }; |
92 | 93 | ||
93 | class KOTodoListView : public KListView | 94 | class KOTodoListView : public KListView |
94 | { | 95 | { |
95 | Q_OBJECT | 96 | Q_OBJECT |
96 | public: | 97 | public: |
97 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); | 98 | KOTodoListView(Calendar *,QWidget *parent=0,const char *name=0); |
98 | virtual ~KOTodoListView() {} | 99 | virtual ~KOTodoListView() {} |
99 | 100 | ||
100 | signals: | 101 | signals: |
101 | void paintNeeded(); | 102 | void paintNeeded(); |
102 | void todoDropped(Todo *, int); | 103 | void todoDropped(Todo *, int); |
103 | void double_Clicked(QListViewItem *item); | 104 | void double_Clicked(QListViewItem *item); |
104 | void reparentTodoSignal( Todo *,Todo * ); | 105 | void reparentTodoSignal( Todo *,Todo * ); |
105 | void unparentTodoSignal(Todo *); | 106 | void unparentTodoSignal(Todo *); |
106 | void deleteTodo( Todo * ); | 107 | void deleteTodo( Todo * ); |
107 | protected: | 108 | protected: |
108 | void wheelEvent (QWheelEvent *e); | 109 | void wheelEvent (QWheelEvent *e); |
109 | void contentsDragEnterEvent(QDragEnterEvent *); | 110 | void contentsDragEnterEvent(QDragEnterEvent *); |
110 | void contentsDragMoveEvent(QDragMoveEvent *); | 111 | void contentsDragMoveEvent(QDragMoveEvent *); |
111 | void contentsDragLeaveEvent(QDragLeaveEvent *); | 112 | void contentsDragLeaveEvent(QDragLeaveEvent *); |
112 | void contentsDropEvent(QDropEvent *); | 113 | void contentsDropEvent(QDropEvent *); |
113 | 114 | ||
114 | void contentsMousePressEvent(QMouseEvent *); | 115 | void contentsMousePressEvent(QMouseEvent *); |
115 | void contentsMouseMoveEvent(QMouseEvent *); | 116 | void contentsMouseMoveEvent(QMouseEvent *); |
116 | void contentsMouseReleaseEvent(QMouseEvent *); | 117 | void contentsMouseReleaseEvent(QMouseEvent *); |
117 | void contentsMouseDoubleClickEvent(QMouseEvent *); | 118 | void contentsMouseDoubleClickEvent(QMouseEvent *); |
118 | 119 | ||
119 | private: | 120 | private: |
120 | void paintEvent(QPaintEvent * pevent); | 121 | void paintEvent(QPaintEvent * pevent); |
121 | bool internalDrop; | 122 | bool internalDrop; |
122 | QString mName; | 123 | QString mName; |
123 | Calendar *mCalendar; | 124 | Calendar *mCalendar; |
124 | QPoint mPressPos; | 125 | QPoint mPressPos; |
125 | bool mMousePressed; | 126 | bool mMousePressed; |
126 | QListViewItem *mOldCurrent; | 127 | QListViewItem *mOldCurrent; |
127 | bool mFlagKeyPressed; | 128 | bool mFlagKeyPressed; |
128 | void keyPressEvent ( QKeyEvent * ) ; | 129 | void keyPressEvent ( QKeyEvent * ) ; |
129 | void keyReleaseEvent ( QKeyEvent * ) ; | 130 | void keyReleaseEvent ( QKeyEvent * ) ; |
130 | }; | 131 | }; |
131 | 132 | ||
132 | 133 | ||
133 | /** | 134 | /** |
134 | This is the line-edit on top of the todoview for fast addition of new todos | 135 | This is the line-edit on top of the todoview for fast addition of new todos |
135 | */ | 136 | */ |
136 | class KOQuickTodo : public QLineEdit | 137 | class KOQuickTodo : public QLineEdit |
137 | { | 138 | { |
138 | public: | 139 | public: |
139 | KOQuickTodo(QWidget *parent=0); | 140 | KOQuickTodo(QWidget *parent=0); |
140 | protected: | 141 | protected: |
141 | void focusInEvent(QFocusEvent *ev); | 142 | void focusInEvent(QFocusEvent *ev); |
142 | void focusOutEvent(QFocusEvent *ev); | 143 | void focusOutEvent(QFocusEvent *ev); |
143 | }; | 144 | }; |
144 | 145 | ||
145 | 146 | ||
146 | /** | 147 | /** |
147 | This class provides a multi-column list view of todo events. | 148 | This class provides a multi-column list view of todo events. |
148 | 149 | ||
149 | @short multi-column list view of todo events. | 150 | @short multi-column list view of todo events. |
150 | @author Cornelius Schumacher <schumacher@kde.org> | 151 | @author Cornelius Schumacher <schumacher@kde.org> |
151 | */ | 152 | */ |
152 | class KOTodoView : public KOrg::BaseView | 153 | class KOTodoView : public KOrg::BaseView |
153 | { | 154 | { |
154 | Q_OBJECT | 155 | Q_OBJECT |
155 | public: | 156 | public: |
156 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); | 157 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); |
157 | ~KOTodoView(); | 158 | ~KOTodoView(); |
158 | 159 | ||
159 | QPtrList<Incidence> selectedIncidences(); | 160 | QPtrList<Incidence> selectedIncidences(); |
160 | QPtrList<Todo> selectedTodos(); | 161 | QPtrList<Todo> selectedTodos(); |
161 | 162 | ||
162 | DateList selectedDates() | 163 | DateList selectedDates() |
163 | {DateList q; | 164 | {DateList q; |
164 | return q;} | 165 | return q;} |
165 | 166 | ||
166 | /** Return number of shown dates. TodoView does not show dates, */ | 167 | /** Return number of shown dates. TodoView does not show dates, */ |
167 | int currentDateCount() { return 0; } | 168 | int currentDateCount() { return 0; } |
168 | 169 | ||
169 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); | 170 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); |