summaryrefslogtreecommitdiffabout
path: root/korganizer/searchdialog.cpp
Unidiff
Diffstat (limited to 'korganizer/searchdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 74d48b9..5bd7c6f 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -1,91 +1,90 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 1998 Preston Brown 3 Copyright (c) 1998 Preston Brown
4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 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 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 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 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 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. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27#include <qgroupbox.h> 27#include <qgroupbox.h>
28#include <qlabel.h> 28#include <qlabel.h>
29#include <qlineedit.h> 29#include <qlineedit.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31 31
32#include <klocale.h> 32#include <klocale.h>
33#include <kmessagebox.h> 33#include <kmessagebox.h>
34 34
35#include <libkdepim/kdateedit.h> 35#include <libkdepim/kdateedit.h>
36 36
37#include "koglobals.h" 37#include "koglobals.h"
38#include "koprefs.h" 38#include "koprefs.h"
39 39
40#include "calendarview.h" 40#include "calendarview.h"
41#include "koviewmanager.h" 41#include "koviewmanager.h"
42#include "searchdialog.h" 42#include "searchdialog.h"
43#include "searchdialog.moc"
44 43
45SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 44SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
46 : KDialogBase(Plain,i18n("KO/Pi Find "),User1|Close,User1,parent,0,false,false, 45 : KDialogBase(Plain,i18n("KO/Pi Find "),User1|Close,User1,parent,0,false,false,
47 i18n("&Find")) 46 i18n("&Find"))
48{ 47{
49 mCalendar = calendar; 48 mCalendar = calendar;
50 QFrame *topFrame = plainPage(); 49 QFrame *topFrame = plainPage();
51 QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint()); 50 QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint());
52 51
53 // Search expression 52 // Search expression
54 QHBoxLayout *subLayout = new QHBoxLayout(); 53 QHBoxLayout *subLayout = new QHBoxLayout();
55 layout->addLayout(subLayout); 54 layout->addLayout(subLayout);
56 55
57 searchLabel = new QLabel(topFrame); 56 searchLabel = new QLabel(topFrame);
58 searchLabel->setText(i18n("Search for:")); 57 searchLabel->setText(i18n("Search for:"));
59 subLayout->addWidget(searchLabel); 58 subLayout->addWidget(searchLabel);
60 59
61 searchEdit = new QLineEdit(topFrame); 60 searchEdit = new QLineEdit(topFrame);
62 subLayout->addWidget(searchEdit); 61 subLayout->addWidget(searchEdit);
63 searchEdit->setText("*"); // Find all events by default 62 searchEdit->setText("*"); // Find all events by default
64 searchEdit->setFocus(); 63 searchEdit->setFocus();
65 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); 64 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
66 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); 65 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
67 // Subjects to search 66 // Subjects to search
68 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 67 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
69 // topFrame); 68 // topFrame);
70 69
71 70
72 71
73 QHBox *incidenceGroup = new QHBox( topFrame ); 72 QHBox *incidenceGroup = new QHBox( topFrame );
74 layout->addWidget(incidenceGroup); 73 layout->addWidget(incidenceGroup);
75 74
76 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 75 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
77 mSearchEvent->setChecked(true); 76 mSearchEvent->setChecked(true);
78 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 77 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
79 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 78 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
80 79
81 QHBox *subjectGroup = new QHBox( topFrame ); 80 QHBox *subjectGroup = new QHBox( topFrame );
82 layout->addWidget(subjectGroup); 81 layout->addWidget(subjectGroup);
83 82
84 mSummaryCheck = new QCheckBox(i18n("Summaries"),subjectGroup); 83 mSummaryCheck = new QCheckBox(i18n("Summaries"),subjectGroup);
85 mSummaryCheck->setChecked(true); 84 mSummaryCheck->setChecked(true);
86 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); 85 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup);
87 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 86 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
88 87
89 QHBox *attendeeGroup = new QHBox( topFrame ); 88 QHBox *attendeeGroup = new QHBox( topFrame );
90 layout->addWidget(attendeeGroup ); 89 layout->addWidget(attendeeGroup );
91 new QLabel( i18n("Attendee:"),attendeeGroup ); 90 new QLabel( i18n("Attendee:"),attendeeGroup );