KBookmarks 5.109.0
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KBookmarkDialog

This class provides a Dialog for editing properties, adding Bookmarks and creating new folders. More...

#include <KBookmarkDialog>

Public Member Functions

 KBookmarkDialog (KBookmarkManager *manager, QWidget *parent=nullptr)
 Creates a KBookmarkDialog instance.
 
KBookmark addBookmark (const QString &title, const QUrl &url, const QString &icon, KBookmark parent=KBookmark())
 Shows a "Add Bookmark" dialog Note: this updates the bookmark and calls KBookmarkManager::emitChanged.
 
KBookmarkGroup addBookmarks (const QList< KBookmarkOwner::FutureBookmark > &list, const QString &name=QString(), KBookmarkGroup parent=KBookmarkGroup())
 Creates a folder from a list of bookmarks Note: this updates the bookmark and calls KBookmarkManager::emitChanged.
 
KBookmarkGroup createNewFolder (const QString &name, KBookmark parent=KBookmark())
 Shows a dialog to create a new folder.
 
KBookmark editBookmark (const KBookmark &bm)
 Shows a properties dialog Note: this updates the bookmark and calls KBookmarkManager::emitChanged.
 
KBookmarkGroup selectFolder (KBookmark start=KBookmark())
 Shows a dialog to select a folder.
 

Protected Slots

void newFolderButton ()
 

Protected Member Functions

void accept () override
 

Detailed Description

This class provides a Dialog for editing properties, adding Bookmarks and creating new folders.

It can be used to show dialogs for common tasks with bookmarks.

It is used by KBookmarkMenu to show a dialog for "Properties", "Add Bookmark" and "Create New Folder". If you want to customize those dialogs, derive from KBookmarkOwner and reimplement bookmarkDialog(), return a KBookmarkDialog subclass and reimplement initLayout(), aboutToShow() and save().

Constructor & Destructor Documentation

◆ KBookmarkDialog()

KBookmarkDialog::KBookmarkDialog ( KBookmarkManager manager,
QWidget *  parent = nullptr 
)

Creates a KBookmarkDialog instance.

Member Function Documentation

◆ addBookmark()

KBookmark KBookmarkDialog::addBookmark ( const QString &  title,
const QUrl &  url,
const QString &  icon,
KBookmark  parent = KBookmark() 
)

Shows a "Add Bookmark" dialog Note: this updates the bookmark and calls KBookmarkManager::emitChanged.

◆ addBookmarks()

KBookmarkGroup KBookmarkDialog::addBookmarks ( const QList< KBookmarkOwner::FutureBookmark > &  list,
const QString &  name = QString(),
KBookmarkGroup  parent = KBookmarkGroup() 
)

Creates a folder from a list of bookmarks Note: this updates the bookmark and calls KBookmarkManager::emitChanged.

◆ createNewFolder()

KBookmarkGroup KBookmarkDialog::createNewFolder ( const QString &  name,
KBookmark  parent = KBookmark() 
)

Shows a dialog to create a new folder.

◆ editBookmark()

KBookmark KBookmarkDialog::editBookmark ( const KBookmark bm)

Shows a properties dialog Note: this updates the bookmark and calls KBookmarkManager::emitChanged.

◆ selectFolder()

KBookmarkGroup KBookmarkDialog::selectFolder ( KBookmark  start = KBookmark())

Shows a dialog to select a folder.