arbol.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Ricardo Diaz                                    *
00003  *   richard@galdi.es                                                      *
00004  *   http://www.iglues.org                                                 *
00005  *                                                                         *
00006  *   This program is free software; you can redistribute it and/or modify  *
00007  *   it under the terms of the GNU General Public License as published by  *
00008  *   the Free Software Foundation; either version 2 of the License, or     *
00009  *   (at your option) any later version.                                   *
00010  *                                                                         *
00011  *   This program is distributed in the hope that it will be useful,       *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU General Public License for more details.                          *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this program; if not, write to the                         *
00018  *   Free Software Foundation, Inc.,                                       *
00019  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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 

Generated on Sat Dec 15 00:01:02 2007 for BulmaGes by  doxygen 1.5.1