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 | |||
@@ -58,5 +58,10 @@ KOEventPopupMenu::KOEventPopupMenu(): QPopupMenu() | |||
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 ) { |
@@ -75,7 +80,27 @@ void KOEventPopupMenu::enableDefault( bool enable ) | |||
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; |
@@ -92,4 +117,5 @@ void KOEventPopupMenu::fillCatPopup() | |||
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(); |
@@ -110,4 +136,5 @@ void KOEventPopupMenu::computeCatPopup( int index ) | |||
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 | ||
diff --git a/korganizer/koeventpopupmenu.h b/korganizer/koeventpopupmenu.h index 3d8b595..e28745b 100644 --- a/korganizer/koeventpopupmenu.h +++ b/korganizer/koeventpopupmenu.h | |||
@@ -57,4 +57,6 @@ class KOEventPopupMenu : public QPopupMenu { | |||
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: |
@@ -76,4 +78,5 @@ class KOEventPopupMenu : public QPopupMenu { | |||
76 | bool isDisabled; | 78 | bool isDisabled; |
77 | QPopupMenu *mCatPopup; | 79 | QPopupMenu *mCatPopup; |
80 | QPopupMenu *mCalPopup; | ||
78 | }; | 81 | }; |
79 | 82 | ||
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index db3f802..cdcbbf0 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -305,14 +305,19 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
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, |
@@ -321,4 +326,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
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() )); |
@@ -328,5 +334,5 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
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())); |
@@ -341,9 +347,13 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent, | |||
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; |
diff --git a/korganizer/searchdialog.cpp b/korganizer/searchdialog.cpp index d0865c3..efe8774 100644 --- a/korganizer/searchdialog.cpp +++ b/korganizer/searchdialog.cpp | |||
@@ -125,5 +125,7 @@ SearchDialog::SearchDialog(Calendar *calendar,CalendarView *parent) | |||
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); |