summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt10
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--bin/kdepim/korganizer/icons16/workweek2.pngbin579 -> 609 bytes
-rw-r--r--bin/kdepim/korganizer/workweek2.pngbin907 -> 929 bytes
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/mainwindow.cpp26
-rw-r--r--korganizer/searchdialog.cpp72
-rw-r--r--korganizer/searchdialog.h7
9 files changed, 69 insertions, 50 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 7c81b3a..d3a8bc1 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,18 +1,28 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.10 ************
4
5KO/Pi:
6In the desktop versions the context menu in the search dialog was broken after introducing the What'sThis info for the list view.
7This is fixed.
8Changed the search dialog a bit to make it more user friendly.
9(E.g.: Removed message box about "no items found" and set key focus to search line edit after search).
10
11Added config option to hide the week number in KO/Pi toolbar.
12
3********** VERSION 2.0.9 ************ 13********** VERSION 2.0.9 ************
4 14
5Made month view icons for multiday events a bit nicer. 15Made month view icons for multiday events a bit nicer.
6Some minor fixes in KO/Pi 16Some minor fixes in KO/Pi
7(e.g. go to today did not work for new week view properly). 17(e.g. go to today did not work for new week view properly).
8 18
9 19
10********** VERSION 2.0.8 ************ 20********** VERSION 2.0.8 ************
11 21
12Fixed a problem in dependency info in the ipk files for the Zaurus. 22Fixed a problem in dependency info in the ipk files for the Zaurus.
13 23
14Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar. 24Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar.
15 25
16Added a "go today" button to the datepicker. 26Added a "go today" button to the datepicker.
17 27
18Added "created" and "last modified" to event/todo viewer (and What'sThis viewer) 28Added "created" and "last modified" to event/todo viewer (and What'sThis viewer)
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 1073fe7..b526df9 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1279,28 +1279,28 @@
1279{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" }, 1279{ "Show in todo/event viewer:","Zeige in Termin/Todo Anzeige:" },
1280{ "Details","Details" }, 1280{ "Details","Details" },
1281{ "Created time","Erstellt Zeit" }, 1281{ "Created time","Erstellt Zeit" },
1282{ "Last modified time","Geändert Zeit" }, 1282{ "Last modified time","Geändert Zeit" },
1283{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" }, 1283{ "Show in What'sThis quick overview:","Zeige in What'sThis Schnellübersicht:" },
1284{ "View Options","Anzeige Optionen" }, 1284{ "View Options","Anzeige Optionen" },
1285{ "<b>Created: ","<b>Erstellt am: " }, 1285{ "<b>Created: ","<b>Erstellt am: " },
1286{ "<b>Last modified: ","<b>Zuletzt geändert am: " }, 1286{ "<b>Last modified: ","<b>Zuletzt geändert am: " },
1287{ "Journal: ","Journal: " }, 1287{ "Journal: ","Journal: " },
1288{ "yearly","jährlich" }, 1288{ "yearly","jährlich" },
1289{ "(%1) ","%1-" }, 1289{ "(%1) ","%1-" },
1290{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" }, 1290{ "<p><b>K</b>: Week view in Month view syle</p>\n","<p><b>K</b>: Wochenansicht in Art der Monatsansicht</p>\n" },
1291{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" }, 1291{ "Enable tooltips displaying summary of ev.","Titel-Tooltips anzeigen" },
1292{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" }, 1292{ "Enable scrollbars in month view cells","Scrollbar in Zellen anzeigen" },
1293{ "Summary/Loc.","Titel/Ort" }, 1293{ "Summary/Loc.","Titel/Ort" },
1294{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." }, 1294{ "No items found. Use '*' and '?' where needed.","Nichts gefunden. Benutze '*' and '?' wo benötigt." },
1295{ "","" }, 1295{ "Week Number","Wochennummer" },
1296{ "","" }, 1296{ "","" },
1297{ "","" }, 1297{ "","" },
1298{ "","" }, 1298{ "","" },
1299{ "","" }, 1299{ "","" },
1300{ "","" }, 1300{ "","" },
1301{ "","" }, 1301{ "","" },
1302{ "","" }, 1302{ "","" },
1303{ "","" }, 1303{ "","" },
1304{ "","" }, 1304{ "","" },
1305{ "","" }, 1305{ "","" },
1306 1306
diff --git a/bin/kdepim/korganizer/icons16/workweek2.png b/bin/kdepim/korganizer/icons16/workweek2.png
index e0e1fde..d3033d4 100644
--- a/bin/kdepim/korganizer/icons16/workweek2.png
+++ b/bin/kdepim/korganizer/icons16/workweek2.png
Binary files differ
diff --git a/bin/kdepim/korganizer/workweek2.png b/bin/kdepim/korganizer/workweek2.png
index 76cb86c..9538d53 100644
--- a/bin/kdepim/korganizer/workweek2.png
+++ b/bin/kdepim/korganizer/workweek2.png
Binary files differ
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index a91074f..7e3deff 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -72,32 +72,33 @@ KOPrefs::KOPrefs() :
72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
74 addItemBool("ShowIconSearch",&mShowIconSearch,true); 74 addItemBool("ShowIconSearch",&mShowIconSearch,true);
75 addItemBool("ShowIconList",&mShowIconList,true); 75 addItemBool("ShowIconList",&mShowIconList,true);
76 addItemBool("ShowIconDay1",&mShowIconDay1,true); 76 addItemBool("ShowIconDay1",&mShowIconDay1,true);
77 addItemBool("ShowIconDay5",&mShowIconDay5,true); 77 addItemBool("ShowIconDay5",&mShowIconDay5,true);
78 addItemBool("ShowIconDay6",&mShowIconDay6,true); 78 addItemBool("ShowIconDay6",&mShowIconDay6,true);
79 addItemBool("ShowIconDay7",&mShowIconDay7,true); 79 addItemBool("ShowIconDay7",&mShowIconDay7,true);
80 addItemBool("ShowIconMonth",&mShowIconMonth,true); 80 addItemBool("ShowIconMonth",&mShowIconMonth,true);
81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
83 addItemBool("ShowIconBack",&mShowIconBack,true); 83 addItemBool("ShowIconBack",&mShowIconBack,true);
84 addItemBool("ShowIconToday",&mShowIconToday,true); 84 addItemBool("ShowIconToday",&mShowIconToday,true);
85 addItemBool("ShowIconForward",&mShowIconForward,true); 85 addItemBool("ShowIconForward",&mShowIconForward,true);
86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
88 addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true);
88 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 89 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
89 addItemBool("ShowIconNext",&mShowIconNext,true); 90 addItemBool("ShowIconNext",&mShowIconNext,true);
90 addItemBool("ShowIconJournal",&mShowIconJournal,true); 91 addItemBool("ShowIconJournal",&mShowIconJournal,true);
91 addItemBool("ShowIconStretch",&mShowIconStretch,true); 92 addItemBool("ShowIconStretch",&mShowIconStretch,true);
92 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 93 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
93 94
94 addItemBool("AskForQuit",&mAskForQuit,false); 95 addItemBool("AskForQuit",&mAskForQuit,false);
95 96
96#ifndef DESKTOP_VERSION 97#ifndef DESKTOP_VERSION
97 addItemBool("ShowFullMenu",&mShowFullMenu,false); 98 addItemBool("ShowFullMenu",&mShowFullMenu,false);
98#else 99#else
99 addItemBool("ShowFullMenu",&mShowFullMenu,true); 100 addItemBool("ShowFullMenu",&mShowFullMenu,true);
100#endif 101#endif
101 addItemBool("ToolBarHor",&mToolBarHor, true ); 102 addItemBool("ToolBarHor",&mToolBarHor, true );
102 addItemBool("ToolBarUp",&mToolBarUp, false ); 103 addItemBool("ToolBarUp",&mToolBarUp, false );
103 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 104 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index e4e3dd7..09a0dce 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -168,32 +168,33 @@ class KOPrefs : public KPimPrefs
168 bool mShowIconNewTodo; 168 bool mShowIconNewTodo;
169 bool mShowIconNewEvent; 169 bool mShowIconNewEvent;
170 bool mShowIconSearch; 170 bool mShowIconSearch;
171 bool mShowIconList; 171 bool mShowIconList;
172 bool mShowIconDay1; 172 bool mShowIconDay1;
173 bool mShowIconDay5; 173 bool mShowIconDay5;
174 bool mShowIconDay6; 174 bool mShowIconDay6;
175 bool mShowIconDay7; 175 bool mShowIconDay7;
176 bool mShowIconMonth; 176 bool mShowIconMonth;
177 bool mShowIconTodoview; 177 bool mShowIconTodoview;
178 bool mShowIconBackFast; 178 bool mShowIconBackFast;
179 bool mShowIconBack; 179 bool mShowIconBack;
180 bool mShowIconToday; 180 bool mShowIconToday;
181 bool mShowIconForward; 181 bool mShowIconForward;
182 bool mShowIconForwardFast; 182 bool mShowIconForwardFast;
183 bool mShowIconWhatsThis; 183 bool mShowIconWhatsThis;
184 bool mShowIconWeekNum;
184 bool mShowIconNextDays; 185 bool mShowIconNextDays;
185 bool mShowIconNext; 186 bool mShowIconNext;
186 bool mShowIconJournal; 187 bool mShowIconJournal;
187 188
188 bool mShowIconStretch; 189 bool mShowIconStretch;
189 190
190 bool mToolBarHor; 191 bool mToolBarHor;
191 bool mToolBarUp; 192 bool mToolBarUp;
192 bool mToolBarMiniIcons; 193 bool mToolBarMiniIcons;
193 194
194 bool mAskForQuit; 195 bool mAskForQuit;
195 bool mUsePassWd; 196 bool mUsePassWd;
196 bool mShowSyncEvents; 197 bool mShowSyncEvents;
197 bool mShowTodoInAgenda; 198 bool mShowTodoInAgenda;
198 bool mShowTimeInAgenda; 199 bool mShowTimeInAgenda;
199 bool mHideNonStartedTodos; 200 bool mHideNonStartedTodos;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index a164fa4..4f2cccf 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -558,33 +558,34 @@ void MainWindow::initActions()
558 int pixWid = 22, pixHei = 22; 558 int pixWid = 22, pixHei = 22;
559 QString pathString = ""; 559 QString pathString = "";
560 if ( !p->mToolBarMiniIcons ) { 560 if ( !p->mToolBarMiniIcons ) {
561 if ( QApplication::desktop()->width() < 480 ) { 561 if ( QApplication::desktop()->width() < 480 ) {
562 pathString += "icons16/"; 562 pathString += "icons16/";
563 pixWid = 18; pixHei = 16; 563 pixWid = 18; pixHei = 16;
564 } 564 }
565 } else { 565 } else {
566 pathString += "iconsmini/"; 566 pathString += "iconsmini/";
567 pixWid = 18; pixHei = 16; 567 pixWid = 18; pixHei = 16;
568 } 568 }
569 mWeekBgColor = iconToolBar->backgroundColor(); 569 mWeekBgColor = iconToolBar->backgroundColor();
570 mWeekPixmap.resize( pixWid , pixHei ); 570 mWeekPixmap.resize( pixWid , pixHei );
571 mWeekPixmap.fill( mWeekBgColor ); 571 mWeekPixmap.fill( mWeekBgColor );
572 icon = mWeekPixmap; 572 icon = mWeekPixmap;
573 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); 573 mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this );
574 mWeekAction->addTo( iconToolBar ); 574 if ( p-> mShowIconWeekNum )
575 mWeekAction->addTo( iconToolBar );
575 mWeekFont = font(); 576 mWeekFont = font();
576 577
577 int fontPoint = mWeekFont.pointSize(); 578 int fontPoint = mWeekFont.pointSize();
578 QFontMetrics f( mWeekFont ); 579 QFontMetrics f( mWeekFont );
579 int fontWid = f.width( "30" ); 580 int fontWid = f.width( "30" );
580 while ( fontWid > pixWid ) { 581 while ( fontWid > pixWid ) {
581 --fontPoint; 582 --fontPoint;
582 mWeekFont.setPointSize( fontPoint ); 583 mWeekFont.setPointSize( fontPoint );
583 QFontMetrics f( mWeekFont ); 584 QFontMetrics f( mWeekFont );
584 fontWid = f.width( "30" ); 585 fontWid = f.width( "30" );
585 qDebug("dec-- "); 586 qDebug("dec-- ");
586 } 587 }
587 588
588 connect( mWeekAction, SIGNAL( activated() ), 589 connect( mWeekAction, SIGNAL( activated() ),
589 this, SLOT( weekAction() ) ); 590 this, SLOT( weekAction() ) );
590 591
@@ -610,32 +611,33 @@ void MainWindow::initActions()
610 icon = loadPixmap( pathString + "configure" ); 611 icon = loadPixmap( pathString + "configure" );
611 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); 612 action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
612 action->addTo( actionMenu ); 613 action->addTo( actionMenu );
613 connect( action, SIGNAL( activated() ), 614 connect( action, SIGNAL( activated() ),
614 mView, SLOT( edit_options() ) ); 615 mView, SLOT( edit_options() ) );
615 actionMenu->insertSeparator(); 616 actionMenu->insertSeparator();
616 617
617 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); 618 action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this );
618 action->addTo( actionMenu ); 619 action->addTo( actionMenu );
619 connect( action, SIGNAL( activated() ), 620 connect( action, SIGNAL( activated() ),
620 mView, SLOT( undo_delete() ) ); 621 mView, SLOT( undo_delete() ) );
621 actionMenu->insertSeparator(); 622 actionMenu->insertSeparator();
622 623
623 icon = loadPixmap( pathString + "newevent" ); 624 icon = loadPixmap( pathString + "newevent" );
624 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); 625 configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
625 configureToolBarMenu->insertSeparator(); 626 configureToolBarMenu->insertSeparator();
627 configureToolBarMenu->insertItem(i18n("Week Number"), 400);
626 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); 628 configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
627 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); 629 QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this );
628 ne_action->addTo( actionMenu ); 630 ne_action->addTo( actionMenu );
629 connect( ne_action, SIGNAL( activated() ), 631 connect( ne_action, SIGNAL( activated() ),
630 mView, SLOT( newEvent() ) ); 632 mView, SLOT( newEvent() ) );
631 icon = loadPixmap( pathString + "newtodo" ); 633 icon = loadPixmap( pathString + "newtodo" );
632 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); 634 configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
633 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); 635 QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
634 nt_action->addTo( actionMenu ); 636 nt_action->addTo( actionMenu );
635 connect( nt_action, SIGNAL( activated() ), 637 connect( nt_action, SIGNAL( activated() ),
636 mView, SLOT( newTodo() ) ); 638 mView, SLOT( newTodo() ) );
637 639
638 icon = loadPixmap( pathString + "today" ); 640 icon = loadPixmap( pathString + "today" );
639 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); 641 QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
640 today_action->addTo( viewMenu ); 642 today_action->addTo( viewMenu );
641 connect( today_action, SIGNAL( activated() ), 643 connect( today_action, SIGNAL( activated() ),
@@ -693,47 +695,47 @@ void MainWindow::initActions()
693 connect( day1_action, SIGNAL( activated() ), 695 connect( day1_action, SIGNAL( activated() ),
694 mView->viewManager(), SLOT( showDayView() ) ); 696 mView->viewManager(), SLOT( showDayView() ) );
695 697
696 icon = loadPixmap( pathString + "workweek" ); 698 icon = loadPixmap( pathString + "workweek" );
697 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); 699 configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
698 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); 700 QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
699 day5_action->addTo( viewMenu ); 701 day5_action->addTo( viewMenu );
700 connect( day5_action, SIGNAL( activated() ), 702 connect( day5_action, SIGNAL( activated() ),
701 mView->viewManager(), SLOT( showWorkWeekView() ) ); 703 mView->viewManager(), SLOT( showWorkWeekView() ) );
702 704
703 icon = loadPixmap( pathString + "week" ); 705 icon = loadPixmap( pathString + "week" );
704 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); 706 configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
705 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 707 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
706 day7_action->addTo( viewMenu ); 708 day7_action->addTo( viewMenu );
707 connect( day7_action, SIGNAL( activated() ), 709 connect( day7_action, SIGNAL( activated() ),
708 mView->viewManager(), SLOT( showWeekView() ) ); 710 mView->viewManager(), SLOT( showWeekView() ) );
711
712 icon = loadPixmap( pathString + "workweek2" );
713 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
714 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
715 day6_action->addTo( viewMenu );
716 connect( day6_action, SIGNAL( activated() ),
717 mView->viewManager(), SLOT( showMonthViewWeek() ) );
709 718
710 icon = loadPixmap( pathString + "month" ); 719 icon = loadPixmap( pathString + "month" );
711 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 720 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
712 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 721 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
713 month_action->addTo( viewMenu ); 722 month_action->addTo( viewMenu );
714 connect( month_action, SIGNAL( activated() ), 723 connect( month_action, SIGNAL( activated() ),
715 mView->viewManager(), SLOT( showMonthView() ) ); 724 mView->viewManager(), SLOT( showMonthView() ) );
716 725
717 icon = loadPixmap( pathString + "workweek2" );
718 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
719 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
720 day6_action->addTo( viewMenu );
721 connect( day6_action, SIGNAL( activated() ),
722 mView->viewManager(), SLOT( showMonthViewWeek() ) );
723
724 icon = loadPixmap( pathString + "todo" ); 726 icon = loadPixmap( pathString + "todo" );
725 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 727 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
726 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 728 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
727 todoview_action->addTo( viewMenu ); 729 todoview_action->addTo( viewMenu );
728 connect( todoview_action, SIGNAL( activated() ), 730 connect( todoview_action, SIGNAL( activated() ),
729 mView->viewManager(), SLOT( showTodoView() ) ); 731 mView->viewManager(), SLOT( showTodoView() ) );
730 732
731 icon = loadPixmap( pathString + "journal" ); 733 icon = loadPixmap( pathString + "journal" );
732 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 734 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
733 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 735 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
734 viewjournal_action->addTo( viewMenu ); 736 viewjournal_action->addTo( viewMenu );
735 connect( viewjournal_action, SIGNAL( activated() ), 737 connect( viewjournal_action, SIGNAL( activated() ),
736 mView->viewManager(), SLOT( showJournalView() ) ); 738 mView->viewManager(), SLOT( showJournalView() ) );
737 739
738 icon = loadPixmap( pathString + "xdays" ); 740 icon = loadPixmap( pathString + "xdays" );
739 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); 741 configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
@@ -988,36 +990,36 @@ void MainWindow::initActions()
988 if (p->mShowIconNewTodo ) 990 if (p->mShowIconNewTodo )
989 nt_action->addTo( iconToolBar ); 991 nt_action->addTo( iconToolBar );
990 if (p-> mShowIconSearch) 992 if (p-> mShowIconSearch)
991 search_action->addTo( iconToolBar ); 993 search_action->addTo( iconToolBar );
992 if (p-> mShowIconNext) 994 if (p-> mShowIconNext)
993 whatsnext_action->addTo( iconToolBar ); 995 whatsnext_action->addTo( iconToolBar );
994 if (p-> mShowIconNextDays) 996 if (p-> mShowIconNextDays)
995 xdays_action->addTo( iconToolBar ); 997 xdays_action->addTo( iconToolBar );
996 if (p-> mShowIconList) 998 if (p-> mShowIconList)
997 showlist_action->addTo( iconToolBar ); 999 showlist_action->addTo( iconToolBar );
998 if (p-> mShowIconDay1) 1000 if (p-> mShowIconDay1)
999 day1_action->addTo( iconToolBar ); 1001 day1_action->addTo( iconToolBar );
1000 if (p-> mShowIconDay5) 1002 if (p-> mShowIconDay5)
1001 day5_action->addTo( iconToolBar ); 1003 day5_action->addTo( iconToolBar );
1002 if (p-> mShowIconDay7) 1004 if (p-> mShowIconDay7)
1003 day7_action->addTo( iconToolBar ); 1005 day7_action->addTo( iconToolBar );
1004 if (p-> mShowIconMonth)
1005 month_action->addTo( iconToolBar );
1006 if (p-> mShowIconDay6) 1006 if (p-> mShowIconDay6)
1007 day6_action->addTo( iconToolBar ); 1007 day6_action->addTo( iconToolBar );
1008 if (p-> mShowIconMonth)
1009 month_action->addTo( iconToolBar );
1008 if (p-> mShowIconTodoview) 1010 if (p-> mShowIconTodoview)
1009 todoview_action->addTo( iconToolBar ); 1011 todoview_action->addTo( iconToolBar );
1010 if (p-> mShowIconJournal) 1012 if (p-> mShowIconJournal)
1011 viewjournal_action->addTo( iconToolBar ); 1013 viewjournal_action->addTo( iconToolBar );
1012 icon = loadPixmap( pathString + "2leftarrowB" ); 1014 icon = loadPixmap( pathString + "2leftarrowB" );
1013 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); 1015 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
1014 if (p-> mShowIconBackFast) { 1016 if (p-> mShowIconBackFast) {
1015 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1017 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1016 connect( action, SIGNAL( activated() ), 1018 connect( action, SIGNAL( activated() ),
1017 mView, SLOT( goPreviousMonth() ) ); 1019 mView, SLOT( goPreviousMonth() ) );
1018 action->addTo( iconToolBar ); 1020 action->addTo( iconToolBar );
1019 } 1021 }
1020 icon = loadPixmap( pathString + "1leftarrowB" ); 1022 icon = loadPixmap( pathString + "1leftarrowB" );
1021 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); 1023 configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
1022 if (p-> mShowIconBack) { 1024 if (p-> mShowIconBack) {
1023 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); 1025 action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this );
@@ -1074,33 +1076,34 @@ void MainWindow::initActions()
1074 if (p-> mShowIconBack) 1076 if (p-> mShowIconBack)
1075 configureToolBarMenu->setItemChecked( 210, true ); 1077 configureToolBarMenu->setItemChecked( 210, true );
1076 if (p-> mShowIconToday) 1078 if (p-> mShowIconToday)
1077 configureToolBarMenu->setItemChecked( 130, true ); 1079 configureToolBarMenu->setItemChecked( 130, true );
1078 if (p-> mShowIconForward) 1080 if (p-> mShowIconForward)
1079 configureToolBarMenu->setItemChecked( 220, true ); 1081 configureToolBarMenu->setItemChecked( 220, true );
1080 if (p-> mShowIconForwardFast) 1082 if (p-> mShowIconForwardFast)
1081 configureToolBarMenu->setItemChecked( 230, true ); 1083 configureToolBarMenu->setItemChecked( 230, true );
1082 if (p-> mShowIconNextDays) 1084 if (p-> mShowIconNextDays)
1083 configureToolBarMenu->setItemChecked( 100, true ); 1085 configureToolBarMenu->setItemChecked( 100, true );
1084 if (p-> mShowIconNext) 1086 if (p-> mShowIconNext)
1085 configureToolBarMenu->setItemChecked( 110, true ); 1087 configureToolBarMenu->setItemChecked( 110, true );
1086 if (p-> mShowIconJournal) 1088 if (p-> mShowIconJournal)
1087 configureToolBarMenu->setItemChecked( 90, true ); 1089 configureToolBarMenu->setItemChecked( 90, true );
1088 if (p-> mShowIconWhatsThis) 1090 if (p-> mShowIconWhatsThis)
1089 configureToolBarMenu->setItemChecked( 300, true ); 1091 configureToolBarMenu->setItemChecked( 300, true );
1090 1092 if (p-> mShowIconWeekNum)
1093 configureToolBarMenu->setItemChecked( 400, true );
1091 QLabel* dummy = new QLabel( iconToolBar ); 1094 QLabel* dummy = new QLabel( iconToolBar );
1092 dummy->setBackgroundColor( iconToolBar->backgroundColor() ); 1095 dummy->setBackgroundColor( iconToolBar->backgroundColor() );
1093 if (!p-> mShowIconStretch) 1096 if (!p-> mShowIconStretch)
1094 iconToolBar->setStretchableWidget ( dummy ) ; 1097 iconToolBar->setStretchableWidget ( dummy ) ;
1095 else 1098 else
1096 configureToolBarMenu->setItemChecked( 5, true ); 1099 configureToolBarMenu->setItemChecked( 5, true );
1097 if (p-> mShowIconWhatsThis) 1100 if (p-> mShowIconWhatsThis)
1098 QWhatsThis::whatsThisButton ( iconToolBar ); 1101 QWhatsThis::whatsThisButton ( iconToolBar );
1099 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); 1102 connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
1100 configureAgenda( p->mHourSize ); 1103 configureAgenda( p->mHourSize );
1101 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); 1104 connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) );
1102} 1105}
1103 1106
1104void MainWindow::exportToPhone( int mode ) 1107void MainWindow::exportToPhone( int mode )
1105{ 1108{
1106 1109
@@ -1815,32 +1818,33 @@ void MainWindow::configureToolBar( int item )
1815 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 1818 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
1816 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 1819 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
1817 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 1820 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
1818 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); 1821 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
1819 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 1822 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
1820 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 1823 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
1821 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 1824 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
1822 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 1825 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
1823 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 1826 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
1824 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 1827 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
1825 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 1828 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
1826 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 1829 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
1827 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 1830 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
1828 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 1831 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
1829 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 1832 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
1830 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 1833 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
1834 p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 );
1831 // initActions(); 1835 // initActions();
1832} 1836}
1833 1837
1834void MainWindow::setCaptionToDates() 1838void MainWindow::setCaptionToDates()
1835{ 1839{
1836 QString selDates; 1840 QString selDates;
1837 selDates = KGlobal::locale()->formatDate(mView->startDate(), true); 1841 selDates = KGlobal::locale()->formatDate(mView->startDate(), true);
1838 if (mView->startDate() < mView->endDate() ) 1842 if (mView->startDate() < mView->endDate() )
1839 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); 1843 selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true);
1840 else { 1844 else {
1841 QString addString; 1845 QString addString;
1842 if ( mView->startDate() == QDateTime::currentDateTime().date() ) 1846 if ( mView->startDate() == QDateTime::currentDateTime().date() )
1843 addString = i18n("Today"); 1847 addString = i18n("Today");
1844 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) ) 1848 else if ( mView->startDate() == QDateTime::currentDateTime().date().addDays(1) )
1845 addString = i18n("Tomorrow"); 1849 addString = i18n("Tomorrow");
1846 if ( !addString.isEmpty() ) 1850 if ( !addString.isEmpty() )
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp
index 3fd9740..aa1b244 100644
--- a/korganizer/searchdialog.cpp
+++ b/korganizer/searchdialog.cpp
@@ -13,165 +13,154 @@
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 <qwhatsthis.h>
29#include <qlineedit.h> 30#include <qlineedit.h>
30#include <qpushbutton.h> 31#include <qpushbutton.h>
31 32
32#include <klocale.h> 33#include <klocale.h>
33#include <kmessagebox.h> 34#include <kmessagebox.h>
34 35
35#include <libkdepim/kdateedit.h> 36#include <libkdepim/kdateedit.h>
36 37
37#include "koglobals.h" 38#include "koglobals.h"
38#include "koprefs.h" 39#include "koprefs.h"
39 40
40#include "calendarview.h" 41#include "calendarview.h"
41#include "koviewmanager.h" 42#include "koviewmanager.h"
42#include "searchdialog.h" 43#include "searchdialog.h"
43 44
44SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) 45SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent)
45 : KDialogBase(Plain,i18n("KO/Pi Find "),User1|Close,User1,parent,0,false,false, 46 : QVBox( 0 )
46 i18n("&Find")) 47
47{ 48{
48 mCalendar = calendar; 49 mCalendar = calendar;
49 QFrame *topFrame = plainPage(); 50 QFrame *topFrame = new QFrame( this ) ;//plainPage();
50 QVBoxLayout *layout = new QVBoxLayout(topFrame,0,spacingHint()); 51 QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint());
51 52
52 // Search expression 53 // Search expression
53 QHBoxLayout *subLayout = new QHBoxLayout(); 54 QHBoxLayout *subLayout = new QHBoxLayout();
54 layout->addLayout(subLayout); 55 layout->addLayout(subLayout);
55
56 searchLabel = new QLabel(topFrame); 56 searchLabel = new QLabel(topFrame);
57 searchLabel->setText(i18n("Search for:")); 57 searchLabel->setText(i18n("Search for:"));
58 subLayout->addWidget(searchLabel); 58 subLayout->addWidget(searchLabel);
59 59
60 searchEdit = new QLineEdit(topFrame); 60 searchEdit = new QLineEdit(topFrame);
61 subLayout->addWidget(searchEdit); 61 subLayout->addWidget(searchEdit);
62 QPushButton *OkButton = new QPushButton( i18n("&Find"), topFrame );
63 //OkButton->setDefault( true );
64 connect(OkButton,SIGNAL(clicked()),SLOT(doSearch()));
65 subLayout->addWidget(OkButton);
62 searchEdit->setText("*"); // Find all events by default 66 searchEdit->setText("*"); // Find all events by default
63 searchEdit->setFocus(); 67 searchEdit->setFocus();
64 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & ))); 68 connect(searchEdit, SIGNAL(textChanged ( const QString & )),this,SLOT(searchTextChanged( const QString & )));
65 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch())); 69 connect(searchEdit, SIGNAL( returnPressed () ),this,SLOT(doSearch()));
66 // Subjects to search 70 // Subjects to search
67 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"), 71 // QGroupBox *subjectGroup = new QGroupBox(1,Vertical,i18n("Search In"),
68 // topFrame); 72 // topFrame);
69 73
70
71
72 QHBox *incidenceGroup = new QHBox( topFrame ); 74 QHBox *incidenceGroup = new QHBox( topFrame );
73 layout->addWidget(incidenceGroup); 75 layout->addWidget(incidenceGroup);
74 76
75 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup); 77 mSearchEvent = new QCheckBox(i18n("Events"),incidenceGroup);
76 mSearchEvent->setChecked(true); 78 mSearchEvent->setChecked(true);
77 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup); 79 mSearchTodo = new QCheckBox(i18n("Todos"),incidenceGroup);
78 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); 80 mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup);
79 81
80 QHBox *subjectGroup = new QHBox( topFrame ); 82 QHBox *subjectGroup = new QHBox( topFrame );
81 layout->addWidget(subjectGroup); 83 layout->addWidget(subjectGroup);
82 84
83 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); 85 mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup);
84 mSummaryCheck->setChecked(true); 86 mSummaryCheck->setChecked(true);
85 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup); 87 mDescriptionCheck = new QCheckBox(i18n("Descriptions"),subjectGroup);
86 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); 88 mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup);
87 89
88 QHBox *attendeeGroup = new QHBox( topFrame ); 90 QHBox *attendeeGroup = new QHBox( topFrame );
89 layout->addWidget(attendeeGroup ); 91 layout->addWidget(attendeeGroup );
90 new QLabel( i18n("Attendee:"),attendeeGroup ); 92 new QLabel( i18n("Attendee:"),attendeeGroup );
91 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); 93 mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup );
92 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); 94 mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup );
93 // Date range 95 // Date range
94 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), 96 // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"),
95 // topFrame); 97 // topFrame);
96 // layout->addWidget(rangeGroup); 98 // layout->addWidget(rangeGroup);
97 99
98 QWidget *rangeWidget = new QWidget(topFrame); 100 QWidget *rangeWidget = new QWidget(topFrame);
99 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,spacingHint()); 101 QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint());
100
101 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); 102 rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget));
102 mStartDate = new KDateEdit(rangeWidget); 103 mStartDate = new KDateEdit(rangeWidget);
103 rangeLayout->addWidget(mStartDate); 104 rangeLayout->addWidget(mStartDate);
104 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); 105 rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget));
105 mEndDate = new KDateEdit(rangeWidget); 106 mEndDate = new KDateEdit(rangeWidget);
106 mEndDate->setDate(QDate::currentDate().addDays(365)); 107 mEndDate->setDate(QDate::currentDate().addDays(365));
107 rangeLayout->addWidget(mEndDate); 108 rangeLayout->addWidget(mEndDate);
108 109 QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget );
109 // mInclusiveCheck = new QCheckBox(i18n("Events have to be completely included"), topFrame); 110 rangeLayout->addWidget( (QWidget*)wt );
110 //mInclusiveCheck->setChecked(false);
111 layout->addWidget(rangeWidget); 111 layout->addWidget(rangeWidget);
112 //layout->addWidget(mInclusiveCheck);
113 // Subjects to search
114
115
116 // Results list view 112 // Results list view
117 listView = new KOListView(mCalendar,topFrame); 113 listView = new KOListView(mCalendar,topFrame);
118 //listView->showDates();
119
120
121 layout->addWidget(listView); 114 layout->addWidget(listView);
122 115
123 // if ( KOPrefs::instance()->mCompactDialogs ) {
124 // KOGlobals::fitDialogToScreen( this, true );
125 // }
126
127 listView->readSettings(KOGlobals::config(),"SearchListView Layout"); 116 listView->readSettings(KOGlobals::config(),"SearchListView Layout");
128 connect(this,SIGNAL(user1Clicked()),SLOT(doSearch()));
129 QPushButton *CloseButton = findButton( Close );
130 //connect(CloseButton,SIGNAL(clicked()),listView, SLOT(clear()));
131 117
132#ifndef DESKTOP_VERSION 118 setCaption( i18n("KO/Pi Find: "));
133 setCaption(i18n("Click OK to search ->")); 119#ifdef DESKTOP_VERSION
134 hideButtons(); 120 OkButton = new QPushButton( i18n("Close"), this );
121 connect(OkButton,SIGNAL(clicked()),SLOT(hide()));
135#endif 122#endif
136} 123}
137 124
138SearchDialog::~SearchDialog() 125SearchDialog::~SearchDialog()
139{ 126{
140 127
141} 128}
142void SearchDialog::accept() 129void SearchDialog::accept()
143{ 130{
144 doSearch(); 131 doSearch();
145} 132}
146void SearchDialog::updateList() 133void SearchDialog::updateList()
147{ 134{
148 //listView->updateList(); 135 //listView->updateList();
149 if ( isVisible() ) { 136 if ( isVisible() ) {
150 updateView(); 137 updateView();
151 //qDebug("SearchDialog::updated "); 138 //qDebug("SearchDialog::updated ");
152 } 139 }
153 else { 140 else {
154 listView->clear(); 141 listView->clear();
155 //qDebug("SearchDialog::cleared "); 142 //qDebug("SearchDialog::cleared ");
156 143
157 } 144 }
158} 145}
159void SearchDialog::searchTextChanged( const QString &_text ) 146void SearchDialog::searchTextChanged( const QString &_text )
160{ 147{
148#if 0
161 enableButton( KDialogBase::User1, !_text.isEmpty() ); 149 enableButton( KDialogBase::User1, !_text.isEmpty() );
150#endif
162} 151}
163 152
164void SearchDialog::doSearch() 153void SearchDialog::doSearch()
165{ 154{
166 QRegExp re; 155 QRegExp re;
167 156
168 re.setWildcard(true); // most people understand these better. 157 re.setWildcard(true); // most people understand these better.
169 re.setCaseSensitive(false); 158 re.setCaseSensitive(false);
170 re.setPattern(searchEdit->text()); 159 re.setPattern(searchEdit->text());
171 if (!re.isValid() ) { 160 if (!re.isValid() ) {
172 KMessageBox::sorry(this, 161 KMessageBox::sorry(this,
173 i18n("Invalid search expression,\ncannot perform " 162 i18n("Invalid search expression,\ncannot perform "
174 "the search.\nPlease enter a search expression\n" 163 "the search.\nPlease enter a search expression\n"
175 "using the wildcard characters\n '*' and '?'" 164 "using the wildcard characters\n '*' and '?'"
176 "where needed.")); 165 "where needed."));
177 return; 166 return;
@@ -377,25 +366,40 @@ void SearchDialog::search(const QRegExp &re)
377 if ( journ->dtStart().date() <= mEndDate->date() 366 if ( journ->dtStart().date() <= mEndDate->date()
378 &&journ->dtStart().date() >= mStartDate->date()) { 367 &&journ->dtStart().date() >= mStartDate->date()) {
379#if QT_VERSION >= 0x030000 368#if QT_VERSION >= 0x030000
380 if (re.search(journ->description()) != -1) 369 if (re.search(journ->description()) != -1)
381#else 370#else
382 if (re.match(journ->description()) != -1) 371 if (re.match(journ->description()) != -1)
383#endif 372#endif
384 { 373 {
385 mMatchedJournals.append(journ); 374 mMatchedJournals.append(journ);
386 continue; 375 continue;
387 } 376 }
388 } 377 }
389 } 378 }
390 } 379 }
391 380
392} 381}
393/* 382
394void SearchDialog::keyPressEvent ( QKeyEvent *e) 383void SearchDialog::keyPressEvent ( QKeyEvent *e)
395{ 384{
396 385 switch ( e->key() ) {
397 e->ignore(); 386 case Qt::Key_Escape:
398 387 hide();
388 break;
389 case Qt::Key_F:
390 if ( e->state() == Qt::ControlButton ) {
391 qDebug("full ");
392
393 }
394 break;
395 case Qt::Key_Return:
396 case Qt::Key_Enter:
397 doSearch();
398 break;
399
400 default:
401 e->ignore();
402 }
399} 403}
400*/ 404
401//mMatchedJournals; 405//mMatchedJournals;
diff --git a/korganizer/searchdialog.h b/korganizer/searchdialog.h
index ebcff7a..f4aad9e 100644
--- a/korganizer/searchdialog.h
+++ b/korganizer/searchdialog.h
@@ -14,46 +14,46 @@
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#ifndef SEARCHDIALOG_H 24#ifndef SEARCHDIALOG_H
25#define SEARCHDIALOG_H 25#define SEARCHDIALOG_H
26 26
27#include <qregexp.h> 27#include <qregexp.h>
28 28
29#include <kdialogbase.h> 29#include <kdialogbase.h>
30#include <qvbox.h>
30 31
31#include <libkcal/calendar.h> 32#include <libkcal/calendar.h>
32 33
33#include "kolistview.h" 34#include "kolistview.h"
34 35
35class KDateEdit; 36class KDateEdit;
36class QCheckBox; 37class QCheckBox;
37class QLineEdit; 38class QLineEdit;
38class QLabel; 39class QLabel;
39class CalendarView; 40class CalendarView;
40 41
41using namespace KCal; 42using namespace KCal;
42 43class SearchDialog : public QVBox
43class SearchDialog : public KDialogBase
44{ 44{
45 Q_OBJECT 45 Q_OBJECT
46 public: 46 public:
47 SearchDialog(Calendar *calendar,CalendarView *parent=0); 47 SearchDialog(Calendar *calendar,CalendarView *parent=0);
48 virtual ~SearchDialog(); 48 virtual ~SearchDialog();
49 KOListView *listview(){ return listView;} 49 KOListView *listview(){ return listView;}
50 void updateView(); 50 void updateView();
51 51
52 public slots: 52 public slots:
53 void changeEventDisplay(Event *, int) { updateView(); } 53 void changeEventDisplay(Event *, int) { updateView(); }
54 void updateConfig(); 54 void updateConfig();
55 void updateList(); 55 void updateList();
56 protected slots: 56 protected slots:
57 void accept(); 57 void accept();
58 void doSearch(); 58 void doSearch();
59 void searchTextChanged( const QString &_text ); 59 void searchTextChanged( const QString &_text );
@@ -65,29 +65,28 @@ class SearchDialog : public KDialogBase
65 65
66 private: 66 private:
67 void search(const QRegExp &); 67 void search(const QRegExp &);
68 68
69 Calendar *mCalendar; 69 Calendar *mCalendar;
70 70
71 QPtrList<Event> mMatchedEvents; 71 QPtrList<Event> mMatchedEvents;
72 QPtrList<Todo> mMatchedTodos; 72 QPtrList<Todo> mMatchedTodos;
73 QPtrList<Journal> mMatchedJournals; 73 QPtrList<Journal> mMatchedJournals;
74 74
75 QLabel *searchLabel; 75 QLabel *searchLabel;
76 QLineEdit *searchEdit; 76 QLineEdit *searchEdit;
77 KOListView *listView; 77 KOListView *listView;
78 78
79 KDateEdit *mStartDate; 79 KDateEdit *mStartDate;
80 KDateEdit *mEndDate; 80 KDateEdit *mEndDate;
81 // QCheckBox *mInclusiveCheck;
82 QCheckBox *mSummaryCheck; 81 QCheckBox *mSummaryCheck;
83 QCheckBox *mDescriptionCheck; 82 QCheckBox *mDescriptionCheck;
84 QCheckBox *mCategoryCheck; 83 QCheckBox *mCategoryCheck;
85 QCheckBox *mSearchEvent; 84 QCheckBox *mSearchEvent;
86 QCheckBox *mSearchTodo; 85 QCheckBox *mSearchTodo;
87 QCheckBox *mSearchJournal; 86 QCheckBox *mSearchJournal;
88 QCheckBox *mSearchAName; 87 QCheckBox *mSearchAName;
89 QCheckBox *mSearchAEmail; 88 QCheckBox *mSearchAEmail;
90 //void keyPressEvent ( QKeyEvent *e) ; 89 void keyPressEvent ( QKeyEvent *e) ;
91}; 90};
92 91
93#endif 92#endif