KBookmarks

kbookmarkimporter_ns.h
1 // -*- c-basic-offset:4; indent-tabs-mode:nil -*-
2 /* This file is part of the KDE libraries
3  Copyright (C) 2000 David Faure <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __kbookmarkimporter_ns_h
21 #define __kbookmarkimporter_ns_h
22 
23 #include "kbookmarkimporter.h"
24 #include "kbookmarkexporter.h"
25 
30 class KBOOKMARKS_EXPORT KNSBookmarkImporterImpl : public KBookmarkImporterBase
31 {
32  Q_OBJECT // For QObject::tr
33 public:
34  KNSBookmarkImporterImpl() : m_utf8(false) { }
35  void setUtf8(bool utf8)
36  {
37  m_utf8 = utf8;
38  }
39  void parse() override;
40  QString findDefaultLocation(bool forSaving = false) const override;
41 private:
42  bool m_utf8;
43  class KNSBookmarkImporterImplPrivate *d;
44 };
45 
50 class KBOOKMARKS_EXPORT KMozillaBookmarkImporterImpl : public KNSBookmarkImporterImpl
51 {
52  Q_OBJECT
53 public:
55  {
56  setUtf8(true);
57  }
58 private:
59  class KMozillaBookmarkImporterImplPrivate *d;
60 };
61 
62 class KBOOKMARKS_EXPORT KNSBookmarkExporterImpl : public KBookmarkExporterBase
63 {
64 public:
65  KNSBookmarkExporterImpl(KBookmarkManager *mgr, const QString &fileName)
66  : KBookmarkExporterBase(mgr, fileName)
67  {
68  ;
69  }
70  ~KNSBookmarkExporterImpl() override {}
71  void write(const KBookmarkGroup &parent) override;
72  void setUtf8(bool);
73 protected:
74  QString folderAsString(const KBookmarkGroup &parent) const;
75 private:
76  bool m_utf8;
77  class KNSBookmarkExporterImplPrivate *d;
78 };
79 
80 #endif
A class for importing NS bookmarks utf8 defaults to off.
A class for importing Mozilla bookmarks utf8 defaults to on.
This class implements the reading/writing of bookmarks in XML.
A group of bookmarks.
Definition: kbookmark.h:327
A class for importing NS bookmarks KEditBookmarks uses it to insert bookmarks into its DOM tree...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 31 2020 23:01:51 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.