- modified the new database to accept data from NCC and Paint Tools

This commit is contained in:
Marius Stanciu
2020-03-29 14:22:11 +03:00
committed by Marius
parent 5554cf0afa
commit 1ca650e883
4 changed files with 402 additions and 44 deletions

View File

@@ -163,9 +163,20 @@ class FCTree(QtWidgets.QTreeWidget):
self.header().setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents)
self.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Expanding)
palette = QtGui.QPalette()
palette.setColor(QtGui.QPalette.Inactive, QtGui.QPalette.Highlight,
palette.color(QtGui.QPalette.Active, QtGui.QPalette.Highlight))
# make inactive rows text some color as active; may be useful in the future
# palette.setColor(QtGui.QPalette.Inactive, QtGui.QPalette.HighlightedText,
# palette.color(QtGui.QPalette.Active, QtGui.QPalette.HighlightedText))
self.setPalette(palette)
if extended_sel:
self.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.protected_column = protected_column
self.itemDoubleClicked.connect(self.on_double_click)
self.header().sectionDoubleClicked.connect(self.on_header_double_click)
@@ -210,6 +221,8 @@ class FCTree(QtWidgets.QTreeWidget):
if editable:
item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
item.setFlags(item.flags() | QtCore.Qt.ItemIsSelectable)
for t in range(len(title)):
item.setText(t, title[t])