File indexing completed on 2024-04-14 05:43:09
0001 /* This file is part of the KDE project 0002 Copyright (C) 2003 Alexander Kellett <lypanov@kde.org> 0003 0004 This program is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public License as 0006 published by the Free Software Foundation; either version 2 of 0007 the License, or (at your option) version 3. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 GNU General Public License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program. If not, see <http://www.gnu.org/licenses/> 0016 */ 0017 0018 #ifndef __exporters_h 0019 #define __exporters_h 0020 0021 #include <KBookmark> 0022 // Added by qt3to4: 0023 #include <QTextStream> 0024 0025 class HTMLExporter : private KBookmarkGroupTraverser 0026 { 0027 public: 0028 HTMLExporter(); 0029 ~HTMLExporter() override 0030 { 0031 } 0032 QString toString(const KBookmarkGroup &, bool showAddress = false); 0033 void write(const KBookmarkGroup &, const QString &, bool showAddress = false); 0034 0035 private: 0036 void visit(const KBookmark &) override; 0037 void visitEnter(const KBookmarkGroup &) override; 0038 void visitLeave(const KBookmarkGroup &) override; 0039 0040 private: 0041 QString m_string; 0042 QTextStream m_out; 0043 bool m_showAddress; 0044 }; 0045 0046 #endif