ComponentDataModel

(class from pyomo.contrib.viewer.model_browser)

class pyomo.contrib.viewer.model_browser.ComponentDataModel(parent, ui_data, columns=['name', 'value'], components=(<class 'pyomo.core.base.var.Var'>, <class 'pyomo.core.base.boolean_var.BooleanVar'>), editable=[])[source]

Bases: QAbstractItemModel

This is a data model to provide the tree structure and information to the tree viewer

__init__(parent, ui_data, columns=['name', 'value'], components=(<class 'pyomo.core.base.var.Var'>, <class 'pyomo.core.base.boolean_var.BooleanVar'>), editable=[])[source]

Methods

__init__(parent, ui_data[, columns, ...])

columnCount([parent])

Return the number of columns

data([index, role])

flags([index])

headerData(i, orientation[, role])

Return the column headings for the horizontal header and index numbers for the vertical header.

index(row, column[, parent])

parent(index)

rowCount([parent])

update_model()

Member Documentation

columnCount(parent=<pyomo.contrib.viewer.qt.QtCore.QModelIndex object>)[source]

Return the number of columns

headerData(i, orientation, role=ItemDataRole.DisplayRole)[source]

Return the column headings for the horizontal header and index numbers for the vertical header.