KCalUtils

datetimefilters.h
1 /*
2  * SPDX-FileCopyrightText: 2015 Daniel Vr├ítil <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  *
6  */
7 
8 #pragma once
9 #include <QObject>
10 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
11 #include <grantlee/filter.h>
12 #else
13 #include <KTextTemplate/Filter>
14 #endif
15 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
16 class KDateFilter : public Grantlee::Filter
17 #else
18 class KDateFilter : public KTextTemplate::Filter
19 #endif
20 
21 {
22 public:
23  KDateFilter();
24  ~KDateFilter() override;
25 
26  QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(), bool autoescape = false) const override;
27  bool isSafe() const override;
28 
29 private:
30  Q_DISABLE_COPY(KDateFilter)
31 };
32 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
33 class KTimeFilter : public Grantlee::Filter
34 #else
35 class KTimeFilter : public KTextTemplate::Filter
36 #endif
37 {
38 public:
39  KTimeFilter();
40  ~KTimeFilter() override;
41 
42  QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(), bool autoescape = false) const override;
43  bool isSafe() const override;
44 
45 private:
46  Q_DISABLE_COPY(KTimeFilter)
47 };
48 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
49 class KDateTimeFilter : public Grantlee::Filter
50 #else
51 class KDateTimeFilter : public KTextTemplate::Filter
52 #endif
53 {
54 public:
55  KDateTimeFilter();
56  ~KDateTimeFilter() override;
57 
58  QVariant doFilter(const QVariant &input, const QVariant &argument = QVariant(), bool autoescape = false) const override;
59  bool isSafe() const override;
60 
61 private:
62  Q_DISABLE_COPY(KDateTimeFilter)
63 };
virtual bool isSafe() const
virtual QVariant doFilter(const QVariant &input, const QVariant &argument={}, bool autoescape={}) const=0
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:09:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.