libkcal

dndfactory.h

00001 /*
00002     This file is part of libkcal.
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 
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Library General Public
00010     License as published by the Free Software Foundation; either
00011     version 2 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Library General Public License for more details.
00017 
00018     You should have received a copy of the GNU Library General Public License
00019     along with this library; see the file COPYING.LIB.  If not, write to
00020     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021     Boston, MA 02110-1301, USA.
00022 */
00023 
00024 #ifndef KCAL_DNDFACTORY_H
00025 #define KCAL_DNDFACTORY_H
00026 
00027 #include "libkcal_export.h"
00028 
00029 namespace KCal {
00030 
00031 class ICalDrag;
00032 class Event;
00033 class Todo;
00034 class Calendar;
00035 
00042 class LIBKCAL_EXPORT DndFactory
00043 {
00044   public:
00045     DndFactory( Calendar * );
00046     ~DndFactory();
00047 
00051     ICalDrag *createDrag( Incidence *incidence, QWidget *owner );
00052 
00054     Todo *createDropTodo(QDropEvent *de);
00056     Event *createDrop(QDropEvent *de);
00057 
00061     KCal::Incidence::List createDropIncidences(QDropEvent *de);
00062 
00064     void cutIncidence( Incidence * );
00066     bool copyIncidence( Incidence * );
00067 
00069     bool cutIncidences( const Incidence::List &incidences );
00070 
00072     bool copyIncidences( const Incidence::List &incidences );
00073 
00075     Incidence *pasteIncidence( const QDate &, const QTime *newTime = 0 );
00076 
00079     Incidence::List pasteIncidences( const QDate &newDate = QDate(), const QTime *newTime = 0 );
00080 
00081   private:
00082     Calendar *mCalendar;
00083 
00084     class Private;
00085     Private *d;
00086 };
00087 
00088 }
00089 
00090 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys