2 Copyright (C) 2010 Bertjan Broeksema <broeksema@kde.org>
3 Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 This library is free software; you can redistribute it and/or modify it
6 under the terms of the GNU Library General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or (at your
8 option) any later version.
10 This library is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #ifndef INCIDENCEEDITOR_INCIDENCEDIALOGFACTORY_H
22 #define INCIDENCEEDITOR_INCIDENCEDIALOGFACTORY_H
24 #include "incidenceeditors_ng_export.h"
26 #include <KCalCore/IncidenceBase>
31 class IncidenceChanger
;
34 namespace IncidenceEditorNG
37 class IncidenceDialog
;
39 namespace IncidenceDialogFactory
42 * Creates a new IncidenceDialog for given type. Returns 0 for unsupported types.
44 * @param needsSaving If true, the editor will be initialy dirty, and needs saving.
45 * Apply button will be turned on. This is used for example when
46 * we fill the editor with data that's not yet in akonadi, like
47 * the "Create To-do/Reminder" in KMail.
48 * @param type The Incidence type for which to create a dialog.
49 * @param parent The parent widget of the dialog
50 * @param flags The window flags for the dialog.
52 * TODO: Implement support for Journals.
53 * NOTE: There is no editor for Incidence::TypeFreeBusy
55 INCIDENCEEDITORS_NG_EXPORT IncidenceDialog
*create(
57 KCalCore::IncidenceBase::IncidenceType type
,
58 Akonadi::IncidenceChanger
*changer
,
59 QWidget
*parent
= Q_NULLPTR
, Qt::WindowFlags flags
= 0);
61 INCIDENCEEDITORS_NG_EXPORT IncidenceDialog
*createTodoEditor(
62 const QString
&summary
,
63 const QString
&description
,
64 const QStringList
&attachments
,
65 const QStringList
&attendees
,
66 const QStringList
&attachmentMimetypes
,
67 const QStringList
&attachmentLabels
,
68 bool inlineAttachment
,
69 const Akonadi::Collection
&defaultCollection
,
70 bool cleanupAttachmentTemp
,
71 QWidget
*parent
= Q_NULLPTR
, Qt::WindowFlags flags
= 0);
73 INCIDENCEEDITORS_NG_EXPORT IncidenceDialog
*createEventEditor(
74 const QString
&summary
,
75 const QString
&description
,
76 const QStringList
&attachments
,
77 const QStringList
&attendees
,
78 const QStringList
&attachmentMimetypes
,
79 const QStringList
&attachmentLabels
,
80 bool inlineAttachment
,
81 const Akonadi::Collection
&defaultCollection
,
82 bool cleanupAttachmentTempFiles
,
83 QWidget
*parent
= Q_NULLPTR
, Qt::WindowFlags flags
= 0);
85 } // namespace IncidenceDialogFactory
87 } // namespace IncidenceEditorNG