Example #1
0
 def __init__(self, name, btnCopy=None,
              btnRemove=None, btnCompare=None, parent=None):
     QTreeView.__init__(self, parent)
     self.name = name
     self.setObjectName('RuleTreeView')
     self.btnCopy = btnCopy
     self.btnRemove = btnRemove
     self.btnCompare = btnCompare
     for button in [self.btnCopy, self.btnRemove, self.btnCompare]:
         if button:
             button.setEnabled(False)
     self.header().setObjectName('RuleTreeViewHeader')
     self.setSelectionMode(QAbstractItemView.SingleSelection)
     self.ruleModel = None
     self.ruleModelTest = None
     self.rulesets = []  # nasty: this generates self.ruleModel
     self.differs = []
Example #2
0
 def __init__(self, name, btnCopy=None,
              btnRemove=None, btnCompare=None, parent=None):
     QTreeView.__init__(self, parent)
     self.name = name
     self.setObjectName('RuleTreeView')
     self.btnCopy = btnCopy
     self.btnRemove = btnRemove
     self.btnCompare = btnCompare
     for button in [self.btnCopy, self.btnRemove, self.btnCompare]:
         if button:
             button.setEnabled(False)
     self.header().setObjectName('RuleTreeViewHeader')
     self.setSelectionMode(QAbstractItemView.SingleSelection)
     self.ruleModel = None
     self.ruleModelTest = None
     self.rulesets = []  # nasty: this generates self.ruleModel
     self.differs = []
Example #3
0
 def __init__(self, parent=None):
     QTreeView.__init__(self, parent)
     self.setItemDelegate(ScoreItemDelegate(self))
Example #4
0
 def sizeHint(self):
     """we never want a horizontal scrollbar for player names,
     we always want to see them in full"""
     return QSize(self.__col0Width(), QTreeView.sizeHint(self).height())
Example #5
0
 def __init__(self, parent=None):
     QTreeView.__init__(self, parent)
     self.setItemDelegate(ScoreItemDelegate(self))
Example #6
0
 def sizeHint(self):
     """we never want a horizontal scrollbar for player names,
     we always want to see them in full"""
     return QSize(self.__col0Width(), QTreeView.sizeHint(self).height())