Package mrv :: Package maya :: Package ui :: Package browse :: Module control :: Class BookmarkControl
[hide private]
[frames] | no frames]

Class BookmarkControl

source code

TextScrollList --+    
                 |    
  StackControlBase --+
                     |
                    BookmarkControl

Control allowing to display a set of custom bookmarks, which are stored in optionVars
Instance Methods [hide private]
 
__init__(self, *args, **kwargs) source code
 
_parse_bookmark(self, bookmark)
Returns: root,path tuple or raise
source code
 
_unpack_stored_bookmarks(self)
Returns: list of tuples of root,path pairs
source code
 
_store_item_list(self, items)
Store a list of pairs
source code
 
_store_bookmark(self, root, path, add=True)
Store the given path under the given root...
source code
 
_selection_changed(self, *args)
Convert the default callback into our signals
source code
 
setItems(self, bookmarks)
Set this control to a list of bookmarks...
source code
    StackControl Interface
 
formatItem(self, root_path_tuple)
Returns: formatted version of item
source code
    Interface

Inherited from StackControlBase: selectUnformattedItem, selectedUnformattedItem

    Overridden Methods
 
addItem(self, bookmark)
Add a new bookmark :param bookmark: tuple of root,relative_path or a single absolute path.
source code
 
removeItem(self, bookmark)
Remove the given bookmark from the list of bookmarks :param bookmark: full path to the bookmark to remove.
source code
Class Variables [hide private]
    Configuration
  k_bookmark_store = "MRV_bookmarks"
    Signals
  bookmark_changed = ui.Signal()
Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 
Overrides: StackControlBase.__init__

_parse_bookmark(self, bookmark)

source code 
Returns:
root,path tuple or raise

_unpack_stored_bookmarks(self)

source code 
Returns:
list of tuples of root,path pairs

_store_bookmark(self, root, path, add=True)

source code 
Store the given path under the given root
:param add: if True, the path will be added to the bookmarks of the given 
        root, otherwise it will be removed

_selection_changed(self, *args)

source code 
Convert the default callback into our signals
Decorators:
  • @logException

formatItem(self, root_path_tuple)

source code 
Returns:
formatted version of item
Overrides: StackControlBase.formatItem
(inherited documentation)

addItem(self, bookmark)

source code 
Add a new bookmark
:param bookmark: tuple of root,relative_path or a single absolute path. In the 
        latter case, the root will be the natural root of the absolute path

Overrides: StackControlBase.addItem

setItems(self, bookmarks)

source code 
Set this control to a list of bookmarks
:param bookmarks: list of either tuples of (root, path) pairs or absolute paths
        whose root will be chosen automatically

removeItem(self, bookmark)

source code 
Remove the given bookmark from the list of bookmarks
:param bookmark: full path to the bookmark to remove. Its not an error
        if it doesn't exist in the first place

Overrides: StackControlBase.removeItem