2003-08-28 19:57:26 +00:00
|
|
|
/* This file is part of the KDE project
|
|
|
|
Copyright (C) 2003 Alexander Kellett <lypanov@kde.org>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
2007-12-16 15:37:21 +00:00
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of
|
|
|
|
the License, or (at your option) version 3.
|
2003-08-28 19:57:26 +00:00
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-12-16 15:37:21 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2003-08-28 19:57:26 +00:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-12-16 15:37:21 +00:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>
|
2003-08-28 19:57:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __exporters_h
|
|
|
|
#define __exporters_h
|
|
|
|
|
|
|
|
#include <kbookmark.h>
|
2005-07-28 14:59:42 +00:00
|
|
|
//Added by qt3to4:
|
2007-05-09 22:23:52 +00:00
|
|
|
#include <QtCore/QTextStream>
|
2003-08-28 19:57:26 +00:00
|
|
|
|
|
|
|
class HTMLExporter : private KBookmarkGroupTraverser {
|
|
|
|
public:
|
|
|
|
HTMLExporter();
|
2005-09-07 21:17:04 +00:00
|
|
|
virtual ~HTMLExporter(){}
|
2005-06-14 02:57:24 +00:00
|
|
|
QString toString(const KBookmarkGroup &, bool showAddress = false);
|
|
|
|
void write(const KBookmarkGroup &, const QString &, bool showAddress = false);
|
2003-08-28 19:57:26 +00:00
|
|
|
private:
|
|
|
|
virtual void visit(const KBookmark &);
|
|
|
|
virtual void visitEnter(const KBookmarkGroup &);
|
|
|
|
virtual void visitLeave(const KBookmarkGroup &);
|
|
|
|
private:
|
|
|
|
QString m_string;
|
|
|
|
QTextStream m_out;
|
2005-06-14 02:57:24 +00:00
|
|
|
bool m_showAddress;
|
2003-08-28 19:57:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|