summaryrefslogtreecommitdiffabout
path: root/korganizer/searchdialog.cpp
authorzautrix <zautrix>2005-06-08 12:35:38 (UTC)
committer zautrix <zautrix>2005-06-08 12:35:38 (UTC)
commitd9e240cf1a88f4213c9169e9168d01b669613312 (patch) (unidiff)
treeed22cb872cc0f38625afe0f01036a48eb9b3edfa /korganizer/searchdialog.cpp
parent2448916479b456ca7c880427a80e8e32e95b2fba (diff)
downloadkdepimpi-d9e240cf1a88f4213c9169e9168d01b669613312.zip
kdepimpi-d9e240cf1a88f4213c9169e9168d01b669613312.tar.gz
kdepimpi-d9e240cf1a88f4213c9169e9168d01b669613312.tar.bz2
better export
Diffstat (limited to 'korganizer/searchdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/searchdialog.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 59bf1a2..ef2fc1c 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -55,16 +55,21 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
55 // Search expression 55 // Search expression
56 QHBoxLayout *subLayout = new QHBoxLayout(); 56 QHBoxLayout *subLayout = new QHBoxLayout();
57 layout->addLayout(subLayout); 57 layout->addLayout(subLayout);
58 /*
58 searchLabel = new QLabel(topFrame); 59 searchLabel = new QLabel(topFrame);
59 searchLabel->setText(i18n("Search for:")); 60 searchLabel->setText(i18n("Search for:"));
60 subLayout->addWidget(searchLabel); 61 subLayout->addWidget(searchLabel);
61 62 */
62 searchEdit = new KLineEdit(topFrame); 63 QPushButton *OkButton = new QPushButton( i18n("Search for:"), topFrame );
63 subLayout->addWidget(searchEdit);
64 QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame );
65 //OkButton->setDefault( true ); 64 //OkButton->setDefault( true );
66 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch())); 65 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
67 subLayout->addWidget(OkButton); 66 subLayout->addWidget(OkButton);
67 searchEdit = new KLineEdit(topFrame);
68 subLayout->addWidget(searchEdit);
69
70 mAddItems = new QCheckBox(i18n("Add items"),topFrame);
71 subLayout->addWidget(mAddItems);
72
68 searchEdit->setText("*"); // Find all events by default 73 searchEdit->setText("*"); // Find all events by default
69 searchEdit->setFocus(); 74 searchEdit->setFocus();
70 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); 75 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
@@ -272,8 +277,8 @@ void SearchDialog::search(const QRegExp &re)
272 QPtrList<Event> events = mCalendar->events( mStartDate->date(), 277 QPtrList<Event> events = mCalendar->events( mStartDate->date(),
273 mEndDate->date(), 278 mEndDate->date(),
274 false /*mInclusiveCheck->isChecked()*/ ); 279 false /*mInclusiveCheck->isChecked()*/ );
275 280 if ( !mAddItems->isChecked() )
276 mMatchedEvents.clear(); 281 mMatchedEvents.clear();
277 if ( mSearchEvent->isChecked() ) { 282 if ( mSearchEvent->isChecked() ) {
278 Event *ev; 283 Event *ev;
279 for(ev=events.first();ev;ev=events.next()) { 284 for(ev=events.first();ev;ev=events.next()) {
@@ -349,8 +354,9 @@ void SearchDialog::search(const QRegExp &re)
349 } 354 }
350 } 355 }
351 } 356 }
352 QPtrList<Todo> todos = mCalendar->todos( ); 357 QPtrList<Todo> todos = mCalendar->todos( );
353 mMatchedTodos.clear(); 358 if ( !mAddItems->isChecked() )
359 mMatchedTodos.clear();
354 if ( mSearchTodo->isChecked() ) { 360 if ( mSearchTodo->isChecked() ) {
355 Todo *tod; 361 Todo *tod;
356 for(tod=todos.first();tod;tod=todos.next()) { 362 for(tod=todos.first();tod;tod=todos.next()) {
@@ -417,7 +423,8 @@ void SearchDialog::search(const QRegExp &re)
417 } 423 }
418 } 424 }
419 } 425 }
420 mMatchedJournals.clear(); 426 if ( !mAddItems->isChecked() )
427 mMatchedJournals.clear();
421 if (mSearchJournal->isChecked() ) { 428 if (mSearchJournal->isChecked() ) {
422 QPtrList<Journal> journals = mCalendar->journals( ); 429 QPtrList<Journal> journals = mCalendar->journals( );
423 Journal* journ; 430 Journal* journ;