author | zautrix <zautrix> | 2005-07-02 18:24:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-02 18:24:42 (UTC) |
commit | 80fe6533cb7d751aa72ae5ad0871a9fb76fb3d0b (patch) (unidiff) | |
tree | 51da32a82f3a9b6feb7e8a4f89df96b1be6e8d08 /korganizer | |
parent | 8eea5713638412f5613be51b339f0452f629705c (diff) | |
download | kdepimpi-80fe6533cb7d751aa72ae5ad0871a9fb76fb3d0b.zip kdepimpi-80fe6533cb7d751aa72ae5ad0871a9fb76fb3d0b.tar.gz kdepimpi-80fe6533cb7d751aa72ae5ad0871a9fb76fb3d0b.tar.bz2 |
fax
-rw-r--r-- | korganizer/koeventpopupmenu.cpp | 27 | ||||
-rw-r--r-- | korganizer/koeventpopupmenu.h | 3 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 20 | ||||
-rw-r--r-- | korganizer/searchdialog.cpp | 4 |
4 files changed, 48 insertions, 6 deletions
diff --git a/korganizer/koeventpopupmenu.cpp b/korganizer/koeventpopupmenu.cpp index 90caaf4..41d331a 100644 --- a/korganizer/koeventpopupmenu.cpp +++ b/korganizer/koeventpopupmenu.cpp | |||
@@ -44,84 +44,111 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | |||
44 | this,SLOT(popupDelete()))); | 44 | this,SLOT(popupDelete()))); |
45 | mEditOnlyItems.append(insertItem (i18n("&Clone..."), | 45 | mEditOnlyItems.append(insertItem (i18n("&Clone..."), |
46 | this,SLOT(popupClone()))); | 46 | this,SLOT(popupClone()))); |
47 | mEditOnlyItems.append(insertItem (i18n("&Move..."), | 47 | mEditOnlyItems.append(insertItem (i18n("&Move..."), |
48 | this,SLOT(popupMove()))); | 48 | this,SLOT(popupMove()))); |
49 | #ifndef DESKTOP_VERSION | 49 | #ifndef DESKTOP_VERSION |
50 | mEditOnlyItems.append(insertItem (i18n("&Beam..."), | 50 | mEditOnlyItems.append(insertItem (i18n("&Beam..."), |
51 | this,SLOT(popupBeam()))); | 51 | this,SLOT(popupBeam()))); |
52 | #endif | 52 | #endif |
53 | mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), | 53 | mEditOnlyItems.append(insertItem (i18n("&Toggle Cancel"), |
54 | this,SLOT(popupCancel()))); | 54 | this,SLOT(popupCancel()))); |
55 | isDisabled = false; | 55 | isDisabled = false; |
56 | mCatPopup = new QPopupMenu ( this ); | 56 | mCatPopup = new QPopupMenu ( this ); |
57 | mCatPopup->setCheckable (true); | 57 | mCatPopup->setCheckable (true); |
58 | connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); | 58 | connect(mCatPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCatPopup())); |
59 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); | 59 | connect(mCatPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCatPopup( int ))); |
60 | mCalPopup = new QPopupMenu ( this ); | ||
61 | mCalPopup->setCheckable (true); | ||
62 | connect(mCalPopup,SIGNAL( aboutToShow ()), this ,SLOT( fillCalPopup())); | ||
63 | connect(mCalPopup,SIGNAL( activated ( int ) ), this ,SLOT( computeCalPopup( int ))); | ||
60 | mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup )); | 64 | mEditOnlyItems.append(insertItem (i18n("Categories"),mCatPopup )); |
65 | mEditOnlyItems.append(insertItem (i18n("Calendar"),mCalPopup )); | ||
61 | QValueList<int>::Iterator it; | 66 | QValueList<int>::Iterator it; |
62 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { | 67 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { |
63 | mSingleOnlyItems.append(*it); | 68 | mSingleOnlyItems.append(*it); |
64 | } | 69 | } |
65 | 70 | ||
66 | } | 71 | } |
67 | void KOEventPopupMenu::enableDefault( bool enable ) | 72 | void KOEventPopupMenu::enableDefault( bool enable ) |
68 | { | 73 | { |
69 | isDisabled = !enable; | 74 | isDisabled = !enable; |
70 | QValueList<int>::Iterator it; | 75 | QValueList<int>::Iterator it; |
71 | for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { | 76 | for( it = mSingleOnlyItems.begin(); it != mSingleOnlyItems.end(); ++it ) { |
72 | setItemEnabled(*it,enable); | 77 | setItemEnabled(*it,enable); |
73 | } | 78 | } |
74 | 79 | ||
75 | } | 80 | } |
76 | 81 | ||
82 | void KOEventPopupMenu::fillCalPopup() // CAL | ||
83 | { | ||
84 | mCalPopup->clear(); | ||
85 | if (!mCurrentIncidence) return; | ||
86 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | ||
87 | while ( kkf ) { | ||
88 | int index = mCalPopup->insertItem( kkf->mName, kkf->mCalNumber); | ||
89 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) | ||
90 | mCalPopup->setItemEnabled( index, false ); | ||
91 | mCalPopup->setItemChecked (index, kkf->mCalNumber == mCurrentIncidence->calID()); | ||
92 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
93 | } | ||
94 | } | ||
95 | void KOEventPopupMenu::computeCalPopup( int index ) // CAL | ||
96 | { | ||
97 | if (!mCurrentIncidence) return; | ||
98 | mCurrentIncidence->setCalID( index ); | ||
99 | emit categoryChanged( mCurrentIncidence ); | ||
100 | } | ||
77 | void KOEventPopupMenu::fillCatPopup() | 101 | void KOEventPopupMenu::fillCatPopup() |
78 | { | 102 | { |
79 | mCatPopup->clear(); | 103 | mCatPopup->clear(); |
104 | if (!mCurrentIncidence) return; | ||
80 | QStringList checkedCategories = mCurrentIncidence->categories(); | 105 | QStringList checkedCategories = mCurrentIncidence->categories(); |
81 | int index = 0; | 106 | int index = 0; |
82 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 107 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
83 | it != KOPrefs::instance()->mCustomCategories.end (); | 108 | it != KOPrefs::instance()->mCustomCategories.end (); |
84 | ++it) { | 109 | ++it) { |
85 | mCatPopup->insertItem (*it, index ); | 110 | mCatPopup->insertItem (*it, index ); |
86 | if (checkedCategories.find (*it) != checkedCategories.end ()) { | 111 | if (checkedCategories.find (*it) != checkedCategories.end ()) { |
87 | mCatPopup->setItemChecked (index, true); | 112 | mCatPopup->setItemChecked (index, true); |
88 | } | 113 | } |
89 | ++index; | 114 | ++index; |
90 | } | 115 | } |
91 | } | 116 | } |
92 | void KOEventPopupMenu::computeCatPopup( int index ) | 117 | void KOEventPopupMenu::computeCatPopup( int index ) |
93 | { | 118 | { |
119 | if (!mCurrentIncidence) return; | ||
94 | QStringList categories = mCurrentIncidence->categories(); | 120 | QStringList categories = mCurrentIncidence->categories(); |
95 | QString colcat = categories.first(); | 121 | QString colcat = categories.first(); |
96 | if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ()) | 122 | if (categories.find (KOPrefs::instance()->mCustomCategories[index]) != categories.end ()) |
97 | categories.remove (KOPrefs::instance()->mCustomCategories[index]); | 123 | categories.remove (KOPrefs::instance()->mCustomCategories[index]); |
98 | else | 124 | else |
99 | categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]); | 125 | categories.insert (categories.end(), KOPrefs::instance()->mCustomCategories[index]); |
100 | categories.sort (); | 126 | categories.sort (); |
101 | if ( !colcat.isEmpty() ) { | 127 | if ( !colcat.isEmpty() ) { |
102 | if ( categories.find ( colcat ) != categories.end () ) { | 128 | if ( categories.find ( colcat ) != categories.end () ) { |
103 | categories.remove( colcat ); | 129 | categories.remove( colcat ); |
104 | categories.prepend( colcat ); | 130 | categories.prepend( colcat ); |
105 | } | 131 | } |
106 | } | 132 | } |
107 | mCurrentIncidence->setCategories( categories ); | 133 | mCurrentIncidence->setCategories( categories ); |
108 | emit categoryChanged( mCurrentIncidence ); | 134 | emit categoryChanged( mCurrentIncidence ); |
109 | } | 135 | } |
110 | void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) | 136 | void KOEventPopupMenu::showIncidencePopup(Incidence *incidence) |
111 | { | 137 | { |
138 | if ( !incidence) return; | ||
112 | mCurrentIncidence = incidence; | 139 | mCurrentIncidence = incidence; |
113 | 140 | ||
114 | if (mCurrentIncidence) { | 141 | if (mCurrentIncidence) { |
115 | // Enable/Disabled menu items only valid for editable events. | 142 | // Enable/Disabled menu items only valid for editable events. |
116 | if ( !isDisabled ) { | 143 | if ( !isDisabled ) { |
117 | QValueList<int>::Iterator it; | 144 | QValueList<int>::Iterator it; |
118 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { | 145 | for( it = mEditOnlyItems.begin(); it != mEditOnlyItems.end(); ++it ) { |
119 | setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); | 146 | setItemEnabled(*it,!mCurrentIncidence->isReadOnly()); |
120 | } | 147 | } |
121 | } | 148 | } |
122 | popup(QCursor::pos()); | 149 | popup(QCursor::pos()); |
123 | } | 150 | } |
124 | } | 151 | } |
125 | 152 | ||
126 | void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, | 153 | void KOEventPopupMenu::addAdditionalItem(const QIconSet &icon,const QString &text, |
127 | const QObject *receiver, const char *member, | 154 | const QObject *receiver, const char *member, |
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h index 3d8b595..e28745b 100644 --- a/korganizer/koeventpopupmenu.h +++ b/korganizer/koeventpopupmenu.h | |||
@@ -43,38 +43,41 @@ class KOEventPopupMenu : public QPopupMenu { | |||
43 | 43 | ||
44 | 44 | ||
45 | public slots: | 45 | public slots: |
46 | void showIncidencePopup(Incidence *); | 46 | void showIncidencePopup(Incidence *); |
47 | void enableDefault( bool ); | 47 | void enableDefault( bool ); |
48 | 48 | ||
49 | protected slots: | 49 | protected slots: |
50 | void popupShow(); | 50 | void popupShow(); |
51 | void popupEdit(); | 51 | void popupEdit(); |
52 | void popupDelete(); | 52 | void popupDelete(); |
53 | void popupClone(); | 53 | void popupClone(); |
54 | void popupCancel(); | 54 | void popupCancel(); |
55 | void popupMove(); | 55 | void popupMove(); |
56 | void popupBeam(); | 56 | void popupBeam(); |
57 | void fillCatPopup(); | 57 | void fillCatPopup(); |
58 | void computeCatPopup( int ); | 58 | void computeCatPopup( int ); |
59 | void fillCalPopup(); | ||
60 | void computeCalPopup( int ); | ||
59 | 61 | ||
60 | signals: | 62 | signals: |
61 | void editIncidenceSignal(Incidence *); | 63 | void editIncidenceSignal(Incidence *); |
62 | void showIncidenceSignal(Incidence *); | 64 | void showIncidenceSignal(Incidence *); |
63 | void deleteIncidenceSignal(Incidence *); | 65 | void deleteIncidenceSignal(Incidence *); |
64 | void cloneIncidenceSignal(Incidence *); | 66 | void cloneIncidenceSignal(Incidence *); |
65 | void cancelIncidenceSignal(Incidence *); | 67 | void cancelIncidenceSignal(Incidence *); |
66 | void moveIncidenceSignal(Incidence *); | 68 | void moveIncidenceSignal(Incidence *); |
67 | void beamIncidenceSignal(Incidence *); | 69 | void beamIncidenceSignal(Incidence *); |
68 | void categoryChanged( Incidence * ); | 70 | void categoryChanged( Incidence * ); |
69 | 71 | ||
70 | private: | 72 | private: |
71 | Incidence *mCurrentIncidence; | 73 | Incidence *mCurrentIncidence; |
72 | 74 | ||
73 | bool mHasAdditionalItems; | 75 | bool mHasAdditionalItems; |
74 | QValueList<int> mEditOnlyItems; | 76 | QValueList<int> mEditOnlyItems; |
75 | QValueList<int> mSingleOnlyItems; | 77 | QValueList<int> mSingleOnlyItems; |
76 | bool isDisabled; | 78 | bool isDisabled; |
77 | QPopupMenu *mCatPopup; | 79 | QPopupMenu *mCatPopup; |
80 | QPopupMenu *mCalPopup; | ||
78 | }; | 81 | }; |
79 | 82 | ||
80 | #endif | 83 | #endif |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index db3f802..cdcbbf0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -291,73 +291,83 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
291 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 291 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
292 | mPopupMenu = eventPopup(); | 292 | mPopupMenu = eventPopup(); |
293 | QPopupMenu* selPopup = new QPopupMenu ( this ); | 293 | QPopupMenu* selPopup = new QPopupMenu ( this ); |
294 | mPopupMenu->insertSeparator(); | 294 | mPopupMenu->insertSeparator(); |
295 | 295 | ||
296 | selPopup->insertItem(i18n("All"),this, | 296 | selPopup->insertItem(i18n("All"),this, |
297 | SLOT(allSelection())); | 297 | SLOT(allSelection())); |
298 | selPopup->insertItem(i18n("None"),this, | 298 | selPopup->insertItem(i18n("None"),this, |
299 | SLOT(clearSelection())); | 299 | SLOT(clearSelection())); |
300 | selPopup->insertItem(i18n("Delete selected..."),this, | 300 | selPopup->insertItem(i18n("Delete selected..."),this, |
301 | SLOT(deleteAll())); | 301 | SLOT(deleteAll())); |
302 | mPopupMenu->insertItem(i18n("Selection"), selPopup ); | 302 | mPopupMenu->insertItem(i18n("Selection"), selPopup ); |
303 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 303 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
304 | i18n("Hide all selected"),this, | 304 | i18n("Hide all selected"),this, |
305 | SLOT(hideAll()),true); | 305 | SLOT(hideAll()),true); |
306 | 306 | ||
307 | mPopupMenu->insertSeparator(); | 307 | selPopup->insertSeparator(); |
308 | #ifdef DESKTOP_VERSION | 308 | #ifdef DESKTOP_VERSION |
309 | mPopupMenu->insertSeparator(); | ||
309 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 310 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
310 | i18n("Print complete list"),this, | 311 | i18n("Print complete list"),this, |
311 | SLOT(printList()),true); | 312 | SLOT(printList()),true); |
312 | mPopupMenu->insertSeparator(); | ||
313 | #endif | 313 | #endif |
314 | mCalPopup = new QPopupMenu ( this ); | 314 | mCalPopup = new QPopupMenu ( this ); |
315 | mPopupMenu->insertItem( i18n("Set Calendar"), mCalPopup ); | 315 | selPopup->insertItem( i18n("Set Calendar"), mCalPopup ); |
316 | 316 | ||
317 | selPopup->insertItem(i18n("Set categories")+"...",this, | ||
318 | SLOT(setCat()) ); | ||
319 | selPopup->insertItem( i18n("Set alarm..."),this, | ||
320 | SLOT(setAlarm())); | ||
321 | #if 0 | ||
317 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 322 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
318 | i18n("Set categories")+"...",this, | 323 | i18n("Set categories")+"...",this, |
319 | SLOT(setCat()),true); | 324 | SLOT(setCat()),true); |
320 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 325 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
321 | i18n("Set alarm..."),this, | 326 | i18n("Set alarm..."),this, |
322 | SLOT(setAlarm()),true); | 327 | SLOT(setAlarm()),true); |
328 | #endif | ||
323 | QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, | 329 | QObject::connect(mCalPopup,SIGNAL(aboutToShow()),this, |
324 | SLOT( populateCalPopup() )); | 330 | SLOT( populateCalPopup() )); |
325 | QObject::connect(mCalPopup,SIGNAL(activated( int )),this, | 331 | QObject::connect(mCalPopup,SIGNAL(activated( int )),this, |
326 | SLOT( setCalendar( int ) )); | 332 | SLOT( setCalendar( int ) )); |
327 | QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, | 333 | QObject::connect(mPopupMenu,SIGNAL(categoryChanged( Incidence * )),this, |
328 | SLOT( catChanged( Incidence * ) )); | 334 | SLOT( catChanged( Incidence * ) )); |
329 | QPopupMenu * exportPO = new QPopupMenu ( this ); | 335 | QPopupMenu * exportPO = new QPopupMenu ( this ); |
330 | mPopupMenu->insertItem( i18n("Export"), exportPO ); | 336 | selPopup->insertItem( i18n("Export"), exportPO ); |
331 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, | 337 | exportPO->insertItem( i18n("As iCal (ics) file..."),this, |
332 | SLOT(saveToFile())); | 338 | SLOT(saveToFile())); |
333 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, | 339 | exportPO->insertItem( i18n("As vCal (vcs) file..."),this, |
334 | SLOT(saveToFileVCS())); | 340 | SLOT(saveToFileVCS())); |
335 | exportPO->insertItem( i18n("Journal/Details..."),this, | 341 | exportPO->insertItem( i18n("Journal/Details..."),this, |
336 | SLOT(saveDescriptionToFile())); | 342 | SLOT(saveDescriptionToFile())); |
337 | // mPopupMenu->insertSeparator(); | 343 | // mPopupMenu->insertSeparator(); |
338 | // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 344 | // mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
339 | // i18n("Add Categ. to selected..."),this, | 345 | // i18n("Add Categ. to selected..."),this, |
340 | // SLOT(addCat()),true); | 346 | // SLOT(addCat()),true); |
341 | //mPopupMenu->insertSeparator(); | 347 | //mPopupMenu->insertSeparator(); |
342 | #ifndef DESKTOP_VERSION | 348 | #ifndef DESKTOP_VERSION |
343 | mPopupMenu->insertSeparator(); | 349 | selPopup->insertSeparator(); |
350 | selPopup->insertItem( i18n("Beam via IR"),this, | ||
351 | SLOT(beamSelected())); | ||
352 | #if 0 | ||
344 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), | 353 | mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), |
345 | i18n("Beam via IR"),this, | 354 | i18n("Beam via IR"),this, |
346 | SLOT(beamSelected()),true); | 355 | SLOT(beamSelected()),true); |
347 | #endif | 356 | #endif |
357 | #endif | ||
348 | /* | 358 | /* |
349 | mPopupMenu = new QPopupMenu; | 359 | mPopupMenu = new QPopupMenu; |
350 | mPopupMenu->insertItem(i18n("Edit Event"), this, | 360 | mPopupMenu->insertItem(i18n("Edit Event"), this, |
351 | SLOT (editEvent())); | 361 | SLOT (editEvent())); |
352 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, | 362 | mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this, |
353 | SLOT (deleteEvent())); | 363 | SLOT (deleteEvent())); |
354 | mPopupMenu->insertSeparator(); | 364 | mPopupMenu->insertSeparator(); |
355 | mPopupMenu->insertItem(i18n("Show Dates"), this, | 365 | mPopupMenu->insertItem(i18n("Show Dates"), this, |
356 | SLOT(showDates())); | 366 | SLOT(showDates())); |
357 | mPopupMenu->insertItem(i18n("Hide Dates"), this, | 367 | mPopupMenu->insertItem(i18n("Hide Dates"), this, |
358 | SLOT(hideDates())); | 368 | SLOT(hideDates())); |
359 | */ | 369 | */ |
360 | QObject::connect(mListView,SIGNAL( newEvent()), | 370 | QObject::connect(mListView,SIGNAL( newEvent()), |
361 | this,SIGNAL(signalNewEvent())); | 371 | this,SIGNAL(signalNewEvent())); |
362 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), | 372 | QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)), |
363 | this,SLOT(defaultItemAction(QListViewItem *))); | 373 | this,SLOT(defaultItemAction(QListViewItem *))); |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index d0865c3..efe8774 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -111,33 +111,35 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
111 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); | 111 | mSummaryCheck = new QCheckBox(i18n("Summary/Loc."),subjectGroup); |
112 | mSummaryCheck->setChecked(true); | 112 | mSummaryCheck->setChecked(true); |
113 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); | 113 | mDescriptionCheck = new QCheckBox(i18n("Details"),subjectGroup); |
114 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); | 114 | mCategoryCheck = new QCheckBox(i18n("Categories"),subjectGroup); |
115 | 115 | ||
116 | attendeeGroup = new QHBox( topFrame ); | 116 | attendeeGroup = new QHBox( topFrame ); |
117 | layout->addWidget(attendeeGroup ); | 117 | layout->addWidget(attendeeGroup ); |
118 | new QLabel( i18n("Attendee:"),attendeeGroup ); | 118 | new QLabel( i18n("Attendee:"),attendeeGroup ); |
119 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); | 119 | mSearchAName = new QCheckBox(i18n("Name"),attendeeGroup ); |
120 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); | 120 | mSearchAEmail = new QCheckBox(i18n("Email"), attendeeGroup ); |
121 | // Date range | 121 | // Date range |
122 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), | 122 | // QGroupBox *rangeGroup = new QGroupBox(1,Horizontal,i18n("Date Range"), |
123 | // topFrame); | 123 | // topFrame); |
124 | // layout->addWidget(rangeGroup); | 124 | // layout->addWidget(rangeGroup); |
125 | 125 | ||
126 | QWidget *rangeWidget = new QWidget(topFrame); | 126 | QWidget *rangeWidget = new QWidget(topFrame); |
127 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,KDialog::spacingHint()-3); | 127 | int space = KDialog::spacingHint(); |
128 | if ( QApplication::desktop()->width() <= 240 ) space = 1; | ||
129 | QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget,0,space); | ||
128 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); | 130 | rangeLayout->addWidget(new QLabel(i18n("From:"),rangeWidget)); |
129 | mStartDate = new KDateEdit(rangeWidget); | 131 | mStartDate = new KDateEdit(rangeWidget); |
130 | rangeLayout->addWidget(mStartDate); | 132 | rangeLayout->addWidget(mStartDate); |
131 | rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); | 133 | rangeLayout->addWidget(new QLabel(i18n("To:"),rangeWidget)); |
132 | mEndDate = new KDateEdit(rangeWidget); | 134 | mEndDate = new KDateEdit(rangeWidget); |
133 | mEndDate->setDate(QDate::currentDate().addDays(365)); | 135 | mEndDate->setDate(QDate::currentDate().addDays(365)); |
134 | rangeLayout->addWidget(mEndDate); | 136 | rangeLayout->addWidget(mEndDate); |
135 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); | 137 | QToolButton *wt = QWhatsThis::whatsThisButton ( rangeWidget ); |
136 | rangeLayout->addWidget( (QWidget*)wt ); | 138 | rangeLayout->addWidget( (QWidget*)wt ); |
137 | layout->addWidget(rangeWidget); | 139 | layout->addWidget(rangeWidget); |
138 | // Results list view | 140 | // Results list view |
139 | listView = new KOListView(mCalendar,topFrame); | 141 | listView = new KOListView(mCalendar,topFrame); |
140 | layout->addWidget(listView); | 142 | layout->addWidget(listView); |
141 | listView->showCompletedTodos(); | 143 | listView->showCompletedTodos(); |
142 | //layout->setStretchFactor( listView, 333 ); | 144 | //layout->setStretchFactor( listView, 333 ); |
143 | //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); | 145 | //listView->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::Expanding) ); |