Changeset 79b7f06 in mmcs
- Timestamp:
- Oct 31, 2016, 10:41:44 AM (8 years ago)
- Branches:
- master
- Children:
- c7597d8
- Parents:
- f1e8de0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
genericFunctions.cpp
rb0c244f r79b7f06 235 235 @param <opcion> Recibe la opción (1 para escribir en columna y 0 para la fila) 236 236 */ 237 void insertRowExogena(QList<QString> lista,QTableWidget *tw,int opcion )237 void insertRowExogena(QList<QString> lista,QTableWidget *tw,int opcion, bool center, int init) 238 238 { 239 239 for(int i=0;i<tw->rowCount();i++) … … 242 242 twi->setText(lista[i]); 243 243 twi->setFlags(twi->flags() ^ Qt::ItemIsEditable); 244 if(center and i>=init) 245 { 246 twi->setTextAlignment(Qt::AlignCenter); 247 } 244 248 int fin=tw->rowCount(); 245 249 if(opcion==1) -
genericFunctions.h
rb0c244f r79b7f06 13 13 void CellStyleComponente(QTableWidgetItem *); 14 14 void CellStyleExEn(QTableWidgetItem *); 15 void insertRowExogena(QList<QString> lista, QTableWidget *,int opcion);15 void insertRowExogena(QList<QString> lista, QTableWidget *, int opcion, bool center, int init); 16 16 void noEditColZero(QTableWidget *); 17 17 void ItemsNoEditable(QTableWidget *, int inicio, int fin, int col=0); -
mainwindow.C
rf1e8de0 r79b7f06 2192 2192 tablaEE->removeRow(i); 2193 2193 tablaEE->insertRow(tablaEE->rowCount()); 2194 insertRowExogena(fila,tablaEE,1 );2194 insertRowExogena(fila,tablaEE,1,true,2); 2195 2195 fila.clear(); 2196 2196 //Se agregan los estilos correspondientes a las cuentas y componentes de las filas … … 2209 2209 tablaEE->removeColumn(i); 2210 2210 tablaEE->insertColumn(tablaEE->columnCount()); 2211 insertRowExogena(columna,tablaEE,0 );2211 insertRowExogena(columna,tablaEE,0,true,2); 2212 2212 columna.clear(); 2213 2213 //Se agregan los estilos correspondientes a las cuentas y componentes de las columnas … … 2414 2414 CellStyleExEn(CuentaEndogenafila); 2415 2415 tw->setItem(0,1,CuentaEndogenafila); 2416 tw->setSpan(0,1,1,inicioExogena-1); 2416 if(inicioExogena-1>1){ 2417 tw->setSpan(0,1,1,inicioExogena-1); 2418 } 2417 2419 QTableWidgetItem *CuentaEndogenaColumna = new QTableWidgetItem; 2418 2420 if(elementos<12) … … 2758 2760 { 2759 2761 QString cuenta = tw->item(i,1)->text(); 2760 QString value = Separador(tw->item(i,cantidad-1),true);2761 2762 if(totalCuentas.contains(cuenta)) 2762 2763 { … … 4532 4533 { 4533 4534 int contar = valoresColumna.count(name); 4534 Bn->setSpan(0,i,1,contar); 4535 if(contar>1) 4536 { 4537 Bn->setSpan(0,i,1,contar); 4538 } 4535 4539 valoresColumna.removeAll(name); 4536 4540 } … … 4547 4551 { 4548 4552 int contar = valoresFila.count(name); 4549 Bn->setSpan(j,0,contar,1); 4553 if(contar>1) 4554 { 4555 Bn->setSpan(j,0,contar,1); 4556 } 4550 4557 valoresFila.removeAll(name); 4551 4558 }
Note: See TracChangeset
for help on using the changeset viewer.