Ejemplo n.º 1
0
    def headerData( self, section, orientation, role = Qt.DisplayRole ):
        if role == Qt.TextAlignmentRole:
            if orientation == Qt.Horizontal:
                return int( Qt.AlignLeft | Qt.AlignVCenter )
            return int( Qt.AlignRight | Qt.AlignVCenter )
        if role != Qt.DisplayRole:
            return None
        if orientation == Qt.Horizontal:
            if  section == FECHA:
                return "Fecha"
            elif section == CUENTABANCO:
                return "No. Bancaria"
            elif section == BANCO:
                return "Banco"
            elif section == MONEDA:
                return "Moneda"



        return QSqlQueryModel.headerData( self, section , orientation, role )
Ejemplo n.º 2
0
    def headerData( self, section, orientation, role = Qt.DisplayRole ):
        if role == Qt.TextAlignmentRole:
            if orientation == Qt.Horizontal:
                return int( Qt.AlignLeft | Qt.AlignVCenter )
            return int( Qt.AlignRight | Qt.AlignVCenter )
        if role != Qt.DisplayRole:
            return None
        if orientation == Qt.Horizontal:
            if  section == TOTAL:
                return "Total"
            elif section == SUBTOTAL:
                return "Subtotal"
            elif section == IMPUESTOS:
                return "Impuestos"
            elif section == COSTO:
                return "Costo"
            elif section == IDDOCUMENTO:
                return "Id"
            elif section == NDOCIMPRESO:
                return u"Numero de Devolución"
            elif section == FACTURA:
                return "Numero de Factura"

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