Changeset b0c244f in mmcs
- Timestamp:
- Sep 28, 2016, 3:44:48 PM (8 years ago)
- Branches:
- master
- Children:
- f2dac89
- Parents:
- b23848e
- Files:
-
- 5 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rdfabbb4 rb0c244f 67 67 genericFunctions.cpp \ 68 68 formexportreport.cpp \ 69 qcustomplot.cpp qrc_images.cpp \ 69 qcustomplot.cpp \ 70 formdescomposicion.cpp qrc_images.cpp \ 70 71 moc_mainwindow.cpp \ 71 72 moc_formloadmatrix.cpp \ … … 87 88 moc_variablepnh.cpp \ 88 89 moc_formexportreport.cpp \ 89 moc_qcustomplot.cpp 90 moc_qcustomplot.cpp \ 91 moc_formdescomposicion.cpp 90 92 OBJECTS = mainwindow.o \ 91 93 main.o \ … … 110 112 formexportreport.o \ 111 113 qcustomplot.o \ 114 formdescomposicion.o \ 112 115 qrc_images.o \ 113 116 moc_mainwindow.o \ … … 130 133 moc_variablepnh.o \ 131 134 moc_formexportreport.o \ 132 moc_qcustomplot.o 135 moc_qcustomplot.o \ 136 moc_formdescomposicion.o 133 137 DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \ 134 138 /usr/lib/x86_64-linux-gnu/qt5/mkspecs/common/shell-unix.conf \ … … 206 210 genericFunctions.cpp \ 207 211 formexportreport.cpp \ 208 qcustomplot.cpp 212 qcustomplot.cpp \ 213 formdescomposicion.cpp 209 214 QMAKE_TARGET = SMSAM 210 215 DESTDIR = #avoid trailing-slash linebreak … … 236 241 all: Makefile $(TARGET) 237 242 238 $(TARGET): ui_formLoadMatrix.h ui_formvariablesexogenas.h ui_formexportmatrix.h ui_formencadenamientos.h ui_formcompararresultados.h ui_formcompararmnc.h ui_formincidenciai.h ui_formpreciosnohomogeneos.h ui_formexportreport.h ui_formViewMatrix.h $(OBJECTS)243 $(TARGET): ui_formLoadMatrix.h ui_formvariablesexogenas.h ui_formexportmatrix.h ui_formencadenamientos.h ui_formcompararresultados.h ui_formcompararmnc.h ui_formincidenciai.h ui_formpreciosnohomogeneos.h ui_formexportreport.h ui_formViewMatrix.h ui_formdescomposicion.h $(OBJECTS) 239 244 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) 240 245 … … 367 372 dist: 368 373 @test -d .tmp/SMSAM1.0.0 || mkdir -p .tmp/SMSAM1.0.0 369 $(COPY_FILE) --parents $(DIST) .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents img/images.qrc .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents mainwindow.H formloadmatrix.H formviewmatrix.H stackwidget.H accountwidget.H formvariablesexogenas.h stackvariablesexogenas.h variableexogenawidget.h formexportmatrix.h formencadenamientos.h stackencadenamientos.h encadenamientoswidget.h formcompararresultados.h formcompararmnc.h formincidenciai.h formpreciosnohomogeneos.h stackpreciosnohomogeneos.h variablepnh.h genericFunctions.h formexportreport.h qcustomplot.h .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents mainwindow.C main.C formloadmatrix.C formviewmatrix.C stackwidget.C accountwidget.C formvariablesexogenas.cpp stackvariablesexogenas.cpp variableexogenawidget.cpp formexportmatrix.cpp formencadenamientos.cpp stackencadenamientos.cpp encadenamientoswidget.cpp formcompararresultados.cpp formcompararmnc.cpp formincidenciai.cpp formpreciosnohomogeneos.cpp stackpreciosnohomogeneos.cpp variablepnh.cpp genericFunctions.cpp formexportreport.cpp qcustomplot.cpp .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents formLoadMatrix.ui formvariablesexogenas.ui formexportmatrix.ui formencadenamientos.ui formcompararresultados.ui formcompararmnc.ui formincidenciai.ui formpreciosnohomogeneos.ui formexportreport.ui formViewMatrix.ui .tmp/SMSAM1.0.0/ && (cd `dirname .tmp/SMSAM1.0.0` && $(TAR) SMSAM1.0.0.tar SMSAM1.0.0 && $(COMPRESS) SMSAM1.0.0.tar) && $(MOVE) `dirname .tmp/SMSAM1.0.0`/SMSAM1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/SMSAM1.0.0374 $(COPY_FILE) --parents $(DIST) .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents img/images.qrc .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents mainwindow.H formloadmatrix.H formviewmatrix.H stackwidget.H accountwidget.H formvariablesexogenas.h stackvariablesexogenas.h variableexogenawidget.h formexportmatrix.h formencadenamientos.h stackencadenamientos.h encadenamientoswidget.h formcompararresultados.h formcompararmnc.h formincidenciai.h formpreciosnohomogeneos.h stackpreciosnohomogeneos.h variablepnh.h genericFunctions.h formexportreport.h qcustomplot.h formdescomposicion.h .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents mainwindow.C main.C formloadmatrix.C formviewmatrix.C stackwidget.C accountwidget.C formvariablesexogenas.cpp stackvariablesexogenas.cpp variableexogenawidget.cpp formexportmatrix.cpp formencadenamientos.cpp stackencadenamientos.cpp encadenamientoswidget.cpp formcompararresultados.cpp formcompararmnc.cpp formincidenciai.cpp formpreciosnohomogeneos.cpp stackpreciosnohomogeneos.cpp variablepnh.cpp genericFunctions.cpp formexportreport.cpp qcustomplot.cpp formdescomposicion.cpp .tmp/SMSAM1.0.0/ && $(COPY_FILE) --parents formLoadMatrix.ui formvariablesexogenas.ui formexportmatrix.ui formencadenamientos.ui formcompararresultados.ui formcompararmnc.ui formincidenciai.ui formpreciosnohomogeneos.ui formexportreport.ui formViewMatrix.ui formdescomposicion.ui .tmp/SMSAM1.0.0/ && (cd `dirname .tmp/SMSAM1.0.0` && $(TAR) SMSAM1.0.0.tar SMSAM1.0.0 && $(COMPRESS) SMSAM1.0.0.tar) && $(MOVE) `dirname .tmp/SMSAM1.0.0`/SMSAM1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/SMSAM1.0.0 370 375 371 376 … … 401 406 /usr/lib/x86_64-linux-gnu/qt5/bin/rcc -name images img/images.qrc -o qrc_images.cpp 402 407 403 compiler_moc_header_make_all: moc_mainwindow.cpp moc_formloadmatrix.cpp moc_formviewmatrix.cpp moc_stackwidget.cpp moc_accountwidget.cpp moc_formvariablesexogenas.cpp moc_stackvariablesexogenas.cpp moc_variableexogenawidget.cpp moc_formexportmatrix.cpp moc_formencadenamientos.cpp moc_stackencadenamientos.cpp moc_encadenamientoswidget.cpp moc_formcompararresultados.cpp moc_formcompararmnc.cpp moc_formincidenciai.cpp moc_formpreciosnohomogeneos.cpp moc_stackpreciosnohomogeneos.cpp moc_variablepnh.cpp moc_formexportreport.cpp moc_qcustomplot.cpp 408 compiler_moc_header_make_all: moc_mainwindow.cpp moc_formloadmatrix.cpp moc_formviewmatrix.cpp moc_stackwidget.cpp moc_accountwidget.cpp moc_formvariablesexogenas.cpp moc_stackvariablesexogenas.cpp moc_variableexogenawidget.cpp moc_formexportmatrix.cpp moc_formencadenamientos.cpp moc_stackencadenamientos.cpp moc_encadenamientoswidget.cpp moc_formcompararresultados.cpp moc_formcompararmnc.cpp moc_formincidenciai.cpp moc_formpreciosnohomogeneos.cpp moc_stackpreciosnohomogeneos.cpp moc_variablepnh.cpp moc_formexportreport.cpp moc_qcustomplot.cpp moc_formdescomposicion.cpp 404 409 compiler_moc_header_clean: 405 -$(DEL_FILE) moc_mainwindow.cpp moc_formloadmatrix.cpp moc_formviewmatrix.cpp moc_stackwidget.cpp moc_accountwidget.cpp moc_formvariablesexogenas.cpp moc_stackvariablesexogenas.cpp moc_variableexogenawidget.cpp moc_formexportmatrix.cpp moc_formencadenamientos.cpp moc_stackencadenamientos.cpp moc_encadenamientoswidget.cpp moc_formcompararresultados.cpp moc_formcompararmnc.cpp moc_formincidenciai.cpp moc_formpreciosnohomogeneos.cpp moc_stackpreciosnohomogeneos.cpp moc_variablepnh.cpp moc_formexportreport.cpp moc_qcustomplot.cpp 410 -$(DEL_FILE) moc_mainwindow.cpp moc_formloadmatrix.cpp moc_formviewmatrix.cpp moc_stackwidget.cpp moc_accountwidget.cpp moc_formvariablesexogenas.cpp moc_stackvariablesexogenas.cpp moc_variableexogenawidget.cpp moc_formexportmatrix.cpp moc_formencadenamientos.cpp moc_stackencadenamientos.cpp moc_encadenamientoswidget.cpp moc_formcompararresultados.cpp moc_formcompararmnc.cpp moc_formincidenciai.cpp moc_formpreciosnohomogeneos.cpp moc_stackpreciosnohomogeneos.cpp moc_variablepnh.cpp moc_formexportreport.cpp moc_qcustomplot.cpp moc_formdescomposicion.cpp 406 411 moc_mainwindow.cpp: formloadmatrix.H \ 407 412 ui_formLoadMatrix.h \ … … 421 426 genericFunctions.h \ 422 427 qcustomplot.h \ 428 accountwidget.H \ 429 formdescomposicion.h \ 423 430 stackwidget.H \ 424 accountwidget.H \425 431 stackvariablesexogenas.h \ 426 432 variableexogenawidget.h \ … … 691 697 /usr/lib/x86_64-linux-gnu/qt5/bin/moc $(DEFINES) -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/rodrigo/Proyectos/Matrices/mmcs -I/home/rodrigo/Proyectos/Matrices/mmcs/Eigen -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include qcustomplot.h -o moc_qcustomplot.cpp 692 698 699 moc_formdescomposicion.cpp: formdescomposicion.h 700 /usr/lib/x86_64-linux-gnu/qt5/bin/moc $(DEFINES) -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/rodrigo/Proyectos/Matrices/mmcs -I/home/rodrigo/Proyectos/Matrices/mmcs/Eigen -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/4.9 -I/usr/include/x86_64-linux-gnu/c++/4.9 -I/usr/include/c++/4.9/backward -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include formdescomposicion.h -o moc_formdescomposicion.cpp 701 693 702 compiler_moc_source_make_all: 694 703 compiler_moc_source_clean: 695 compiler_uic_make_all: ui_formLoadMatrix.h ui_formvariablesexogenas.h ui_formexportmatrix.h ui_formencadenamientos.h ui_formcompararresultados.h ui_formcompararmnc.h ui_formincidenciai.h ui_formpreciosnohomogeneos.h ui_formexportreport.h ui_formViewMatrix.h 704 compiler_uic_make_all: ui_formLoadMatrix.h ui_formvariablesexogenas.h ui_formexportmatrix.h ui_formencadenamientos.h ui_formcompararresultados.h ui_formcompararmnc.h ui_formincidenciai.h ui_formpreciosnohomogeneos.h ui_formexportreport.h ui_formViewMatrix.h ui_formdescomposicion.h 696 705 compiler_uic_clean: 697 -$(DEL_FILE) ui_formLoadMatrix.h ui_formvariablesexogenas.h ui_formexportmatrix.h ui_formencadenamientos.h ui_formcompararresultados.h ui_formcompararmnc.h ui_formincidenciai.h ui_formpreciosnohomogeneos.h ui_formexportreport.h ui_formViewMatrix.h 706 -$(DEL_FILE) ui_formLoadMatrix.h ui_formvariablesexogenas.h ui_formexportmatrix.h ui_formencadenamientos.h ui_formcompararresultados.h ui_formcompararmnc.h ui_formincidenciai.h ui_formpreciosnohomogeneos.h ui_formexportreport.h ui_formViewMatrix.h ui_formdescomposicion.h 698 707 ui_formLoadMatrix.h: formLoadMatrix.ui 699 708 /usr/lib/x86_64-linux-gnu/qt5/bin/uic formLoadMatrix.ui -o ui_formLoadMatrix.h … … 725 734 ui_formViewMatrix.h: formViewMatrix.ui 726 735 /usr/lib/x86_64-linux-gnu/qt5/bin/uic formViewMatrix.ui -o ui_formViewMatrix.h 736 737 ui_formdescomposicion.h: formdescomposicion.ui 738 /usr/lib/x86_64-linux-gnu/qt5/bin/uic formdescomposicion.ui -o ui_formdescomposicion.h 727 739 728 740 compiler_yacc_decl_make_all: … … 754 766 genericFunctions.h \ 755 767 qcustomplot.h \ 768 accountwidget.H \ 769 formdescomposicion.h \ 756 770 stackwidget.H \ 757 accountwidget.H \758 771 stackvariablesexogenas.h \ 759 772 variableexogenawidget.h \ … … 980 993 genericFunctions.h \ 981 994 qcustomplot.h \ 995 accountwidget.H \ 996 formdescomposicion.h \ 982 997 stackwidget.H \ 983 accountwidget.H \984 998 stackvariablesexogenas.h \ 985 999 variableexogenawidget.h \ … … 1262 1276 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qcustomplot.o qcustomplot.cpp 1263 1277 1278 formdescomposicion.o: formdescomposicion.cpp formdescomposicion.h \ 1279 ui_formdescomposicion.h 1280 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o formdescomposicion.o formdescomposicion.cpp 1281 1264 1282 qrc_images.o: qrc_images.cpp 1265 1283 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_images.o qrc_images.cpp … … 1325 1343 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_qcustomplot.o moc_qcustomplot.cpp 1326 1344 1345 moc_formdescomposicion.o: moc_formdescomposicion.cpp 1346 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_formdescomposicion.o moc_formdescomposicion.cpp 1347 1327 1348 ####### Install 1328 1349 -
SMSAM.pro
rdfabbb4 rb0c244f 22 22 genericFunctions.h \ 23 23 formexportreport.h \ 24 qcustomplot.h 24 qcustomplot.h \ 25 formdescomposicion.h 25 26 26 27 SOURCES += mainwindow.C \ … … 45 46 genericFunctions.cpp \ 46 47 formexportreport.cpp \ 47 qcustomplot.cpp 48 qcustomplot.cpp \ 49 formdescomposicion.cpp 48 50 FORMS += formLoadMatrix.ui \ 49 51 formvariablesexogenas.ui \ … … 55 57 formpreciosnohomogeneos.ui \ 56 58 formexportreport.ui \ 57 formViewMatrix.ui 59 formViewMatrix.ui \ 60 formdescomposicion.ui 58 61 59 62 INCLUDEPATH += $$PWD/Eigen -
genericFunctions.cpp
rdfabbb4 rb0c244f 7 7 */ 8 8 #include <genericFunctions.h> 9 10 using namespace Eigen; 9 11 10 12 … … 79 81 { 80 82 int contar = CuentaFila.count(accName); 81 tw->setSpan(i,0,contar,1); 83 qDebug()<<contar; 84 if(contar>1) 85 { 86 tw->setSpan(i,0,contar,1); 87 } 82 88 CuentaFila.removeAll(accName); 83 89 } … … 94 100 { 95 101 int contar = CuentaColumna.count(accName); 96 tw->setSpan(0,j,1,contar); 102 qDebug()<<contar; 103 if(contar>1) 104 { 105 tw->setSpan(0,j,1,contar); 106 } 97 107 CuentaColumna.removeAll(accName); 98 108 } … … 400 410 401 411 /** 402 @brief Funcion que permite 412 @brief Funcion que permite colocar filas/columnas como no editables 403 413 @date 08/09/2016 404 414 @author Rodrigo Boet … … 429 439 } 430 440 441 /** 442 @brief Funcion que extraer una submatriz de una tabla 443 @date 27/09/2016 444 @author Rodrigo Boet 445 @param <tw> Recibe el widget de la tabla 446 @param <nombre_fila> Recibe el nombre de la cuenta en fila 447 @param <nombre_columna> Recibe el nombre de la cuenta en columna 448 @param <matriz> Recibe la sub-matriz de donde se sacarán los valores 449 @return <result> Retorna la sub-matriz 450 */ 451 Eigen::MatrixXd extractSubMatriz(QTableWidget *tw, QString nombre_fila, QString nombre_columna, Eigen::MatrixXd Matrix) 452 { 453 int rows = tw->rowCount(); 454 Eigen::MatrixXd result; 455 int pos = 0; 456 for(int i = 2; i < rows ;i++) 457 { 458 bool entro = false; 459 int cant = 0; 460 QVector <double> values; 461 for(int j = 2; j < rows;j++) 462 { 463 if(tw->item(0,i)->text()==nombre_fila and tw->item(j,0)->text()==nombre_columna) 464 { 465 entro = true; 466 double value = Matrix(i-2,j-2); 467 values.append(value); 468 cant++; 469 } 470 } 471 if(entro) 472 { 473 result.resize(cant,cant); 474 for(int k=0;k<values.count();k++) 475 { 476 result(pos,k) = values.at(k); 477 } 478 pos++; 479 } 480 } 481 return result; 482 } 483 484 /** 485 @brief Funcion que extraer la diagonal principal de una matriz de Eigen 486 @date 28/09/2016 487 @author Rodrigo Boet 488 @param <matriz> Recibe la sub-matriz de donde se sacarán los valores 489 @return <resul> Retorna la suma de la diagonal 490 */ 491 QVector<double> extractDiagonal(Eigen::MatrixXd Matrix) 492 { 493 QVector<double> result; 494 for(int i=0;i<Matrix.rows();i++) 495 { 496 for(int j=0;j<Matrix.rows();j++) 497 { 498 if(i==j) 499 { 500 result.append(Matrix(i,j)); 501 } 502 } 503 } 504 return result; 505 } 506 507 /** 508 @brief Funcion que valida que la diagonal sea distinta de cero 509 @date 28/09/2016 510 @author Rodrigo Boet 511 @param <diagonal> Recibe el vector con la diagonal 512 @return <valida> Retorna verdadero si la diagonal es distinta de cero, falso en caso contrario 513 */ 514 bool validarDiagonal(QVector<double> diagonal) 515 { 516 int count = diagonal.count(); 517 bool valida = true; 518 for(int i=0;i<count;i++) 519 { 520 if(qAbs(diagonal.at(i))<0.00001) 521 { 522 valida = false; 523 } 524 } 525 return valida; 526 } 527 528 /** 529 @brief Funcion para llenar un vector con otro 530 @date 28/09/2016 531 @author Rodrigo Boet 532 @param <elements> Recibe el vector con los elementos 533 @param <vector> Recibe el vector que se llenara 534 */ 535 void appendElements(QVector<double> elements, QVector<double> &vector) 536 { 537 foreach (double value, elements) { 538 vector.append(value); 539 } 540 } 541 -
genericFunctions.h
rdfabbb4 rb0c244f 3 3 4 4 #include <QtWidgets> 5 #include <Eigen> 5 6 6 7 //Funciones de tipo void … … 18 19 void crearTablaVaciaEncadenamiento(int filas, QTableWidget *,int columnas=4); 19 20 void RowColNoEditable(QTableWidget *tw,int inicio,int fin,int item, bool fila); 21 void appendElements(QVector<double>,QVector<double>&); 22 20 23 //Funciones de tipo Lista 21 24 QList<QString> llenarLista(QList<QString> lista,QTableWidget *tw,int valor,int opcion); 22 25 QStringList get_list(QTableWidget *tw, int row, int init, int end); 23 26 QStringList ObtenerComponentes(QTableWidget *); 27 28 //Funciones de tipo QVector 29 QVector<double> extractDiagonal(Eigen::MatrixXd Matrix); 30 24 31 //Funciones de tipo Entero 25 32 int diferent_elements(QStringList my_list); 26 33 int contarElementosMap(QMap<QString,QStringList> diccionario); 34 27 35 //Funciones de tipo double 28 36 double sumElements(QVector<double>); 29 37 38 //Funciones de tipo Eigen 39 Eigen::MatrixXd extractSubMatriz(QTableWidget *tw, QString nombre_fila, QString nombre_columna, Eigen::MatrixXd Matrix); 40 41 //Funciones de tipo bool 42 bool validarDiagonal(QVector<double>); 43 30 44 31 45 #endif // GENERICFUNCTIONS_H -
mainwindow.C
rb23848e rb0c244f 9 9 10 10 #include "mainwindow.H" 11 #include "accountwidget.H"12 #include "stackvariablesexogenas.h"13 #include "formexportmatrix.h"14 #include <stackencadenamientos.h>15 11 #include <QDebug> 16 12 … … 387 383 menuTools.addAction(&actionVariableExogena); 388 384 385 //Se agrega la acción de descomposición 386 actionDescomposicion.setText("&Descomposicion"); 387 actionDescomposicion.setDisabled(true); 388 389 menuTools.addAction(&actionDescomposicion); 390 389 391 Modelos.setTitle("&Modelos"); 390 392 Modelos.setDisabled(true); … … 797 799 vector.append(QString::number(inicio)); 798 800 vector.append(QString::number(fin)); 799 tw->setSpan(0,inicio-1,1,numberAccounts.count(item)); 800 tw->setSpan(inicio-1,0,numberAccounts.count(item),1); 801 if(numberAccounts.count(item)>1) 802 { 803 tw->setSpan(0,inicio-1,1,numberAccounts.count(item)); 804 tw->setSpan(inicio-1,0,numberAccounts.count(item),1); 805 } 801 806 } 802 807 } … … 906 911 MainWindow::MainWindow() 907 912 : actionNewProject(this),actionLoadMatrix(this), actionExportMatrix(this), actionQuit(this),actionCH(this), actionCV(this), 908 actionVariableExogena(this),actionEncadenamiento(this),actionModeloClasico(this), 913 actionVariableExogena(this),actionEncadenamiento(this),actionModeloClasico(this), actionDescomposicion(this), 909 914 actionCompararResultados(this),actionModeloNoClasico(this),actionCompararResultadosMNC(this),actionPHClasicoIncidencia100(this), 910 915 actionPHCIncidenciaCuenta(this),actionPHCIncidenciaComponente(this),actionPHNoClasicoIncidencia100(this),actionPHNCIncidenciaCuenta(this), … … 2211 2216 2212 2217 //Se crea la nueva pestaña 2213 tabWidget->addTab(new QWidget,"Tipo de Variable"); 2214 int indice=ObtenerIndice("Tipo de Variable");//Se obtiene el indice de la pestaña 2215 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 2216 layoutCentralWidget->addWidget(tablaEE); 2217 QWidget *widget = tabWidget->widget(indice); 2218 widget->setLayout(layoutCentralWidget);//Se añade el widget y layout a la pestaña creada 2218 createTab("Tipo de Variable",tablaEE); 2219 int indice=ObtenerIndice("Tipo de Variable"); 2219 2220 formVariablesExogenas->close(); 2220 2221 2221 2222 /* Se crea la pestaña endogena-endogena */ 2222 tabWidget->addTab(new QWidget,"Endogena-Endogena"); 2223 int indiceEndogeno=ObtenerIndice("Endogena-Endogena");//Se obtiene el indice de la pestaña 2224 QHBoxLayout * layoutEndogeno = new QHBoxLayout; 2225 layoutEndogeno->addWidget(matrizEndogena); 2226 QWidget *widgetEndogeno = tabWidget->widget(indiceEndogeno); 2227 widgetEndogeno->setLayout(layoutEndogeno);//Se añade el widget y layout a la pestaña creada 2223 createTab("Endogena-Endogena",matrizEndogena); 2228 2224 2229 2225 calcularTotalCuentas(tablaEE); … … 2243 2239 connect(&actionEncadenamiento,SIGNAL(triggered()),this,SLOT(slotEncadenamientos())); 2244 2240 actionEncadenamiento.setEnabled(true); 2241 2242 //Se activa la descomposicion 2243 connect(&actionDescomposicion,SIGNAL(triggered()),this,SLOT(slotDescomposicion())); 2244 actionDescomposicion.setEnabled(true); 2245 2245 2246 2246 //Se activa la opción de modelo clásico … … 2462 2462 titleEndogena(tablaMa); 2463 2463 spanEndogenaCell(tablaMa,2,0,false); 2464 tabWidget->addTab(new QWidget,"Ma"); 2465 int indice=ObtenerIndice("Ma");//Se obtiene el indice de la pestaña 2466 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 2467 layoutCentralWidget->addWidget(tablaMa); 2468 QWidget *widget = tabWidget->widget(indice); 2469 widget->setLayout(layoutCentralWidget);//Se añade el widget y layout a la pestaña creada 2464 createTab("Ma",tablaMa,true); 2470 2465 2471 2466 opcionMa = 1; … … 3950 3945 sw->hide(); 3951 3946 3952 tabWidget->addTab(new QWidget,QString("Resultado C %1").arg(cantidadEscenarios)); 3953 int indice=ObtenerIndice(QString("Resultado C %1").arg(cantidadEscenarios)); 3954 3955 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 3956 layoutCentralWidget->addWidget(resultadoEscenario); 3957 QWidget *widget = tabWidget->widget(indice); 3958 widget->setLayout(layoutCentralWidget);//Se añade el widget y layout a la pestaña creada 3959 tabWidget->setCurrentIndex(indice); 3947 createTab(QString("Resultado C %1").arg(cantidadEscenarios),resultadoEscenario,true); 3960 3948 3961 3949 cantidadEscenarios++; … … 4136 4124 ItemsNoEditable(tablaComparar,0,2); 4137 4125 4138 tabWidget->addTab(new QWidget,QString("Comparacion %1").arg(cantidadResultados)); 4139 int indice=ObtenerIndice(QString("Comparacion %1").arg(cantidadResultados)); 4140 4141 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 4142 layoutCentralWidget->addWidget(tablaComparar); 4143 QWidget *widget = tabWidget->widget(indice); 4144 widget->setLayout(layoutCentralWidget); 4126 createTab(QString("Comparacion %1").arg(cantidadResultados),tablaComparar,true); 4145 4127 4146 4128 formCompararResultados->close(); 4147 tabWidget->setCurrentIndex(indice);4148 4129 cantidadResultados++; 4149 4130 } … … 4311 4292 titlespanMatrizExgEnd(Bn); 4312 4293 4313 tabWidget->addTab(new QWidget,"Bn");4294 createTab("Bn",Bn); 4314 4295 int indice=ObtenerIndice("Bn"); 4315 QHBoxLayout * layoutCentralWidget = new QHBoxLayout;4316 layoutCentralWidget->addWidget(Bn);4317 QWidget *widget = tabWidget->widget(indice);4318 widget->setLayout(layoutCentralWidget);4319 4296 tabWidget->removeTab(indice); 4320 4297 … … 4581 4558 } 4582 4559 titlespanMatrizExgEnd(Mb); 4583 tabWidget->addTab(new QWidget,"Mb"); 4584 int indice=ObtenerIndice("Mb"); 4585 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 4586 layoutCentralWidget->addWidget(Mb); 4587 QWidget *widget = tabWidget->widget(indice); 4588 widget->setLayout(layoutCentralWidget); 4560 createTab("Mb",Mb); 4589 4561 } 4590 4562 … … 4625 4597 sw->hide(); 4626 4598 4627 tabWidget->addTab(new QWidget,QString("Resultado NC %1").arg(cantidadMNC)); 4628 int indice=ObtenerIndice(QString("Resultado NC %1").arg(cantidadMNC)); 4629 4630 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 4631 layoutCentralWidget->addWidget(resultadoEscenario); 4632 QWidget *widget = tabWidget->widget(indice); 4633 widget->setLayout(layoutCentralWidget);//Se añade el widget y layout a la pestaña creada 4634 tabWidget->setCurrentIndex(indice); 4599 createTab(QString("Resultado NC %1").arg(cantidadMNC),resultadoEscenario,true); 4635 4600 4636 4601 cantidadMNC++; … … 4833 4798 ItemsNoEditable(tablaComparar,0,2); 4834 4799 4835 tabWidget->addTab(new QWidget,QString("Comparacion MNC %1").arg(cantidadResultadosMNC)); 4836 int indice=ObtenerIndice(QString("Comparacion MNC %1").arg(cantidadResultadosMNC)); 4837 4838 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 4839 layoutCentralWidget->addWidget(tablaComparar); 4840 QWidget *widget = tabWidget->widget(indice); 4841 widget->setLayout(layoutCentralWidget); 4800 createTab(QString("Comparacion MNC %1").arg(cantidadResultadosMNC),tablaComparar,true); 4842 4801 4843 4802 formCompararMNC->close(); 4844 tabWidget->setCurrentIndex(indice);4845 4803 cantidadResultadosMNC++; 4846 4804 } … … 4863 4821 calcularPHCIncidencia100(MatrizMi); 4864 4822 4865 tabWidget->addTab(new QWidget,"PIHc100"); 4866 int indice=ObtenerIndice("PIHc100"); 4867 4868 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 4869 layoutCentralWidget->addWidget(MatrizMi); 4870 QWidget *widget = tabWidget->widget(indice); 4871 widget->setLayout(layoutCentralWidget); 4872 tabWidget->setCurrentIndex(indice); 4823 createTab("PIHc100",MatrizMi,true); 4873 4824 actionPHClasicoIncidencia100.setDisabled(true); 4874 4825 } … … 4907 4858 titleEndogena(MaT); 4908 4859 spanEndogenaCell(MaT,2,0,false); 4909 tabWidget->addTab(new QWidget,"Pc"); 4910 int indice=ObtenerIndice("Pc"); 4911 4912 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 4913 layoutCentralWidget->addWidget(MaT); 4914 QWidget *widget = tabWidget->widget(indice); 4915 widget->setLayout(layoutCentralWidget); 4860 createTab("Pc",MaT); 4916 4861 opcionMAT++; 4917 4862 } … … 5009 4954 calcularPHCIncidenciaI(MatrizIC,cantidades); 5010 4955 5011 tabWidget->addTab(new QWidget,QString("PIHci %1").arg(cantidadPHCindidenciaiCuenta)); 5012 int indice=ObtenerIndice(QString("PIHci %1").arg(cantidadPHCindidenciaiCuenta)); 5013 5014 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5015 layoutCentralWidget->addWidget(MatrizIC); 5016 QWidget *widget = tabWidget->widget(indice); 5017 widget->setLayout(layoutCentralWidget); 5018 tabWidget->setCurrentIndex(indice); 4956 createTab(QString("PIHci %1").arg(cantidadPHCindidenciaiCuenta),MatrizIC,true); 5019 4957 cantidadPHCindidenciaiCuenta++; 5020 4958 } … … 5100 5038 calcularPHCIncidenciaIComponente(MatrizIComp,tw); 5101 5039 5102 tabWidget->addTab(new QWidget,QString("PIHcic %1").arg(cantidadPHCindidenciaiComponente)); 5103 int indice=ObtenerIndice(QString("PIHcic %1").arg(cantidadPHCindidenciaiComponente)); 5104 5105 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5106 layoutCentralWidget->addWidget(MatrizIComp); 5107 QWidget *widget = tabWidget->widget(indice); 5108 widget->setLayout(layoutCentralWidget); 5109 tabWidget->setCurrentIndex(indice); 5040 createTab(QString("PIHcic %1").arg(cantidadPHCindidenciaiComponente),MatrizIComp,true); 5110 5041 cantidadPHCindidenciaiComponente++; 5111 5042 } … … 5207 5138 } 5208 5139 titlespanMatrizExgEnd(MbT); 5209 tabWidget->addTab(new QWidget,"Pnc"); 5210 int indice=ObtenerIndice("Pnc"); 5211 5212 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5213 layoutCentralWidget->addWidget(MbT); 5214 QWidget *widget = tabWidget->widget(indice); 5215 widget->setLayout(layoutCentralWidget); 5140 createTab("Pnc",MbT); 5216 5141 opcionMBT++; 5217 5142 } … … 5233 5158 calcularPHNCIncidencia100(MatrizMi); 5234 5159 5235 tabWidget->addTab(new QWidget,"PIHnc100"); 5236 int indice=ObtenerIndice("PIHnc100"); 5237 5238 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5239 layoutCentralWidget->addWidget(MatrizMi); 5240 QWidget *widget = tabWidget->widget(indice); 5241 widget->setLayout(layoutCentralWidget); 5242 tabWidget->setCurrentIndex(indice); 5160 createTab("PIHnc100",MatrizMi,true); 5161 5243 5162 actionPHNoClasicoIncidencia100.setDisabled(true); 5244 5163 } … … 5363 5282 calcularPHCIncidenciaI(MatrizIC,cantidades); 5364 5283 5365 tabWidget->addTab(new QWidget,QString("PIHnci %1").arg(cantidadPHNCindidenciaiCuenta)); 5366 int indice=ObtenerIndice(QString("PIHnci %1").arg(cantidadPHNCindidenciaiCuenta)); 5367 5368 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5369 layoutCentralWidget->addWidget(MatrizIC); 5370 QWidget *widget = tabWidget->widget(indice); 5371 widget->setLayout(layoutCentralWidget); 5372 tabWidget->setCurrentIndex(indice); 5284 createTab(QString("PIHnci %1").arg(cantidadPHNCindidenciaiCuenta),MatrizIC,true); 5373 5285 cantidadPHNCindidenciaiCuenta++; 5374 5286 } … … 5422 5334 calcularPHCIncidenciaIComponente(MatrizIComp,tw); 5423 5335 5424 tabWidget->addTab(new QWidget,QString("PIHncic %1").arg(cantidadPHNCindidenciaiComponente)); 5425 int indice=ObtenerIndice(QString("PIHncic %1").arg(cantidadPHNCindidenciaiComponente)); 5426 5427 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5428 layoutCentralWidget->addWidget(MatrizIComp); 5429 QWidget *widget = tabWidget->widget(indice); 5430 widget->setLayout(layoutCentralWidget); 5431 tabWidget->setCurrentIndex(indice); 5336 createTab(QString("PIHncic %1").arg(cantidadPHNCindidenciaiComponente),MatrizIComp,true); 5432 5337 cantidadPHNCindidenciaiComponente++; 5433 5338 } … … 5618 5523 if(opcionPNHT == 0) 5619 5524 { 5620 tabWidget->addTab(new QWidget,QString("PINH100 %1").arg(cantidadPNHincidencia100)); 5621 int indice=ObtenerIndice(QString("PINH100 %1").arg(cantidadPNHincidencia100)); 5622 QHBoxLayout * layoutCentralWidget3 = new QHBoxLayout; 5623 layoutCentralWidget3->addWidget(tw); 5624 QWidget *widget3 = tabWidget->widget(indice); 5625 widget3->setLayout(layoutCentralWidget3); 5626 tabWidget->setCurrentIndex(indice); 5525 createTab(QString("PINH100 %1").arg(cantidadPNHincidencia100),tw,true); 5627 5526 cantidadPNHincidencia100++; 5628 5527 opcionPNHT = 1; … … 5781 5680 calcularPHCIncidenciaI(PNHI,cantidades); 5782 5681 5783 tabWidget->addTab(new QWidget,QString("PINHi %1").arg(cantidadPNHincidenciaiCuenta)); 5784 int indice=ObtenerIndice(QString("PINHi %1").arg(cantidadPNHincidenciaiCuenta)); 5785 5786 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5787 layoutCentralWidget->addWidget(PNHI); 5788 QWidget *widget = tabWidget->widget(indice); 5789 widget->setLayout(layoutCentralWidget); 5790 tabWidget->setCurrentIndex(indice); 5682 createTab(QString("PINHi %1").arg(cantidadPNHincidenciaiCuenta),PNHI,true); 5791 5683 cantidadPNHincidenciaiCuenta++; 5792 5684 FI->close(); … … 5896 5788 calcularPHCIncidenciaIComponente(PNHIc,tw); 5897 5789 5898 tabWidget->addTab(new QWidget,QString("PINHic %1").arg(cantidadPNHincidenciaiComponente)); 5899 int indice=ObtenerIndice(QString("PINHic %1").arg(cantidadPNHincidenciaiComponente)); 5900 5901 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 5902 layoutCentralWidget->addWidget(PNHIc); 5903 QWidget *widget = tabWidget->widget(indice); 5904 widget->setLayout(layoutCentralWidget); 5905 tabWidget->setCurrentIndex(indice); 5790 createTab(QString("PINHic %1").arg(cantidadPNHincidenciaiComponente),PNHIc,true); 5906 5791 cantidadPNHincidenciaiComponente++; 5907 5792 FI->close(); … … 6098 5983 6099 5984 titleSeleccionar(nuevaTabla); 6100 tabWidget->addTab(new QWidget,QString("Seleccion %1").arg(cantidadSelecciones)); 6101 int indice=ObtenerIndice(QString("Seleccion %1").arg(cantidadSelecciones)); 6102 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 6103 layoutCentralWidget->addWidget(nuevaTabla); 6104 QWidget *widget = tabWidget->widget(indice); 6105 widget->setLayout(layoutCentralWidget); 6106 tabWidget->setCurrentIndex(indice); 5985 createTab(QString("Seleccion %1").arg(cantidadSelecciones),nuevaTabla,true); 6107 5986 cantidadSelecciones++; 6108 5987 } … … 6111 5990 } 6112 5991 5992 /** 5993 @brief Función para mostrar el formulario para la descomposicion 5994 @date 27/09/2015 5995 @author Rodrigo Boet 5996 */ 5997 void MainWindow::slotDescomposicion() 5998 { 5999 formdescomposicion = new FormDescomposicion(this); 6000 QStringList list; 6001 foreach(int key,diccCuentasEndogenas.keys()) 6002 { 6003 list.append(diccCuentasEndogenas[key][0]); 6004 } 6005 formdescomposicion->ui->listAgregar->addItems(list); 6006 connect(formdescomposicion->ui->pushButton_3,SIGNAL(clicked()),this,SLOT(slotAgregarDescomposicion())); 6007 formdescomposicion->show(); 6008 } 6009 6010 /** 6011 @brief Función para seleccionar las cuentas que seran actividad/producto 6012 @date 27/09/2015 6013 @author Rodrigo Boet 6014 */ 6015 void MainWindow::slotAgregarDescomposicion() 6016 { 6017 int item = formdescomposicion->ui->listSeleccionado->count(); 6018 if(item==2) 6019 { 6020 QStringList list; 6021 for(int i=0;i<item;i++) 6022 { 6023 list.append(formdescomposicion->ui->listSeleccionado->item(i)->text()); 6024 } 6025 if(validarDescomposicion(list)) 6026 { 6027 QTableWidget *tw = findChild<QTableWidget *>("MatrizAn"); 6028 int filas = tw->rowCount(); 6029 Eigen::MatrixXd M1 = extractSubMatriz(tw,list.at(0),list.at(0),An); 6030 Eigen::MatrixXd M2 = extractSubMatriz(tw,list.at(0),list.at(1),An); 6031 Eigen::MatrixXd M3 = extractSubMatriz(tw,list.at(1),list.at(0),An); 6032 Eigen::MatrixXd M4 = extractSubMatriz(tw,list.at(1),list.at(1),An); 6033 QVector<double> V1 = extractDiagonal(M1); 6034 QVector<double> V2 = extractDiagonal(M2); 6035 QVector<double> V3 = extractDiagonal(M3); 6036 QVector<double> V4 = extractDiagonal(M4); 6037 QVector<double> diagonal; 6038 if(validarDiagonal(V1)) 6039 { 6040 appendElements(V1,diagonal); 6041 } 6042 if(validarDiagonal(V2)) 6043 { 6044 appendElements(V2,diagonal); 6045 } 6046 if(validarDiagonal(V3)) 6047 { 6048 appendElements(V3,diagonal); 6049 } 6050 if(validarDiagonal(V4)) 6051 { 6052 appendElements(V4,diagonal); 6053 } 6054 for (int i = 2; i<filas;i++) 6055 { 6056 for(int j=2; j<filas;j++) 6057 { 6058 if(tw->item(0,j)->text()!=list.at(0) and tw->item(0,j)->text()!=list.at(1)) 6059 { 6060 if(i==j) 6061 { 6062 diagonal.append(An(i-2,j-2)); 6063 } 6064 } 6065 } 6066 } 6067 calcularA0(diagonal); 6068 calcularAuxiliares(); 6069 calcularMatricesDescomposicion(); 6070 6071 } 6072 else 6073 { 6074 QMessageBox::warning(this,"Error","La cuenta Producto y Actividad\ndeben ser simétricas, ajuste la matriz\ne intente de nuevo"); 6075 } 6076 } 6077 else 6078 { 6079 QMessageBox::warning(this,"Alerta","Debe seleccionar dos (2) cuentas"); 6080 } 6081 6082 } 6083 6084 /** 6085 @brief Función para validar que las cuentas producto y actividad sean simétricas 6086 @date 28/09/2015 6087 @author Rodrigo Boet 6088 @param <cuentas> Recibe la lista con las cuentas 6089 @return <valores> Retorna verdadera si son simétricas, falso en caso contrario 6090 */ 6091 bool MainWindow::validarDescomposicion(QStringList cuentas) 6092 { 6093 QStringList valores; 6094 foreach (int key, diccCuentasEndogenas.keys()) { 6095 if (diccCuentasEndogenas[key][0]==cuentas.at(0) or diccCuentasEndogenas[key][0]==cuentas.at(1)) 6096 { 6097 valores.append(diccCuentasEndogenas[key][1]); 6098 } 6099 } 6100 if(valores.at(0)==valores.at(1)) 6101 { 6102 return true; 6103 } 6104 else 6105 { 6106 return false; 6107 } 6108 } 6109 6110 /** 6111 @brief Función para calcular A0 6112 @date 28/09/2015 6113 @author Rodrigo Boet 6114 @param <diagonal> Recibe el valor de las diagonales 6115 */ 6116 void MainWindow::calcularA0(QVector<double> diagonal) 6117 { 6118 A0 = MatrixXd::Identity(An.rows(),An.cols()); 6119 int fila = A0.rows(); 6120 for(int i=0;i<fila;i++) 6121 { 6122 for(int j=0;j<fila;j++) 6123 { 6124 if(i==j) 6125 { 6126 A0(i,j)=diagonal.at(i); 6127 } 6128 } 6129 } 6130 QTableWidget *MAN = findChild<QTableWidget *>("MatrizAn"); 6131 QTableWidget *tw = new QTableWidget; 6132 CrearTablaVacia(MAN->rowCount(),tw); 6133 noEditColZero(tw); 6134 clonarTabla(MAN,tw,MAN->rowCount()); 6135 fila = MAN->rowCount()-1; 6136 for(int i=2;i<fila;i++) 6137 { 6138 for(int j=2;j<fila;j++) 6139 { 6140 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(A0(i-2,j-2),'f',precission)); 6141 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6142 tw->setItem(i,j,valoraInsertar); 6143 } 6144 } 6145 createTab("A0",tw,true); 6146 formdescomposicion->close(); 6147 6148 MatrixXd ident = MatrixXd::Identity(An.rows(),An.cols()); 6149 M1 = ident - A0; 6150 M1 = M1.inverse(); 6151 QTableWidget *Mm1 = new QTableWidget; 6152 CrearTablaVacia(MAN->rowCount(),Mm1); 6153 noEditColZero(Mm1); 6154 clonarTabla(MAN,Mm1,MAN->rowCount()); 6155 fila = MAN->rowCount()-1; 6156 for(int i=2;i<fila;i++) 6157 { 6158 for(int j=2;j<fila;j++) 6159 { 6160 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(M1(i-2,j-2),'f',precission)); 6161 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6162 Mm1->setItem(i,j,valoraInsertar); 6163 } 6164 } 6165 createTab("M1",Mm1); 6166 } 6167 6168 /** 6169 @brief Función para calcular los auxiliares de la descomposicion y también M2 y M3 6170 @date 28/09/2015 6171 @author Rodrigo Boet 6172 */ 6173 void MainWindow::calcularAuxiliares() 6174 { 6175 MatrixXd ident = MatrixXd::Identity(A0.rows(),A0.cols()); 6176 MatrixXd aux = M1*(A0-An); 6177 M2 = ident+aux; 6178 int cantidad = diccCuentasEndogenas.count()-2; 6179 MatrixXd ant = aux; 6180 for(int i=0;i<cantidad;i++) 6181 { 6182 aux *= ant; 6183 ant = aux; 6184 if(i<cantidad-1) 6185 { 6186 M2 += aux; 6187 } 6188 } 6189 M3 = ident - aux; 6190 M3 = M3.inverse(); 6191 QTableWidget *MAN = findChild<QTableWidget *>("MatrizAn"); 6192 QTableWidget *Mm2 = new QTableWidget; 6193 CrearTablaVacia(MAN->rowCount(),Mm2); 6194 noEditColZero(Mm2); 6195 clonarTabla(MAN,Mm2,MAN->rowCount()); 6196 int fila = MAN->rowCount()-1; 6197 for(int i=2;i<fila;i++) 6198 { 6199 for(int j=2;j<fila;j++) 6200 { 6201 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(M2(i-2,j-2),'f',precission)); 6202 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6203 Mm2->setItem(i,j,valoraInsertar); 6204 } 6205 } 6206 createTab("M2",Mm2); 6207 6208 QTableWidget *Mm3 = new QTableWidget; 6209 CrearTablaVacia(MAN->rowCount(),Mm3); 6210 noEditColZero(Mm3); 6211 clonarTabla(MAN,Mm3,MAN->rowCount()); 6212 fila = MAN->rowCount()-1; 6213 for(int i=2;i<fila;i++) 6214 { 6215 for(int j=2;j<fila;j++) 6216 { 6217 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(M3(i-2,j-2),'f',precission)); 6218 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6219 Mm3->setItem(i,j,valoraInsertar); 6220 } 6221 } 6222 createTab("M3",Mm3); 6223 } 6224 6225 /** 6226 @brief Función para calcular las matrices de Transferencia (T), Open(O) y Close(C) 6227 @date 28/09/2015 6228 @author Rodrigo Boet 6229 */ 6230 void MainWindow::calcularMatricesDescomposicion() 6231 { 6232 MatrixXd ident = MatrixXd::Identity(A0.rows(),A0.cols()); 6233 T = M1 - ident; 6234 O = (M2 - ident) * M1; 6235 C = (M3 - ident) * (M2 * M1); 6236 6237 QTableWidget *MAN = findChild<QTableWidget *>("MatrizAn"); 6238 QTableWidget *mt = new QTableWidget; 6239 CrearTablaVacia(MAN->rowCount(),mt); 6240 noEditColZero(mt); 6241 clonarTabla(MAN,mt,MAN->rowCount()); 6242 int fila = MAN->rowCount()-1; 6243 for(int i=2;i<fila;i++) 6244 { 6245 for(int j=2;j<fila;j++) 6246 { 6247 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(T(i-2,j-2),'f',precission)); 6248 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6249 mt->setItem(i,j,valoraInsertar); 6250 } 6251 } 6252 createTab("T",mt); 6253 6254 QTableWidget *mo = new QTableWidget; 6255 CrearTablaVacia(MAN->rowCount(),mo); 6256 noEditColZero(mo); 6257 clonarTabla(MAN,mo,MAN->rowCount()); 6258 fila = MAN->rowCount()-1; 6259 for(int i=2;i<fila;i++) 6260 { 6261 for(int j=2;j<fila;j++) 6262 { 6263 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(O(i-2,j-2),'f',precission)); 6264 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6265 mo->setItem(i,j,valoraInsertar); 6266 } 6267 } 6268 createTab("O",mo); 6269 6270 QTableWidget *mc = new QTableWidget; 6271 CrearTablaVacia(MAN->rowCount(),mc); 6272 noEditColZero(mc); 6273 clonarTabla(MAN,mc,MAN->rowCount()); 6274 fila = MAN->rowCount()-1; 6275 for(int i=2;i<fila;i++) 6276 { 6277 for(int j=2;j<fila;j++) 6278 { 6279 QTableWidgetItem *valoraInsertar = new QTableWidgetItem(QString::number(C(i-2,j-2),'f',precission)); 6280 valoraInsertar->setFlags(valoraInsertar->flags() ^ Qt::ItemIsEditable); 6281 mc->setItem(i,j,valoraInsertar); 6282 } 6283 } 6284 createTab("C",mc); 6285 } 6286 6287 /** 6288 @brief Función para crear un nueva pestaña 6289 @date 28/09/2015 6290 @author Rodrigo Boet 6291 @param <texto> Recibe el nombre de la pestaña 6292 @param <tw> Recibe el widget de la tabla que se insertara 6293 @param <current> recibe un booleano (verdadero si se coloca como activo, falso en caso contrario) 6294 */ 6295 void MainWindow::createTab(QString texto, QTableWidget *tw, bool current) 6296 { 6297 tabWidget->addTab(new QWidget,texto); 6298 int indice=ObtenerIndice(texto); 6299 6300 QHBoxLayout * layoutCentralWidget = new QHBoxLayout; 6301 layoutCentralWidget->addWidget(tw); 6302 QWidget *widget = tabWidget->widget(indice); 6303 widget->setLayout(layoutCentralWidget); 6304 if(current) 6305 { 6306 tabWidget->setCurrentIndex(indice); 6307 } 6308 6309 } 6310 -
mainwindow.H
rb23848e rb0c244f 12 12 #include <ui_formcompararresultados.h> 13 13 #include <formcompararresultados.h> 14 //Formulario para comparar el modelo no clasico 14 15 #include <ui_formcompararmnc.h> 15 16 #include <formcompararmnc.h> 17 //Formulario de incidencias 16 18 #include "ui_formincidenciai.h" 17 19 #include <formincidenciai.h> 18 20 #include <formpreciosnohomogeneos.h> 21 //Formulario para exportar reporte 19 22 #include <formexportreport.h> 20 23 #include <ui_formexportreport.h> 24 #include "accountwidget.H" 25 //Formulario de descomposicon 26 #include <formdescomposicion.h> 27 #include <ui_formdescomposicion.h> 28 29 //Funciones genericas 21 30 #include <genericFunctions.h> 31 //Librería de gráficos 22 32 #include <qcustomplot.h> 23 24 33 #include <sstream> 25 34 #include <stackwidget.H> … … 89 98 QAction actionPNHIncidenciaCuenta; 90 99 QAction actionPNHIncidenciaComponente; 100 101 //Acción para la descomposición 102 QAction actionDescomposicion; 91 103 92 104 QAction actionSeleccionarTabla; … … 127 139 Eigen::MatrixXd MatrizMat; 128 140 Eigen::MatrixXd MatrizMbt; 141 //Matrices para la descomposicion 142 Eigen::MatrixXd A0; 143 Eigen::MatrixXd M1; 144 Eigen::MatrixXd M2; 145 Eigen::MatrixXd M3; 146 Eigen::MatrixXd T; 147 Eigen::MatrixXd O; 148 Eigen::MatrixXd C; 129 149 130 150 double total_ma; … … 188 208 FormIncidenciaI *FI; 189 209 FormPreciosNoHomogeneos * formPreciosNoHomogeneos; 210 FormDescomposicion *formdescomposicion; 190 211 191 212 void initGUI(); … … 270 291 void determinarClasificador(QTableWidget *, int index_table, int element, int total = 0); 271 292 293 //Función para validar la cuenta producto/actividad 294 bool validarDescomposicion(QStringList); 295 296 //Funciones referentes a la descomposicion 297 void calcularA0(QVector<double>); 298 void calcularAuxiliares(); 299 void calcularMatricesDescomposicion(); 300 301 //Funcion para crear una nueva pestaña 302 void createTab(QString , QTableWidget *,bool current=false); 303 272 304 bool ComprobarCuentas(); 273 305 int ObtenerIndice(QString ); … … 333 365 void calcularEscenarioNC(); 334 366 void finalizarEscenarioNC(); 367 368 //Slot para descomposicion 369 void slotDescomposicion(); 370 void slotAgregarDescomposicion(); 335 371 336 372 void slotCompararResultadosMNC(); -
moc_mainwindow.cpp
rb23848e rb0c244f 20 20 QT_BEGIN_MOC_NAMESPACE 21 21 struct qt_meta_stringdata_MainWindow_t { 22 QByteArrayData data[6 5];23 char stringdata[1 356];22 QByteArrayData data[67]; 23 char stringdata[1401]; 24 24 }; 25 25 #define QT_MOC_LITERAL(idx, ofs, len) \ … … 69 69 QT_MOC_LITERAL(37, 685, 19), 70 70 QT_MOC_LITERAL(38, 705, 20), 71 QT_MOC_LITERAL(39, 726, 25), 72 QT_MOC_LITERAL(40, 752, 19), 73 QT_MOC_LITERAL(41, 772, 20), 74 QT_MOC_LITERAL(42, 793, 24), 75 QT_MOC_LITERAL(43, 818, 32), 76 QT_MOC_LITERAL(44, 851, 28), 77 QT_MOC_LITERAL(45, 880, 36), 78 QT_MOC_LITERAL(46, 917, 22), 79 QT_MOC_LITERAL(47, 940, 16), 80 QT_MOC_LITERAL(48, 957, 21), 81 QT_MOC_LITERAL(49, 979, 25), 82 QT_MOC_LITERAL(50, 1005, 33), 83 QT_MOC_LITERAL(51, 1039, 29), 84 QT_MOC_LITERAL(52, 1069, 37), 85 QT_MOC_LITERAL(53, 1107, 20), 86 QT_MOC_LITERAL(54, 1128, 16), 87 QT_MOC_LITERAL(55, 1145, 13), 88 QT_MOC_LITERAL(56, 1159, 24), 89 QT_MOC_LITERAL(57, 1184, 28), 90 QT_MOC_LITERAL(58, 1213, 14), 91 QT_MOC_LITERAL(59, 1228, 32), 92 QT_MOC_LITERAL(60, 1261, 15), 93 QT_MOC_LITERAL(61, 1277, 36), 94 QT_MOC_LITERAL(62, 1314, 20), 95 QT_MOC_LITERAL(63, 1335, 11), 96 QT_MOC_LITERAL(64, 1347, 8) 71 QT_MOC_LITERAL(39, 726, 18), 72 QT_MOC_LITERAL(40, 745, 25), 73 QT_MOC_LITERAL(41, 771, 25), 74 QT_MOC_LITERAL(42, 797, 19), 75 QT_MOC_LITERAL(43, 817, 20), 76 QT_MOC_LITERAL(44, 838, 24), 77 QT_MOC_LITERAL(45, 863, 32), 78 QT_MOC_LITERAL(46, 896, 28), 79 QT_MOC_LITERAL(47, 925, 36), 80 QT_MOC_LITERAL(48, 962, 22), 81 QT_MOC_LITERAL(49, 985, 16), 82 QT_MOC_LITERAL(50, 1002, 21), 83 QT_MOC_LITERAL(51, 1024, 25), 84 QT_MOC_LITERAL(52, 1050, 33), 85 QT_MOC_LITERAL(53, 1084, 29), 86 QT_MOC_LITERAL(54, 1114, 37), 87 QT_MOC_LITERAL(55, 1152, 20), 88 QT_MOC_LITERAL(56, 1173, 16), 89 QT_MOC_LITERAL(57, 1190, 13), 90 QT_MOC_LITERAL(58, 1204, 24), 91 QT_MOC_LITERAL(59, 1229, 28), 92 QT_MOC_LITERAL(60, 1258, 14), 93 QT_MOC_LITERAL(61, 1273, 32), 94 QT_MOC_LITERAL(62, 1306, 15), 95 QT_MOC_LITERAL(63, 1322, 36), 96 QT_MOC_LITERAL(64, 1359, 20), 97 QT_MOC_LITERAL(65, 1380, 11), 98 QT_MOC_LITERAL(66, 1392, 8) 97 99 }, 98 100 "MainWindow\0slotNuevoProyecto\0\0" … … 116 118 "clasico\0finalizarEscenario\0" 117 119 "slotModeloNoClasico\0calcularEscenarioNC\0" 118 "finalizarEscenarioNC\0slotCompararResultadosMNC\0" 119 "slotVerResultadoMNC\0slotPHCIncidencia100\0" 120 "slotPHCIncidenciaiCuenta\0" 120 "finalizarEscenarioNC\0slotDescomposicion\0" 121 "slotAgregarDescomposicion\0" 122 "slotCompararResultadosMNC\0slotVerResultadoMNC\0" 123 "slotPHCIncidencia100\0slotPHCIncidenciaiCuenta\0" 121 124 "slotCalcularPHCIncidenciaiCuenta\0" 122 125 "slotPHCIncidenciaiComponente\0" … … 143 146 0, // classname 144 147 0, 0, // classinfo 145 6 3, 14, // methods148 65, 14, // methods 146 149 0, 0, // properties 147 150 0, 0, // enums/sets … … 151 154 152 155 // slots: name, argc, parameters, tag, flags 153 1, 0, 329, 2, 0x08 /* Private */, 154 3, 0, 330, 2, 0x08 /* Private */, 155 4, 0, 331, 2, 0x08 /* Private */, 156 5, 3, 332, 2, 0x08 /* Private */, 157 6, 0, 339, 2, 0x08 /* Private */, 158 7, 0, 340, 2, 0x08 /* Private */, 159 8, 0, 341, 2, 0x08 /* Private */, 160 9, 0, 342, 2, 0x08 /* Private */, 161 10, 0, 343, 2, 0x08 /* Private */, 162 11, 0, 344, 2, 0x08 /* Private */, 163 12, 0, 345, 2, 0x08 /* Private */, 164 13, 0, 346, 2, 0x08 /* Private */, 165 14, 0, 347, 2, 0x08 /* Private */, 166 15, 0, 348, 2, 0x08 /* Private */, 167 16, 0, 349, 2, 0x08 /* Private */, 168 17, 0, 350, 2, 0x08 /* Private */, 169 18, 0, 351, 2, 0x08 /* Private */, 170 19, 0, 352, 2, 0x08 /* Private */, 171 20, 0, 353, 2, 0x08 /* Private */, 172 21, 0, 354, 2, 0x08 /* Private */, 173 22, 0, 355, 2, 0x08 /* Private */, 174 23, 0, 356, 2, 0x08 /* Private */, 175 24, 0, 357, 2, 0x08 /* Private */, 176 25, 0, 358, 2, 0x08 /* Private */, 177 26, 0, 359, 2, 0x08 /* Private */, 178 27, 2, 360, 2, 0x08 /* Private */, 179 28, 0, 365, 2, 0x08 /* Private */, 180 29, 0, 366, 2, 0x08 /* Private */, 181 30, 0, 367, 2, 0x08 /* Private */, 182 31, 0, 368, 2, 0x08 /* Private */, 183 32, 0, 369, 2, 0x08 /* Private */, 184 33, 1, 370, 2, 0x08 /* Private */, 185 33, 0, 373, 2, 0x28 /* Private | MethodCloned */, 186 35, 0, 374, 2, 0x08 /* Private */, 187 36, 0, 375, 2, 0x08 /* Private */, 188 37, 0, 376, 2, 0x08 /* Private */, 189 38, 0, 377, 2, 0x08 /* Private */, 190 39, 0, 378, 2, 0x08 /* Private */, 191 40, 0, 379, 2, 0x08 /* Private */, 192 41, 0, 380, 2, 0x08 /* Private */, 193 42, 0, 381, 2, 0x08 /* Private */, 194 43, 0, 382, 2, 0x08 /* Private */, 195 44, 0, 383, 2, 0x08 /* Private */, 196 45, 0, 384, 2, 0x08 /* Private */, 197 46, 0, 385, 2, 0x08 /* Private */, 198 47, 0, 386, 2, 0x08 /* Private */, 199 48, 0, 387, 2, 0x08 /* Private */, 200 49, 0, 388, 2, 0x08 /* Private */, 201 50, 0, 389, 2, 0x08 /* Private */, 202 51, 0, 390, 2, 0x08 /* Private */, 203 52, 0, 391, 2, 0x08 /* Private */, 204 53, 0, 392, 2, 0x08 /* Private */, 205 54, 0, 393, 2, 0x08 /* Private */, 206 55, 0, 394, 2, 0x08 /* Private */, 207 56, 0, 395, 2, 0x08 /* Private */, 208 57, 0, 396, 2, 0x08 /* Private */, 209 58, 0, 397, 2, 0x08 /* Private */, 210 59, 0, 398, 2, 0x08 /* Private */, 211 60, 0, 399, 2, 0x08 /* Private */, 212 61, 0, 400, 2, 0x08 /* Private */, 213 62, 0, 401, 2, 0x08 /* Private */, 214 63, 0, 402, 2, 0x08 /* Private */, 215 64, 0, 403, 2, 0x08 /* Private */, 156 1, 0, 339, 2, 0x08 /* Private */, 157 3, 0, 340, 2, 0x08 /* Private */, 158 4, 0, 341, 2, 0x08 /* Private */, 159 5, 3, 342, 2, 0x08 /* Private */, 160 6, 0, 349, 2, 0x08 /* Private */, 161 7, 0, 350, 2, 0x08 /* Private */, 162 8, 0, 351, 2, 0x08 /* Private */, 163 9, 0, 352, 2, 0x08 /* Private */, 164 10, 0, 353, 2, 0x08 /* Private */, 165 11, 0, 354, 2, 0x08 /* Private */, 166 12, 0, 355, 2, 0x08 /* Private */, 167 13, 0, 356, 2, 0x08 /* Private */, 168 14, 0, 357, 2, 0x08 /* Private */, 169 15, 0, 358, 2, 0x08 /* Private */, 170 16, 0, 359, 2, 0x08 /* Private */, 171 17, 0, 360, 2, 0x08 /* Private */, 172 18, 0, 361, 2, 0x08 /* Private */, 173 19, 0, 362, 2, 0x08 /* Private */, 174 20, 0, 363, 2, 0x08 /* Private */, 175 21, 0, 364, 2, 0x08 /* Private */, 176 22, 0, 365, 2, 0x08 /* Private */, 177 23, 0, 366, 2, 0x08 /* Private */, 178 24, 0, 367, 2, 0x08 /* Private */, 179 25, 0, 368, 2, 0x08 /* Private */, 180 26, 0, 369, 2, 0x08 /* Private */, 181 27, 2, 370, 2, 0x08 /* Private */, 182 28, 0, 375, 2, 0x08 /* Private */, 183 29, 0, 376, 2, 0x08 /* Private */, 184 30, 0, 377, 2, 0x08 /* Private */, 185 31, 0, 378, 2, 0x08 /* Private */, 186 32, 0, 379, 2, 0x08 /* Private */, 187 33, 1, 380, 2, 0x08 /* Private */, 188 33, 0, 383, 2, 0x28 /* Private | MethodCloned */, 189 35, 0, 384, 2, 0x08 /* Private */, 190 36, 0, 385, 2, 0x08 /* Private */, 191 37, 0, 386, 2, 0x08 /* Private */, 192 38, 0, 387, 2, 0x08 /* Private */, 193 39, 0, 388, 2, 0x08 /* Private */, 194 40, 0, 389, 2, 0x08 /* Private */, 195 41, 0, 390, 2, 0x08 /* Private */, 196 42, 0, 391, 2, 0x08 /* Private */, 197 43, 0, 392, 2, 0x08 /* Private */, 198 44, 0, 393, 2, 0x08 /* Private */, 199 45, 0, 394, 2, 0x08 /* Private */, 200 46, 0, 395, 2, 0x08 /* Private */, 201 47, 0, 396, 2, 0x08 /* Private */, 202 48, 0, 397, 2, 0x08 /* Private */, 203 49, 0, 398, 2, 0x08 /* Private */, 204 50, 0, 399, 2, 0x08 /* Private */, 205 51, 0, 400, 2, 0x08 /* Private */, 206 52, 0, 401, 2, 0x08 /* Private */, 207 53, 0, 402, 2, 0x08 /* Private */, 208 54, 0, 403, 2, 0x08 /* Private */, 209 55, 0, 404, 2, 0x08 /* Private */, 210 56, 0, 405, 2, 0x08 /* Private */, 211 57, 0, 406, 2, 0x08 /* Private */, 212 58, 0, 407, 2, 0x08 /* Private */, 213 59, 0, 408, 2, 0x08 /* Private */, 214 60, 0, 409, 2, 0x08 /* Private */, 215 61, 0, 410, 2, 0x08 /* Private */, 216 62, 0, 411, 2, 0x08 /* Private */, 217 63, 0, 412, 2, 0x08 /* Private */, 218 64, 0, 413, 2, 0x08 /* Private */, 219 65, 0, 414, 2, 0x08 /* Private */, 220 66, 0, 415, 2, 0x08 /* Private */, 216 221 217 222 // slots: parameters … … 248 253 QMetaType::Void, 249 254 QMetaType::Void, QMetaType::Bool, 34, 255 QMetaType::Void, 256 QMetaType::Void, 250 257 QMetaType::Void, 251 258 QMetaType::Void, … … 325 332 case 35: _t->calcularEscenarioNC(); break; 326 333 case 36: _t->finalizarEscenarioNC(); break; 327 case 37: _t->slotCompararResultadosMNC(); break; 328 case 38: _t->slotVerResultadoMNC(); break; 329 case 39: _t->slotPHCIncidencia100(); break; 330 case 40: _t->slotPHCIncidenciaiCuenta(); break; 331 case 41: _t->slotCalcularPHCIncidenciaiCuenta(); break; 332 case 42: _t->slotPHCIncidenciaiComponente(); break; 333 case 43: _t->slotCalcularPHCIncidenciaiComponente(); break; 334 case 44: _t->slotCompararResultados(); break; 335 case 45: _t->slotVerResultado(); break; 336 case 46: _t->slotPHNCIncidencia100(); break; 337 case 47: _t->slotPHNCIncidenciaiCuenta(); break; 338 case 48: _t->slotCalcularPHNCIncidenciaiCuenta(); break; 339 case 49: _t->slotPHNCIncidenciaiComponente(); break; 340 case 50: _t->slotCalcularPHNCIncidenciaiComponente(); break; 341 case 51: _t->slotPNHIncudencia100(); break; 342 case 52: _t->slotCloseformPNH(); break; 343 case 53: _t->slotSelectPNH(); break; 344 case 54: _t->slotPNHIncidenciaiCuenta(); break; 345 case 55: _t->slotPNHIncidenciaiComponente(); break; 346 case 56: _t->slotSelectPNHi(); break; 347 case 57: _t->slotCalcularPNHIncidenciaiCuenta(); break; 348 case 58: _t->slotSelectPNHic(); break; 349 case 59: _t->slotCalcularPNHIncidenciaiComponente(); break; 350 case 60: _t->slotSeleccionarTabla(); break; 351 case 61: _t->abrirManual(); break; 352 case 62: _t->acercaDe(); break; 334 case 37: _t->slotDescomposicion(); break; 335 case 38: _t->slotAgregarDescomposicion(); break; 336 case 39: _t->slotCompararResultadosMNC(); break; 337 case 40: _t->slotVerResultadoMNC(); break; 338 case 41: _t->slotPHCIncidencia100(); break; 339 case 42: _t->slotPHCIncidenciaiCuenta(); break; 340 case 43: _t->slotCalcularPHCIncidenciaiCuenta(); break; 341 case 44: _t->slotPHCIncidenciaiComponente(); break; 342 case 45: _t->slotCalcularPHCIncidenciaiComponente(); break; 343 case 46: _t->slotCompararResultados(); break; 344 case 47: _t->slotVerResultado(); break; 345 case 48: _t->slotPHNCIncidencia100(); break; 346 case 49: _t->slotPHNCIncidenciaiCuenta(); break; 347 case 50: _t->slotCalcularPHNCIncidenciaiCuenta(); break; 348 case 51: _t->slotPHNCIncidenciaiComponente(); break; 349 case 52: _t->slotCalcularPHNCIncidenciaiComponente(); break; 350 case 53: _t->slotPNHIncudencia100(); break; 351 case 54: _t->slotCloseformPNH(); break; 352 case 55: _t->slotSelectPNH(); break; 353 case 56: _t->slotPNHIncidenciaiCuenta(); break; 354 case 57: _t->slotPNHIncidenciaiComponente(); break; 355 case 58: _t->slotSelectPNHi(); break; 356 case 59: _t->slotCalcularPNHIncidenciaiCuenta(); break; 357 case 60: _t->slotSelectPNHic(); break; 358 case 61: _t->slotCalcularPNHIncidenciaiComponente(); break; 359 case 62: _t->slotSeleccionarTabla(); break; 360 case 63: _t->abrirManual(); break; 361 case 64: _t->acercaDe(); break; 353 362 default: ; 354 363 } … … 381 390 return _id; 382 391 if (_c == QMetaObject::InvokeMetaMethod) { 383 if (_id < 6 3)392 if (_id < 65) 384 393 qt_static_metacall(this, _c, _id, _a); 385 _id -= 6 3;394 _id -= 65; 386 395 } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { 387 if (_id < 6 3)396 if (_id < 65) 388 397 *reinterpret_cast<int*>(_a[0]) = -1; 389 _id -= 6 3;398 _id -= 65; 390 399 } 391 400 return _id;
Note: See TracChangeset
for help on using the changeset viewer.