KBookmarkDialog Class Reference
from PyKDE4.kio import *
Inherits: KDialog → QDialog → QWidget → QObject
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().
Enumerations |
BookmarkDialogMode | { NewFolder, NewBookmark, EditBookmark, NewMultipleBookmarks, SelectFolder } |
Methods |
| __init__ (self, KBookmarkManager a0, QWidget a1=0) |
| aboutToShow (self, KBookmarkDialog.BookmarkDialogMode mode) |
KBookmark | addBookmark (self, QString title, KUrl url, KBookmark parent=KBookmark()) |
KBookmarkGroup | addBookmarks (self, [QPair] list, QString name=QString(), KBookmarkGroup parent=KBookmarkGroup()) |
KBookmarkGroup | createNewFolder (self, QString name, KBookmark parent=KBookmark()) |
KBookmark | editBookmark (self, KBookmark bm) |
| fillGroup (self, QTreeWidgetItem parentItem, KBookmarkGroup group) |
| initLayout (self) |
| initLayoutPrivate (self) |
| newFolderButton (self) |
KBookmarkGroup | parentBookmark (self) |
| save (self, KBookmarkDialog.BookmarkDialogMode mode, KBookmark a1) |
KBookmarkGroup | selectFolder (self, KBookmark start=KBookmark()) |
| setParentBookmark (self, KBookmark bm) |
| slotButtonClicked (self, int a0) |
Method Documentation
aboutToShow is called immediately before exec()
Reimplement this to show or hide UI elements for certain modes.
shows a add Bookmark dialog
Note: That this updates the bookmark and calls KBookmarkManager.emitChanged
Creates a folder from a list of bookmarks
Note: That this updates the bookmark and calls KBookmarkManager.emitChanged
A dialog to create a new folder.
shows a propeties dialog
Note: That this updates the bookmark and calls KBookmarkManager.emitChanged
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 |
( |
|
self ) |
|
returns the selected bookmark in the folder tree, or the root (top-level)
bookmark if none was selected
save all your custom data in this method
This is called after the users has accepted() the dialog.
A dialog to select a folder.
selects the specified bookmark in the folder tree
slotButtonClicked |
( |
self, |
|
|
|
int |
a0 |
|
) |
|
|
|
Enumeration Documentation