Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

YQPkgSearchFilterView.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YQPkgSearchFilterView.h
00014 
00015   Author:     Stefan Hundhammer <sh@suse.de>
00016 
00017 /-*/
00018 
00019 // -*- c++ -*-
00020 
00021 
00022 #ifndef YQPkgSearchFilterView_h
00023 #define YQPkgSearchFilterView_h
00024 
00025 #include <qvbox.h>
00026 #include <qregexp.h>
00027 #include <y2pm/PMPackage.h>
00028 
00029 
00030 class QComboBox;
00031 class QCheckBox;
00032 class QPushButton;
00033 class QRadioButton;
00034 
00035 using std::list;
00036 using std::string;
00037 
00038 
00042 class YQPkgSearchFilterView : public QVBox
00043 {
00044     Q_OBJECT
00045 
00046 public:
00047 
00051     YQPkgSearchFilterView( QWidget * parent );
00052 
00056     virtual ~YQPkgSearchFilterView();
00057 
00062     virtual QSize minimumSizeHint() const;
00063 
00064 
00065 public slots:
00066 
00074     void filter();
00075 
00079     void filterIfVisible();
00080 
00084     void setFocus();
00085 
00086 
00087 signals:
00088 
00093     void filterStart();
00094 
00098     void filterMatch( PMPackagePtr pkg );
00099 
00103     void filterFinished();
00104 
00108     void message( const QString & text );
00109 
00110 
00111 protected:
00112 
00116     bool check( PMPackagePtr pkg, const QRegExp & regexp );
00117 
00121     bool check( const string & attribute, const QRegExp & regexp );
00122 
00126     bool check( const list<string> & strList, const QRegExp & regexp );
00127 
00131     bool check( const PMSolvable::PkgRelList_type & relList, const QRegExp & regexp );
00132 
00137     virtual void keyPressEvent( QKeyEvent * event );
00138 
00139 
00140     // Data members
00141 
00142     QComboBox *         _searchText;
00143     QPushButton *       _searchButton;
00144 
00145     QCheckBox *         _searchInName;
00146     QCheckBox *         _searchInSummary;
00147     QCheckBox *         _searchInDescription;
00148     QCheckBox *         _searchInRequires;
00149     QCheckBox *         _searchInProvides;
00150 
00151     QCheckBox *         _caseSensitive;
00152 
00153     QRadioButton *      _contains;
00154     QRadioButton *      _beginsWith;
00155     QRadioButton *      _exactMatch;
00156     QRadioButton *      _useWildcards;
00157     QRadioButton *      _useRegexp;
00158 
00159     int                 _matchCount;
00160 };
00161 
00162 
00163 
00164 #endif // ifndef YQPkgSearchFilterView_h

Generated on Wed Nov 12 06:11:16 2008 for yast2-qt by  doxygen 1.3.9.1