mmSolver.ui.uimodels#
Qt models used in Model-View-Controller designs.
- mmSolver.ui.uimodels.getNameFromDict(index, names_dict, lookup_dict)#
Get the ‘name’ from an index, using a specific data structure.
For example:
index = 0 names_dict = { 0: 'Column', } lookup_dict = { 'Column': 'name', } x = getNameFromDict(index, names_dict, lookup_dict) # x equals 'name'
- Parameters:
index – Index to look up.
names_dict – The mapping data, from index to ‘second key’.
lookup_dict – Mapping data structure from ‘second key’ to final look up name.
- Returns:
The name in ‘lookup_dict’ referred to by index in ‘names_dict’, or None if the name is not in the dictionary.
- Return type:
str or None
- class mmSolver.ui.uimodels.ItemModel(*args, **kw)#
- defaultNodeType()#
- columnNames()#
- columnAlignments()#
- getGetAttrFuncFromIndex(index)#
- getSetAttrFuncFromIndex(index)#
- getColorFuncFromIndex(index)#
- indexEnabled(index)#
- indexCheckable(index)#
- indexSelectable(index)#
- indexEditable(index)#
- indexIcon(index)#
- indexColumnAlignment(index)#
- getColumnNameFromIndex(index)#
- getColumnIndexFromColumnName(name)#
- rootNode()#
- setRootNode(rootNode)#
- getNode(index)#
- columnCount(parent=<MyCustomMock name='mock()' id='139853466283344'>)#
- rowCount(parent=<MyCustomMock name='mock()' id='139853468292112'>)#
- data(index, role)#
- setData(index, value, role=<MyCustomMock id='139853472611536'>)#
- headerData(section, orientation, role)#
- flags(index)#
- parent(index)#
- index(row, column, parent)#
- insertRows(position, rows, parent=<MyCustomMock name='mock()' id='139853472610320'>)#
- removeRows(position, rows, parent=<MyCustomMock name='mock()' id='139853515598032'>)#
- class mmSolver.ui.uimodels.TableModel(*args, **kw)#
- defaultNodeType()#
- columnNames()#
- getGetAttrFuncFromIndex(index)#
- getSetAttrFuncFromIndex(index)#
- getColorFuncFromIndex(index)#
- indexEnabled(index)#
- indexCheckable(index)#
- indexSelectable(index)#
- indexEditable(index)#
- indexIcon(index)#
- getColumnNameFromIndex(index)#
- getColumnIndexFromColumnName(name)#
- columnCount(parent=<MyCustomMock name='mock()' id='139853472612112'>)#
- rowCount(parent=<MyCustomMock name='mock()' id='139853472610512'>)#
- data(index, role)#
- setData(index, value, role=<MyCustomMock id='139853476498064'>)#
- nodeList()#
Get a copy of the internal node list for this model.
- setNodeList(node_list)#
Replace the internal node list entirely.
- headerData(section, orientation, role)#
- flags(index)#
- insertRows(position, rows, parent=<MyCustomMock name='mock()' id='139853475545744'>)#
- removeRows(position, rows, parent=<MyCustomMock name='mock()' id='139853472811216'>)#
- class mmSolver.ui.uimodels.StringDataListModel(*args, **kw)#
- stringDataList()#
- setStringDataList(stringDataList)#
- headerData(section, orientation, role)#
- data(index, role=<MyCustomMock id='139853475547792'>)#
- flags(index)#
- insertRows(row, count, parent=<MyCustomMock name='mock()' id='139853475547536'>)#
- removeRows(row, count, parent=<MyCustomMock name='mock()' id='139853466852624'>)#
- rowCount(parent=<MyCustomMock name='mock()' id='139853460820304'>)#
- setData(index, value, role=<MyCustomMock id='139853466852112'>)#
- class mmSolver.ui.uimodels.ComboBoxDelegate(*args, **kw)#
- getValueList()#
Sub-class, override this method and return a list of strings for the combo-box values.
- createEditor(parent, option, index)#
- setEditorData(editor, index)#
- setModelData(editor, model, index)#
- class mmSolver.ui.uimodels.ItemModel(*args, **kw)#
- defaultNodeType()#
- columnNames()#
- columnAlignments()#
- getGetAttrFuncFromIndex(index)#
- getSetAttrFuncFromIndex(index)#
- getColorFuncFromIndex(index)#
- indexEnabled(index)#
- indexCheckable(index)#
- indexSelectable(index)#
- indexEditable(index)#
- indexIcon(index)#
- indexColumnAlignment(index)#
- getColumnNameFromIndex(index)#
- getColumnIndexFromColumnName(name)#
- rootNode()#
- setRootNode(rootNode)#
- getNode(index)#
- columnCount(parent=<MyCustomMock name='mock()' id='139853466283344'>)#
- rowCount(parent=<MyCustomMock name='mock()' id='139853468292112'>)#
- data(index, role)#
- setData(index, value, role=<MyCustomMock id='139853472611536'>)#
- headerData(section, orientation, role)#
- flags(index)#
- parent(index)#
- index(row, column, parent)#
- insertRows(position, rows, parent=<MyCustomMock name='mock()' id='139853472610320'>)#
- removeRows(position, rows, parent=<MyCustomMock name='mock()' id='139853515598032'>)#
- class mmSolver.ui.uimodels.TableModel(*args, **kw)#
- defaultNodeType()#
- columnNames()#
- getGetAttrFuncFromIndex(index)#
- getSetAttrFuncFromIndex(index)#
- getColorFuncFromIndex(index)#
- indexEnabled(index)#
- indexCheckable(index)#
- indexSelectable(index)#
- indexEditable(index)#
- indexIcon(index)#
- getColumnNameFromIndex(index)#
- getColumnIndexFromColumnName(name)#
- columnCount(parent=<MyCustomMock name='mock()' id='139853472612112'>)#
- rowCount(parent=<MyCustomMock name='mock()' id='139853472610512'>)#
- data(index, role)#
- setData(index, value, role=<MyCustomMock id='139853476498064'>)#
- nodeList()#
Get a copy of the internal node list for this model.
- setNodeList(node_list)#
Replace the internal node list entirely.
- headerData(section, orientation, role)#
- flags(index)#
- insertRows(position, rows, parent=<MyCustomMock name='mock()' id='139853475545744'>)#
- removeRows(position, rows, parent=<MyCustomMock name='mock()' id='139853472811216'>)#
- class mmSolver.ui.uimodels.StringDataListModel(*args, **kw)#
- stringDataList()#
- setStringDataList(stringDataList)#
- headerData(section, orientation, role)#
- data(index, role=<MyCustomMock id='139853475547792'>)#
- flags(index)#
- insertRows(row, count, parent=<MyCustomMock name='mock()' id='139853475547536'>)#
- removeRows(row, count, parent=<MyCustomMock name='mock()' id='139853466852624'>)#
- rowCount(parent=<MyCustomMock name='mock()' id='139853460820304'>)#
- setData(index, value, role=<MyCustomMock id='139853466852112'>)#