KCalUtils Library
dndfactory.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00033 #ifndef KCALUTILS_DNDFACTORY_H
00034 #define KCALUTILS_DNDFACTORY_H
00035
00036 #include "kcalutils_export.h"
00037
00038 #include <kcalcore/event.h>
00039 #include <kcalcore/journal.h>
00040 #include <kcalcore/todo.h>
00041 #include <kcalcore/memorycalendar.h>
00042
00043 #include <KDE/KDateTime>
00044
00045 class QDrag;
00046 class QDropEvent;
00047 class QMimeData;
00048
00049 namespace KCalUtils {
00050
00058 class KCALUTILS_EXPORT DndFactory
00059 {
00060 public:
00061
00062 enum PasteFlag {
00063 FlagTodosPasteAtDtStart = 1
00066 };
00067
00068 Q_DECLARE_FLAGS( PasteFlags, PasteFlag )
00069
00070 explicit DndFactory( const KCalCore::MemoryCalendar::Ptr &cal );
00071
00072 ~DndFactory();
00073
00077 KCalCore::MemoryCalendar::Ptr createDropCalendar( QDropEvent *de );
00078
00082 KCalCore::MemoryCalendar::Ptr createDropCalendar( const QMimeData *md );
00083
00087 static KCalCore::MemoryCalendar::Ptr createDropCalendar( const QMimeData *md,
00088 const KDateTime::Spec &timeSpec );
00089
00093 QMimeData *createMimeData();
00094
00098 QDrag *createDrag( QWidget *owner );
00099
00103 QMimeData *createMimeData( const KCalCore::Incidence::Ptr &incidence );
00104
00108 QDrag *createDrag( const KCalCore::Incidence::Ptr &incidence, QWidget *owner );
00109
00113 KCalCore::Todo::Ptr createDropTodo( const QMimeData *md );
00114
00118 KCalCore::Todo::Ptr createDropTodo( QDropEvent *de );
00119
00123 KCalCore::Event::Ptr createDropEvent( const QMimeData *md );
00124
00128 KCalCore::Event::Ptr createDropEvent( QDropEvent *de );
00129
00133 void cutIncidence( const KCalCore::Incidence::Ptr & );
00134
00138 bool copyIncidence( const KCalCore::Incidence::Ptr & );
00139
00143 bool cutIncidences( const KCalCore::Incidence::List &incidences );
00144
00148 bool copyIncidences( const KCalCore::Incidence::List &incidences );
00149
00156 KCalCore::Incidence::List pasteIncidences(
00157 const KDateTime &newDateTime = KDateTime(),
00158 const QFlags<PasteFlag> &pasteOptions = QFlags<PasteFlag>() );
00159
00174 KCalCore::Incidence::Ptr pasteIncidence(
00175 const KDateTime &newDateTime = KDateTime(),
00176 const QFlags<PasteFlag> &pasteOptions = QFlags<PasteFlag>() );
00177
00178 private:
00179
00180 Q_DISABLE_COPY( DndFactory )
00181 class Private;
00182 Private *const d;
00183
00184 };
00185
00186 }
00187
00188 #endif