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

KIO

Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
KBookmarkMenu Class Reference

#include <kbookmarkmenu.h>

Inheritance diagram for KBookmarkMenu:
Inheritance graph
[legend]

Public Slots

void slotBookmarksChanged (const QString &)
 

Public Member Functions

 KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KMenu *parentMenu, KActionCollection *collec)
 
 KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, KMenu *parentMenu, const QString &parentAddress)
 
 ~KBookmarkMenu ()
 
void ensureUpToDate ()
 

Protected Slots

void slotAboutToShow ()
 
void slotAddBookmark ()
 
void slotAddBookmarksList ()
 
void slotNewFolder ()
 
void slotOpenFolderInTabs ()
 

Protected Member Functions

virtual QAction * actionForBookmark (const KBookmark &bm)
 
void addActions ()
 
void addAddBookmark ()
 
void addAddBookmarksList ()
 
void addEditBookmarks ()
 
void addNewFolder ()
 
void addOpenInTabs ()
 
virtual void clear ()
 
virtual KMenu * contextMenu (QAction *action)
 
void fillBookmarks ()
 
bool isDirty () const
 
bool isRoot () const
 
KBookmarkManager * manager () const
 
KBookmarkOwner * owner () const
 
QString parentAddress () const
 
KMenu * parentMenu () const
 
virtual void refill ()
 

Protected Attributes

KActionCollection * m_actionCollection
 
QList< QAction * > m_actions
 
QList< KBookmarkMenu * > m_lstSubMenus
 

Detailed Description

This class provides a bookmark menu.

It is typically used in cooperation with KActionMenu but doesn't have to be.

If you use this class by itself, then it will use KDE defaults for everything – the bookmark path, bookmark editor, bookmark launcher.. everything. These defaults reside in the classes KBookmarkOwner (editing bookmarks) and KBookmarkManager (almost everything else). If you wish to change the defaults in any way, you must reimplement either this class or KBookmarkOwner.

Using this class is very simple:

1) Create a popup menu (either KActionMenu or KMenu will do) 2) Instantiate a new KBookmarkMenu object using the above popup menu as a parameter 3) Insert your (now full) popup menu wherever you wish

Definition at line 76 of file kbookmarkmenu.h.

Constructor & Destructor Documentation

KBookmarkMenu::KBookmarkMenu ( KBookmarkManager *  mgr,
KBookmarkOwner *  owner,
KMenu *  parentMenu,
KActionCollection *  collec 
)

Fills a bookmark menu (one instance of KBookmarkMenu is created for the toplevel menu, but also one per submenu).

Parameters
mgrThe bookmark manager to use (i.e. for reading and writing)
ownerimplementation of the KBookmarkOwner callback interface. Note: If you pass a null KBookmarkOwner to the constructor, the openBookmark signal is not emitted, instead KRun is used to open the bookmark.
parentMenumenu to be filled
collecparent collection for the KActions.
Todo:
KDE 5: give ownership of the bookmarkmenu to another qobject, e.g. parentMenu. Currently this is a QObject without a parent, use setParent to benefit from automatic deletion.

Definition at line 65 of file kbookmarkmenu.cc.

KBookmarkMenu::KBookmarkMenu ( KBookmarkManager *  mgr,
KBookmarkOwner *  owner,
KMenu *  parentMenu,
const QString &  parentAddress 
)

Creates a bookmark submenu.

Todo:
KDE 5: give ownership of the bookmarkmenu to another qobject, e.g. parentMenu. Currently this is a QObject without a parent, use setParent to benefit from automatic deletion.

Definition at line 117 of file kbookmarkmenu.cc.

KBookmarkMenu::~KBookmarkMenu ( )

Definition at line 138 of file kbookmarkmenu.cc.

Member Function Documentation

QAction * KBookmarkMenu::actionForBookmark ( const KBookmark &  bm)
protectedvirtual

Reimplemented in KonqBookmarkMenu.

Definition at line 543 of file kbookmarkmenu.cc.

void KBookmarkMenu::addActions ( )
protected

Definition at line 96 of file kbookmarkmenu.cc.

void KBookmarkMenu::addAddBookmark ( )
protected

Definition at line 482 of file kbookmarkmenu.cc.

void KBookmarkMenu::addAddBookmarksList ( )
protected

Definition at line 465 of file kbookmarkmenu.cc.

void KBookmarkMenu::addEditBookmarks ( )
protected

Definition at line 500 of file kbookmarkmenu.cc.

void KBookmarkMenu::addNewFolder ( )
protected

Definition at line 511 of file kbookmarkmenu.cc.

void KBookmarkMenu::addOpenInTabs ( )
protected

Definition at line 449 of file kbookmarkmenu.cc.

void KBookmarkMenu::clear ( )
protectedvirtual

Reimplemented in KImportedBookmarkMenu.

Definition at line 423 of file kbookmarkmenu.cc.

KMenu * KBookmarkMenu::contextMenu ( QAction *  action)
protectedvirtual

Reimplemented in KonqBookmarkMenu.

Definition at line 172 of file kbookmarkmenu.cc.

void KBookmarkMenu::ensureUpToDate ( )

Call ensureUpToDate() if you need KBookmarkMenu to adjust to its final size before it is executed.

Definition at line 145 of file kbookmarkmenu.cc.

void KBookmarkMenu::fillBookmarks ( )
protected

Definition at line 527 of file kbookmarkmenu.cc.

bool KBookmarkMenu::isDirty ( ) const
protected

Definition at line 185 of file kbookmarkmenu.cc.

bool KBookmarkMenu::isRoot ( ) const
protected

Definition at line 180 of file kbookmarkmenu.cc.

KBookmarkManager * KBookmarkMenu::manager ( ) const
protected

Definition at line 195 of file kbookmarkmenu.cc.

KBookmarkOwner * KBookmarkMenu::owner ( ) const
protected

Definition at line 200 of file kbookmarkmenu.cc.

QString KBookmarkMenu::parentAddress ( ) const
protected

Parent bookmark for this menu.

Definition at line 190 of file kbookmarkmenu.cc.

KMenu * KBookmarkMenu::parentMenu ( ) const
protected

The menu in which we insert our actions Supplied in the constructor.

Definition at line 205 of file kbookmarkmenu.cc.

void KBookmarkMenu::refill ( )
protectedvirtual

Reimplemented in KonqBookmarkMenu, and KImportedBookmarkMenu.

Definition at line 439 of file kbookmarkmenu.cc.

void KBookmarkMenu::slotAboutToShow ( )
protectedslot

Definition at line 150 of file kbookmarkmenu.cc.

void KBookmarkMenu::slotAddBookmark ( )
protectedslot

Definition at line 583 of file kbookmarkmenu.cc.

void KBookmarkMenu::slotAddBookmarksList ( )
protectedslot

Definition at line 570 of file kbookmarkmenu.cc.

void KBookmarkMenu::slotBookmarksChanged ( const QString &  groupAddress)
slot

Definition at line 405 of file kbookmarkmenu.cc.

void KBookmarkMenu::slotNewFolder ( )
protectedslot

Definition at line 607 of file kbookmarkmenu.cc.

void KBookmarkMenu::slotOpenFolderInTabs ( )
protectedslot

Definition at line 602 of file kbookmarkmenu.cc.

Member Data Documentation

KActionCollection* KBookmarkMenu::m_actionCollection
protected

Definition at line 164 of file kbookmarkmenu.h.

QList<QAction *> KBookmarkMenu::m_actions
protected

List of our actions.

Definition at line 168 of file kbookmarkmenu.h.

QList<KBookmarkMenu *> KBookmarkMenu::m_lstSubMenus
protected

List of our sub menus.

Definition at line 159 of file kbookmarkmenu.h.


The documentation for this class was generated from the following files:
  • kbookmarkmenu.h
  • kbookmarkmenu.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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