File indexing completed on 2025-01-05 04:49:48

0001 /*
0002  * SPDX-FileCopyrightText: 2016 Daniel Vrátil <dvratil@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  *
0006  */
0007 
0008 #pragma once
0009 
0010 #include "pimdatasource.h"
0011 
0012 class FakePimDataSource : public PimDataSource
0013 {
0014 public:
0015     FakePimDataSource();
0016     ~FakePimDataSource() override;
0017 
0018     void setAkonadiIdForIncidence(const KCalendarCore::Incidence::Ptr &incidence, qint64 akonadiId);
0019     [[nodiscard]] qint64 akonadiIdForIncidence(const KCalendarCore::Incidence::Ptr &incidence) const override;
0020 
0021     [[nodiscard]] KCalendarCore::Calendar *calendar() const override;
0022 
0023     [[nodiscard]] QString calendarColorForIncidence(const KCalendarCore::Incidence::Ptr &incidence) const override;
0024 
0025 private:
0026     QMap<KCalendarCore::Incidence::Ptr, qint64> mAkonadiIdMap;
0027     KCalendarCore::Calendar *mCalendar = nullptr;
0028 };