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, TQWidget *owner );
00052 
00054     Todo *createDropTodo(TQDropEvent *de);
00056     Event *createDrop(TQDropEvent *de);
00057 
00059     void cutIncidence( Incidence * );
00061     bool copyIncidence( Incidence * );
00062 
00064     bool cutIncidences( const Incidence::List &incidences );
00065 
00067     bool copyIncidences( const Incidence::List &incidences );
00068 
00070     Incidence *pasteIncidence( const TQDate &, const TQTime *newTime = 0 );
00071 
00074     Incidence::List pasteIncidences( const TQDate &newDate = TQDate(), const TQTime *newTime = 0 );
00075 
00076   private:
00077     Calendar *mCalendar;
00078 
00079     class Private;
00080     Private *d;
00081 };
00082 
00083 }
00084 
00085 #endif