File indexing completed on 2024-05-12 05:15:01

0001 /*
0002   This file is part of the kcalutils library.
0003 
0004   SPDX-FileCopyrightText: 1998 Preston Brown <pbrown@kde.org>
0005   SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <schumacher@kde.org>
0006 
0007   SPDX-License-Identifier: LGPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include "kcalutils_export.h"
0012 
0013 #include <KCalendarCore/Calendar>
0014 
0015 class QMimeData;
0016 
0017 namespace KCalUtils
0018 {
0019 /**
0020   iCalendar drag&drop class.
0021 */
0022 namespace ICalDrag
0023 {
0024 /**
0025   Mime-type of iCalendar
0026 */
0027 [[nodiscard]] KCALUTILS_EXPORT QString mimeType();
0028 
0029 /**
0030   Sets the iCalendar representation as data of the drag object
0031 */
0032 [[nodiscard]] KCALUTILS_EXPORT bool populateMimeData(QMimeData *e, const KCalendarCore::Calendar::Ptr &cal);
0033 
0034 /**
0035   Return, if drag&drop object can be decode to iCalendar.
0036 */
0037 [[nodiscard]] KCALUTILS_EXPORT bool canDecode(const QMimeData *);
0038 
0039 /**
0040   Decode drag&drop object to iCalendar component \a cal.
0041 */
0042 [[nodiscard]] KCALUTILS_EXPORT bool fromMimeData(const QMimeData *e, const KCalendarCore::Calendar::Ptr &cal);
0043 }
0044 }