weboob.tools.application.qt5.models

class weboob.tools.application.qt5.models.BackendListModel(weboob, *args, **kwargs)

Bases: PyQt5.QtGui.QStandardItemModel

Model for displaying a backends list with icons

RoleBackendName = 256
RoleCapability = 257
addBackends(cap=None, entry_all=True, entry_title=False)

Populate the model by adding backends.

Appends backends to the model, without clearing previous entries. For each entry in the model, the cap name is stored under role RoleBackendName and the capability object under role RoleCapability.

Parameters:
  • cap – capabilities to add (None to add all loaded caps)
  • entry_all – if True, add a “All backends” entry
  • entry_title – if True, add a disabled entry with the cap name
class weboob.tools.application.qt5.models.ResultModel(weboob, *args, **kwargs)

Bases: PyQt5.QtCore.QAbstractItemModel

Model for displaying objects and collections

RoleBackendName = 258
RoleCapability = 257
RoleObject = 256
addRootDo(*args, **kwargs)

Make a weboob.do and add returned items to root of model

addRootDoLimit(cls, *args, **kwargs)
addRootItems(objs)
canFetchMore(qidx)
clear()

Empty the model completely

columnCount(qidx)
data(qidx, role)
expandCollection(coll, qidx)
expandGallery(gall, qidx)
expandGauge(gauge, qidx)
expandObj(obj, qidx)
fetchMore(qidx)
fillObj(obj, fields, qidx)
flags(qidx)
hasChildren(qidx)
headerData(section, orientation, role)
index(row, col, parent_qidx)
jobAdded
jobFinished
parent(qidx)
rowCount(qidx)
setColumnFields(columns)
setLimit(limit)
setResourceClasses(classes)

Set accepted object classes for CapCollection.iter_resources

class weboob.tools.application.qt5.models.FilterTypeModel(*args)

Bases: PyQt5.QtCore.QSortFilterProxyModel

filterAcceptsRow(row, parent_qidx)
setAcceptedTypes(types)