Beispiel #1
0
 def headerData(self, section, orientation, role):
     if orientation == Qt.Horizontal:
         if  role == Qt.DisplayRole or role == Qt.ToolTipRole :
             if section == ActionModel.Action:
                 return tr( "Action" )
             elif section == ActionModel.Shortcut:
                 return tr( "Shortcut" )
             elif section == ActionModel.DefaultShortcut:
                 return tr( "Default Shortcut" )
     
     return QAbstractItemModel.headerData(self,  section, orientation, role )
Beispiel #2
0
    def headerData(self, section, orientation, role):
        if orientation == Qt.Horizontal:
            if role == Qt.DisplayRole or role == Qt.ToolTipRole:
                if section == ActionModel.Action:
                    return tr("Action")
                elif section == ActionModel.Shortcut:
                    return tr("Shortcut")
                elif section == ActionModel.DefaultShortcut:
                    return tr("Default Shortcut")

        return QAbstractItemModel.headerData(self, section, orientation, role)
Beispiel #3
0
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if section >= 0 and section < 4 and orientation == Qt.Horizontal:
            if role == Qt.DisplayRole:
                return self.__headers[section]

        return QAbstractItemModel.headerData(self, section, orientation, role)
Beispiel #4
0
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if section >= 0 and section < 4 and orientation == Qt.Horizontal:
            if role == Qt.DisplayRole:
                return self.__headers[section]

        return QAbstractItemModel.headerData(self, section, orientation, role)