ficha.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
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 FICHA_H
00023 #define FICHA_H
00024 
00025 #include <QWidget>
00026 #include <QCloseEvent>
00027 
00028 #include "dialogchanges.h"
00029 #include "funcaux.h"
00030 #include "empresabase.h"
00031 #include "blwidget.h"
00032 #include "dbrecord.h"
00033 
00034 class Ficha : public BLWidget, public DBRecord, public dialogChanges {
00035     Q_OBJECT
00036 
00037 public:
00038     enum edmode
00039     {
00040         EditMode = 0, SelectMode = 1
00041     };
00042 
00043 private:
00046     edmode m_modo;
00047     QString m_title;
00048 
00049 protected:
00050     void setModoConsulta();
00051     void setModoEdicion();
00052     bool modoEdicion();
00053     bool modoConsulta();
00054 
00055 public:
00056     Ficha(QWidget *parent = 0, Qt::WFlags f = 0, edmode modo = EditMode);
00057     Ficha(EmpresaBase *emp = NULL, QWidget *parent = 0, Qt::WFlags f = 0, edmode modo = EditMode);
00058     virtual ~Ficha();
00059     virtual int guardar();
00060     virtual int guardarPost();
00061     virtual int borrarPre();
00062     virtual int borrar();
00063     virtual void closeEvent(QCloseEvent *);
00064     virtual int sacaWindow();
00065     virtual void meteWindow(QString , QObject *, bool compdup = TRUE);
00066     void setDBTableName(QString nom);
00067     void setTitleName(QString nom);
00068     virtual void pintar();
00069     virtual void pintarPost();
00070     virtual int cargar(QString id);
00071     virtual int cargarPost(QString id);
00072     virtual void recogeValores();
00073     virtual void creaMenu(QMenu *);
00074     virtual void procesaMenu(QAction *);
00075     virtual void generaRML(const QString &);
00076     virtual void trataTags(QString &buff);
00077     virtual QString trataQuery(const QString &query, const QString &datos);
00078     virtual QString trataIfQuery(const QString &query, const QString &datos);
00079     virtual QString trataExists(const QString &query, const QString &datos);
00080     virtual void cargaSpecs();
00081     virtual void generaCampo(const QString &objname, const QString &textname, const QString &type);
00082 
00083 public slots:
00084     virtual void on_mui_aceptar_clicked();
00085     virtual void on_mui_borrar_clicked();
00086     virtual void on_mui_eliminar_clicked();
00087     virtual void on_mui_cancelar_clicked();
00088     virtual void on_mui_guardar_clicked();
00089     virtual void on_customContextMenuRequested(const QPoint &pos);
00090     virtual void on_mui_imprimir_clicked();
00091 
00092 signals:
00093     virtual void cerrar();
00094     void pintaMenu(QMenu *);
00095     void trataMenu(QAction *);
00096 };
00097 
00098 #endif
00099 

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