00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef ARBOL_H
00023 #define ARBOL_H
00024
00025 #include <QString>
00026
00027 #include "postgresiface2.h"
00028 #include "funcaux.h"
00029 #include "fixed.h"
00030
00031
00033
00040 class Arbol {
00041 private:
00042 typedef struct tipohoja;
00043 typedef struct tiporama {
00044 tipohoja* hoja;
00045 tiporama* sgte;
00046 };
00047 typedef struct tipohoja {
00048 int idcuenta;
00049 QString codigo;
00050 QString descripcion;
00051
00052 Fixed saldoant, debe, haber, saldo, debeej, haberej, saldoej;
00053 int numapuntes;
00054 tiporama* ramas;
00055 };
00056 tipohoja** raiz;
00057 tipohoja* hoja;
00058 tiporama* rama;
00059 postgresiface2 *conexionbase;
00060 QString hojaactiva;
00061
00062 private:
00063 void SintetizarRamas(cursor2**, tiporama**);
00064 void ActualizarHoja(tiporama**, cursor2*, bool*);
00065 void Deshojar(tiporama*, unsigned int, bool, bool*);
00066
00067 public:
00068 Arbol();
00069 ~Arbol();
00071 void nuevarama(cursor2*);
00073 void inicializa(cursor2*);
00075 void actualizahojas(cursor2*);
00077 void inicia();
00079 bool deshoja(unsigned int, bool);
00081 QString hojaactual(QString);
00084 bool irHoja(QString, unsigned int nivel=4);
00085 };
00086
00087 #endif
00088