File indexing completed on 2025-02-09 04:28:36
0001 /* 0002 This file is part of the KTextTemplate library 0003 0004 SPDX-FileCopyrightText: 2010 Stephen Kelly <steveire@gmail.com> 0005 0006 SPDX-License-Identifier: LGPL-2.1-or-later 0007 0008 */ 0009 0010 #ifndef WITHLOCALENODE_H 0011 #define WITHLOCALENODE_H 0012 0013 #include "node.h" 0014 0015 using namespace KTextTemplate; 0016 0017 class WithLocaleNodeFactory : public AbstractNodeFactory 0018 { 0019 Q_OBJECT 0020 public: 0021 WithLocaleNodeFactory(); 0022 0023 Node *getNode(const QString &tagContent, Parser *p) const override; 0024 }; 0025 0026 class WithLocaleNode : public Node 0027 { 0028 Q_OBJECT 0029 public: 0030 WithLocaleNode(const FilterExpression &localeName, QObject *parent = {}); 0031 0032 void setNodeList(const NodeList &nodeList); 0033 0034 void render(OutputStream *stream, Context *c) const override; 0035 0036 private: 0037 FilterExpression m_localeName; 0038 NodeList m_list; 0039 }; 0040 0041 #endif