pycrossword  0.3
Pure-Python implementation of a crossword puzzle generator and editor
Public Member Functions | Public Attributes | List of all members
pycross.forms.BrowseEditDelegate Class Reference

Delegate class for table and tree-like widgets implementing an edit field with the browse button. More...

Inheritance diagram for pycross.forms.BrowseEditDelegate:

Public Member Functions

def __init__ (self, model_indices=None, thisparent=None, **browse_edit_kwargs)
 Constructor. More...
 
QtWidgets.QWidget createEditor (self, QtWidgets.QWidget parent, QtWidgets.QStyleOptionViewItem option, QtCore.QModelIndex index)
 Overridden method of QtWidgets.QStyledItemDelegate: creates the underlying delegate (editor widget). More...
 
def setEditorData (self, editor, QtCore.QModelIndex index)
 Overridden method of QtWidgets.QStyledItemDelegate: updates the editor data (text) from the underlying model. More...
 
def setModelData (self, editor, QtCore.QAbstractItemModel model, QtCore.QModelIndex index)
 Overridden method of QtWidgets.QStyledItemDelegate: updates the underlying model from the editor data (text). More...
 
def updateEditorGeometry (self, editor, QtWidgets.QStyleOptionViewItem option, QtCore.QModelIndex index)
 Overridden method of QtWidgets.QStyledItemDelegate: updates the editor position and size for a given model index. More...
 

Public Attributes

 model_indices
 
 browse_edit_kwargs
 

Detailed Description

Delegate class for table and tree-like widgets implementing an edit field with the browse button.

See also
BrowseEdit

Constructor & Destructor Documentation

◆ __init__()

def pycross.forms.BrowseEditDelegate.__init__ (   self,
  model_indices = None,
  thisparent = None,
**  browse_edit_kwargs 
)

Constructor.

Parameters
model_indiceslist list of indices in underlying model that must contain the BrowseEdit fields
thisparentQtWidgets.QWidget parent widget for this instance
browse_edit_kwargskeyword arguments keyword arguments passed to BrowseEdit constructor

Member Function Documentation

◆ createEditor()

QtWidgets.QWidget pycross.forms.BrowseEditDelegate.createEditor (   self,
QtWidgets.QWidget  parent,
QtWidgets.QStyleOptionViewItem  option,
QtCore.QModelIndex  index 
)

Overridden method of QtWidgets.QStyledItemDelegate: creates the underlying delegate (editor widget).

◆ setEditorData()

def pycross.forms.BrowseEditDelegate.setEditorData (   self,
  editor,
QtCore.QModelIndex  index 
)

Overridden method of QtWidgets.QStyledItemDelegate: updates the editor data (text) from the underlying model.

◆ setModelData()

def pycross.forms.BrowseEditDelegate.setModelData (   self,
  editor,
QtCore.QAbstractItemModel  model,
QtCore.QModelIndex  index 
)

Overridden method of QtWidgets.QStyledItemDelegate: updates the underlying model from the editor data (text).

◆ updateEditorGeometry()

def pycross.forms.BrowseEditDelegate.updateEditorGeometry (   self,
  editor,
QtWidgets.QStyleOptionViewItem  option,
QtCore.QModelIndex  index 
)

Overridden method of QtWidgets.QStyledItemDelegate: updates the editor position and size for a given model index.

Member Data Documentation

◆ browse_edit_kwargs

pycross.forms.BrowseEditDelegate.browse_edit_kwargs

◆ model_indices

pycross.forms.BrowseEditDelegate.model_indices

The documentation for this class was generated from the following file: