File indexing completed on 2025-01-05 04:58:23

0001 /* SPDX-FileCopyrightText: 2010 Thomas McGuire <mcguire@kde.org>
0002 
0003    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005 
0006 #pragma once
0007 
0008 #include "pimcommonakonadi_export.h"
0009 
0010 #include <QDialog>
0011 
0012 namespace Akonadi
0013 {
0014 class Item;
0015 }
0016 
0017 namespace PimCommon
0018 {
0019 /**
0020  * @short A dialog for editing annotations of an email.
0021  *
0022  * @author Thomas McGuire <mcguire@kde.org>
0023  */
0024 class PIMCOMMONAKONADI_EXPORT AnnotationEditDialog : public QDialog
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     /**
0030      * Creates a new annotation edit dialog.
0031      *
0032      * @param item The item.
0033      * @param parent The parent widget.
0034      */
0035     explicit AnnotationEditDialog(const Akonadi::Item &item, QWidget *parent = nullptr);
0036 
0037     /**
0038      * Destroys the annotation edit dialog.
0039      */
0040     ~AnnotationEditDialog() override;
0041 
0042 private:
0043     PIMCOMMONAKONADI_NO_EXPORT void readConfig();
0044     PIMCOMMONAKONADI_NO_EXPORT void writeConfig();
0045     PIMCOMMONAKONADI_NO_EXPORT void slotAccepted();
0046     PIMCOMMONAKONADI_NO_EXPORT void slotDeleteNote();
0047     //@cond PRIVATE
0048     class AnnotationEditDialogPrivate;
0049     std::unique_ptr<AnnotationEditDialogPrivate> const d;
0050     //@endcond
0051 };
0052 }