kalarm

find.h

00001 /*
00002  *  find.h  -  search facility 
00003  *  Program:  kalarm
00004  *  Copyright © 2005,2006 by David Jarvie <software@astrojar.org.uk>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef FIND_H
00022 #define FIND_H
00023 
00024 #include <qobject.h>
00025 #include <qguardedptr.h>
00026 #include <qstringlist.h>
00027 
00028 class QCheckBox;
00029 class KFindDialog;
00030 class KFind;
00031 class KSeparator;
00032 class EventListViewBase;
00033 class EventListViewItemBase;
00034 
00035 
00036 class Find : public QObject
00037 {
00038         Q_OBJECT
00039     public:
00040         explicit Find(EventListViewBase* parent);
00041         ~Find();
00042         void         display();
00043         void         findNext(bool forward)     { findNext(forward, true); }
00044 
00045     signals:
00046         void         active(bool);
00047 
00048     private slots:
00049         void         slotFind();
00050         void         slotKFindDestroyed()       { emit active(false); }
00051 
00052     private:
00053         void         findNext(bool forward, bool sort, bool fromCurrent = false);
00054         EventListViewItemBase* nextItem(EventListViewItemBase*, bool forward) const;
00055 
00056         EventListViewBase* mListView;        // parent list view
00057         QGuardedPtr<KFindDialog> mDialog;
00058         QCheckBox*         mExpired;
00059         QCheckBox*         mLive;
00060         KSeparator*        mActiveExpiredSep;
00061         QCheckBox*         mMessageType;
00062         QCheckBox*         mFileType;
00063         QCheckBox*         mCommandType;
00064         QCheckBox*         mEmailType;
00065         KFind*             mFind;
00066         QStringList        mHistory;         // list of history items for Find dialog
00067         QString            mStartID;         // ID of first alarm searched if 'from cursor' was selected
00068         long               mOptions;         // OR of find dialog options
00069         bool               mNoCurrentItem;   // there is no current item for the purposes of searching
00070         bool               mFound;           // true if any matches have been found
00071 };
00072 
00073 #endif // FIND_H
00074 
KDE Home | KDE Accessibility Home | Description of Access Keys