Grantlee 5.3.0
util.h
Go to the documentation of this file.
1/*
2 This file is part of the Grantlee template system.
3
4 Copyright (c) 2009,2010 Stephen Kelly <steveire@gmail.com>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either version
9 2.1 of the Licence, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library. If not, see <http://www.gnu.org/licenses/>.
18
19*/
20
21#ifndef GRANTLEE_UTIL_P_H
22#define GRANTLEE_UTIL_P_H
23
24#include "context.h"
25#include "grantlee_templates_export.h"
26#include "safestring.h"
27
28#include <QtCore/QVariant>
29
31
32namespace Grantlee
33{
34
40GRANTLEE_TEMPLATES_EXPORT bool variantIsTrue(const QVariant &variant);
41
48GRANTLEE_TEMPLATES_EXPORT QString unescapeStringLiteral(const QString &input);
49
53GRANTLEE_TEMPLATES_EXPORT Grantlee::SafeString
55
59GRANTLEE_TEMPLATES_EXPORT Grantlee::SafeString
61
65GRANTLEE_TEMPLATES_EXPORT Grantlee::SafeString
66getSafeString(const QVariant &input);
67
71GRANTLEE_TEMPLATES_EXPORT bool isSafeString(const QVariant &input);
72
79GRANTLEE_TEMPLATES_EXPORT bool supportedOutputType(const QVariant &input);
80
87GRANTLEE_TEMPLATES_EXPORT bool equals(const QVariant &lhs, const QVariant &rhs);
88
97GRANTLEE_TEMPLATES_EXPORT std::pair<qreal, QString>
98calcFileSize(qreal size, int unitSystem = 10, qreal multiplier = 1.0);
99
100#ifndef Q_QDOC
106GRANTLEE_TEMPLATES_EXPORT Grantlee::SafeString
107toString(const QVariantList &list);
108#endif
109}
110
111#endif
A QString wrapper class for containing whether a string is safe or needs to be escaped.
Definition safestring.h:92
The Grantlee namespace holds all public Grantlee API.
Definition Mainpage.dox:8
Grantlee::SafeString getSafeString(const QVariant &input)
Grantlee::SafeString markForEscaping(const Grantlee::SafeString &input)
bool equals(const QVariant &lhs, const QVariant &rhs)
QString unescapeStringLiteral(const QString &input)
std::pair< qreal, QString > calcFileSize(qreal size, int unitSystem=10, qreal multiplier=1.0)
bool isSafeString(const QVariant &input)
bool variantIsTrue(const QVariant &variant)
Grantlee::SafeString markSafe(const Grantlee::SafeString &input)
bool supportedOutputType(const QVariant &input)