Changeset f473a7f in mmcs for mainwindow.C
- Timestamp:
- Jul 18, 2016, 2:49:49 PM (8 years ago)
- Branches:
- master
- Children:
- 4d3d740
- Parents:
- 50b61b5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mainwindow.C
r50b61b5 rf473a7f 1755 1755 { 1756 1756 int elementos = contarElementosMap(diccCuentasExogenas); 1757 1758 1757 /***** Se llena la tabla vacia con los valores de la tabla principal ****/ 1759 1758 for(int i=0;i<count-1;i++) … … 1799 1798 1800 1799 /*** Se acomodan los componentes de las cuentas exogenas ***/ 1801 int cantidad = tablaEE->rowCount();1800 int cantidad = tablaEE->rowCount()-elementos; 1802 1801 foreach(QString key,diccCuentasExogenas.keys()) 1803 1802 { 1804 1803 foreach(QString key2,diccCuentasExogenas[key]) 1805 1804 { 1806 for(int i=2;i< cantidad;i++)1805 for(int i=2;i<=cantidad;i++) 1807 1806 { 1808 QString cuenta=tablaEE->item( 1,i)->text();1809 QString componente =tablaEE->item( 2,i)->text();1807 QString cuenta=tablaEE->item(0,i)->text(); 1808 QString componente =tablaEE->item(1,i)->text(); 1810 1809 if(key==cuenta and key2==componente) 1811 1810 { 1811 int position = cantidad+elementos-1; 1812 1812 QList<QString> fila; 1813 1813 fila=llenarLista(fila,tablaEE,i,1); 1814 tablaEE->removeRow(i -1);1814 tablaEE->removeRow(i); 1815 1815 tablaEE->insertRow(tablaEE->rowCount()); 1816 1816 insertRowExogena(fila,tablaEE,1); 1817 1817 fila.clear(); 1818 //Se agregan los estilos correspondientes a las cuentas y componentes de las filas 1819 QString nombre_cuenta = tablaEE->item(position,0)->text(); 1820 QTableWidgetItem *ValoraInsertarCuentaF = new QTableWidgetItem(nombre_cuenta); 1821 CellStyle(ValoraInsertarCuentaF); 1822 tablaEE->setItem(position,0,ValoraInsertarCuentaF); 1823 QString nombre_componente = tablaEE->item(position,1)->text(); 1824 QTableWidgetItem *ValoraInsertarComponenteF = new QTableWidgetItem(nombre_componente); 1825 CellStyleComponente(ValoraInsertarComponenteF); 1826 tablaEE->setItem(position,1,ValoraInsertarComponenteF); 1827 1818 1828 1819 1829 QList<QString> columna; 1820 1830 columna=llenarLista(columna,tablaEE,i,0); 1821 tablaEE->removeColumn(i -1);1831 tablaEE->removeColumn(i); 1822 1832 tablaEE->insertColumn(tablaEE->columnCount()); 1823 1833 insertRowExogena(columna,tablaEE,0); 1824 1834 columna.clear(); 1835 //Se agregan los estilos correspondientes a las cuentas y componentes de las columnas 1836 QTableWidgetItem *ValoraInsertarCuentaC = new QTableWidgetItem(nombre_cuenta); 1837 CellStyle(ValoraInsertarCuentaC); 1838 tablaEE->setItem(0,position,ValoraInsertarCuentaC); 1839 QTableWidgetItem *ValoraInsertarComponenteC = new QTableWidgetItem(nombre_componente); 1840 CellStyleComponente(ValoraInsertarComponenteC); 1841 tablaEE->setItem(1,position,ValoraInsertarComponenteC); 1825 1842 } 1826 1843 }
Note: See TracChangeset
for help on using the changeset viewer.