Package mrv :: Package maya :: Package ui :: Package browse :: Module interface :: Class iFinderProvider
[hide private]
[frames] | no frames]

Class iFinderProvider

source code

         object --+    
                  |    
interface.Interface --+
                      |
                     iFinderProvider

Interface defining the capabilities of a provider to be usable by a Finder control. Every finder as a root, which is used as basis for listing urls.

Besides its function to provide sub-items for given urls, it is also used to store recently selected items on a given level of a url. This memory allows the finder to restore common portions of URLs accordingly.

The base implementation of the memorization feature already.

Instance Methods [hide private]
 
__init__(self, root)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code

Inherited from interface.Interface: supports

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Interface
 
urlItems(self, url)
:return: list of string-like items which can be found at the given url.
source code
 
formatItem(self, url_base, url_index, url_item)
Given the url_item, as well as additional information such as its base and its index inside of the url, this method encodes the item for presentation in the user interface.
source code
 
storeUrlItem(self, url_index, url_item)
Stores and associates a given url_index with a url_item.
source code
 
storedUrlItemByIndex(self, url_index)
if there is no information available
source code
 
root(self)
Returns: string representing the file root
source code
Class Variables [hide private]
    Configuration
  memorize_urlItems = True
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, root)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

urlItems(self, url)

source code 

:return: list of string-like items which can be found at the given url.
If this url is combined with one of the returned items separated by a slash, 
a valid url is formed, i.e. url/item
:param url: A given slash-separated url like base/subitem or '', which 
        requests items at the root of all urls

formatItem(self, url_base, url_index, url_item)

source code 
Given the url_item, as well as additional information such as its base
and its index inside of the url, this method encodes the item for presentation
in the user interface.
:param url_base: relative url at which the url_item resides. Is "" if url_index 
        is 0
:param url_index: index representing the position of the url_item within the
        url
:param url_item: item which is to be formatted.
:return: string representing the formatted url.

storeUrlItem(self, url_index, url_item)

source code 
Stores and associates a given url_index with a url_item. Makes the stored
item queryable by the ``storedUrlItemByIndex`` method
:param url_index: index from 0 to n, where 0 corresponds to the first item
        in the url
:param url_item: the string item to store at the given index

storedUrlItemByIndex(self, url_index)

source code 
if there is no information available
Returns:
string item previously stored at the given index, or None

root(self)

source code 
Returns:
string representing the file root