• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • bookmarks
kbookmarkimporter.h
Go to the documentation of this file.
1// -*- c-basic-offset:4; indent-tabs-mode:nil -*-
2// vim: set ts=4 sts=4 sw=4 et:
3/* This file is part of the KDE libraries
4 Copyright (C) 2000 David Faure <faure@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef __kbookmarkimporter_h
22#define __kbookmarkimporter_h
23
24#include <QtCore/QStringList>
25#include <kconfig.h>
26
27#include "kbookmark.h"
28
34class KIO_EXPORT KBookmarkImporterBase : public QObject
35{
36 Q_OBJECT
37public:
38 KBookmarkImporterBase() {}
39 virtual ~KBookmarkImporterBase() {}
40
41 void setFilename(const QString &filename) { m_fileName = filename; }
42
43 virtual void parse() = 0;
44 virtual QString findDefaultLocation(bool forSaving = false) const = 0;
45
46 // TODO - make this static?
47 void setupSignalForwards(QObject *src, QObject *dst);
48 static KBookmarkImporterBase *factory(const QString &type);
49
50Q_SIGNALS:
55 void newBookmark(const QString & text, const QString & url, const QString & additionalInfo);
56
61 void newFolder(const QString & text, bool open, const QString & additionalInfo);
62
66 void newSeparator();
67
72 void endFolder();
73
74protected:
75 QString m_fileName;
76
77private:
78 class KBookmarkImporterBasePrivate *d;
79};
80
84class KIO_EXPORT KXBELBookmarkImporterImpl : public KBookmarkImporterBase, protected KBookmarkGroupTraverser
85{
86 Q_OBJECT
87public:
88 KXBELBookmarkImporterImpl() {}
89 virtual void parse();
90 virtual QString findDefaultLocation(bool = false) const { return QString(); }
91protected:
92 virtual void visit(const KBookmark &);
93 virtual void visitEnter(const KBookmarkGroup &);
94 virtual void visitLeave(const KBookmarkGroup &);
95private:
96 class KXBELBookmarkImporterImplPrivate *d;
97};
98
99
100#endif
KBookmarkGroupTraverser
Definition: kbookmark.h:459
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:348
KBookmarkImporterBase
A class for importing NS bookmarks KEditBookmarks uses it to insert bookmarks into its DOM tree,...
Definition: kbookmarkimporter.h:35
KBookmarkImporterBase::KBookmarkImporterBase
KBookmarkImporterBase()
Definition: kbookmarkimporter.h:38
KBookmarkImporterBase::~KBookmarkImporterBase
virtual ~KBookmarkImporterBase()
Definition: kbookmarkimporter.h:39
KBookmarkImporterBase::newSeparator
void newSeparator()
Notify about a new separator.
KBookmarkImporterBase::setFilename
void setFilename(const QString &filename)
Definition: kbookmarkimporter.h:41
KBookmarkImporterBase::endFolder
void endFolder()
Tell the outside world that we're going down one menu.
KBookmarkImporterBase::newFolder
void newFolder(const QString &text, bool open, const QString &additionalInfo)
Notify about a new folder Use "bookmark_folder" for the icon.
KBookmarkImporterBase::m_fileName
QString m_fileName
Definition: kbookmarkimporter.h:75
KBookmarkImporterBase::findDefaultLocation
virtual QString findDefaultLocation(bool forSaving=false) const =0
KBookmarkImporterBase::newBookmark
void newBookmark(const QString &text, const QString &url, const QString &additionalInfo)
Notify about a new bookmark Use "html" for the icon.
KBookmarkImporterBase::parse
virtual void parse()=0
KBookmark
Definition: kbookmark.h:35
KXBELBookmarkImporterImpl
A class for importing XBEL files.
Definition: kbookmarkimporter.h:85
KXBELBookmarkImporterImpl::findDefaultLocation
virtual QString findDefaultLocation(bool=false) const
Definition: kbookmarkimporter.h:90
KXBELBookmarkImporterImpl::KXBELBookmarkImporterImpl
KXBELBookmarkImporterImpl()
Definition: kbookmarkimporter.h:88
QObject
kbookmark.h
kconfig.h
parse
QList< Action > parse(QSettings &ini)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal