summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-02 19:46:27 (UTC)
committer zautrix <zautrix>2005-07-02 19:46:27 (UTC)
commitc69004813dce7402f56e7f90e172c8fb56e9cc55 (patch) (unidiff)
tree4de04efa28ebeefc6b53588c35fa5d2c1ab85e7f /korganizer
parent1de3670209f954b71e679c6b3a83a1334b43f895 (diff)
downloadkdepimpi-c69004813dce7402f56e7f90e172c8fb56e9cc55.zip
kdepimpi-c69004813dce7402f56e7f90e172c8fb56e9cc55.tar.gz
kdepimpi-c69004813dce7402f56e7f90e172c8fb56e9cc55.tar.bz2
c f
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index efe8774..2e32ac2 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -1,123 +1,124 @@
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 <qapplication.h>
28#include <qlabel.h> 29#include <qlabel.h>
29#include <qlistview.h> 30#include <qlistview.h>
30#include <qwhatsthis.h> 31#include <qwhatsthis.h>
31#include <qlineedit.h> 32#include <qlineedit.h>
32#include <qpushbutton.h> 33#include <qpushbutton.h>
33#include <qhbuttongroup.h> 34#include <qhbuttongroup.h>
34#include <klocale.h> 35#include <klocale.h>
35#include <kmessagebox.h> 36#include <kmessagebox.h>
36 37
37#include <libkdepim/kdateedit.h> 38#include <libkdepim/kdateedit.h>
38 39
39#include "koglobals.h" 40#include "koglobals.h"
40#include "koprefs.h" 41#include "koprefs.h"
41#include "klineedit.h" 42#include "klineedit.h"
42 43
43#include "calendarview.h" 44#include "calendarview.h"
44#include "koviewmanager.h" 45#include "koviewmanager.h"
45#include "searchdialog.h" 46#include "searchdialog.h"
46 47
47SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 48SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
48 : QVBox( 0 ) 49 : QVBox( 0 )
49 50
50{ 51{
51 mCalendar = calendar; 52 mCalendar = calendar;
52 QFrame *topFrame = new QFrame( this ) ;//plainPage(); 53 QFrame *topFrame = new QFrame( this ) ;//plainPage();
53 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); 54 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
54 55
55 // Search expression 56 // Search expression
56 QHBoxLayout *subLayout = new QHBoxLayout(); 57 QHBoxLayout *subLayout = new QHBoxLayout();
57 layout->addLayout(subLayout); 58 layout->addLayout(subLayout);
58 /* 59 /*
59 searchLabel = new QLabel(topFrame); 60 searchLabel = new QLabel(topFrame);
60 searchLabel->setText(i18n("Search for:")); 61 searchLabel->setText(i18n("Search for:"));
61 subLayout->addWidget(searchLabel); 62 subLayout->addWidget(searchLabel);
62 */ 63 */
63 QPushButton *OkButton = new QPushButton( i18n("Search for:"), topFrame ); 64 QPushButton *OkButton = new QPushButton( i18n("Search for:"), topFrame );
64 //OkButton->setDefault( true ); 65 //OkButton->setDefault( true );
65 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); 66 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
66 subLayout->addWidget(OkButton); 67 subLayout->addWidget(OkButton);
67 searchEdit = new KLineEdit(topFrame); 68 searchEdit = new KLineEdit(topFrame);
68 subLayout->addWidget(searchEdit); 69 subLayout->addWidget(searchEdit);
69 70
70 mAddItems = new QRadioButton( "+ ", topFrame ); 71 mAddItems = new QRadioButton( "+ ", topFrame );
71 mSubItems = new QRadioButton( "- ", topFrame ); 72 mSubItems = new QRadioButton( "- ", topFrame );
72 mRefineItems = new QRadioButton( "< ", topFrame ); 73 mRefineItems = new QRadioButton( "< ", topFrame );
73 subLayout->addWidget( mAddItems ); 74 subLayout->addWidget( mAddItems );
74 subLayout->addWidget( mSubItems ); 75 subLayout->addWidget( mSubItems );
75 subLayout->addWidget( mRefineItems ); 76 subLayout->addWidget( mRefineItems );
76 QFont fo ( mAddItems->font() ); 77 QFont fo ( mAddItems->font() );
77 fo.setBold( true ); 78 fo.setBold( true );
78 fo.setPointSize( fo.pointSize() + 2 ); 79 fo.setPointSize( fo.pointSize() + 2 );
79 mAddItems->setFont( fo ); 80 mAddItems->setFont( fo );
80 mSubItems->setFont( fo ); 81 mSubItems->setFont( fo );
81 mRefineItems->setFont( fo ); 82 mRefineItems->setFont( fo );
82 connect( mAddItems , SIGNAL( toggled ( bool ) ),this,SLOT(slot_add( bool ))); 83 connect( mAddItems , SIGNAL( toggled ( bool ) ),this,SLOT(slot_add( bool )));
83 connect( mSubItems , SIGNAL( toggled ( bool ) ),this,SLOT(slot_sub( bool ))); 84 connect( mSubItems , SIGNAL( toggled ( bool ) ),this,SLOT(slot_sub( bool )));
84 connect( mRefineItems , SIGNAL( toggled ( bool ) ),this,SLOT(slot_refine( bool ))); 85 connect( mRefineItems , SIGNAL( toggled ( bool ) ),this,SLOT(slot_refine( bool )));
85 86
86 QPushButton *togButton = new QPushButton( "", topFrame ); 87 QPushButton *togButton = new QPushButton( "", topFrame );
87 subLayout->addWidget(togButton); 88 subLayout->addWidget(togButton);
88 connect(togButton,SIGNAL(clicked()),SLOT(toggleCheckboxes())); 89 connect(togButton,SIGNAL(clicked()),SLOT(toggleCheckboxes()));
89 togButton->setPixmap(SmallIcon("1updownarrow")); 90 togButton->setPixmap(SmallIcon("1updownarrow"));
90 togButton->setMinimumWidth( togButton->sizeHint().height() ); 91 togButton->setMinimumWidth( togButton->sizeHint().height() );
91 92
92 searchEdit->setText("*"); // Find all events by default 93 searchEdit->setText("*"); // Find all events by default
93 searchEdit->setFocus(); 94 searchEdit->setFocus();
94 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); 95 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
95 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); 96 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
96 // Subjects to search 97 // Subjects to search
97 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 98 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
98 // topFrame); 99 // topFrame);
99 100
100 incidenceGroup = new QHBox( topFrame ); 101 incidenceGroup = new QHBox( topFrame );
101 layout->addWidget(incidenceGroup); 102 layout->addWidget(incidenceGroup);
102 103
103 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 104 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
104 //mSearchEvent->setChecked(true); 105 //mSearchEvent->setChecked(true);
105 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 106 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
106 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 107 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
107 108
108 subjectGroup = new QHBox( topFrame ); 109 subjectGroup = new QHBox( topFrame );
109 layout->addWidget(subjectGroup); 110 layout->addWidget(subjectGroup);
110 111
111 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); 112 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
112 mSummaryCheck->setChecked(true); 113 mSummaryCheck->setChecked(true);
113 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); 114 mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup);
114 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 115 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
115 116
116 attendeeGroup = new QHBox( topFrame ); 117 attendeeGroup = new QHBox( topFrame );
117 layout->addWidget(attendeeGroup ); 118 layout->addWidget(attendeeGroup );
118 new QLabel( i18n("Attendee:"),attendeeGroup ); 119 new QLabel( i18n("Attendee:"),attendeeGroup );
119 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 120 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
120 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); 121 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup );
121 // Date range 122 // Date range
122 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), 123 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
123 // topFrame); 124 // topFrame);