korganizer

searchdialog.h
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5  Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
6  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
7 
8  This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 
22  As a special exception, permission is given to link this program
23  with any edition of TQt, and distribute the resulting executable,
24  without including the source code for TQt in the source distribution.
25 */
26 #ifndef SEARCHDIALOG_H
27 #define SEARCHDIALOG_H
28 
29 #include <tqregexp.h>
30 
31 #include <kdialogbase.h>
32 
33 #include <libkcal/incidence.h>
34 
35 namespace KCal {
36 class Calendar;
37 }
38 class KDateEdit;
39 class TQCheckBox;
40 class TQLineEdit;
41 class TQLabel;
42 class KOListView;
43 
44 using namespace KCal;
45 
46 class SearchDialog : public KDialogBase
47 {
48  TQ_OBJECT
49 
50  public:
51  SearchDialog(Calendar *calendar,TQWidget *parent=0);
52  virtual ~SearchDialog();
53 
54  void updateView();
55 
56  public slots:
57  void changeIncidenceDisplay(Incidence *, int) { updateView(); }
58 
59  protected slots:
60  void doSearch();
61  void searchTextChanged( const TQString &_text );
62 
63  signals:
64  void showIncidenceSignal( Incidence *, const TQDate & );
65  void editIncidenceSignal( Incidence *, const TQDate & );
66  void deleteIncidenceSignal( Incidence * );
67 
68  private:
69  void search(const TQRegExp &);
70 
71  Calendar *mCalendar;
72 
73  Incidence::List mMatchedEvents;
74 
75  TQLabel *searchLabel;
76  TQLineEdit *searchEdit;
77  KOListView *listView;
78 
79  TQCheckBox *mEventsCheck;
80  TQCheckBox *mTodosCheck;
81  TQCheckBox *mJournalsCheck;
82 
83  KDateEdit *mStartDate;
84  KDateEdit *mEndDate;
85 
86  TQCheckBox *mInclusiveCheck;
87  TQCheckBox *mIncludeUndatedTodos;
88 
89  TQCheckBox *mSummaryCheck;
90  TQCheckBox *mDescriptionCheck;
91  TQCheckBox *mCategoryCheck;
92 };
93 
94 #endif
This class provides a multi-column list view of events.
Definition: kolistview.h:69