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 LISTADO_H 00023 #define LISTADO_H 00024 00025 #include <QWidget> 00026 #include <QCloseEvent> 00027 00028 #include "dialogchanges.h" 00029 #include "funcaux.h" 00030 #include "empresabase.h" 00031 #include "subform3.h" 00032 #include "blwidget.h" 00033 00034 00035 class Listado : public BLWidget { 00036 Q_OBJECT 00037 public: 00038 enum edmode 00039 { 00040 EditMode = 0, SelectMode = 1 00041 }; 00042 00043 SubForm3 *m_listado; 00044 00045 private: 00048 edmode m_modo; 00049 00050 protected: 00051 void setSubForm(SubForm3 *); 00052 00053 00054 00055 public: 00056 Listado(QWidget *parent = 0, Qt::WFlags f = 0, edmode modo = EditMode); 00057 Listado(EmpresaBase *emp = NULL, QWidget *parent = 0, Qt::WFlags f = 0, edmode modo = EditMode); 00058 virtual void editar(int); 00059 virtual void imprimir(); 00060 virtual void presentar(); 00061 virtual ~Listado(); 00062 virtual int sacaWindow(); 00063 virtual int meteWindow(QString title); 00064 virtual void submenu(const QPoint &); 00065 virtual void crear(); 00066 virtual void borrar(); 00067 void hideBotonera(); 00068 void showBotonera(); 00069 void hideBusqueda(); 00070 void showBusqueda(); 00071 void setModoConsulta(); 00072 void setModoEdicion(); 00073 bool modoEdicion(); 00074 bool modoConsulta(); 00075 void trataPermisos(QString nomtabla); 00076 00077 public slots: 00078 virtual void on_mui_list_customContextMenuRequested(const QPoint &); 00079 virtual void on_mui_list_cellDoubleClicked(int, int); 00080 virtual void on_mui_list_toogledConfig(bool check); 00081 virtual void on_m_filtro_textChanged(const QString &text); 00082 virtual void on_m_filtro_editingFinished(); 00083 virtual void on_mui_actualizar_clicked(); 00084 virtual void on_mui_imprimir_clicked(); 00085 virtual void on_mui_editar_clicked(); 00086 virtual void on_mui_configurar_toggled(bool checked); 00087 virtual void on_mui_borrar_clicked(); 00088 virtual void on_mui_crear_clicked(); 00089 00090 signals: 00091 void selected(QString); 00092 }; 00093 00094 #endif 00095
1.5.1