CalendarSupport

yearprint.h
1/*
2 SPDX-FileCopyrightText: 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
5*/
6
7#pragma once
8
9#include "calprintpluginbase.h"
10#include "ui_calprintyearconfig_base.h"
11
12namespace CalendarSupport
13{
14class CalPrintYear : public CalPrintPluginBase
15{
16public:
17 CalPrintYear()
19 {
20 }
21
22 ~CalPrintYear() override = default;
23
24 [[nodiscard]] QString groupName() const override
25 {
26 return QStringLiteral("Print year");
27 }
28
29 [[nodiscard]] QString description() const override
30 {
31 return i18n("Print &year");
32 }
33
34 [[nodiscard]] QString info() const override
35 {
36 return i18n("Prints a calendar for an entire year");
37 }
38
39 [[nodiscard]] int sortID() const override
40 {
41 return CalPrinterBase::Year;
42 }
43
44 [[nodiscard]] bool enabled() const override
45 {
46 return true;
47 }
48
49 QWidget *createConfigWidget(QWidget *) override;
50 [[nodiscard]] QPageLayout::Orientation defaultOrientation() const override;
51
52public:
53 void print(QPainter &p, int width, int height) override;
54 void readSettingsWidget() override;
55 void setSettingsWidget() override;
56 void doLoadConfig() override;
57 void doSaveConfig() override;
58 void setDateRange(const QDate &from, const QDate &to) override;
59
60protected:
61 int mYear;
62 int mPages;
63 int mSubDaysEvents;
64 int mHolidaysEvents;
65};
66
67class CalPrintYearConfig : public QWidget, public Ui::CalPrintYearConfig_Base
68{
69public:
70 explicit CalPrintYearConfig(QWidget *parent)
72 {
73 setupUi(this);
74 }
75};
76}
QString i18n(const char *text, const TYPE &arg...)
QObject * parent() const const
void setupUi(QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.