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

KCalUtils Library

  • kcalutils
dndfactory.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalutils library.
3 
4  Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5  Copyright (c) 2001,2002,2003 Cornelius Schumacher <schumacher@kde.org>
6  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
7  Copyright (c) 2008 Thomas Thrainer <tom_t@gmx.at>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Library General Public
11  License as published by the Free Software Foundation; either
12  version 2 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Library General Public License for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with this library; see the file COPYING.LIB. If not, write to
21  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  Boston, MA 02110-1301, USA.
23 */
33 #ifndef KCALUTILS_DNDFACTORY_H
34 #define KCALUTILS_DNDFACTORY_H
35 
36 #include "kcalutils_export.h"
37 
38 #include <kcalcore/event.h>
39 #include <kcalcore/journal.h>
40 #include <kcalcore/todo.h>
41 #include <kcalcore/memorycalendar.h>
42 
43 #include <KDE/KDateTime>
44 
45 class QDrag;
46 class QDropEvent;
47 class QMimeData;
48 
49 namespace KCalUtils {
50 
58 class KCALUTILS_EXPORT DndFactory
59 {
60  public:
61 
62  enum PasteFlag {
63  FlagTodosPasteAtDtStart = 1
66  };
67 
68  Q_DECLARE_FLAGS( PasteFlags, PasteFlag )
69 
70  explicit DndFactory( const KCalCore::MemoryCalendar::Ptr &cal );
71 
72  ~DndFactory();
73 
77  KCalCore::MemoryCalendar::Ptr createDropCalendar( QDropEvent *de );
78 
82  KCalCore::MemoryCalendar::Ptr createDropCalendar( const QMimeData *md );
83 
87  static KCalCore::MemoryCalendar::Ptr createDropCalendar( const QMimeData *md,
88  const KDateTime::Spec &timeSpec );
89 
93  QMimeData *createMimeData();
94 
98  QDrag *createDrag( QWidget *owner );
99 
103  QMimeData *createMimeData( const KCalCore::Incidence::Ptr &incidence );
104 
108  QDrag *createDrag( const KCalCore::Incidence::Ptr &incidence, QWidget *owner );
109 
113  KCalCore::Todo::Ptr createDropTodo( const QMimeData *md );
114 
118  KCalCore::Todo::Ptr createDropTodo( QDropEvent *de );
119 
123  KCalCore::Event::Ptr createDropEvent( const QMimeData *md );
124 
128  KCalCore::Event::Ptr createDropEvent( QDropEvent *de );
129 
133  void cutIncidence( const KCalCore::Incidence::Ptr & );
134 
138  bool copyIncidence( const KCalCore::Incidence::Ptr & );
139 
143  bool cutIncidences( const KCalCore::Incidence::List &incidences );
144 
148  bool copyIncidences( const KCalCore::Incidence::List &incidences );
149 
156  KCalCore::Incidence::List pasteIncidences(
157  const KDateTime &newDateTime = KDateTime(),
158  const QFlags<PasteFlag> &pasteOptions = QFlags<PasteFlag>() );
159 
174  KCalCore::Incidence::Ptr pasteIncidence(
175  const KDateTime &newDateTime = KDateTime(),
176  const QFlags<PasteFlag> &pasteOptions = QFlags<PasteFlag>() );
177 
178  private:
179  //@cond PRIVATE
180  Q_DISABLE_COPY( DndFactory )
181  class Private;
182  Private *const d;
183  //@endcond
184 };
185 
186 }
187 
188 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed Nov 28 2012 21:48:46 by doxygen 1.8.1.2 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.9.3 API Reference

Skip menu "kdepimlibs-4.9.3 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