def _makeTable(self): if not self.ATRIBUTOSLISTA : columnasTablas = [p.capitalize() for p in self._obtener_atributos_names()] else: self.ATRIBUTOSLISTA_CLASSNAMES = [ self.manager.obtenerNombreAtributo( p.values()[0] ) for p in self.ATRIBUTOSLISTA] columnasTablas = [p.keys()[0] for p in self.ATRIBUTOSLISTA] self.MyTabla = MyTableWidget(self.twDatos, columnasTablas, self.ALINEACIONLISTA) self.connect(self.MyTabla.widget, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menu)
def makeTable( self ): '''Create the structure of table (columns)''' if not self.ATRIBUTOSLISTA : tableColumns = [p.capitalize() for p in self._get_attributes_names()] else: self.ATRIBUTOSLISTA_CLASSNAMES = [ self.manager.getAttributeName( p.values()[0] ) for p in self.ATRIBUTOSLISTA] tableColumns = [p.keys()[0] for p in self.ATRIBUTOSLISTA] self.tableItems = MyTableWidget( self.twItems, tableColumns, self.alignmentColumns, fnParseItem=self.fnParseTableItem)
def _makeTableSecciones(self): if not self.ATRIBUTOSLISTA: columnasTablas = [ p.capitalize() for p in self.SeccionesGUI._obtener_atributos_names() ] else: self.ATRIBUTOSLISTA_CLASSNAMES = [ self.SeccionesGUI.manager.obtenerNombreAtributo(p.values()[0]) for p in self.ATRIBUTOSLISTA ] columnasTablas = [p.keys()[0] for p in self.ATRIBUTOSLISTA] self.SeccionesGUI.MyTabla = MyTableWidget(self.twDatosSeccion, columnasTablas)
def reloadTableProductos(self): cols = [ u'Cantidad', u'Producto', u'tela', u'talle', u'Costo', u'Subtotal' ] self.otwProductos = MyTableWidget(self.twProductos, cols, ['C', 'L', 'L', 'L', 'C', 'C']) self.otwProductos.fullClear() for prod in self.productosEnLista: item = [ prod['cantidad'], prod['producto'].producto, prod['tela'].nombre, prod['talle'], "$ %8.2f" % prod['producto'].costo, "$ %8.2f" % prod['subtotal'], ] self.otwProductos.appendItem(item) self.obtenerTotal()
def _makeTablaCuentasEnSecciones(self): self.MyTablaCuentasSecciones = MyTableWidget( self.twDatosSeccionCategoria, ["Cuenta"])