busquedaregimenfiscal.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2007 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 "qcombobox2.h"
00022 
00023 #include "busquedaregimenfiscal.h"
00024 
00029 
00030 
00033 BusquedaRegimenFiscal::BusquedaRegimenFiscal(QWidget *parent)
00034         : QComboBox2(parent) {
00035     _depura("BusquedaRegimenFiscal::BusquedaRegimenFiscal", 0);
00036     connect(this, SIGNAL(activated(int)), this, SLOT(m_activated(int)));
00037     addItem("Normal");
00038     addItem("Intracomunitario");
00039     addItem("Extracomunitario");
00040     _depura("END BusquedaRegimenFiscal::BusquedaRegimenFiscal", 0);
00041 }
00042 
00043 
00048 BusquedaRegimenFiscal::~BusquedaRegimenFiscal() {
00049     _depura("BusquedaRegimenFiscal::~BusquedaRegimenFiscal", 0);
00050     _depura("END BusquedaRegimenFiscal::~BusquedaRegimenFiscal", 0);
00051 }
00052 
00053 
00062 void BusquedaRegimenFiscal::setRegimenFiscal(QString regimen) {
00063     _depura("BusquedaRegimenFiscal::setRegimenFiscal", 0, regimen);
00064     if (regimen == "Normal") {
00065         setCurrentIndex(0);
00066     } else if (regimen == "Intracomunitario") {
00067         setCurrentIndex(1);
00068     } else if (regimen == "Extracomunitario") {
00069         setCurrentIndex(2);
00070     } // end if
00071     _depura("END BusquedaRegimenFiscal::setRegimenFiscal", 0);
00072 }
00073 
00074 
00076 
00079 void BusquedaRegimenFiscal::setValorCampo(QString regimen) {
00080     _depura("BusquedaRegimenFiscal::setValorCampo", 0);
00081         setRegimenFiscal(regimen);
00082     _depura("END BusquedaRegimenFiscal::setValorCampo", 0);
00083 }
00084 
00085 
00087 
00090 void BusquedaRegimenFiscal::m_activated(int index) {
00091     _depura("BusquedaRegimenFiscal::m_activated", 0);
00092     if (index > 0) {
00093         emit(valueChanged(currentText()));
00094     } else {
00095         emit(valueChanged(""));
00096     } // end if
00097     _depura("END BusquedaRegimenFiscal::m_activated", 0);
00098 }
00099 
00100 
00106 QString BusquedaRegimenFiscal::regimenFiscal() {
00107     _depura("BusquedaRegimenFiscal::regimenFiscal", 0);
00108     _depura("END BusquedaRegimenFiscal::regimenFiscal", 0);
00109     return (currentText());
00110 }
00111 
00112 
00118 QString BusquedaRegimenFiscal::valorCampo() {
00119     _depura("BusquedaRegimenFiscal::regimenFiscal", 0);
00120     _depura("END BusquedaRegimenFiscal::regimenFiscal", 0);
00121     return (currentText());
00122 }
00123 

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