File indexing completed on 2024-06-09 05:15:51

0001 /*
0002   This file is part of KOrganizer.
0003 
0004   SPDX-FileCopyrightText: 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
0005 
0006   SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
0007 */
0008 
0009 #pragma once
0010 
0011 #include "korganizerprivate_export.h"
0012 
0013 #include <QDialog>
0014 class QPushButton;
0015 
0016 namespace CalendarSupport
0017 {
0018 class IncidenceViewer;
0019 }
0020 
0021 namespace Akonadi
0022 {
0023 class Item;
0024 class ETMCalendar;
0025 }
0026 
0027 /**
0028   Viewer dialog for events.
0029 */
0030 class KORGANIZERPRIVATE_EXPORT KOEventViewerDialog : public QDialog
0031 {
0032     Q_OBJECT
0033 public:
0034     explicit KOEventViewerDialog(Akonadi::ETMCalendar *calendar, QWidget *parent = nullptr);
0035     ~KOEventViewerDialog() override;
0036 
0037     void setIncidence(const Akonadi::Item &incidence, const QDate &date);
0038 
0039     void addText(const QString &text);
0040 
0041     QPushButton *editButton() const;
0042 
0043 private:
0044     void editIncidence();
0045     void showIncidenceContext();
0046     void delayedDestruct();
0047     CalendarSupport::IncidenceViewer *mEventViewer = nullptr;
0048     QPushButton *const mUser1Button;
0049 };