2 * find.h - search facility
4 * Copyright © 2005-2009 by David Jarvie <djarvie@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #include <QStringList>
27 #include <QModelIndex>
36 class Find
: public QObject
40 explicit Find(EventListView
* parent
);
43 void findNext(bool forward
) { findNext(forward
, false, false); }
50 void slotKFindDestroyed() { emit
active(false); }
51 void slotSelectionChanged();
54 void findNext(bool forward
, bool checkEnd
, bool fromCurrent
);
55 QModelIndex
nextItem(const QModelIndex
&, bool forward
) const;
57 EventListView
* mListView
; // parent list view
58 QPointer
<FindDlg
> mDialog
;
61 KSeparator
* mActiveArchivedSep
;
62 QCheckBox
* mMessageType
;
64 QCheckBox
* mCommandType
;
65 QCheckBox
* mEmailType
;
66 QCheckBox
* mAudioType
;
68 QStringList mHistory
; // list of history items for Find dialog
69 QString mLastPattern
; // pattern used in last search
70 QString mStartID
; // ID of first alarm searched if 'from cursor' was selected
71 long mOptions
; // OR of find dialog options
72 bool mNoCurrentItem
; // there is no current item for the purposes of searching
73 bool mFound
; // true if any matches have been found