movimientosview.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00021 #ifndef MOVIMIENTOSVIEW_H
00022 #define MOVIMIENTOSVIEW_H
00023 
00024 #include "busquedacliente.h"
00025 #include "busquedaarticulo.h"
00026 #include "company.h"
00027 #include "funcaux.h"
00028 #include "subform2bf.h"
00029 #include "fichabf.h"
00030 
00031 
00033 
00034 class MovimientosSubform : public SubForm2Bf {
00035     Q_OBJECT
00036 
00037 public:
00038     MovimientosSubform(QWidget *parent = 0, const char *name = 0);
00039     ~MovimientosSubform() {}
00040 
00041 public slots:
00042     virtual void cargar() {
00043         _depura("MovimientosSubform::cargar\n", 0);
00044         QString SQLQuery = "SELECT * FROM factura";
00045         SubForm3::cargar(SQLQuery);
00046     }
00047     virtual void cargar(QString query) {
00048         SubForm3::cargar(query);
00049     }
00050 };
00051 
00052 
00053 #include "ui_movimientosbase.h"
00054 
00055 
00057 
00058 class MovimientosView : public FichaBf, public Ui_MovimientosBase {
00059     Q_OBJECT
00060 
00061 public:
00062     enum edmode
00063     {
00064         EditMode = 0,
00065         SelectMode = 1
00066     };
00067 
00068 private:
00069     edmode m_modo;
00070     QString mdb_idfactura;
00071 
00072 public:
00073 //    MovimientosView(QWidget *parent = 0, edmode editmodo = EditMode);
00074     MovimientosView(Company *,QWidget *parent = 0, edmode editmodo = EditMode);
00075     virtual ~MovimientosView();
00076     void iniciaForm();
00077     void setEmpresaBase (Company *comp) {
00078         PEmpresaBase::setEmpresaBase(comp);
00079         m_cliente->setEmpresaBase(comp);
00080         m_articulo->setEmpresaBase(comp);
00081         mui_list->setEmpresaBase(comp);
00082     };
00083 
00084     int modo() {
00085         return m_modo;
00086     };
00087     void modoseleccion() {
00088         m_modo = SelectMode;
00089     };
00090     void modoedicion() {
00091         m_modo = EditMode;
00092     };
00093     QString idfactura() {
00094         return mdb_idfactura;
00095     };
00096     void hideBusqueda() {
00097         m_busqueda->hide();
00098     };
00099     void showBusqueda() {
00100         m_busqueda->show();
00101     };
00102     void setidcliente(QString val) {
00103         m_cliente->setidcliente(val);
00104     };
00105     void setidarticulo(QString val) {
00106         m_articulo->setidarticulo(val);
00107     };
00108     QString generaFiltro();
00109 
00110     void presenta();
00111 
00112 public slots:
00113     virtual void on_m_filtro_textChanged(const QString &text) {
00114     if (text.size() >= 3) 
00115                 on_mui_actualizar_clicked();
00116     };
00117     virtual void on_mui_actualizar_clicked() {
00118         presenta();
00119     }
00120     virtual void on_mui_crear_clicked() {
00121         empresaBase()->s_newFacturaCli();
00122     };
00123     virtual void on_mui_imprimir_clicked();
00124     virtual void on_mui_configurar_toggled(bool checked) {
00125         if (checked) {
00126             mui_list->showConfig();
00127         } else {
00128             mui_list->hideConfig();
00129         } // end if
00130     };
00131 
00132 signals:
00133     void selected(QString);
00134 };
00135 
00136 #endif
00137 

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