Incidenceeditor

individualmaildialog.h
1/*
2 * SPDX-FileCopyrightText: 2014 Sandro Knauß <knauss@kolabsys.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
5 */
6
7#pragma once
8#include "incidenceeditor_private_export.h"
9#include <KCalendarCore/Attendee>
10#include <QDialog>
11
12class KGuiItem;
13
14class TestIndividualMailDialog;
16class QComboBox;
17namespace IncidenceEditorNG
18{
19// Shows a dialog with a question and the option to select which attendee should get the mail or to open a composer for him.
20// Used to get individual mails for attendees of an event.
21class INCIDENCEEDITOR_TESTS_EXPORT IndividualMailDialog : public QDialog
22{
23 Q_OBJECT
24 friend class ::TestIndividualMailDialog;
25
26public:
27 enum Decisions {
28 Update, /**< send automatic mail to attendee */
29 NoUpdate, /**< do not send mail to attendee */
30 Edit /**< open composer for attendee */
31 };
32 explicit IndividualMailDialog(const QString &question,
33 const KCalendarCore::Attendee::List &attendees,
34 const KGuiItem &buttonYes,
35 const KGuiItem &buttonNo,
36 QWidget *parent = nullptr);
37 ~IndividualMailDialog() override;
38
39 [[nodiscard]] KCalendarCore::Attendee::List editAttendees() const;
40 [[nodiscard]] KCalendarCore::Attendee::List updateAttendees() const;
41
42private:
43 INCIDENCEEDITOR_NO_EXPORT void updateButtonState();
44
45 std::vector<std::pair<KCalendarCore::Attendee, QComboBox *>> mAttendeeDecision;
46 QDialogButtonBox *m_buttons = nullptr;
47 QWidget *m_detailsWidget = nullptr;
48};
49}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.