File indexing completed on 2024-05-12 05:10:49
0001 /* 0002 SPDX-FileCopyrightText: 2001 Cornelius Schumacher <schumacher@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include "akonadi-calendar_export.h" 0009 0010 #include <KCalendarCore/Attendee> 0011 #include <QDialog> 0012 0013 #include <memory> 0014 0015 // TODO: documentation 0016 // Uses akonadi-contact, so don't move this class to KCalUtils. 0017 namespace Akonadi 0018 { 0019 class PublishDialogPrivate; 0020 0021 class AKONADI_CALENDAR_EXPORT PublishDialog : public QDialog 0022 { 0023 Q_OBJECT 0024 public: 0025 /** 0026 * Creates a new PublishDialog 0027 * @param parent the dialog's parent 0028 */ 0029 explicit PublishDialog(QWidget *parent = nullptr); 0030 0031 /** 0032 * Destructor 0033 */ 0034 ~PublishDialog() override; 0035 0036 /** 0037 * Adds a new attendee to the dialog 0038 * @param attendee the attendee to add 0039 */ 0040 void addAttendee(const KCalendarCore::Attendee &attendee); 0041 0042 /** 0043 * Returns a list of e-mail addresses. 0044 * //TODO: This should be a QStringList, but KCalUtils::Scheduler::publish() accepts a QString. 0045 */ 0046 [[nodiscard]] QString addresses() const; 0047 0048 public Q_SLOTS: 0049 void accept() override; 0050 0051 private: 0052 AKONADI_CALENDAR_NO_EXPORT void slotHelp(); 0053 //@cond PRIVATE 0054 std::unique_ptr<PublishDialogPrivate> const d; 0055 //@endcond 0056 }; 0057 }