Source code for qmenuview.view

import functools

from PySide import QtCore, QtGui

__all__ = ['MenuView', 'SetDataArgs']



[docs]class SetDataArgs(object): """A container of arguments for setting attributes on an action. The data is queried from the model with ``role``. Then converted with ``convertfunc``. Then ``setfunc`` is used for setting the attribute on the action. ``convertfunc`` can be ``None``. If column is a string, the attribute of the view with that name will be used as column. """
[docs] def __init__(self, setfunc, column, role, convertfunc): """Initialize a new container :raises: None """ super(SetDataArgs, self).__init__() self.setfunc = setfunc self.column = column self.role = role self.convertfunc = convertfunc