listtipostrabajoview.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by Tomeu Borras Riera                              *
00003  *   tborras@conetxia.com                                                  *
00004  *   Copyright (C) 2006 by Fco. Javier M. C. (Porting to QT4)              *
00005  *   fcojavmc@todo-redes.com                                               *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 #include <QMessageBox>
00024 #include <QWidget>
00025 #include <QComboBox>
00026 #include <QToolButton>
00027 #include <QTextStream>
00028 #include <QLayout>
00029 #include <QMessageBox>
00030 
00031 #include <fstream>
00032 
00033 #include "company.h"
00034 #include "configuracion.h"
00035 #include "listtipostrabajoview.h"
00036 
00037 #include "funcaux.h"
00038 
00039 
00041 
00045 ListTiposTrabajoView::ListTiposTrabajoView(Company *comp, QWidget *parent)
00046         : FichaBf(comp, parent) {
00047     _depura("ListTiposTrabajoView::ListTiposTrabajoView", 1);
00048     setDBTableName(tr("almacen"));
00049     setAttribute(Qt::WA_DeleteOnClose);
00050     setupUi(this);
00051     mui_listado->setEmpresaBase(comp);
00052 
00053     mui_listado->setDBTableName("tipotrabajo");
00054     mui_listado->setDBCampoId("idtipotrabajo");
00055     mui_listado->addSHeader("idtipotrabajo", DBCampo::DBint, DBCampo::DBPrimaryKey, SHeader::DBNoView, tr("Id Tipo Trabajo"));
00056     mui_listado->addSHeader("nomtipotrabajo", DBCampo::DBvarchar, DBCampo::DBNotNull, SHeader::DBNone, tr("Nombre Tipo Trabajo"));
00057     mui_listado->addSHeader("colortipotrabajo", DBCampo::DBvarchar, DBCampo::DBNothing , SHeader::DBNone, tr("Color Tipo Trabajo"));
00058     mui_listado->setinsercion(TRUE);
00059 
00060     mui_listado->cargar("SELECT * FROM tipotrabajo");
00061     meteWindow(windowTitle(), this);
00062     _depura("END ListTiposTrabajoView::ListTiposTrabajoView", 1);
00063 }
00064 
00065 
00067 
00069 void ListTiposTrabajoView::on_mui_aceptar_clicked() {
00070     try {
00071         mui_listado->guardar();
00072         close();
00073     } catch (...) {
00074         mensajeInfo("Error al guardar los tipos de trabajo");
00075     } // end try
00076 }
00077 
00078 
00080 
00082 ListTiposTrabajoView::~ListTiposTrabajoView() {
00083     _depura("ListTiposTrabajoView::~ListTiposTrabajoView", 0);
00084     _depura("END ListTiposTrabajoView::~ListTiposTrabajoView", 0);
00085 }
00086 
00087 

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