File indexing completed on 2024-11-24 04:50:44
0001 // SPDX-FileCopyrightText: 2023 g10 Code GmbH 0002 // SPDX-FileContributor: Carl Schwan <carl.schwan@gnupg.com> 0003 // SPDX-License-Identifier: GPL-2.0-or-later 0004 0005 #pragma once 0006 0007 #include <Akonadi/Item> 0008 #include <KMime/Message> 0009 #include <QObject> 0010 0011 class MessageLoader : public QObject 0012 { 0013 Q_OBJECT 0014 Q_PROPERTY(Akonadi::Item item READ item WRITE setItem NOTIFY itemChanged) 0015 Q_PROPERTY(KMime::Message::Ptr message READ message NOTIFY messageChanged) 0016 0017 public: 0018 explicit MessageLoader(QObject *parent = nullptr); 0019 0020 Akonadi::Item item() const; 0021 void setItem(const Akonadi::Item &item); 0022 KMime::Message::Ptr message() const; 0023 0024 Q_SIGNALS: 0025 void itemChanged(); 0026 void messageChanged(); 0027 0028 private: 0029 Akonadi::Item m_item; 0030 KMime::Message::Ptr m_message; 0031 };