kmail
headerlistquicksearch.h
00001 /* -*- mode: C++ -*- 00002 This file is part of KMail, the KDE mail client. 00003 Copyright (c) 2004 Till Adam <adam@kde.org> 00004 00005 KMail 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 KMail is distributed in the hope that it will be useful, but 00011 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 Free Software 00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 In addition, as a special exception, the copyright holders give 00020 permission to link the code of this program with any edition of 00021 the Qt library by Trolltech AS, Norway (or with modified versions 00022 of Qt that use the same license as Qt), and distribute linked 00023 combinations including the two. You must obey the GNU General 00024 Public License in all respects for all of the code used other than 00025 Qt. If you modify this file, you may extend this exception to 00026 your version of the file, but you are not obligated to do so. If 00027 you do not wish to do so, delete this exception statement from 00028 your version. 00029 */ 00030 00031 #ifndef KMAILHEADERLISTQUICKSEARCH_H 00032 #define KMAILHEADERLISTQUICKSEARCH_H 00033 00034 #include "kmmsgbase.h" // for KMMsgStatus 00035 #include "kmsearchpattern.h" 00036 #include <klistviewsearchline.h> 00037 #include <qvaluevector.h> 00038 class QComboBox; 00039 class QLabel; 00040 class KListView; 00041 class KActionCollection; 00042 00043 namespace KMail { 00044 00045 class HeaderListQuickSearch : public KListViewSearchLine 00046 { 00047 Q_OBJECT 00048 public: 00049 HeaderListQuickSearch( QWidget *parent, 00050 KListView *listView, 00051 KActionCollection *actionCollection, 00052 const char *name = 0 ); 00053 virtual ~HeaderListQuickSearch(); 00054 00059 bool eventFilter( QObject *watched, QEvent *event ); 00060 00061 public slots: 00062 void reset(); 00063 00064 protected: 00069 virtual bool itemMatches(const QListViewItem *item, const QString &s) const; 00070 00071 private slots: 00076 void slotStatusChanged( int index ); 00077 00078 private: 00080 void insertStatus(KMail::StatusValueTypes which); 00081 QComboBox *mStatusCombo; 00082 KMMsgStatus mStatus; 00083 QValueVector<QString> statusList; 00084 }; 00085 00086 } 00087 00088 #endif