source: mmcs/mainwindow.H @ bd5e45b

matrices
Last change on this file since bd5e45b was bd5e45b, checked in by rboet <rboet@…>, 9 years ago

Traducción de los botones de diálogo, primer prototipo de matriz La

  • Property mode set to 100644
File size: 3.6 KB
Line 
1#ifndef MAINWINDOW_H
2#define MAINWINDOW_H
3
4#include <QtGui>
5#include <formloadmatrix.H>
6#include <formviewmatrix.H>
7#include <formvariablesexogenas.h>
8#include <sstream>
9#include <stackwidget.H>
10#include <QTabWidget>
11#include <stackvariablesexogenas.h>
12#include <QMap>
13#include <formexportmatrix.h>
14
15class MainWindow : public QMainWindow
16{
17    Q_OBJECT
18
19    QMenu menuFile;
20    QMenu OpMatrices;
21    QMenu menuTools;
22    QMenu menuViews;
23    QMenu menuHelp;
24    QMenu EndoExo;
25
26    QAction actionLoadMatrix;
27    QAction actionExportMatrix;
28    QAction actionQuit;
29
30    QAction actionCH;
31    QAction actionCV;
32    QAction actionVariableExogena;
33    QAction actionAn;
34    QAction actionLa;
35    QAction actionEncadenamiento;   
36
37
38    QTableWidget * tableWidget;
39    QTabWidget * tabWidget;
40    QMap<QString,QStringList> diccCuentasExogenas;
41
42    stackVariablesExogenas *stackVE;
43
44
45    QString csvFilePath;
46    char csvSeparator;
47    int numAccounts;
48    int matrixSize;
49    double  matrix[100][100];
50
51    int opcionCuentaExogena;
52    int opcionVentanaExogena;
53    int opcionExportarMatriz;
54
55    FormLoadMatrix * formLoadMatrix;
56    FormViewMatrix * formViewMatrix;
57    FormVariablesExogenas * formVariablesExogenas;
58    FormExportMatrix * formExportMatriz;
59
60
61    void initGUI();
62
63    void createCentralWidget();
64    void createMatrixCentralWidget();
65
66    void createMenuBar();
67    void matricesMenuBar();
68    void populateTable(QTableWidget *);
69    void CalcularTotales(QTableWidget *, int inicio);
70    void loadMatrizExogena();
71    void clonarTabla(QTableWidget *,QTableWidget *, int cantidad);
72    void noEditColZero(QTableWidget *);
73    void setAccountTitle(QTableWidget *);
74    void insertremoveRowCol(QTableWidget *, int rowcol, bool opcion);
75
76    double MatrizEndogenaEndogena[200][200];
77
78
79    QList<QString> llenarLista(QList<QString>, QTableWidget *, int valor, int opcion);
80    void insertRowExogena(QList<QString>, QTableWidget *, int opcion);
81    void setEndogenaExogenaCell(QTableWidget *, int inicioExogena, int elementos,bool condicion);
82    void CalcularAn(QTableWidget *, QTableWidget *, QTableWidget *, int count, bool endogena);
83    QString Separador(QTableWidgetItem *,bool quitar);
84
85    void crearMatrizEndogena(QTableWidget *);
86    void crearMatrizIdentidad(QTableWidget *,double identidad[200][200]);
87    void restarIdentidadAn(QTableWidget *tw,double identidad[200][200],double resta[200][200]);
88
89    bool ComprobarCuentas();
90    int ObtenerIndice(QString );
91
92    QStringList ObtenerNombreCuenta(int contador);
93    QList<int> ObtenerLimitesCuenta(int contador,int opccion);
94    QStringList ObtenerComponentes(QTableWidget *);
95    void CrearTablaVacia(int contador,QTableWidget *);
96
97protected:
98    void closeEvent(QCloseEvent *);
99
100private slots:
101    void slotLoadMatrix();
102    void slotExportMatrix();
103    void slotFormLoadMatrixAccepted(const QString &, int, char);
104    void slotFormLoadMatrixClosed();
105
106    void AgregarCuenta();
107    void RestaurarCeldas();
108    void FinalizarCuentas();
109    void ModificarCuenta();
110    void slotCoeficienteHorizontal();
111    void slotCoeficienteVertical();
112
113    void slotVariableExogena();
114    void slotCloseExogena();
115    void slotAgregarExogena();
116    void slotFinalizarExogena();
117    void slotDeshacerExogena();
118    void slotAn();
119    void slotLa();
120
121    void slotCloseExport();
122    void slotSaveExport();
123    void slotSearchExport();
124
125public:
126    MainWindow();
127    std::vector<std::string> csv_read_row(std::string , char);
128    std::vector<std::string> csv_read_row(std::istream &, char);
129    QString numberFormat(double &);
130
131    int contarElementosMap();
132    int retornarIndiceCuenta(QString nombre_cuenta);
133};
134
135#endif // MAINWINDOW_H
Note: See TracBrowser for help on using the repository browser.