-rw-r--r-- | korganizer/calendarview.cpp | 7 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 255 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 118 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 7 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 |
5 files changed, 312 insertions, 76 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 753d81f..1024b4e 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -3815,258 +3815,261 @@ void CalendarView::processIncidenceSelection( Incidence *incidence ) | |||
3815 | emit organizerEventsSelected(false); | 3815 | emit organizerEventsSelected(false); |
3816 | } | 3816 | } |
3817 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 3817 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
3818 | KOPrefs::instance()->email() ) ) { | 3818 | KOPrefs::instance()->email() ) ) { |
3819 | emit groupEventsSelected( true ); | 3819 | emit groupEventsSelected( true ); |
3820 | } else { | 3820 | } else { |
3821 | emit groupEventsSelected(false); | 3821 | emit groupEventsSelected(false); |
3822 | } | 3822 | } |
3823 | return; | 3823 | return; |
3824 | } else { | 3824 | } else { |
3825 | if ( incidence && incidence->typeID() == todoID ) { | 3825 | if ( incidence && incidence->typeID() == todoID ) { |
3826 | emit todoSelected( true ); | 3826 | emit todoSelected( true ); |
3827 | Todo *event = static_cast<Todo *>( incidence ); | 3827 | Todo *event = static_cast<Todo *>( incidence ); |
3828 | if ( event->organizer() == KOPrefs::instance()->email() ) { | 3828 | if ( event->organizer() == KOPrefs::instance()->email() ) { |
3829 | emit organizerEventsSelected( true ); | 3829 | emit organizerEventsSelected( true ); |
3830 | } else { | 3830 | } else { |
3831 | emit organizerEventsSelected(false); | 3831 | emit organizerEventsSelected(false); |
3832 | } | 3832 | } |
3833 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, | 3833 | if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, |
3834 | KOPrefs::instance()->email() ) ) { | 3834 | KOPrefs::instance()->email() ) ) { |
3835 | emit groupEventsSelected( true ); | 3835 | emit groupEventsSelected( true ); |
3836 | } else { | 3836 | } else { |
3837 | emit groupEventsSelected(false); | 3837 | emit groupEventsSelected(false); |
3838 | } | 3838 | } |
3839 | return; | 3839 | return; |
3840 | } else { | 3840 | } else { |
3841 | emit todoSelected( false ); | 3841 | emit todoSelected( false ); |
3842 | emit organizerEventsSelected(false); | 3842 | emit organizerEventsSelected(false); |
3843 | emit groupEventsSelected(false); | 3843 | emit groupEventsSelected(false); |
3844 | } | 3844 | } |
3845 | return; | 3845 | return; |
3846 | } | 3846 | } |
3847 | 3847 | ||
3848 | /* if ( incidence && incidence->typeID() == todoID ) { | 3848 | /* if ( incidence && incidence->typeID() == todoID ) { |
3849 | emit todoSelected( true ); | 3849 | emit todoSelected( true ); |
3850 | } else { | 3850 | } else { |
3851 | emit todoSelected( false ); | 3851 | emit todoSelected( false ); |
3852 | }*/ | 3852 | }*/ |
3853 | } | 3853 | } |
3854 | 3854 | ||
3855 | 3855 | ||
3856 | void CalendarView::checkClipboard() | 3856 | void CalendarView::checkClipboard() |
3857 | { | 3857 | { |
3858 | #ifndef KORG_NODND | 3858 | #ifndef KORG_NODND |
3859 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { | 3859 | if (ICalDrag::canDecode(QApplication::clipboard()->data())) { |
3860 | emit pasteEnabled(true); | 3860 | emit pasteEnabled(true); |
3861 | } else { | 3861 | } else { |
3862 | emit pasteEnabled(false); | 3862 | emit pasteEnabled(false); |
3863 | } | 3863 | } |
3864 | #endif | 3864 | #endif |
3865 | } | 3865 | } |
3866 | 3866 | ||
3867 | void CalendarView::showDates(const DateList &selectedDates) | 3867 | void CalendarView::showDates(const DateList &selectedDates) |
3868 | { | 3868 | { |
3869 | // kdDebug() << "CalendarView::selectDates()" << endl; | 3869 | // kdDebug() << "CalendarView::selectDates()" << endl; |
3870 | 3870 | ||
3871 | 3871 | ||
3872 | if ( !mBlockShowDates ) { | 3872 | if ( !mBlockShowDates ) { |
3873 | if ( mViewManager->currentView() ) { | 3873 | if ( mViewManager->currentView() ) { |
3874 | updateView( selectedDates.first(), selectedDates.last() ); | 3874 | updateView( selectedDates.first(), selectedDates.last() ); |
3875 | } else { | 3875 | } else { |
3876 | mViewManager->showAgendaView(); | 3876 | mViewManager->showAgendaView(); |
3877 | } | 3877 | } |
3878 | } | 3878 | } |
3879 | 3879 | ||
3880 | QDate date = selectedDates.first(); | 3880 | QDate date = selectedDates.first(); |
3881 | if ( ! date.isValid() ) { | 3881 | if ( ! date.isValid() ) { |
3882 | topLevelWidget()->setCaption(""); | 3882 | topLevelWidget()->setCaption(""); |
3883 | return; | 3883 | return; |
3884 | } | 3884 | } |
3885 | 3885 | ||
3886 | QString selDates; | 3886 | QString selDates; |
3887 | selDates = KGlobal::locale()->formatDate( date, true); | 3887 | selDates = KGlobal::locale()->formatDate( date, true); |
3888 | if (selectedDates.first() < selectedDates.last() ) | 3888 | if (selectedDates.first() < selectedDates.last() ) |
3889 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); | 3889 | selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); |
3890 | else { | 3890 | else { |
3891 | QString addString; | 3891 | QString addString; |
3892 | if ( date == QDateTime::currentDateTime().date() ) | 3892 | if ( date == QDateTime::currentDateTime().date() ) |
3893 | addString = i18n("Today"); | 3893 | addString = i18n("Today"); |
3894 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 3894 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
3895 | addString = i18n("Tomorrow"); | 3895 | addString = i18n("Tomorrow"); |
3896 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) | 3896 | else if ( date == QDateTime::currentDateTime().date().addDays(-1) ) |
3897 | addString = i18n("Yesterday"); | 3897 | addString = i18n("Yesterday"); |
3898 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) | 3898 | else if ( date == QDateTime::currentDateTime().date().addDays(-2) ) |
3899 | addString = i18n("Day before yesterday"); | 3899 | addString = i18n("Day before yesterday"); |
3900 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) | 3900 | else if ( date == QDateTime::currentDateTime().date().addDays(2) ) |
3901 | addString = i18n("Day after tomorrow"); | 3901 | addString = i18n("Day after tomorrow"); |
3902 | if ( !addString.isEmpty() ) { | 3902 | if ( !addString.isEmpty() ) { |
3903 | topLevelWidget()->setCaption( addString+", " + selDates ); | 3903 | topLevelWidget()->setCaption( addString+", " + selDates ); |
3904 | return; | 3904 | return; |
3905 | } | 3905 | } |
3906 | } | 3906 | } |
3907 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); | 3907 | topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); |
3908 | 3908 | ||
3909 | } | 3909 | } |
3910 | 3910 | ||
3911 | QPtrList<CalFilter> CalendarView::filters() | 3911 | QPtrList<CalFilter> CalendarView::filters() |
3912 | { | 3912 | { |
3913 | return mFilters; | 3913 | return mFilters; |
3914 | 3914 | ||
3915 | } | 3915 | } |
3916 | void CalendarView::editFilters() | 3916 | void CalendarView::editFilters() |
3917 | { | 3917 | { |
3918 | // kdDebug() << "CalendarView::editFilters()" << endl; | 3918 | // kdDebug() << "CalendarView::editFilters()" << endl; |
3919 | 3919 | ||
3920 | CalFilter *filter = mFilters.first(); | 3920 | CalFilter *filter = mFilters.first(); |
3921 | while(filter) { | 3921 | while(filter) { |
3922 | kdDebug() << " Filter: " << filter->name() << endl; | 3922 | kdDebug() << " Filter: " << filter->name() << endl; |
3923 | filter = mFilters.next(); | 3923 | filter = mFilters.next(); |
3924 | } | 3924 | } |
3925 | 3925 | ||
3926 | mDialogManager->showFilterEditDialog(&mFilters); | 3926 | mDialogManager->showFilterEditDialog(&mFilters); |
3927 | } | 3927 | } |
3928 | void CalendarView::toggleFilter() | 3928 | void CalendarView::toggleFilter() |
3929 | { | 3929 | { |
3930 | showFilter(! mFilterView->isVisible()); | 3930 | showFilter(! mFilterView->isVisible()); |
3931 | } | 3931 | } |
3932 | 3932 | ||
3933 | KOFilterView *CalendarView::filterView() | 3933 | KOFilterView *CalendarView::filterView() |
3934 | { | 3934 | { |
3935 | return mFilterView; | 3935 | return mFilterView; |
3936 | } | 3936 | } |
3937 | void CalendarView::selectFilter( int fil ) | 3937 | void CalendarView::selectFilter( int fil ) |
3938 | { | 3938 | { |
3939 | mFilterView->setSelectedFilter( fil ); | 3939 | mFilterView->setSelectedFilter( fil ); |
3940 | } | 3940 | } |
3941 | void CalendarView::showFilter(bool visible) | 3941 | void CalendarView::showFilter(bool visible) |
3942 | { | 3942 | { |
3943 | #if 0 | 3943 | #if 1 |
3944 | if (visible) mCalEditView->show(); | 3944 | if (visible) { |
3945 | mCalEditView->readConfig(); | ||
3946 | mCalEditView->show(); | ||
3947 | } | ||
3945 | else mCalEditView->hide(); | 3948 | else mCalEditView->hide(); |
3946 | #else | 3949 | #else |
3947 | if (visible) mFilterView->show(); | 3950 | if (visible) mFilterView->show(); |
3948 | else mFilterView->hide(); | 3951 | else mFilterView->hide(); |
3949 | #endif | 3952 | #endif |
3950 | } | 3953 | } |
3951 | void CalendarView::toggleFilerEnabled( ) | 3954 | void CalendarView::toggleFilerEnabled( ) |
3952 | { | 3955 | { |
3953 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); | 3956 | mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); |
3954 | if ( !mFilterView->filtersEnabled() ) | 3957 | if ( !mFilterView->filtersEnabled() ) |
3955 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); | 3958 | topLevelWidget()->setCaption( i18n("Filter disabled ") ); |
3956 | 3959 | ||
3957 | } | 3960 | } |
3958 | void CalendarView::updateFilter() | 3961 | void CalendarView::updateFilter() |
3959 | { | 3962 | { |
3960 | CalFilter *filter = mFilterView->selectedFilter(); | 3963 | CalFilter *filter = mFilterView->selectedFilter(); |
3961 | if (filter) { | 3964 | if (filter) { |
3962 | QString mess; | 3965 | QString mess; |
3963 | if (mFilterView->filtersEnabled()) { | 3966 | if (mFilterView->filtersEnabled()) { |
3964 | mess = i18n("Filter selected: ")+filter->name(); | 3967 | mess = i18n("Filter selected: ")+filter->name(); |
3965 | filter->setEnabled(true); | 3968 | filter->setEnabled(true); |
3966 | } | 3969 | } |
3967 | else filter->setEnabled(false); | 3970 | else filter->setEnabled(false); |
3968 | mCalendar->setFilter(filter); | 3971 | mCalendar->setFilter(filter); |
3969 | updateView(); | 3972 | updateView(); |
3970 | if ( !mess.isEmpty() ) | 3973 | if ( !mess.isEmpty() ) |
3971 | topLevelWidget()->setCaption( mess ); | 3974 | topLevelWidget()->setCaption( mess ); |
3972 | 3975 | ||
3973 | } | 3976 | } |
3974 | } | 3977 | } |
3975 | 3978 | ||
3976 | void CalendarView::filterEdited() | 3979 | void CalendarView::filterEdited() |
3977 | { | 3980 | { |
3978 | mFilterView->updateFilters(); | 3981 | mFilterView->updateFilters(); |
3979 | updateFilter(); | 3982 | updateFilter(); |
3980 | writeSettings(); | 3983 | writeSettings(); |
3981 | } | 3984 | } |
3982 | 3985 | ||
3983 | 3986 | ||
3984 | void CalendarView::takeOverEvent() | 3987 | void CalendarView::takeOverEvent() |
3985 | { | 3988 | { |
3986 | Incidence *incidence = currentSelection(); | 3989 | Incidence *incidence = currentSelection(); |
3987 | 3990 | ||
3988 | if (!incidence) return; | 3991 | if (!incidence) return; |
3989 | 3992 | ||
3990 | incidence->setOrganizer(KOPrefs::instance()->email()); | 3993 | incidence->setOrganizer(KOPrefs::instance()->email()); |
3991 | incidence->recreate(); | 3994 | incidence->recreate(); |
3992 | incidence->setReadOnly(false); | 3995 | incidence->setReadOnly(false); |
3993 | 3996 | ||
3994 | updateView(); | 3997 | updateView(); |
3995 | } | 3998 | } |
3996 | 3999 | ||
3997 | void CalendarView::takeOverCalendar() | 4000 | void CalendarView::takeOverCalendar() |
3998 | { | 4001 | { |
3999 | // TODO: Create Calendar::allIncidences() function and use it here | 4002 | // TODO: Create Calendar::allIncidences() function and use it here |
4000 | 4003 | ||
4001 | clearAllViews(); | 4004 | clearAllViews(); |
4002 | QPtrList<Event> events = mCalendar->events(); | 4005 | QPtrList<Event> events = mCalendar->events(); |
4003 | for(uint i=0; i<events.count(); ++i) { | 4006 | for(uint i=0; i<events.count(); ++i) { |
4004 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4007 | events.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4005 | events.at(i)->recreate(); | 4008 | events.at(i)->recreate(); |
4006 | events.at(i)->setReadOnly(false); | 4009 | events.at(i)->setReadOnly(false); |
4007 | } | 4010 | } |
4008 | 4011 | ||
4009 | QPtrList<Todo> todos = mCalendar->todos(); | 4012 | QPtrList<Todo> todos = mCalendar->todos(); |
4010 | for(uint i=0; i<todos.count(); ++i) { | 4013 | for(uint i=0; i<todos.count(); ++i) { |
4011 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4014 | todos.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4012 | todos.at(i)->recreate(); | 4015 | todos.at(i)->recreate(); |
4013 | todos.at(i)->setReadOnly(false); | 4016 | todos.at(i)->setReadOnly(false); |
4014 | } | 4017 | } |
4015 | 4018 | ||
4016 | QPtrList<Journal> journals = mCalendar->journals(); | 4019 | QPtrList<Journal> journals = mCalendar->journals(); |
4017 | for(uint i=0; i<journals.count(); ++i) { | 4020 | for(uint i=0; i<journals.count(); ++i) { |
4018 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); | 4021 | journals.at(i)->setOrganizer(KOPrefs::instance()->email()); |
4019 | journals.at(i)->recreate(); | 4022 | journals.at(i)->recreate(); |
4020 | journals.at(i)->setReadOnly(false); | 4023 | journals.at(i)->setReadOnly(false); |
4021 | } | 4024 | } |
4022 | 4025 | ||
4023 | updateView(); | 4026 | updateView(); |
4024 | } | 4027 | } |
4025 | 4028 | ||
4026 | void CalendarView::showIntro() | 4029 | void CalendarView::showIntro() |
4027 | { | 4030 | { |
4028 | kdDebug() << "To be implemented." << endl; | 4031 | kdDebug() << "To be implemented." << endl; |
4029 | } | 4032 | } |
4030 | 4033 | ||
4031 | QWidgetStack *CalendarView::viewStack() | 4034 | QWidgetStack *CalendarView::viewStack() |
4032 | { | 4035 | { |
4033 | return mRightFrame; | 4036 | return mRightFrame; |
4034 | } | 4037 | } |
4035 | 4038 | ||
4036 | QWidget *CalendarView::leftFrame() | 4039 | QWidget *CalendarView::leftFrame() |
4037 | { | 4040 | { |
4038 | return ( QWidget *)mLeftFrame; | 4041 | return ( QWidget *)mLeftFrame; |
4039 | } | 4042 | } |
4040 | 4043 | ||
4041 | DateNavigator *CalendarView::dateNavigator() | 4044 | DateNavigator *CalendarView::dateNavigator() |
4042 | { | 4045 | { |
4043 | return mNavigator; | 4046 | return mNavigator; |
4044 | } | 4047 | } |
4045 | 4048 | ||
4046 | KDateNavigator* CalendarView::dateNavigatorWidget() | 4049 | KDateNavigator* CalendarView::dateNavigatorWidget() |
4047 | { | 4050 | { |
4048 | return mDateNavigator->navigatorView(); | 4051 | return mDateNavigator->navigatorView(); |
4049 | } | 4052 | } |
4050 | void CalendarView::toggleDateNavigatorWidget() | 4053 | void CalendarView::toggleDateNavigatorWidget() |
4051 | { | 4054 | { |
4052 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; | 4055 | KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; |
4053 | 4056 | ||
4054 | if (!KOPrefs::instance()->mShowDateNavigator ) | 4057 | if (!KOPrefs::instance()->mShowDateNavigator ) |
4055 | mDateNavigator->hide(); | 4058 | mDateNavigator->hide(); |
4056 | else | 4059 | else |
4057 | mDateNavigator->show(); | 4060 | mDateNavigator->show(); |
4058 | } | 4061 | } |
4059 | void CalendarView::addView(KOrg::BaseView *view) | 4062 | void CalendarView::addView(KOrg::BaseView *view) |
4060 | { | 4063 | { |
4061 | mViewManager->addView(view); | 4064 | mViewManager->addView(view); |
4062 | } | 4065 | } |
4063 | 4066 | ||
4064 | void CalendarView::showView(KOrg::BaseView *view) | 4067 | void CalendarView::showView(KOrg::BaseView *view) |
4065 | { | 4068 | { |
4066 | mViewManager->showView(view, mLeftFrame->isVisible()); | 4069 | mViewManager->showView(view, mLeftFrame->isVisible()); |
4067 | } | 4070 | } |
4068 | 4071 | ||
4069 | Incidence *CalendarView::currentSelection() | 4072 | Incidence *CalendarView::currentSelection() |
4070 | { | 4073 | { |
4071 | return mViewManager->currentSelection(); | 4074 | return mViewManager->currentSelection(); |
4072 | } | 4075 | } |
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index dc6237b..d79b28e 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -1,176 +1,383 @@ | |||
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> | 27 | #include <qlayout.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qdialog.h> | ||
29 | 30 | ||
30 | 31 | ||
31 | #include <libkcal/calfilter.h> | 32 | #include <libkcal/calfilter.h> |
32 | 33 | ||
33 | #include "kofilterview.h" | 34 | #include "kofilterview.h" |
35 | #include "koprefs.h" | ||
34 | #include <kiconloader.h> | 36 | #include <kiconloader.h> |
35 | #include <kglobal.h> | 37 | #include <kglobal.h> |
38 | #include <kcolorbutton.h> | ||
39 | #include <kmessagebox.h> | ||
40 | |||
41 | |||
42 | #include <kurlrequester.h> | ||
43 | #include <klineedit.h> | ||
44 | |||
45 | class KONewCalPrefs : public QDialog | ||
46 | { | ||
47 | public: | ||
48 | KONewCalPrefs( QWidget *parent=0, const char *name=0 ) : | ||
49 | QDialog( parent, name, true ) | ||
50 | { | ||
51 | setCaption( i18n("Add new Calendar") ); | ||
52 | QVBoxLayout* lay = new QVBoxLayout( this ); | ||
53 | lay->setSpacing( 3 ); | ||
54 | lay->setMargin( 3 ); | ||
55 | QLabel * lab = new QLabel( i18n("<b>Name of new calendar:</b>"), this ); | ||
56 | lay->addWidget( lab ); | ||
57 | nameE = new KLineEdit( this ); | ||
58 | lay->addWidget( nameE ); | ||
59 | lab = new QLabel( i18n("Local ical (*.ics) file:"), this ); | ||
60 | lay->addWidget( lab ); | ||
61 | url = new KURLRequester ( this ); | ||
62 | lay->addWidget( url ); | ||
63 | QPushButton * ok = new QPushButton( i18n("OK"), this ); | ||
64 | lay->addWidget( ok ); | ||
65 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | ||
66 | lay->addWidget( cancel ); | ||
67 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | ||
68 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | ||
69 | resize( 200, 200 ); | ||
70 | } | ||
71 | |||
72 | QString calName() { return nameE->text(); } | ||
73 | QString calFileName() { return url->url(); } | ||
74 | private: | ||
75 | KLineEdit* nameE; | ||
76 | KURLRequester *url; | ||
77 | }; | ||
78 | |||
36 | 79 | ||
37 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, | 80 | KOFilterView::KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent, |
38 | const char* name,WFlags fl ) | 81 | const char* name,WFlags fl ) |
39 | : KOFilterView_base(parent,name,fl) | 82 | : KOFilterView_base(parent,name,fl) |
40 | { | 83 | { |
41 | mFilters = filterList; | 84 | mFilters = filterList; |
42 | 85 | ||
43 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 86 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); |
44 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 87 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); |
45 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); | 88 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editFilters())); |
46 | } | 89 | } |
47 | 90 | ||
48 | KOFilterView::~KOFilterView() | 91 | KOFilterView::~KOFilterView() |
49 | { | 92 | { |
50 | // no need to delete child widgets, Qt does it all for us | 93 | // no need to delete child widgets, Qt does it all for us |
51 | } | 94 | } |
52 | 95 | ||
53 | bool KOFilterView::filtersEnabled() | 96 | bool KOFilterView::filtersEnabled() |
54 | { | 97 | { |
55 | return mEnabledCheck->isChecked(); | 98 | return mEnabledCheck->isChecked(); |
56 | } | 99 | } |
57 | 100 | ||
58 | void KOFilterView::setFiltersEnabled(bool set) | 101 | void KOFilterView::setFiltersEnabled(bool set) |
59 | { | 102 | { |
60 | mEnabledCheck->setChecked(set); | 103 | mEnabledCheck->setChecked(set); |
61 | emit filterChanged(); | 104 | emit filterChanged(); |
62 | } | 105 | } |
63 | 106 | ||
64 | 107 | ||
65 | void KOFilterView::updateFilters() | 108 | void KOFilterView::updateFilters() |
66 | { | 109 | { |
67 | mSelectionCombo->clear(); | 110 | mSelectionCombo->clear(); |
68 | 111 | ||
69 | CalFilter *filter = mFilters->first(); | 112 | CalFilter *filter = mFilters->first(); |
70 | while(filter) { | 113 | while(filter) { |
71 | mSelectionCombo->insertItem(filter->name()); | 114 | mSelectionCombo->insertItem(filter->name()); |
72 | filter = mFilters->next(); | 115 | filter = mFilters->next(); |
73 | } | 116 | } |
74 | } | 117 | } |
75 | 118 | ||
76 | CalFilter *KOFilterView::selectedFilter() | 119 | CalFilter *KOFilterView::selectedFilter() |
77 | { | 120 | { |
78 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); | 121 | CalFilter *f = mFilters->at(mSelectionCombo->currentItem()); |
79 | return f; | 122 | return f; |
80 | } | 123 | } |
81 | 124 | ||
82 | void KOFilterView::setSelectedFilter(QString filterName) | 125 | void KOFilterView::setSelectedFilter(QString filterName) |
83 | { | 126 | { |
84 | int filter_num = mSelectionCombo->count(); | 127 | int filter_num = mSelectionCombo->count(); |
85 | int i; | 128 | int i; |
86 | for (i=0;i<filter_num;i++) { | 129 | for (i=0;i<filter_num;i++) { |
87 | if (mSelectionCombo->text(i)==filterName) | 130 | if (mSelectionCombo->text(i)==filterName) |
88 | mSelectionCombo->setCurrentItem(i); | 131 | mSelectionCombo->setCurrentItem(i); |
89 | } | 132 | } |
90 | emit filterChanged(); | 133 | emit filterChanged(); |
91 | } | 134 | } |
92 | void KOFilterView::setSelectedFilter( int fil ) | 135 | void KOFilterView::setSelectedFilter( int fil ) |
93 | { | 136 | { |
94 | if ( fil >= mSelectionCombo->count() ) | 137 | if ( fil >= mSelectionCombo->count() ) |
95 | return; | 138 | return; |
96 | mSelectionCombo->setCurrentItem( fil ); | 139 | mSelectionCombo->setCurrentItem( fil ); |
97 | emit filterChanged(); | 140 | emit filterChanged(); |
98 | } | 141 | } |
99 | 142 | ||
100 | 143 | ||
101 | 144 | ||
102 | KOCalEditView::KOCalEditView(QWidget* parent, | 145 | KOCalEditView::KOCalEditView(QWidget* parent, |
103 | const char* name ) | 146 | const char* name ) |
104 | : QWidget(parent,name) | 147 | : QWidget(parent,name) |
105 | { | 148 | { |
106 | /* | 149 | mw = 0; |
107 | connect(mSelectionCombo,SIGNAL(activated(int)),SIGNAL(filterChanged())); | 150 | ml = new QVBoxLayout ( this ); |
108 | connect(mEnabledCheck,SIGNAL(clicked()),SIGNAL(filterChanged())); | 151 | } |
109 | connect(mEditButton,SIGNAL(clicked()),SIGNAL(editCalEdits())); | 152 | |
110 | */ | 153 | KOCalEditView::~KOCalEditView() |
111 | QGridLayout* mainLayout = new QGridLayout ( this , 2, 6 ); | 154 | { |
112 | QPushButton * addBut = new QPushButton ( this ); | 155 | // no need to delete child widgets, Qt does it all for us |
156 | } | ||
157 | void KOCalEditView::selectCal(int id ,bool b) | ||
158 | { | ||
159 | KOPrefs::instance()->getCalendar( id )->isEnabled = b; | ||
160 | emit calendarEnabled ( id, b ); | ||
161 | |||
162 | } | ||
163 | void KOCalEditView::selectStdCal( int id, bool b ) | ||
164 | { | ||
165 | |||
166 | if ( !b ) { | ||
167 | KOCalCheckButton* it = (KOCalCheckButton*) sender(); | ||
168 | if ( it ) { | ||
169 | it->blockSignals( true ); | ||
170 | it->setChecked( true ); | ||
171 | it->blockSignals( false ); | ||
172 | return; | ||
173 | } | ||
174 | return; | ||
175 | } | ||
176 | KOCalCheckButton* sen = (KOCalCheckButton*) sender(); | ||
177 | KOCalCheckButton* it = mStdandardB.first(); | ||
178 | while ( it ) { | ||
179 | if ( it->isChecked() ) { | ||
180 | if ( it != sen ) { | ||
181 | it->blockSignals( true ); | ||
182 | it->setChecked( false ); | ||
183 | it->blockSignals( false ); | ||
184 | break; | ||
185 | } | ||
186 | } | ||
187 | it = mStdandardB.next(); | ||
188 | } | ||
189 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | ||
190 | while ( kkf ) { | ||
191 | kkf->isStandard = false; | ||
192 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
193 | } | ||
194 | KOPrefs::instance()->getCalendar( id )->isStandard = true; | ||
195 | emit setCalendarDefault ( id ); | ||
196 | } | ||
197 | |||
198 | void KOCalEditView::selectCalAlarm(int id ,bool b ) | ||
199 | { | ||
200 | KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; | ||
201 | emit alarmEnabled ( id , b ); | ||
202 | } | ||
203 | void KOCalEditView::selectReadOnly(int id ,bool b ) | ||
204 | { | ||
205 | KOPrefs::instance()->getCalendar( id )->isReadOnly = b; | ||
206 | emit calendarReadonly ( id , b ); | ||
207 | |||
208 | } | ||
209 | void KOCalEditView::setColor( const QColor& c, int id ) | ||
210 | { | ||
211 | KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; | ||
212 | } | ||
213 | void KOCalEditView::deleteCal( int id ) | ||
214 | { | ||
215 | KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); | ||
216 | QString name = kkf->mName; | ||
217 | QString file = kkf->mFileName; | ||
218 | if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b><tr> Do you want to remove this calendar from KO/Pi? (The file is not removed, of course!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; | ||
219 | emit removeCalendar ( id ); | ||
220 | KOPrefs::instance()->mCalendars.remove ( kkf ); | ||
221 | readConfig(); | ||
222 | } | ||
223 | void KOCalEditView::infoCal( int id ) | ||
224 | { | ||
225 | QString name = KOPrefs::instance()->getCalendar( id )->mName; | ||
226 | QString file = KOPrefs::instance()->getCalendar( id )->mFileName; | ||
227 | KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); | ||
228 | } | ||
229 | void KOCalEditView::readConfig() | ||
230 | { | ||
231 | |||
232 | mStdandardB.clear(); | ||
233 | mEnabledB.clear(); | ||
234 | mAlarmB.clear(); | ||
235 | mROB.clear(); | ||
236 | |||
237 | if ( mw ) delete mw; | ||
238 | mw = new QWidget ( this ); | ||
239 | ml->addWidget ( mw ); | ||
240 | |||
241 | mainLayout = new QGridLayout ( mw , 2, 8 ); | ||
242 | mainLayout->setSpacing( 3 ); | ||
243 | QPushButton * addBut = new QPushButton ( mw ); | ||
113 | mainLayout->addWidget( addBut,0,0 ); | 244 | mainLayout->addWidget( addBut,0,0 ); |
114 | addBut->setPixmap ( SmallIcon("plus")); | 245 | addBut->setPixmap ( SmallIcon("plus")); |
115 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); | 246 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); |
116 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 247 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
117 | 248 | ||
118 | addBut = new QPushButton ( this ); | 249 | addBut = new QPushButton ( mw ); |
119 | mainLayout->addWidget( addBut,0,1 ); | 250 | mainLayout->addWidget( addBut,0,1 ); |
120 | addBut->setPixmap ( SmallIcon("eye")); | 251 | addBut->setPixmap ( SmallIcon("eye")); |
121 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | 252 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); |
122 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 253 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
123 | 254 | ||
124 | QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", this ); | 255 | QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", mw ); |
125 | mainLayout->addWidget( lab,0,2 ); | 256 | mainLayout->addWidget( lab,0,2 ); |
126 | 257 | ||
127 | addBut = new QPushButton ( this ); | 258 | addBut = new QPushButton ( mw ); |
128 | mainLayout->addWidget( addBut,0,3 ); | 259 | mainLayout->addWidget( addBut,0,3 ); |
129 | addBut->setPixmap ( SmallIcon("bell")); | 260 | addBut->setPixmap ( SmallIcon("bell")); |
130 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 261 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
131 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 262 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
132 | 263 | ||
133 | addBut = new QPushButton ( this ); | 264 | addBut = new QPushButton ( mw ); |
134 | mainLayout->addWidget( addBut,0,4 ); | 265 | mainLayout->addWidget( addBut,0,4 ); |
135 | addBut->setPixmap ( SmallIcon("pencil")); | 266 | addBut->setPixmap ( SmallIcon("pencil")); |
136 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | 267 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); |
137 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 268 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
138 | 269 | ||
139 | addBut = new QPushButton ( this ); | 270 | lab = new QLabel ( i18n(" Color "), mw ); |
140 | mainLayout->addWidget( addBut,0,5 ); | 271 | mainLayout->addWidget( lab,0,5 ); |
272 | #if 0 | ||
273 | addBut = new QPushButton ( mw ); | ||
274 | mainLayout->addWidget( addBut,0,6 ); | ||
141 | addBut->setPixmap ( SmallIcon("minus")); | 275 | addBut->setPixmap ( SmallIcon("minus")); |
142 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); | 276 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); |
143 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 277 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
278 | #endif | ||
144 | 279 | ||
145 | 280 | ||
281 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | ||
282 | int row = 1; | ||
283 | while ( kkf ) { | ||
146 | 284 | ||
147 | } | 285 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); |
148 | 286 | mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); | |
149 | KOCalEditView::~KOCalEditView() | 287 | cb->setChecked( kkf->isStandard ); |
150 | { | 288 | cb->setNum( kkf->mCalNumber ); |
151 | // no need to delete child widgets, Qt does it all for us | 289 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); |
152 | } | 290 | cb = new KOCalCheckButton( mw ); |
153 | void KOCalEditView::readConfig( KConfig *) | 291 | mainLayout->addWidget( cb,row,1 );mEnabledB.append( cb ); |
154 | { | 292 | cb->setChecked( kkf->isEnabled ); |
293 | cb->setNum( kkf->mCalNumber ); | ||
294 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); | ||
295 | KOCalButton* name = new KOCalButton( mw ); | ||
296 | name->setNum( kkf->mCalNumber ); | ||
297 | name->setText( kkf->mName ); | ||
298 | mainLayout->addWidget( name,row,2 ); | ||
299 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); | ||
300 | cb = new KOCalCheckButton( mw ); | ||
301 | mainLayout->addWidget( cb,row,3 );mAlarmB.append( cb ); | ||
302 | cb->setChecked( kkf->isAlarmEnabled ); | ||
303 | cb->setNum( kkf->mCalNumber ); | ||
304 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); | ||
305 | cb = new KOCalCheckButton( mw ); | ||
306 | mainLayout->addWidget( cb,row,4 );mROB.append( cb ); | ||
307 | cb->setChecked( kkf->isReadOnly ); | ||
308 | cb->setNum( kkf->mCalNumber ); | ||
309 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); | ||
310 | KColorButton *colb = new KColorButton( mw ); | ||
311 | mainLayout->addWidget( colb,row,5 ); | ||
312 | colb->setID( kkf->mCalNumber ); | ||
313 | colb->setColor( kkf->mDefaultColor ); | ||
314 | connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); | ||
315 | if ( row > 1) { | ||
316 | KOCalButton* calb = new KOCalButton( mw ); | ||
317 | mainLayout->addWidget( calb,row,6 ); | ||
318 | calb->setNum( kkf->mCalNumber ); | ||
319 | calb->setPixmap ( SmallIcon("minus")); | ||
320 | connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); | ||
321 | int hei = calb->sizeHint().height(); | ||
322 | calb->setMaximumSize( hei*9/10, hei*9/10 ); | ||
323 | } | ||
324 | ++row; | ||
325 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
326 | } | ||
327 | lab = new QLabel ( "", mw ); | ||
328 | mainLayout->addWidget( lab,row,0 ); | ||
329 | mw->show(); | ||
155 | 330 | ||
156 | } | 331 | } |
157 | void KOCalEditView::addCal() | 332 | void KOCalEditView::addCal() |
158 | { | 333 | { |
159 | qDebug("addcal "); | 334 | qDebug("addcal "); |
335 | KONewCalPrefs prefs ( this ); | ||
336 | if ( ! prefs.exec() ) | ||
337 | return; | ||
338 | QString name = prefs.calName(); | ||
339 | QString file = prefs.calFileName(); | ||
340 | QFileInfo fi ( file ); | ||
341 | if (!fi.exists() ) { | ||
342 | KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); | ||
343 | return; | ||
344 | } | ||
345 | KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); | ||
346 | kkf->mName = name; | ||
347 | kkf->mFileName = file; | ||
348 | emit calendarAdded( kkf->mCalNumber ); | ||
349 | readConfig(); | ||
160 | } | 350 | } |
161 | void KOCalEditView::enableAll() | 351 | void KOCalEditView::enableAll() |
162 | { | 352 | { |
163 | qDebug("enableAll"); | 353 | toggleList( mEnabledB ); |
164 | } | 354 | } |
165 | void KOCalEditView::enableAlarm() | 355 | void KOCalEditView::enableAlarm() |
166 | { | 356 | { |
167 | qDebug("enableAlarm"); | 357 | toggleList( mAlarmB ); |
168 | } | 358 | } |
169 | void KOCalEditView::disableRO() | 359 | void KOCalEditView::disableRO() |
170 | { | 360 | { |
171 | qDebug("OCalEditView::disableRO() "); | 361 | toggleList( mROB ); |
362 | } | ||
363 | void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list ) | ||
364 | { | ||
365 | bool dis = false; | ||
366 | KOCalCheckButton* it = list.first(); | ||
367 | while ( it ) { | ||
368 | if ( !it->isChecked() ) { | ||
369 | dis = true; | ||
370 | break; | ||
371 | } | ||
372 | it = list.next(); | ||
373 | } | ||
374 | it = list.first(); | ||
375 | while ( it ) { | ||
376 | it->setChecked(dis); | ||
377 | it = list.next(); | ||
378 | } | ||
172 | } | 379 | } |
173 | void KOCalEditView::deleteAll() | 380 | void KOCalEditView::deleteAll() |
174 | { | 381 | { |
175 | qDebug("delteAll"); | 382 | qDebug("delteAll"); |
176 | } | 383 | } |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 060108f..aaf0eb6 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -1,133 +1,155 @@ | |||
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 <qcheckbox.h> | 27 | #include <qcheckbox.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <kconfig.h> | 29 | #include <kconfig.h> |
30 | #include "kofilterview_base.h" | 30 | #include "kofilterview_base.h" |
31 | 31 | ||
32 | #include <libkcal/calfilter.h> | 32 | #include <libkcal/calfilter.h> |
33 | 33 | ||
34 | using namespace KCal; | 34 | class QGridLayout; |
35 | |||
36 | class KOFilterView : public KOFilterView_base | ||
37 | { | ||
38 | Q_OBJECT | ||
39 | public: | ||
40 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | ||
41 | ~KOFilterView(); | ||
42 | |||
43 | void updateFilters(); | ||
44 | |||
45 | bool filtersEnabled(); | ||
46 | void setFiltersEnabled(bool); | ||
47 | CalFilter *selectedFilter(); | ||
48 | void setSelectedFilter(QString); | ||
49 | void setSelectedFilter( int ); | ||
50 | |||
51 | signals: | ||
52 | void filterChanged(); | ||
53 | void editFilters(); | ||
54 | |||
55 | private: | ||
56 | QPtrList<CalFilter> *mFilters; | ||
57 | }; | ||
58 | |||
59 | class KOCalEditView : public QWidget | ||
60 | { | ||
61 | Q_OBJECT | ||
62 | public: | ||
63 | KOCalEditView( QWidget* parent=0,const char* name=0); | ||
64 | ~KOCalEditView(); | ||
65 | |||
66 | void readConfig( KConfig *); | ||
67 | public slots: | ||
68 | void addCal(); | ||
69 | void enableAll(); | ||
70 | void enableAlarm(); | ||
71 | void disableRO(); | ||
72 | void deleteAll(); | ||
73 | signals: | ||
74 | void alarmEnabled ( int cal, bool enable ); | ||
75 | void calendarEnabled ( int cal, bool enable ); | ||
76 | void calendarReadonly ( int cal, bool readonly ); | ||
77 | void setCalendarDefault ( int cal ); | ||
78 | void removeCalendar ( int cal ); | ||
79 | |||
80 | private: | ||
81 | }; | ||
82 | 35 | ||
36 | using namespace KCal; | ||
83 | class KOCalButton : public QPushButton | 37 | class KOCalButton : public QPushButton |
84 | { | 38 | { |
85 | Q_OBJECT | 39 | Q_OBJECT |
86 | public: | 40 | public: |
87 | KOCalButton( QWidget *parent=0, const char *name=0 ) : | 41 | KOCalButton( QWidget *parent=0, const char *name=0 ) : |
88 | QPushButton( parent, name) | 42 | QPushButton( parent, name) |
89 | { | 43 | { |
90 | connect( this, SIGNAL( clicked() ), | 44 | connect( this, SIGNAL( clicked() ), |
91 | SLOT( bottonClicked() )); | 45 | SLOT( bottonClicked() )); |
92 | mNumber = -1; | 46 | mNumber = -1; |
93 | } | 47 | } |
94 | void setNum ( int num ) {mNumber = num; } | 48 | void setNum ( int num ) {mNumber = num; } |
95 | signals: | 49 | signals: |
96 | void selectNum ( int ); | 50 | void selectNum ( int ); |
97 | private: | 51 | private: |
98 | int mNumber; | 52 | int mNumber; |
99 | void keyPressEvent ( QKeyEvent * e ) | 53 | void keyPressEvent ( QKeyEvent * e ) |
100 | { | 54 | { |
101 | e->ignore(); | 55 | e->ignore(); |
102 | } | 56 | } |
103 | 57 | ||
104 | private slots : | 58 | private slots : |
105 | void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } | 59 | void bottonClicked() { if ( mNumber > 0 ) emit selectNum ( mNumber ); } |
106 | }; | 60 | }; |
107 | class KOCalCheckButton : public QCheckBox | 61 | class KOCalCheckButton : public QCheckBox |
108 | { | 62 | { |
109 | Q_OBJECT | 63 | Q_OBJECT |
110 | public: | 64 | public: |
111 | KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : | 65 | KOCalCheckButton( QWidget *parent=0, const char *name=0 ) : |
112 | QCheckBox( parent, name) | 66 | QCheckBox( parent, name) |
113 | { | 67 | { |
114 | connect( this, SIGNAL( toggled ( bool ) ), | 68 | connect( this, SIGNAL( toggled ( bool ) ), |
115 | SLOT( bottonClicked( bool ) )); | 69 | SLOT( bottonClicked( bool ) )); |
116 | mNumber = -1; | 70 | mNumber = -1; |
71 | //setMaximumWidth( 10 ); | ||
72 | |||
117 | } | 73 | } |
118 | void setNum ( int num ) {mNumber = num; } | 74 | void setNum ( int num ) {mNumber = num; } |
119 | signals: | 75 | signals: |
120 | void selectNum ( int, bool ); | 76 | void selectNum ( int, bool ); |
121 | private: | 77 | private: |
122 | int mNumber; | 78 | int mNumber; |
123 | void keyPressEvent ( QKeyEvent * e ) | 79 | void keyPressEvent ( QKeyEvent * e ) |
124 | { | 80 | { |
125 | e->ignore(); | 81 | e->ignore(); |
126 | } | 82 | } |
127 | 83 | ||
128 | private slots : | 84 | private slots : |
129 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } | 85 | void bottonClicked( bool b) { if ( mNumber > 0 ) emit selectNum ( mNumber , b); } |
130 | }; | 86 | }; |
131 | 87 | ||
132 | 88 | ||
89 | |||
90 | class KOFilterView : public KOFilterView_base | ||
91 | { | ||
92 | Q_OBJECT | ||
93 | public: | ||
94 | KOFilterView(QPtrList<CalFilter> *filterList,QWidget* parent=0,const char* name=0, WFlags fl=0); | ||
95 | ~KOFilterView(); | ||
96 | |||
97 | void updateFilters(); | ||
98 | |||
99 | bool filtersEnabled(); | ||
100 | void setFiltersEnabled(bool); | ||
101 | CalFilter *selectedFilter(); | ||
102 | void setSelectedFilter(QString); | ||
103 | void setSelectedFilter( int ); | ||
104 | |||
105 | signals: | ||
106 | void filterChanged(); | ||
107 | void editFilters(); | ||
108 | |||
109 | private: | ||
110 | QPtrList<CalFilter> *mFilters; | ||
111 | }; | ||
112 | |||
113 | class KOCalEditView : public QWidget | ||
114 | { | ||
115 | Q_OBJECT | ||
116 | public: | ||
117 | KOCalEditView( QWidget* parent=0,const char* name=0); | ||
118 | ~KOCalEditView(); | ||
119 | |||
120 | void readConfig(); | ||
121 | public slots: | ||
122 | void addCal(); | ||
123 | void enableAll(); | ||
124 | void enableAlarm(); | ||
125 | void disableRO(); | ||
126 | void deleteAll(); | ||
127 | void selectStdCal(int,bool ); | ||
128 | void selectCal(int,bool ); | ||
129 | void selectCalAlarm(int,bool ); | ||
130 | void selectReadOnly(int,bool ); | ||
131 | void setColor(const QColor &,int) ; | ||
132 | void deleteCal(int) ; | ||
133 | void infoCal(int) ; | ||
134 | signals: | ||
135 | void alarmEnabled ( int cal, bool enable ); | ||
136 | void calendarEnabled ( int cal, bool enable ); | ||
137 | void calendarReadonly ( int cal, bool readonly ); | ||
138 | void setCalendarDefault ( int cal ); | ||
139 | void removeCalendar ( int cal ); | ||
140 | void calendarAdded( int ); | ||
141 | |||
142 | private: | ||
143 | QVBoxLayout* ml; | ||
144 | QWidget *mw; | ||
145 | void toggleList ( QPtrList<KOCalCheckButton> ); | ||
146 | QPtrList<KOCalCheckButton> mStdandardB; | ||
147 | QPtrList<KOCalCheckButton> mEnabledB; | ||
148 | QPtrList<KOCalCheckButton> mAlarmB; | ||
149 | QPtrList<KOCalCheckButton> mROB; | ||
150 | QGridLayout* mainLayout; | ||
151 | }; | ||
152 | |||
153 | |||
154 | |||
133 | #endif // KOFILTERVIEW_H | 155 | #endif // KOFILTERVIEW_H |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 179f586..bc6aae4 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -317,272 +317,275 @@ KOPrefs::KOPrefs() : | |||
317 | addItemBool("EVshowChanged",&mEVshowChanged,true); | 317 | addItemBool("EVshowChanged",&mEVshowChanged,true); |
318 | addItemBool("WTshowDetails",&mWTshowDetails,false); | 318 | addItemBool("WTshowDetails",&mWTshowDetails,false); |
319 | addItemBool("WTshowCreated",&mWTshowCreated,false); | 319 | addItemBool("WTshowCreated",&mWTshowCreated,false); |
320 | addItemBool("WTshowChanged",&mWTshowChanged,false); | 320 | addItemBool("WTshowChanged",&mWTshowChanged,false); |
321 | mCalendars.setAutoDelete( true ); | 321 | mCalendars.setAutoDelete( true ); |
322 | } | 322 | } |
323 | 323 | ||
324 | 324 | ||
325 | KOPrefs::~KOPrefs() | 325 | KOPrefs::~KOPrefs() |
326 | { | 326 | { |
327 | if (mInstance == this) | 327 | if (mInstance == this) |
328 | mInstance = insd.setObject(0); | 328 | mInstance = insd.setObject(0); |
329 | mCalendars.setAutoDelete( true ); | 329 | mCalendars.setAutoDelete( true ); |
330 | mCalendars.clear(); | 330 | mCalendars.clear(); |
331 | //qDebug("KOPrefs::~KOPrefs() "); | 331 | //qDebug("KOPrefs::~KOPrefs() "); |
332 | } | 332 | } |
333 | 333 | ||
334 | 334 | ||
335 | KOPrefs *KOPrefs::instance() | 335 | KOPrefs *KOPrefs::instance() |
336 | { | 336 | { |
337 | if (!mInstance) { | 337 | if (!mInstance) { |
338 | mInstance = insd.setObject(new KOPrefs()); | 338 | mInstance = insd.setObject(new KOPrefs()); |
339 | mInstance->readConfig(); | 339 | mInstance->readConfig(); |
340 | } | 340 | } |
341 | 341 | ||
342 | return mInstance; | 342 | return mInstance; |
343 | } | 343 | } |
344 | 344 | ||
345 | void KOPrefs::usrSetDefaults() | 345 | void KOPrefs::usrSetDefaults() |
346 | { | 346 | { |
347 | 347 | ||
348 | } | 348 | } |
349 | 349 | ||
350 | void KOPrefs::fillMailDefaults() | 350 | void KOPrefs::fillMailDefaults() |
351 | { | 351 | { |
352 | if (mName.isEmpty()) mName = i18n("Anonymous"); | 352 | if (mName.isEmpty()) mName = i18n("Anonymous"); |
353 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); | 353 | if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); |
354 | } | 354 | } |
355 | 355 | ||
356 | void KOPrefs::setTimeZoneIdDefault() | 356 | void KOPrefs::setTimeZoneIdDefault() |
357 | { | 357 | { |
358 | ; | 358 | ; |
359 | } | 359 | } |
360 | 360 | ||
361 | void KOPrefs::setAllDefaults() | 361 | void KOPrefs::setAllDefaults() |
362 | { | 362 | { |
363 | setCategoryDefaults(); | 363 | setCategoryDefaults(); |
364 | mEventSummaryUser = getDefaultList() ; | 364 | mEventSummaryUser = getDefaultList() ; |
365 | mTodoSummaryUser = getDefaultList() ; | 365 | mTodoSummaryUser = getDefaultList() ; |
366 | mLocationDefaults = getLocationDefaultList(); | 366 | mLocationDefaults = getLocationDefaultList(); |
367 | } | 367 | } |
368 | 368 | ||
369 | void KOPrefs::setCategoryDefaults() | 369 | void KOPrefs::setCategoryDefaults() |
370 | { | 370 | { |
371 | mCustomCategories.clear(); | 371 | mCustomCategories.clear(); |
372 | mCustomCategories = getDefaultList(); | 372 | mCustomCategories = getDefaultList(); |
373 | 373 | ||
374 | QStringList::Iterator it; | 374 | QStringList::Iterator it; |
375 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 375 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
376 | setCategoryColor(*it,mDefaultCategoryColor); | 376 | setCategoryColor(*it,mDefaultCategoryColor); |
377 | } | 377 | } |
378 | } | 378 | } |
379 | QStringList KOPrefs::getLocationDefaultList() | 379 | QStringList KOPrefs::getLocationDefaultList() |
380 | { | 380 | { |
381 | QStringList retval ; | 381 | QStringList retval ; |
382 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") | 382 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
383 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") | 383 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") |
384 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") | 384 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
385 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 385 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
386 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 386 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
387 | 387 | ||
388 | retval.sort(); | 388 | retval.sort(); |
389 | return retval; | 389 | return retval; |
390 | } | 390 | } |
391 | QStringList KOPrefs::getDefaultList() | 391 | QStringList KOPrefs::getDefaultList() |
392 | { | 392 | { |
393 | QStringList retval ; | 393 | QStringList retval ; |
394 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") | 394 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") |
395 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") | 395 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") |
396 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") | 396 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") |
397 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") | 397 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") |
398 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") | 398 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") |
399 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") | 399 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") |
400 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") | 400 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") |
401 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; | 401 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; |
402 | retval.sort(); | 402 | retval.sort(); |
403 | //qDebug("cat %s ", retval.join("-").latin1()); | 403 | //qDebug("cat %s ", retval.join("-").latin1()); |
404 | return retval; | 404 | return retval; |
405 | } | 405 | } |
406 | 406 | ||
407 | void KOPrefs::usrReadConfig() | 407 | void KOPrefs::usrReadConfig() |
408 | { | 408 | { |
409 | config()->setGroup("General"); | 409 | config()->setGroup("General"); |
410 | 410 | ||
411 | //qDebug("KOPrefs::usrReadConfig() "); | 411 | //qDebug("KOPrefs::usrReadConfig() "); |
412 | mCustomCategories = config()->readListEntry("Custom Categories"); | 412 | mCustomCategories = config()->readListEntry("Custom Categories"); |
413 | mOldLoadedLanguage = mOldLanguage ; | 413 | mOldLoadedLanguage = mOldLanguage ; |
414 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 414 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
415 | if (mLocationDefaults.isEmpty()) { | 415 | if (mLocationDefaults.isEmpty()) { |
416 | mLocationDefaults = getLocationDefaultList(); | 416 | mLocationDefaults = getLocationDefaultList(); |
417 | } | 417 | } |
418 | 418 | ||
419 | if (mEventSummaryUser.isEmpty()) { | 419 | if (mEventSummaryUser.isEmpty()) { |
420 | mEventSummaryUser = getDefaultList() ; | 420 | mEventSummaryUser = getDefaultList() ; |
421 | } | 421 | } |
422 | if (mTodoSummaryUser.isEmpty()) { | 422 | if (mTodoSummaryUser.isEmpty()) { |
423 | mTodoSummaryUser = getDefaultList() ; | 423 | mTodoSummaryUser = getDefaultList() ; |
424 | } | 424 | } |
425 | 425 | ||
426 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 426 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
427 | 427 | ||
428 | config()->setGroup("Personal Settings"); | 428 | config()->setGroup("Personal Settings"); |
429 | mName = config()->readEntry("user_name",""); | 429 | mName = config()->readEntry("user_name",""); |
430 | mEmail = config()->readEntry("user_email",""); | 430 | mEmail = config()->readEntry("user_email",""); |
431 | fillMailDefaults(); | 431 | fillMailDefaults(); |
432 | 432 | ||
433 | config()->setGroup("Category Colors"); | 433 | config()->setGroup("Category Colors"); |
434 | QStringList::Iterator it; | 434 | QStringList::Iterator it; |
435 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 435 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
436 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 436 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
437 | 437 | ||
438 | } | 438 | } |
439 | config()->setGroup("CCal"); | 439 | config()->setGroup("CCal"); |
440 | int numCals = config()->readNumEntry("NumberCalendars",0 ); | 440 | int numCals = config()->readNumEntry("NumberCalendars",0 ); |
441 | mNextAvailableCalendar = 1; | 441 | mNextAvailableCalendar = 1; |
442 | if ( numCals == 0 ) { | 442 | if ( numCals == 0 ) { |
443 | KopiCalendarFile *kkf = getNewCalendar(); | 443 | KopiCalendarFile *kkf = getNewCalendar(); |
444 | kkf->isStandard = true; | 444 | kkf->isStandard = true; |
445 | kkf->mName = i18n("Standard Calendar"); | 445 | kkf->mName = i18n("Standard"); |
446 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 446 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
447 | } | 447 | } |
448 | while ( mNextAvailableCalendar <= numCals ) { | 448 | while ( mNextAvailableCalendar <= numCals ) { |
449 | qDebug("Read cal #%d ", mNextAvailableCalendar ); | 449 | qDebug("Read cal #%d ", mNextAvailableCalendar ); |
450 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); | 450 | QString prefix = "Cal_" +QString::number( mNextAvailableCalendar ); |
451 | KopiCalendarFile *kkf = getNewCalendar(); | 451 | KopiCalendarFile *kkf = getNewCalendar(); |
452 | kkf->isStandard = config()->readBoolEntry( prefix+"_isStandard", false ); | 452 | kkf->isStandard = config()->readBoolEntry( prefix+"_isStandard", false ); |
453 | kkf->isEnabled = config()->readBoolEntry( prefix+"_isEnabled", true); | 453 | kkf->isEnabled = config()->readBoolEntry( prefix+"_isEnabled", true); |
454 | kkf->isAlarmEnabled = config()->readBoolEntry( prefix+"_isAlarmEnabled", true); | 454 | kkf->isAlarmEnabled = config()->readBoolEntry( prefix+"_isAlarmEnabled", true); |
455 | kkf->isReadOnly = config()->readBoolEntry( prefix+"_isReadOnly", false); | 455 | kkf->isReadOnly = config()->readBoolEntry( prefix+"_isReadOnly", false); |
456 | kkf->mName = config()->readEntry( prefix+"_Name", "Calendar"); | 456 | kkf->mName = config()->readEntry( prefix+"_Name", "Calendar"); |
457 | kkf->mFileName = config()->readEntry( prefix+"_FileName", kkf->mFileName); | 457 | kkf->mFileName = config()->readEntry( prefix+"_FileName", kkf->mFileName); |
458 | kkf->mDefaultColor = config()->readColorEntry( prefix+"_Color",&mEventColor); | 458 | kkf->mDefaultColor = config()->readColorEntry( prefix+"_Color",&mEventColor); |
459 | if ( kkf->mCalNumber == 1 ) { | 459 | if ( kkf->mCalNumber == 1 ) { |
460 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); | 460 | kkf->mFileName = locateLocal( "data", "korganizer/mycalendar.ics" ); |
461 | //kkf->mName = i18n("Standard Calendar"); | ||
462 | } | 461 | } |
463 | } | 462 | } |
464 | 463 | ||
465 | KPimPrefs::usrReadConfig(); | 464 | KPimPrefs::usrReadConfig(); |
466 | } | 465 | } |
467 | 466 | ||
467 | KopiCalendarFile * KOPrefs::getCalendar( int num ) | ||
468 | { | ||
469 | return mDefCalColors[num-1]; | ||
470 | } | ||
468 | 471 | ||
469 | KopiCalendarFile * KOPrefs::getNewCalendar() | 472 | KopiCalendarFile * KOPrefs::getNewCalendar() |
470 | { | 473 | { |
471 | KopiCalendarFile * kkf = new KopiCalendarFile(); | 474 | KopiCalendarFile * kkf = new KopiCalendarFile(); |
472 | kkf->mCalNumber = mNextAvailableCalendar; | 475 | kkf->mCalNumber = mNextAvailableCalendar; |
473 | mDefCalColors.resize( mNextAvailableCalendar ); | 476 | mDefCalColors.resize( mNextAvailableCalendar ); |
474 | mDefCalColors[mNextAvailableCalendar-1] = kkf; | 477 | mDefCalColors[mNextAvailableCalendar-1] = kkf; |
475 | ++mNextAvailableCalendar; | 478 | ++mNextAvailableCalendar; |
476 | kkf->mDefaultColor = mEventColor; | 479 | kkf->mDefaultColor = mEventColor; |
477 | kkf->mName = i18n("New Calendar"); | 480 | kkf->mName = i18n("New Calendar"); |
478 | mCalendars.append( kkf ); | 481 | mCalendars.append( kkf ); |
479 | return kkf; | 482 | return kkf; |
480 | } | 483 | } |
481 | void KOPrefs::deleteCalendar( int num ) | 484 | void KOPrefs::deleteCalendar( int num ) |
482 | { | 485 | { |
483 | KopiCalendarFile * kkf = mCalendars.first(); | 486 | KopiCalendarFile * kkf = mCalendars.first(); |
484 | while ( kkf ) { | 487 | while ( kkf ) { |
485 | if ( kkf->mCalNumber == num ) { | 488 | if ( kkf->mCalNumber == num ) { |
486 | qDebug("KOPrefs::deleteCalendar %d ", num ); | 489 | qDebug("KOPrefs::deleteCalendar %d ", num ); |
487 | mCalendars.remove( kkf ); | 490 | mCalendars.remove( kkf ); |
488 | delete kkf; | 491 | delete kkf; |
489 | return; | 492 | return; |
490 | } | 493 | } |
491 | kkf = mCalendars.next(); | 494 | kkf = mCalendars.next(); |
492 | } | 495 | } |
493 | } | 496 | } |
494 | QColor KOPrefs::defaultColor( int calNum ) const | 497 | QColor KOPrefs::defaultColor( int calNum ) const |
495 | { | 498 | { |
496 | return (mDefCalColors[calNum-1])->mDefaultColor; | 499 | return (mDefCalColors[calNum-1])->mDefaultColor; |
497 | } | 500 | } |
498 | void KOPrefs::usrWriteConfig() | 501 | void KOPrefs::usrWriteConfig() |
499 | { | 502 | { |
500 | config()->setGroup("General"); | 503 | config()->setGroup("General"); |
501 | config()->writeEntry("Custom Categories",mCustomCategories); | 504 | config()->writeEntry("Custom Categories",mCustomCategories); |
502 | 505 | ||
503 | config()->setGroup("Personal Settings"); | 506 | config()->setGroup("Personal Settings"); |
504 | config()->writeEntry("user_name",mName); | 507 | config()->writeEntry("user_name",mName); |
505 | config()->writeEntry("user_email",mEmail); | 508 | config()->writeEntry("user_email",mEmail); |
506 | 509 | ||
507 | config()->setGroup("Category Colors"); | 510 | config()->setGroup("Category Colors"); |
508 | QDictIterator<QColor> it(mCategoryColors); | 511 | QDictIterator<QColor> it(mCategoryColors); |
509 | while (it.current()) { | 512 | while (it.current()) { |
510 | config()->writeEntry(it.currentKey(),*(it.current())); | 513 | config()->writeEntry(it.currentKey(),*(it.current())); |
511 | ++it; | 514 | ++it; |
512 | } | 515 | } |
513 | config()->setGroup("CCal"); | 516 | config()->setGroup("CCal"); |
514 | config()->writeEntry("NumberCalendars",mCalendars.count()); | 517 | config()->writeEntry("NumberCalendars",mCalendars.count()); |
515 | int numCal = 1; | 518 | int numCal = 1; |
516 | int writeCal = 0; | 519 | int writeCal = 0; |
517 | while ( numCal < mNextAvailableCalendar ) { | 520 | while ( numCal < mNextAvailableCalendar ) { |
518 | KopiCalendarFile * kkf = mCalendars.first(); | 521 | KopiCalendarFile * kkf = mCalendars.first(); |
519 | while ( kkf ) { | 522 | while ( kkf ) { |
520 | qDebug("cal num %d %d ", kkf->mCalNumber, numCal); | 523 | qDebug("cal num %d %d ", kkf->mCalNumber, numCal); |
521 | if ( kkf->mCalNumber == numCal ) { | 524 | if ( kkf->mCalNumber == numCal ) { |
522 | ++writeCal; | 525 | ++writeCal; |
523 | qDebug("Write calendar %d %d ", numCal , writeCal); | 526 | qDebug("Write calendar %d %d ", numCal , writeCal); |
524 | QString prefix = "Cal_" + QString::number( writeCal ); | 527 | QString prefix = "Cal_" + QString::number( writeCal ); |
525 | config()->writeEntry( prefix+"_isStandard", kkf->isStandard ); | 528 | config()->writeEntry( prefix+"_isStandard", kkf->isStandard ); |
526 | config()->writeEntry( prefix+"_isEnabled", kkf->isEnabled ); | 529 | config()->writeEntry( prefix+"_isEnabled", kkf->isEnabled ); |
527 | config()->writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); | 530 | config()->writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); |
528 | config()->writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); | 531 | config()->writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); |
529 | config()->writeEntry( prefix+"_Name", kkf->mName); | 532 | config()->writeEntry( prefix+"_Name", kkf->mName); |
530 | config()->writeEntry( prefix+"_FileName", kkf->mFileName); | 533 | config()->writeEntry( prefix+"_FileName", kkf->mFileName); |
531 | config()->writeEntry( prefix+"_Color",kkf->mDefaultColor); | 534 | config()->writeEntry( prefix+"_Color",kkf->mDefaultColor); |
532 | } | 535 | } |
533 | kkf = mCalendars.next(); | 536 | kkf = mCalendars.next(); |
534 | } | 537 | } |
535 | ++numCal; | 538 | ++numCal; |
536 | } | 539 | } |
537 | KPimPrefs::usrWriteConfig(); | 540 | KPimPrefs::usrWriteConfig(); |
538 | } | 541 | } |
539 | 542 | ||
540 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) | 543 | void KOPrefs::setCategoryColor(QString cat,const QColor & color) |
541 | { | 544 | { |
542 | mCategoryColors.replace(cat,new QColor(color)); | 545 | mCategoryColors.replace(cat,new QColor(color)); |
543 | } | 546 | } |
544 | 547 | ||
545 | QColor *KOPrefs::categoryColor(QString cat) | 548 | QColor *KOPrefs::categoryColor(QString cat) |
546 | { | 549 | { |
547 | QColor *color = 0; | 550 | QColor *color = 0; |
548 | 551 | ||
549 | if (!cat.isEmpty()) color = mCategoryColors[cat]; | 552 | if (!cat.isEmpty()) color = mCategoryColors[cat]; |
550 | 553 | ||
551 | if (color) return color; | 554 | if (color) return color; |
552 | else return &mDefaultCategoryColor; | 555 | else return &mDefaultCategoryColor; |
553 | } | 556 | } |
554 | 557 | ||
555 | void KOPrefs::setFullName(const QString &name) | 558 | void KOPrefs::setFullName(const QString &name) |
556 | { | 559 | { |
557 | mName = name; | 560 | mName = name; |
558 | } | 561 | } |
559 | 562 | ||
560 | void KOPrefs::setEmail(const QString &email) | 563 | void KOPrefs::setEmail(const QString &email) |
561 | { | 564 | { |
562 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); | 565 | //qDebug(" KOPrefs::setEmai*********** %s",email.latin1() ); |
563 | mEmail = email; | 566 | mEmail = email; |
564 | } | 567 | } |
565 | 568 | ||
566 | QString KOPrefs::fullName() | 569 | QString KOPrefs::fullName() |
567 | { | 570 | { |
568 | if (mEmailControlCenter) { | 571 | if (mEmailControlCenter) { |
569 | KEMailSettings settings; | 572 | KEMailSettings settings; |
570 | return settings.getSetting(KEMailSettings::RealName); | 573 | return settings.getSetting(KEMailSettings::RealName); |
571 | } else { | 574 | } else { |
572 | return mName; | 575 | return mName; |
573 | } | 576 | } |
574 | } | 577 | } |
575 | 578 | ||
576 | QString KOPrefs::email() | 579 | QString KOPrefs::email() |
577 | { | 580 | { |
578 | if (mEmailControlCenter) { | 581 | if (mEmailControlCenter) { |
579 | KEMailSettings settings; | 582 | KEMailSettings settings; |
580 | return settings.getSetting(KEMailSettings::EmailAddress); | 583 | return settings.getSetting(KEMailSettings::EmailAddress); |
581 | } else { | 584 | } else { |
582 | return mEmail; | 585 | return mEmail; |
583 | } | 586 | } |
584 | } | 587 | } |
585 | KConfig* KOPrefs::getConfig() | 588 | KConfig* KOPrefs::getConfig() |
586 | { | 589 | { |
587 | return config(); | 590 | return config(); |
588 | } | 591 | } |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 7d71cbd..f114d88 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -1,223 +1,224 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2000,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 KOPREFS_H | 23 | #ifndef KOPREFS_H |
24 | #define KOPREFS_H | 24 | #define KOPREFS_H |
25 | 25 | ||
26 | 26 | ||
27 | #include <libkdepim/kpimprefs.h> | 27 | #include <libkdepim/kpimprefs.h> |
28 | #include <qdict.h> | 28 | #include <qdict.h> |
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qobject.h> | 30 | #include <qobject.h> |
31 | 31 | ||
32 | class KConfig; | 32 | class KConfig; |
33 | class QFont; | 33 | class QFont; |
34 | class QColor; | 34 | class QColor; |
35 | class QStringList; | 35 | class QStringList; |
36 | 36 | ||
37 | #define VIEW_WN_VIEW 1 | 37 | #define VIEW_WN_VIEW 1 |
38 | #define VIEW_NX_VIEW 2 | 38 | #define VIEW_NX_VIEW 2 |
39 | #define VIEW_J_VIEW 3 | 39 | #define VIEW_J_VIEW 3 |
40 | #define VIEW_A_VIEW 4 | 40 | #define VIEW_A_VIEW 4 |
41 | #define VIEW_ML_VIEW 5 | 41 | #define VIEW_ML_VIEW 5 |
42 | #define VIEW_M_VIEW 6 | 42 | #define VIEW_M_VIEW 6 |
43 | #define VIEW_L_VIEW 7 | 43 | #define VIEW_L_VIEW 7 |
44 | #define VIEW_T_VIEW 8 | 44 | #define VIEW_T_VIEW 8 |
45 | 45 | ||
46 | class KopiCalendarFile : public QObject | 46 | class KopiCalendarFile : public QObject |
47 | { | 47 | { |
48 | public: | 48 | public: |
49 | KopiCalendarFile( ) : QObject( ) | 49 | KopiCalendarFile( ) : QObject( ) |
50 | { | 50 | { |
51 | isStandard = false; | 51 | isStandard = false; |
52 | isEnabled = true; | 52 | isEnabled = true; |
53 | isAlarmEnabled = true; | 53 | isAlarmEnabled = true; |
54 | isReadOnly = false; | 54 | isReadOnly = false; |
55 | mName = "Calendar"; | 55 | mName = "Calendar"; |
56 | mFileName = QDir::homeDirPath() + "/icalfile.ics"; | 56 | mFileName = QDir::homeDirPath() + "/icalfile.ics"; |
57 | mCalNumber = 0; | 57 | mCalNumber = 0; |
58 | mDefaultColor = Qt::red; | 58 | mDefaultColor = Qt::red; |
59 | } | 59 | } |
60 | bool isStandard; | 60 | bool isStandard; |
61 | bool isEnabled; | 61 | bool isEnabled; |
62 | bool isAlarmEnabled; | 62 | bool isAlarmEnabled; |
63 | bool isReadOnly; | 63 | bool isReadOnly; |
64 | QString mName; | 64 | QString mName; |
65 | QString mFileName; | 65 | QString mFileName; |
66 | int mCalNumber; | 66 | int mCalNumber; |
67 | QColor mDefaultColor; | 67 | QColor mDefaultColor; |
68 | }; | 68 | }; |
69 | class KOPrefs : public KPimPrefs | 69 | class KOPrefs : public KPimPrefs |
70 | { | 70 | { |
71 | public: | 71 | public: |
72 | enum { FormatVCalendar, FormatICalendar }; | 72 | enum { FormatVCalendar, FormatICalendar }; |
73 | enum { MailClientKMail, MailClientSendmail }; | 73 | enum { MailClientKMail, MailClientSendmail }; |
74 | enum { IMIPDummy, IMIPKMail }; | 74 | enum { IMIPDummy, IMIPKMail }; |
75 | enum { IMIPOutbox, IMIPdirectsend }; | 75 | enum { IMIPOutbox, IMIPdirectsend }; |
76 | enum { neverAuto, addressbookAuto, selectedAuto }; | 76 | enum { neverAuto, addressbookAuto, selectedAuto }; |
77 | enum { standardDestination, askDestination }; | 77 | enum { standardDestination, askDestination }; |
78 | 78 | ||
79 | virtual ~KOPrefs(); | 79 | virtual ~KOPrefs(); |
80 | 80 | ||
81 | /** Get instance of KOPrefs. It is made sure that there is only one | 81 | /** Get instance of KOPrefs. It is made sure that there is only one |
82 | instance. */ | 82 | instance. */ |
83 | static KOPrefs *instance(); | 83 | static KOPrefs *instance(); |
84 | 84 | ||
85 | /** Set preferences to default values */ | 85 | /** Set preferences to default values */ |
86 | void usrSetDefaults(); | 86 | void usrSetDefaults(); |
87 | 87 | ||
88 | /** Read preferences from config file */ | 88 | /** Read preferences from config file */ |
89 | void usrReadConfig(); | 89 | void usrReadConfig(); |
90 | 90 | ||
91 | /** Write preferences to config file */ | 91 | /** Write preferences to config file */ |
92 | void usrWriteConfig(); | 92 | void usrWriteConfig(); |
93 | void setCategoryDefaults(); | 93 | void setCategoryDefaults(); |
94 | void setAllDefaults(); | 94 | void setAllDefaults(); |
95 | KopiCalendarFile * getNewCalendar(); | 95 | KopiCalendarFile * getNewCalendar(); |
96 | KopiCalendarFile * getCalendar( int ); | ||
96 | void deleteCalendar( int ); | 97 | void deleteCalendar( int ); |
97 | QColor defaultColor( int ) const; | 98 | QColor defaultColor( int ) const; |
98 | protected: | 99 | protected: |
99 | void setTimeZoneIdDefault(); | 100 | void setTimeZoneIdDefault(); |
100 | 101 | ||
101 | /** Fill empty mail fields with default values. */ | 102 | /** Fill empty mail fields with default values. */ |
102 | void fillMailDefaults(); | 103 | void fillMailDefaults(); |
103 | 104 | ||
104 | private: | 105 | private: |
105 | /** Constructor disabled for public. Use instance() to create a KOPrefs | 106 | /** Constructor disabled for public. Use instance() to create a KOPrefs |
106 | object. */ | 107 | object. */ |
107 | KOPrefs(); | 108 | KOPrefs(); |
108 | 109 | ||
109 | static KOPrefs *mInstance; | 110 | static KOPrefs *mInstance; |
110 | QStringList getDefaultList(); | 111 | QStringList getDefaultList(); |
111 | QStringList getLocationDefaultList(); | 112 | QStringList getLocationDefaultList(); |
112 | public: | 113 | public: |
113 | // preferences data | 114 | // preferences data |
114 | KConfig* getConfig(); | 115 | KConfig* getConfig(); |
115 | void setFullName(const QString &); | 116 | void setFullName(const QString &); |
116 | QString fullName(); | 117 | QString fullName(); |
117 | void setEmail(const QString &); | 118 | void setEmail(const QString &); |
118 | QString email(); | 119 | QString email(); |
119 | 120 | ||
120 | QString mAdditional; | 121 | QString mAdditional; |
121 | 122 | ||
122 | bool mEmailControlCenter; | 123 | bool mEmailControlCenter; |
123 | 124 | ||
124 | bool mBcc; | 125 | bool mBcc; |
125 | bool mAutoSave; | 126 | bool mAutoSave; |
126 | int mAutoSaveInterval; | 127 | int mAutoSaveInterval; |
127 | bool mConfirm; | 128 | bool mConfirm; |
128 | 129 | ||
129 | bool mEnableGroupScheduling; | 130 | bool mEnableGroupScheduling; |
130 | bool mEnableProjectView; | 131 | bool mEnableProjectView; |
131 | 132 | ||
132 | int mDefaultFormat; | 133 | int mDefaultFormat; |
133 | int mMailClient; | 134 | int mMailClient; |
134 | 135 | ||
135 | int mStartTime; | 136 | int mStartTime; |
136 | int mDefaultDuration; | 137 | int mDefaultDuration; |
137 | int mAlarmTime; | 138 | int mAlarmTime; |
138 | 139 | ||
139 | int mWorkingHoursStart; | 140 | int mWorkingHoursStart; |
140 | int mWorkingHoursEnd; | 141 | int mWorkingHoursEnd; |
141 | bool mExcludeHolidays; | 142 | bool mExcludeHolidays; |
142 | bool mExcludeSaturdays; | 143 | bool mExcludeSaturdays; |
143 | bool mMarcusBainsShowSeconds; | 144 | bool mMarcusBainsShowSeconds; |
144 | 145 | ||
145 | QFont mTimeBarFont; | 146 | QFont mTimeBarFont; |
146 | QFont mMonthViewFont; | 147 | QFont mMonthViewFont; |
147 | QFont mAgendaViewFont; | 148 | QFont mAgendaViewFont; |
148 | QFont mMarcusBainsFont; | 149 | QFont mMarcusBainsFont; |
149 | QFont mTimeLabelsFont; | 150 | QFont mTimeLabelsFont; |
150 | QFont mTodoViewFont; | 151 | QFont mTodoViewFont; |
151 | QFont mListViewFont; | 152 | QFont mListViewFont; |
152 | QFont mDateNavigatorFont; | 153 | QFont mDateNavigatorFont; |
153 | QFont mEditBoxFont; | 154 | QFont mEditBoxFont; |
154 | QFont mJornalViewFont; | 155 | QFont mJornalViewFont; |
155 | QFont mWhatsNextFont; | 156 | QFont mWhatsNextFont; |
156 | QFont mEventViewFont; | 157 | QFont mEventViewFont; |
157 | 158 | ||
158 | 159 | ||
159 | 160 | ||
160 | 161 | ||
161 | QColor mHolidayColor; | 162 | QColor mHolidayColor; |
162 | QColor mHighlightColor; | 163 | QColor mHighlightColor; |
163 | QColor mEventColor; | 164 | QColor mEventColor; |
164 | QColor mTodoDoneColor; | 165 | QColor mTodoDoneColor; |
165 | QColor mAgendaBgColor; | 166 | QColor mAgendaBgColor; |
166 | QColor mWorkingHoursColor; | 167 | QColor mWorkingHoursColor; |
167 | QColor mTodoDueTodayColor; | 168 | QColor mTodoDueTodayColor; |
168 | QColor mTodoOverdueColor; | 169 | QColor mTodoOverdueColor; |
169 | QColor mTodoRunColor; | 170 | QColor mTodoRunColor; |
170 | QColor mMonthViewEvenColor; | 171 | QColor mMonthViewEvenColor; |
171 | QColor mMonthViewOddColor; | 172 | QColor mMonthViewOddColor; |
172 | QColor mMonthViewHolidayColor; | 173 | QColor mMonthViewHolidayColor; |
173 | bool mMonthViewUsesDayColors; | 174 | bool mMonthViewUsesDayColors; |
174 | bool mMonthViewSatSunTog; | 175 | bool mMonthViewSatSunTog; |
175 | bool mMonthViewWeek; | 176 | bool mMonthViewWeek; |
176 | QColor mAppColor1; | 177 | QColor mAppColor1; |
177 | QColor mAppColor2; | 178 | QColor mAppColor2; |
178 | bool mUseAppColors; | 179 | bool mUseAppColors; |
179 | 180 | ||
180 | int mDayBegins; | 181 | int mDayBegins; |
181 | int mHourSize; | 182 | int mHourSize; |
182 | int mAllDaySize; | 183 | int mAllDaySize; |
183 | bool mShowFullMenu; | 184 | bool mShowFullMenu; |
184 | bool mDailyRecur; | 185 | bool mDailyRecur; |
185 | bool mWeeklyRecur; | 186 | bool mWeeklyRecur; |
186 | bool mMonthDailyRecur; | 187 | bool mMonthDailyRecur; |
187 | bool mMonthWeeklyRecur; | 188 | bool mMonthWeeklyRecur; |
188 | bool mMonthShowIcons; | 189 | bool mMonthShowIcons; |
189 | bool mMonthShowTimes; | 190 | bool mMonthShowTimes; |
190 | bool mMonthShowShort; | 191 | bool mMonthShowShort; |
191 | bool mEnableToolTips; | 192 | bool mEnableToolTips; |
192 | bool mEnableMonthScroll; | 193 | bool mEnableMonthScroll; |
193 | bool mFullViewMonth; | 194 | bool mFullViewMonth; |
194 | bool mMonthViewUsesCategoryColor; | 195 | bool mMonthViewUsesCategoryColor; |
195 | bool mFullViewTodo; | 196 | bool mFullViewTodo; |
196 | bool mShowCompletedTodo; | 197 | bool mShowCompletedTodo; |
197 | bool mMarcusBainsEnabled; | 198 | bool mMarcusBainsEnabled; |
198 | int mNextXDays; | 199 | int mNextXDays; |
199 | int mWhatsNextDays; | 200 | int mWhatsNextDays; |
200 | int mWhatsNextPrios; | 201 | int mWhatsNextPrios; |
201 | bool mEnableQuickTodo; | 202 | bool mEnableQuickTodo; |
202 | 203 | ||
203 | bool mCompactDialogs; | 204 | bool mCompactDialogs; |
204 | bool mVerticalScreen; | 205 | bool mVerticalScreen; |
205 | 206 | ||
206 | bool mShowIconNewTodo; | 207 | bool mShowIconNewTodo; |
207 | bool mShowIconNewEvent; | 208 | bool mShowIconNewEvent; |
208 | bool mShowIconSearch; | 209 | bool mShowIconSearch; |
209 | bool mShowIconList; | 210 | bool mShowIconList; |
210 | bool mShowIconDay1; | 211 | bool mShowIconDay1; |
211 | bool mShowIconDay5; | 212 | bool mShowIconDay5; |
212 | bool mShowIconDay6; | 213 | bool mShowIconDay6; |
213 | bool mShowIconDay7; | 214 | bool mShowIconDay7; |
214 | bool mShowIconMonth; | 215 | bool mShowIconMonth; |
215 | bool mShowIconTodoview; | 216 | bool mShowIconTodoview; |
216 | bool mShowIconBackFast; | 217 | bool mShowIconBackFast; |
217 | bool mShowIconBack; | 218 | bool mShowIconBack; |
218 | bool mShowIconToday; | 219 | bool mShowIconToday; |
219 | bool mShowIconForward; | 220 | bool mShowIconForward; |
220 | bool mShowIconForwardFast; | 221 | bool mShowIconForwardFast; |
221 | bool mShowIconWhatsThis; | 222 | bool mShowIconWhatsThis; |
222 | bool mShowIconWeekNum; | 223 | bool mShowIconWeekNum; |
223 | bool mShowIconNextDays; | 224 | bool mShowIconNextDays; |