-rw-r--r-- | korganizer/kotodoview.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 0708a69..d9e0a03 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -7,97 +7,96 @@ | |||
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 | 23 | ||
24 | #include <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qheader.h> | 25 | #include <qheader.h> |
26 | #include <qcursor.h> | 26 | #include <qcursor.h> |
27 | 27 | ||
28 | #include <qvbox.h> | 28 | #include <qvbox.h> |
29 | #include <kdebug.h> | 29 | #include <kdebug.h> |
30 | #include "koprefs.h" | 30 | #include "koprefs.h" |
31 | #include <klocale.h> | 31 | #include <klocale.h> |
32 | #include <kglobal.h> | 32 | #include <kglobal.h> |
33 | #include <kiconloader.h> | 33 | #include <kiconloader.h> |
34 | #include <kmessagebox.h> | 34 | #include <kmessagebox.h> |
35 | 35 | ||
36 | #include <libkcal/icaldrag.h> | 36 | #include <libkcal/icaldrag.h> |
37 | #include <libkcal/vcaldrag.h> | 37 | #include <libkcal/vcaldrag.h> |
38 | #include <libkcal/calfilter.h> | 38 | #include <libkcal/calfilter.h> |
39 | #include <libkcal/dndfactory.h> | 39 | #include <libkcal/dndfactory.h> |
40 | #include <libkcal/calendarresources.h> | 40 | #include <libkcal/calendarresources.h> |
41 | #include <libkcal/resourcecalendar.h> | 41 | #include <libkcal/resourcecalendar.h> |
42 | #include <kresources/resourceselectdialog.h> | 42 | #include <kresources/resourceselectdialog.h> |
43 | #ifndef DESKTOP_VERSION | 43 | #ifndef DESKTOP_VERSION |
44 | #include <qpe/qpeapplication.h> | 44 | #include <qpe/qpeapplication.h> |
45 | #else | 45 | #else |
46 | #include <qapplication.h> | 46 | #include <qapplication.h> |
47 | #endif | 47 | #endif |
48 | #ifndef KORG_NOPRINTER | 48 | #ifndef KORG_NOPRINTER |
49 | #include "calprinter.h" | 49 | #include "calprinter.h" |
50 | #endif | 50 | #endif |
51 | #include "docprefs.h" | 51 | #include "docprefs.h" |
52 | 52 | ||
53 | #include "kotodoview.h" | 53 | #include "kotodoview.h" |
54 | using namespace KOrg; | 54 | using namespace KOrg; |
55 | #include "kotodoview.moc" | ||
56 | 55 | ||
57 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, | 56 | KOTodoListView::KOTodoListView(Calendar *calendar,QWidget *parent, |
58 | const char *name) : | 57 | const char *name) : |
59 | KListView(parent,name) | 58 | KListView(parent,name) |
60 | { | 59 | { |
61 | mCalendar = calendar; | 60 | mCalendar = calendar; |
62 | #ifndef DESKTOP_VERSION | 61 | #ifndef DESKTOP_VERSION |
63 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); | 62 | QPEApplication::setStylusOperation(viewport(), QPEApplication::RightOnHold ); |
64 | #endif | 63 | #endif |
65 | mOldCurrent = 0; | 64 | mOldCurrent = 0; |
66 | mMousePressed = false; | 65 | mMousePressed = false; |
67 | 66 | ||
68 | setAcceptDrops(true); | 67 | setAcceptDrops(true); |
69 | viewport()->setAcceptDrops(true); | 68 | viewport()->setAcceptDrops(true); |
70 | int size = 16; | 69 | int size = 16; |
71 | if (qApp->desktop()->width() < 300 ) | 70 | if (qApp->desktop()->width() < 300 ) |
72 | size = 12; | 71 | size = 12; |
73 | setTreeStepSize( size + 6 ); | 72 | setTreeStepSize( size + 6 ); |
74 | 73 | ||
75 | } | 74 | } |
76 | 75 | ||
77 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | 76 | void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) |
78 | { | 77 | { |
79 | #ifndef KORG_NODND | 78 | #ifndef KORG_NODND |
80 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; | 79 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; |
81 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 80 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
82 | !QTextDrag::canDecode( e ) ) { | 81 | !QTextDrag::canDecode( e ) ) { |
83 | e->ignore(); | 82 | e->ignore(); |
84 | return; | 83 | return; |
85 | } | 84 | } |
86 | 85 | ||
87 | mOldCurrent = currentItem(); | 86 | mOldCurrent = currentItem(); |
88 | #endif | 87 | #endif |
89 | } | 88 | } |
90 | 89 | ||
91 | 90 | ||
92 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | 91 | void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) |
93 | { | 92 | { |
94 | #ifndef KORG_NODND | 93 | #ifndef KORG_NODND |
95 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; | 94 | // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; |
96 | 95 | ||
97 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 96 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
98 | !QTextDrag::canDecode( e ) ) { | 97 | !QTextDrag::canDecode( e ) ) { |
99 | e->ignore(); | 98 | e->ignore(); |
100 | return; | 99 | return; |
101 | } | 100 | } |
102 | 101 | ||
103 | e->accept(); | 102 | e->accept(); |