• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 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
45class QDrag;
46class QDropEvent;
47class QMimeData;
48
49namespace KCalUtils {
50
58class KCALUTILS_EXPORT DndFactory
59{
60public:
61
62 enum PasteFlag {
63 FlagTodosPasteAtDtStart = 1,
66 FlagPasteAtOriginalTime = 2
68 };
69
70 Q_DECLARE_FLAGS(PasteFlags, PasteFlag)
71
72 explicit DndFactory(const KCalCore::MemoryCalendar::Ptr &cal);
73
74 ~DndFactory();
75
79 KCalCore::MemoryCalendar::Ptr createDropCalendar(QDropEvent *de);
80
84 KCalCore::MemoryCalendar::Ptr createDropCalendar(const QMimeData *md);
85
89 static KCalCore::MemoryCalendar::Ptr createDropCalendar(const QMimeData *md,
90 const KDateTime::Spec &timeSpec);
91
95 QMimeData *createMimeData();
96
100 QDrag *createDrag(QWidget *owner);
101
105 QMimeData *createMimeData(const KCalCore::Incidence::Ptr &incidence);
106
110 QDrag *createDrag(const KCalCore::Incidence::Ptr &incidence, QWidget *owner);
111
115 KCalCore::Todo::Ptr createDropTodo(const QMimeData *md);
116
120 KCalCore::Todo::Ptr createDropTodo(QDropEvent *de);
121
125 KCalCore::Event::Ptr createDropEvent(const QMimeData *md);
126
130 KCalCore::Event::Ptr createDropEvent(QDropEvent *de);
131
135 void cutIncidence(const KCalCore::Incidence::Ptr &);
136
140 bool copyIncidence(const KCalCore::Incidence::Ptr &);
141
145 bool cutIncidences(const KCalCore::Incidence::List &incidences);
146
150 bool copyIncidences(const KCalCore::Incidence::List &incidences);
151
158 KCalCore::Incidence::List pasteIncidences(
159 const KDateTime &newDateTime = KDateTime(),
160 const QFlags<PasteFlag> &pasteOptions = QFlags<PasteFlag>());
161
176 KCalCore::Incidence::Ptr pasteIncidence(
177 const KDateTime &newDateTime = KDateTime(),
178 const QFlags<PasteFlag> &pasteOptions = QFlags<PasteFlag>());
179
180private:
181 //@cond PRIVATE
182 Q_DISABLE_COPY(DndFactory)
183 class Private;
184 Private *const d;
185 //@endcond
186};
187
188}
189
190#endif
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
KCalCore::Incidence::List
QVector< Ptr > List
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
KCalCore::MemoryCalendar::Ptr
QSharedPointer< MemoryCalendar > Ptr
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
KCalUtils::DndFactory
vCalendar/iCalendar Drag-and-Drop object factory.
Definition: dndfactory.h:59
KCalUtils::DndFactory::PasteFlag
PasteFlag
Definition: dndfactory.h:62
event.h
journal.h
memorycalendar.h
todo.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.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.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • 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