• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.5 API Reference
  • KDE Home
  • Contact Us
 

KCalUtils Library

dndfactory.h
Go to the documentation of this file.
00001 /*
00002   This file is part of the kcalutils 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 */
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     //@cond PRIVATE
00180     Q_DISABLE_COPY( DndFactory )
00181     class Private;
00182     Private *const d;
00183     //@endcond
00184 };
00185 
00186 }
00187 
00188 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:25:00 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalUtils Library

Skip menu "KCalUtils Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.8.5 API Reference

Skip menu "kdepimlibs-4.8.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal