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

0001 /*
0002   This file is part of KOrganizer.
0003 
0004   SPDX-FileCopyrightText: 2001 Cornelius Schumacher <schumacher@kde.org>
0005   SPDX-FileCopyrightText: 2007 Loïc Corbasson <loic.corbasson@gmail.com>
0006 
0007   SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 #pragma once
0010 
0011 #include <EventViews/CalendarDecoration>
0012 
0013 using namespace EventViews::CalendarDecoration;
0014 
0015 class Datenums : public Decoration
0016 {
0017 public:
0018     Datenums(QObject *parent = nullptr, const QVariantList &args = {});
0019 
0020     void configure(QWidget *parent) override;
0021 
0022     Element::List createDayElements(const QDate &) override;
0023     Element::List createWeekElements(const QDate &) override;
0024 
0025     enum DayNumber {
0026         DayOfYear = 1,
0027         DaysRemaining = 2,
0028     };
0029     Q_DECLARE_FLAGS(DayNumbers, DayNumber)
0030 
0031     [[nodiscard]] QString info() const override;
0032 
0033 private:
0034     DayNumbers mDisplayedInfo;
0035 };
0036 
0037 Q_DECLARE_OPERATORS_FOR_FLAGS(Datenums::DayNumbers)