Incidenceeditor

incidencedialogfactory.h
1/*
2 SPDX-FileCopyrightText: 2010 Bertjan Broeksema <broeksema@kde.org>
3 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include "incidenceeditor_export.h"
11
12#include <Akonadi/Collection>
13#include <KCalendarCore/IncidenceBase>
14
15namespace Akonadi
16{
17class IncidenceChanger;
18}
19
20namespace IncidenceEditorNG
21{
22class IncidenceDialog;
23
24namespace IncidenceDialogFactory
25{
26/**
27 * Creates a new IncidenceDialog for given type. Returns 0 for unsupported types.
28 *
29 * @param needsSaving If true, the editor will be initially dirty, and needs saving.
30 * Apply button will be turned on. This is used for example when
31 * we fill the editor with data that's not yet in akonadi, like
32 * the "Create To-do/Reminder" in KMail.
33 * @param type The Incidence type for which to create a dialog.
34 * @param parent The parent widget of the dialog
35 * @param flags The window flags for the dialog.
36 *
37 * TODO: Implement support for Journals.
38 * NOTE: There is no editor for Incidence::TypeFreeBusy
39 */
40INCIDENCEEDITOR_EXPORT IncidenceDialog *create(bool needsSaving,
42 Akonadi::IncidenceChanger *changer,
43 QWidget *parent = nullptr,
44 Qt::WindowFlags flags = {});
45
46INCIDENCEEDITOR_EXPORT IncidenceDialog *createTodoEditor(const QString &summary,
47 const QString &description,
48 const QStringList &attachments,
49 const QStringList &attendees,
50 const QStringList &attachmentMimetypes,
51 const QStringList &attachmentLabels,
52 bool inlineAttachment,
53 const Akonadi::Collection &defaultCollection,
54 bool cleanupAttachmentTemp,
55 QWidget *parent = nullptr,
56 Qt::WindowFlags flags = {});
57
58INCIDENCEEDITOR_EXPORT IncidenceDialog *createEventEditor(const QString &summary,
59 const QString &description,
60 const QStringList &attachments,
61 const QStringList &attendees,
62 const QStringList &attachmentMimetypes,
63 const QStringList &attachmentLabels,
64 bool inlineAttachment,
65 const Akonadi::Collection &defaultCollection,
66 bool cleanupAttachmentTempFiles,
67 QWidget *parent = nullptr,
68 Qt::WindowFlags flags = {});
69} // namespace IncidenceDialogFactory
70} // namespace IncidenceEditorNG
QAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
typedef WindowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:52:53 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.