示例#1
0
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if orientation == Qt.Horizontal:
            if role == Qt.DisplayRole:
                if section == 0:
                    return 'Profile'

        return QAbstractItemModel.headerData(self, section, orientation, role)
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if orientation == Qt.Horizontal:
            if role == Qt.DisplayRole:
                if section == 0:
                    return 'Name'
                elif section == 1:
                    return 'Onboard'

        return QAbstractItemModel.headerData(self, section, orientation, role)
示例#3
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)
示例#4
0
    def headerData(self, section, orientation, role=Qt.DisplayRole):
        if orientation == Qt.Horizontal:
            if role == Qt.DisplayRole:
                if section == 0:
                    return 'Name'
                elif section == 1:
                    return 'Default'
                elif section == 2:
                    return 'Help Text'

        return QAbstractItemModel.headerData(self, section, orientation, role)
示例#5
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)
示例#6
0
 def headerData(self, section, orientation, role=Qt.DisplayRole):
     """
     Public method to get the header data.
     
     @param section section number (integer)
     @param orientation header orientation (Qt.Orientation)
     @param role data role (integer)
     @return header data
     """
     if orientation == Qt.Horizontal and role == Qt.DisplayRole:
         try:
             return self.__headers[section]
         except IndexError:
             pass
     return QAbstractItemModel.headerData(self, section, orientation, role)
示例#7
0
 def headerData(self, section, orientation, role=Qt.DisplayRole):
     """
     Public method to get the header data.
     
     @param section section number (integer)
     @param orientation header orientation (Qt.Orientation)
     @param role data role (integer)
     @return header data
     """
     if orientation == Qt.Horizontal and role == Qt.DisplayRole:
         try:
             return self.__headers[section]
         except IndexError:
             pass
     return QAbstractItemModel.headerData(self, section, orientation, role)
示例#8
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)