kbookmarkimporter.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
00060 void parseNSBookmarks() { parseNSBookmarks(false); }
00061
00062 void parseNSBookmarks( bool utf8 );
00063
00064
00065 static QString netscapeBookmarksFile( bool forSaving=false );
00066
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.