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

KIO

  • kio
  • bookmarks
kbookmarkmenu_p.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 project
4 Copyright (C) 2003 Alexander Kellett <lypanov@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 as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef __kbookmarkmenu_p_h__
23#define __kbookmarkmenu_p_h__
24
25#include <QtCore/QObject>
26
27#include <kdialog.h>
28#include <kicon.h>
29#include <klocale.h>
30#include <kaction.h>
31#include <kactionmenu.h>
32#include <QtGui/QBoxLayout>
33#include <QtGui/QTreeWidget>
34#include <QtGui/QLabel>
35
36#include "kbookmark.h"
37#include "kbookmarkimporter.h"
38#include "kbookmarkmanager.h"
39
40class QString;
41class QPushButton;
42class KLineEdit;
43class KBookmark;
44class KBookmarkGroup;
45class KAction;
46class KActionMenu;
47class KActionCollection;
48class KBookmarkOwner;
49class KBookmarkMenu;
50
51class KImportedBookmarkMenu : public KBookmarkMenu
52{
53 friend class KBookmarkMenuImporter;
54 Q_OBJECT
55public:
56 //TODO simplfy
57 KImportedBookmarkMenu( KBookmarkManager* mgr,
58 KBookmarkOwner * owner, KMenu * parentMenu,
59 const QString & type, const QString & location );
60 KImportedBookmarkMenu( KBookmarkManager* mgr,
61 KBookmarkOwner * owner, KMenu * parentMenu);
62 ~KImportedBookmarkMenu();
63 virtual void clear();
64 virtual void refill();
65protected Q_SLOTS:
66 void slotNSLoad();
67private:
68 QString m_type;
69 QString m_location;
70};
71
72
73class KBookmarkTreeItem : public QTreeWidgetItem
74{
75public:
76 KBookmarkTreeItem(QTreeWidget * tree);
77 KBookmarkTreeItem(QTreeWidgetItem * parent, QTreeWidget * tree, const KBookmarkGroup &bk);
78 ~KBookmarkTreeItem();
79 QString address();
80private:
81 QString m_address;
82};
83
84class KBookmarkSettings
85{
86public:
87 bool m_advancedaddbookmark;
88 bool m_contextmenu;
89 static KBookmarkSettings *s_self;
90 static void readSettings();
91 static KBookmarkSettings *self();
92};
93
97class KBookmarkMenuImporter : public QObject
98{
99 Q_OBJECT
100public:
101 KBookmarkMenuImporter( KBookmarkManager* mgr, KImportedBookmarkMenu * menu ) :
102 m_menu(menu), m_pManager(mgr) {}
103
104 void openBookmarks( const QString &location, const QString &type );
105 void connectToImporter( const QObject &importer );
106
107protected Q_SLOTS:
108 void newBookmark( const QString & text, const QString & url, const QString & );
109 void newFolder( const QString & text, bool, const QString & );
110 void newSeparator();
111 void endFolder();
112
113protected:
114 QStack<KImportedBookmarkMenu*> mstack;
115 KImportedBookmarkMenu * m_menu;
116 KBookmarkManager* m_pManager;
117};
118
119class KImportedBookmarkActionMenu : public KActionMenu, public KBookmarkActionInterface
120{
121public:
122 KImportedBookmarkActionMenu(const KIcon &icon, const QString &text, QObject *parent)
123 : KActionMenu(icon, text, parent),
124 KBookmarkActionInterface(KBookmark())
125 {
126 }
127 ~KImportedBookmarkActionMenu()
128 {}
129};
130
131#endif
KActionCollection
KActionMenu
KAction
KBookmarkActionInterface
Definition: kbookmarkmenu.h:226
KBookmarkGroup
A group of bookmarks.
Definition: kbookmark.h:348
KBookmarkManager
This class implements the reading/writing of bookmarks in XML.
Definition: kbookmarkmanager.h:66
KBookmarkMenuImporter
A class connected to KNSBookmarkImporter, to fill KActionMenus.
Definition: kbookmarkmenu_p.h:98
KBookmarkMenuImporter::m_menu
KImportedBookmarkMenu * m_menu
Definition: kbookmarkmenu_p.h:115
KBookmarkMenuImporter::connectToImporter
void connectToImporter(const QObject &importer)
Definition: kbookmarkmenu.cc:677
KBookmarkMenuImporter::newSeparator
void newSeparator()
Definition: kbookmarkmenu.cc:707
KBookmarkMenuImporter::newBookmark
void newBookmark(const QString &text, const QString &url, const QString &)
Definition: kbookmarkmenu.cc:687
KBookmarkMenuImporter::mstack
QStack< KImportedBookmarkMenu * > mstack
Definition: kbookmarkmenu_p.h:114
KBookmarkMenuImporter::endFolder
void endFolder()
Definition: kbookmarkmenu.cc:712
KBookmarkMenuImporter::m_pManager
KBookmarkManager * m_pManager
Definition: kbookmarkmenu_p.h:116
KBookmarkMenuImporter::openBookmarks
void openBookmarks(const QString &location, const QString &type)
Definition: kbookmarkmenu.cc:663
KBookmarkMenuImporter::KBookmarkMenuImporter
KBookmarkMenuImporter(KBookmarkManager *mgr, KImportedBookmarkMenu *menu)
Definition: kbookmarkmenu_p.h:101
KBookmarkMenuImporter::newFolder
void newFolder(const QString &text, bool, const QString &)
Definition: kbookmarkmenu.cc:695
KBookmarkMenu
This class provides a bookmark menu.
Definition: kbookmarkmenu.h:77
KBookmarkMenu::parentMenu
KMenu * parentMenu() const
The menu in which we insert our actions Supplied in the constructor.
Definition: kbookmarkmenu.cc:205
KBookmarkMenu::owner
KBookmarkOwner * owner() const
Definition: kbookmarkmenu.cc:200
KBookmarkOwner
The KBookmarkMenu and KBookmarkBar classes gives the user the ability to either edit bookmarks or add...
Definition: kbookmarkmanager.h:383
KBookmarkSettings
Definition: kbookmarkmenu_p.h:85
KBookmarkSettings::m_advancedaddbookmark
bool m_advancedaddbookmark
Definition: kbookmarkmenu_p.h:87
KBookmarkSettings::m_contextmenu
bool m_contextmenu
Definition: kbookmarkmenu_p.h:88
KBookmarkSettings::s_self
static KBookmarkSettings * s_self
Definition: kbookmarkmenu_p.h:89
KBookmarkSettings::readSettings
static void readSettings()
Definition: kbookmarkmanager.cc:683
KBookmarkSettings::self
static KBookmarkSettings * self()
Definition: kbookmarkmanager.cc:695
KBookmarkTreeItem
Definition: kbookmarkmenu_p.h:74
KBookmarkTreeItem::~KBookmarkTreeItem
~KBookmarkTreeItem()
Definition: kbookmarkdialog.cc:390
KBookmarkTreeItem::address
QString address()
Definition: kbookmarkdialog.cc:394
KBookmark
Definition: kbookmark.h:35
KIcon
KImportedBookmarkActionMenu
Definition: kbookmarkmenu_p.h:120
KImportedBookmarkActionMenu::~KImportedBookmarkActionMenu
~KImportedBookmarkActionMenu()
Definition: kbookmarkmenu_p.h:127
KImportedBookmarkActionMenu::KImportedBookmarkActionMenu
KImportedBookmarkActionMenu(const KIcon &icon, const QString &text, QObject *parent)
Definition: kbookmarkmenu_p.h:122
KImportedBookmarkMenu
Definition: kbookmarkmenu_p.h:52
KImportedBookmarkMenu::slotNSLoad
void slotNSLoad()
Definition: kbookmarkmenu.cc:617
KImportedBookmarkMenu::~KImportedBookmarkMenu
~KImportedBookmarkMenu()
Definition: kbookmarkmenu.cc:643
KImportedBookmarkMenu::refill
virtual void refill()
Definition: kbookmarkmenu.cc:648
KImportedBookmarkMenu::clear
virtual void clear()
Definition: kbookmarkmenu.cc:653
KLineEdit
KMenu
QObject
QPushButton
QTreeWidget
kaction.h
kactionmenu.h
kbookmark.h
kbookmarkimporter.h
kbookmarkmanager.h
kdialog.h
kicon.h
klocale.h
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