# class KBookmarkDialog

###

Module | kio
Namespace |
Class | KBookmarkDialog
Inherits | KDialog

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()

### enums

- BookmarkDialogMode { NewFolder, NewBookmark, EditBookmark, NewMultipleBookmarks, SelectFolder }

enum details

### methods

- KBookmarkDialog (a0, a1)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | KBookmarkManager |
  a1 | QWidget | 0

  Creates a new KBookmarkDialog

- aboutToShow (mode)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  mode | KBookmarkDialog.BookmarkDialogMode |

  aboutToShow is called immediately before exec() Reimplement this to show or hide UI elements for certain modes.

- addBookmark (title, url, parent)

  returns KBookmark

  Argument | Type | Default
  --- | --- | ---
  title | QString |
  url | KUrl |
  parent | KBookmark | KBookmark()

  shows a add Bookmark dialog Note: That this updates the bookmark and calls KBookmarkManager.emitChanged

- addBookmarks (list, name, parent)

  returns KBookmarkGroup

  Argument | Type | Default
  --- | --- | ---
  list | QList<QPair<QString,QString>> |
  name | QString | QString()
  parent | KBookmarkGroup | KBookmarkGroup()

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

- createNewFolder (name, parent)

  returns KBookmarkGroup

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  parent | KBookmark | KBookmark()

  A dialog to create a new folder.

- editBookmark (bm)

  returns KBookmark

  Argument | Type | Default
  --- | --- | ---
  bm | KBookmark |

  shows a propeties dialog Note: That this updates the bookmark and calls KBookmarkManager.emitChanged

- fillGroup (parentItem, group)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  parentItem | QTreeWidgetItem |
  group | KBookmarkGroup |

- initLayout ( )

  returns Nothing

  initLayout is called to set the dialog up, indepent from the mode If you want to add widgets or a custom layout, reimplement this function. The default implementation is rather simple, take a look at the source.

- initLayoutPrivate ( )

  returns Nothing

- newFolderButton ( )

  returns Nothing

- parentBookmark ( )

  returns KBookmarkGroup

  returns the selected bookmark in the folder tree, or the root (top-level) bookmark if none was selected

- save (mode, a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  mode | KBookmarkDialog.BookmarkDialogMode |
  a0 | KBookmark |

  save all your custom data in this method This is called after the users has accepted() the dialog.

- selectFolder (start)

  returns KBookmarkGroup

  Argument | Type | Default
  --- | --- | ---
  start | KBookmark | KBookmark()

  A dialog to select a folder.

- setParentBookmark (bm)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  bm | KBookmark |

  selects the specified bookmark in the folder tree

- slotButtonClicked (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | int |

### enums - detail

- BookmarkDialogMode { NewFolder, NewBookmark, EditBookmark, NewMultipleBookmarks, SelectFolder }

  | NewFolder | - | - |
  | NewBookmark | - | - |
  | EditBookmark | - | - |
  | NewMultipleBookmarks | - | - |
  | SelectFolder | - | - |