busquedafecha2.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 
00022 #include "busquedafecha2.h"
00023 #include "funcaux.h"
00024 
00025 
00027 
00030 BusquedaFecha2::BusquedaFecha2(QWidget *parent) : QLineEdit(parent) {
00031     _depura("BusquedaFecha2::BusquedaFecha2", 0);
00032     installEventFilter(this);
00033     QObject::connect(this, SIGNAL(editingFinished()), this, SLOT(on_mui_editingFinished()));
00034     _depura("END BusquedaFecha2::BusquedaFecha2", 0);
00035 }
00036 
00037 
00039 
00041 BusquedaFecha2::~BusquedaFecha2() {
00042     _depura("BusquedaFecha2::~BusquedaFecha2", 0);
00043     _depura("END BusquedaFecha2::~BusquedaFecha2", 0);
00044 }
00045 
00046 
00048 
00051 void BusquedaFecha2::setText(QString val) {
00052     _depura("BusquedaFecha2::setText", 0);
00053     QLineEdit::setText(val);
00054     _depura("END BusquedaFecha2::setText", 0);
00055 }
00056 
00057 
00059 
00062 void BusquedaFecha2::setValorCampo(QString val) {
00063     _depura("BusquedaFecha2::setValorCampo", 0);
00064     QLineEdit::setText(val);
00065     _depura("END BusquedaFecha2::setValorCampo", 0);
00066 }
00067 
00068 
00070 
00072 void BusquedaFecha2::selectAll() {
00073     _depura("BusquedaFecha2::selectAll", 0);
00074     _depura("END BusquedaFecha2::selectAll", 0);
00075 }
00076 
00077 
00079 
00082 QString BusquedaFecha2::text() {
00083     _depura("BusquedaFecha2::text", 0);
00084     _depura("END BusquedaFecha2::text", 0);
00085     return QLineEdit::text();
00086 }
00087 
00088 
00090 
00093 QString BusquedaFecha2::valorCampo() {
00094     _depura("BusquedaFecha2::valorCampo", 0);
00095     _depura("END BusquedaFecha2::valorCampo", 0);
00096     return QLineEdit::text();
00097 }
00098 
00099 
00101 
00103 void BusquedaFecha2::on_mui_editingFinished() {
00104     _depura("BusquedaFecha2::on_mui_editingFinished", 0);
00105     setText(normalizafecha(text()).toString("dd/MM/yyyy"));
00106     _depura("END BusquedaFecha2::on_mui_editingFinished", 0);
00107 }
00108 
00109 
00111 
00116 bool BusquedaFecha2::eventFilter(QObject *obj, QEvent *event) {
00117     _depura("BusquedaFecha2::eventFilter", 0);
00118 /*
00119     if (event->type() == QEvent::KeyRelease) {
00120         QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
00121         int key = keyEvent->key();
00122         switch (key) {
00123         case Qt::Key_Return:
00124         case Qt::Key_Enter:
00125             setText(normalizafecha(text()).toString());
00126             break;
00127       } // end switch
00128     } // end if
00129 */
00130 /*
00131     if (event->type() == QEvent::FocusOut) {
00132         setText("1111");
00133         return TRUE;
00134     } // end if
00135 */
00136     _depura("END BusquedaFecha2::eventFilter", 0);
00137     return QLineEdit::eventFilter(obj, event);
00138 }
00139 

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