pyporegui.file_items module

@author: @parkin

class pyporegui.file_items.DataFileListItem(filename, params)[source]

Bases: pyporegui.file_items.FileListItem

Is a FileListItem with a parameter.

__init__(filename, params)[source]
get_param(param)[source]
Parameters:param – Key in the parameter dictionary, whose value should be returned.
Returns:Parameter value specified by the key ‘param’.
get_params()[source]
Returns:DictType – Dictionary of the item’s parameters.
class pyporegui.file_items.FileListItem(filename)[source]

Bases: PySide.QtGui.QListWidgetItem

Subclass of QListWidgetItem to handle file names with long file paths.

__init__(filename)[source]
get_directory()[source]
Returns:StringType – the directory containing the file.
get_file_name()[source]
Returns:StringType – the file names with the file path included. ex /home/user/.../filename
get_simple_name()[source]
Returns:StringType – the file name without the file path included.
class pyporegui.file_items.FilterListItem(file_names, **params)[source]

Bases: PySide.QtGui.QListWidgetItem

Subclass of QListWidgetItem to handle filter list items.

self.params contain the filter parameters specified by the user.

__init__(file_names, **params)[source]
Parameters:
  • file_names (ListType<String>) – File names that define this FilterListItem.
  • params – A dictionary of the parameters for this FilterListItem.
get_file_name_at(index)[source]
Parameters:index (IntType) – Position of the item.
Returns:String – Full filename (including path) of the file at index.
get_file_names()[source]
Returns:List – list of the full file names of the files that make up this Item.
get_params()[source]
Returns:Dict – dictionary of the parameters of this Item.
get_simple_name_at(index)[source]
Parameters:index (IntType) – Index of the list item to get the simple name of.
Returns:String – Simple name (i.e. no path/directory) of the file at index.
get_simple_names()[source]
Returns:List – list of the simple names (no path/directory) of the files that make up this Item.