Reimplements the :meth:`QAbstractItemModel.headerData` method.

        :param section: Section.
        :type section: int
        :param orientation: Orientation. ( Qt.Orientation )
        :param role: Role.
        :type role: int
        :return: Header data.
        :rtype: QVariant

def headerData(self, section, orientation, role=Qt.DisplayRole):
        """
        Reimplements the :meth:`QAbstractItemModel.headerData` method.

        :param section: Section.
        :type section: int
        :param orientation: Orientation. ( Qt.Orientation )
        :param role: Role.
        :type role: int
        :return: Header data.
        :rtype: QVariant
        """

        if role == Qt.DisplayRole:
            if orientation == Qt.Horizontal:
                if section < len(self.__horizontal_headers):
                    return self.__horizontal_headers.keys()[section]
            elif orientation == Qt.Vertical:
                if section < len(self.__vertical_headers):
                    return self.__vertical_headers.keys()[section]
        return QVariant()