QGIS API Documentation  master-6227475
src/gui/qgsfilterlineedit.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                               qgsfilterlineedit.h
00003                               ------------------------
00004   begin                : October 27, 2012
00005   copyright            : (C) 2012 by Alexander Bruy
00006   email                : alexander dot bruy at gmail dot com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSFILTERLINEEDIT_H
00019 #define QGSFILTERLINEEDIT_H
00020 
00021 #include <QLineEdit>
00022 
00023 class QToolButton;
00024 
00028 class GUI_EXPORT QgsFilterLineEdit : public QLineEdit
00029 {
00030     Q_OBJECT
00031   public:
00032     QgsFilterLineEdit( QWidget* parent = 0, QString nullValue = QString::null );
00033 
00034     void setNullValue( QString nullValue ) { mNullValue = nullValue; }
00035 
00036   signals:
00037     void cleared();
00038 
00039   protected:
00040     void resizeEvent( QResizeEvent * );
00041     void changeEvent( QEvent * );
00042 
00043   private slots:
00044     void clear();
00045     void toggleClearButton( const QString &text );
00046 
00047   private:
00048     QString mNullValue;
00049     QToolButton *btnClear;
00050 };
00051 
00052 #endif // QGSFILTERLINEEDIT_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines