• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/bookmarks
 

tdeio/bookmarks

  • tdeio
  • bookmarks
kbookmarkimporter_ns.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2000 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#ifndef __kbookmarkimporter_ns_h
20#define __kbookmarkimporter_ns_h
21
22#include <tqdom.h>
23#include <tqcstring.h>
24#include <tqstringlist.h>
25#include <ksimpleconfig.h>
26#include <tdemacros.h>
27
28#include "kbookmarkimporter.h"
29#include "kbookmarkexporter.h"
30
35class TDEIO_EXPORT_DEPRECATED KNSBookmarkImporter : public TQObject
36{
37 TQ_OBJECT
38public:
39 KNSBookmarkImporter( const TQString & fileName ) : m_fileName(fileName) {}
40 ~KNSBookmarkImporter() {}
41
42 // for compat reasons only
43 void parseNSBookmarks() { parseNSBookmarks(false); }
44 // go for it. Set utf8 to true for Mozilla, false for Netscape.
45 void parseNSBookmarks( bool utf8 );
46
47 static TQString netscapeBookmarksFile( bool forSaving=false );
48 static TQString mozillaBookmarksFile( bool forSaving=false );
49
50signals:
51 void newBookmark( const TQString & text, const TQCString & url, const TQString & additionalInfo );
52 void newFolder( const TQString & text, bool open, const TQString & additionalInfo );
53 void newSeparator();
54 void endFolder();
55
56protected:
57 TQString m_fileName;
58};
59
65class TDEIO_EXPORT KNSBookmarkImporterImpl : public KBookmarkImporterBase
66{
67public:
68 KNSBookmarkImporterImpl() : m_utf8(false) { }
69 void setUtf8(bool utf8) { m_utf8 = utf8; }
70 virtual void parse();
71 virtual TQString findDefaultLocation(bool forSaving = false) const;
72private:
73 bool m_utf8;
74 class KNSBookmarkImporterImplPrivate *d;
75};
76
82class TDEIO_EXPORT KMozillaBookmarkImporterImpl : public KNSBookmarkImporterImpl
83{
84public:
85 KMozillaBookmarkImporterImpl() { setUtf8(true); }
86private:
87 class KMozillaBookmarkImporterImplPrivate *d;
88};
89
95class TDEIO_EXPORT_DEPRECATED KNSBookmarkExporter
96{
97public:
98 KNSBookmarkExporter(KBookmarkManager* mgr, const TQString & fileName)
99 : m_fileName(fileName), m_pManager(mgr) { }
100 ~KNSBookmarkExporter() {}
101
102 void write() { write(false); } // deprecated
103 void write( bool utf8 );
104
105protected:
106 void writeFolder(TQTextStream &stream, KBookmarkGroup parent);
107 TQString m_fileName;
108 KBookmarkManager* m_pManager;
109};
110
114class TDEIO_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase
115{
116public:
117 KNSBookmarkExporterImpl(KBookmarkManager* mgr, const TQString & fileName)
118 : KBookmarkExporterBase(mgr, fileName)
119 { ; }
120 virtual ~KNSBookmarkExporterImpl() {}
121 virtual void write(KBookmarkGroup);
122 void setUtf8(bool);
123protected:
124 TQString folderAsString(KBookmarkGroup) const;
125private:
126 bool m_utf8;
127 class KNSBookmarkExporterImplPrivate *d;
128};
129
130#endif
KBookmarkExporterBase
Definition: kbookmarkexporter.h:31
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:198
KBookmarkImporterBase
A class for importing NS bookmarks KEditBookmarks uses it to insert bookmarks into its DOM tree,...
Definition: kbookmarkimporter.h:36
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:52
KMozillaBookmarkImporterImpl
A class for importing Mozilla bookmarks utf8 defaults to on.
Definition: kbookmarkimporter_ns.h:83
KNSBookmarkExporterImpl
Definition: kbookmarkimporter_ns.h:115
KNSBookmarkExporter
A class that exports all the current bookmarks to Netscape/Mozilla bookmarks Warning,...
Definition: kbookmarkimporter_ns.h:96
KNSBookmarkImporterImpl
A class for importing NS bookmarks utf8 defaults to off.
Definition: kbookmarkimporter_ns.h:66
KNSBookmarkImporter
A class for importing NS bookmarks.
Definition: kbookmarkimporter_ns.h:36

tdeio/bookmarks

Skip menu "tdeio/bookmarks"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/bookmarks

Skip menu "tdeio/bookmarks"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/bookmarks by doxygen 1.9.4
This website is maintained by Timothy Pearson.