-rw-r--r-- | korganizer/searchdialog.cpp | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index 9cfdc35..105b844 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -25,12 +25,19 @@ | |||
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
27 | #include <qgroupbox.h> | 27 | #include <q3groupbox.h> |
28 | #include <qapplication.h> | 28 | #include <qapplication.h> |
29 | #include <QDesktopWidget> | ||
29 | #include <qlabel.h> | 30 | #include <qlabel.h> |
30 | #include <qlistview.h> | 31 | #include <q3listview.h> |
31 | #include <qwhatsthis.h> | 32 | #include <q3whatsthis.h> |
32 | #include <qlineedit.h> | 33 | #include <qlineedit.h> |
33 | #include <qpushbutton.h> | 34 | #include <qpushbutton.h> |
34 | #include <qhbuttongroup.h> | 35 | //#include <qhbuttongroup.h> |
36 | //Added by qt3to4: | ||
37 | #include <Q3HBoxLayout> | ||
38 | #include <Q3Frame> | ||
39 | #include <Q3PtrList> | ||
40 | #include <QKeyEvent> | ||
41 | #include <Q3VBoxLayout> | ||
35 | #include <klocale.h> | 42 | #include <klocale.h> |
36 | #include <kmessagebox.h> | 43 | #include <kmessagebox.h> |
@@ -47,13 +54,13 @@ | |||
47 | 54 | ||
48 | SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | 55 | SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) |
49 | : QVBox( 0 ) | 56 | : Q3VBox( 0 ) |
50 | 57 | ||
51 | { | 58 | { |
52 | mCalendar = calendar; | 59 | mCalendar = calendar; |
53 | QFrame *topFrame = new QFrame( this ) ;//plainPage(); | 60 | Q3Frame *topFrame = new Q3Frame( this ) ;//plainPage(); |
54 | QVBoxLayout *layout = new QVBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); | 61 | Q3VBoxLayout *layout = new Q3VBoxLayout(topFrame,KDialog::marginHint(),KDialog::spacingHint()); |
55 | 62 | ||
56 | // Search expression | 63 | // Search expression |
57 | QHBoxLayout *subLayout = new QHBoxLayout(); | 64 | Q3HBoxLayout *subLayout = new Q3HBoxLayout(); |
58 | layout->addLayout(subLayout); | 65 | layout->addLayout(subLayout); |
59 | /* | 66 | /* |
@@ -99,5 +106,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
99 | // topFrame); | 106 | // topFrame); |
100 | 107 | ||
101 | incidenceGroup = new QHBox( topFrame ); | 108 | incidenceGroup = new Q3HBox( topFrame ); |
102 | layout->addWidget(incidenceGroup); | 109 | layout->addWidget(incidenceGroup); |
103 | 110 | ||
@@ -107,5 +114,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
107 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); | 114 | mSearchJournal = new QCheckBox(i18n("Journals"),incidenceGroup); |
108 | 115 | ||
109 | subjectGroup = new QHBox( topFrame ); | 116 | subjectGroup = new Q3HBox( topFrame ); |
110 | layout->addWidget(subjectGroup); | 117 | layout->addWidget(subjectGroup); |
111 | 118 | ||
@@ -115,5 +122,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
115 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); | 122 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); |
116 | 123 | ||
117 | attendeeGroup = new QHBox( topFrame ); | 124 | attendeeGroup = new Q3HBox( topFrame ); |
118 | layout->addWidget(attendeeGroup ); | 125 | layout->addWidget(attendeeGroup ); |
119 | new QLabel( i18n("Attendee:"),attendeeGroup ); | 126 | new QLabel( i18n("Attendee:"),attendeeGroup ); |
@@ -128,5 +135,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
128 | int space = KDialog::spacingHint(); | 135 | int space = KDialog::spacingHint(); |
129 | if ( QApplication::desktop()->width() <= 240 ) space = 1; | 136 | if ( QApplication::desktop()->width() <= 240 ) space = 1; |
130 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,space); | 137 | Q3HBoxLayout *rangeLayout = new Q3HBoxLayout(rangeWidget,0,space); |
131 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); | 138 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); |
132 | mStartDate = new KDateEdit(rangeWidget); | 139 | mStartDate = new KDateEdit(rangeWidget); |
@@ -136,5 +143,5 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
136 | mEndDate->setDate(QDate::currentDate().addDays(365)); | 143 | mEndDate->setDate(QDate::currentDate().addDays(365)); |
137 | rangeLayout->addWidget(mEndDate); | 144 | rangeLayout->addWidget(mEndDate); |
138 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); | 145 | QToolButton *wt = Q3WhatsThis::whatsThisButton ( rangeWidget ); |
139 | rangeLayout->addWidget( (QWidget*)wt ); | 146 | rangeLayout->addWidget( (QWidget*)wt ); |
140 | layout->addWidget(rangeWidget); | 147 | layout->addWidget(rangeWidget); |
@@ -342,5 +349,5 @@ void SearchDialog::updateView() | |||
342 | void SearchDialog::search(const QRegExp &re) | 349 | void SearchDialog::search(const QRegExp &re) |
343 | { | 350 | { |
344 | QPtrList<Event> events; | 351 | Q3PtrList<Event> events; |
345 | if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { | 352 | if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { |
346 | if ( mRefineItems->isChecked() ) events = mMatchedEvents; | 353 | if ( mRefineItems->isChecked() ) events = mMatchedEvents; |
@@ -420,5 +427,5 @@ void SearchDialog::search(const QRegExp &re) | |||
420 | } | 427 | } |
421 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { | 428 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { |
422 | QPtrList<Attendee> tmpAList = ev->attendees(); | 429 | Q3PtrList<Attendee> tmpAList = ev->attendees(); |
423 | Attendee *a; | 430 | Attendee *a; |
424 | for (a = tmpAList.first(); a; a = tmpAList.next()) { | 431 | for (a = tmpAList.first(); a; a = tmpAList.next()) { |
@@ -459,5 +466,5 @@ void SearchDialog::search(const QRegExp &re) | |||
459 | } | 466 | } |
460 | } | 467 | } |
461 | QPtrList<Todo> todos; | 468 | Q3PtrList<Todo> todos; |
462 | 469 | ||
463 | if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { | 470 | if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { |
@@ -513,5 +520,5 @@ void SearchDialog::search(const QRegExp &re) | |||
513 | } | 520 | } |
514 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { | 521 | if ( mSearchAName->isChecked() || mSearchAEmail->isChecked() ) { |
515 | QPtrList<Attendee> tmpAList = tod->attendees(); | 522 | Q3PtrList<Attendee> tmpAList = tod->attendees(); |
516 | Attendee *a; | 523 | Attendee *a; |
517 | for (a = tmpAList.first(); a; a = tmpAList.next()) { | 524 | for (a = tmpAList.first(); a; a = tmpAList.next()) { |
@@ -549,5 +556,5 @@ void SearchDialog::search(const QRegExp &re) | |||
549 | } | 556 | } |
550 | 557 | ||
551 | QPtrList<Journal> journals; | 558 | Q3PtrList<Journal> journals; |
552 | if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { | 559 | if ( !mAddItems->isChecked() && !mSubItems->isChecked() ) { |
553 | if ( mRefineItems->isChecked() ) journals = mMatchedJournals ; | 560 | if ( mRefineItems->isChecked() ) journals = mMatchedJournals ; |