korganizer

searchdialog.h

00001 /*
00002     This file is part of KOrganizer.
00003 
00004     Copyright (c) 1998 Preston Brown <pbrown@kde.org>
00005     Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
00006     Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021 
00022     As a special exception, permission is given to link this program
00023     with any edition of Qt, and distribute the resulting executable,
00024     without including the source code for Qt in the source distribution.
00025 */
00026 #ifndef SEARCHDIALOG_H
00027 #define SEARCHDIALOG_H
00028 
00029 #include <qregexp.h>
00030 
00031 #include <kdialogbase.h>
00032 
00033 #include <libkcal/incidence.h>
00034 
00035 namespace KCal {
00036 class Calendar;
00037 }
00038 class KDateEdit;
00039 class QCheckBox;
00040 class QLineEdit;
00041 class QLabel;
00042 class KOListView;
00043 
00044 using namespace KCal;
00045 
00046 class SearchDialog : public KDialogBase
00047 {
00048     Q_OBJECT
00049   public:
00050     SearchDialog(Calendar *calendar,QWidget *parent=0);
00051     virtual ~SearchDialog();
00052 
00053     void updateView();
00054 
00055   public slots:
00056     void changeIncidenceDisplay(Incidence *, int) { updateView(); }
00057 
00058   protected slots:
00059     void doSearch();
00060     void searchTextChanged( const QString &_text );
00061 
00062   signals:
00063     void showIncidenceSignal(Incidence *);
00064     void editIncidenceSignal(Incidence *);
00065     void deleteIncidenceSignal(Incidence *);
00066 
00067   private:
00068     void search(const QRegExp &);
00069 
00070     Calendar *mCalendar;
00071 
00072     Incidence::List mMatchedEvents;
00073 
00074     QLabel *searchLabel;
00075     QLineEdit *searchEdit;
00076     KOListView *listView;
00077 
00078     QCheckBox *mEventsCheck;
00079     QCheckBox *mTodosCheck;
00080     QCheckBox *mJournalsCheck;
00081 
00082     KDateEdit *mStartDate;
00083     KDateEdit *mEndDate;
00084 
00085     QCheckBox *mInclusiveCheck;
00086     QCheckBox *mIncludeUndatedTodos;
00087 
00088     QCheckBox *mSummaryCheck;
00089     QCheckBox *mDescriptionCheck;
00090     QCheckBox *mCategoryCheck;
00091 };
00092 
00093 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys