author | zautrix <zautrix> | 2005-10-22 16:49:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-22 16:49:42 (UTC) |
commit | 3ec18dd19fdf4eb7e763b8022f90de83249facfd (patch) (unidiff) | |
tree | abc6c8568c33b70afd8abc46ae9495e5d862cba1 | |
parent | c643664ae97e757afda1012dc998b49e6cc2d575 (diff) | |
download | kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.zip kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.gz kdepimpi-3ec18dd19fdf4eb7e763b8022f90de83249facfd.tar.bz2 |
fixxx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 16 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 6 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 | ||||
-rw-r--r-- | libkcal/calendar.h | 2 | ||||
-rw-r--r-- | libkcal/calendarlocal.cpp | 26 | ||||
-rw-r--r-- | libkcal/calendarlocal.h | 1 |
9 files changed, 52 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 6c1f664..edf7eb1 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,19 +1,20 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.2.5 ************ | 3 | ********** VERSION 2.2.5 ************ |
4 | 4 | ||
5 | Bugfixes in KO/Pi, KA/Pi and OM/Pi. | 5 | Bugfixes in KO/Pi, KA/Pi and OM/Pi. |
6 | Added possibility to disable auto saving in KO/Pi. | 6 | Added possibility to disable auto saving in KO/Pi. |
7 | How to disable it? Good question! Next question, please? | 7 | How to disable it? Good question! Next question, please? |
8 | Added info about count of events/todos/journals to calendar info. | ||
8 | 9 | ||
9 | 10 | ||
10 | ********** VERSION 2.2.4 ************ | 11 | ********** VERSION 2.2.4 ************ |
11 | 12 | ||
12 | KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. | 13 | KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. |
13 | Added 3 sec notification about a started timer. | 14 | Added 3 sec notification about a started timer. |
14 | 15 | ||
15 | KO/Pi: | 16 | KO/Pi: |
16 | Added export option for all data to File->Export menu. | 17 | Added export option for all data to File->Export menu. |
17 | Better management if a save error occours. | 18 | Better management if a save error occours. |
18 | Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. | 19 | Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. |
19 | Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. | 20 | Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. |
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index e8b54fd..288ce4b 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1561,21 +1561,21 @@ | |||
1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, | 1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, |
1562 | { " Yes, close "," Ja, beenden " }, | 1562 | { " Yes, close "," Ja, beenden " }, |
1563 | { "Export All Data","Exportiere alle Daten" }, | 1563 | { "Export All Data","Exportiere alle Daten" }, |
1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, | 1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, |
1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, | 1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, |
1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, | 1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, |
1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, | 1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, |
1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, | 1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, |
1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, | 1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, |
1570 | { "Yes, Save!","Ja, Speichern!" }, | 1570 | { "Yes, Save!","Ja, Speichern!" }, |
1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, | 1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, |
1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, | 1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, |
1573 | { "","" }, | 1573 | { "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" }, |
1574 | { "","" }, | 1574 | { "","" }, |
1575 | { "","" }, | 1575 | { "","" }, |
1576 | { "","" }, | 1576 | { "","" }, |
1577 | { "","" }, | 1577 | { "","" }, |
1578 | { "","" }, | 1578 | { "","" }, |
1579 | { "","" }, | 1579 | { "","" }, |
1580 | { "","" }, | 1580 | { "","" }, |
1581 | { "","" }, | 1581 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e31a6e1..28b17a5 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -468,25 +468,27 @@ void CalendarView::init() | |||
468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 468 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); | 469 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); |
470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); | 470 | connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); |
471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); | 471 | connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); |
472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); | 472 | connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); |
473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); | 473 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); |
474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); | 474 | connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); |
475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); | 475 | connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); |
476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 476 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 477 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); | 478 | connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); |
479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | 479 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); |
480 | connect( mCalEditView, SIGNAL( requestCalendarInfo( int ) ),this, SLOT( displayCalendarInfo( int ) ) ); | ||
480 | 481 | ||
482 | |||
481 | mTodoList->setNavigator( mNavigator ); | 483 | mTodoList->setNavigator( mNavigator ); |
482 | #if 0 | 484 | #if 0 |
483 | if ( QApplication::desktop()->width() < 480 ) { | 485 | if ( QApplication::desktop()->width() < 480 ) { |
484 | leftFrameLayout->addWidget(mFilterView); | 486 | leftFrameLayout->addWidget(mFilterView); |
485 | leftFrameLayout->addWidget(mTodoList, 2 ); | 487 | leftFrameLayout->addWidget(mTodoList, 2 ); |
486 | 488 | ||
487 | } else { | 489 | } else { |
488 | leftFrameLayout->addWidget(mTodoList,2 ); | 490 | leftFrameLayout->addWidget(mTodoList,2 ); |
489 | leftFrameLayout->addWidget(mFilterView ); | 491 | leftFrameLayout->addWidget(mFilterView ); |
490 | } | 492 | } |
491 | #endif | 493 | #endif |
492 | mFilterView->hide(); | 494 | mFilterView->hide(); |
@@ -5149,12 +5151,26 @@ void CalendarView::showNextAlarms() | |||
5149 | message = i18n("There is no next alarm."); | 5151 | message = i18n("There is no next alarm."); |
5150 | 5152 | ||
5151 | } | 5153 | } |
5152 | #ifdef DESKTOP_VERSION | 5154 | #ifdef DESKTOP_VERSION |
5153 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { | 5155 | if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { |
5154 | message += i18n("\nThe internal alarm notification is disabled!\n"); | 5156 | message += i18n("\nThe internal alarm notification is disabled!\n"); |
5155 | message += i18n("Enable it in the settings menu, TAB alarm."); | 5157 | message += i18n("Enable it in the settings menu, TAB alarm."); |
5156 | } | 5158 | } |
5157 | 5159 | ||
5158 | #endif | 5160 | #endif |
5159 | KMessageBox::information( this, message); | 5161 | KMessageBox::information( this, message); |
5160 | } | 5162 | } |
5163 | |||
5164 | void CalendarView::displayCalendarInfo( int id ) | ||
5165 | { | ||
5166 | int e, t,j; | ||
5167 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | ||
5168 | QString name = kkf->mName; | ||
5169 | mCalendar->getIncidenceCount( id, e, t, j ); | ||
5170 | QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); | ||
5171 | QString mess = i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file); | ||
5172 | mess += i18n("<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>").arg( e ).arg( t ).arg( j ); | ||
5173 | KMessageBox::information( this, mess ); | ||
5174 | |||
5175 | |||
5176 | } | ||
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 8670832..0924f07 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -192,24 +192,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
192 | /** Emitted, when the number of outgoing messages has changed. */ | 192 | /** Emitted, when the number of outgoing messages has changed. */ |
193 | void numOutgoingChanged(int); | 193 | void numOutgoingChanged(int); |
194 | 194 | ||
195 | /** Send status message, which can e.g. be displayed in the status bar. */ | 195 | /** Send status message, which can e.g. be displayed in the status bar. */ |
196 | void statusMessage(const QString &); | 196 | void statusMessage(const QString &); |
197 | 197 | ||
198 | void calendarViewExpanded( bool ); | 198 | void calendarViewExpanded( bool ); |
199 | void updateSearchDialog(); | 199 | void updateSearchDialog(); |
200 | void filtersUpdated(); | 200 | void filtersUpdated(); |
201 | 201 | ||
202 | 202 | ||
203 | public slots: | 203 | public slots: |
204 | void displayCalendarInfo( int id ); | ||
204 | void nextConflict( bool all, bool allday ); | 205 | void nextConflict( bool all, bool allday ); |
205 | void conflictAll(); | 206 | void conflictAll(); |
206 | void conflictAllday(); | 207 | void conflictAllday(); |
207 | void conflictNotAll(); | 208 | void conflictNotAll(); |
208 | void setCalReadOnly( int id, bool readO ); | 209 | void setCalReadOnly( int id, bool readO ); |
209 | void checkAlarms(); | 210 | void checkAlarms(); |
210 | void checkFiles(); | 211 | void checkFiles(); |
211 | void slotprintSelInc(); | 212 | void slotprintSelInc(); |
212 | void showNextAlarms(); | 213 | void showNextAlarms(); |
213 | void showOpenError(); | 214 | void showOpenError(); |
214 | void watchSavedFile(); | 215 | void watchSavedFile(); |
215 | void recheckTimerAlarm(); | 216 | void recheckTimerAlarm(); |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ef25fd0..ee9c9f6 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -221,26 +221,28 @@ void KOCalEditView::deleteCal( int id ) | |||
221 | void KOCalEditView::infoCal( int id ) | 221 | void KOCalEditView::infoCal( int id ) |
222 | { | 222 | { |
223 | QString name = KOPrefs::instance()->getCalendar( id )->mName; | 223 | QString name = KOPrefs::instance()->getCalendar( id )->mName; |
224 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); | 224 | QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); |
225 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { | 225 | if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { |
226 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { | 226 | if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { |
227 | emit calendarAdded( id ); | 227 | emit calendarAdded( id ); |
228 | emit needsUpdate(); | 228 | emit needsUpdate(); |
229 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 229 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
230 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); | 230 | QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); |
231 | } | 231 | } |
232 | } | 232 | } |
233 | else | 233 | else { |
234 | KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); | 234 | emit requestCalendarInfo( id ); |
235 | |||
236 | } | ||
235 | } | 237 | } |
236 | void KOCalEditView::readConfig() | 238 | void KOCalEditView::readConfig() |
237 | { | 239 | { |
238 | 240 | ||
239 | mStdandardB.clear(); | 241 | mStdandardB.clear(); |
240 | mEnabledB.clear(); | 242 | mEnabledB.clear(); |
241 | mAlarmB.clear(); | 243 | mAlarmB.clear(); |
242 | mROB.clear(); | 244 | mROB.clear(); |
243 | 245 | ||
244 | if ( mw ) delete mw; | 246 | if ( mw ) delete mw; |
245 | mw = new QWidget ( viewport() ); | 247 | mw = new QWidget ( viewport() ); |
246 | addChild(mw); | 248 | addChild(mw); |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index d534dbf..0dd423a 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -231,24 +231,25 @@ class KOCalEditView : public QScrollView | |||
231 | void readConfig(); | 231 | void readConfig(); |
232 | void defaultInfo(); | 232 | void defaultInfo(); |
233 | void findNewStandard(); | 233 | void findNewStandard(); |
234 | signals: | 234 | signals: |
235 | void alarmEnabled ( int cal, bool enable ); | 235 | void alarmEnabled ( int cal, bool enable ); |
236 | void calendarEnabled ( int cal, bool enable ); | 236 | void calendarEnabled ( int cal, bool enable ); |
237 | void calendarReadonly ( int cal, bool readonly ); | 237 | void calendarReadonly ( int cal, bool readonly ); |
238 | void setCalendarDefault ( int cal ); | 238 | void setCalendarDefault ( int cal ); |
239 | void removeCalendar ( int cal ); | 239 | void removeCalendar ( int cal ); |
240 | void calendarAdded( int ); | 240 | void calendarAdded( int ); |
241 | void needsUpdate(); | 241 | void needsUpdate(); |
242 | void checkCalendar(); | 242 | void checkCalendar(); |
243 | void requestCalendarInfo( int id ); | ||
243 | 244 | ||
244 | private: | 245 | private: |
245 | QWidget *mw; | 246 | QWidget *mw; |
246 | void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); | 247 | void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); |
247 | QPtrList<KOCalRadioButton> mStdandardB; | 248 | QPtrList<KOCalRadioButton> mStdandardB; |
248 | QPtrList<KOCalCheckButton> mEnabledB; | 249 | QPtrList<KOCalCheckButton> mEnabledB; |
249 | QPtrList<KOCalCheckButton> mAlarmB; | 250 | QPtrList<KOCalCheckButton> mAlarmB; |
250 | QPtrList<KOCalCheckButton> mROB; | 251 | QPtrList<KOCalCheckButton> mROB; |
251 | QGridLayout* mainLayout; | 252 | QGridLayout* mainLayout; |
252 | }; | 253 | }; |
253 | 254 | ||
254 | 255 | ||
diff --git a/libkcal/calendar.h b/libkcal/calendar.h index 3f6895d..4b8b3ff 100644 --- a/libkcal/calendar.h +++ b/libkcal/calendar.h | |||
@@ -310,24 +310,26 @@ public: | |||
310 | QString::null, if no calendar has been loaded. | 310 | QString::null, if no calendar has been loaded. |
311 | */ | 311 | */ |
312 | QString loadedProductId(); | 312 | QString loadedProductId(); |
313 | int defaultCalendar(); | 313 | int defaultCalendar(); |
314 | void setDontDeleteIncidencesOnClose (); | 314 | void setDontDeleteIncidencesOnClose (); |
315 | public slots: | 315 | public slots: |
316 | void setDefaultCalendar( int ); | 316 | void setDefaultCalendar( int ); |
317 | virtual void setCalendarEnabled( int id, bool enable ) = 0; | 317 | virtual void setCalendarEnabled( int id, bool enable ) = 0; |
318 | virtual void setAlarmEnabled( int id, bool enable ) = 0; | 318 | virtual void setAlarmEnabled( int id, bool enable ) = 0; |
319 | virtual void setReadOnly( int id, bool enable ) = 0; | 319 | virtual void setReadOnly( int id, bool enable ) = 0; |
320 | virtual void setDefaultCalendarEnabledOnly() = 0; | 320 | virtual void setDefaultCalendarEnabledOnly() = 0; |
321 | virtual void setCalendarRemove( int id ) = 0; | 321 | virtual void setCalendarRemove( int id ) = 0; |
322 | virtual void getIncidenceCount( int calId, int& events, int & todos, int & journals) = 0; | ||
323 | |||
322 | signals: | 324 | signals: |
323 | void calendarChanged(); | 325 | void calendarChanged(); |
324 | void calendarSaved(); | 326 | void calendarSaved(); |
325 | void calendarLoaded(); | 327 | void calendarLoaded(); |
326 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 328 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
327 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 329 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
328 | 330 | ||
329 | protected: | 331 | protected: |
330 | /** | 332 | /** |
331 | Get unfiltered events, which occur on the given date. | 333 | Get unfiltered events, which occur on the given date. |
332 | */ | 334 | */ |
333 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; | 335 | virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; |
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp index 1a1c6be..0ddfeca 100644 --- a/libkcal/calendarlocal.cpp +++ b/libkcal/calendarlocal.cpp | |||
@@ -443,39 +443,63 @@ QPtrList<Event> CalendarLocal::getExternLastSyncEvents() | |||
443 | } | 443 | } |
444 | Event *CalendarLocal::event( QString syncProf, QString id ) | 444 | Event *CalendarLocal::event( QString syncProf, QString id ) |
445 | { | 445 | { |
446 | Event *todo; | 446 | Event *todo; |
447 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | 447 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { |
448 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; | 448 | if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; |
449 | } | 449 | } |
450 | 450 | ||
451 | return 0; | 451 | return 0; |
452 | } | 452 | } |
453 | Todo *CalendarLocal::todo( const QString &uid ) | 453 | Todo *CalendarLocal::todo( const QString &uid ) |
454 | { | 454 | { |
455 | Todo *todo;; | 455 | Todo *todo; |
456 | Todo *retVal = 0; | 456 | Todo *retVal = 0; |
457 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | 457 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { |
458 | if ( todo->calEnabled() && todo->uid() == uid ) { | 458 | if ( todo->calEnabled() && todo->uid() == uid ) { |
459 | if ( retVal ) { | 459 | if ( retVal ) { |
460 | if ( retVal->calID() > todo->calID() ) { | 460 | if ( retVal->calID() > todo->calID() ) { |
461 | retVal = todo; | 461 | retVal = todo; |
462 | } | 462 | } |
463 | } else { | 463 | } else { |
464 | retVal = todo; | 464 | retVal = todo; |
465 | } | 465 | } |
466 | } | 466 | } |
467 | } | 467 | } |
468 | return retVal; | 468 | return retVal; |
469 | } | 469 | } |
470 | void CalendarLocal::getIncidenceCount( int calId, int& events, int & todos, int & journals) | ||
471 | { | ||
472 | events = 0; | ||
473 | todos = 0; | ||
474 | journals = 0; | ||
475 | { | ||
476 | Todo *todo; | ||
477 | for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { | ||
478 | if ( todo->calID() == calId ) | ||
479 | ++todos; | ||
480 | } | ||
481 | } | ||
482 | { | ||
483 | Event *todo; | ||
484 | for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { | ||
485 | if ( todo->calID() == calId ) | ||
486 | ++events; | ||
487 | |||
488 | } | ||
489 | } | ||
490 | for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) | ||
491 | if ( it->calID() == calId ) ++journals; | ||
492 | |||
493 | } | ||
470 | QString CalendarLocal::nextSummary() const | 494 | QString CalendarLocal::nextSummary() const |
471 | { | 495 | { |
472 | return mNextSummary; | 496 | return mNextSummary; |
473 | } | 497 | } |
474 | QDateTime CalendarLocal::nextAlarmEventDateTime() const | 498 | QDateTime CalendarLocal::nextAlarmEventDateTime() const |
475 | { | 499 | { |
476 | return mNextAlarmEventDateTime; | 500 | return mNextAlarmEventDateTime; |
477 | } | 501 | } |
478 | void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) | 502 | void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) |
479 | { | 503 | { |
480 | //mNextAlarmIncidence | 504 | //mNextAlarmIncidence |
481 | //mNextAlarmDateTime | 505 | //mNextAlarmDateTime |
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h index a7a85c8..ca0bd98 100644 --- a/libkcal/calendarlocal.h +++ b/libkcal/calendarlocal.h | |||
@@ -176,24 +176,25 @@ class CalendarLocal : public Calendar | |||
176 | /** | 176 | /** |
177 | Get unfiltered events for date \a qdt. | 177 | Get unfiltered events for date \a qdt. |
178 | */ | 178 | */ |
179 | QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); | 179 | QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); |
180 | /** | 180 | /** |
181 | Get unfiltered events in a range of dates. If inclusive is set to true, | 181 | Get unfiltered events in a range of dates. If inclusive is set to true, |
182 | only events are returned, which are completely included in the range. | 182 | only events are returned, which are completely included in the range. |
183 | */ | 183 | */ |
184 | QPtrList<Event> rawEvents( const QDate &start, const QDate &end, | 184 | QPtrList<Event> rawEvents( const QDate &start, const QDate &end, |
185 | bool inclusive = false ); | 185 | bool inclusive = false ); |
186 | Todo *todo( QString, QString ); | 186 | Todo *todo( QString, QString ); |
187 | Event *event( QString, QString ); | 187 | Event *event( QString, QString ); |
188 | void getIncidenceCount( int calId, int& events, int & todos, int & journals); | ||
188 | 189 | ||
189 | public slots: | 190 | public slots: |
190 | void setCalendarEnabled( int id, bool enable ); | 191 | void setCalendarEnabled( int id, bool enable ); |
191 | void setAlarmEnabled( int id, bool enable ); | 192 | void setAlarmEnabled( int id, bool enable ); |
192 | void setReadOnly( int id, bool enable ); | 193 | void setReadOnly( int id, bool enable ); |
193 | void setDefaultCalendarEnabledOnly(); | 194 | void setDefaultCalendarEnabledOnly(); |
194 | void setCalendarRemove( int id ); | 195 | void setCalendarRemove( int id ); |
195 | 196 | ||
196 | protected: | 197 | protected: |
197 | 198 | ||
198 | // Event* mNextAlarmEvent; | 199 | // Event* mNextAlarmEvent; |
199 | QString mNextSummary; | 200 | QString mNextSummary; |