dndfactory.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 1998 Preston Brown <pbrown@kde.org> 00005 Copyright (c) 2001,2002,2003 Cornelius Schumacher <schumacher@kde.org> 00006 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00007 Copyright (c) 2008 Thomas Thrainer <tom_t@gmx.at> 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Library General Public License for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with this library; see the file COPYING.LIB. If not, write to 00021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 Boston, MA 02110-1301, USA. 00023 */ 00034 #ifndef KCAL_DNDFACTORY_H 00035 #define KCAL_DNDFACTORY_H 00036 00037 #include "kcal_export.h" 00038 #include "incidence.h" 00039 00040 #include <KDE/KDateTime> 00041 00042 class QDate; 00043 class QTime; 00044 class QDrag; 00045 class QWidget; 00046 class QDropEvent; 00047 class QMimeData; 00048 00049 namespace KCal { 00050 00051 class Event; 00052 class Todo; 00053 class Incidence; 00054 class Calendar; 00055 00063 class KCAL_EXPORT_DEPRECATED DndFactory 00064 { 00065 public: 00066 explicit DndFactory( Calendar * ); 00067 00068 ~DndFactory(); 00069 00073 Calendar *createDropCalendar( QDropEvent *de ); 00074 00078 Calendar *createDropCalendar( const QMimeData *md ); 00079 00083 static Calendar *createDropCalendar( const QMimeData *md, const KDateTime::Spec &timeSpec ); 00084 00088 QMimeData *createMimeData(); 00089 00093 QDrag *createDrag( QWidget *owner ); 00094 00098 QMimeData *createMimeData( Incidence *incidence ); 00099 00103 QDrag *createDrag( Incidence *incidence, QWidget *owner ); 00104 00108 Todo *createDropTodo( const QMimeData *md ); 00109 00113 Todo *createDropTodo( QDropEvent *de ); 00114 00118 Event *createDropEvent( const QMimeData *md ); 00119 00123 Event *createDropEvent( QDropEvent *de ); 00124 00128 void cutIncidence( Incidence * ); 00129 00133 bool copyIncidence( Incidence * ); 00134 00140 bool cutIncidences( const Incidence::List &incidences ); 00141 00147 bool copyIncidences( const Incidence::List &incidences ); 00148 00159 Incidence::List pasteIncidences( const QDate &newDate = QDate(), 00160 const QTime *newTime = 0 ); 00161 00165 Incidence *pasteIncidence( const QDate &, const QTime *newTime = 0 ); 00166 00167 private: 00168 //@cond PRIVATE 00169 Q_DISABLE_COPY( DndFactory ) 00170 class Private; 00171 Private *const d; 00172 //@endcond 00173 }; 00174 00175 } 00176 00177 #endif