File indexing completed on 2024-10-27 04:51:06

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "kmail_private_export.h"
0010 #include <MailCommon/FolderSettings>
0011 #include <QObject>
0012 #include <QSharedPointer>
0013 
0014 class KMAILTESTS_TESTS_EXPORT HandleClickedUrlJob : public QObject
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit HandleClickedUrlJob(QObject *parent = nullptr);
0019     ~HandleClickedUrlJob() override;
0020 
0021     void start();
0022 
0023     void setUrl(const QUrl &url);
0024     void setFolder(const QSharedPointer<MailCommon::FolderSettings> &folder);
0025     void setCurrentCollection(const Akonadi::Collection &currentCollection);
0026 
0027 private:
0028     void slotOpenComposer();
0029     QUrl mUrl;
0030     Akonadi::Collection mCurrentCollection;
0031     QSharedPointer<MailCommon::FolderSettings> mFolder;
0032     uint mIdentity = 0;
0033     KMime::Message::Ptr mMsg = nullptr;
0034 };