This commit is contained in:
Maxim Slipenko 2023-12-26 20:59:57 +03:00
parent 64ce076f54
commit e2e1069a89
2 changed files with 5 additions and 4 deletions

View File

@ -27,12 +27,12 @@ class ComboDelegate(QItemDelegate):
A delegate that places a fully functioning QComboBox in every
cell of the column to which it's applied
"""
def __init__(self, parent, objects, object_names):
def __init__(self, parent, objects, objectNames):
"""
Constructoe
:param parent: QTableView parent object
:param objects: List of objects to set. i.e. [True, False]
:param object_names: List of Object names to display. i.e. ['True', 'False']
:param objectNames: List of Object names to display. i.e. ['True', 'False']
"""
QItemDelegate.__init__(self, parent)
@ -40,7 +40,7 @@ class ComboDelegate(QItemDelegate):
self.objects = objects
# object description to display in the combobox. i.e. ['True', 'False']
self.object_names = object_names
self.objectNames = objectNames
@QtCore.Slot()
def currentIndexChanged(self):
@ -48,7 +48,7 @@ class ComboDelegate(QItemDelegate):
def createEditor(self, parent, option, index):
combo = QComboBox(parent)
combo.addItems(self.object_names)
combo.addItems(self.objectNames)
combo.currentIndexChanged.connect(self.currentIndexChanged)
return combo

View File

@ -37,6 +37,7 @@ TRANSFORMS = {
class TransformPolynomModel(RegressionResultModel, EditableTableModel):
def __init__(self, result):
self._monomials = None
super().__init__(result)
n = result.paramsAndImportance.shape[0]