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

tdeio/bookmarks

Classes | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
KBookmarkMenu Class Reference

#include <kbookmarkmenu.h>

Inherits TQObject.

Classes

struct  DynMenuInfo
 

Public Slots

void slotBookmarksChanged (const TQString &)
 

Signals

void aboutToShowContextMenu (const KBookmark &, TQPopupMenu *)
 
void openBookmark (const TQString &url, TQt::ButtonState state)
 

Public Member Functions

 KBookmarkMenu (KBookmarkManager *mgr, KBookmarkOwner *owner, TDEPopupMenu *parentMenu, TDEActionCollection *collec, bool root, bool add=true, const TQString &parentAddress="")
 
void fillBookmarkMenu ()
 
void ensureUpToDate ()
 

Static Public Member Functions

static DynMenuInfo showDynamicBookmarks (const TQString &id)
 
static void setDynamicBookmarks (const TQString &id, const DynMenuInfo &info)
 
static TQStringList dynamicBookmarksList ()
 

Protected Slots

void slotAboutToShow ()
 
void slotAboutToShowContextMenu (TDEPopupMenu *, int, TQPopupMenu *)
 
void slotActionHighlighted (TDEAction *)
 
void slotRMBActionRemove (int)
 
void slotRMBActionInsert (int)
 
void slotRMBActionCopyLocation (int)
 
void slotRMBActionEditAt (int)
 
void slotRMBActionProperties (int)
 
void slotBookmarkSelected ()
 
void slotBookmarkSelected (TDEAction::ActivationReason reason, TQt::ButtonState state)
 
void slotAddBookmarksList ()
 
void slotAddBookmark ()
 
void slotNewFolder ()
 
void slotNSLoad ()
 

Protected Member Functions

KExtendedBookmarkOwner * extOwner ()
 
void refill ()
 
void addAddBookmark ()
 
void addAddBookmarksList ()
 
void addEditBookmarks ()
 
void addNewFolder ()
 
void fillContextMenu (TQPopupMenu *, const TQString &, int)
 

Protected Attributes

bool m_bIsRoot:1
 
bool m_bAddBookmark:1
 
bool m_bDirty:1
 
bool m_bNSBookmark:1
 
bool m_bAddShortcuts:1
 
KBookmarkManager * m_pManager
 
KBookmarkOwner * m_pOwner
 
TDEPopupMenu * m_parentMenu
 
TQPtrList< KBookmarkMenu > m_lstSubMenus
 
TDEActionCollection * m_actionCollection
 
TQPtrList< TDEAction > m_actions
 
TQString m_parentAddress
 

Static Protected Attributes

static TQString s_highlightedAddress
 
static TQString s_highlightedImportLocation
 
static TQString s_highlightedImportType
 

Friends

class KBookmarkMenuNSImporter
 
class RMB
 

Detailed Description

This class provides a bookmark menu.

It is typically used in cooperation with TDEActionMenu 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 and instantiate those classes before this class is ever called.

Using this class is very simple:

1) Create a popup menu (either TDEActionMenu or TDEPopupMenu 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

Again, if you wish to modify any defaults, the procedure is:

1a) Reimplement your own KBookmarkOwner 1b) Reimplement and instantiate your own KBookmarkManager

Definition at line 77 of file kbookmarkmenu.h.

Constructor & Destructor Documentation

◆ KBookmarkMenu()

KBookmarkMenu::KBookmarkMenu ( KBookmarkManager *  mgr,
KBookmarkOwner *  owner,
TDEPopupMenu *  parentMenu,
TDEActionCollection *  collec,
bool  root,
bool  add = true,
const TQString &  parentAddress = "" 
)

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.
parentMenumenu to be filled
collecparent collection for the TDEActions. Only used for other menus than the toplevel one.
roottrue for the toplevel menu
addtrue to show the "Add Bookmark" and "New Folder" entries
parentAddressthe address of the group containing the items that we want to show.
See also
KBookmark::address. Be careful : A null parentAddress denotes a NS-bookmark menu. An empty parentAddress denotes the toplevel bookmark menu

Definition at line 77 of file kbookmarkmenu.cpp.

Member Function Documentation

◆ dynamicBookmarksList()

TQStringList KBookmarkMenu::dynamicBookmarksList ( )
static
Returns
list of dynamic menu ids
Since
3.2

Definition at line 1130 of file kbookmarkmenu.cpp.

◆ ensureUpToDate()

void KBookmarkMenu::ensureUpToDate ( )

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

Definition at line 151 of file kbookmarkmenu.cpp.

◆ fillBookmarkMenu()

void KBookmarkMenu::fillBookmarkMenu ( )

Even if you think you need to use this, you are probably wrong.

It fills a bookmark menu starting a given KBookmark. This is public for KBookmarkBar.

Definition at line 554 of file kbookmarkmenu.cpp.

◆ openBookmark

void KBookmarkMenu::openBookmark ( const TQString &  url,
TQt::ButtonState  state 
)
signal
Since
3.4

◆ setDynamicBookmarks()

void KBookmarkMenu::setDynamicBookmarks ( const TQString &  id,
const DynMenuInfo &  info 
)
static

Shows an extra menu for the given bookmarks file and type.

Upgrades from option inside XBEL to option in rc file on first call of this function.

Parameters
idthe unique identification for the dynamic menu
infoa DynMenuInfo struct containing the to be added/modified data
Since
3.2

Definition at line 1144 of file kbookmarkmenu.cpp.

◆ showDynamicBookmarks()

KBookmarkMenu::DynMenuInfo KBookmarkMenu::showDynamicBookmarks ( const TQString &  id)
static
Returns
dynmenu info block for the given dynmenu name
Since
3.2

Definition at line 1098 of file kbookmarkmenu.cpp.

◆ slotBookmarkSelected

void KBookmarkMenu::slotBookmarkSelected ( TDEAction::ActivationReason  reason,
TQt::ButtonState  state 
)
protectedslot

@ since 3.4

Definition at line 744 of file kbookmarkmenu.cpp.

◆ slotNSLoad

void KBookmarkMenu::slotNSLoad ( )
protectedslot

load Netscape's bookmarks

Definition at line 767 of file kbookmarkmenu.cpp.

Member Data Documentation

◆ m_actions

TQPtrList<TDEAction> KBookmarkMenu::m_actions
protected

List of our actions.

Definition at line 224 of file kbookmarkmenu.h.

◆ m_lstSubMenus

TQPtrList<KBookmarkMenu> KBookmarkMenu::m_lstSubMenus
protected

List of our sub menus.

Definition at line 219 of file kbookmarkmenu.h.

◆ m_parentAddress

TQString KBookmarkMenu::m_parentAddress
protected

Parent bookmark for this menu.

Definition at line 228 of file kbookmarkmenu.h.

◆ m_parentMenu

TDEPopupMenu* KBookmarkMenu::m_parentMenu
protected

The menu in which we plug our actions.

Supplied in the constructor.

Definition at line 215 of file kbookmarkmenu.h.


The documentation for this class was generated from the following files:
  • kbookmarkmenu.h
  • kbookmarkmenu.cpp

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.1
This website is maintained by Timothy Pearson.