Changeset 95d916c in mmcs
- Timestamp:
- Sep 29, 2015, 12:14:58 PM (9 years ago)
- Branches:
- master
- Children:
- 239e1ea
- Parents:
- 37dd9aa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
mainwindow.C
r37dd9aa r95d916c 805 805 QString nombreCuenta=le->text(); 806 806 807 bool cuenta = comprobarNombreCuenta(nombreCuenta,index); 808 807 809 if(nombreCuenta.isEmpty() or nombreCuenta.isNull()) 808 810 { … … 812 814 { 813 815 QMessageBox::warning(this,"Alerta","Esta cuenta ya fue\nagregada"); 816 } 817 else if(cuenta) 818 { 819 QMessageBox::warning(this,"Alerta","Este nombre de cuenta\nya existe"); 814 820 } 815 821 else … … 1102 1108 } 1103 1109 return centinela; 1110 } 1111 1112 bool MainWindow::comprobarNombreCuenta(QString nombre,int indice) 1113 { 1114 bool cuenta = false; 1115 for(int i=0;i<numAccounts;i++) 1116 { 1117 QLineEdit *le= findChild<QLineEdit *>(QString("linedit %1").arg(i + 1)); 1118 if(le->text()==nombre and indice+1!=i+1) 1119 { 1120 cuenta = true; 1121 } 1122 } 1123 return cuenta; 1104 1124 } 1105 1125 -
mainwindow.H
r37dd9aa r95d916c 170 170 void matricesMenuBar(); 171 171 void populateTable(QTableWidget *); 172 172 173 void CalcularTotales(QTableWidget *, int inicio, bool &); 174 bool comprobarNombreCuenta(QString, int indice); 173 175 void loadMatrizExogena(); 174 176 void clonarTabla(QTableWidget *,QTableWidget *, int cantidad); -
moc_mainwindow.cpp
r37dd9aa r95d916c 2 2 ** Meta object code from reading C++ file 'mainwindow.H' 3 3 ** 4 ** Created: Mon Sep 28 11:46:3820154 ** Created: Tue Sep 29 08:30:17 2015 5 5 ** by: The Qt Meta Object Compiler version 63 (Qt 4.8.2) 6 6 **
Note: See TracChangeset
for help on using the changeset viewer.