| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kbookmarkimporter.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 2000 David Faure <faure@kde.org>
    00003
    00004    This library is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017 */
    00018
    00019 #ifndef __kbookmarkimporter_h
    00020 #define __kbookmarkimporter_h
    00021
    00022 #include <qdom.h>
    00023 #include <qcstring.h>
    00024 #include <qstringlist.h>
    00025 #include <ksimpleconfig.h>
    00026
    00032 class KBookmarkImporter
    00033 {
    00034 public:
    00035     KBookmarkImporter( QDomDocument * doc ) : m_pDoc(doc) {}
    00036
    00037     void import( const QString & path );
    00038
    00039 private:
    00040     void scanIntern( QDomElement & parentElem, const QString & _path );
    00041     void parseBookmark( QDomElement & parentElem, QCString _text,
    00042                         KSimpleConfig& _cfg, const QString &_group );
    00043     QDomDocument * m_pDoc;
    00044     QStringList m_lstParsedDirs;
    00045 };
    00046
    00052 class KNSBookmarkImporter : public QObject
    00053 {
    00054     Q_OBJECT
    00055 public:
    00056     KNSBookmarkImporter( const QString & fileName ) : m_fileName(fileName) {}
    00057     ~KNSBookmarkImporter() {}
    00058
    00059     // for compat reasons only
    00060     void parseNSBookmarks() { parseNSBookmarks(false); }
    00061     // go for it. Set utf8 to true for Mozilla, false for Netscape.
    00062     void parseNSBookmarks( bool utf8 );
    00063
    00064     // Usual place for NS bookmarks
    00065     static QString netscapeBookmarksFile( bool forSaving=false );
    00066     // Usual place for Mozilla bookmarks
    00067     static QString mozillaBookmarksFile( bool forSaving=false );
    00068
    00069 signals:
    00070
    00075     void newBookmark( const QString & text, const QCString & url, const QString & additionalInfo );
    00076
    00081     void newFolder( const QString & text, bool open, const QString & additionalInfo );
    00082
    00086     void newSeparator();
    00087
    00092     void endFolder();
    00093
    00094 protected:
    00095     QString m_fileName;
    00096 };
    00097
    00098 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:13:11 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001