Grantlee
0.2.0
|
00001 /* 00002 This file is part of the Grantlee template system. 00003 00004 Copyright (c) 2009,2010 Stephen Kelly <steveire@gmail.com> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either version 00009 2.1 of the Licence, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Lesser General Public License for more details. 00015 00016 You should have received a copy of the GNU Lesser General Public 00017 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00021 #ifndef GRANTLEE_UTIL_P_H 00022 #define GRANTLEE_UTIL_P_H 00023 00024 #include "context.h" 00025 #include "grantlee_core_export.h" 00026 #include "safestring.h" 00027 00028 #include <QtCore/QVariant> 00029 00031 00032 namespace Grantlee 00033 { 00034 00040 GRANTLEE_CORE_EXPORT bool variantIsTrue( const QVariant &variant ); 00041 00046 GRANTLEE_CORE_EXPORT QVariantList variantToList( const QVariant &variant ); 00047 00053 GRANTLEE_CORE_EXPORT QString unescapeStringLiteral( const QString &input ); 00054 00058 GRANTLEE_CORE_EXPORT Grantlee::SafeString markSafe( const Grantlee::SafeString &input ); 00059 00063 GRANTLEE_CORE_EXPORT Grantlee::SafeString markForEscaping( const Grantlee::SafeString &input ); 00064 00068 GRANTLEE_CORE_EXPORT Grantlee::SafeString getSafeString( const QVariant &input ); 00069 00073 GRANTLEE_CORE_EXPORT bool isSafeString( const QVariant &input ); 00074 00079 GRANTLEE_CORE_EXPORT bool supportedOutputType( const QVariant &input ); 00080 00086 GRANTLEE_CORE_EXPORT bool equals( const QVariant &lhs, const QVariant &rhs ); 00087 00088 #ifndef Q_QDOC 00089 00093 GRANTLEE_CORE_EXPORT Grantlee::SafeString toString( const QVariantList &list ); 00094 #endif 00095 00096 } 00097 00098 #endif 00099