busquedazonacomercial.cpp

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 #include <QComboBox>
00022 
00023 #include "busquedazonacomercial.h"
00024 #include "company.h"
00025 
00026 
00028 
00031 BusquedaZonaComercial::BusquedaZonaComercial(QWidget *parent)
00032         : QComboBox(parent), PEmpresaBase() {
00033     _depura("BusquedaZonaComercial::BusquedaZonaComercial", 0);
00034     m_cursorcombo = NULL;
00035     connect(this, SIGNAL(activated(int)), this, SLOT(m_activated(int)));
00036     _depura("END BusquedaZonaComercial::BusquedaZonaComercial", 0);
00037 }
00038 
00039 
00041 
00043 BusquedaZonaComercial::~BusquedaZonaComercial() {
00044     _depura("BusquedaZonaComercial::~BusquedaZonaComercial", 0);
00045     if (m_cursorcombo != NULL)
00046         delete m_cursorcombo;
00047     _depura("END BusquedaZonaComercial::~BusquedaZonaComercial", 0);
00048 }
00049 
00050 
00052 
00055 void BusquedaZonaComercial::setidzonacomercial(QString idzonacomercial) {
00056     _depura("BusquedaZonaComercial::~BusquedaZonaComercial", 0);
00057     if (m_cursorcombo != NULL)
00058         delete m_cursorcombo;
00059     m_cursorcombo = empresaBase()->cargacursor("SELECT * FROM zonacomercial");
00060     int i = 0;
00061     int i1 = 0;
00062     clear();
00063     addItem("--");
00064     while (!m_cursorcombo->eof()) {
00065         i++;
00066         if (m_cursorcombo->valor("idzonacomercial") == idzonacomercial)
00067             i1 = i;
00068         addItem(m_cursorcombo->valor("nomzonacomercial"));
00069         m_cursorcombo->siguienteregistro();
00070     } // end while
00071     setCurrentIndex(i1);
00072     _depura("END BusquedaZonaComercial::~BusquedaZonaComercial", 0);
00073 }
00074 

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