-rw-r--r-- | korganizer/searchdialog.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h new file mode 100644 index 0000000..a03c586 --- a/dev/null +++ b/korganizer/searchdialog.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /* | ||
2 | This file is part of KOrganizer. | ||
3 | Copyright (c) 1998 Preston Brown | ||
4 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | ||
5 | |||
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. | ||
10 | |||
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. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | |||
20 | As a special exception, permission is given to link this program | ||
21 | with any edition of Qt, and distribute the resulting executable, | ||
22 | without including the source code for Qt in the source distribution. | ||
23 | */ | ||
24 | #ifndef SEARCHDIALOG_H | ||
25 | #define SEARCHDIALOG_H | ||
26 | |||
27 | #include <qregexp.h> | ||
28 | |||
29 | #include <kdialogbase.h> | ||
30 | |||
31 | #include <libkcal/calendar.h> | ||
32 | |||
33 | #include "kolistview.h" | ||
34 | |||
35 | class KDateEdit; | ||
36 | class QCheckBox; | ||
37 | class QLineEdit; | ||
38 | class QLabel; | ||
39 | class CalendarView; | ||
40 | |||
41 | using namespace KCal; | ||
42 | |||
43 | class SearchDialog : public KDialogBase | ||
44 | { | ||
45 | Q_OBJECT | ||
46 | public: | ||
47 | SearchDialog(Calendar *calendar,CalendarView *parent=0); | ||
48 | virtual ~SearchDialog(); | ||
49 | KOListView *listview(){ return listView;} | ||
50 | void updateView(); | ||
51 | |||
52 | public slots: | ||
53 | void changeEventDisplay(Event *, int) { updateView(); } | ||
54 | void updateConfig(); | ||
55 | void updateList(); | ||
56 | protected slots: | ||
57 | void accept(); | ||
58 | void doSearch(); | ||
59 | void searchTextChanged( const QString &_text ); | ||
60 | |||
61 | signals: | ||
62 | void showEventSignal(Event *); | ||
63 | void editEventSignal(Event *); | ||
64 | void deleteEventSignal(Event *); | ||
65 | |||
66 | private: | ||
67 | void search(const QRegExp &); | ||
68 | |||
69 | Calendar *mCalendar; | ||
70 | |||
71 | QPtrList<Event> mMatchedEvents; | ||
72 | QPtrList<Todo> mMatchedTodos; | ||
73 | QPtrList<Journal> mMatchedJournals; | ||
74 | |||
75 | QLabel *searchLabel; | ||
76 | QLineEdit *searchEdit; | ||
77 | KOListView *listView; | ||
78 | |||
79 | KDateEdit *mStartDate; | ||
80 | KDateEdit *mEndDate; | ||
81 | // QCheckBox *mInclusiveCheck; | ||
82 | QCheckBox *mSummaryCheck; | ||
83 | QCheckBox *mDescriptionCheck; | ||
84 | QCheckBox *mCategoryCheck; | ||
85 | QCheckBox *mSearchEvent; | ||
86 | QCheckBox *mSearchTodo; | ||
87 | QCheckBox *mSearchJournal; | ||
88 | QCheckBox *mSearchAName; | ||
89 | QCheckBox *mSearchAEmail; | ||
90 | void keyPressEvent ( QKeyEvent *e) ; | ||
91 | }; | ||
92 | |||
93 | #endif | ||