File indexing completed on 2025-01-05 04:49:36
0001 /* 0002 SPDX-FileCopyrightText: 2018 Allen Winter <winter@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include <EventViews/CalendarDecoration> 0009 #include <KHolidays/LunarPhase> 0010 #include <QIcon> 0011 0012 using namespace EventViews::CalendarDecoration; 0013 0014 class Lunarphases : public Decoration 0015 { 0016 public: 0017 Lunarphases(QObject *parent = nullptr, const QVariantList &args = {}); 0018 0019 [[nodiscard]] Element::List createDayElements(const QDate &) override; 0020 0021 [[nodiscard]] QString info() const override; 0022 }; 0023 0024 class LunarphasesElement : public Element 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit LunarphasesElement(KHolidays::LunarPhase::Phase phase); 0029 0030 [[nodiscard]] QString shortText() const override; 0031 [[nodiscard]] QString longText() const override; 0032 [[nodiscard]] QPixmap newPixmap(const QSize &size) override; 0033 0034 private: 0035 QString mName; 0036 QIcon mIcon; 0037 };