Package ocempgui :: Package widgets :: Package components :: Module FileListItem :: Class FileListItem
[show private | hide private]
[frames | no frames]

Type FileListItem

object --+        
         |        
  ListItem --+    
             |    
  TextListItem --+
                 |
                FileListItem


FileListItem (filename, filetype) -> FileListItem

A list item, which can display information about files.

The FileListItem class is a TextListItem, which contains additional information about a file such as its type and a suitable icon surface.

The 'filetype' argument of the constructor must be an integer value, which matches a valid value of the stat.S_IF* data values. It will be stored in the 'filetype' attribute of the FileSystem object. Take a look at the stat module and os.stat() documentation for more details about the different values.

item = FileSystem ('myfile', stat.S_IFDIR)

The passed filename will be stored in the 'text' attribute of the FileListItem as described in the TextListItem documentation.

Dependant on the 'filetype' value a specific icon surface will be set in the 'icon' attribute of the list item.

Attributes: icon - The icon to display on the FileListItem. filetype - The type of the file.
Method Summary
  __init__(self, filename, filetype)
    Inherited from TextListItem
  set_text(self, text)
T.set_text (...) -> None
    Inherited from ListItem
  get_style(self)
L.get_style () -> Style
  has_changed(self)
L.has_changed () -> None
  set_collection(self, collection)
L.set_collection (...) -> None
  set_dirty(self, dirty)
L.set_dirty (...) -> None
  _select(self, selected)
L._select (...) -> None
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  filetype: The type of the file.
  icon: The icon to display.
    Inherited from TextListItem
  text: The text to display on the TextListItem.
    Inherited from ListItem
  collection: The collection the ListItem is attached to.
  dirty: Indicates, whether the ListItem needs to be redrawn.
  selected: The selection state of the ListItem.
  style: The style of the ListItem.

Property Details

filetype

The type of the file.
Get Method:
unknown-696519788(...)

icon

The icon to display.
Get Method:
unknown-696519732(...)

Generated by Epydoc 2.1 on Thu Jan 10 10:18:44 2008 http://epydoc.sf.net