author | zautrix <zautrix> | 2005-06-11 06:57:58 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-11 06:57:58 (UTC) |
commit | 53c616e1fe8855211377aab41b3359df5fea456c (patch) (unidiff) | |
tree | 1125bd437738f0bb414486857e14dad6b7bcfa48 | |
parent | e7ff7858eb79a452b65b77f8bf5ee108503f432a (diff) | |
download | kdepimpi-53c616e1fe8855211377aab41b3359df5fea456c.zip kdepimpi-53c616e1fe8855211377aab41b3359df5fea456c.tar.gz kdepimpi-53c616e1fe8855211377aab41b3359df5fea456c.tar.bz2 |
fixx
-rw-r--r-- | bin/kdepim/korganizer/bell.png | bin | 234 -> 639 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/icons16/trash.png | bin | 0 -> 626 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/trash.png | bin | 0 -> 626 bytes | |||
-rw-r--r-- | korganizer/calendarview.cpp | 7 | ||||
-rw-r--r-- | korganizer/calendarview.h | 2 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 64 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 11 |
7 files changed, 78 insertions, 6 deletions
diff --git a/bin/kdepim/korganizer/bell.png b/bin/kdepim/korganizer/bell.png index 8d2415b..46ab9e3 100644 --- a/bin/kdepim/korganizer/bell.png +++ b/bin/kdepim/korganizer/bell.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/korganizer/icons16/trash.png b/bin/kdepim/korganizer/icons16/trash.png new file mode 100644 index 0000000..ee5304a --- a/dev/null +++ b/bin/kdepim/korganizer/icons16/trash.png | |||
Binary files differ | |||
diff --git a/bin/kdepim/korganizer/trash.png b/bin/kdepim/korganizer/trash.png new file mode 100644 index 0000000..ee5304a --- a/dev/null +++ b/bin/kdepim/korganizer/trash.png | |||
Binary files differ | |||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 2a55127..ea100d1 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -412,97 +412,98 @@ void CalendarView::init() | |||
412 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); | 412 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); |
413 | mResourceView->updateView(); | 413 | mResourceView->updateView(); |
414 | connect( mResourceView, SIGNAL( resourcesChanged() ), | 414 | connect( mResourceView, SIGNAL( resourcesChanged() ), |
415 | SLOT( updateView() ) ); | 415 | SLOT( updateView() ) ); |
416 | } else { | 416 | } else { |
417 | mResourceView = 0; | 417 | mResourceView = 0; |
418 | } | 418 | } |
419 | #endif | 419 | #endif |
420 | QWidget *rightBox = new QWidget( mPanner ); | 420 | QWidget *rightBox = new QWidget( mPanner ); |
421 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 421 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
422 | 422 | ||
423 | mRightFrame = new QWidgetStack( rightBox ); | 423 | mRightFrame = new QWidgetStack( rightBox ); |
424 | rightLayout->addWidget( mRightFrame, 1 ); | 424 | rightLayout->addWidget( mRightFrame, 1 ); |
425 | 425 | ||
426 | mLeftFrame = mLeftSplitter; | 426 | mLeftFrame = mLeftSplitter; |
427 | #else | 427 | #else |
428 | //QWidget *mainBox = new QWidget( this ); | 428 | //QWidget *mainBox = new QWidget( this ); |
429 | //QWidget *leftFrame = new QWidget( mainBox ); | 429 | //QWidget *leftFrame = new QWidget( mainBox ); |
430 | //QBoxLayout * mainBoxLayout; | 430 | //QBoxLayout * mainBoxLayout; |
431 | if ( KOPrefs::instance()->mVerticalScreen ) { | 431 | if ( KOPrefs::instance()->mVerticalScreen ) { |
432 | //mainBoxLayout = new QVBoxLayout(mainBox); | 432 | //mainBoxLayout = new QVBoxLayout(mainBox); |
433 | //leftFrameLayout = new QHBoxLayout(leftFrame ); | 433 | //leftFrameLayout = new QHBoxLayout(leftFrame ); |
434 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); | 434 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); |
435 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 435 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
436 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; | 436 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; |
437 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 437 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
438 | } else { | 438 | } else { |
439 | //mainBoxLayout = new QHBoxLayout(mainBox); | 439 | //mainBoxLayout = new QHBoxLayout(mainBox); |
440 | //leftFrameLayout = new QVBoxLayout(leftFrame ); | 440 | //leftFrameLayout = new QVBoxLayout(leftFrame ); |
441 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 441 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
442 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); | 442 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); |
443 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); | 443 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); |
444 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 444 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
445 | } | 445 | } |
446 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | 446 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); |
447 | //QBoxLayout * leftFrameLayout; | 447 | //QBoxLayout * leftFrameLayout; |
448 | topLayout->addWidget( mMainFrame ); | 448 | topLayout->addWidget( mMainFrame ); |
449 | //mainBoxLayout->addWidget (mLeftFrame); | 449 | //mainBoxLayout->addWidget (mLeftFrame); |
450 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 450 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
451 | "CalendarView::DateNavigator" ); | 451 | "CalendarView::DateNavigator" ); |
452 | #if 0 | 452 | #if 0 |
453 | // FIXME | 453 | // FIXME |
454 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, | 454 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, |
455 | "CalendarView::DateNavigator", QDate::currentDate()); | 455 | "CalendarView::DateNavigator", QDate::currentDate()); |
456 | #endif | 456 | #endif |
457 | // mDateNavigator->blockSignals( true ); | 457 | // mDateNavigator->blockSignals( true ); |
458 | //leftFrameLayout->addWidget( mDateNavigator ); | 458 | //leftFrameLayout->addWidget( mDateNavigator ); |
459 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); | 459 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); |
460 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 460 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
461 | mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); | ||
461 | mTodoList->setNavigator( mNavigator ); | 462 | mTodoList->setNavigator( mNavigator ); |
462 | #if 0 | 463 | #if 0 |
463 | if ( QApplication::desktop()->width() < 480 ) { | 464 | if ( QApplication::desktop()->width() < 480 ) { |
464 | leftFrameLayout->addWidget(mFilterView); | 465 | leftFrameLayout->addWidget(mFilterView); |
465 | leftFrameLayout->addWidget(mTodoList, 2 ); | 466 | leftFrameLayout->addWidget(mTodoList, 2 ); |
466 | 467 | ||
467 | } else { | 468 | } else { |
468 | leftFrameLayout->addWidget(mTodoList,2 ); | 469 | leftFrameLayout->addWidget(mTodoList,2 ); |
469 | leftFrameLayout->addWidget(mFilterView ); | 470 | leftFrameLayout->addWidget(mFilterView ); |
470 | } | 471 | } |
471 | #endif | 472 | #endif |
472 | mFilterView->hide(); | 473 | mFilterView->hide(); |
473 | QWidget *rightBox = new QWidget( mMainFrame ); | 474 | QWidget *rightBox = new QWidget( mMainFrame ); |
474 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 475 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
475 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 476 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
476 | mRightFrame = new QWidgetStack( rightBox ); | 477 | mRightFrame = new QWidgetStack( rightBox ); |
477 | rightLayout->addWidget( mRightFrame, 10 ); | 478 | rightLayout->addWidget( mRightFrame, 10 ); |
478 | 479 | ||
479 | //mLeftFrame = (QWidget *)leftFrame; | 480 | //mLeftFrame = (QWidget *)leftFrame; |
480 | if ( KOPrefs::instance()->mVerticalScreen ) { | 481 | if ( KOPrefs::instance()->mVerticalScreen ) { |
481 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 482 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
482 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 483 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
483 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 484 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
484 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 485 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
485 | } else { | 486 | } else { |
486 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); | 487 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); |
487 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); | 488 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); |
488 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); | 489 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); |
489 | } | 490 | } |
490 | if ( !KOPrefs::instance()->mShowDateNavigator) | 491 | if ( !KOPrefs::instance()->mShowDateNavigator) |
491 | mDateNavigator->hide(); | 492 | mDateNavigator->hide(); |
492 | //qDebug("Calendarview Size %d %d ", width(), height()); | 493 | //qDebug("Calendarview Size %d %d ", width(), height()); |
493 | #endif | 494 | #endif |
494 | 495 | ||
495 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 496 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
496 | SLOT( showDates( const KCal::DateList & ) ) ); | 497 | SLOT( showDates( const KCal::DateList & ) ) ); |
497 | 498 | ||
498 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 499 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
499 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 500 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
500 | 501 | ||
501 | 502 | ||
502 | 503 | ||
503 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), | 504 | connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), |
504 | mViewManager, SLOT( showMonth( const QDate & ) ) ); | 505 | mViewManager, SLOT( showMonth( const QDate & ) ) ); |
505 | 506 | ||
506 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 507 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
507 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 508 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
508 | 509 | ||
@@ -3863,98 +3864,102 @@ void CalendarView::showDates(const DateList &selectedDates) | |||
3863 | addString = i18n("Tomorrow"); | 3864 | addString = i18n("Tomorrow"); |
3864 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) | 3865 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) |
3865 | addString = i18n("Yesterday"); | 3866 | addString = i18n("Yesterday"); |
3866 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) | 3867 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) |
3867 | addString = i18n("Day before yesterday"); | 3868 | addString = i18n("Day before yesterday"); |
3868 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) | 3869 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) |
3869 | addString = i18n("Day after tomorrow"); | 3870 | addString = i18n("Day after tomorrow"); |
3870 | if ( !addString.isEmpty() ) { | 3871 | if ( !addString.isEmpty() ) { |
3871 | topLevelWidget()->setCaption( addString+", " + selDates ); | 3872 | topLevelWidget()->setCaption( addString+", " + selDates ); |
3872 | return; | 3873 | return; |
3873 | } | 3874 | } |
3874 | } | 3875 | } |
3875 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); | 3876 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); |
3876 | 3877 | ||
3877 | } | 3878 | } |
3878 | 3879 | ||
3879 | QPtrList<CalFilter> CalendarView::filters() | 3880 | QPtrList<CalFilter> CalendarView::filters() |
3880 | { | 3881 | { |
3881 | return mFilters; | 3882 | return mFilters; |
3882 | 3883 | ||
3883 | } | 3884 | } |
3884 | void CalendarView::editFilters() | 3885 | void CalendarView::editFilters() |
3885 | { | 3886 | { |
3886 | // kdDebug() << "CalendarView::editFilters()" << endl; | 3887 | // kdDebug() << "CalendarView::editFilters()" << endl; |
3887 | 3888 | ||
3888 | CalFilter *filter = mFilters.first(); | 3889 | CalFilter *filter = mFilters.first(); |
3889 | while(filter) { | 3890 | while(filter) { |
3890 | kdDebug() << " Filter: " << filter->name() << endl; | 3891 | kdDebug() << " Filter: " << filter->name() << endl; |
3891 | filter = mFilters.next(); | 3892 | filter = mFilters.next(); |
3892 | } | 3893 | } |
3893 | 3894 | ||
3894 | mDialogManager->showFilterEditDialog(&mFilters); | 3895 | mDialogManager->showFilterEditDialog(&mFilters); |
3895 | } | 3896 | } |
3896 | void CalendarView::toggleFilter() | 3897 | void CalendarView::toggleFilter() |
3897 | { | 3898 | { |
3898 | showFilter(! mFilterView->isVisible()); | 3899 | showFilter(! mFilterView->isVisible()); |
3899 | } | 3900 | } |
3900 | 3901 | ||
3901 | KOFilterView *CalendarView::filterView() | 3902 | KOFilterView *CalendarView::filterView() |
3902 | { | 3903 | { |
3903 | return mFilterView; | 3904 | return mFilterView; |
3904 | } | 3905 | } |
3905 | void CalendarView::selectFilter( int fil ) | 3906 | void CalendarView::selectFilter( int fil ) |
3906 | { | 3907 | { |
3907 | mFilterView->setSelectedFilter( fil ); | 3908 | mFilterView->setSelectedFilter( fil ); |
3908 | } | 3909 | } |
3909 | void CalendarView::showFilter(bool visible) | 3910 | void CalendarView::showFilter(bool visible) |
3910 | { | 3911 | { |
3912 | if (visible) mCalEditView->show(); | ||
3913 | else mCalEditView->hide(); | ||
3914 | #if 0 | ||
3911 | if (visible) mFilterView->show(); | 3915 | if (visible) mFilterView->show(); |
3912 | else mFilterView->hide(); | 3916 | else mFilterView->hide(); |
3917 | #endif | ||
3913 | } | 3918 | } |
3914 | void CalendarView::toggleFilerEnabled( ) | 3919 | void CalendarView::toggleFilerEnabled( ) |
3915 | { | 3920 | { |
3916 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 3921 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
3917 | if ( !mFilterView->filtersEnabled() ) | 3922 | if ( !mFilterView->filtersEnabled() ) |
3918 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 3923 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
3919 | 3924 | ||
3920 | } | 3925 | } |
3921 | void CalendarView::updateFilter() | 3926 | void CalendarView::updateFilter() |
3922 | { | 3927 | { |
3923 | CalFilter *filter = mFilterView->selectedFilter(); | 3928 | CalFilter *filter = mFilterView->selectedFilter(); |
3924 | if (filter) { | 3929 | if (filter) { |
3925 | QString mess; | 3930 | QString mess; |
3926 | if (mFilterView->filtersEnabled()) { | 3931 | if (mFilterView->filtersEnabled()) { |
3927 | mess = i18n("Filter selected: ")+filter->name(); | 3932 | mess = i18n("Filter selected: ")+filter->name(); |
3928 | filter->setEnabled(true); | 3933 | filter->setEnabled(true); |
3929 | } | 3934 | } |
3930 | else filter->setEnabled(false); | 3935 | else filter->setEnabled(false); |
3931 | mCalendar->setFilter(filter); | 3936 | mCalendar->setFilter(filter); |
3932 | updateView(); | 3937 | updateView(); |
3933 | if ( !mess.isEmpty() ) | 3938 | if ( !mess.isEmpty() ) |
3934 | topLevelWidget()->setCaption( mess ); | 3939 | topLevelWidget()->setCaption( mess ); |
3935 | 3940 | ||
3936 | } | 3941 | } |
3937 | } | 3942 | } |
3938 | 3943 | ||
3939 | void CalendarView::filterEdited() | 3944 | void CalendarView::filterEdited() |
3940 | { | 3945 | { |
3941 | mFilterView->updateFilters(); | 3946 | mFilterView->updateFilters(); |
3942 | updateFilter(); | 3947 | updateFilter(); |
3943 | writeSettings(); | 3948 | writeSettings(); |
3944 | } | 3949 | } |
3945 | 3950 | ||
3946 | 3951 | ||
3947 | void CalendarView::takeOverEvent() | 3952 | void CalendarView::takeOverEvent() |
3948 | { | 3953 | { |
3949 | Incidence *incidence = currentSelection(); | 3954 | Incidence *incidence = currentSelection(); |
3950 | 3955 | ||
3951 | if (!incidence) return; | 3956 | if (!incidence) return; |
3952 | 3957 | ||
3953 | incidence->setOrganizer(KOPrefs::instance()->email()); | 3958 | incidence->setOrganizer(KOPrefs::instance()->email()); |
3954 | incidence->recreate(); | 3959 | incidence->recreate(); |
3955 | incidence->setReadOnly(false); | 3960 | incidence->setReadOnly(false); |
3956 | 3961 | ||
3957 | updateView(); | 3962 | updateView(); |
3958 | } | 3963 | } |
3959 | 3964 | ||
3960 | void CalendarView::takeOverCalendar() | 3965 | void CalendarView::takeOverCalendar() |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 1215a99..cdce072 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -5,96 +5,97 @@ | |||
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or | 8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. | 9 | (at your option) any later version. |
10 | 10 | ||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 | #ifndef CALENDARVIEW_H | 24 | #ifndef CALENDARVIEW_H |
25 | #define CALENDARVIEW_H | 25 | #define CALENDARVIEW_H |
26 | 26 | ||
27 | #include <qframe.h> | 27 | #include <qframe.h> |
28 | #include <qlayout.h> | 28 | #include <qlayout.h> |
29 | #include <qwidget.h> | 29 | #include <qwidget.h> |
30 | #include <qptrlist.h> | 30 | #include <qptrlist.h> |
31 | #include <qvbox.h> | 31 | #include <qvbox.h> |
32 | #include <qmap.h> | 32 | #include <qmap.h> |
33 | #ifndef DESKTOP_VERSION | 33 | #ifndef DESKTOP_VERSION |
34 | #include <qtopia/ir.h> | 34 | #include <qtopia/ir.h> |
35 | #else | 35 | #else |
36 | #define Ir char | 36 | #define Ir char |
37 | #endif | 37 | #endif |
38 | #include <libkcal/calendar.h> | 38 | #include <libkcal/calendar.h> |
39 | #include <libkcal/scheduler.h> | 39 | #include <libkcal/scheduler.h> |
40 | #include <libkcal/calendarresources.h> | 40 | #include <libkcal/calendarresources.h> |
41 | #include <libkcal/resourcecalendar.h> | 41 | #include <libkcal/resourcecalendar.h> |
42 | #include <KDGanttMinimizeSplitter.h> | 42 | #include <KDGanttMinimizeSplitter.h> |
43 | 43 | ||
44 | #include <korganizer/calendarviewbase.h> | 44 | #include <korganizer/calendarviewbase.h> |
45 | 45 | ||
46 | #include <ksyncmanager.h> | 46 | #include <ksyncmanager.h> |
47 | 47 | ||
48 | class QWidgetStack; | 48 | class QWidgetStack; |
49 | class QSplitter; | 49 | class QSplitter; |
50 | 50 | ||
51 | class CalPrinter; | 51 | class CalPrinter; |
52 | class KOFilterView; | 52 | class KOFilterView; |
53 | class KOCalEditView; | ||
53 | class KOViewManager; | 54 | class KOViewManager; |
54 | class KODialogManager; | 55 | class KODialogManager; |
55 | class KOTodoView; | 56 | class KOTodoView; |
56 | class KDateNavigator; | 57 | class KDateNavigator; |
57 | class DateNavigatorContainer; | 58 | class DateNavigatorContainer; |
58 | class DateNavigator; | 59 | class DateNavigator; |
59 | class KOIncidenceEditor; | 60 | class KOIncidenceEditor; |
60 | class KDatePicker; | 61 | class KDatePicker; |
61 | class ResourceView; | 62 | class ResourceView; |
62 | class KOEventEditor; | 63 | class KOEventEditor; |
63 | class KOTodoEditor ; | 64 | class KOTodoEditor ; |
64 | class KOEventViewerDialog; | 65 | class KOEventViewerDialog; |
65 | class KOBeamPrefs; | 66 | class KOBeamPrefs; |
66 | class KSyncProfile; | 67 | class KSyncProfile; |
67 | class AlarmDialog; | 68 | class AlarmDialog; |
68 | class KCal::Attendee; | 69 | class KCal::Attendee; |
69 | 70 | ||
70 | namespace KCal { class FileStorage; } | 71 | namespace KCal { class FileStorage; } |
71 | 72 | ||
72 | using namespace KCal; | 73 | using namespace KCal; |
73 | 74 | ||
74 | /** | 75 | /** |
75 | This is the main calendar widget. It provides the different vies on t he | 76 | This is the main calendar widget. It provides the different vies on t he |
76 | calendar data as well as the date navigator. It also handles synchronisation | 77 | calendar data as well as the date navigator. It also handles synchronisation |
77 | of the different views and controls the different dialogs like preferences, | 78 | of the different views and controls the different dialogs like preferences, |
78 | event editor, search dialog etc. | 79 | event editor, search dialog etc. |
79 | 80 | ||
80 | @short main calendar view widget | 81 | @short main calendar view widget |
81 | @author Cornelius Schumacher | 82 | @author Cornelius Schumacher |
82 | */ | 83 | */ |
83 | 84 | ||
84 | #include <qtextbrowser.h> | 85 | #include <qtextbrowser.h> |
85 | #include <qtextcodec.h> | 86 | #include <qtextcodec.h> |
86 | 87 | ||
87 | class MissedAlarmTextBrowser : public QTextBrowser { | 88 | class MissedAlarmTextBrowser : public QTextBrowser { |
88 | Q_OBJECT | 89 | Q_OBJECT |
89 | public: | 90 | public: |
90 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); | 91 | MissedAlarmTextBrowser(QWidget *parent, QPtrList<Incidence> alarms ,QDateTime start); |
91 | ~MissedAlarmTextBrowser(); | 92 | ~MissedAlarmTextBrowser(); |
92 | void setSource(const QString & n); | 93 | void setSource(const QString & n); |
93 | 94 | ||
94 | private: | 95 | private: |
95 | Incidence * getNextInc(QDateTime start ); | 96 | Incidence * getNextInc(QDateTime start ); |
96 | QPtrList<Incidence> mAlarms; | 97 | QPtrList<Incidence> mAlarms; |
97 | signals: | 98 | signals: |
98 | void showIncidence( QString uid); | 99 | void showIncidence( QString uid); |
99 | }; | 100 | }; |
100 | 101 | ||
@@ -521,96 +522,97 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
521 | void showEventEditor(); | 522 | void showEventEditor(); |
522 | void showTodoEditor(); | 523 | void showTodoEditor(); |
523 | void writeLocale(); | 524 | void writeLocale(); |
524 | Todo *selectedTodo(); | 525 | Todo *selectedTodo(); |
525 | 526 | ||
526 | private: | 527 | private: |
527 | QDateTime mNextAlarmDateTime; | 528 | QDateTime mNextAlarmDateTime; |
528 | bool mViewerCallerIsSearchDialog; | 529 | bool mViewerCallerIsSearchDialog; |
529 | bool mBlockShowDates; | 530 | bool mBlockShowDates; |
530 | KSyncManager* mSyncManager; | 531 | KSyncManager* mSyncManager; |
531 | AlarmDialog * mAlarmDialog; | 532 | AlarmDialog * mAlarmDialog; |
532 | QString mAlarmNotification; | 533 | QString mAlarmNotification; |
533 | QString mSuspendAlarmNotification; | 534 | QString mSuspendAlarmNotification; |
534 | QTimer* mSuspendTimer; | 535 | QTimer* mSuspendTimer; |
535 | QTimer* mAlarmTimer; | 536 | QTimer* mAlarmTimer; |
536 | QTimer* mRecheckAlarmTimer; | 537 | QTimer* mRecheckAlarmTimer; |
537 | void computeAlarm( QString ); | 538 | void computeAlarm( QString ); |
538 | void startAlarm( QString, QString ); | 539 | void startAlarm( QString, QString ); |
539 | void setSyncEventsReadOnly(); | 540 | void setSyncEventsReadOnly(); |
540 | 541 | ||
541 | QDateTime loadedFileVersion; | 542 | QDateTime loadedFileVersion; |
542 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); | 543 | void checkExternSyncEvent( QPtrList<Event> lastSync , Incidence* toDelete ); |
543 | void checkExternalId( Incidence * inc ); | 544 | void checkExternalId( Incidence * inc ); |
544 | int mGlobalSyncMode; | 545 | int mGlobalSyncMode; |
545 | QString mCurrentSyncDevice; | 546 | QString mCurrentSyncDevice; |
546 | QString mCurrentSyncName; | 547 | QString mCurrentSyncName; |
547 | KOBeamPrefs* beamDialog; | 548 | KOBeamPrefs* beamDialog; |
548 | void init(); | 549 | void init(); |
549 | int mDatePickerMode; | 550 | int mDatePickerMode; |
550 | bool mFlagEditDescription; | 551 | bool mFlagEditDescription; |
551 | QDateTime mLastCalendarSync; | 552 | QDateTime mLastCalendarSync; |
552 | void createPrinter(); | 553 | void createPrinter(); |
553 | 554 | ||
554 | void calendarModified( bool, Calendar * ); | 555 | void calendarModified( bool, Calendar * ); |
555 | 556 | ||
556 | CalPrinter *mCalPrinter; | 557 | CalPrinter *mCalPrinter; |
557 | 558 | ||
558 | QSplitter *mPanner; | 559 | QSplitter *mPanner; |
559 | QSplitter *mLeftSplitter; | 560 | QSplitter *mLeftSplitter; |
560 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; | 561 | KDGanttMinimizeSplitter *mLeftFrame, *mMainFrame; |
561 | QWidgetStack *mRightFrame; | 562 | QWidgetStack *mRightFrame; |
562 | 563 | ||
563 | KDatePicker* mDatePicker; | 564 | KDatePicker* mDatePicker; |
564 | QVBox* mDateFrame; | 565 | QVBox* mDateFrame; |
565 | 566 | ||
566 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. | 567 | DateNavigatorContainer *mDateNavigator; // widget showing small month view. |
567 | 568 | ||
568 | KOFilterView *mFilterView; | 569 | KOFilterView *mFilterView; |
570 | KOCalEditView *mCalEditView; | ||
569 | 571 | ||
570 | ResourceView *mResourceView; | 572 | ResourceView *mResourceView; |
571 | 573 | ||
572 | // calendar object for this viewing instance | 574 | // calendar object for this viewing instance |
573 | Calendar *mCalendar; | 575 | Calendar *mCalendar; |
574 | 576 | ||
575 | CalendarResourceManager *mResourceManager; | 577 | CalendarResourceManager *mResourceManager; |
576 | 578 | ||
577 | FileStorage *mStorage; | 579 | FileStorage *mStorage; |
578 | 580 | ||
579 | DateNavigator *mNavigator; | 581 | DateNavigator *mNavigator; |
580 | 582 | ||
581 | KOViewManager *mViewManager; | 583 | KOViewManager *mViewManager; |
582 | KODialogManager *mDialogManager; | 584 | KODialogManager *mDialogManager; |
583 | 585 | ||
584 | // Calendar filters | 586 | // Calendar filters |
585 | QPtrList<CalFilter> mFilters; | 587 | QPtrList<CalFilter> mFilters; |
586 | 588 | ||
587 | // various housekeeping variables. | 589 | // various housekeeping variables. |
588 | bool mModified; // flag indicating if calendar is modified | 590 | bool mModified; // flag indicating if calendar is modified |
589 | bool mReadOnly; // flag indicating if calendar is read-only | 591 | bool mReadOnly; // flag indicating if calendar is read-only |
590 | QDate mSaveSingleDate; | 592 | QDate mSaveSingleDate; |
591 | 593 | ||
592 | Incidence *mSelectedIncidence; | 594 | Incidence *mSelectedIncidence; |
593 | Incidence *mMoveIncidence; | 595 | Incidence *mMoveIncidence; |
594 | QDate mMoveIncidenceOldDate; | 596 | QDate mMoveIncidenceOldDate; |
595 | KOTodoView *mTodoList; | 597 | KOTodoView *mTodoList; |
596 | KOEventEditor * mEventEditor; | 598 | KOEventEditor * mEventEditor; |
597 | KOTodoEditor * mTodoEditor; | 599 | KOTodoEditor * mTodoEditor; |
598 | KOEventViewerDialog * mEventViewerDialog; | 600 | KOEventViewerDialog * mEventViewerDialog; |
599 | void keyPressEvent ( QKeyEvent *e) ; | 601 | void keyPressEvent ( QKeyEvent *e) ; |
600 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; | 602 | //QMap<Incidence*,KOIncidenceEditor*> mDialogList; |
601 | }; | 603 | }; |
602 | 604 | ||
603 | 605 | ||
604 | class CalendarViewVisitor : public Incidence::Visitor | 606 | class CalendarViewVisitor : public Incidence::Visitor |
605 | { | 607 | { |
606 | public: | 608 | public: |
607 | CalendarViewVisitor() : mView( 0 ) {} | 609 | CalendarViewVisitor() : mView( 0 ) {} |
608 | 610 | ||
609 | bool act( Incidence *incidence, CalendarView *view ) | 611 | bool act( Incidence *incidence, CalendarView *view ) |
610 | { | 612 | { |
611 | mView = view; | 613 | mView = view; |
612 | return incidence->accept( *this ); | 614 | return incidence->accept( *this ); |
613 | } | 615 | } |
614 | 616 | ||
615 | protected: | 617 | protected: |
616 | CalendarView *mView; | 618 | CalendarView *mView; |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index f0d17b5..64675ad 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -1,116 +1,176 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
26 | #include <qpushbutton.h> | 26 | #include <qpushbutton.h> |
27 | #include <qlayout.h> | ||
28 | #include <qlabel.h> | ||
27 | 29 | ||
28 | 30 | ||
29 | #include <libkcal/calfilter.h> | 31 | #include <libkcal/calfilter.h> |
30 | 32 | ||
31 | #include "kofilterview.h" | 33 | #include "kofilterview.h" |
34 | #include <kiconloader.h> | ||
35 | #include <kglobal.h> | ||
32 | 36 | ||
33 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, | 37 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, |
34 | const char* name,WFlags fl ) | 38 | const char* name,WFlags fl ) |
35 | : KOFilterView_base(parent,name,fl) | 39 | : KOFilterView_base(parent,name,fl) |
36 | { | 40 | { |
37 | mFilters = filterList; | 41 | mFilters = filterList; |
38 | 42 | ||
39 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 43 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); |
40 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 44 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); |
41 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); | 45 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); |
42 | } | 46 | } |
43 | 47 | ||
44 | KOFilterView::~KOFilterView() | 48 | KOFilterView::~KOFilterView() |
45 | { | 49 | { |
46 | // no need to delete child widgets, Qt does it all for us | 50 | // no need to delete child widgets, Qt does it all for us |
47 | } | 51 | } |
48 | 52 | ||
49 | bool KOFilterView::filtersEnabled() | 53 | bool KOFilterView::filtersEnabled() |
50 | { | 54 | { |
51 | return mEnabledCheck->isChecked(); | 55 | return mEnabledCheck->isChecked(); |
52 | } | 56 | } |
53 | 57 | ||
54 | void KOFilterView::setFiltersEnabled(bool set) | 58 | void KOFilterView::setFiltersEnabled(bool set) |
55 | { | 59 | { |
56 | mEnabledCheck->setChecked(set); | 60 | mEnabledCheck->setChecked(set); |
57 | emit filterChanged(); | 61 | emit filterChanged(); |
58 | } | 62 | } |
59 | 63 | ||
60 | 64 | ||
61 | void KOFilterView::updateFilters() | 65 | void KOFilterView::updateFilters() |
62 | { | 66 | { |
63 | mSelectionCombo->clear(); | 67 | mSelectionCombo->clear(); |
64 | 68 | ||
65 | CalFilter *filter = mFilters->first(); | 69 | CalFilter *filter = mFilters->first(); |
66 | while(filter) { | 70 | while(filter) { |
67 | mSelectionCombo->insertItem(filter->name()); | 71 | mSelectionCombo->insertItem(filter->name()); |
68 | filter = mFilters->next(); | 72 | filter = mFilters->next(); |
69 | } | 73 | } |
70 | } | 74 | } |
71 | 75 | ||
72 | CalFilter *KOFilterView::selectedFilter() | 76 | CalFilter *KOFilterView::selectedFilter() |
73 | { | 77 | { |
74 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); | 78 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); |
75 | return f; | 79 | return f; |
76 | } | 80 | } |
77 | 81 | ||
78 | void KOFilterView::setSelectedFilter(QString filterName) | 82 | void KOFilterView::setSelectedFilter(QString filterName) |
79 | { | 83 | { |
80 | int filter_num = mSelectionCombo->count(); | 84 | int filter_num = mSelectionCombo->count(); |
81 | int i; | 85 | int i; |
82 | for (i=0;i<filter_num;i++) { | 86 | for (i=0;i<filter_num;i++) { |
83 | if (mSelectionCombo->text(i)==filterName) | 87 | if (mSelectionCombo->text(i)==filterName) |
84 | mSelectionCombo->setCurrentItem(i); | 88 | mSelectionCombo->setCurrentItem(i); |
85 | } | 89 | } |
86 | emit filterChanged(); | 90 | emit filterChanged(); |
87 | } | 91 | } |
88 | void KOFilterView::setSelectedFilter( int fil ) | 92 | void KOFilterView::setSelectedFilter( int fil ) |
89 | { | 93 | { |
90 | if ( fil >= mSelectionCombo->count() ) | 94 | if ( fil >= mSelectionCombo->count() ) |
91 | return; | 95 | return; |
92 | mSelectionCombo->setCurrentItem( fil ); | 96 | mSelectionCombo->setCurrentItem( fil ); |
93 | emit filterChanged(); | 97 | emit filterChanged(); |
94 | } | 98 | } |
95 | 99 | ||
96 | 100 | ||
97 | 101 | ||
98 | KOCalEditView::KOCalEditView(QWidget* parent, | 102 | KOCalEditView::KOCalEditView(QWidget* parent, |
99 | const char* name,WFlags fl ) | 103 | const char* name ) |
100 | : QWidget(parent,name,fl) | 104 | : QWidget(parent,name) |
101 | { | 105 | { |
102 | /* | 106 | /* |
103 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 107 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); |
104 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 108 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); |
105 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits())); | 109 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits())); |
106 | */ | 110 | */ |
111 | QGridLayout* mainLayout = new QGridLayout ( this , 2, 6 ); | ||
112 | QPushButton * addBut = new QPushButton ( this ); | ||
113 | mainLayout->addWidget( addBut,0,0 ); | ||
114 | addBut->setPixmap ( SmallIcon("redcross16")); | ||
115 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); | ||
116 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | ||
117 | |||
118 | addBut = new QPushButton ( this ); | ||
119 | mainLayout->addWidget( addBut,0,1 ); | ||
120 | addBut->setPixmap ( SmallIcon("redcross16")); | ||
121 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | ||
122 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | ||
123 | |||
124 | QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", this ); | ||
125 | mainLayout->addWidget( lab,0,2 ); | ||
126 | |||
127 | addBut = new QPushButton ( this ); | ||
128 | mainLayout->addWidget( addBut,0,3 ); | ||
129 | addBut->setPixmap ( SmallIcon("redcross16")); | ||
130 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | ||
131 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | ||
132 | |||
133 | addBut = new QPushButton ( this ); | ||
134 | mainLayout->addWidget( addBut,0,4 ); | ||
135 | addBut->setPixmap ( SmallIcon("redcross16")); | ||
136 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | ||
137 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | ||
138 | |||
139 | addBut = new QPushButton ( this ); | ||
140 | mainLayout->addWidget( addBut,0,5 ); | ||
141 | addBut->setPixmap ( SmallIcon("trash")); | ||
142 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); | ||
143 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | ||
144 | |||
145 | |||
146 | |||
107 | } | 147 | } |
108 | 148 | ||
109 | KOCalEditView::~KOCalEditView() | 149 | KOCalEditView::~KOCalEditView() |
110 | { | 150 | { |
111 | // no need to delete child widgets, Qt does it all for us | 151 | // no need to delete child widgets, Qt does it all for us |
112 | } | 152 | } |
113 | void KOCalEditView::readConfig( KConfig *) | 153 | void KOCalEditView::readConfig( KConfig *) |
114 | { | 154 | { |
115 | 155 | ||
116 | } | 156 | } |
157 | void KOCalEditView::addCal() | ||
158 | { | ||
159 | qDebug("addcal "); | ||
160 | } | ||
161 | void KOCalEditView::enableAll() | ||
162 | { | ||
163 | qDebug("enableAll"); | ||
164 | } | ||
165 | void KOCalEditView::enableAlarm() | ||
166 | { | ||
167 | qDebug("enableAlarm"); | ||
168 | } | ||
169 | void KOCalEditView::disableRO() | ||
170 | { | ||
171 | qDebug("OCalEditView::disableRO() "); | ||
172 | } | ||
173 | void KOCalEditView::deleteAll() | ||
174 | { | ||
175 | qDebug("delteAll"); | ||
176 | } | ||
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 2ac4da1..d434c52 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -1,78 +1,83 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | #ifndef KOFILTERVIEW_H | 23 | #ifndef KOFILTERVIEW_H |
24 | #define KOFILTERVIEW_H | 24 | #define KOFILTERVIEW_H |
25 | 25 | ||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <kconfig.h> | 27 | #include <kconfig.h> |
28 | #include "kofilterview_base.h" | 28 | #include "kofilterview_base.h" |
29 | 29 | ||
30 | #include <libkcal/calfilter.h> | 30 | #include <libkcal/calfilter.h> |
31 | 31 | ||
32 | using namespace KCal; | 32 | using namespace KCal; |
33 | 33 | ||
34 | class KOFilterView : public KOFilterView_base | 34 | class KOFilterView : public KOFilterView_base |
35 | { | 35 | { |
36 | Q_OBJECT | 36 | Q_OBJECT |
37 | public: | 37 | public: |
38 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | 38 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); |
39 | ~KOFilterView(); | 39 | ~KOFilterView(); |
40 | 40 | ||
41 | void updateFilters(); | 41 | void updateFilters(); |
42 | 42 | ||
43 | bool filtersEnabled(); | 43 | bool filtersEnabled(); |
44 | void setFiltersEnabled(bool); | 44 | void setFiltersEnabled(bool); |
45 | CalFilter *selectedFilter(); | 45 | CalFilter *selectedFilter(); |
46 | void setSelectedFilter(QString); | 46 | void setSelectedFilter(QString); |
47 | void setSelectedFilter( int ); | 47 | void setSelectedFilter( int ); |
48 | 48 | ||
49 | signals: | 49 | signals: |
50 | void filterChanged(); | 50 | void filterChanged(); |
51 | void editFilters(); | 51 | void editFilters(); |
52 | 52 | ||
53 | private: | 53 | private: |
54 | QPtrList<CalFilter> *mFilters; | 54 | QPtrList<CalFilter> *mFilters; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | class KOCalEditView : public QWidget | 57 | class KOCalEditView : public QWidget |
58 | { | 58 | { |
59 | Q_OBJECT | 59 | Q_OBJECT |
60 | public: | 60 | public: |
61 | KOCalEditView( QWidget* parent=0,const char* name=0, WFlags fl=0); | 61 | KOCalEditView( QWidget* parent=0,const char* name=0); |
62 | ~KOCalEditView(); | 62 | ~KOCalEditView(); |
63 | 63 | ||
64 | void readConfig( KConfig *); | 64 | void readConfig( KConfig *); |
65 | 65 | public slots: | |
66 | void addCal(); | ||
67 | void enableAll(); | ||
68 | void enableAlarm(); | ||
69 | void disableRO(); | ||
70 | void deleteAll(); | ||
66 | signals: | 71 | signals: |
67 | void alarmEnabled ( int cal, bool enable ); | 72 | void alarmEnabled ( int cal, bool enable ); |
68 | void calendarEnabled ( int cal, bool enable ); | 73 | void calendarEnabled ( int cal, bool enable ); |
69 | void calendarReadonly ( int cal, bool readonly ); | 74 | void calendarReadonly ( int cal, bool readonly ); |
70 | void setCalendarDefault ( int cal ); | 75 | void setCalendarDefault ( int cal ); |
71 | void removeCalendar ( int cal ); | 76 | void removeCalendar ( int cal ); |
72 | 77 | ||
73 | private: | 78 | private: |
74 | }; | 79 | }; |
75 | 80 | ||
76 | 81 | ||
77 | 82 | ||
78 | #endif // KOFILTERVIEW_H | 83 | #endif // KOFILTERVIEW_H |