File indexing completed on 2024-11-24 04:42:07

0001 /*
0002     SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #ifndef KCALENDARCORE_CALENDARPLUGINLOADER_H
0007 #define KCALENDARCORE_CALENDARPLUGINLOADER_H
0008 
0009 #include "kcalendarcoreextras_export.h"
0010 
0011 #include <KCalendarCore/CalendarPlugin>
0012 
0013 namespace KCalendarCoreExtras {
0014 
0015 /** Access to KCalendarCore::CalendarPlugin instances. */
0016 class KCALENDARCOREEXTRAS_EXPORT CalendarPluginLoader
0017 {
0018     Q_GADGET
0019     Q_PROPERTY(bool hasPlugin READ hasPlugin)
0020     Q_PROPERTY(KCalendarCore::CalendarPlugin* plugin READ plugin)
0021 
0022 public:
0023     /** Returns @c true if there is a platform calendar available. */
0024     static bool hasPlugin();
0025 
0026     /** Returns the platform calendar plugin. */
0027     static KCalendarCore::CalendarPlugin *plugin();
0028 };
0029 
0030 }
0031 
0032 #endif // KCALENDARCORE_CALENDARPLUGINLOADER_H