コード例 #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 = []
コード例 #2
0
ファイル: rulesetselector.py プロジェクト: KDE/kajongg
 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 = []
コード例 #3
0
ファイル: scoringdialog.py プロジェクト: KDE/kajongg
 def __init__(self, parent=None):
     QTreeView.__init__(self, parent)
     self.setItemDelegate(ScoreItemDelegate(self))
コード例 #4
0
ファイル: scoringdialog.py プロジェクト: KDE/kajongg
 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())
コード例 #5
0
ファイル: scoringdialog.py プロジェクト: zero804/kajongg
 def __init__(self, parent=None):
     QTreeView.__init__(self, parent)
     self.setItemDelegate(ScoreItemDelegate(self))
コード例 #6
0
ファイル: scoringdialog.py プロジェクト: zero804/kajongg
 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())