Beispiel #1
0
    def _populateDebugFlagsTableView(self, debugFlagPrefix):
        debugFlags = _GetDebugFlagsWithPrefix(debugFlagPrefix)

        self._tableWidget.setRowCount(len(debugFlags))
        row = 0
        for f in debugFlags:
            item = QtWidgets.QTableWidgetItem()
            item.setFlags(QtCore.Qt.ItemIsUserCheckable
                          | QtCore.Qt.ItemIsEnabled)
            if Tf.Debug.IsDebugSymbolNameEnabled(f):
                item.setCheckState(QtCore.Qt.Checked)
            else:
                item.setCheckState(QtCore.Qt.Unchecked)
            item.setText(f)
            self._tableWidget.setItem(row, 0, item)

            item = QtWidgets.QTableWidgetItem()
            item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEditable)
            item.setText(Tf.Debug.GetDebugSymbolDescription(f))
            self._tableWidget.setItem(row, 1, item)

            row += 1
Beispiel #2
0
 def addRow(self, stackItem):
     rowPos = self.rowCount()
     self.setRowCount(rowPos + 1)
     self.setItem(rowPos, 0, QtWidgets.QTableWidgetItem())
     self.setCellWidget(rowPos, 0, stackItem)